@graffiti-garden/wrapper-vue 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/plugin.mjs +546 -461
- package/dist/browser/plugin.mjs.map +1 -1
- package/dist/node/Discover.vue.d.ts +5 -0
- package/dist/node/Discover.vue.d.ts.map +1 -1
- package/dist/node/Get.vue.d.ts +5 -0
- package/dist/node/Get.vue.d.ts.map +1 -1
- package/dist/node/RecoverOrphans.vue.d.ts +5 -0
- package/dist/node/RecoverOrphans.vue.d.ts.map +1 -1
- package/dist/node/composables.d.ts +9 -3
- package/dist/node/composables.d.ts.map +1 -1
- package/dist/node/plugin.d.ts +27 -0
- package/dist/node/plugin.d.ts.map +1 -1
- package/dist/node/plugin.js +1 -1
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/plugin.mjs +239 -154
- package/dist/node/plugin.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Discover.vue +17 -6
- package/src/Get.vue +17 -6
- package/src/RecoverOrphans.vue +16 -5
- package/src/composables.ts +116 -25
package/dist/browser/plugin.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var pe = Object.defineProperty;
|
|
2
|
-
var de = (t,
|
|
3
|
-
var v = (t,
|
|
4
|
-
import { inject as X, ref as
|
|
2
|
+
var de = (t, n, e) => n in t ? pe(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
+
var v = (t, n, e) => de(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { inject as X, ref as U, computed as ye, watch as ve, onScopeDispose as me, toValue as P, defineComponent as L, toRef as w, renderSlot as W, unref as m } from "vue";
|
|
5
5
|
const Y = Symbol(), Z = Symbol();
|
|
6
|
-
function
|
|
6
|
+
function B() {
|
|
7
7
|
const t = X(Y);
|
|
8
8
|
if (!t)
|
|
9
9
|
throw new Error(
|
|
@@ -12,7 +12,7 @@ function M() {
|
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
14
|
function Le() {
|
|
15
|
-
return
|
|
15
|
+
return B();
|
|
16
16
|
}
|
|
17
17
|
function ee() {
|
|
18
18
|
const t = X(Z);
|
|
@@ -22,253 +22,326 @@ function ee() {
|
|
|
22
22
|
);
|
|
23
23
|
return t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
26
|
-
},
|
|
27
|
-
constructor(
|
|
28
|
-
super(
|
|
25
|
+
var be = class {
|
|
26
|
+
}, we = class te extends Error {
|
|
27
|
+
constructor(n) {
|
|
28
|
+
super(n), this.name = "GraffitiErrorNotFound", Object.setPrototypeOf(this, te.prototype);
|
|
29
29
|
}
|
|
30
|
-
}, ge = class
|
|
31
|
-
constructor(
|
|
32
|
-
super(
|
|
30
|
+
}, ge = class ne extends Error {
|
|
31
|
+
constructor(n) {
|
|
32
|
+
super(n), this.name = "GraffitiErrorInvalidSchema", Object.setPrototypeOf(this, ne.prototype);
|
|
33
33
|
}
|
|
34
|
-
}, Pe = class
|
|
35
|
-
constructor(
|
|
36
|
-
super(
|
|
34
|
+
}, Pe = class re extends Error {
|
|
35
|
+
constructor(n) {
|
|
36
|
+
super(n), this.name = "GraffitiErrorPatchTestFailed", Object.setPrototypeOf(this, re.prototype);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
constructor(
|
|
40
|
-
super(
|
|
38
|
+
}, je = class ie extends Error {
|
|
39
|
+
constructor(n) {
|
|
40
|
+
super(n), this.name = "GraffitiErrorPatchError", Object.setPrototypeOf(this, ie.prototype);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
class
|
|
44
|
-
constructor(
|
|
45
|
-
v(this, "poll", async (
|
|
43
|
+
class xe {
|
|
44
|
+
constructor(n) {
|
|
45
|
+
v(this, "poll", async (n) => {
|
|
46
46
|
let e;
|
|
47
|
-
const
|
|
47
|
+
const r = this.getter;
|
|
48
48
|
try {
|
|
49
|
-
e = await
|
|
49
|
+
e = await r();
|
|
50
50
|
} catch {
|
|
51
|
-
this.getter ===
|
|
51
|
+
this.getter === r && n(null);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
this.getter ===
|
|
54
|
+
this.getter === r && n({ object: e });
|
|
55
55
|
});
|
|
56
|
-
this.getter =
|
|
56
|
+
this.getter = n;
|
|
57
57
|
}
|
|
58
58
|
clear() {
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
class oe {
|
|
62
|
-
constructor(
|
|
62
|
+
constructor(n) {
|
|
63
63
|
v(this, "iterator");
|
|
64
64
|
v(this, "continue");
|
|
65
|
-
v(this, "poll", async (
|
|
65
|
+
v(this, "poll", async (n) => {
|
|
66
66
|
if (!this.iterator)
|
|
67
67
|
if (this.continue)
|
|
68
68
|
try {
|
|
69
69
|
this.iterator = this.continue();
|
|
70
70
|
} catch (e) {
|
|
71
|
-
if (e instanceof
|
|
72
|
-
|
|
71
|
+
if (e instanceof we)
|
|
72
|
+
n("clear"), this.iterator = this.streamFactory();
|
|
73
73
|
else
|
|
74
74
|
throw e;
|
|
75
75
|
}
|
|
76
76
|
else
|
|
77
77
|
this.iterator = this.streamFactory();
|
|
78
78
|
for (; this.iterator; ) {
|
|
79
|
-
const e = this.iterator,
|
|
79
|
+
const e = this.iterator, r = await e.next();
|
|
80
80
|
if (e === this.iterator) {
|
|
81
|
-
if (
|
|
82
|
-
|
|
81
|
+
if (r.done) {
|
|
82
|
+
r.value && (this.iterator = void 0, this.continue = r.value.continue);
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
console.error(
|
|
85
|
+
if (r.value.error) {
|
|
86
|
+
console.error(r.value.error);
|
|
87
87
|
continue;
|
|
88
88
|
}
|
|
89
|
-
r
|
|
89
|
+
n(r.value);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
this.streamFactory =
|
|
93
|
+
this.streamFactory = n;
|
|
94
94
|
}
|
|
95
95
|
clear() {
|
|
96
96
|
if (this.iterator) {
|
|
97
|
-
const
|
|
97
|
+
const n = this.iterator;
|
|
98
98
|
this.iterator.return({
|
|
99
|
-
continue: () =>
|
|
99
|
+
continue: () => n,
|
|
100
100
|
cursor: ""
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
this.iterator = void 0, this.continue = void 0;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function se(t,
|
|
107
|
-
return !
|
|
106
|
+
function se(t, n) {
|
|
107
|
+
return !n || t.object.lastModified > n.object.lastModified || t.object.lastModified === n.object.lastModified && !t.tombstone && !!n.tombstone;
|
|
108
108
|
}
|
|
109
109
|
class Oe {
|
|
110
110
|
constructor() {
|
|
111
|
-
v(this, "entry",
|
|
111
|
+
v(this, "entry", U());
|
|
112
112
|
}
|
|
113
113
|
get result() {
|
|
114
114
|
return ye(() => {
|
|
115
|
-
const
|
|
116
|
-
return
|
|
115
|
+
const n = this.entry.value;
|
|
116
|
+
return n && (n.tombstone ? null : n.object);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
clear() {
|
|
120
120
|
this.entry.value = void 0;
|
|
121
121
|
}
|
|
122
|
-
onEntry(
|
|
123
|
-
if (
|
|
122
|
+
onEntry(n) {
|
|
123
|
+
if (n === "clear") {
|
|
124
124
|
this.clear();
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
-
(!
|
|
127
|
+
(!n || se(n, this.entry.value)) && (this.entry.value = n);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
class ae {
|
|
131
|
-
constructor(
|
|
132
|
-
v(this, "results",
|
|
131
|
+
constructor(n) {
|
|
132
|
+
v(this, "results", U([]));
|
|
133
133
|
v(this, "resultsRaw", /* @__PURE__ */ new Map());
|
|
134
134
|
v(this, "batchFlattenTimer");
|
|
135
|
-
this.graffiti =
|
|
135
|
+
this.graffiti = n;
|
|
136
136
|
}
|
|
137
137
|
clear() {
|
|
138
138
|
this.resultsRaw.clear(), this.results.value = [], clearTimeout(this.batchFlattenTimer), this.batchFlattenTimer = void 0;
|
|
139
139
|
}
|
|
140
140
|
flattenResults() {
|
|
141
|
-
this.results.value = Array.from(this.resultsRaw.values()).reduce((
|
|
141
|
+
this.results.value = Array.from(this.resultsRaw.values()).reduce((n, e) => (e.tombstone || n.push(e.object), n), []);
|
|
142
142
|
}
|
|
143
|
-
onEntry(
|
|
144
|
-
if (!
|
|
145
|
-
if (
|
|
143
|
+
onEntry(n) {
|
|
144
|
+
if (!n) return;
|
|
145
|
+
if (n === "clear") {
|
|
146
146
|
this.clear();
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
|
-
const e = this.resultsRaw.get(
|
|
150
|
-
se(
|
|
149
|
+
const e = this.resultsRaw.get(n.object.url);
|
|
150
|
+
se(n, e) && (this.resultsRaw.set(n.object.url, n), this.batchFlattenTimer || (this.batchFlattenTimer = setTimeout(() => {
|
|
151
151
|
this.flattenResults(), this.batchFlattenTimer = void 0;
|
|
152
152
|
}, 0)));
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function J(t,
|
|
156
|
-
let
|
|
157
|
-
async function
|
|
158
|
-
|
|
159
|
-
for await (const
|
|
160
|
-
if (
|
|
161
|
-
console.error(
|
|
155
|
+
function J(t, n, e, r, o) {
|
|
156
|
+
let i;
|
|
157
|
+
async function a() {
|
|
158
|
+
i = e();
|
|
159
|
+
for await (const f of i) {
|
|
160
|
+
if (f.error) {
|
|
161
|
+
console.error(f.error);
|
|
162
162
|
continue;
|
|
163
163
|
}
|
|
164
|
-
t.onEntry(
|
|
164
|
+
t.onEntry(f);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
let c = !1;
|
|
168
|
+
const l = async () => {
|
|
169
|
+
if (!c) {
|
|
170
|
+
c = !0;
|
|
171
|
+
try {
|
|
172
|
+
await n.poll(t.onEntry.bind(t));
|
|
173
|
+
} finally {
|
|
174
|
+
c = !1, P(o) && l();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}, s = U(!1);
|
|
168
178
|
return ve(
|
|
169
|
-
|
|
170
|
-
async (
|
|
171
|
-
if (JSON.stringify(
|
|
172
|
-
|
|
179
|
+
r,
|
|
180
|
+
async (f, p) => {
|
|
181
|
+
if (JSON.stringify(f) !== JSON.stringify(p)) {
|
|
182
|
+
i == null || i.return(null), t.clear(), n.clear(), a(), s.value = !0;
|
|
173
183
|
try {
|
|
174
|
-
await
|
|
184
|
+
await l();
|
|
175
185
|
} finally {
|
|
176
|
-
|
|
186
|
+
s.value = !1;
|
|
177
187
|
}
|
|
178
188
|
}
|
|
179
189
|
},
|
|
180
190
|
{
|
|
181
191
|
immediate: !0
|
|
182
192
|
}
|
|
183
|
-
), me(() =>
|
|
193
|
+
), me(() => i == null ? void 0 : i.return(null)), { poll: l, isInitialPolling: s };
|
|
184
194
|
}
|
|
185
|
-
function ue(t,
|
|
195
|
+
function ue(t, n) {
|
|
186
196
|
return () => {
|
|
187
|
-
const e =
|
|
197
|
+
const e = P(n);
|
|
188
198
|
return e === void 0 ? t == null ? void 0 : t.value : e;
|
|
189
199
|
};
|
|
190
200
|
}
|
|
191
201
|
function S(t) {
|
|
192
|
-
return t.map((
|
|
202
|
+
return t.map((n) => n());
|
|
193
203
|
}
|
|
194
|
-
function Ee(t,
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
204
|
+
function Ee(t, n, e, r = !1) {
|
|
205
|
+
const o = B(), i = ee(), a = () => P(t), c = () => P(n), l = ue(i, e), s = [a, c, l], f = () => o.synchronizeDiscover(...S(s)), p = () => o.discover(...S(s)), u = new ae(o), d = new oe(p), { poll: h, isInitialPolling: y } = J(
|
|
206
|
+
u,
|
|
207
|
+
d,
|
|
208
|
+
f,
|
|
198
209
|
s,
|
|
199
|
-
|
|
210
|
+
r
|
|
200
211
|
);
|
|
201
212
|
return {
|
|
202
213
|
/**
|
|
203
|
-
* A [
|
|
204
|
-
* an array of Graffiti objects.
|
|
214
|
+
* A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
215
|
+
* an array of Graffiti objects.
|
|
205
216
|
*/
|
|
206
|
-
|
|
217
|
+
objects: u.results,
|
|
218
|
+
/**
|
|
219
|
+
* @deprecated Use {@link objects} instead.
|
|
220
|
+
*/
|
|
221
|
+
get results() {
|
|
222
|
+
return console.warn(
|
|
223
|
+
"The `results` property is deprecated. Use `objects` instead."
|
|
224
|
+
), this.objects;
|
|
225
|
+
},
|
|
207
226
|
/**
|
|
208
227
|
* A method to poll for new results.
|
|
209
228
|
*/
|
|
210
|
-
poll:
|
|
229
|
+
poll: h,
|
|
211
230
|
/**
|
|
212
|
-
* A boolean [
|
|
213
|
-
* that indicates if the poll is currently running.
|
|
231
|
+
* A boolean [ref](https://vuejs.org/api/reactivity-core.html#ref)
|
|
232
|
+
* that indicates if the *first* poll is currently running.
|
|
214
233
|
* Useful to show a loading spinner or disable a button.
|
|
234
|
+
*
|
|
235
|
+
* This also tracks new polls when the arguments have changed,
|
|
236
|
+
* but it does not track ongoing polls from either calling
|
|
237
|
+
* {@link poll} or using the `autopoll` argument.
|
|
215
238
|
*/
|
|
216
|
-
|
|
239
|
+
isInitialPolling: y,
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated Use {@link isInitialPolling} instead.
|
|
242
|
+
*/
|
|
243
|
+
get isPolling() {
|
|
244
|
+
return console.warn(
|
|
245
|
+
"The `isPolling` property is deprecated. Use `isInitialPolling` instead."
|
|
246
|
+
), this.isInitialPolling;
|
|
247
|
+
}
|
|
217
248
|
};
|
|
218
249
|
}
|
|
219
|
-
function Se(t,
|
|
220
|
-
const
|
|
221
|
-
i,
|
|
250
|
+
function Se(t, n, e, r = !1) {
|
|
251
|
+
const o = B(), i = ee(), a = () => P(t), c = () => P(n), l = ue(i, e), s = [
|
|
222
252
|
a,
|
|
253
|
+
c,
|
|
223
254
|
l
|
|
224
|
-
],
|
|
255
|
+
], f = () => o.synchronizeGet(...S(s)), p = new Oe(), u = () => o.get(...S(s)), d = new xe(u), { poll: h, isInitialPolling: y } = J(
|
|
256
|
+
p,
|
|
257
|
+
d,
|
|
225
258
|
f,
|
|
226
|
-
c,
|
|
227
259
|
s,
|
|
228
|
-
|
|
260
|
+
r
|
|
229
261
|
);
|
|
230
262
|
return {
|
|
231
263
|
/**
|
|
232
|
-
* A [
|
|
264
|
+
* A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
233
265
|
* the retrieved Graffiti object, if it exists. If the object has been deleted,
|
|
234
266
|
* the result is `null`. If the object is still being fetched, the result is `undefined`.
|
|
235
267
|
*/
|
|
236
|
-
|
|
268
|
+
object: p.result,
|
|
269
|
+
/**
|
|
270
|
+
* @deprecated Use {@link object} instead.
|
|
271
|
+
*/
|
|
272
|
+
get result() {
|
|
273
|
+
return console.warn(
|
|
274
|
+
"The `result` property is deprecated. Use `object` instead."
|
|
275
|
+
), this.object;
|
|
276
|
+
},
|
|
237
277
|
/**
|
|
238
278
|
* A method to poll for new results.
|
|
239
279
|
*/
|
|
240
|
-
poll:
|
|
280
|
+
poll: h,
|
|
241
281
|
/**
|
|
242
|
-
* A boolean [
|
|
243
|
-
* that indicates if the poll is currently running.
|
|
282
|
+
* A boolean [ref](https://vuejs.org/api/reactivity-core.html#ref)
|
|
283
|
+
* that indicates if the *first* poll is currently running.
|
|
244
284
|
* Useful to show a loading spinner or disable a button.
|
|
285
|
+
*
|
|
286
|
+
* This also tracks new polls when the arguments have changed,
|
|
287
|
+
* but it does not track ongoing polls from either calling
|
|
288
|
+
* {@link poll} or using the `autopoll` argument.
|
|
289
|
+
*/
|
|
290
|
+
isInitialPolling: y,
|
|
291
|
+
/**
|
|
292
|
+
* @deprecated Use {@link isInitialPolling} instead.
|
|
245
293
|
*/
|
|
246
|
-
isPolling
|
|
294
|
+
get isPolling() {
|
|
295
|
+
return console.warn(
|
|
296
|
+
"The `isPolling` property is deprecated. Use `isInitialPolling` instead."
|
|
297
|
+
), this.isInitialPolling;
|
|
298
|
+
}
|
|
247
299
|
};
|
|
248
300
|
}
|
|
249
|
-
function Ge(t,
|
|
250
|
-
const
|
|
301
|
+
function Ge(t, n, e = !1) {
|
|
302
|
+
const r = B(), a = [() => P(t), () => P(n)], c = () => r.synchronizeRecoverOrphans(...S(a)), l = new ae(r), s = () => r.recoverOrphans(...S(a)), f = new oe(s), { poll: p, isInitialPolling: u } = J(
|
|
251
303
|
l,
|
|
252
|
-
|
|
304
|
+
f,
|
|
305
|
+
c,
|
|
253
306
|
a,
|
|
254
|
-
|
|
307
|
+
e
|
|
255
308
|
);
|
|
256
309
|
return {
|
|
257
310
|
/**
|
|
258
|
-
* A [
|
|
259
|
-
* an array of Graffiti objects.
|
|
311
|
+
* A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
312
|
+
* an array of Graffiti objects.
|
|
260
313
|
*/
|
|
261
|
-
|
|
314
|
+
objects: l.results,
|
|
315
|
+
/**
|
|
316
|
+
* @deprecated Use {@link objects} instead.
|
|
317
|
+
*/
|
|
318
|
+
get results() {
|
|
319
|
+
return console.warn(
|
|
320
|
+
"The `result` property is deprecated. Use `object` instead."
|
|
321
|
+
), this.objects;
|
|
322
|
+
},
|
|
262
323
|
/**
|
|
263
324
|
* A method to poll for new results.
|
|
264
325
|
*/
|
|
265
|
-
poll:
|
|
326
|
+
poll: p,
|
|
266
327
|
/**
|
|
267
|
-
* A boolean [
|
|
268
|
-
* that indicates if the poll is currently running.
|
|
328
|
+
* A boolean [ref](https://vuejs.org/api/reactivity-core.html#ref)
|
|
329
|
+
* that indicates if the *first* poll is currently running.
|
|
269
330
|
* Useful to show a loading spinner or disable a button.
|
|
331
|
+
*
|
|
332
|
+
* This also tracks new polls when the arguments have changed,
|
|
333
|
+
* but it does not track ongoing polls from either calling
|
|
334
|
+
* {@link poll} or using the `autopoll` argument.
|
|
335
|
+
*/
|
|
336
|
+
isInitialPolling: u,
|
|
337
|
+
/**
|
|
338
|
+
* @deprecated Use {@link isInitialPolling} instead.
|
|
270
339
|
*/
|
|
271
|
-
isPolling
|
|
340
|
+
get isPolling() {
|
|
341
|
+
return console.warn(
|
|
342
|
+
"The `isPolling` property is deprecated. Use `isInitialPolling` instead."
|
|
343
|
+
), this.isInitialPolling;
|
|
344
|
+
}
|
|
272
345
|
};
|
|
273
346
|
}
|
|
274
347
|
const ce = /* @__PURE__ */ L({
|
|
@@ -276,18 +349,22 @@ const ce = /* @__PURE__ */ L({
|
|
|
276
349
|
props: {
|
|
277
350
|
channels: {},
|
|
278
351
|
schema: {},
|
|
279
|
-
session: {}
|
|
352
|
+
session: {},
|
|
353
|
+
autopoll: { type: Boolean }
|
|
280
354
|
},
|
|
281
355
|
setup(t) {
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
356
|
+
const n = t, { objects: e, results: r, poll: o, isPolling: i, isInitialPolling: a } = Ee(
|
|
357
|
+
w(n, "channels"),
|
|
358
|
+
w(n, "schema"),
|
|
359
|
+
w(n, "session"),
|
|
360
|
+
w(n, "autopoll")
|
|
286
361
|
);
|
|
287
|
-
return (
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
362
|
+
return (c, l) => W(c.$slots, "default", {
|
|
363
|
+
objects: m(e),
|
|
364
|
+
results: m(r),
|
|
365
|
+
poll: m(o),
|
|
366
|
+
isPolling: m(i),
|
|
367
|
+
isInitialPolling: m(a)
|
|
291
368
|
});
|
|
292
369
|
}
|
|
293
370
|
}), le = /* @__PURE__ */ L({
|
|
@@ -295,35 +372,43 @@ const ce = /* @__PURE__ */ L({
|
|
|
295
372
|
props: {
|
|
296
373
|
url: {},
|
|
297
374
|
schema: {},
|
|
298
|
-
session: {}
|
|
375
|
+
session: {},
|
|
376
|
+
autopoll: { type: Boolean }
|
|
299
377
|
},
|
|
300
378
|
setup(t) {
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
379
|
+
const n = t, { object: e, result: r, poll: o, isPolling: i, isInitialPolling: a } = Se(
|
|
380
|
+
w(n, "url"),
|
|
381
|
+
w(n, "schema"),
|
|
382
|
+
w(n, "session"),
|
|
383
|
+
w(n, "autopoll")
|
|
305
384
|
);
|
|
306
|
-
return (
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
385
|
+
return (c, l) => W(c.$slots, "default", {
|
|
386
|
+
object: m(e),
|
|
387
|
+
result: m(r),
|
|
388
|
+
poll: m(o),
|
|
389
|
+
isPolling: m(i),
|
|
390
|
+
isInitialPolling: m(a)
|
|
310
391
|
});
|
|
311
392
|
}
|
|
312
393
|
}), fe = /* @__PURE__ */ L({
|
|
313
394
|
__name: "RecoverOrphans",
|
|
314
395
|
props: {
|
|
315
396
|
schema: {},
|
|
316
|
-
session: {}
|
|
397
|
+
session: {},
|
|
398
|
+
autopoll: { type: Boolean }
|
|
317
399
|
},
|
|
318
400
|
setup(t) {
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
401
|
+
const n = t, { objects: e, results: r, poll: o, isPolling: i, isInitialPolling: a } = Ge(
|
|
402
|
+
w(n, "schema"),
|
|
403
|
+
w(n, "session"),
|
|
404
|
+
w(n, "autopoll")
|
|
322
405
|
);
|
|
323
|
-
return (
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
406
|
+
return (c, l) => W(c.$slots, "default", {
|
|
407
|
+
objects: m(e),
|
|
408
|
+
results: m(r),
|
|
409
|
+
poll: m(o),
|
|
410
|
+
isPolling: m(i),
|
|
411
|
+
isInitialPolling: m(a)
|
|
327
412
|
});
|
|
328
413
|
}
|
|
329
414
|
});
|
|
@@ -341,64 +426,64 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
341
426
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
342
427
|
PERFORMANCE OF THIS SOFTWARE.
|
|
343
428
|
***************************************************************************** */
|
|
344
|
-
var
|
|
345
|
-
return
|
|
346
|
-
e.__proto__ =
|
|
347
|
-
} || function(e,
|
|
348
|
-
for (var o in
|
|
349
|
-
},
|
|
429
|
+
var V = function(t, n) {
|
|
430
|
+
return V = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
431
|
+
e.__proto__ = r;
|
|
432
|
+
} || function(e, r) {
|
|
433
|
+
for (var o in r) r.hasOwnProperty(o) && (e[o] = r[o]);
|
|
434
|
+
}, V(t, n);
|
|
350
435
|
};
|
|
351
|
-
function _e(t,
|
|
352
|
-
|
|
436
|
+
function _e(t, n) {
|
|
437
|
+
V(t, n);
|
|
353
438
|
function e() {
|
|
354
439
|
this.constructor = t;
|
|
355
440
|
}
|
|
356
|
-
t.prototype =
|
|
441
|
+
t.prototype = n === null ? Object.create(n) : (e.prototype = n.prototype, new e());
|
|
357
442
|
}
|
|
358
|
-
function G(t,
|
|
443
|
+
function G(t, n, e, r) {
|
|
359
444
|
function o(i) {
|
|
360
445
|
return i instanceof e ? i : new e(function(a) {
|
|
361
446
|
a(i);
|
|
362
447
|
});
|
|
363
448
|
}
|
|
364
449
|
return new (e || (e = Promise))(function(i, a) {
|
|
365
|
-
function
|
|
450
|
+
function c(f) {
|
|
366
451
|
try {
|
|
367
|
-
s(
|
|
452
|
+
s(r.next(f));
|
|
368
453
|
} catch (p) {
|
|
369
454
|
a(p);
|
|
370
455
|
}
|
|
371
456
|
}
|
|
372
|
-
function
|
|
457
|
+
function l(f) {
|
|
373
458
|
try {
|
|
374
|
-
s(
|
|
459
|
+
s(r.throw(f));
|
|
375
460
|
} catch (p) {
|
|
376
461
|
a(p);
|
|
377
462
|
}
|
|
378
463
|
}
|
|
379
464
|
function s(f) {
|
|
380
|
-
f.done ? i(f.value) : o(f.value).then(
|
|
465
|
+
f.done ? i(f.value) : o(f.value).then(c, l);
|
|
381
466
|
}
|
|
382
|
-
s((
|
|
467
|
+
s((r = r.apply(t, [])).next());
|
|
383
468
|
});
|
|
384
469
|
}
|
|
385
|
-
function
|
|
470
|
+
function j(t, n) {
|
|
386
471
|
var e = { label: 0, sent: function() {
|
|
387
472
|
if (i[0] & 1) throw i[1];
|
|
388
473
|
return i[1];
|
|
389
|
-
}, trys: [], ops: [] },
|
|
390
|
-
return a = { next:
|
|
474
|
+
}, trys: [], ops: [] }, r, o, i, a;
|
|
475
|
+
return a = { next: c(0), throw: c(1), return: c(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
391
476
|
return this;
|
|
392
477
|
}), a;
|
|
393
|
-
function
|
|
478
|
+
function c(s) {
|
|
394
479
|
return function(f) {
|
|
395
|
-
return
|
|
480
|
+
return l([s, f]);
|
|
396
481
|
};
|
|
397
482
|
}
|
|
398
|
-
function
|
|
399
|
-
if (
|
|
483
|
+
function l(s) {
|
|
484
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
400
485
|
for (; e; ) try {
|
|
401
|
-
if (
|
|
486
|
+
if (r = 1, o && (i = s[0] & 2 ? o.return : s[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, s[1])).done) return i;
|
|
402
487
|
switch (o = 0, i && (s = [s[0] & 2, i.value]), s[0]) {
|
|
403
488
|
case 0:
|
|
404
489
|
case 1:
|
|
@@ -432,81 +517,81 @@ function P(t, r) {
|
|
|
432
517
|
i[2] && e.ops.pop(), e.trys.pop();
|
|
433
518
|
continue;
|
|
434
519
|
}
|
|
435
|
-
s =
|
|
520
|
+
s = n.call(t, e);
|
|
436
521
|
} catch (f) {
|
|
437
522
|
s = [6, f], o = 0;
|
|
438
523
|
} finally {
|
|
439
|
-
|
|
524
|
+
r = i = 0;
|
|
440
525
|
}
|
|
441
526
|
if (s[0] & 5) throw s[1];
|
|
442
527
|
return { value: s[0] ? s[1] : void 0, done: !0 };
|
|
443
528
|
}
|
|
444
529
|
}
|
|
445
530
|
function _(t) {
|
|
446
|
-
var
|
|
531
|
+
var n = typeof Symbol == "function" && Symbol.iterator, e = n && t[n], r = 0;
|
|
447
532
|
if (e) return e.call(t);
|
|
448
533
|
if (t && typeof t.length == "number") return {
|
|
449
534
|
next: function() {
|
|
450
|
-
return t &&
|
|
535
|
+
return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t };
|
|
451
536
|
}
|
|
452
537
|
};
|
|
453
|
-
throw new TypeError(
|
|
538
|
+
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
454
539
|
}
|
|
455
|
-
function
|
|
456
|
-
return this instanceof
|
|
540
|
+
function T(t) {
|
|
541
|
+
return this instanceof T ? (this.v = t, this) : new T(t);
|
|
457
542
|
}
|
|
458
|
-
function
|
|
543
|
+
function Ie(t, n, e) {
|
|
459
544
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
460
|
-
var
|
|
545
|
+
var r = e.apply(t, n || []), o, i = [];
|
|
461
546
|
return o = {}, a("next"), a("throw"), a("return"), o[Symbol.asyncIterator] = function() {
|
|
462
547
|
return this;
|
|
463
548
|
}, o;
|
|
464
|
-
function a(
|
|
465
|
-
|
|
549
|
+
function a(u) {
|
|
550
|
+
r[u] && (o[u] = function(d) {
|
|
466
551
|
return new Promise(function(h, y) {
|
|
467
|
-
i.push([
|
|
552
|
+
i.push([u, d, h, y]) > 1 || c(u, d);
|
|
468
553
|
});
|
|
469
554
|
});
|
|
470
555
|
}
|
|
471
|
-
function
|
|
556
|
+
function c(u, d) {
|
|
472
557
|
try {
|
|
473
|
-
|
|
558
|
+
l(r[u](d));
|
|
474
559
|
} catch (h) {
|
|
475
560
|
p(i[0][3], h);
|
|
476
561
|
}
|
|
477
562
|
}
|
|
478
|
-
function u
|
|
479
|
-
|
|
563
|
+
function l(u) {
|
|
564
|
+
u.value instanceof T ? Promise.resolve(u.value.v).then(s, f) : p(i[0][2], u);
|
|
480
565
|
}
|
|
481
|
-
function s(
|
|
482
|
-
|
|
566
|
+
function s(u) {
|
|
567
|
+
c("next", u);
|
|
483
568
|
}
|
|
484
|
-
function f(
|
|
485
|
-
|
|
569
|
+
function f(u) {
|
|
570
|
+
c("throw", u);
|
|
486
571
|
}
|
|
487
|
-
function p(
|
|
488
|
-
|
|
572
|
+
function p(u, d) {
|
|
573
|
+
u(d), i.shift(), i.length && c(i[0][0], i[0][1]);
|
|
489
574
|
}
|
|
490
575
|
}
|
|
491
576
|
var he = (
|
|
492
577
|
/** @class */
|
|
493
578
|
function(t) {
|
|
494
|
-
_e(
|
|
495
|
-
function
|
|
496
|
-
var
|
|
497
|
-
return Object.defineProperty(
|
|
579
|
+
_e(n, t);
|
|
580
|
+
function n(e) {
|
|
581
|
+
var r = t.call(this, e) || this;
|
|
582
|
+
return Object.defineProperty(r, "name", {
|
|
498
583
|
value: "RepeaterOverflowError",
|
|
499
584
|
enumerable: !1
|
|
500
|
-
}), typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(
|
|
585
|
+
}), typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(r, r.constructor.prototype) : r.__proto__ = r.constructor.prototype, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(r, r.constructor), r;
|
|
501
586
|
}
|
|
502
|
-
return
|
|
587
|
+
return n;
|
|
503
588
|
}(Error)
|
|
504
589
|
);
|
|
505
590
|
(function() {
|
|
506
|
-
function t(
|
|
507
|
-
if (
|
|
591
|
+
function t(n) {
|
|
592
|
+
if (n < 0)
|
|
508
593
|
throw new RangeError("Capacity may not be less than 0");
|
|
509
|
-
this._c =
|
|
594
|
+
this._c = n, this._q = [];
|
|
510
595
|
}
|
|
511
596
|
return Object.defineProperty(t.prototype, "empty", {
|
|
512
597
|
get: function() {
|
|
@@ -520,10 +605,10 @@ var he = (
|
|
|
520
605
|
},
|
|
521
606
|
enumerable: !1,
|
|
522
607
|
configurable: !0
|
|
523
|
-
}), t.prototype.add = function(
|
|
608
|
+
}), t.prototype.add = function(n) {
|
|
524
609
|
if (this.full)
|
|
525
610
|
throw new Error("Buffer full");
|
|
526
|
-
this._q.push(
|
|
611
|
+
this._q.push(n);
|
|
527
612
|
}, t.prototype.remove = function() {
|
|
528
613
|
if (this.empty)
|
|
529
614
|
throw new Error("Buffer empty");
|
|
@@ -531,10 +616,10 @@ var he = (
|
|
|
531
616
|
}, t;
|
|
532
617
|
})();
|
|
533
618
|
(function() {
|
|
534
|
-
function t(
|
|
535
|
-
if (
|
|
619
|
+
function t(n) {
|
|
620
|
+
if (n < 1)
|
|
536
621
|
throw new RangeError("Capacity may not be less than 1");
|
|
537
|
-
this._c =
|
|
622
|
+
this._c = n, this._q = [];
|
|
538
623
|
}
|
|
539
624
|
return Object.defineProperty(t.prototype, "empty", {
|
|
540
625
|
get: function() {
|
|
@@ -548,10 +633,10 @@ var he = (
|
|
|
548
633
|
},
|
|
549
634
|
enumerable: !1,
|
|
550
635
|
configurable: !0
|
|
551
|
-
}), t.prototype.add = function(
|
|
636
|
+
}), t.prototype.add = function(n) {
|
|
552
637
|
for (; this._q.length >= this._c; )
|
|
553
638
|
this._q.shift();
|
|
554
|
-
this._q.push(
|
|
639
|
+
this._q.push(n);
|
|
555
640
|
}, t.prototype.remove = function() {
|
|
556
641
|
if (this.empty)
|
|
557
642
|
throw new Error("Buffer empty");
|
|
@@ -559,10 +644,10 @@ var he = (
|
|
|
559
644
|
}, t;
|
|
560
645
|
})();
|
|
561
646
|
(function() {
|
|
562
|
-
function t(
|
|
563
|
-
if (
|
|
647
|
+
function t(n) {
|
|
648
|
+
if (n < 1)
|
|
564
649
|
throw new RangeError("Capacity may not be less than 1");
|
|
565
|
-
this._c =
|
|
650
|
+
this._c = n, this._q = [];
|
|
566
651
|
}
|
|
567
652
|
return Object.defineProperty(t.prototype, "empty", {
|
|
568
653
|
get: function() {
|
|
@@ -576,24 +661,24 @@ var he = (
|
|
|
576
661
|
},
|
|
577
662
|
enumerable: !1,
|
|
578
663
|
configurable: !0
|
|
579
|
-
}), t.prototype.add = function(
|
|
580
|
-
this._q.length < this._c && this._q.push(
|
|
664
|
+
}), t.prototype.add = function(n) {
|
|
665
|
+
this._q.length < this._c && this._q.push(n);
|
|
581
666
|
}, t.prototype.remove = function() {
|
|
582
667
|
if (this.empty)
|
|
583
668
|
throw new Error("Buffer empty");
|
|
584
669
|
return this._q.shift();
|
|
585
670
|
}, t;
|
|
586
671
|
})();
|
|
587
|
-
function
|
|
672
|
+
function C(t) {
|
|
588
673
|
t != null && typeof t.then == "function" && t.then(A, A);
|
|
589
674
|
}
|
|
590
|
-
var
|
|
675
|
+
var M = 0, H = 1, O = 2, q = 3, $ = 4, D = 1024, A = function() {
|
|
591
676
|
};
|
|
592
677
|
function E(t) {
|
|
593
|
-
var
|
|
594
|
-
if (
|
|
595
|
-
throw
|
|
596
|
-
return
|
|
678
|
+
var n = t.err, e = Promise.resolve(t.execution).then(function(r) {
|
|
679
|
+
if (n != null)
|
|
680
|
+
throw n;
|
|
681
|
+
return r;
|
|
597
682
|
});
|
|
598
683
|
return t.err = void 0, t.execution = e.then(function() {
|
|
599
684
|
}, function() {
|
|
@@ -601,124 +686,124 @@ function E(t) {
|
|
|
601
686
|
return e;
|
|
602
687
|
});
|
|
603
688
|
}
|
|
604
|
-
function x(t,
|
|
605
|
-
var e = t.state >=
|
|
606
|
-
return Promise.resolve(
|
|
607
|
-
return !e && t.state >=
|
|
689
|
+
function x(t, n) {
|
|
690
|
+
var e = t.state >= q;
|
|
691
|
+
return Promise.resolve(n).then(function(r) {
|
|
692
|
+
return !e && t.state >= $ ? E(t).then(function(o) {
|
|
608
693
|
return {
|
|
609
694
|
value: o,
|
|
610
695
|
done: !0
|
|
611
696
|
};
|
|
612
|
-
}) : { value:
|
|
697
|
+
}) : { value: r, done: e };
|
|
613
698
|
});
|
|
614
699
|
}
|
|
615
|
-
function K(t,
|
|
616
|
-
var e,
|
|
700
|
+
function K(t, n) {
|
|
701
|
+
var e, r;
|
|
617
702
|
if (!(t.state >= O))
|
|
618
|
-
if (t.state = O, t.onnext(), t.onstop(), t.err == null && (t.err =
|
|
619
|
-
|
|
703
|
+
if (t.state = O, t.onnext(), t.onstop(), t.err == null && (t.err = n), t.pushes.length === 0 && (typeof t.buffer > "u" || t.buffer.empty))
|
|
704
|
+
I(t);
|
|
620
705
|
else
|
|
621
706
|
try {
|
|
622
707
|
for (var o = _(t.pushes), i = o.next(); !i.done; i = o.next()) {
|
|
623
708
|
var a = i.value;
|
|
624
709
|
a.resolve();
|
|
625
710
|
}
|
|
626
|
-
} catch (
|
|
627
|
-
e = { error:
|
|
711
|
+
} catch (c) {
|
|
712
|
+
e = { error: c };
|
|
628
713
|
} finally {
|
|
629
714
|
try {
|
|
630
|
-
i && !i.done && (
|
|
715
|
+
i && !i.done && (r = o.return) && r.call(o);
|
|
631
716
|
} finally {
|
|
632
717
|
if (e) throw e.error;
|
|
633
718
|
}
|
|
634
719
|
}
|
|
635
720
|
}
|
|
636
|
-
function
|
|
637
|
-
var
|
|
638
|
-
if (!(t.state >=
|
|
639
|
-
t.state < O && K(t), t.state =
|
|
721
|
+
function I(t) {
|
|
722
|
+
var n, e;
|
|
723
|
+
if (!(t.state >= q)) {
|
|
724
|
+
t.state < O && K(t), t.state = q, t.buffer = void 0;
|
|
640
725
|
try {
|
|
641
|
-
for (var
|
|
726
|
+
for (var r = _(t.nexts), o = r.next(); !o.done; o = r.next()) {
|
|
642
727
|
var i = o.value, a = t.pending === void 0 ? E(t) : t.pending.then(function() {
|
|
643
728
|
return E(t);
|
|
644
729
|
});
|
|
645
730
|
i.resolve(x(t, a));
|
|
646
731
|
}
|
|
647
|
-
} catch (
|
|
648
|
-
|
|
732
|
+
} catch (c) {
|
|
733
|
+
n = { error: c };
|
|
649
734
|
} finally {
|
|
650
735
|
try {
|
|
651
|
-
o && !o.done && (e =
|
|
736
|
+
o && !o.done && (e = r.return) && e.call(r);
|
|
652
737
|
} finally {
|
|
653
|
-
if (
|
|
738
|
+
if (n) throw n.error;
|
|
654
739
|
}
|
|
655
740
|
}
|
|
656
741
|
t.pushes = [], t.nexts = [];
|
|
657
742
|
}
|
|
658
743
|
}
|
|
659
744
|
function Q(t) {
|
|
660
|
-
t.state >=
|
|
745
|
+
t.state >= $ || (t.state < q && I(t), t.state = $);
|
|
661
746
|
}
|
|
662
|
-
function
|
|
663
|
-
if (
|
|
664
|
-
throw new he("No more than " +
|
|
747
|
+
function Te(t, n) {
|
|
748
|
+
if (C(n), t.pushes.length >= D)
|
|
749
|
+
throw new he("No more than " + D + " pending calls to push are allowed on a single repeater.");
|
|
665
750
|
if (t.state >= O)
|
|
666
751
|
return Promise.resolve(void 0);
|
|
667
|
-
var e = t.pending === void 0 ? Promise.resolve(
|
|
668
|
-
return
|
|
752
|
+
var e = t.pending === void 0 ? Promise.resolve(n) : t.pending.then(function() {
|
|
753
|
+
return n;
|
|
669
754
|
});
|
|
670
|
-
e = e.catch(function(
|
|
671
|
-
t.state < O && (t.err =
|
|
755
|
+
e = e.catch(function(l) {
|
|
756
|
+
t.state < O && (t.err = l), Q(t);
|
|
672
757
|
});
|
|
673
|
-
var
|
|
758
|
+
var r;
|
|
674
759
|
if (t.nexts.length) {
|
|
675
760
|
var o = t.nexts.shift();
|
|
676
|
-
o.resolve(x(t, e)), t.nexts.length ?
|
|
677
|
-
return t.onnext =
|
|
761
|
+
o.resolve(x(t, e)), t.nexts.length ? r = Promise.resolve(t.nexts[0].value) : typeof t.buffer < "u" && !t.buffer.full ? r = Promise.resolve(void 0) : r = new Promise(function(l) {
|
|
762
|
+
return t.onnext = l;
|
|
678
763
|
});
|
|
679
|
-
} else typeof t.buffer < "u" && !t.buffer.full ? (t.buffer.add(e),
|
|
680
|
-
return t.pushes.push({ resolve:
|
|
764
|
+
} else typeof t.buffer < "u" && !t.buffer.full ? (t.buffer.add(e), r = Promise.resolve(void 0)) : r = new Promise(function(l) {
|
|
765
|
+
return t.pushes.push({ resolve: l, value: e });
|
|
681
766
|
});
|
|
682
|
-
var i = !0, a = {},
|
|
767
|
+
var i = !0, a = {}, c = r.catch(function(l) {
|
|
683
768
|
if (i)
|
|
684
|
-
throw
|
|
769
|
+
throw l;
|
|
685
770
|
});
|
|
686
|
-
return a.then = function(
|
|
687
|
-
return i = !1, Promise.prototype.then.call(
|
|
688
|
-
}, a.catch = function(
|
|
689
|
-
return i = !1, Promise.prototype.catch.call(
|
|
690
|
-
}, a.finally =
|
|
691
|
-
return
|
|
692
|
-
}).catch(function(
|
|
693
|
-
t.err =
|
|
771
|
+
return a.then = function(l, s) {
|
|
772
|
+
return i = !1, Promise.prototype.then.call(r, l, s);
|
|
773
|
+
}, a.catch = function(l) {
|
|
774
|
+
return i = !1, Promise.prototype.catch.call(r, l);
|
|
775
|
+
}, a.finally = r.finally.bind(r), t.pending = e.then(function() {
|
|
776
|
+
return c;
|
|
777
|
+
}).catch(function(l) {
|
|
778
|
+
t.err = l, Q(t);
|
|
694
779
|
}), a;
|
|
695
780
|
}
|
|
696
|
-
function
|
|
697
|
-
var
|
|
698
|
-
return t.onstop =
|
|
781
|
+
function Re(t) {
|
|
782
|
+
var n = K.bind(null, t), e = new Promise(function(r) {
|
|
783
|
+
return t.onstop = r;
|
|
699
784
|
});
|
|
700
|
-
return
|
|
785
|
+
return n.then = e.then.bind(e), n.catch = e.catch.bind(e), n.finally = e.finally.bind(e), n;
|
|
701
786
|
}
|
|
702
|
-
function
|
|
787
|
+
function ze(t) {
|
|
703
788
|
if (!(t.state >= H)) {
|
|
704
789
|
t.state = H;
|
|
705
|
-
var
|
|
706
|
-
t.execution = new Promise(function(
|
|
707
|
-
return
|
|
790
|
+
var n = Te.bind(null, t), e = Re(t);
|
|
791
|
+
t.execution = new Promise(function(r) {
|
|
792
|
+
return r(t.executor(n, e));
|
|
708
793
|
}), t.execution.catch(function() {
|
|
709
794
|
return K(t);
|
|
710
795
|
});
|
|
711
796
|
}
|
|
712
797
|
}
|
|
713
|
-
var
|
|
798
|
+
var F = /* @__PURE__ */ new WeakMap(), R = (
|
|
714
799
|
/** @class */
|
|
715
800
|
function() {
|
|
716
|
-
function t(
|
|
717
|
-
|
|
718
|
-
executor:
|
|
801
|
+
function t(n, e) {
|
|
802
|
+
F.set(this, {
|
|
803
|
+
executor: n,
|
|
719
804
|
buffer: e,
|
|
720
805
|
err: void 0,
|
|
721
|
-
state:
|
|
806
|
+
state: M,
|
|
722
807
|
pushes: [],
|
|
723
808
|
nexts: [],
|
|
724
809
|
pending: void 0,
|
|
@@ -727,62 +812,62 @@ var q = /* @__PURE__ */ new WeakMap(), k = (
|
|
|
727
812
|
onstop: A
|
|
728
813
|
});
|
|
729
814
|
}
|
|
730
|
-
return t.prototype.next = function(
|
|
731
|
-
|
|
732
|
-
var e =
|
|
815
|
+
return t.prototype.next = function(n) {
|
|
816
|
+
C(n);
|
|
817
|
+
var e = F.get(this);
|
|
733
818
|
if (e === void 0)
|
|
734
819
|
throw new Error("WeakMap error");
|
|
735
|
-
if (e.nexts.length >=
|
|
736
|
-
throw new he("No more than " +
|
|
737
|
-
if (e.state <=
|
|
738
|
-
var
|
|
820
|
+
if (e.nexts.length >= D)
|
|
821
|
+
throw new he("No more than " + D + " pending calls to next are allowed on a single repeater.");
|
|
822
|
+
if (e.state <= M && ze(e), e.onnext(n), typeof e.buffer < "u" && !e.buffer.empty) {
|
|
823
|
+
var r = x(e, e.buffer.remove());
|
|
739
824
|
if (e.pushes.length) {
|
|
740
825
|
var o = e.pushes.shift();
|
|
741
826
|
e.buffer.add(o.value), e.onnext = o.resolve;
|
|
742
827
|
}
|
|
743
|
-
return
|
|
828
|
+
return r;
|
|
744
829
|
} else if (e.pushes.length) {
|
|
745
830
|
var i = e.pushes.shift();
|
|
746
831
|
return e.onnext = i.resolve, x(e, i.value);
|
|
747
832
|
} else if (e.state >= O)
|
|
748
|
-
return
|
|
833
|
+
return I(e), x(e, E(e));
|
|
749
834
|
return new Promise(function(a) {
|
|
750
|
-
return e.nexts.push({ resolve: a, value:
|
|
835
|
+
return e.nexts.push({ resolve: a, value: n });
|
|
751
836
|
});
|
|
752
|
-
}, t.prototype.return = function(
|
|
753
|
-
|
|
754
|
-
var e =
|
|
837
|
+
}, t.prototype.return = function(n) {
|
|
838
|
+
C(n);
|
|
839
|
+
var e = F.get(this);
|
|
755
840
|
if (e === void 0)
|
|
756
841
|
throw new Error("WeakMap error");
|
|
757
|
-
return
|
|
758
|
-
return
|
|
842
|
+
return I(e), e.execution = Promise.resolve(e.execution).then(function() {
|
|
843
|
+
return n;
|
|
759
844
|
}), x(e, E(e));
|
|
760
|
-
}, t.prototype.throw = function(
|
|
761
|
-
var e =
|
|
845
|
+
}, t.prototype.throw = function(n) {
|
|
846
|
+
var e = F.get(this);
|
|
762
847
|
if (e === void 0)
|
|
763
848
|
throw new Error("WeakMap error");
|
|
764
|
-
return e.state <=
|
|
849
|
+
return e.state <= M || e.state >= O || typeof e.buffer < "u" && !e.buffer.empty ? (I(e), e.err == null && (e.err = n), x(e, E(e))) : this.next(Promise.reject(n));
|
|
765
850
|
}, t.prototype[Symbol.asyncIterator] = function() {
|
|
766
851
|
return this;
|
|
767
|
-
}, t.race =
|
|
852
|
+
}, t.race = ke, t.merge = Fe, t.zip = qe, t.latest = De, t;
|
|
768
853
|
}()
|
|
769
854
|
);
|
|
770
|
-
function
|
|
771
|
-
var e,
|
|
855
|
+
function N(t, n) {
|
|
856
|
+
var e, r, o = [], i = function(s) {
|
|
772
857
|
s != null && typeof s[Symbol.asyncIterator] == "function" ? o.push(s[Symbol.asyncIterator]()) : s != null && typeof s[Symbol.iterator] == "function" ? o.push(s[Symbol.iterator]()) : o.push(function() {
|
|
773
|
-
return
|
|
774
|
-
return
|
|
775
|
-
switch (
|
|
858
|
+
return Ie(this, arguments, function() {
|
|
859
|
+
return j(this, function(u) {
|
|
860
|
+
switch (u.label) {
|
|
776
861
|
case 0:
|
|
777
|
-
return
|
|
862
|
+
return n.yieldValues ? [4, T(s)] : [3, 3];
|
|
778
863
|
case 1:
|
|
779
|
-
return [4,
|
|
864
|
+
return [4, u.sent()];
|
|
780
865
|
case 2:
|
|
781
|
-
|
|
866
|
+
u.sent(), u.label = 3;
|
|
782
867
|
case 3:
|
|
783
|
-
return
|
|
868
|
+
return n.returnValues ? [4, T(s)] : [3, 5];
|
|
784
869
|
case 4:
|
|
785
|
-
return [2,
|
|
870
|
+
return [2, u.sent()];
|
|
786
871
|
case 5:
|
|
787
872
|
return [
|
|
788
873
|
2
|
|
@@ -794,27 +879,27 @@ function V(t, r) {
|
|
|
794
879
|
}());
|
|
795
880
|
};
|
|
796
881
|
try {
|
|
797
|
-
for (var a = _(t),
|
|
798
|
-
var
|
|
799
|
-
i(
|
|
882
|
+
for (var a = _(t), c = a.next(); !c.done; c = a.next()) {
|
|
883
|
+
var l = c.value;
|
|
884
|
+
i(l);
|
|
800
885
|
}
|
|
801
886
|
} catch (s) {
|
|
802
887
|
e = { error: s };
|
|
803
888
|
} finally {
|
|
804
889
|
try {
|
|
805
|
-
|
|
890
|
+
c && !c.done && (r = a.return) && r.call(a);
|
|
806
891
|
} finally {
|
|
807
892
|
if (e) throw e.error;
|
|
808
893
|
}
|
|
809
894
|
}
|
|
810
895
|
return o;
|
|
811
896
|
}
|
|
812
|
-
function
|
|
813
|
-
var
|
|
814
|
-
return new
|
|
815
|
-
return G(
|
|
816
|
-
var i, a,
|
|
817
|
-
return
|
|
897
|
+
function ke(t) {
|
|
898
|
+
var n = this, e = N(t, { returnValues: !0 });
|
|
899
|
+
return new R(function(r, o) {
|
|
900
|
+
return G(n, void 0, void 0, function() {
|
|
901
|
+
var i, a, c, l, s, f;
|
|
902
|
+
return j(this, function(p) {
|
|
818
903
|
switch (p.label) {
|
|
819
904
|
case 0:
|
|
820
905
|
if (!e.length)
|
|
@@ -826,35 +911,35 @@ function Fe(t) {
|
|
|
826
911
|
i(), a = !0;
|
|
827
912
|
}), p.label = 1;
|
|
828
913
|
case 1:
|
|
829
|
-
p.trys.push([1, , 5, 7]),
|
|
830
|
-
var
|
|
831
|
-
return
|
|
832
|
-
switch (
|
|
914
|
+
p.trys.push([1, , 5, 7]), l = void 0, s = 0, f = function() {
|
|
915
|
+
var u, d, h, y, b, z;
|
|
916
|
+
return j(this, function(k) {
|
|
917
|
+
switch (k.label) {
|
|
833
918
|
case 0:
|
|
834
|
-
|
|
919
|
+
u = s;
|
|
835
920
|
try {
|
|
836
|
-
for (d = (
|
|
837
|
-
y = h.value, Promise.resolve(y.next()).then(function(
|
|
838
|
-
|
|
839
|
-
}, function(
|
|
840
|
-
return o(
|
|
921
|
+
for (d = (b = void 0, _(e)), h = d.next(); !h.done; h = d.next())
|
|
922
|
+
y = h.value, Promise.resolve(y.next()).then(function(g) {
|
|
923
|
+
g.done ? (o(), c === void 0 && (c = g)) : s === u && (s++, i(g));
|
|
924
|
+
}, function(g) {
|
|
925
|
+
return o(g);
|
|
841
926
|
});
|
|
842
|
-
} catch (
|
|
843
|
-
|
|
927
|
+
} catch (g) {
|
|
928
|
+
b = { error: g };
|
|
844
929
|
} finally {
|
|
845
930
|
try {
|
|
846
|
-
h && !h.done && (
|
|
931
|
+
h && !h.done && (z = d.return) && z.call(d);
|
|
847
932
|
} finally {
|
|
848
|
-
if (
|
|
933
|
+
if (b) throw b.error;
|
|
849
934
|
}
|
|
850
935
|
}
|
|
851
|
-
return [4, new Promise(function(
|
|
852
|
-
return i =
|
|
936
|
+
return [4, new Promise(function(g) {
|
|
937
|
+
return i = g;
|
|
853
938
|
})];
|
|
854
939
|
case 1:
|
|
855
|
-
return
|
|
940
|
+
return l = k.sent(), l === void 0 ? [3, 3] : [4, r(l.value)];
|
|
856
941
|
case 2:
|
|
857
|
-
|
|
942
|
+
k.sent(), k.label = 3;
|
|
858
943
|
case 3:
|
|
859
944
|
return [
|
|
860
945
|
2
|
|
@@ -868,10 +953,10 @@ function Fe(t) {
|
|
|
868
953
|
case 3:
|
|
869
954
|
return p.sent(), [3, 2];
|
|
870
955
|
case 4:
|
|
871
|
-
return [2,
|
|
956
|
+
return [2, c && c.value];
|
|
872
957
|
case 5:
|
|
873
|
-
return o(), [4, Promise.race(e.map(function(
|
|
874
|
-
return
|
|
958
|
+
return o(), [4, Promise.race(e.map(function(u) {
|
|
959
|
+
return u.return && u.return();
|
|
875
960
|
}))];
|
|
876
961
|
case 6:
|
|
877
962
|
return p.sent(), [
|
|
@@ -888,12 +973,12 @@ function Fe(t) {
|
|
|
888
973
|
});
|
|
889
974
|
});
|
|
890
975
|
}
|
|
891
|
-
function
|
|
892
|
-
var
|
|
893
|
-
return new
|
|
894
|
-
return G(
|
|
895
|
-
var i, a,
|
|
896
|
-
return
|
|
976
|
+
function Fe(t) {
|
|
977
|
+
var n = this, e = N(t, { yieldValues: !0 });
|
|
978
|
+
return new R(function(r, o) {
|
|
979
|
+
return G(n, void 0, void 0, function() {
|
|
980
|
+
var i, a, c, l = this;
|
|
981
|
+
return j(this, function(s) {
|
|
897
982
|
switch (s.label) {
|
|
898
983
|
case 0:
|
|
899
984
|
if (!e.length)
|
|
@@ -905,7 +990,7 @@ function qe(t) {
|
|
|
905
990
|
var f, p;
|
|
906
991
|
a = !0;
|
|
907
992
|
try {
|
|
908
|
-
for (var
|
|
993
|
+
for (var u = _(i), d = u.next(); !d.done; d = u.next()) {
|
|
909
994
|
var h = d.value;
|
|
910
995
|
h();
|
|
911
996
|
}
|
|
@@ -913,7 +998,7 @@ function qe(t) {
|
|
|
913
998
|
f = { error: y };
|
|
914
999
|
} finally {
|
|
915
1000
|
try {
|
|
916
|
-
d && !d.done && (p =
|
|
1001
|
+
d && !d.done && (p = u.return) && p.call(u);
|
|
917
1002
|
} finally {
|
|
918
1003
|
if (f) throw f.error;
|
|
919
1004
|
}
|
|
@@ -921,9 +1006,9 @@ function qe(t) {
|
|
|
921
1006
|
}), s.label = 1;
|
|
922
1007
|
case 1:
|
|
923
1008
|
return s.trys.push([1, , 3, 4]), [4, Promise.all(e.map(function(f, p) {
|
|
924
|
-
return G(
|
|
925
|
-
var
|
|
926
|
-
return
|
|
1009
|
+
return G(l, void 0, void 0, function() {
|
|
1010
|
+
var u, d;
|
|
1011
|
+
return j(this, function(h) {
|
|
927
1012
|
switch (h.label) {
|
|
928
1013
|
case 0:
|
|
929
1014
|
h.trys.push([0, , 6, 9]), h.label = 1;
|
|
@@ -936,10 +1021,10 @@ function qe(t) {
|
|
|
936
1021
|
i[p] = y;
|
|
937
1022
|
})]);
|
|
938
1023
|
case 2:
|
|
939
|
-
return
|
|
1024
|
+
return u = h.sent(), u === void 0 ? [3, 4] : u.done ? (c = u, [
|
|
940
1025
|
2
|
|
941
1026
|
/*return*/
|
|
942
|
-
]) : [4,
|
|
1027
|
+
]) : [4, r(u.value)];
|
|
943
1028
|
case 3:
|
|
944
1029
|
h.sent(), h.label = 4;
|
|
945
1030
|
case 4:
|
|
@@ -965,7 +1050,7 @@ function qe(t) {
|
|
|
965
1050
|
});
|
|
966
1051
|
}))];
|
|
967
1052
|
case 2:
|
|
968
|
-
return s.sent(), [2,
|
|
1053
|
+
return s.sent(), [2, c && c.value];
|
|
969
1054
|
case 3:
|
|
970
1055
|
return o(), [
|
|
971
1056
|
7
|
|
@@ -981,12 +1066,12 @@ function qe(t) {
|
|
|
981
1066
|
});
|
|
982
1067
|
});
|
|
983
1068
|
}
|
|
984
|
-
function
|
|
985
|
-
var
|
|
986
|
-
return new
|
|
987
|
-
return G(
|
|
988
|
-
var i, a,
|
|
989
|
-
return
|
|
1069
|
+
function qe(t) {
|
|
1070
|
+
var n = this, e = N(t, { returnValues: !0 });
|
|
1071
|
+
return new R(function(r, o) {
|
|
1072
|
+
return G(n, void 0, void 0, function() {
|
|
1073
|
+
var i, a, c, l;
|
|
1074
|
+
return j(this, function(s) {
|
|
990
1075
|
switch (s.label) {
|
|
991
1076
|
case 0:
|
|
992
1077
|
if (!e.length)
|
|
@@ -1007,14 +1092,14 @@ function De(t) {
|
|
|
1007
1092
|
return i = f;
|
|
1008
1093
|
})]);
|
|
1009
1094
|
case 3:
|
|
1010
|
-
return
|
|
1095
|
+
return c = s.sent(), c === void 0 ? [
|
|
1011
1096
|
2
|
|
1012
1097
|
/*return*/
|
|
1013
|
-
] : (
|
|
1098
|
+
] : (l = c.map(function(f) {
|
|
1014
1099
|
return f.value;
|
|
1015
|
-
}),
|
|
1100
|
+
}), c.some(function(f) {
|
|
1016
1101
|
return f.done;
|
|
1017
|
-
}) ? [2,
|
|
1102
|
+
}) ? [2, l] : [4, r(l)]);
|
|
1018
1103
|
case 4:
|
|
1019
1104
|
return s.sent(), [3, 2];
|
|
1020
1105
|
case 5:
|
|
@@ -1038,77 +1123,77 @@ function De(t) {
|
|
|
1038
1123
|
});
|
|
1039
1124
|
});
|
|
1040
1125
|
}
|
|
1041
|
-
function
|
|
1042
|
-
var
|
|
1126
|
+
function De(t) {
|
|
1127
|
+
var n = this, e = N(t, {
|
|
1043
1128
|
yieldValues: !0,
|
|
1044
1129
|
returnValues: !0
|
|
1045
1130
|
});
|
|
1046
|
-
return new
|
|
1047
|
-
return G(
|
|
1048
|
-
var i, a,
|
|
1049
|
-
return
|
|
1131
|
+
return new R(function(r, o) {
|
|
1132
|
+
return G(n, void 0, void 0, function() {
|
|
1133
|
+
var i, a, c, l, s, f = this;
|
|
1134
|
+
return j(this, function(p) {
|
|
1050
1135
|
switch (p.label) {
|
|
1051
1136
|
case 0:
|
|
1052
1137
|
if (!e.length)
|
|
1053
1138
|
return o(), [2, []];
|
|
1054
|
-
a = [],
|
|
1055
|
-
var
|
|
1139
|
+
a = [], c = !1, o.then(function() {
|
|
1140
|
+
var u, d;
|
|
1056
1141
|
i();
|
|
1057
1142
|
try {
|
|
1058
1143
|
for (var h = _(a), y = h.next(); !y.done; y = h.next()) {
|
|
1059
|
-
var
|
|
1060
|
-
|
|
1144
|
+
var b = y.value;
|
|
1145
|
+
b();
|
|
1061
1146
|
}
|
|
1062
|
-
} catch (
|
|
1063
|
-
|
|
1147
|
+
} catch (z) {
|
|
1148
|
+
u = { error: z };
|
|
1064
1149
|
} finally {
|
|
1065
1150
|
try {
|
|
1066
1151
|
y && !y.done && (d = h.return) && d.call(h);
|
|
1067
1152
|
} finally {
|
|
1068
|
-
if (
|
|
1153
|
+
if (u) throw u.error;
|
|
1069
1154
|
}
|
|
1070
1155
|
}
|
|
1071
|
-
|
|
1156
|
+
c = !0;
|
|
1072
1157
|
}), p.label = 1;
|
|
1073
1158
|
case 1:
|
|
1074
|
-
return p.trys.push([1, , 5, 7]), Promise.all(e.map(function(
|
|
1075
|
-
return
|
|
1076
|
-
})).then(function(
|
|
1077
|
-
return i(
|
|
1078
|
-
}, function(
|
|
1079
|
-
return o(
|
|
1080
|
-
}), [4, new Promise(function(
|
|
1081
|
-
return i =
|
|
1159
|
+
return p.trys.push([1, , 5, 7]), Promise.all(e.map(function(u) {
|
|
1160
|
+
return u.next();
|
|
1161
|
+
})).then(function(u) {
|
|
1162
|
+
return i(u);
|
|
1163
|
+
}, function(u) {
|
|
1164
|
+
return o(u);
|
|
1165
|
+
}), [4, new Promise(function(u) {
|
|
1166
|
+
return i = u;
|
|
1082
1167
|
})];
|
|
1083
1168
|
case 2:
|
|
1084
|
-
return
|
|
1169
|
+
return l = p.sent(), l === void 0 ? [
|
|
1085
1170
|
2
|
|
1086
1171
|
/*return*/
|
|
1087
|
-
] : (s =
|
|
1088
|
-
return
|
|
1089
|
-
}),
|
|
1090
|
-
return
|
|
1091
|
-
}) ? [2, s] : [4,
|
|
1172
|
+
] : (s = l.map(function(u) {
|
|
1173
|
+
return u.value;
|
|
1174
|
+
}), l.every(function(u) {
|
|
1175
|
+
return u.done;
|
|
1176
|
+
}) ? [2, s] : [4, r(s.slice())]);
|
|
1092
1177
|
case 3:
|
|
1093
|
-
return p.sent(), [4, Promise.all(e.map(function(
|
|
1178
|
+
return p.sent(), [4, Promise.all(e.map(function(u, d) {
|
|
1094
1179
|
return G(f, void 0, void 0, function() {
|
|
1095
1180
|
var h;
|
|
1096
|
-
return
|
|
1181
|
+
return j(this, function(y) {
|
|
1097
1182
|
switch (y.label) {
|
|
1098
1183
|
case 0:
|
|
1099
|
-
if (
|
|
1100
|
-
return [2,
|
|
1184
|
+
if (l[d].done)
|
|
1185
|
+
return [2, l[d].value];
|
|
1101
1186
|
y.label = 1;
|
|
1102
1187
|
case 1:
|
|
1103
|
-
return
|
|
1104
|
-
return a[d](
|
|
1105
|
-
}, function(
|
|
1106
|
-
return o(
|
|
1107
|
-
}), [4, new Promise(function(
|
|
1108
|
-
return a[d] =
|
|
1188
|
+
return c ? [3, 4] : (Promise.resolve(u.next()).then(function(b) {
|
|
1189
|
+
return a[d](b);
|
|
1190
|
+
}, function(b) {
|
|
1191
|
+
return o(b);
|
|
1192
|
+
}), [4, new Promise(function(b) {
|
|
1193
|
+
return a[d] = b;
|
|
1109
1194
|
})]);
|
|
1110
1195
|
case 2:
|
|
1111
|
-
return h = y.sent(), h === void 0 ? [2,
|
|
1196
|
+
return h = y.sent(), h === void 0 ? [2, l[d].value] : h.done ? [2, h.value] : (s[d] = h.value, [4, r(s.slice())]);
|
|
1112
1197
|
case 3:
|
|
1113
1198
|
return y.sent(), [3, 1];
|
|
1114
1199
|
case 4:
|
|
@@ -1123,8 +1208,8 @@ function Ie(t) {
|
|
|
1123
1208
|
case 4:
|
|
1124
1209
|
return [2, p.sent()];
|
|
1125
1210
|
case 5:
|
|
1126
|
-
return o(), [4, Promise.all(e.map(function(
|
|
1127
|
-
return
|
|
1211
|
+
return o(), [4, Promise.all(e.map(function(u) {
|
|
1212
|
+
return u.return && u.return();
|
|
1128
1213
|
}))];
|
|
1129
1214
|
case 6:
|
|
1130
1215
|
return p.sent(), [
|
|
@@ -1144,39 +1229,39 @@ function Ie(t) {
|
|
|
1144
1229
|
function Ae(t) {
|
|
1145
1230
|
return typeof t == "string" ? t : t.url;
|
|
1146
1231
|
}
|
|
1147
|
-
function
|
|
1148
|
-
const o = e[
|
|
1232
|
+
function Ue(t, n, e, r) {
|
|
1233
|
+
const o = e[n];
|
|
1149
1234
|
if (!(!o || !o.length))
|
|
1150
1235
|
try {
|
|
1151
|
-
n
|
|
1236
|
+
r[n] = t(r[n], o, !0, !1).newDocument;
|
|
1152
1237
|
} catch (i) {
|
|
1153
|
-
throw typeof i == "object" && i && "name" in i && typeof i.name == "string" && "message" in i && typeof i.message == "string" ? i.name === "TEST_OPERATION_FAILED" ? new Pe(i.message) : new
|
|
1238
|
+
throw typeof i == "object" && i && "name" in i && typeof i.name == "string" && "message" in i && typeof i.message == "string" ? i.name === "TEST_OPERATION_FAILED" ? new Pe(i.message) : new je(i.name + ": " + i.message) : i;
|
|
1154
1239
|
}
|
|
1155
1240
|
}
|
|
1156
|
-
function
|
|
1241
|
+
function Be(t, n) {
|
|
1157
1242
|
try {
|
|
1158
|
-
return t.compile(
|
|
1243
|
+
return t.compile(n);
|
|
1159
1244
|
} catch (e) {
|
|
1160
1245
|
throw new ge(
|
|
1161
1246
|
e instanceof Error ? e.message : void 0
|
|
1162
1247
|
);
|
|
1163
1248
|
}
|
|
1164
1249
|
}
|
|
1165
|
-
function
|
|
1250
|
+
function Ne(t, n, e) {
|
|
1166
1251
|
t.actor !== (e == null ? void 0 : e.actor) && (t.allowed = t.allowed && e ? [e.actor] : void 0, t.channels = t.channels.filter(
|
|
1167
|
-
(
|
|
1252
|
+
(r) => n.includes(r)
|
|
1168
1253
|
));
|
|
1169
1254
|
}
|
|
1170
|
-
function
|
|
1171
|
-
return t.allowed === void 0 || t.allowed === null || !!(
|
|
1255
|
+
function Me(t, n) {
|
|
1256
|
+
return t.allowed === void 0 || t.allowed === null || !!(n != null && n.actor) && (t.actor === n.actor || t.allowed.includes(n.actor));
|
|
1172
1257
|
}
|
|
1173
|
-
class
|
|
1258
|
+
class Ve extends be {
|
|
1174
1259
|
/**
|
|
1175
1260
|
* Wraps a Graffiti API instance to provide the synchronize methods.
|
|
1176
1261
|
* The GraffitiSyncrhonize class rather than the Graffiti class
|
|
1177
1262
|
* must be used for all functions for the synchronize methods to work.
|
|
1178
1263
|
*/
|
|
1179
|
-
constructor(e,
|
|
1264
|
+
constructor(e, r) {
|
|
1180
1265
|
super();
|
|
1181
1266
|
v(this, "ajv_");
|
|
1182
1267
|
v(this, "applyPatch_");
|
|
@@ -1188,12 +1273,12 @@ class Ce extends we {
|
|
|
1188
1273
|
v(this, "logout");
|
|
1189
1274
|
v(this, "sessionEvents");
|
|
1190
1275
|
v(this, "get", async (...e) => {
|
|
1191
|
-
const
|
|
1192
|
-
return this.synchronizeDispatch({ object:
|
|
1276
|
+
const r = await this.graffiti.get(...e);
|
|
1277
|
+
return this.synchronizeDispatch({ object: r }), r;
|
|
1193
1278
|
});
|
|
1194
1279
|
v(this, "put", async (...e) => {
|
|
1195
|
-
const
|
|
1196
|
-
...
|
|
1280
|
+
const r = await this.graffiti.put(...e), o = e[0], i = {
|
|
1281
|
+
...r,
|
|
1197
1282
|
value: o.value,
|
|
1198
1283
|
channels: o.channels,
|
|
1199
1284
|
allowed: o.allowed
|
|
@@ -1201,54 +1286,54 @@ class Ce extends we {
|
|
|
1201
1286
|
return await this.synchronizeDispatch(
|
|
1202
1287
|
{
|
|
1203
1288
|
tombstone: !0,
|
|
1204
|
-
object:
|
|
1289
|
+
object: r
|
|
1205
1290
|
},
|
|
1206
1291
|
{
|
|
1207
1292
|
object: i
|
|
1208
1293
|
},
|
|
1209
1294
|
!0
|
|
1210
|
-
),
|
|
1295
|
+
), r;
|
|
1211
1296
|
});
|
|
1212
1297
|
v(this, "patch", async (...e) => {
|
|
1213
|
-
const
|
|
1298
|
+
const r = await this.graffiti.patch(...e), o = { ...r };
|
|
1214
1299
|
for (const i of ["value", "channels", "allowed"])
|
|
1215
|
-
|
|
1300
|
+
Ue(await this.applyPatch, i, e[0], o);
|
|
1216
1301
|
return await this.synchronizeDispatch(
|
|
1217
1302
|
{
|
|
1218
1303
|
tombstone: !0,
|
|
1219
|
-
object:
|
|
1304
|
+
object: r
|
|
1220
1305
|
},
|
|
1221
1306
|
{
|
|
1222
1307
|
object: o
|
|
1223
1308
|
},
|
|
1224
1309
|
!0
|
|
1225
|
-
),
|
|
1310
|
+
), r;
|
|
1226
1311
|
});
|
|
1227
1312
|
v(this, "delete", async (...e) => {
|
|
1228
|
-
const
|
|
1313
|
+
const r = await this.graffiti.delete(...e);
|
|
1229
1314
|
return await this.synchronizeDispatch(
|
|
1230
1315
|
{
|
|
1231
1316
|
tombstone: !0,
|
|
1232
|
-
object:
|
|
1317
|
+
object: r
|
|
1233
1318
|
},
|
|
1234
1319
|
void 0,
|
|
1235
1320
|
!0
|
|
1236
|
-
),
|
|
1321
|
+
), r;
|
|
1237
1322
|
});
|
|
1238
1323
|
v(this, "discover", (...e) => {
|
|
1239
|
-
const
|
|
1240
|
-
return this.objectStream(
|
|
1324
|
+
const r = this.graffiti.discover(...e);
|
|
1325
|
+
return this.objectStream(r);
|
|
1241
1326
|
});
|
|
1242
1327
|
v(this, "recoverOrphans", (...e) => {
|
|
1243
|
-
const
|
|
1244
|
-
return this.objectStream(
|
|
1328
|
+
const r = this.graffiti.recoverOrphans(...e);
|
|
1329
|
+
return this.objectStream(r);
|
|
1245
1330
|
});
|
|
1246
1331
|
v(this, "continueObjectStream", (...e) => this.graffiti.continueObjectStream(...e));
|
|
1247
|
-
this.options =
|
|
1332
|
+
this.options = r ?? {}, this.graffiti = e, this.channelStats = e.channelStats.bind(e), this.login = e.login.bind(e), this.logout = e.logout.bind(e), this.sessionEvents = e.sessionEvents;
|
|
1248
1333
|
}
|
|
1249
1334
|
get ajv() {
|
|
1250
1335
|
return this.ajv_ || (this.ajv_ = (async () => {
|
|
1251
|
-
const { default: e } = await import("./ajv-C30pimY5.mjs").then((
|
|
1336
|
+
const { default: e } = await import("./ajv-C30pimY5.mjs").then((r) => r.a);
|
|
1252
1337
|
return new e({ strict: !1 });
|
|
1253
1338
|
})()), this.ajv_;
|
|
1254
1339
|
}
|
|
@@ -1258,18 +1343,18 @@ class Ce extends we {
|
|
|
1258
1343
|
return e;
|
|
1259
1344
|
})()), this.applyPatch_;
|
|
1260
1345
|
}
|
|
1261
|
-
synchronize(e,
|
|
1346
|
+
synchronize(e, r, o, i) {
|
|
1262
1347
|
const a = /* @__PURE__ */ new Set();
|
|
1263
|
-
return new
|
|
1264
|
-
async (
|
|
1265
|
-
const f =
|
|
1266
|
-
for (const h of [d,
|
|
1348
|
+
return new R(
|
|
1349
|
+
async (l, s) => {
|
|
1350
|
+
const f = Be(await this.ajv, o), p = (u, d) => {
|
|
1351
|
+
for (const h of [d, u])
|
|
1267
1352
|
if (h != null && h.tombstone)
|
|
1268
|
-
a.has(h.object.url) &&
|
|
1269
|
-
else if (h && e(h.object) && (this.options.omniscient ||
|
|
1353
|
+
a.has(h.object.url) && l(h);
|
|
1354
|
+
else if (h && e(h.object) && (this.options.omniscient || Me(h.object, i))) {
|
|
1270
1355
|
const y = { ...h.object };
|
|
1271
|
-
if (this.options.omniscient ||
|
|
1272
|
-
|
|
1356
|
+
if (this.options.omniscient || Ne(y, r, i), f(y)) {
|
|
1357
|
+
l({ object: y }), a.add(y.url);
|
|
1273
1358
|
break;
|
|
1274
1359
|
}
|
|
1275
1360
|
}
|
|
@@ -1292,11 +1377,11 @@ class Ce extends we {
|
|
|
1292
1377
|
* @group Synchronize Methods
|
|
1293
1378
|
*/
|
|
1294
1379
|
synchronizeDiscover(...e) {
|
|
1295
|
-
const [
|
|
1296
|
-
function a(
|
|
1297
|
-
return
|
|
1380
|
+
const [r, o, i] = e;
|
|
1381
|
+
function a(c) {
|
|
1382
|
+
return c.channels.some((l) => r.includes(l));
|
|
1298
1383
|
}
|
|
1299
|
-
return this.synchronize(a,
|
|
1384
|
+
return this.synchronize(a, r, o, i);
|
|
1300
1385
|
}
|
|
1301
1386
|
/**
|
|
1302
1387
|
* This method has the same signature as {@link get} but
|
|
@@ -1311,11 +1396,11 @@ class Ce extends we {
|
|
|
1311
1396
|
* @group Synchronize Methods
|
|
1312
1397
|
*/
|
|
1313
1398
|
synchronizeGet(...e) {
|
|
1314
|
-
const [
|
|
1315
|
-
function l
|
|
1316
|
-
return
|
|
1399
|
+
const [r, o, i] = e, a = Ae(r);
|
|
1400
|
+
function c(l) {
|
|
1401
|
+
return l.url === a;
|
|
1317
1402
|
}
|
|
1318
|
-
return this.synchronize(
|
|
1403
|
+
return this.synchronize(c, [], o, i);
|
|
1319
1404
|
}
|
|
1320
1405
|
/**
|
|
1321
1406
|
* This method has the same signature as {@link recoverOrphans} but
|
|
@@ -1331,11 +1416,11 @@ class Ce extends we {
|
|
|
1331
1416
|
* @group Synchronize Methods
|
|
1332
1417
|
*/
|
|
1333
1418
|
synchronizeRecoverOrphans(...e) {
|
|
1334
|
-
const [
|
|
1419
|
+
const [r, o] = e;
|
|
1335
1420
|
function i(a) {
|
|
1336
1421
|
return a.actor === o.actor && a.channels.length === 0;
|
|
1337
1422
|
}
|
|
1338
|
-
return this.synchronize(i, [],
|
|
1423
|
+
return this.synchronize(i, [], r, o);
|
|
1339
1424
|
}
|
|
1340
1425
|
/**
|
|
1341
1426
|
* Streams changes made to *any* object in *any* channel
|
|
@@ -1347,37 +1432,37 @@ class Ce extends we {
|
|
|
1347
1432
|
* Be careful using this method. Without additional filters it can
|
|
1348
1433
|
* expose the user to content out of context.
|
|
1349
1434
|
*/
|
|
1350
|
-
synchronizeAll(e,
|
|
1351
|
-
return this.synchronize(() => !0, [], e,
|
|
1435
|
+
synchronizeAll(e, r) {
|
|
1436
|
+
return this.synchronize(() => !0, [], e, r);
|
|
1352
1437
|
}
|
|
1353
|
-
async synchronizeDispatch(e,
|
|
1438
|
+
async synchronizeDispatch(e, r, o = !1) {
|
|
1354
1439
|
for (const i of this.callbacks)
|
|
1355
|
-
i(e,
|
|
1440
|
+
i(e, r);
|
|
1356
1441
|
o && await new Promise((i) => setTimeout(i, 0));
|
|
1357
1442
|
}
|
|
1358
1443
|
objectStreamContinue(e) {
|
|
1359
|
-
const
|
|
1444
|
+
const r = this;
|
|
1360
1445
|
return async function* () {
|
|
1361
1446
|
for (; ; ) {
|
|
1362
1447
|
const o = await e.next();
|
|
1363
1448
|
if (o.done) {
|
|
1364
1449
|
const { continue: i, cursor: a } = o.value;
|
|
1365
1450
|
return {
|
|
1366
|
-
continue: () =>
|
|
1451
|
+
continue: () => r.objectStreamContinue(i()),
|
|
1367
1452
|
cursor: a
|
|
1368
1453
|
};
|
|
1369
1454
|
}
|
|
1370
|
-
o.value.error ||
|
|
1455
|
+
o.value.error || r.synchronizeDispatch(
|
|
1371
1456
|
o.value
|
|
1372
1457
|
), yield o.value;
|
|
1373
1458
|
}
|
|
1374
1459
|
}();
|
|
1375
1460
|
}
|
|
1376
1461
|
objectStream(e) {
|
|
1377
|
-
const
|
|
1462
|
+
const r = this.objectStreamContinue(e);
|
|
1378
1463
|
return async function* () {
|
|
1379
1464
|
for (; ; ) {
|
|
1380
|
-
const o = await
|
|
1465
|
+
const o = await r.next();
|
|
1381
1466
|
if (o.done) return o.value;
|
|
1382
1467
|
(o.value.error || !o.value.tombstone) && (yield o.value);
|
|
1383
1468
|
}
|
|
@@ -1385,29 +1470,29 @@ class Ce extends we {
|
|
|
1385
1470
|
}
|
|
1386
1471
|
}
|
|
1387
1472
|
const We = {
|
|
1388
|
-
install(t,
|
|
1389
|
-
const e =
|
|
1390
|
-
|
|
1473
|
+
install(t, n) {
|
|
1474
|
+
const e = n.graffiti, r = new Ve(e), o = U(void 0);
|
|
1475
|
+
r.sessionEvents.addEventListener("initialized", async (i) => {
|
|
1391
1476
|
const a = i.detail;
|
|
1392
1477
|
if (a && a.error && console.error(a.error), a && a.href) {
|
|
1393
|
-
const
|
|
1394
|
-
if (
|
|
1395
|
-
const
|
|
1396
|
-
s.pathname.startsWith(
|
|
1478
|
+
const c = t.config.globalProperties.$router;
|
|
1479
|
+
if (c) {
|
|
1480
|
+
const l = c.options.history.base, s = new URL(a.href);
|
|
1481
|
+
s.pathname.startsWith(l) && (s.pathname = s.pathname.slice(l.length)), await c.replace(s.pathname + s.search + s.hash);
|
|
1397
1482
|
}
|
|
1398
1483
|
}
|
|
1399
1484
|
o.value || (o.value = null);
|
|
1400
|
-
}),
|
|
1485
|
+
}), r.sessionEvents.addEventListener("login", (i) => {
|
|
1401
1486
|
const a = i.detail;
|
|
1402
1487
|
if (a.error) {
|
|
1403
1488
|
console.error("Error logging in:"), console.error(a.error);
|
|
1404
1489
|
return;
|
|
1405
1490
|
} else
|
|
1406
1491
|
o.value = a.session;
|
|
1407
|
-
}),
|
|
1492
|
+
}), r.sessionEvents.addEventListener("logout", (i) => {
|
|
1408
1493
|
const a = i.detail;
|
|
1409
1494
|
a.error ? (console.error("Error logging out:"), console.error(a.error)) : o.value = null;
|
|
1410
|
-
}), t.provide(Y,
|
|
1495
|
+
}), t.provide(Y, r), t.provide(Z, o), t.component("GraffitiDiscover", ce), t.component("GraffitiGet", le), t.component("GraffitiRecoverOrphans", fe), t.config.globalProperties.$graffiti = r, t.config.globalProperties.$graffitiSession = o;
|
|
1411
1496
|
}
|
|
1412
1497
|
}, Je = ce, Ke = le, He = fe;
|
|
1413
1498
|
export {
|
|
@@ -1420,6 +1505,6 @@ export {
|
|
|
1420
1505
|
Se as useGraffitiGet,
|
|
1421
1506
|
Ge as useGraffitiRecoverOrphans,
|
|
1422
1507
|
ee as useGraffitiSession,
|
|
1423
|
-
|
|
1508
|
+
B as useGraffitiSynchronize
|
|
1424
1509
|
};
|
|
1425
1510
|
//# sourceMappingURL=plugin.mjs.map
|