@instantdb/react-common 0.22.90-experimental.drewh-ssr.20312174628.1 → 0.22.90-experimental.drewh-ssr.20347747146.1

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.
@@ -55,18 +55,18 @@ function Li() {
55
55
  }
56
56
  function A(h, T, m) {
57
57
  {
58
- var O = _.ReactDebugCurrentFrame, I = O.getStackAddendum();
59
- I !== "" && (T += "%s", m = m.concat([I]));
58
+ var O = _.ReactDebugCurrentFrame, C = O.getStackAddendum();
59
+ C !== "" && (T += "%s", m = m.concat([C]));
60
60
  var P = m.map(function(j) {
61
61
  return String(j);
62
62
  });
63
63
  P.unshift("Warning: " + T), Function.prototype.apply.call(console[h], console, P);
64
64
  }
65
65
  }
66
- var S = !1, C = !1, x = !1, R = !1, Pe = !1, Ge;
66
+ var S = !1, I = !1, x = !1, R = !1, Pe = !1, Ge;
67
67
  Ge = Symbol.for("react.module.reference");
68
68
  function He(h) {
69
- return !!(typeof h == "string" || typeof h == "function" || h === i || h === o || Pe || h === s || h === d || h === f || R || h === y || S || C || x || typeof h == "object" && h !== null && (h.$$typeof === p || h.$$typeof === l || h.$$typeof === u || h.$$typeof === a || h.$$typeof === c || // This needs to include all possible module reference object
69
+ return !!(typeof h == "string" || typeof h == "function" || h === i || h === o || Pe || h === s || h === d || h === f || R || h === y || S || I || x || typeof h == "object" && h !== null && (h.$$typeof === p || h.$$typeof === l || h.$$typeof === u || h.$$typeof === a || h.$$typeof === c || // This needs to include all possible module reference object
70
70
  // types supported by any Flight configuration anywhere since
71
71
  // we don't know which Flight build this will end up being used
72
72
  // with.
@@ -76,8 +76,8 @@ function Li() {
76
76
  var O = h.displayName;
77
77
  if (O)
78
78
  return O;
79
- var I = T.displayName || T.name || "";
80
- return I !== "" ? m + "(" + I + ")" : m;
79
+ var C = T.displayName || T.name || "";
80
+ return C !== "" ? m + "(" + C + ")" : m;
81
81
  }
82
82
  function Ye(h) {
83
83
  return h.displayName || "Context";
@@ -117,7 +117,7 @@ function Li() {
117
117
  var O = h.displayName || null;
118
118
  return O !== null ? O : ne(h.type) || "Memo";
119
119
  case p: {
120
- var I = h, P = I._payload, j = I._init;
120
+ var C = h, P = C._payload, j = C._init;
121
121
  try {
122
122
  return ne(j(P));
123
123
  } catch {
@@ -195,8 +195,8 @@ function Li() {
195
195
  if (Tt === void 0)
196
196
  try {
197
197
  throw Error();
198
- } catch (I) {
199
- var O = I.stack.trim().match(/\n( *(at )?)/);
198
+ } catch (C) {
199
+ var O = C.stack.trim().match(/\n( *(at )?)/);
200
200
  Tt = O && O[1] || "";
201
201
  }
202
202
  return `
@@ -218,7 +218,7 @@ function Li() {
218
218
  }
219
219
  var O;
220
220
  wt = !0;
221
- var I = Error.prepareStackTrace;
221
+ var C = Error.prepareStackTrace;
222
222
  Error.prepareStackTrace = void 0;
223
223
  var P;
224
224
  P = gt.current, gt.current = null, di();
@@ -274,7 +274,7 @@ function Li() {
274
274
  }
275
275
  }
276
276
  } finally {
277
- wt = !1, gt.current = P, fi(), Error.prepareStackTrace = I;
277
+ wt = !1, gt.current = P, fi(), Error.prepareStackTrace = C;
278
278
  }
279
279
  var Se = h ? h.displayName || h.name : "", he = Se ? Je(Se) : "";
280
280
  return typeof h == "function" && Ze.set(h, he), he;
@@ -306,9 +306,9 @@ function Li() {
306
306
  case l:
307
307
  return Xe(h.type, T, m);
308
308
  case p: {
309
- var O = h, I = O._payload, P = O._init;
309
+ var O = h, C = O._payload, P = O._init;
310
310
  try {
311
- return Xe(P(I), T, m);
311
+ return Xe(P(C), T, m);
312
312
  } catch {
313
313
  }
314
314
  }
@@ -323,7 +323,7 @@ function Li() {
323
323
  } else
324
324
  mn.setExtraStackFrame(null);
325
325
  }
326
- function yi(h, T, m, O, I) {
326
+ function yi(h, T, m, O, C) {
327
327
  {
328
328
  var P = Function.call.bind(Me);
329
329
  for (var j in h)
@@ -338,7 +338,7 @@ function Li() {
338
338
  } catch (D) {
339
339
  E = D;
340
340
  }
341
- E && !(E instanceof Error) && (et(I), v("%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).", O || "React class", m, j, typeof E), et(null)), E instanceof Error && !(E.message in wn) && (wn[E.message] = !0, et(I), v("Failed %s type: %s", m, E.message), et(null));
341
+ E && !(E instanceof Error) && (et(C), v("%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).", O || "React class", m, j, typeof E), et(null)), E instanceof Error && !(E.message in wn) && (wn[E.message] = !0, et(C), v("Failed %s type: %s", m, E.message), et(null));
342
342
  }
343
343
  }
344
344
  }
@@ -413,7 +413,7 @@ function Li() {
413
413
  });
414
414
  }
415
415
  }
416
- var Ai = function(h, T, m, O, I, P, j) {
416
+ var Ai = function(h, T, m, O, C, P, j) {
417
417
  var E = {
418
418
  // This tag allows us to uniquely identify this as a React Element
419
419
  $$typeof: n,
@@ -439,13 +439,13 @@ function Li() {
439
439
  configurable: !1,
440
440
  enumerable: !1,
441
441
  writable: !1,
442
- value: I
442
+ value: C
443
443
  }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
444
444
  };
445
- function Ei(h, T, m, O, I) {
445
+ function Ei(h, T, m, O, C) {
446
446
  {
447
447
  var P, j = {}, E = null, z = null;
448
- m !== void 0 && (Sn(m), E = "" + m), mi(T) && (Sn(T.key), E = "" + T.key), wi(T) && (z = T.ref, vi(T, I));
448
+ m !== void 0 && (Sn(m), E = "" + m), mi(T) && (Sn(T.key), E = "" + T.key), wi(T) && (z = T.ref, vi(T, C));
449
449
  for (P in T)
450
450
  Me.call(T, P) && !Ti.hasOwnProperty(P) && (j[P] = T[P]);
451
451
  if (h && h.defaultProps) {
@@ -457,7 +457,7 @@ function Li() {
457
457
  var L = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
458
458
  E && Si(j, L), z && Oi(j, L);
459
459
  }
460
- return Ai(h, E, z, I, O, On.current, j);
460
+ return Ai(h, E, z, C, O, On.current, j);
461
461
  }
462
462
  }
463
463
  var vt = _.ReactCurrentOwner, kn = _.ReactDebugCurrentFrame;
@@ -488,7 +488,7 @@ Check the render method of \`` + h + "`.";
488
488
  function ki(h) {
489
489
  return "";
490
490
  }
491
- var Cn = {};
491
+ var In = {};
492
492
  function ji(h) {
493
493
  {
494
494
  var T = jn();
@@ -501,15 +501,15 @@ Check the top-level render call using <` + m + ">.");
501
501
  return T;
502
502
  }
503
503
  }
504
- function In(h, T) {
504
+ function Cn(h, T) {
505
505
  {
506
506
  if (!h._store || h._store.validated || h.key != null)
507
507
  return;
508
508
  h._store.validated = !0;
509
509
  var m = ji(T);
510
- if (Cn[m])
510
+ if (In[m])
511
511
  return;
512
- Cn[m] = !0;
512
+ In[m] = !0;
513
513
  var O = "";
514
514
  h && h._owner && h._owner !== vt.current && (O = " It was passed a child from " + ne(h._owner.type) + "."), ve(h), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, O), ve(null);
515
515
  }
@@ -521,19 +521,19 @@ Check the top-level render call using <` + m + ">.");
521
521
  if (mt(h))
522
522
  for (var m = 0; m < h.length; m++) {
523
523
  var O = h[m];
524
- Ot(O) && In(O, T);
524
+ Ot(O) && Cn(O, T);
525
525
  }
526
526
  else if (Ot(h))
527
527
  h._store && (h._store.validated = !0);
528
528
  else if (h) {
529
- var I = w(h);
530
- if (typeof I == "function" && I !== h.entries)
531
- for (var P = I.call(h), j; !(j = P.next()).done; )
532
- Ot(j.value) && In(j.value, T);
529
+ var C = w(h);
530
+ if (typeof C == "function" && C !== h.entries)
531
+ for (var P = C.call(h), j; !(j = P.next()).done; )
532
+ Ot(j.value) && Cn(j.value, T);
533
533
  }
534
534
  }
535
535
  }
536
- function Ci(h) {
536
+ function Ii(h) {
537
537
  {
538
538
  var T = h.type;
539
539
  if (T == null || typeof T == "string")
@@ -552,13 +552,13 @@ Check the top-level render call using <` + m + ">.");
552
552
  yi(m, h.props, "prop", O, h);
553
553
  } else if (T.PropTypes !== void 0 && !St) {
554
554
  St = !0;
555
- var I = ne(T);
556
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
555
+ var C = ne(T);
556
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
557
557
  }
558
558
  typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
559
559
  }
560
560
  }
561
- function Ii(h) {
561
+ function Ci(h) {
562
562
  {
563
563
  for (var T = Object.keys(h.props), m = 0; m < T.length; m++) {
564
564
  var O = T[m];
@@ -571,7 +571,7 @@ Check the top-level render call using <` + m + ">.");
571
571
  }
572
572
  }
573
573
  var Mn = {};
574
- function Rn(h, T, m, O, I, P) {
574
+ function Rn(h, T, m, O, C, P) {
575
575
  {
576
576
  var j = He(h);
577
577
  if (!j) {
@@ -582,7 +582,7 @@ Check the top-level render call using <` + m + ">.");
582
582
  var D;
583
583
  h === null ? D = "null" : mt(h) ? D = "array" : h !== void 0 && h.$$typeof === n ? (D = "<" + (ne(h.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : D = typeof h, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, E);
584
584
  }
585
- var L = Ei(h, T, m, I, P);
585
+ var L = Ei(h, T, m, C, P);
586
586
  if (L == null)
587
587
  return L;
588
588
  if (j) {
@@ -612,7 +612,7 @@ React keys must be passed directly to JSX without using spread:
612
612
  <%s key={someKey} {...props} />`, At, he, xi, he), Mn[he + At] = !0;
613
613
  }
614
614
  }
615
- return h === i ? Ii(L) : Ci(L), L;
615
+ return h === i ? Ci(L) : Ii(L), L;
616
616
  }
617
617
  }
618
618
  function Pi(h, T, m) {
@@ -1495,19 +1495,19 @@ function Fn(t) {
1495
1495
  const Zi = (t) => function e(n, r, i) {
1496
1496
  var s, o, u;
1497
1497
  if (typeof n == "function" && typeof r != "function")
1498
- return function(S, ...C) {
1499
- return e(S, (x) => n.call(this, x, ...C), r);
1498
+ return function(S, ...I) {
1499
+ return e(S, (x) => n.call(this, x, ...I), r);
1500
1500
  };
1501
1501
  const a = n, c = r;
1502
1502
  let d = i;
1503
1503
  if (typeof r != "function" && (d = r), d !== void 0 && Object.prototype.toString.call(d) !== "[object Object]")
1504
1504
  throw new Error(`Invalid options: ${d}, 'options' should be an object.`);
1505
1505
  d = Object.assign(Object.assign({}, t), d);
1506
- const f = Te(a) ? Fn(a) : a, l = Array.isArray(d.mark) ? (S, C) => {
1506
+ const f = Te(a) ? Fn(a) : a, l = Array.isArray(d.mark) ? (S, I) => {
1507
1507
  for (const x of d.mark) {
1508
1508
  if (typeof x != "function")
1509
1509
  throw new Error(`Invalid mark: ${x}, 'mark' should be a function.`);
1510
- const R = x(S, C);
1510
+ const R = x(S, I);
1511
1511
  if (R)
1512
1512
  return R;
1513
1513
  }
@@ -1532,21 +1532,21 @@ const Zi = (t) => function e(n, r, i) {
1532
1532
  throw $t(k(w)), S;
1533
1533
  }
1534
1534
  const A = (S) => {
1535
- const C = k(w);
1535
+ const I = k(w);
1536
1536
  if (!Te(S)) {
1537
- if (S !== void 0 && !ce(S, w) && (C != null && C.operated))
1537
+ if (S !== void 0 && !ce(S, w) && (I != null && I.operated))
1538
1538
  throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
1539
1539
  const R = S == null ? void 0 : S[Ni];
1540
1540
  if (R) {
1541
1541
  const Pe = R[0];
1542
1542
  return g.strict && typeof S == "object" && S !== null && Lt({
1543
- rootDraft: C,
1543
+ rootDraft: I,
1544
1544
  value: S,
1545
1545
  useRawReturn: !0
1546
1546
  }), _([Pe]);
1547
1547
  }
1548
1548
  if (S !== void 0)
1549
- return typeof S == "object" && S !== null && Lt({ rootDraft: C, value: S }), _([S]);
1549
+ return typeof S == "object" && S !== null && Lt({ rootDraft: I, value: S }), _([S]);
1550
1550
  }
1551
1551
  if (S === w || S === void 0)
1552
1552
  return _([]);
@@ -1563,7 +1563,7 @@ const Zi = (t) => function e(n, r, i) {
1563
1563
  }) : A(v);
1564
1564
  }, ft = Zi();
1565
1565
  Object.prototype.constructor.toString();
1566
- function Cr(t, e) {
1566
+ function Ir(t, e) {
1567
1567
  const n = Object.keys(t), r = Object.keys(e);
1568
1568
  return n.length === r.length && Object.keys(t).every((i) => e.hasOwnProperty(i));
1569
1569
  }
@@ -1571,7 +1571,7 @@ function Nn(t, e) {
1571
1571
  return Object.keys(t).length === Object.keys(e).length && Object.keys(t).every((n) => e.hasOwnProperty(n) && t[n] === e[n]);
1572
1572
  }
1573
1573
  function at(t, e) {
1574
- return typeof t != "object" || typeof e != "object" || t === null || e === null ? t === e : Cr(t, e) ? Object.keys(t).every((n) => at(t[n], e[n])) : !1;
1574
+ return typeof t != "object" || typeof e != "object" || t === null || e === null ? t === e : Ir(t, e) ? Object.keys(t).every((n) => at(t[n], e[n])) : !1;
1575
1575
  }
1576
1576
  function sn(t) {
1577
1577
  if (!Ue(t))
@@ -1581,7 +1581,7 @@ function sn(t) {
1581
1581
  r !== void 0 && (e[n] = r);
1582
1582
  return e;
1583
1583
  }
1584
- function Ir(t, e) {
1584
+ function Cr(t, e) {
1585
1585
  if (!Ue(t) || !Ue(e))
1586
1586
  return e;
1587
1587
  const n = Object.assign({}, t);
@@ -1593,7 +1593,7 @@ function Ir(t, e) {
1593
1593
  continue;
1594
1594
  }
1595
1595
  const i = Ue(t[r]) && Ue(e[r]);
1596
- n[r] = i ? Ir(t[r], e[r]) : e[r];
1596
+ n[r] = i ? Cr(t[r], e[r]) : e[r];
1597
1597
  }
1598
1598
  return n;
1599
1599
  }
@@ -2038,7 +2038,7 @@ function on(t) {
2038
2038
  function un(t) {
2039
2039
  return t["value-type"] === "blob";
2040
2040
  }
2041
- function Ce(t, e) {
2041
+ function Ie(t, e) {
2042
2042
  return e.reduce((n, r) => n && n.get(r), t);
2043
2043
  }
2044
2044
  function X(t, e) {
@@ -2092,7 +2092,7 @@ function xr(t, e) {
2092
2092
  return new _e(e.attrs, e.linkIndex);
2093
2093
  }
2094
2094
  function Ts(t, e) {
2095
- return Ce(t.eav, [e]) !== void 0;
2095
+ return Ie(t.eav, [e]) !== void 0;
2096
2096
  }
2097
2097
  function Le(t, e, n, r) {
2098
2098
  const i = Mr(t, e, r);
@@ -2136,7 +2136,7 @@ let ws = 0;
2136
2136
  function Ur(t, e, n) {
2137
2137
  const [r, i, s] = n;
2138
2138
  let o;
2139
- const u = Ce(t.eav, [r, i, s]);
2139
+ const u = Ie(t.eav, [r, i, s]);
2140
2140
  return u && (o = u[3]), o || Date.now() * 10 + ws++;
2141
2141
  }
2142
2142
  function Lr(t, e, n) {
@@ -2149,7 +2149,7 @@ function Lr(t, e, n) {
2149
2149
  if (!a)
2150
2150
  return;
2151
2151
  a["checked-data-type"] === "date" && t.useDateObjects && (u = pt(u));
2152
- const c = Ce(t.eav, [s, o, u]), d = (r = c == null ? void 0 : c[3]) !== null && r !== void 0 ? r : Ur(t, a, i), f = [s, o, u, d];
2152
+ const c = Ie(t.eav, [s, o, u]), d = (r = c == null ? void 0 : c[3]) !== null && r !== void 0 ? r : Ur(t, a, i), f = [s, o, u, d];
2153
2153
  gs(a) ? (Q(t.eav, [s, o], /* @__PURE__ */ new Map([[u, f]])), Q(t.aev, [o, s], /* @__PURE__ */ new Map([[u, f]]))) : (Q(t.eav, [s, o, u], f), Q(t.aev, [o, s, u], f)), on(a) && Q(t.vae, [u, o, s], f);
2154
2154
  }
2155
2155
  function ms(t, e, n) {
@@ -2162,13 +2162,13 @@ function ms(t, e, n) {
2162
2162
  return;
2163
2163
  if (!un(a))
2164
2164
  throw new Error("merge operation is not supported for links");
2165
- const c = Ce(t.eav, [s, o]);
2165
+ const c = Ie(t.eav, [s, o]);
2166
2166
  if (!c)
2167
2167
  return;
2168
2168
  const d = (r = c.values().next()) === null || r === void 0 ? void 0 : r.value;
2169
2169
  if (!d)
2170
2170
  return;
2171
- const f = d[2], l = Ir(f, u), p = [
2171
+ const f = d[2], l = Cr(f, u), p = [
2172
2172
  s,
2173
2173
  o,
2174
2174
  l,
@@ -2373,7 +2373,7 @@ function me(t, e, n) {
2373
2373
  var r;
2374
2374
  return (r = t.revIdents.get(e)) === null || r === void 0 ? void 0 : r.get(n);
2375
2375
  }
2376
- function Cs(t, e) {
2376
+ function Is(t, e) {
2377
2377
  return t.blobAttrs.get(e);
2378
2378
  }
2379
2379
  function Kr(t, e) {
@@ -2381,13 +2381,13 @@ function Kr(t, e) {
2381
2381
  const r = t.primaryKeys.get(e);
2382
2382
  return r || ((n = t.forwardIdents.get(e)) === null || n === void 0 ? void 0 : n.get("id"));
2383
2383
  }
2384
- function Is(t, e, n) {
2384
+ function Cs(t, e, n) {
2385
2385
  const r = Qe(t, n);
2386
2386
  if (!r)
2387
2387
  return;
2388
2388
  const [i, s, o] = r;
2389
2389
  if (e.getAttr(s))
2390
- return Ce(t.eav, [i, s]);
2390
+ return Ie(t.eav, [i, s]);
2391
2391
  }
2392
2392
  function Ps(t, e, n) {
2393
2393
  const r = n.filter(([i, s, o, u, a]) => {
@@ -2400,7 +2400,7 @@ function Ps(t, e, n) {
2400
2400
  const f = e.getAttr(o);
2401
2401
  if (f) {
2402
2402
  const l = Kr(e, f["forward-identity"][1]);
2403
- d = !!Is(t, e, [
2403
+ d = !!Cs(t, e, [
2404
2404
  s,
2405
2405
  l == null ? void 0 : l.id,
2406
2406
  s
@@ -2786,8 +2786,8 @@ function yo(t, e, n, { etype: r, level: i, form: s }, o) {
2786
2786
  level: v,
2787
2787
  form: s[p],
2788
2788
  join: A
2789
- }), C = w ? S[0] : S;
2790
- return { [p]: C };
2789
+ }), I = w ? S[0] : S;
2790
+ return { [p]: I };
2791
2791
  } catch (_) {
2792
2792
  if (_ instanceof ke)
2793
2793
  return { [p]: w ? void 0 : [] };
@@ -2835,7 +2835,7 @@ function wo(t, e, n, r) {
2835
2835
  function mo(t, e, n) {
2836
2836
  var r, i;
2837
2837
  if (!Array.isArray(n.fields))
2838
- return Cs(t, e);
2838
+ return Is(t, e);
2839
2839
  const s = /* @__PURE__ */ new Map();
2840
2840
  for (const o of n.fields) {
2841
2841
  const u = F(t, e, o), a = (r = u == null ? void 0 : u["forward-identity"]) === null || r === void 0 ? void 0 : r[2];
@@ -2855,8 +2855,8 @@ function vo(t, e, { etype: n, pageInfo: r, dq: i, form: s }) {
2855
2855
  if (p && ((u = p == null ? void 0 : p["forward-identity"]) === null || u === void 0 ? void 0 : u[2]) !== "id") {
2856
2856
  const g = p["checked-data-type"] === "date", w = p.id;
2857
2857
  f = f.map(([_]) => {
2858
- var v, A, S, C, x;
2859
- let R = (x = (C = (S = (A = (v = t.eav.get(_)) === null || v === void 0 ? void 0 : v.get(w)) === null || A === void 0 ? void 0 : A.values()) === null || S === void 0 ? void 0 : S.next()) === null || C === void 0 ? void 0 : C.value) === null || x === void 0 ? void 0 : x[2];
2858
+ var v, A, S, I, x;
2859
+ let R = (x = (I = (S = (A = (v = t.eav.get(_)) === null || v === void 0 ? void 0 : v.get(w)) === null || A === void 0 ? void 0 : A.values()) === null || S === void 0 ? void 0 : S.next()) === null || I === void 0 ? void 0 : I.value) === null || x === void 0 ? void 0 : x[2];
2860
2860
  return g && (R = zt(R)), [_, R];
2861
2861
  });
2862
2862
  }
@@ -2979,7 +2979,7 @@ function Gr(t) {
2979
2979
  const [e, n, ...r] = t.split("__");
2980
2980
  return [n, JSON.parse(r.join("__"))];
2981
2981
  }
2982
- function Co(t) {
2982
+ function Io(t) {
2983
2983
  return new Proxy({
2984
2984
  __etype: t
2985
2985
  }, {
@@ -2994,12 +2994,12 @@ function Co(t) {
2994
2994
  function cn() {
2995
2995
  return new Proxy({}, {
2996
2996
  get(t, e) {
2997
- return Co(e);
2997
+ return Io(e);
2998
2998
  }
2999
2999
  });
3000
3000
  }
3001
3001
  cn();
3002
- function Io(t) {
3002
+ function Co(t) {
3003
3003
  return t.__ops;
3004
3004
  }
3005
3005
  function Po(t, e) {
@@ -3339,8 +3339,8 @@ function tu({ attrsStore: t, schema: e }, n) {
3339
3339
  if (l(S, _))
3340
3340
  p(S, Wt(_));
3341
3341
  else {
3342
- const C = a(S, _);
3343
- C || d(rt(e, S, _, Bt)), f(C);
3342
+ const I = a(S, _);
3343
+ I || d(rt(e, S, _, Bt)), f(I);
3344
3344
  }
3345
3345
  } else if (l(b, _))
3346
3346
  p(b, Wt(_));
@@ -3357,8 +3357,8 @@ function tu({ attrsStore: t, schema: e }, n) {
3357
3357
  for (const A of Object.keys(_)) {
3358
3358
  const S = a(g, A);
3359
3359
  if (f(S), Jo.has(b) && (S || d(rt(e, g, A, A === "id" ? { "unique?": !0 } : null))), Yo.has(b)) {
3360
- const C = c(g, A);
3361
- !S && !C && d(Yn(e, g, A)), f(C);
3360
+ const I = c(g, A);
3361
+ !S && !I && d(Yn(e, g, A)), f(I);
3362
3362
  }
3363
3363
  }
3364
3364
  }
@@ -3372,7 +3372,7 @@ function tu({ attrsStore: t, schema: e }, n) {
3372
3372
  return [t, u];
3373
3373
  }
3374
3374
  function nu(t, e) {
3375
- const r = (Array.isArray(e) ? e : [e]).flatMap((a) => Io(a)), [i, s] = tu(t, r), o = Object.assign(Object.assign({}, t), { attrsStore: i }), u = r.flatMap((a) => Vo(o, a));
3375
+ const r = (Array.isArray(e) ? e : [e]).flatMap((a) => Co(a)), [i, s] = tu(t, r), o = Object.assign(Object.assign({}, t), { attrsStore: i }), u = r.flatMap((a) => Vo(o, a));
3376
3376
  return [...s, ...u];
3377
3377
  }
3378
3378
  var re = function(t, e, n, r) {
@@ -3994,7 +3994,7 @@ function te(t, e) {
3994
3994
  return n.status === 200 ? Promise.resolve(r) : Promise.reject(new bt({ status: n.status, body: r }));
3995
3995
  });
3996
3996
  }
3997
- var Ie = function(t, e, n, r) {
3997
+ var Ce = function(t, e, n, r) {
3998
3998
  function i(s) {
3999
3999
  return s instanceof n ? s : new n(function(o) {
4000
4000
  o(s);
@@ -4029,7 +4029,7 @@ function lu({ apiURI: t, appId: e, email: n }) {
4029
4029
  });
4030
4030
  }
4031
4031
  function hu(t) {
4032
- return Ie(this, arguments, void 0, function* ({ apiURI: e, appId: n, email: r, code: i, refreshToken: s }) {
4032
+ return Ce(this, arguments, void 0, function* ({ apiURI: e, appId: n, email: r, code: i, refreshToken: s }) {
4033
4033
  return yield te(`${e}/runtime/auth/verify_magic_code`, {
4034
4034
  method: "POST",
4035
4035
  headers: { "content-type": "application/json" },
@@ -4042,7 +4042,7 @@ function hu(t) {
4042
4042
  });
4043
4043
  }
4044
4044
  function pu(t) {
4045
- return Ie(this, arguments, void 0, function* ({ apiURI: e, appId: n, refreshToken: r }) {
4045
+ return Ce(this, arguments, void 0, function* ({ apiURI: e, appId: n, refreshToken: r }) {
4046
4046
  return yield te(`${e}/runtime/auth/verify_refresh_token`, {
4047
4047
  method: "POST",
4048
4048
  headers: { "content-type": "application/json" },
@@ -4054,7 +4054,7 @@ function pu(t) {
4054
4054
  });
4055
4055
  }
4056
4056
  function yu(t) {
4057
- return Ie(this, arguments, void 0, function* ({ apiURI: e, appId: n }) {
4057
+ return Ce(this, arguments, void 0, function* ({ apiURI: e, appId: n }) {
4058
4058
  return yield te(`${e}/runtime/auth/sign_in_guest`, {
4059
4059
  method: "POST",
4060
4060
  headers: { "content-type": "application/json" },
@@ -4065,7 +4065,7 @@ function yu(t) {
4065
4065
  });
4066
4066
  }
4067
4067
  function er(t) {
4068
- return Ie(this, arguments, void 0, function* ({ apiURI: e, appId: n, code: r, codeVerifier: i, refreshToken: s }) {
4068
+ return Ce(this, arguments, void 0, function* ({ apiURI: e, appId: n, code: r, codeVerifier: i, refreshToken: s }) {
4069
4069
  return yield te(`${e}/runtime/oauth/token`, {
4070
4070
  method: "POST",
4071
4071
  headers: { "content-type": "application/json" },
@@ -4079,7 +4079,7 @@ function er(t) {
4079
4079
  });
4080
4080
  }
4081
4081
  function bu(t) {
4082
- return Ie(this, arguments, void 0, function* ({ apiURI: e, appId: n, nonce: r, idToken: i, clientName: s, refreshToken: o }) {
4082
+ return Ce(this, arguments, void 0, function* ({ apiURI: e, appId: n, nonce: r, idToken: i, clientName: s, refreshToken: o }) {
4083
4083
  return yield te(`${e}/runtime/oauth/id_token`, {
4084
4084
  method: "POST",
4085
4085
  headers: { "content-type": "application/json" },
@@ -4094,7 +4094,7 @@ function bu(t) {
4094
4094
  });
4095
4095
  }
4096
4096
  function _u(t) {
4097
- return Ie(this, arguments, void 0, function* ({ apiURI: e, appId: n, refreshToken: r }) {
4097
+ return Ce(this, arguments, void 0, function* ({ apiURI: e, appId: n, refreshToken: r }) {
4098
4098
  return yield te(`${e}/runtime/signout`, {
4099
4099
  method: "POST",
4100
4100
  headers: {
@@ -4229,7 +4229,7 @@ function Su(t, e, n) {
4229
4229
  return s;
4230
4230
  }
4231
4231
  function Ou(t, e) {
4232
- if (t.isLoading !== e.isLoading || t.error !== e.error || (t.user || e.user) && (!t.user || !e.user || !Nn(t.user, e.user)) || !Cr(t.peers, e.peers))
4232
+ if (t.isLoading !== e.isLoading || t.error !== e.error || (t.user || e.user) && (!t.user || !e.user || !Nn(t.user, e.user)) || !Ir(t.peers, e.peers))
4233
4233
  return !0;
4234
4234
  for (const r of Object.keys(t.peers))
4235
4235
  if (!Nn(t.peers[r], e.peers[r]))
@@ -4276,7 +4276,7 @@ function ir(t) {
4276
4276
  }, e;
4277
4277
  }, {});
4278
4278
  }
4279
- const ni = "v0.22.90-experimental.drewh-ssr.20312174628.1";
4279
+ const ni = "v0.22.90-experimental.drewh-ssr.20347747146.1";
4280
4280
  function Au(t, e) {
4281
4281
  return {
4282
4282
  info: t ? (...n) => console.info(...n, e()) : () => {
@@ -4453,7 +4453,7 @@ const sr = [
4453
4453
  Ae(s, i, c, e, `${r}.${i}`);
4454
4454
  }
4455
4455
  }
4456
- }, Cu = (t, e, n, r, i = 0) => {
4456
+ }, Iu = (t, e, n, r, i = 0) => {
4457
4457
  for (const o of Object.keys(t))
4458
4458
  if (!sr.includes(o))
4459
4459
  throw new M(`Invalid query parameter '${o}' in $ object. Valid parameters are: ${sr.join(", ")}. Found: ${o}`, r);
@@ -4492,7 +4492,7 @@ const sr = [
4492
4492
  const u = t[o];
4493
4493
  if (typeof u != "object" || u === null)
4494
4494
  throw new M(`Query parameter '$' must be an object in entity '${e}', but received: ${typeof u}`, `${r}.$`);
4495
- Cu(u, e, n, `${r}.$`, i);
4495
+ Iu(u, e, n, `${r}.$`, i);
4496
4496
  }
4497
4497
  }, or = (t, e) => {
4498
4498
  if (typeof t != "object" || t === null)
@@ -4519,7 +4519,7 @@ class Z extends Error {
4519
4519
  super(e), this.name = "TransactionValidationError";
4520
4520
  }
4521
4521
  }
4522
- const oi = (t) => t.length > 0 ? t.join(", ") : "none", Iu = (t, e) => new Z(`Entity '${t}' does not exist in schema. Available entities: ${oi(e)}`), ar = {
4522
+ const oi = (t) => t.length > 0 ? t.join(", ") : "none", Cu = (t, e) => new Z(`Entity '${t}' does not exist in schema. Available entities: ${oi(e)}`), ar = {
4523
4523
  string: (t) => typeof t == "string",
4524
4524
  number: (t) => typeof t == "number" && !isNaN(t),
4525
4525
  boolean: (t) => typeof t == "boolean",
@@ -4531,7 +4531,7 @@ const oi = (t) => t.length > 0 ? t.join(", ") : "none", Iu = (t, e) => new Z(`En
4531
4531
  }, ui = (t, e) => {
4532
4532
  const n = e.entities[t];
4533
4533
  if (!n)
4534
- throw Iu(t, Object.keys(e.entities));
4534
+ throw Cu(t, Object.keys(e.entities));
4535
4535
  return n;
4536
4536
  }, jt = (t, e, n) => {
4537
4537
  const r = ui(t, n);
@@ -4794,7 +4794,7 @@ function Lu(t, e, n) {
4794
4794
  const s = (r = e == null ? void 0 : e.state) === null || r === void 0 ? void 0 : r.txId, o = (i = n == null ? void 0 : n.state) === null || i === void 0 ? void 0 : i.txId;
4795
4795
  return s && (!o || s > o) ? e : o && (!s || o > s) ? n : e || n;
4796
4796
  }
4797
- function Ct(t, e, n) {
4797
+ function It(t, e, n) {
4798
4798
  return Br({ store: e, attrsStore: n, pageInfo: null, aggregate: null }, t.query).data[t.table][0];
4799
4799
  }
4800
4800
  function hr(t, e, n, r) {
@@ -4802,7 +4802,7 @@ function hr(t, e, n, r) {
4802
4802
  const s = (i = F(n, t.table, "id")) === null || i === void 0 ? void 0 : i.id;
4803
4803
  if (!s)
4804
4804
  return -1;
4805
- const o = Ce(e.eav, [r, s, r]);
4805
+ const o = Ie(e.eav, [r, s, r]);
4806
4806
  return o ? o[3] : -1;
4807
4807
  }
4808
4808
  function pr(t, e, n) {
@@ -5004,7 +5004,7 @@ class qu {
5004
5004
  u.values = a;
5005
5005
  const c = a.entities;
5006
5006
  for (const d of i) {
5007
- const f = this.createStore(d), l = Ct(u, f, a.attrsStore);
5007
+ const f = this.createStore(d), l = It(u, f, a.attrsStore);
5008
5008
  c.push({
5009
5009
  store: f,
5010
5010
  entity: l,
@@ -5080,12 +5080,12 @@ class qu {
5080
5080
  const S = p[A];
5081
5081
  if (Ts(S.store, _)) {
5082
5082
  pr(S.store, l.attrsStore, v);
5083
- const C = Ct(u, S.store, l.attrsStore), x = Fu(S.store, l.attrsStore, v)[_];
5084
- C ? (y.push({
5083
+ const I = It(u, S.store, l.attrsStore), x = Fu(S.store, l.attrsStore, v)[_];
5084
+ I ? (y.push({
5085
5085
  oldEntity: S.entity,
5086
- newEntity: C,
5086
+ newEntity: I,
5087
5087
  changedFields: x || {}
5088
- }), S.entity = C) : d.push(A), delete f[_];
5088
+ }), S.entity = I) : d.push(A), delete f[_];
5089
5089
  continue e;
5090
5090
  }
5091
5091
  }
@@ -5093,7 +5093,7 @@ class qu {
5093
5093
  for (const [_, v] of Object.entries(f)) {
5094
5094
  const A = this.createStore([]);
5095
5095
  pr(A, l.attrsStore, v);
5096
- const S = Ct(u, A, l.attrsStore);
5096
+ const S = It(u, A, l.attrsStore);
5097
5097
  if (!S) {
5098
5098
  this.log.error("No entity found after applying change", {
5099
5099
  sub: u,
@@ -5196,7 +5196,7 @@ const oe = {
5196
5196
  }, zu = 3e4, Vu = 3e4, Wu = 200, Qu = {
5197
5197
  apiURI: "https://api.instantdb.com",
5198
5198
  websocketURI: "wss://api.instantdb.com/runtime/session"
5199
- }, It = "_instant_oauth_redirect", xe = "currentUser";
5199
+ }, Ct = "_instant_oauth_redirect", xe = "currentUser";
5200
5200
  function Bu({ transportType: t, appId: e, apiURI: n, wsURI: r, EventSourceImpl: i }) {
5201
5201
  if (!i)
5202
5202
  return new fr(`${r}?app_id=${e}`);
@@ -5596,8 +5596,8 @@ class ea {
5596
5596
  _.pendingMutations = b;
5597
5597
  });
5598
5598
  const g = br(b.entries()), w = l.map((_) => {
5599
- var v, A, S, C;
5600
- const x = _["instaql-query"], R = _["instaql-result"], Pe = N(x), Ge = rr(R), He = this.ensureAttrs(), _t = Le(He, Ge, c, this.config.useDateObjects), { store: Ye, attrsStore: ne } = this._applyOptimisticUpdates(_t, He, g, y), se = (A = (v = R == null ? void 0 : R[0]) === null || v === void 0 ? void 0 : v.data) === null || A === void 0 ? void 0 : A["page-info"], le = (C = (S = R == null ? void 0 : R[0]) === null || S === void 0 ? void 0 : S.data) === null || C === void 0 ? void 0 : C.aggregate;
5599
+ var v, A, S, I;
5600
+ const x = _["instaql-query"], R = _["instaql-result"], Pe = N(x), Ge = rr(R), He = this.ensureAttrs(), _t = Le(He, Ge, c, this.config.useDateObjects), { store: Ye, attrsStore: ne } = this._applyOptimisticUpdates(_t, He, g, y), se = (A = (v = R == null ? void 0 : R[0]) === null || v === void 0 ? void 0 : v.data) === null || A === void 0 ? void 0 : A["page-info"], le = (I = (S = R == null ? void 0 : R[0]) === null || S === void 0 ? void 0 : S.data) === null || I === void 0 ? void 0 : I.aggregate;
5601
5601
  return {
5602
5602
  q: x,
5603
5603
  hash: Pe,
@@ -5607,7 +5607,7 @@ class ea {
5607
5607
  aggregate: le
5608
5608
  };
5609
5609
  });
5610
- w.forEach(({ hash: _, q: v, store: A, attrsStore: S, pageInfo: C, aggregate: x }) => {
5610
+ w.forEach(({ hash: _, q: v, store: A, attrsStore: S, pageInfo: I, aggregate: x }) => {
5611
5611
  this.querySubs.updateInPlace((R) => {
5612
5612
  if (!R[_]) {
5613
5613
  this._log.error("Missing value in querySubs", { hash: _, q: v });
@@ -5616,7 +5616,7 @@ class ea {
5616
5616
  R[_].result = {
5617
5617
  store: A,
5618
5618
  attrsStore: S,
5619
- pageInfo: C,
5619
+ pageInfo: I,
5620
5620
  aggregate: x,
5621
5621
  processedTxId: y
5622
5622
  };
@@ -6071,9 +6071,9 @@ class ea {
6071
6071
  if (typeof URL > "u")
6072
6072
  return;
6073
6073
  const e = new URL(window.location.href);
6074
- if (e.searchParams.get(It)) {
6074
+ if (e.searchParams.get(Ct)) {
6075
6075
  const n = e.toString();
6076
- e.searchParams.delete(It), e.searchParams.delete("code"), e.searchParams.delete("error");
6076
+ e.searchParams.delete(Ct), e.searchParams.delete("code"), e.searchParams.delete("error");
6077
6077
  const r = e.pathname + (e.searchParams.size ? "?" + e.searchParams : "") + e.hash;
6078
6078
  if (history.replaceState(history.state, "", r), // @ts-ignore (waiting for ts support)
6079
6079
  typeof navigation == "object" && // @ts-ignore (waiting for ts support)
@@ -6098,7 +6098,7 @@ class ea {
6098
6098
  if (typeof window > "u" || typeof window.location > "u" || typeof URLSearchParams > "u")
6099
6099
  return null;
6100
6100
  const s = new URLSearchParams(window.location.search);
6101
- if (!s.get(It))
6101
+ if (!s.get(Ct))
6102
6102
  return null;
6103
6103
  const o = s.get("error");
6104
6104
  if (o)
@@ -6231,11 +6231,13 @@ class ea {
6231
6231
  }
6232
6232
  syncUserToEndpoint(e) {
6233
6233
  return $(this, void 0, void 0, function* () {
6234
- if (this.config.cookieEndpoint)
6234
+ if (this.config.firstPartyPath)
6235
6235
  try {
6236
- fetch(this.config.cookieEndpoint + "/sync-auth", {
6236
+ fetch(this.config.firstPartyPath + "/", {
6237
6237
  method: "POST",
6238
6238
  body: JSON.stringify({
6239
+ type: "sync-user",
6240
+ appId: this.config.appId,
6239
6241
  user: e
6240
6242
  }),
6241
6243
  headers: {
@@ -7060,7 +7062,7 @@ const ja = {
7060
7062
  user: void 0,
7061
7063
  error: void 0
7062
7064
  };
7063
- class Ia {
7065
+ class Ca {
7064
7066
  constructor(e, n) {
7065
7067
  this.tx = cn(), this.getLocalId = (r) => this.core.getLocalId(r), this.useLocalId = (r) => {
7066
7068
  const [i, s] = mr(null);
@@ -7148,5 +7150,5 @@ class Ia {
7148
7150
  }
7149
7151
  }
7150
7152
  export {
7151
- Ia as InstantReactAbstractDatabase
7153
+ Ca as InstantReactAbstractDatabase
7152
7154
  };