@instantdb/platform 0.22.95 → 0.22.96-experimental.add-posthog-frontend.20387039167.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.
- package/.turbo/turbo-build.log +8 -8
- package/dist/commonjs/api.d.ts.map +1 -1
- package/dist/commonjs/api.js +1 -1
- package/dist/commonjs/api.js.map +1 -1
- package/dist/esm/api.d.ts.map +1 -1
- package/dist/esm/api.js +1 -1
- package/dist/esm/api.js.map +1 -1
- package/dist/standalone/index.js +109 -107
- package/dist/standalone/index.umd.cjs +6 -6
- package/package.json +3 -3
- package/src/api.ts +2 -0
package/dist/standalone/index.js
CHANGED
|
@@ -19,7 +19,7 @@ const j = {
|
|
|
19
19
|
Remove: "remove",
|
|
20
20
|
Replace: "replace",
|
|
21
21
|
Add: "add"
|
|
22
|
-
}, Ms = Symbol.for("__MUTATIVE_PROXY_DRAFT__"),
|
|
22
|
+
}, Ms = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), Ge = Symbol.iterator, ee = {
|
|
23
23
|
mutable: "mutable",
|
|
24
24
|
immutable: "immutable"
|
|
25
25
|
}, Bt = {};
|
|
@@ -84,14 +84,14 @@ function _s(r, t = []) {
|
|
|
84
84
|
}
|
|
85
85
|
return t;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Ve(r) {
|
|
88
88
|
return Array.isArray(r) ? 1 : r instanceof Map ? 2 : r instanceof Set ? 3 : 0;
|
|
89
89
|
}
|
|
90
90
|
function me(r, t) {
|
|
91
|
-
return
|
|
91
|
+
return Ve(r) === 2 ? r.get(t) : r[t];
|
|
92
92
|
}
|
|
93
93
|
function Rt(r, t, s) {
|
|
94
|
-
|
|
94
|
+
Ve(r) === 2 ? r.set(t, s) : r[t] = s;
|
|
95
95
|
}
|
|
96
96
|
function yt(r, t) {
|
|
97
97
|
const s = v(r);
|
|
@@ -109,7 +109,7 @@ function Te(r, t) {
|
|
|
109
109
|
function yi(r, t) {
|
|
110
110
|
for (let s = 0; s < t.length - 1; s += 1) {
|
|
111
111
|
const e = t[s];
|
|
112
|
-
if (r = me(
|
|
112
|
+
if (r = me(Ve(r) === 3 ? Array.from(r) : r, e), typeof r != "object")
|
|
113
113
|
throw new Error(`Cannot resolve patch at '${t.join("/")}'.`);
|
|
114
114
|
}
|
|
115
115
|
return r;
|
|
@@ -198,7 +198,7 @@ function Fe(r) {
|
|
|
198
198
|
t[s] = Fe(r[s]);
|
|
199
199
|
return t;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Ye(r) {
|
|
202
202
|
return St(r) ? Fe(r) : r;
|
|
203
203
|
}
|
|
204
204
|
function se(r) {
|
|
@@ -206,7 +206,7 @@ function se(r) {
|
|
|
206
206
|
r.assignedMap = (t = r.assignedMap) !== null && t !== void 0 ? t : /* @__PURE__ */ new Map(), r.operated || (r.operated = !0, r.parent && se(r.parent));
|
|
207
207
|
}
|
|
208
208
|
function gi(r, t) {
|
|
209
|
-
const s =
|
|
209
|
+
const s = Ve(r);
|
|
210
210
|
if (s === 0)
|
|
211
211
|
Reflect.ownKeys(r).forEach((e) => {
|
|
212
212
|
t(e, r[e], r);
|
|
@@ -280,12 +280,12 @@ function Ti(r, t, s, e, i) {
|
|
|
280
280
|
op: j.Replace,
|
|
281
281
|
path: p,
|
|
282
282
|
// If it is a draft, it needs to be deep cloned, and it may also be non-draft.
|
|
283
|
-
value:
|
|
283
|
+
value: Ye(c[h])
|
|
284
284
|
}), e.push({
|
|
285
285
|
op: j.Replace,
|
|
286
286
|
path: p,
|
|
287
287
|
// If it is a draft, it needs to be deep cloned, and it may also be non-draft.
|
|
288
|
-
value:
|
|
288
|
+
value: Ye(a[h])
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
for (let h = a.length; h < c.length; h += 1) {
|
|
@@ -294,7 +294,7 @@ function Ti(r, t, s, e, i) {
|
|
|
294
294
|
op: j.Add,
|
|
295
295
|
path: p,
|
|
296
296
|
// If it is a draft, it needs to be deep cloned, and it may also be non-draft.
|
|
297
|
-
value:
|
|
297
|
+
value: Ye(c[h])
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
if (a.length < c.length) {
|
|
@@ -318,7 +318,7 @@ function Ti(r, t, s, e, i) {
|
|
|
318
318
|
}
|
|
319
319
|
function Ai({ original: r, copy: t, assignedMap: s }, e, i, a, n) {
|
|
320
320
|
s.forEach((o, c) => {
|
|
321
|
-
const h = me(r, c), l =
|
|
321
|
+
const h = me(r, c), l = Ye(me(t, c)), p = o ? _e(r, c) ? j.Replace : j.Add : j.Remove;
|
|
322
322
|
if (Ae(h, l) && p === j.Replace)
|
|
323
323
|
return;
|
|
324
324
|
const d = e.concat(c), f = Te(d, n);
|
|
@@ -357,7 +357,7 @@ function Si({ original: r, copy: t }, s, e, i, a) {
|
|
|
357
357
|
n += 1;
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ue(r, t, s, e) {
|
|
361
361
|
const { pathAsArray: i = !0 } = r.options.enablePatches;
|
|
362
362
|
switch (r.type) {
|
|
363
363
|
case 0:
|
|
@@ -369,7 +369,7 @@ function je(r, t, s, e) {
|
|
|
369
369
|
return Si(r, t, s, e, i);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
const
|
|
372
|
+
const rt = (r, t, s = !1) => {
|
|
373
373
|
if (typeof r == "object" && r !== null && (!Se(r, t) || s))
|
|
374
374
|
throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
|
|
375
375
|
}, Ct = {
|
|
@@ -381,7 +381,7 @@ const it = (r, t, s = !1) => {
|
|
|
381
381
|
},
|
|
382
382
|
set(r, t) {
|
|
383
383
|
const s = v(this), e = X(s);
|
|
384
|
-
return (!e.has(r) || !Ae(e.get(r), t)) && (V(s), se(s), s.assignedMap.set(r, !0), s.copy.set(r, t), jt(s, r, t,
|
|
384
|
+
return (!e.has(r) || !Ae(e.get(r), t)) && (V(s), se(s), s.assignedMap.set(r, !0), s.copy.set(r, t), jt(s, r, t, Ue)), this;
|
|
385
385
|
},
|
|
386
386
|
delete(r) {
|
|
387
387
|
if (!this.has(r))
|
|
@@ -407,7 +407,7 @@ const it = (r, t, s = !1) => {
|
|
|
407
407
|
get(r) {
|
|
408
408
|
var t, s;
|
|
409
409
|
const e = v(this), i = X(e).get(r), a = ((s = (t = e.options).mark) === null || s === void 0 ? void 0 : s.call(t, i, ee)) === ee.mutable;
|
|
410
|
-
if (e.options.strict &&
|
|
410
|
+
if (e.options.strict && rt(i, e.options, a), a || e.finalized || !Se(i, e.options) || i !== e.original.get(r))
|
|
411
411
|
return i;
|
|
412
412
|
const n = Bt.createDraft({
|
|
413
413
|
original: i,
|
|
@@ -424,7 +424,7 @@ const it = (r, t, s = !1) => {
|
|
|
424
424
|
values() {
|
|
425
425
|
const r = this.keys();
|
|
426
426
|
return {
|
|
427
|
-
[
|
|
427
|
+
[Ge]: () => this.values(),
|
|
428
428
|
next: () => {
|
|
429
429
|
const t = r.next();
|
|
430
430
|
return t.done ? t : {
|
|
@@ -437,7 +437,7 @@ const it = (r, t, s = !1) => {
|
|
|
437
437
|
entries() {
|
|
438
438
|
const r = this.keys();
|
|
439
439
|
return {
|
|
440
|
-
[
|
|
440
|
+
[Ge]: () => this.entries(),
|
|
441
441
|
next: () => {
|
|
442
442
|
const t = r.next();
|
|
443
443
|
if (t.done)
|
|
@@ -450,7 +450,7 @@ const it = (r, t, s = !1) => {
|
|
|
450
450
|
}
|
|
451
451
|
};
|
|
452
452
|
},
|
|
453
|
-
[
|
|
453
|
+
[Ge]() {
|
|
454
454
|
return this.entries();
|
|
455
455
|
}
|
|
456
456
|
}, Ii = Reflect.ownKeys(Ct), as = (r, t, { isValuesIterator: s }) => () => {
|
|
@@ -461,7 +461,7 @@ const it = (r, t, s = !1) => {
|
|
|
461
461
|
const n = a.value;
|
|
462
462
|
let o = r.setMap.get(n);
|
|
463
463
|
const c = v(o), h = ((i = (e = r.options).mark) === null || i === void 0 ? void 0 : i.call(e, o, ee)) === ee.mutable;
|
|
464
|
-
if (r.options.strict &&
|
|
464
|
+
if (r.options.strict && rt(n, r.options, h), !h && !c && Se(n, r.options) && !r.finalized && r.original.has(n)) {
|
|
465
465
|
const l = Bt.createDraft({
|
|
466
466
|
original: n,
|
|
467
467
|
parentDraft: r,
|
|
@@ -475,7 +475,7 @@ const it = (r, t, s = !1) => {
|
|
|
475
475
|
done: !1,
|
|
476
476
|
value: s ? o : [o, o]
|
|
477
477
|
};
|
|
478
|
-
},
|
|
478
|
+
}, at = {
|
|
479
479
|
get size() {
|
|
480
480
|
return v(this).setMap.size;
|
|
481
481
|
},
|
|
@@ -489,7 +489,7 @@ const it = (r, t, s = !1) => {
|
|
|
489
489
|
},
|
|
490
490
|
add(r) {
|
|
491
491
|
const t = v(this);
|
|
492
|
-
return this.has(r) || (V(t), se(t), t.assignedMap.set(r, !0), t.setMap.set(r, r), jt(t, r, r,
|
|
492
|
+
return this.has(r) || (V(t), se(t), t.assignedMap.set(r, !0), t.setMap.set(r, r), jt(t, r, r, Ue)), this;
|
|
493
493
|
},
|
|
494
494
|
delete(r) {
|
|
495
495
|
if (!this.has(r))
|
|
@@ -531,7 +531,7 @@ const it = (r, t, s = !1) => {
|
|
|
531
531
|
keys() {
|
|
532
532
|
return this.values();
|
|
533
533
|
},
|
|
534
|
-
[
|
|
534
|
+
[Ge]() {
|
|
535
535
|
return this.values();
|
|
536
536
|
},
|
|
537
537
|
forEach(r, t) {
|
|
@@ -541,7 +541,7 @@ const it = (r, t, s = !1) => {
|
|
|
541
541
|
r.call(t, e.value, e.value, this), e = s.next();
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
|
-
Set.prototype.difference && Object.assign(
|
|
544
|
+
Set.prototype.difference && Object.assign(at, {
|
|
545
545
|
intersection(r) {
|
|
546
546
|
return Set.prototype.intersection.call(new Set(this.values()), r);
|
|
547
547
|
},
|
|
@@ -564,7 +564,7 @@ Set.prototype.difference && Object.assign(rt, {
|
|
|
564
564
|
return Set.prototype.isDisjointFrom.call(new Set(this.values()), r);
|
|
565
565
|
}
|
|
566
566
|
});
|
|
567
|
-
const Ei = Reflect.ownKeys(
|
|
567
|
+
const Ei = Reflect.ownKeys(at), js = /* @__PURE__ */ new WeakSet(), Us = {
|
|
568
568
|
get(r, t, s) {
|
|
569
569
|
var e, i;
|
|
570
570
|
const a = (e = r.copy) === null || e === void 0 ? void 0 : e[t];
|
|
@@ -576,7 +576,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
|
|
|
576
576
|
if (r.options.mark) {
|
|
577
577
|
const h = t === "size" && (r.original instanceof Map || r.original instanceof Set) ? Reflect.get(r.original, t) : Reflect.get(r.original, t, s);
|
|
578
578
|
if (n = r.options.mark(h, ee), n === ee.mutable)
|
|
579
|
-
return r.options.strict &&
|
|
579
|
+
return r.options.strict && rt(h, r.options, !0), h;
|
|
580
580
|
}
|
|
581
581
|
const o = X(r);
|
|
582
582
|
if (o instanceof Map && Ii.includes(t)) {
|
|
@@ -588,8 +588,8 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
|
|
|
588
588
|
}
|
|
589
589
|
if (o instanceof Set && Ei.includes(t)) {
|
|
590
590
|
if (t === "size")
|
|
591
|
-
return Object.getOwnPropertyDescriptor(
|
|
592
|
-
const h =
|
|
591
|
+
return Object.getOwnPropertyDescriptor(at, "size").get.call(r.proxy);
|
|
592
|
+
const h = at[t];
|
|
593
593
|
if (h)
|
|
594
594
|
return h.bind(r.proxy);
|
|
595
595
|
}
|
|
@@ -601,7 +601,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
|
|
|
601
601
|
) : void 0;
|
|
602
602
|
}
|
|
603
603
|
const c = o[t];
|
|
604
|
-
if (r.options.strict &&
|
|
604
|
+
if (r.options.strict && rt(c, r.options), r.finalized || !Se(c, r.options))
|
|
605
605
|
return c;
|
|
606
606
|
if (c === yt(r.original, t)) {
|
|
607
607
|
if (V(r), r.copy[t] = $s({
|
|
@@ -629,7 +629,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
|
|
|
629
629
|
if (a != null && a.set)
|
|
630
630
|
return a.set.call(r.proxy, s), !0;
|
|
631
631
|
const n = yt(X(r), t), o = v(n);
|
|
632
|
-
return o && Ae(o.original, s) ? (r.copy[t] = s, r.assignedMap = (e = r.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), r.assignedMap.set(t, !1), !0) : (Ae(s, n) && (s !== void 0 || _e(r.original, t)) || (V(r), se(r), _e(r.original, t) && Ae(s, r.original[t]) ? r.assignedMap.delete(t) : r.assignedMap.set(t, !0), r.copy[t] = s, jt(r, t, s,
|
|
632
|
+
return o && Ae(o.original, s) ? (r.copy[t] = s, r.assignedMap = (e = r.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), r.assignedMap.set(t, !1), !0) : (Ae(s, n) && (s !== void 0 || _e(r.original, t)) || (V(r), se(r), _e(r.original, t) && Ae(s, r.original[t]) ? r.assignedMap.delete(t) : r.assignedMap.set(t, !0), r.copy[t] = s, jt(r, t, s, Ue)), !0);
|
|
633
633
|
},
|
|
634
634
|
has(r, t) {
|
|
635
635
|
return t in X(r);
|
|
@@ -661,7 +661,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
|
|
|
661
661
|
}
|
|
662
662
|
};
|
|
663
663
|
function $s(r) {
|
|
664
|
-
const { original: t, parentDraft: s, key: e, finalities: i, options: a } = r, n =
|
|
664
|
+
const { original: t, parentDraft: s, key: e, finalities: i, options: a } = r, n = Ve(t), o = {
|
|
665
665
|
type: n,
|
|
666
666
|
finalized: !1,
|
|
667
667
|
parent: s,
|
|
@@ -684,7 +684,7 @@ function $s(r) {
|
|
|
684
684
|
const E = me(F, e), k = v(E);
|
|
685
685
|
if (k) {
|
|
686
686
|
let B = k.original;
|
|
687
|
-
k.operated && (B = _t(E)), It(k), Et(k,
|
|
687
|
+
k.operated && (B = _t(E)), It(k), Et(k, Ue, p, d), l.options.enableAutoFreeze && (l.options.updatedValues = (f = l.options.updatedValues) !== null && f !== void 0 ? f : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(B, k.original)), Rt(F, e, B);
|
|
688
688
|
}
|
|
689
689
|
(x = A.callbacks) === null || x === void 0 || x.forEach((B) => {
|
|
690
690
|
B(p, d);
|
|
@@ -693,7 +693,7 @@ function $s(r) {
|
|
|
693
693
|
} else {
|
|
694
694
|
const l = v(c);
|
|
695
695
|
l.finalities.draft.push((p, d) => {
|
|
696
|
-
It(l), Et(l,
|
|
696
|
+
It(l), Et(l, Ue, p, d);
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
699
|
return c;
|
|
@@ -816,20 +816,20 @@ class Ut extends Error {
|
|
|
816
816
|
return "InstantError";
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
class
|
|
819
|
+
class $e extends Ut {
|
|
820
820
|
constructor(t) {
|
|
821
821
|
var s;
|
|
822
822
|
const e = ((s = t.body) === null || s === void 0 ? void 0 : s.message) || `API Error (${t.status})`;
|
|
823
823
|
super(e, t.body.hint);
|
|
824
824
|
const i = new.target.prototype;
|
|
825
|
-
Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this,
|
|
825
|
+
Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, $e), this.name = "InstantAPIError", this.status = t.status, this.body = t.body;
|
|
826
826
|
}
|
|
827
827
|
get [Symbol.toStringTag]() {
|
|
828
828
|
return "InstantAPIError";
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
typeof window < "u" && typeof window.localStorage < "u" && (window.localStorage.getItem("devBackend"), window.localStorage.getItem("__instantLogging"), window.localStorage.getItem("__devtoolLocalDash"));
|
|
832
|
-
const
|
|
832
|
+
const Re = "v0.22.96-experimental.add-posthog-frontend.20387039167.1";
|
|
833
833
|
class Q {
|
|
834
834
|
constructor(t, s, e, i = { indexed: !1, unique: !1 }) {
|
|
835
835
|
this.valueType = t, this.required = s, this.isIndexed = e, this.config = i, this.metadata = {};
|
|
@@ -1037,8 +1037,8 @@ async function rr({
|
|
|
1037
1037
|
method: "POST",
|
|
1038
1038
|
headers: {
|
|
1039
1039
|
"Content-type": "application/json",
|
|
1040
|
-
"Instant-Platform-Version":
|
|
1041
|
-
"Instant-Core-Version":
|
|
1040
|
+
"Instant-Platform-Version": Re,
|
|
1041
|
+
"Instant-Core-Version": Re
|
|
1042
1042
|
},
|
|
1043
1043
|
body: JSON.stringify({
|
|
1044
1044
|
grant_type: "authorization_code",
|
|
@@ -1253,7 +1253,7 @@ const rules = ${s} satisfies InstantRules;
|
|
|
1253
1253
|
export default rules;
|
|
1254
1254
|
`;
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function qe(r) {
|
|
1257
1257
|
return Object.entries(r).sort(([t], [s]) => t.localeCompare(s));
|
|
1258
1258
|
}
|
|
1259
1259
|
function or(r) {
|
|
@@ -1265,7 +1265,7 @@ const cr = {
|
|
|
1265
1265
|
"many-true": ["many", "one"],
|
|
1266
1266
|
"one-false": ["one", "many"]
|
|
1267
1267
|
};
|
|
1268
|
-
function
|
|
1268
|
+
function ze(r, t = 2) {
|
|
1269
1269
|
if (!r)
|
|
1270
1270
|
return r;
|
|
1271
1271
|
const s = " ".repeat(t);
|
|
@@ -1299,13 +1299,13 @@ function ur([r, t]) {
|
|
|
1299
1299
|
}
|
|
1300
1300
|
function kt(r, t) {
|
|
1301
1301
|
const s = zs(
|
|
1302
|
-
|
|
1302
|
+
qe(t.attrs).map(ur),
|
|
1303
1303
|
`,
|
|
1304
1304
|
`,
|
|
1305
1305
|
","
|
|
1306
1306
|
);
|
|
1307
1307
|
return `${$t(r)}: i.entity({${s.length ? `
|
|
1308
|
-
` : ""}${
|
|
1308
|
+
` : ""}${ze(s, 2)}${s.length ? `
|
|
1309
1309
|
` : ""}})`;
|
|
1310
1310
|
}
|
|
1311
1311
|
function pr(r) {
|
|
@@ -1346,12 +1346,12 @@ function Pr(r, t) {
|
|
|
1346
1346
|
function br(r) {
|
|
1347
1347
|
let t = "{";
|
|
1348
1348
|
if (r.presence && (t += `
|
|
1349
|
-
${
|
|
1349
|
+
${ze(kt("presence", r.presence), 4)},`), r.topics) {
|
|
1350
1350
|
t += `
|
|
1351
1351
|
"topics": {`;
|
|
1352
1352
|
for (const [s, e] of Object.entries(r.topics))
|
|
1353
1353
|
t += `
|
|
1354
|
-
${
|
|
1354
|
+
${ze(kt(s, e), 6)},`;
|
|
1355
1355
|
t += `
|
|
1356
1356
|
}`;
|
|
1357
1357
|
}
|
|
@@ -1369,7 +1369,7 @@ function gr(r) {
|
|
|
1369
1369
|
function Mn(r, t, s) {
|
|
1370
1370
|
var d;
|
|
1371
1371
|
const e = zs(
|
|
1372
|
-
|
|
1372
|
+
qe(t.entities).map(
|
|
1373
1373
|
([f, x]) => kt(f, x)
|
|
1374
1374
|
),
|
|
1375
1375
|
`,
|
|
@@ -1380,13 +1380,13 @@ function Mn(r, t, s) {
|
|
|
1380
1380
|
for (const x of Object.values(f.attrs))
|
|
1381
1381
|
((d = x.metadata.derivedType) == null ? void 0 : d.origin) === "inferred" && i.push(x);
|
|
1382
1382
|
const a = `{
|
|
1383
|
-
${
|
|
1383
|
+
${ze(e, 2)}
|
|
1384
1384
|
}`, n = i.length > 0 ? `// We inferred ${i.length} ${Pr("attribute", i.length)}!
|
|
1385
1385
|
// Take a look at this schema, and if everything looks good,
|
|
1386
1386
|
// run \`push schema\` again to enforce the types.` : "", o = JSON.stringify(t.links, null, 2).trim(), c = (r == null ? void 0 : r.rooms) || {}, h = gr(c), l = (f, x, A) => {
|
|
1387
1387
|
const F = A ? `${A}
|
|
1388
1388
|
${f}: ${x}` : `${f}: ${x}`;
|
|
1389
|
-
return
|
|
1389
|
+
return ze(F, 2);
|
|
1390
1390
|
};
|
|
1391
1391
|
return `// Docs: https://www.instantdb.com/docs/modeling-data
|
|
1392
1392
|
|
|
@@ -1588,8 +1588,10 @@ async function wr({
|
|
|
1588
1588
|
async function H(r, t) {
|
|
1589
1589
|
const s = {
|
|
1590
1590
|
...(t == null ? void 0 : t.headers) || {},
|
|
1591
|
-
"Instant-Platform-Version":
|
|
1592
|
-
"Instant-Core-Version":
|
|
1591
|
+
"Instant-Platform-Version": Re,
|
|
1592
|
+
"Instant-Core-Version": Re,
|
|
1593
|
+
"X-Instant-Source": "platform-sdk",
|
|
1594
|
+
"X-Instant-Version": Re
|
|
1593
1595
|
}, e = await fetch(r, { ...t, headers: s });
|
|
1594
1596
|
if (e.status === 200) {
|
|
1595
1597
|
const a = await e.json();
|
|
@@ -1599,11 +1601,11 @@ async function H(r, t) {
|
|
|
1599
1601
|
try {
|
|
1600
1602
|
const a = JSON.parse(i);
|
|
1601
1603
|
return Promise.reject(
|
|
1602
|
-
new
|
|
1604
|
+
new $e({ status: e.status, body: a })
|
|
1603
1605
|
);
|
|
1604
1606
|
} catch {
|
|
1605
1607
|
return Promise.reject(
|
|
1606
|
-
new
|
|
1608
|
+
new $e({
|
|
1607
1609
|
status: e.status,
|
|
1608
1610
|
body: { type: void 0, message: i }
|
|
1609
1611
|
})
|
|
@@ -1639,7 +1641,7 @@ function Ar(r, t) {
|
|
|
1639
1641
|
}
|
|
1640
1642
|
function Sr(r, t) {
|
|
1641
1643
|
const s = {};
|
|
1642
|
-
for (const [e, i] of
|
|
1644
|
+
for (const [e, i] of qe(r))
|
|
1643
1645
|
e !== "id" && (s[e] = Ar(i, t));
|
|
1644
1646
|
return q.entity(s);
|
|
1645
1647
|
}
|
|
@@ -1667,10 +1669,10 @@ function Er(r) {
|
|
|
1667
1669
|
}
|
|
1668
1670
|
function nt(r, t) {
|
|
1669
1671
|
const s = {};
|
|
1670
|
-
for (const [i, a] of
|
|
1672
|
+
for (const [i, a] of qe(r.blobs))
|
|
1671
1673
|
s[i] = Sr(a, t);
|
|
1672
1674
|
const e = {};
|
|
1673
|
-
for (const [i, a] of
|
|
1675
|
+
for (const [i, a] of qe(r.refs)) {
|
|
1674
1676
|
const n = Er(a), o = Ir(a);
|
|
1675
1677
|
e[o] = n;
|
|
1676
1678
|
}
|
|
@@ -2178,7 +2180,7 @@ class _n {
|
|
|
2178
2180
|
try {
|
|
2179
2181
|
return await t(i, o, ...n);
|
|
2180
2182
|
} catch (l) {
|
|
2181
|
-
if (l instanceof
|
|
2183
|
+
if (l instanceof $e && (l.status === 401 || ((c = l.body) == null ? void 0 : c.type) === "record-expired" || ((h = l.body) == null ? void 0 : h.type) === "record-not-found" && l.body.hint["record-type"].match(/token/i)) && this.canRefreshToken()) {
|
|
2182
2184
|
const p = await this.refreshToken();
|
|
2183
2185
|
if (p) {
|
|
2184
2186
|
o = p.accessToken, e++;
|
|
@@ -2528,7 +2530,7 @@ const ms = {
|
|
|
2528
2530
|
},
|
|
2529
2531
|
VariableDeclarator: "variable declaration",
|
|
2530
2532
|
YieldExpression: "yield expression"
|
|
2531
|
-
},
|
|
2533
|
+
}, Qe = (r) => r.type === "UpdateExpression" ? ms.UpdateExpression[`${r.prefix}`] : ms[r.type];
|
|
2532
2534
|
var Kr = {
|
|
2533
2535
|
AccessorIsGenerator: ({
|
|
2534
2536
|
kind: r
|
|
@@ -2617,13 +2619,13 @@ var Kr = {
|
|
|
2617
2619
|
}) => `Invalid identifier ${r}.`,
|
|
2618
2620
|
InvalidLhs: ({
|
|
2619
2621
|
ancestor: r
|
|
2620
|
-
}) => `Invalid left-hand side in ${
|
|
2622
|
+
}) => `Invalid left-hand side in ${Qe(r)}.`,
|
|
2621
2623
|
InvalidLhsBinding: ({
|
|
2622
2624
|
ancestor: r
|
|
2623
|
-
}) => `Binding invalid left-hand side in ${
|
|
2625
|
+
}) => `Binding invalid left-hand side in ${Qe(r)}.`,
|
|
2624
2626
|
InvalidLhsOptionalChaining: ({
|
|
2625
2627
|
ancestor: r
|
|
2626
|
-
}) => `Invalid optional chaining in the left-hand side of ${
|
|
2628
|
+
}) => `Invalid optional chaining in the left-hand side of ${Qe(r)}.`,
|
|
2627
2629
|
InvalidNumber: "Invalid number.",
|
|
2628
2630
|
InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
|
|
2629
2631
|
InvalidOrUnexpectedToken: ({
|
|
@@ -2772,7 +2774,7 @@ var Gr = Object.assign({
|
|
|
2772
2774
|
PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",
|
|
2773
2775
|
PipeUnparenthesizedBody: ({
|
|
2774
2776
|
type: r
|
|
2775
|
-
}) => `Hack-style pipe body cannot be an unparenthesized ${
|
|
2777
|
+
}) => `Hack-style pipe body cannot be an unparenthesized ${Qe({
|
|
2776
2778
|
type: r
|
|
2777
2779
|
})}; please wrap it in parentheses.`
|
|
2778
2780
|
}, {});
|
|
@@ -3122,7 +3124,7 @@ var sa = (r) => class extends r {
|
|
|
3122
3124
|
super.resetEndLocation(s, e), De(s);
|
|
3123
3125
|
}
|
|
3124
3126
|
};
|
|
3125
|
-
class
|
|
3127
|
+
class Ke {
|
|
3126
3128
|
constructor(t, s) {
|
|
3127
3129
|
m(this, "token");
|
|
3128
3130
|
m(this, "preserveSpace");
|
|
@@ -3130,10 +3132,10 @@ class He {
|
|
|
3130
3132
|
}
|
|
3131
3133
|
}
|
|
3132
3134
|
const D = {
|
|
3133
|
-
brace: new
|
|
3134
|
-
j_oTag: new
|
|
3135
|
-
j_cTag: new
|
|
3136
|
-
j_expr: new
|
|
3135
|
+
brace: new Ke("{"),
|
|
3136
|
+
j_oTag: new Ke("<tag"),
|
|
3137
|
+
j_cTag: new Ke("</tag"),
|
|
3138
|
+
j_expr: new Ke("<tag>...</tag>", !0)
|
|
3137
3139
|
}, I = !0, y = !0, bt = !0, Le = !0, le = !0, ia = !0;
|
|
3138
3140
|
class Js {
|
|
3139
3141
|
constructor(t, s = {}) {
|
|
@@ -3162,13 +3164,13 @@ function z(r, t) {
|
|
|
3162
3164
|
binop: t
|
|
3163
3165
|
});
|
|
3164
3166
|
}
|
|
3165
|
-
let
|
|
3167
|
+
let je = -1;
|
|
3166
3168
|
const Vt = [], Ht = [], Kt = [], Jt = [], Wt = [], Xt = [];
|
|
3167
3169
|
function g(r, t = {}) {
|
|
3168
|
-
return ++
|
|
3170
|
+
return ++je, Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js(r, t)), je;
|
|
3169
3171
|
}
|
|
3170
3172
|
function S(r, t = {}) {
|
|
3171
|
-
return ++
|
|
3173
|
+
return ++je, zt.set(r, je), Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js("name", t)), je;
|
|
3172
3174
|
}
|
|
3173
3175
|
const ra = {
|
|
3174
3176
|
bracketL: g("[", {
|
|
@@ -3613,7 +3615,7 @@ function fa(r) {
|
|
|
3613
3615
|
function de(r) {
|
|
3614
3616
|
return Ht[r];
|
|
3615
3617
|
}
|
|
3616
|
-
function
|
|
3618
|
+
function Ze(r) {
|
|
3617
3619
|
return Kt[r];
|
|
3618
3620
|
}
|
|
3619
3621
|
function da(r) {
|
|
@@ -5468,7 +5470,7 @@ const La = {
|
|
|
5468
5470
|
clubs: "♣",
|
|
5469
5471
|
hearts: "♥",
|
|
5470
5472
|
diams: "♦"
|
|
5471
|
-
}, Ma = /\r\n|[\r\n\u2028\u2029]/,
|
|
5473
|
+
}, Ma = /\r\n|[\r\n\u2028\u2029]/, Je = new RegExp(Ma.source, "g");
|
|
5472
5474
|
function Ne(r) {
|
|
5473
5475
|
switch (r) {
|
|
5474
5476
|
case 10:
|
|
@@ -5876,7 +5878,7 @@ class ja {
|
|
|
5876
5878
|
return (this.currentFlags() & 8) > 0;
|
|
5877
5879
|
}
|
|
5878
5880
|
}
|
|
5879
|
-
function
|
|
5881
|
+
function et(r, t) {
|
|
5880
5882
|
return (r ? 2 : 0) | (t ? 1 : 0);
|
|
5881
5883
|
}
|
|
5882
5884
|
class Ua {
|
|
@@ -6175,7 +6177,7 @@ var za = function(t) {
|
|
|
6175
6177
|
const ws = {
|
|
6176
6178
|
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
6177
6179
|
hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
|
|
6178
|
-
},
|
|
6180
|
+
}, We = {
|
|
6179
6181
|
bin: (r) => r === 48 || r === 49,
|
|
6180
6182
|
oct: (r) => r >= 48 && r <= 55,
|
|
6181
6183
|
dec: (r) => r >= 48 && r <= 57,
|
|
@@ -6300,7 +6302,7 @@ function Lt(r, t, s, e, i, a, n, o) {
|
|
|
6300
6302
|
};
|
|
6301
6303
|
}
|
|
6302
6304
|
function ii(r, t, s, e, i, a, n, o, c, h) {
|
|
6303
|
-
const l = t, p = i === 16 ? ws.hex : ws.decBinOct, d = i === 16 ?
|
|
6305
|
+
const l = t, p = i === 16 ? ws.hex : ws.decBinOct, d = i === 16 ? We.hex : i === 10 ? We.dec : i === 8 ? We.oct : We.bin;
|
|
6304
6306
|
let f = !1, x = 0;
|
|
6305
6307
|
for (let A = 0, F = a ?? 1 / 0; A < F; ++A) {
|
|
6306
6308
|
const E = r.charCodeAt(t);
|
|
@@ -6497,8 +6499,8 @@ class Wa extends qa {
|
|
|
6497
6499
|
const i = this.state.pos, a = this.input.indexOf(s, i + 2);
|
|
6498
6500
|
if (a === -1)
|
|
6499
6501
|
throw this.raise(u.UnterminatedComment, this.state.curPosition());
|
|
6500
|
-
for (this.state.pos = a + s.length,
|
|
6501
|
-
++this.state.curLine, this.state.lineStart =
|
|
6502
|
+
for (this.state.pos = a + s.length, Je.lastIndex = i + 2; Je.test(this.input) && Je.lastIndex <= a; )
|
|
6503
|
+
++this.state.curLine, this.state.lineStart = Je.lastIndex;
|
|
6502
6504
|
if (this.isLookahead) return;
|
|
6503
6505
|
const n = {
|
|
6504
6506
|
type: "CommentBlock",
|
|
@@ -7360,7 +7362,7 @@ class tn extends Wa {
|
|
|
7360
7362
|
s !== null && this.expectPlugin("destructuringPrivate", s);
|
|
7361
7363
|
}
|
|
7362
7364
|
}
|
|
7363
|
-
class
|
|
7365
|
+
class tt {
|
|
7364
7366
|
constructor() {
|
|
7365
7367
|
m(this, "shorthandAssignLoc", null);
|
|
7366
7368
|
m(this, "doubleProtoLoc", null);
|
|
@@ -8748,7 +8750,7 @@ var cn = (r) => class extends r {
|
|
|
8748
8750
|
}
|
|
8749
8751
|
parseExprOp(e, i, a) {
|
|
8750
8752
|
let n;
|
|
8751
|
-
if (
|
|
8753
|
+
if (Ze(58) > a && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (n = this.isContextual(120)))) {
|
|
8752
8754
|
const o = this.startNodeAt(i);
|
|
8753
8755
|
return o.expression = e, o.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? (n && this.raise(u.UnexpectedKeyword, this.state.startLoc, {
|
|
8754
8756
|
keyword: "const"
|
|
@@ -9643,7 +9645,7 @@ class yn extends rn {
|
|
|
9643
9645
|
return s && (c = s.call(this, c, e)), c;
|
|
9644
9646
|
}
|
|
9645
9647
|
let a;
|
|
9646
|
-
t ? a = !1 : (t = new
|
|
9648
|
+
t ? a = !1 : (t = new tt(), a = !0);
|
|
9647
9649
|
const {
|
|
9648
9650
|
type: n
|
|
9649
9651
|
} = this.state;
|
|
@@ -9689,13 +9691,13 @@ class yn extends rn {
|
|
|
9689
9691
|
parseExprOp(t, s, e) {
|
|
9690
9692
|
if (this.isPrivateName(t)) {
|
|
9691
9693
|
const a = this.getPrivateNameSV(t);
|
|
9692
|
-
(e >=
|
|
9694
|
+
(e >= Ze(58) || !this.prodParam.hasIn || !this.match(58)) && this.raise(u.PrivateInExpectedIn, t, {
|
|
9693
9695
|
identifierName: a
|
|
9694
9696
|
}), this.classScope.usePrivateName(a, t.loc.start);
|
|
9695
9697
|
}
|
|
9696
9698
|
const i = this.state.type;
|
|
9697
9699
|
if (ha(i) && (this.prodParam.hasIn || !this.match(58))) {
|
|
9698
|
-
let a =
|
|
9700
|
+
let a = Ze(i);
|
|
9699
9701
|
if (a > e) {
|
|
9700
9702
|
if (i === 39) {
|
|
9701
9703
|
if (this.expectPlugin("pipelineOperator"), this.state.inFSharpPipelineDirectBody)
|
|
@@ -9705,7 +9707,7 @@ class yn extends rn {
|
|
|
9705
9707
|
const n = this.startNodeAt(s);
|
|
9706
9708
|
n.left = t, n.operator = this.state.value;
|
|
9707
9709
|
const o = i === 41 || i === 42, c = i === 40;
|
|
9708
|
-
c && (a =
|
|
9710
|
+
c && (a = Ze(42)), this.next(), n.right = this.parseExprOpRightExpr(i, a);
|
|
9709
9711
|
const h = this.finishNode(n, o || c ? "LogicalExpression" : "BinaryExpression"), l = this.state.type;
|
|
9710
9712
|
if (c && (l === 41 || l === 42) || o && l === 40)
|
|
9711
9713
|
throw this.raise(u.MixingCoalesceWithLogical, this.state.startLoc);
|
|
@@ -9842,7 +9844,7 @@ class yn extends rn {
|
|
|
9842
9844
|
maybeAsyncArrow: c,
|
|
9843
9845
|
optionalChainMember: h
|
|
9844
9846
|
} = e;
|
|
9845
|
-
c && (this.expressionScope.enter(en()), n = new
|
|
9847
|
+
c && (this.expressionScope.enter(en()), n = new tt()), h && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, t.type !== "Super", o, n);
|
|
9846
9848
|
let l = this.finishCallExpression(o, h);
|
|
9847
9849
|
return c && this.shouldParseAsyncArrow() && !i ? (e.stop = !0, this.checkDestructuringPrivate(n), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), l = this.parseAsyncArrowFromCallExpression(this.startNodeAt(s), l)) : (c && (this.checkExpressionErrors(n, !0), this.expressionScope.exit()), this.toReferencedArguments(l)), this.state.maybeInArrowParameters = a, l;
|
|
9848
9850
|
}
|
|
@@ -10022,7 +10024,7 @@ class yn extends rn {
|
|
|
10022
10024
|
}
|
|
10023
10025
|
}
|
|
10024
10026
|
parseAsyncArrowUnaryFunction(t) {
|
|
10025
|
-
this.prodParam.enter(
|
|
10027
|
+
this.prodParam.enter(et(!0, this.prodParam.hasYield));
|
|
10026
10028
|
const s = [this.parseIdentifier()];
|
|
10027
10029
|
return this.prodParam.exit(), this.hasPrecedingLineBreak() && this.raise(u.LineTerminatorBeforeArrow, this.state.curPosition()), this.expect(19), this.parseArrowExpression(t, s, !0);
|
|
10028
10030
|
}
|
|
@@ -10101,7 +10103,7 @@ class yn extends rn {
|
|
|
10101
10103
|
this.next(), this.expressionScope.enter(Za());
|
|
10102
10104
|
const i = this.state.maybeInArrowParameters, a = this.state.inFSharpPipelineDirectBody;
|
|
10103
10105
|
this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
|
|
10104
|
-
const n = this.state.startLoc, o = [], c = new
|
|
10106
|
+
const n = this.state.startLoc, o = [], c = new tt();
|
|
10105
10107
|
let h = !0, l, p;
|
|
10106
10108
|
for (; !this.match(11); ) {
|
|
10107
10109
|
if (h)
|
|
@@ -10314,7 +10316,7 @@ class yn extends rn {
|
|
|
10314
10316
|
t.id = null, t.generator = !1, t.async = s;
|
|
10315
10317
|
}
|
|
10316
10318
|
parseMethod(t, s, e, i, a, n, o = !1) {
|
|
10317
|
-
this.initFunction(t, e), t.generator = s, this.scope.enter(18 | (o ? 64 : 0) | (a ? 32 : 0)), this.prodParam.enter(
|
|
10319
|
+
this.initFunction(t, e), t.generator = s, this.scope.enter(18 | (o ? 64 : 0) | (a ? 32 : 0)), this.prodParam.enter(et(e, t.generator)), this.parseFunctionParams(t, i);
|
|
10318
10320
|
const c = this.parseFunctionBodyAndFinish(t, n, !0);
|
|
10319
10321
|
return this.prodParam.exit(), this.scope.exit(), c;
|
|
10320
10322
|
}
|
|
@@ -10327,7 +10329,7 @@ class yn extends rn {
|
|
|
10327
10329
|
}
|
|
10328
10330
|
parseArrowExpression(t, s, e, i) {
|
|
10329
10331
|
this.scope.enter(6);
|
|
10330
|
-
let a =
|
|
10332
|
+
let a = et(e, !1);
|
|
10331
10333
|
!this.match(5) && this.prodParam.hasIn && (a |= 8), this.prodParam.enter(a), this.initFunction(t, e);
|
|
10332
10334
|
const n = this.state.maybeInArrowParameters;
|
|
10333
10335
|
return s && (this.state.maybeInArrowParameters = !0, this.setArrowFunctionParameters(t, s, i)), this.state.maybeInArrowParameters = !1, this.parseFunctionBody(t, !0), this.prodParam.exit(), this.scope.exit(), this.state.maybeInArrowParameters = n, this.finishNode(t, "ArrowFunctionExpression");
|
|
@@ -10891,7 +10893,7 @@ class gn extends yn {
|
|
|
10891
10893
|
return x && h && this.raise(u.ForInUsing, f), (x || this.isContextual(102)) && f.declarations.length === 1 ? this.parseForIn(t, f, s) : (s !== null && this.unexpected(s), this.parseFor(t, f));
|
|
10892
10894
|
}
|
|
10893
10895
|
}
|
|
10894
|
-
const i = this.isContextual(95), a = new
|
|
10896
|
+
const i = this.isContextual(95), a = new tt(), n = this.parseExpression(!0, a), o = this.isContextual(102);
|
|
10895
10897
|
if (o && (e && this.raise(u.ForOfLet, n), s === null && i && n.type === "Identifier" && this.raise(u.ForOfAsync, n)), o || this.match(58)) {
|
|
10896
10898
|
this.checkDestructuringPrivate(a), this.toAssignable(n, !0);
|
|
10897
10899
|
const c = o ? "ForOfStatement" : "ForInStatement";
|
|
@@ -11040,7 +11042,7 @@ class gn extends yn {
|
|
|
11040
11042
|
const e = s & 2, i = !!(s & 1), a = i && !(s & 4), n = !!(s & 8);
|
|
11041
11043
|
this.initFunction(t, n), this.match(55) && (e && this.raise(u.GeneratorInSingleStatementContext, this.state.startLoc), this.next(), t.generator = !0), i && (t.id = this.parseFunctionId(a));
|
|
11042
11044
|
const o = this.state.maybeInArrowParameters;
|
|
11043
|
-
return this.state.maybeInArrowParameters = !1, this.scope.enter(2), this.prodParam.enter(
|
|
11045
|
+
return this.state.maybeInArrowParameters = !1, this.scope.enter(2), this.prodParam.enter(et(n, t.generator)), i || (t.id = this.parseFunctionId()), this.parseFunctionParams(t, !1), this.withSmartMixTopicForbiddingContext(() => {
|
|
11044
11046
|
this.parseFunctionBodyAndFinish(t, i ? "FunctionDeclaration" : "FunctionExpression");
|
|
11045
11047
|
}), this.prodParam.exit(), this.scope.exit(), i && !e && this.registerFunctionStatementId(t), this.state.maybeInArrowParameters = o, t;
|
|
11046
11048
|
}
|
|
@@ -11603,12 +11605,12 @@ function wn(r, t) {
|
|
|
11603
11605
|
t = Object.assign({}, t);
|
|
11604
11606
|
try {
|
|
11605
11607
|
t.sourceType = "module";
|
|
11606
|
-
const s =
|
|
11608
|
+
const s = Xe(t, r), e = s.parse();
|
|
11607
11609
|
if (s.sawUnambiguousESM)
|
|
11608
11610
|
return e;
|
|
11609
11611
|
if (s.ambiguousScriptDifferentAst)
|
|
11610
11612
|
try {
|
|
11611
|
-
return t.sourceType = "script",
|
|
11613
|
+
return t.sourceType = "script", Xe(t, r).parse();
|
|
11612
11614
|
} catch {
|
|
11613
11615
|
}
|
|
11614
11616
|
else
|
|
@@ -11616,13 +11618,13 @@ function wn(r, t) {
|
|
|
11616
11618
|
return e;
|
|
11617
11619
|
} catch (s) {
|
|
11618
11620
|
try {
|
|
11619
|
-
return t.sourceType = "script",
|
|
11621
|
+
return t.sourceType = "script", Xe(t, r).parse();
|
|
11620
11622
|
} catch {
|
|
11621
11623
|
}
|
|
11622
11624
|
throw s;
|
|
11623
11625
|
}
|
|
11624
11626
|
} else
|
|
11625
|
-
return
|
|
11627
|
+
return Xe(t, r).parse();
|
|
11626
11628
|
}
|
|
11627
11629
|
function Tn(r) {
|
|
11628
11630
|
const t = {};
|
|
@@ -11631,7 +11633,7 @@ function Tn(r) {
|
|
|
11631
11633
|
return t;
|
|
11632
11634
|
}
|
|
11633
11635
|
Tn(ra);
|
|
11634
|
-
function
|
|
11636
|
+
function Xe(r, t) {
|
|
11635
11637
|
let s = ui;
|
|
11636
11638
|
const e = /* @__PURE__ */ new Map();
|
|
11637
11639
|
if (r != null && r.plugins) {
|
|
@@ -11658,7 +11660,7 @@ function An(r) {
|
|
|
11658
11660
|
}
|
|
11659
11661
|
return e;
|
|
11660
11662
|
}
|
|
11661
|
-
function
|
|
11663
|
+
function st(r) {
|
|
11662
11664
|
if (!r)
|
|
11663
11665
|
return null;
|
|
11664
11666
|
switch (r.type) {
|
|
@@ -11676,7 +11678,7 @@ function tt(r) {
|
|
|
11676
11678
|
throw new Error(
|
|
11677
11679
|
`Unsupported key type in ObjectProperty: ${c.key.type}`
|
|
11678
11680
|
);
|
|
11679
|
-
n[h] =
|
|
11681
|
+
n[h] = st(c.value);
|
|
11680
11682
|
} else if (o.type !== "SpreadElement" && o.type !== "ObjectMethod")
|
|
11681
11683
|
throw new Error(
|
|
11682
11684
|
// @ts-expect-error: prop is `never` here
|
|
@@ -11689,7 +11691,7 @@ function tt(r) {
|
|
|
11689
11691
|
case "ArrayExpression":
|
|
11690
11692
|
return r.elements.map((n) => {
|
|
11691
11693
|
if (!(n && n.type === "SpreadElement"))
|
|
11692
|
-
return
|
|
11694
|
+
return st(n);
|
|
11693
11695
|
}).filter((n) => n !== void 0);
|
|
11694
11696
|
case "ObjectProperty":
|
|
11695
11697
|
const e = r;
|
|
@@ -11703,7 +11705,7 @@ function tt(r) {
|
|
|
11703
11705
|
`Unsupported key type for standalone ObjectProperty: ${e.key.type}`
|
|
11704
11706
|
);
|
|
11705
11707
|
const a = {};
|
|
11706
|
-
return a[i] =
|
|
11708
|
+
return a[i] = st(e.value), a;
|
|
11707
11709
|
case "StringLiteral":
|
|
11708
11710
|
case "NumericLiteral":
|
|
11709
11711
|
case "BooleanLiteral":
|
|
@@ -11904,7 +11906,7 @@ function En(r) {
|
|
|
11904
11906
|
break;
|
|
11905
11907
|
}
|
|
11906
11908
|
case "links": {
|
|
11907
|
-
s =
|
|
11909
|
+
s = st(n.value) || {};
|
|
11908
11910
|
break;
|
|
11909
11911
|
}
|
|
11910
11912
|
case "rooms": {
|
|
@@ -12016,13 +12018,13 @@ const vs = (r, t, s) => ({
|
|
|
12016
12018
|
namespace: r.reverse.on
|
|
12017
12019
|
}
|
|
12018
12020
|
};
|
|
12019
|
-
},
|
|
12021
|
+
}, it = (r, t) => {
|
|
12020
12022
|
const s = t.find((e) => e["forward-identity"][1] === r.namespace && e["forward-identity"][2] === r.attrName) || null;
|
|
12021
12023
|
if (!s)
|
|
12022
12024
|
throw new Error(`Attribute ${r.namespace}.${r.attrName} not found`);
|
|
12023
12025
|
return s;
|
|
12024
12026
|
}, we = (r, t) => {
|
|
12025
|
-
const s =
|
|
12027
|
+
const s = it(r.identifier, t);
|
|
12026
12028
|
return {
|
|
12027
12029
|
"attr-id": s.id,
|
|
12028
12030
|
"forward-identity": s["forward-identity"]
|
|
@@ -12034,9 +12036,9 @@ const vs = (r, t, s) => ({
|
|
|
12034
12036
|
"remove-index": we,
|
|
12035
12037
|
"remove-unique": we,
|
|
12036
12038
|
"remove-required": we,
|
|
12037
|
-
"delete-attr": (r, t) =>
|
|
12039
|
+
"delete-attr": (r, t) => it(r.identifier, t).id,
|
|
12038
12040
|
"update-attr": (r, t) => {
|
|
12039
|
-
const s =
|
|
12041
|
+
const s = it(r.identifier, t);
|
|
12040
12042
|
return {
|
|
12041
12043
|
id: s.id,
|
|
12042
12044
|
"forward-identity": r.partialAttr["forward-identity"] ? [
|
|
@@ -12103,7 +12105,7 @@ const vs = (r, t, s) => ({
|
|
|
12103
12105
|
},
|
|
12104
12106
|
"remove-data-type": we,
|
|
12105
12107
|
"check-data-type": (r, t) => {
|
|
12106
|
-
const s =
|
|
12108
|
+
const s = it(r.identifier, t);
|
|
12107
12109
|
return {
|
|
12108
12110
|
"attr-id": s.id,
|
|
12109
12111
|
"checked-data-type": r["checked-data-type"],
|
|
@@ -12276,15 +12278,15 @@ const Hn = (r, t) => {
|
|
|
12276
12278
|
for (const P of k) {
|
|
12277
12279
|
const M = E.get(P) || [], K = F.get(P) || [], xe = M.map(
|
|
12278
12280
|
(_) => A(_)
|
|
12279
|
-
),
|
|
12281
|
+
), He = K.map(
|
|
12280
12282
|
(_) => A(_)
|
|
12281
|
-
), L =
|
|
12283
|
+
), L = He.filter(
|
|
12282
12284
|
(_) => !xe.includes(_)
|
|
12283
12285
|
), Oe = xe.filter(
|
|
12284
|
-
(_) => !
|
|
12286
|
+
(_) => !He.includes(_)
|
|
12285
12287
|
);
|
|
12286
12288
|
xe.filter(
|
|
12287
|
-
(_) =>
|
|
12289
|
+
(_) => He.includes(_)
|
|
12288
12290
|
).forEach((_) => {
|
|
12289
12291
|
const U = M.find(
|
|
12290
12292
|
(Pe) => A(Pe) === _
|
|
@@ -12431,5 +12433,5 @@ export {
|
|
|
12431
12433
|
Vn as schemaTypescriptFileToInstantSchema,
|
|
12432
12434
|
Br as translatePlanSteps,
|
|
12433
12435
|
Fn as validateSchema,
|
|
12434
|
-
|
|
12436
|
+
Re as version
|
|
12435
12437
|
};
|