@raphy-js/raph 1.0.0-dev.2
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/LICENSE +202 -0
- package/ReadMe.md +153 -0
- package/dist/api/Raph.d.ts +228 -0
- package/dist/api/errors.d.ts +20 -0
- package/dist/api/public.d.ts +22 -0
- package/dist/api/types.d.ts +25 -0
- package/dist/debug/api/Raph.cjs +1 -0
- package/dist/debug/api/Raph.js +419 -0
- package/dist/debug/api/errors.cjs +1 -0
- package/dist/debug/api/errors.js +14 -0
- package/dist/debug/api/public.cjs +1 -0
- package/dist/debug/api/public.js +40 -0
- package/dist/debug/api/types.cjs +1 -0
- package/dist/debug/api/types.js +1 -0
- package/dist/debug/path/AdapterPathStore.cjs +1 -0
- package/dist/debug/path/AdapterPathStore.js +133 -0
- package/dist/debug/path/DerivedRegistry.cjs +1 -0
- package/dist/debug/path/DerivedRegistry.js +157 -0
- package/dist/debug/path/MetaController.cjs +1 -0
- package/dist/debug/path/MetaController.js +214 -0
- package/dist/debug/path/PathEventHub.cjs +1 -0
- package/dist/debug/path/PathEventHub.js +148 -0
- package/dist/debug/path/PathStore.cjs +1 -0
- package/dist/debug/path/PathStore.js +326 -0
- package/dist/debug/path/RaphDerivedHandle.cjs +1 -0
- package/dist/debug/path/RaphDerivedHandle.js +125 -0
- package/dist/debug/path/RaphKernel.cjs +1 -0
- package/dist/debug/path/RaphKernel.js +636 -0
- package/dist/debug/path/RaphMeta.cjs +1 -0
- package/dist/debug/path/RaphMeta.js +68 -0
- package/dist/debug/path/RaphMetaStore.cjs +1 -0
- package/dist/debug/path/RaphMetaStore.js +184 -0
- package/dist/debug/path/data-adapter.cjs +1 -0
- package/dist/debug/path/data-adapter.js +356 -0
- package/dist/debug/path/data-draft.cjs +1 -0
- package/dist/debug/path/data-draft.js +71 -0
- package/dist/debug/path/data-path.cjs +1 -0
- package/dist/debug/path/data-path.js +423 -0
- package/dist/debug/path/derived-collection.cjs +1 -0
- package/dist/debug/path/derived-collection.js +179 -0
- package/dist/debug/path/derived-strategies.cjs +1 -0
- package/dist/debug/path/derived-strategies.js +20 -0
- package/dist/debug/path/meta.types.cjs +1 -0
- package/dist/debug/path/meta.types.js +1 -0
- package/dist/debug/path/path-router.cjs +1 -0
- package/dist/debug/path/path-router.js +86 -0
- package/dist/debug/path/path.types.cjs +1 -0
- package/dist/debug/path/path.types.js +1 -0
- package/dist/debug/path/public.cjs +1 -0
- package/dist/debug/path/public.js +18 -0
- package/dist/debug/path/segment-key.cjs +1 -0
- package/dist/debug/path/segment-key.js +12 -0
- package/dist/debug/reactivity/engine.cjs +1 -0
- package/dist/debug/reactivity/engine.js +1133 -0
- package/dist/debug/reactivity/scope.cjs +1 -0
- package/dist/debug/reactivity/scope.js +274 -0
- package/dist/debug/reactivity/types.cjs +1 -0
- package/dist/debug/reactivity/types.js +1 -0
- package/dist/debug/reactivity/watch.cjs +1 -0
- package/dist/debug/reactivity/watch.js +64 -0
- package/dist/debug/runtime/PathHandle.cjs +1 -0
- package/dist/debug/runtime/PathHandle.js +139 -0
- package/dist/debug/runtime/RaphDebug.cjs +1 -0
- package/dist/debug/runtime/RaphDebug.js +15 -0
- package/dist/debug/runtime/RaphFrameLoop.cjs +1 -0
- package/dist/debug/runtime/RaphFrameLoop.js +106 -0
- package/dist/debug/runtime/RaphNode.cjs +1 -0
- package/dist/debug/runtime/RaphNode.js +143 -0
- package/dist/debug/runtime/RaphPhasePipeline.cjs +1 -0
- package/dist/debug/runtime/RaphPhasePipeline.js +526 -0
- package/dist/debug/runtime/RaphRuntime.cjs +1 -0
- package/dist/debug/runtime/RaphRuntime.js +700 -0
- package/dist/debug/runtime/RaphScope.cjs +1 -0
- package/dist/debug/runtime/RaphScope.js +64 -0
- package/dist/debug/runtime/RuntimeReactivity.cjs +1 -0
- package/dist/debug/runtime/RuntimeReactivity.js +154 -0
- package/dist/debug/runtime/RuntimeWatch.cjs +1 -0
- package/dist/debug/runtime/RuntimeWatch.js +71 -0
- package/dist/debug/runtime/disposal.cjs +1 -0
- package/dist/debug/runtime/disposal.js +9 -0
- package/dist/debug/runtime/errors.cjs +1 -0
- package/dist/debug/runtime/errors.js +12 -0
- package/dist/debug/runtime/parent-graph.cjs +1 -0
- package/dist/debug/runtime/parent-graph.js +10 -0
- package/dist/debug/runtime/phase.types.cjs +1 -0
- package/dist/debug/runtime/phase.types.js +8 -0
- package/dist/debug/runtime/public.cjs +1 -0
- package/dist/debug/runtime/public.js +18 -0
- package/dist/debug/runtime/runtime-reactivity.types.cjs +1 -0
- package/dist/debug/runtime/runtime-reactivity.types.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +40 -0
- package/dist/path/AdapterPathStore.d.ts +45 -0
- package/dist/path/DerivedRegistry.d.ts +67 -0
- package/dist/path/MetaController.d.ts +85 -0
- package/dist/path/PathEventHub.d.ts +48 -0
- package/dist/path/PathStore.d.ts +51 -0
- package/dist/path/RaphDerivedHandle.d.ts +97 -0
- package/dist/path/RaphKernel.d.ts +166 -0
- package/dist/path/RaphMeta.d.ts +45 -0
- package/dist/path/RaphMetaStore.d.ts +45 -0
- package/dist/path/data-adapter.d.ts +78 -0
- package/dist/path/data-draft.d.ts +4 -0
- package/dist/path/data-path.d.ts +97 -0
- package/dist/path/derived-collection.d.ts +30 -0
- package/dist/path/derived-strategies.d.ts +15 -0
- package/dist/path/meta.types.d.ts +33 -0
- package/dist/path/path-router.d.ts +21 -0
- package/dist/path/path.types.d.ts +26 -0
- package/dist/path/public.d.ts +14 -0
- package/dist/path/segment-key.d.ts +2 -0
- package/dist/path.cjs +1 -0
- package/dist/path.js +18 -0
- package/dist/raph.cjs +1 -0
- package/dist/raph.js +40 -0
- package/dist/reactivity/engine.d.ts +379 -0
- package/dist/reactivity/scope.d.ts +146 -0
- package/dist/reactivity/types.d.ts +150 -0
- package/dist/reactivity/watch.d.ts +15 -0
- package/dist/reactivity.cjs +1 -0
- package/dist/reactivity.js +14 -0
- package/dist/runtime/PathHandle.d.ts +72 -0
- package/dist/runtime/RaphDebug.d.ts +32 -0
- package/dist/runtime/RaphFrameLoop.d.ts +51 -0
- package/dist/runtime/RaphNode.d.ts +68 -0
- package/dist/runtime/RaphPhasePipeline.d.ts +133 -0
- package/dist/runtime/RaphRuntime.d.ts +285 -0
- package/dist/runtime/RaphScope.d.ts +50 -0
- package/dist/runtime/RuntimeReactivity.d.ts +40 -0
- package/dist/runtime/RuntimeWatch.d.ts +28 -0
- package/dist/runtime/disposal.d.ts +1 -0
- package/dist/runtime/errors.d.ts +16 -0
- package/dist/runtime/parent-graph.d.ts +5 -0
- package/dist/runtime/phase.types.d.ts +49 -0
- package/dist/runtime/public.d.ts +13 -0
- package/dist/runtime/runtime-reactivity.types.d.ts +9 -0
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.js +18 -0
- package/package.json +109 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var A = (n, e, t) => e in n ? S(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var u = (n, e, t) => A(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
let m, w;
|
|
5
|
+
const o = class o {
|
|
6
|
+
/**
|
|
7
|
+
* Сохраняет уже разобранный immutable path value.
|
|
8
|
+
*/
|
|
9
|
+
constructor(e, t) {
|
|
10
|
+
// Хранят canonical value и разобранные сегменты пути.
|
|
11
|
+
u(this, "_canonical");
|
|
12
|
+
u(this, "_segments");
|
|
13
|
+
// Кешируют проверенные exact и mask представления.
|
|
14
|
+
u(this, "_exact");
|
|
15
|
+
u(this, "_mask");
|
|
16
|
+
this._canonical = e, this._segments = Object.freeze(
|
|
17
|
+
t.map((r) => Object.freeze({ ...r }))
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Нормализует поддерживаемое определение пути в DataPath.
|
|
22
|
+
*/
|
|
23
|
+
static from(e, t) {
|
|
24
|
+
return e instanceof o ? e : typeof e == "string" ? this.fromString(e, t) : this.fromPlain(e);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Разбирает строковый path согласно строгой грамматике.
|
|
28
|
+
*/
|
|
29
|
+
static fromString(e, t) {
|
|
30
|
+
const r = x(
|
|
31
|
+
e,
|
|
32
|
+
t == null ? void 0 : t.vars,
|
|
33
|
+
!0,
|
|
34
|
+
(t == null ? void 0 : t.wildcardDynamic) === !0,
|
|
35
|
+
!0
|
|
36
|
+
), i = this._cache ?? (this._cache = /* @__PURE__ */ new Map()), s = i.get(r.canonical);
|
|
37
|
+
if (s !== void 0)
|
|
38
|
+
return s;
|
|
39
|
+
i.size >= 2e4 && i.clear();
|
|
40
|
+
const c = new o(r.canonical, r.segments);
|
|
41
|
+
return i.set(r.canonical, c), c;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Восстанавливает DataPath из сериализованного представления.
|
|
45
|
+
*/
|
|
46
|
+
static fromPlain(e) {
|
|
47
|
+
const r = (Array.isArray(e.segs) ? e.segs : []).map(j);
|
|
48
|
+
return new o(_(r), r);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Сериализует path в независимое plain-представление.
|
|
52
|
+
*/
|
|
53
|
+
toPlain() {
|
|
54
|
+
return {
|
|
55
|
+
segs: this._segments.map((e) => e.kind === "key" ? { t: "key", k: e.key } : e.kind === "index" ? { t: "idx", i: e.index } : e.kind === "selector" ? { t: "param", pk: e.key, pv: e.value } : { t: "wc", indexed: e.indexed }),
|
|
56
|
+
deepOnTail: v(this._segments)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Возвращает canonical строковое представление пути.
|
|
61
|
+
*/
|
|
62
|
+
toStringPath() {
|
|
63
|
+
return this._canonical;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Возвращает canonical строковое представление пути.
|
|
67
|
+
*/
|
|
68
|
+
toString() {
|
|
69
|
+
return this._canonical;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Возвращает immutable список сегментов пути.
|
|
73
|
+
*/
|
|
74
|
+
segments() {
|
|
75
|
+
return this._segments;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Проверяет соответствие exact path указанной маске.
|
|
79
|
+
*/
|
|
80
|
+
static match(e, t) {
|
|
81
|
+
const r = this.from(e)._segments, i = this.from(t)._segments;
|
|
82
|
+
let s = 0;
|
|
83
|
+
for (; s < r.length; s++) {
|
|
84
|
+
const c = r[s];
|
|
85
|
+
if (c.kind === "wildcard" && !c.indexed && s === r.length - 1)
|
|
86
|
+
return !0;
|
|
87
|
+
const a = i[s];
|
|
88
|
+
if (a === void 0 || !H(c, a))
|
|
89
|
+
return !1;
|
|
90
|
+
}
|
|
91
|
+
return s === i.length;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Возвращает exact path либо отклоняет wildcard-сегменты.
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
_asExact() {
|
|
98
|
+
for (const e of this._segments)
|
|
99
|
+
if (e.kind === "wildcard")
|
|
100
|
+
throw b(this._canonical);
|
|
101
|
+
return this._exact ?? (this._exact = {
|
|
102
|
+
canonical: this._canonical,
|
|
103
|
+
segments: this._segments
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Возвращает path mask с проверкой позиции wildcard.
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
_asMask() {
|
|
111
|
+
for (let t = 0; t < this._segments.length - 1; t++) {
|
|
112
|
+
const r = this._segments[t];
|
|
113
|
+
if (r.kind === "wildcard" && !r.indexed)
|
|
114
|
+
throw new TypeError(
|
|
115
|
+
`[Raph] Dot wildcard must be the final mask segment: "${this._canonical}".`
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
const e = v(this._segments);
|
|
119
|
+
return this._mask ?? (this._mask = {
|
|
120
|
+
canonical: this._canonical,
|
|
121
|
+
deep: e,
|
|
122
|
+
segments: e ? this._segments.slice(0, -1) : this._segments
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
// Переиспользует immutable экземпляры для одинаковых canonical paths.
|
|
127
|
+
u(o, "_cache");
|
|
128
|
+
let h = o;
|
|
129
|
+
function q(n, e) {
|
|
130
|
+
if (!(e != null && e.vars)) {
|
|
131
|
+
const i = m == null ? void 0 : m.get(n);
|
|
132
|
+
if (i !== void 0)
|
|
133
|
+
return i;
|
|
134
|
+
}
|
|
135
|
+
if (typeof n != "string")
|
|
136
|
+
return M(n, e);
|
|
137
|
+
const t = x(n, e == null ? void 0 : e.vars, !1, !1, !0), r = {
|
|
138
|
+
canonical: t.canonical,
|
|
139
|
+
segments: t.segments
|
|
140
|
+
};
|
|
141
|
+
if (!(e != null && e.vars)) {
|
|
142
|
+
const i = m ?? (m = /* @__PURE__ */ new Map());
|
|
143
|
+
i.size >= 2e4 && i.clear(), i.set(n, r);
|
|
144
|
+
}
|
|
145
|
+
return r;
|
|
146
|
+
}
|
|
147
|
+
function V(n) {
|
|
148
|
+
const e = w == null ? void 0 : w.get(n);
|
|
149
|
+
if (e !== void 0)
|
|
150
|
+
return e;
|
|
151
|
+
if (typeof n != "string")
|
|
152
|
+
return P(n);
|
|
153
|
+
const t = x(n, void 0, !0, !1, !0);
|
|
154
|
+
for (let a = 0; a < t.segments.length - 1; a++) {
|
|
155
|
+
const l = t.segments[a];
|
|
156
|
+
if (l.kind === "wildcard" && !l.indexed)
|
|
157
|
+
throw new TypeError(
|
|
158
|
+
`[Raph] Dot wildcard must be the final mask segment: "${n}".`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
const r = t.segments[t.segments.length - 1], i = (r == null ? void 0 : r.kind) === "wildcard" && !r.indexed, s = {
|
|
162
|
+
canonical: t.canonical,
|
|
163
|
+
deep: i,
|
|
164
|
+
segments: i ? t.segments.slice(0, -1) : t.segments
|
|
165
|
+
}, c = w ?? (w = /* @__PURE__ */ new Map());
|
|
166
|
+
return c.size >= 2e4 && c.clear(), c.set(n, s), s;
|
|
167
|
+
}
|
|
168
|
+
function M(n, e) {
|
|
169
|
+
const t = h.from(n, e)._asExact();
|
|
170
|
+
if (n instanceof h && !(e != null && e.vars)) {
|
|
171
|
+
const r = m ?? (m = /* @__PURE__ */ new Map());
|
|
172
|
+
r.size >= 2e4 && r.clear(), r.set(n, t);
|
|
173
|
+
}
|
|
174
|
+
return t;
|
|
175
|
+
}
|
|
176
|
+
function P(n) {
|
|
177
|
+
const e = h.from(n)._asMask();
|
|
178
|
+
if (n instanceof h) {
|
|
179
|
+
const t = w ?? (w = /* @__PURE__ */ new Map());
|
|
180
|
+
t.size >= 2e4 && t.clear(), t.set(n, e);
|
|
181
|
+
}
|
|
182
|
+
return e;
|
|
183
|
+
}
|
|
184
|
+
function F(n) {
|
|
185
|
+
if (n.segments.length === 0)
|
|
186
|
+
return ["*"];
|
|
187
|
+
const e = [`${n.canonical}.*`];
|
|
188
|
+
for (let t = 1; t < n.segments.length; t++)
|
|
189
|
+
e.push(_(n.segments.slice(0, t)));
|
|
190
|
+
return e;
|
|
191
|
+
}
|
|
192
|
+
function x(n, e, t, r = !1, i = !1) {
|
|
193
|
+
const s = n.trim();
|
|
194
|
+
if (s.length === 0) {
|
|
195
|
+
if (i)
|
|
196
|
+
return { canonical: "", segments: [] };
|
|
197
|
+
throw new TypeError("[Raph] Data path must not be empty.");
|
|
198
|
+
}
|
|
199
|
+
const c = [];
|
|
200
|
+
let a = 0, l = !0;
|
|
201
|
+
for (; a < s.length; ) {
|
|
202
|
+
const k = s[a];
|
|
203
|
+
if (k === ".") {
|
|
204
|
+
if (l)
|
|
205
|
+
throw f(n);
|
|
206
|
+
l = !0, a++;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
if (k === "[") {
|
|
210
|
+
const $ = T(s, a);
|
|
211
|
+
c.push(I(
|
|
212
|
+
s.slice(a + 1, $),
|
|
213
|
+
e,
|
|
214
|
+
t,
|
|
215
|
+
r
|
|
216
|
+
)), a = $ + 1, l = !1;
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (!l)
|
|
220
|
+
throw f(n);
|
|
221
|
+
let d = a;
|
|
222
|
+
for (; d < s.length && s[d] !== "." && s[d] !== "["; )
|
|
223
|
+
d++;
|
|
224
|
+
const g = s.slice(a, d).trim();
|
|
225
|
+
if (g.length === 0)
|
|
226
|
+
throw f(n);
|
|
227
|
+
if (g === "*") {
|
|
228
|
+
if (!t)
|
|
229
|
+
throw b(n);
|
|
230
|
+
c.push({ kind: "wildcard", indexed: !1 });
|
|
231
|
+
} else r && g.startsWith("$") && !y(g.slice(1), e) ? c.push({ kind: "wildcard", indexed: !1 }) : c.push({ kind: "key", key: N(g, e) });
|
|
232
|
+
a = d, l = !1;
|
|
233
|
+
}
|
|
234
|
+
if (l || c.length === 0)
|
|
235
|
+
throw f(n);
|
|
236
|
+
return { canonical: _(c), segments: c };
|
|
237
|
+
}
|
|
238
|
+
function T(n, e) {
|
|
239
|
+
let t, r = 1;
|
|
240
|
+
for (let i = e + 1; i < n.length; i++) {
|
|
241
|
+
const s = n[i];
|
|
242
|
+
if (s === "\\") {
|
|
243
|
+
i++;
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if (t !== void 0) {
|
|
247
|
+
s === t && (t = void 0);
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
if (s === '"' || s === "'") {
|
|
251
|
+
t = s;
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
if (s === "[") {
|
|
255
|
+
r++;
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
if (s === "]" && --r === 0)
|
|
259
|
+
return i;
|
|
260
|
+
}
|
|
261
|
+
throw f(n);
|
|
262
|
+
}
|
|
263
|
+
function I(n, e, t, r) {
|
|
264
|
+
const i = n.trim();
|
|
265
|
+
if (i === "*") {
|
|
266
|
+
if (!t)
|
|
267
|
+
throw b(`[${n}]`);
|
|
268
|
+
return { kind: "wildcard", indexed: !0 };
|
|
269
|
+
}
|
|
270
|
+
if (/^\d+$/.test(i))
|
|
271
|
+
return { kind: "index", index: Number(i) };
|
|
272
|
+
if (/^\$[A-Z_$][\w$]*$/i.test(i)) {
|
|
273
|
+
if (r && !y(i.slice(1), e))
|
|
274
|
+
return { kind: "wildcard", indexed: !0 };
|
|
275
|
+
const l = p(i.slice(1), e);
|
|
276
|
+
if (!Number.isInteger(l) || l < 0)
|
|
277
|
+
throw new TypeError(`[Raph] Index variable "${i}" must be a non-negative integer.`);
|
|
278
|
+
return { kind: "index", index: l };
|
|
279
|
+
}
|
|
280
|
+
const s = R(i);
|
|
281
|
+
if (s === -1)
|
|
282
|
+
throw f(`[${n}]`);
|
|
283
|
+
const c = i.slice(0, s).trim(), a = i.slice(s + 1).trim();
|
|
284
|
+
if (!c || !a)
|
|
285
|
+
throw f(`[${n}]`);
|
|
286
|
+
return r && Z(a, e) ? { kind: "wildcard", indexed: !0 } : {
|
|
287
|
+
kind: "selector",
|
|
288
|
+
key: c,
|
|
289
|
+
value: C(a, e)
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function R(n) {
|
|
293
|
+
let e;
|
|
294
|
+
for (let t = 0; t < n.length; t++) {
|
|
295
|
+
const r = n[t];
|
|
296
|
+
if (r === "\\") {
|
|
297
|
+
t++;
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
if (e !== void 0) {
|
|
301
|
+
r === e && (e = void 0);
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
if (r === '"' || r === "'")
|
|
305
|
+
e = r;
|
|
306
|
+
else if (r === "=")
|
|
307
|
+
return t;
|
|
308
|
+
}
|
|
309
|
+
return -1;
|
|
310
|
+
}
|
|
311
|
+
function C(n, e) {
|
|
312
|
+
if (/^\$[A-Z_$][\w$]*$/i.test(n)) {
|
|
313
|
+
const t = p(n.slice(1), e);
|
|
314
|
+
if (t === null || typeof t == "string" || typeof t == "boolean" || typeof t == "number" && Number.isFinite(t))
|
|
315
|
+
return t;
|
|
316
|
+
throw new TypeError(`[Raph] Selector variable "${n}" must be scalar.`);
|
|
317
|
+
}
|
|
318
|
+
if (n[0] === '"' || n[0] === "'")
|
|
319
|
+
return O(n);
|
|
320
|
+
if (/^-?(?:\d+(?:\.\d*)?|\.\d+)$/.test(n)) {
|
|
321
|
+
const t = Number(n);
|
|
322
|
+
if (Number.isFinite(t))
|
|
323
|
+
return t;
|
|
324
|
+
}
|
|
325
|
+
return n === "true" ? !0 : n === "false" ? !1 : n === "null" ? null : n;
|
|
326
|
+
}
|
|
327
|
+
function O(n) {
|
|
328
|
+
const e = n[0];
|
|
329
|
+
if (n.length < 2 || n[n.length - 1] !== e)
|
|
330
|
+
throw f(n);
|
|
331
|
+
if (e === '"')
|
|
332
|
+
try {
|
|
333
|
+
const r = JSON.parse(n);
|
|
334
|
+
if (typeof r == "string")
|
|
335
|
+
return r;
|
|
336
|
+
} catch {
|
|
337
|
+
throw f(n);
|
|
338
|
+
}
|
|
339
|
+
let t = "";
|
|
340
|
+
for (let r = 1; r < n.length - 1; r++) {
|
|
341
|
+
const i = n[r];
|
|
342
|
+
if (i === "\\") {
|
|
343
|
+
if (r++, r >= n.length - 1)
|
|
344
|
+
throw f(n);
|
|
345
|
+
t += n[r];
|
|
346
|
+
} else
|
|
347
|
+
t += i;
|
|
348
|
+
}
|
|
349
|
+
return t;
|
|
350
|
+
}
|
|
351
|
+
function N(n, e) {
|
|
352
|
+
if (!n.startsWith("$"))
|
|
353
|
+
return n;
|
|
354
|
+
const t = p(n.slice(1), e);
|
|
355
|
+
if (typeof t != "string" && typeof t != "number")
|
|
356
|
+
throw new TypeError(`[Raph] Key variable "${n}" must be a string or number.`);
|
|
357
|
+
const r = String(t);
|
|
358
|
+
if (!r || r.includes(".") || r.includes("[") || r.includes("]"))
|
|
359
|
+
throw new TypeError(`[Raph] Key variable "${n}" contains path syntax.`);
|
|
360
|
+
return r;
|
|
361
|
+
}
|
|
362
|
+
function p(n, e) {
|
|
363
|
+
if (!y(n, e))
|
|
364
|
+
throw new TypeError(`[Raph] Missing path variable "${n}".`);
|
|
365
|
+
return e[n];
|
|
366
|
+
}
|
|
367
|
+
function y(n, e) {
|
|
368
|
+
return e !== void 0 && Object.hasOwn(e, n);
|
|
369
|
+
}
|
|
370
|
+
function Z(n, e) {
|
|
371
|
+
for (const t of n.matchAll(/\$([A-Z_$][\w$]*)/gi))
|
|
372
|
+
if (!y(t[1], e))
|
|
373
|
+
return !0;
|
|
374
|
+
return !1;
|
|
375
|
+
}
|
|
376
|
+
function j(n) {
|
|
377
|
+
if (typeof n != "object" || n === null)
|
|
378
|
+
throw E();
|
|
379
|
+
const e = n;
|
|
380
|
+
if (e.t === "key" && typeof e.k == "string")
|
|
381
|
+
return { kind: "key", key: e.k };
|
|
382
|
+
if (e.t === "idx" && typeof e.i == "number" && Number.isInteger(e.i) && e.i >= 0)
|
|
383
|
+
return { kind: "index", index: e.i };
|
|
384
|
+
if (e.t === "wc")
|
|
385
|
+
return { kind: "wildcard", indexed: e.indexed === !0 };
|
|
386
|
+
if (e.t === "param" && typeof e.pk == "string" && z(e.pv))
|
|
387
|
+
return { kind: "selector", key: e.pk, value: e.pv };
|
|
388
|
+
throw E();
|
|
389
|
+
}
|
|
390
|
+
function z(n) {
|
|
391
|
+
return n === null || typeof n == "string" || typeof n == "boolean" || typeof n == "number" && Number.isFinite(n);
|
|
392
|
+
}
|
|
393
|
+
function v(n) {
|
|
394
|
+
const e = n[n.length - 1];
|
|
395
|
+
return (e == null ? void 0 : e.kind) === "wildcard" && !e.indexed;
|
|
396
|
+
}
|
|
397
|
+
function H(n, e) {
|
|
398
|
+
return n.kind === "wildcard" ? !n.indexed || e.kind === "index" || e.kind === "selector" : n.kind !== e.kind ? !1 : n.kind === "key" ? n.key === e.key : n.kind === "index" ? n.index === e.index : n.key === e.key && Object.is(n.value, e.value);
|
|
399
|
+
}
|
|
400
|
+
function _(n) {
|
|
401
|
+
let e = "";
|
|
402
|
+
for (const t of n)
|
|
403
|
+
t.kind === "key" ? e += e ? `.${t.key}` : t.key : t.kind === "index" ? e += `[${t.index}]` : t.kind === "selector" ? e += `[${t.key}=${X(t.value)}]` : e += t.indexed ? "[*]" : e ? ".*" : "*";
|
|
404
|
+
return e;
|
|
405
|
+
}
|
|
406
|
+
function X(n) {
|
|
407
|
+
return typeof n == "string" ? JSON.stringify(n) : String(n);
|
|
408
|
+
}
|
|
409
|
+
function f(n) {
|
|
410
|
+
return new TypeError(`[Raph] Invalid data path "${n}".`);
|
|
411
|
+
}
|
|
412
|
+
function E() {
|
|
413
|
+
return new TypeError("[Raph] Invalid plain DataPath representation.");
|
|
414
|
+
}
|
|
415
|
+
function b(n) {
|
|
416
|
+
return new TypeError(`[Raph] Wildcard is only allowed in watch masks: "${n}".`);
|
|
417
|
+
}
|
|
418
|
+
export {
|
|
419
|
+
h as DataPath,
|
|
420
|
+
q as parseDataPath,
|
|
421
|
+
V as parsePathMask,
|
|
422
|
+
F as pathRelationMasks
|
|
423
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./data-path.cjs");function m(e,t,i){if(i.segments.length<=e.segments.length)return{kind:"full"};for(let o=0;o<e.segments.length;o++)if(!$(e.segments[o],i.segments[o]))return{kind:"full"};const r=i.segments[e.segments.length];if((r==null?void 0:r.kind)!=="selector"||r.key!==t||typeof r.value!="string"&&typeof r.value!="number")return{kind:"full"};const n=i.segments[e.segments.length+1];return(n==null?void 0:n.kind)==="key"&&n.key===t?{kind:"full"}:{kind:"key",key:r.value}}function k(e,t,i){const r=p.parseDataPath(e).canonical,n=typeof i=="number"?String(i):JSON.stringify(i);return`${r}[${t}=${n}]`}function g(e,t,i,r){if(!Array.isArray(i)||!Array.isArray(r))throw f(e,"requires array source and output");if(i.length!==r.length)throw f(e,"must preserve collection cardinality");const n=a(i,t,"source"),o=a(r,t,"output");for(let s=0;s<n.length;s++)if(n[s]!==o[s])throw f(e,"must preserve key order")}function h(e,t,i,r){if(!Array.isArray(r))throw f(e,"incremental compute must return an array");if(i.length!==r.length)throw f(e,"incremental compute must preserve cardinality");const n=a(r,t,"output");for(let o=0;o<i.length;o++)if(i[o]!==n[o])throw f(e,"incremental compute must preserve key order")}function w(e,t,i,r){if(!Array.isArray(i)||!Array.isArray(r))throw u(e,"requires array source and output");d(e,"output must be an ordered subset of source",a(i,t,"source"),a(r,t,"output"))}function b(e,t,i,r){if(!Array.isArray(r))throw u(e,"incremental compute must return an array");d(e,"incremental output must be an ordered subset of input",i,a(r,t,"output"))}function a(e,t,i){const r=new Set,n=[];for(let o=0;o<e.length;o++){if(!(o in e)){n.push(void 0);continue}const s=e[o];if(!y(s))throw new TypeError(`[Raph] ${i} collection items must be objects.`);const c=s[t];if(typeof c!="string"&&typeof c!="number")throw new TypeError(`[Raph] ${i} item key "${t}" must be a string or number.`);if(r.has(c))throw new TypeError(`[Raph] Duplicate ${i} key: "${String(c)}".`);r.add(c),n.push(c)}return n}function A(e,t,i){const r=a(e,t,i),n=new Map;for(let o=0;o<r.length;o++){const s=r[o];s!==void 0&&n.set(s,o)}return n}function x(e,t,i,r){for(const n of r){const o=i.get(n);if(o===void 0)return!0;const s=e[o];if(!y(s)||s[t]!==n)return!0}return!1}function f(e,t){return new TypeError(`[Raph] collectionByKey derived "${e}" ${t}.`)}function u(e,t){return new TypeError(`[Raph] filterByKey derived "${e}" ${t}.`)}function E(e){return l(e,new WeakMap)}function d(e,t,i,r){const n=new Map;for(let s=0;s<i.length;s++){const c=i[s];c!==void 0&&n.set(c,s)}let o=-1;for(const s of r){if(s===void 0)continue;const c=n.get(s);if(c===void 0||c<=o)throw u(e,t);o=c}}function l(e,t){if(e===null||typeof e!="object")return e;const i=t.get(e);if(i!==void 0)return i;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e instanceof Map){const n=new Map;t.set(e,n);for(const[o,s]of e)n.set(l(o,t),l(s,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const o of e)n.add(l(o,t));return n}if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return structuredClone(e);if(Array.isArray(e)){const n=[];t.set(e,n);for(let o=0;o<e.length;o++)o in e&&(n[o]=l(e[o],t));return n}const r=Object.create(Object.getPrototypeOf(e));t.set(e,r);for(const n of Reflect.ownKeys(e))r[n]=l(e[n],t);return r}function $(e,t){return e.kind!==t.kind?!1:e.kind==="key"&&t.kind==="key"?e.key===t.key:e.kind==="index"&&t.kind==="index"?e.index===t.index:e.kind==="selector"&&t.kind==="selector"&&e.key===t.key&&Object.is(e.value,t.value)}function y(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}exports.cloneMaterializedValue=E;exports.collectionError=f;exports.collectionIndex=A;exports.collectionKeys=a;exports.collectionMutationImpact=m;exports.filterError=u;exports.indexesAreStale=x;exports.keyedPath=k;exports.validateFullCollection=g;exports.validateFullFilter=w;exports.validateIncrementalCollection=h;exports.validateIncrementalFilter=b;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { parseDataPath as p } from "./data-path.js";
|
|
2
|
+
function g(e, t, i) {
|
|
3
|
+
if (i.segments.length <= e.segments.length)
|
|
4
|
+
return { kind: "full" };
|
|
5
|
+
for (let o = 0; o < e.segments.length; o++)
|
|
6
|
+
if (!m(e.segments[o], i.segments[o]))
|
|
7
|
+
return { kind: "full" };
|
|
8
|
+
const r = i.segments[e.segments.length];
|
|
9
|
+
if ((r == null ? void 0 : r.kind) !== "selector" || r.key !== t || typeof r.value != "string" && typeof r.value != "number")
|
|
10
|
+
return { kind: "full" };
|
|
11
|
+
const n = i.segments[e.segments.length + 1];
|
|
12
|
+
return (n == null ? void 0 : n.kind) === "key" && n.key === t ? { kind: "full" } : { kind: "key", key: r.value };
|
|
13
|
+
}
|
|
14
|
+
function h(e, t, i) {
|
|
15
|
+
const r = p(e).canonical, n = typeof i == "number" ? String(i) : JSON.stringify(i);
|
|
16
|
+
return `${r}[${t}=${n}]`;
|
|
17
|
+
}
|
|
18
|
+
function w(e, t, i, r) {
|
|
19
|
+
if (!Array.isArray(i) || !Array.isArray(r))
|
|
20
|
+
throw a(e, "requires array source and output");
|
|
21
|
+
if (i.length !== r.length)
|
|
22
|
+
throw a(e, "must preserve collection cardinality");
|
|
23
|
+
const n = f(i, t, "source"), o = f(r, t, "output");
|
|
24
|
+
for (let s = 0; s < n.length; s++)
|
|
25
|
+
if (n[s] !== o[s])
|
|
26
|
+
throw a(e, "must preserve key order");
|
|
27
|
+
}
|
|
28
|
+
function A(e, t, i, r) {
|
|
29
|
+
if (!Array.isArray(r))
|
|
30
|
+
throw a(e, "incremental compute must return an array");
|
|
31
|
+
if (i.length !== r.length)
|
|
32
|
+
throw a(e, "incremental compute must preserve cardinality");
|
|
33
|
+
const n = f(r, t, "output");
|
|
34
|
+
for (let o = 0; o < i.length; o++)
|
|
35
|
+
if (i[o] !== n[o])
|
|
36
|
+
throw a(e, "incremental compute must preserve key order");
|
|
37
|
+
}
|
|
38
|
+
function b(e, t, i, r) {
|
|
39
|
+
if (!Array.isArray(i) || !Array.isArray(r))
|
|
40
|
+
throw y(e, "requires array source and output");
|
|
41
|
+
d(
|
|
42
|
+
e,
|
|
43
|
+
"output must be an ordered subset of source",
|
|
44
|
+
f(i, t, "source"),
|
|
45
|
+
f(r, t, "output")
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
function x(e, t, i, r) {
|
|
49
|
+
if (!Array.isArray(r))
|
|
50
|
+
throw y(e, "incremental compute must return an array");
|
|
51
|
+
d(
|
|
52
|
+
e,
|
|
53
|
+
"incremental output must be an ordered subset of input",
|
|
54
|
+
i,
|
|
55
|
+
f(r, t, "output")
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function f(e, t, i) {
|
|
59
|
+
const r = /* @__PURE__ */ new Set(), n = [];
|
|
60
|
+
for (let o = 0; o < e.length; o++) {
|
|
61
|
+
if (!(o in e)) {
|
|
62
|
+
n.push(void 0);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const s = e[o];
|
|
66
|
+
if (!l(s))
|
|
67
|
+
throw new TypeError(`[Raph] ${i} collection items must be objects.`);
|
|
68
|
+
const c = s[t];
|
|
69
|
+
if (typeof c != "string" && typeof c != "number")
|
|
70
|
+
throw new TypeError(`[Raph] ${i} item key "${t}" must be a string or number.`);
|
|
71
|
+
if (r.has(c))
|
|
72
|
+
throw new TypeError(`[Raph] Duplicate ${i} key: "${String(c)}".`);
|
|
73
|
+
r.add(c), n.push(c);
|
|
74
|
+
}
|
|
75
|
+
return n;
|
|
76
|
+
}
|
|
77
|
+
function $(e, t, i) {
|
|
78
|
+
const r = f(e, t, i), n = /* @__PURE__ */ new Map();
|
|
79
|
+
for (let o = 0; o < r.length; o++) {
|
|
80
|
+
const s = r[o];
|
|
81
|
+
s !== void 0 && n.set(s, o);
|
|
82
|
+
}
|
|
83
|
+
return n;
|
|
84
|
+
}
|
|
85
|
+
function E(e, t, i, r) {
|
|
86
|
+
for (const n of r) {
|
|
87
|
+
const o = i.get(n);
|
|
88
|
+
if (o === void 0)
|
|
89
|
+
return !0;
|
|
90
|
+
const s = e[o];
|
|
91
|
+
if (!l(s) || s[t] !== n)
|
|
92
|
+
return !0;
|
|
93
|
+
}
|
|
94
|
+
return !1;
|
|
95
|
+
}
|
|
96
|
+
function a(e, t) {
|
|
97
|
+
return new TypeError(`[Raph] collectionByKey derived "${e}" ${t}.`);
|
|
98
|
+
}
|
|
99
|
+
function y(e, t) {
|
|
100
|
+
return new TypeError(`[Raph] filterByKey derived "${e}" ${t}.`);
|
|
101
|
+
}
|
|
102
|
+
function R(e) {
|
|
103
|
+
return u(e, /* @__PURE__ */ new WeakMap());
|
|
104
|
+
}
|
|
105
|
+
function d(e, t, i, r) {
|
|
106
|
+
const n = /* @__PURE__ */ new Map();
|
|
107
|
+
for (let s = 0; s < i.length; s++) {
|
|
108
|
+
const c = i[s];
|
|
109
|
+
c !== void 0 && n.set(c, s);
|
|
110
|
+
}
|
|
111
|
+
let o = -1;
|
|
112
|
+
for (const s of r) {
|
|
113
|
+
if (s === void 0)
|
|
114
|
+
continue;
|
|
115
|
+
const c = n.get(s);
|
|
116
|
+
if (c === void 0 || c <= o)
|
|
117
|
+
throw y(e, t);
|
|
118
|
+
o = c;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function u(e, t) {
|
|
122
|
+
if (e === null || typeof e != "object")
|
|
123
|
+
return e;
|
|
124
|
+
const i = t.get(e);
|
|
125
|
+
if (i !== void 0)
|
|
126
|
+
return i;
|
|
127
|
+
if (e instanceof Date)
|
|
128
|
+
return new Date(e.getTime());
|
|
129
|
+
if (e instanceof RegExp)
|
|
130
|
+
return new RegExp(e.source, e.flags);
|
|
131
|
+
if (e instanceof Map) {
|
|
132
|
+
const n = /* @__PURE__ */ new Map();
|
|
133
|
+
t.set(e, n);
|
|
134
|
+
for (const [o, s] of e)
|
|
135
|
+
n.set(u(o, t), u(s, t));
|
|
136
|
+
return n;
|
|
137
|
+
}
|
|
138
|
+
if (e instanceof Set) {
|
|
139
|
+
const n = /* @__PURE__ */ new Set();
|
|
140
|
+
t.set(e, n);
|
|
141
|
+
for (const o of e)
|
|
142
|
+
n.add(u(o, t));
|
|
143
|
+
return n;
|
|
144
|
+
}
|
|
145
|
+
if (e instanceof ArrayBuffer || ArrayBuffer.isView(e))
|
|
146
|
+
return structuredClone(e);
|
|
147
|
+
if (Array.isArray(e)) {
|
|
148
|
+
const n = [];
|
|
149
|
+
t.set(e, n);
|
|
150
|
+
for (let o = 0; o < e.length; o++)
|
|
151
|
+
o in e && (n[o] = u(e[o], t));
|
|
152
|
+
return n;
|
|
153
|
+
}
|
|
154
|
+
const r = Object.create(Object.getPrototypeOf(e));
|
|
155
|
+
t.set(e, r);
|
|
156
|
+
for (const n of Reflect.ownKeys(e))
|
|
157
|
+
r[n] = u(e[n], t);
|
|
158
|
+
return r;
|
|
159
|
+
}
|
|
160
|
+
function m(e, t) {
|
|
161
|
+
return e.kind !== t.kind ? !1 : e.kind === "key" && t.kind === "key" ? e.key === t.key : e.kind === "index" && t.kind === "index" ? e.index === t.index : e.kind === "selector" && t.kind === "selector" && e.key === t.key && Object.is(e.value, t.value);
|
|
162
|
+
}
|
|
163
|
+
function l(e) {
|
|
164
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
165
|
+
}
|
|
166
|
+
export {
|
|
167
|
+
R as cloneMaterializedValue,
|
|
168
|
+
a as collectionError,
|
|
169
|
+
$ as collectionIndex,
|
|
170
|
+
f as collectionKeys,
|
|
171
|
+
g as collectionMutationImpact,
|
|
172
|
+
y as filterError,
|
|
173
|
+
E as indexesAreStale,
|
|
174
|
+
h as keyedPath,
|
|
175
|
+
w as validateFullCollection,
|
|
176
|
+
b as validateFullFilter,
|
|
177
|
+
A as validateIncrementalCollection,
|
|
178
|
+
x as validateIncrementalFilter
|
|
179
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(){return Object.freeze({kind:"full"})}function n(r){const e=String(r??"").trim();if(e.length===0)throw new TypeError("[Raph] collectionByKey requires a non-empty key.");return Object.freeze({kind:"collection-by-key",key:e})}function i(r){const e=String(r??"").trim();if(e.length===0)throw new TypeError("[Raph] filterByKey requires a non-empty key.");return Object.freeze({kind:"filter-by-key",key:e})}exports.collectionByKey=n;exports.filterByKey=i;exports.full=t;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function n() {
|
|
2
|
+
return Object.freeze({ kind: "full" });
|
|
3
|
+
}
|
|
4
|
+
function t(r) {
|
|
5
|
+
const e = String(r ?? "").trim();
|
|
6
|
+
if (e.length === 0)
|
|
7
|
+
throw new TypeError("[Raph] collectionByKey requires a non-empty key.");
|
|
8
|
+
return Object.freeze({ kind: "collection-by-key", key: e });
|
|
9
|
+
}
|
|
10
|
+
function i(r) {
|
|
11
|
+
const e = String(r ?? "").trim();
|
|
12
|
+
if (e.length === 0)
|
|
13
|
+
throw new TypeError("[Raph] filterByKey requires a non-empty key.");
|
|
14
|
+
return Object.freeze({ kind: "filter-by-key", key: e });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
t as collectionByKey,
|
|
18
|
+
i as filterByKey,
|
|
19
|
+
n as full
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var x=(n,t,i)=>t in n?u(n,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[t]=i;var p=(n,t,i)=>x(n,typeof t!="symbol"?t+"":t,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./segment-key.cjs");class g{constructor(){p(this,"_root",{})}add(t,i){let e=this._root;const o=[];for(const c of t.segments)if(c.kind==="wildcard"){const d=e.indexedWildcard??(e.indexedWildcard={});o.push({child:d,parent:e,indexedWildcard:!0}),e=d}else{const d=h.pathSegmentKey(c),a=e.exact??(e.exact=new Map);let s=a.get(d);s===void 0&&(s={},a.set(d,s)),o.push({child:s,key:d,parent:e,indexedWildcard:!1}),e=s}const r=t.deep?e.deep??(e.deep=new Set):e.end??(e.end=new Set);r.add(i);let l=!0;return()=>{if(l){l=!1,r.delete(i),r.size===0&&(t.deep?e.deep=void 0:e.end=void 0);for(let c=o.length-1;c>=0;c--){const d=o[c];if(!v(d.child))break;d.indexedWildcard?d.parent.indexedWildcard=void 0:(d.parent.exact.delete(d.key),d.parent.exact.size===0&&(d.parent.exact=void 0))}}}}match(t){var o;let i=[this._root];const e=new Set;for(let r=0;r<=t.length;r++){const l=r===t.length,c=[];for(const d of i){if(f(e,d.deep),l){f(e,d.end);continue}const a=t[r],s=(o=d.exact)==null?void 0:o.get(h.pathSegmentKey(a));s!==void 0&&c.push(s),d.indexedWildcard!==void 0&&(a.kind==="index"||a.kind==="selector")&&c.push(d.indexedWildcard)}if(l||(i=c,i.length===0))break}return e}matchAll(){const t=new Set,i=[this._root];for(;i.length;){const e=i.pop();if(f(t,e.deep),f(t,e.end),e.indexedWildcard!==void 0&&i.push(e.indexedWildcard),e.exact!==void 0)for(const o of e.exact.values())i.push(o)}return t}}function f(n,t){if(t!==void 0)for(const i of t)n.add(i)}function v(n){return n.deep===void 0&&n.end===void 0&&n.exact===void 0&&n.indexedWildcard===void 0}exports.PathRouter=g;
|