@matter/node 0.13.0 → 0.13.1-alpha.0-20250501-80c86b03e
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/cjs/behavior/context/server/OnlineContext.d.ts.map +1 -1
- package/dist/cjs/behavior/context/server/OnlineContext.js +6 -3
- package/dist/cjs/behavior/context/server/OnlineContext.js.map +1 -1
- package/dist/cjs/behavior/system/controller/ControllerBehavior.js +2 -1
- package/dist/cjs/behavior/system/controller/ControllerBehavior.js.map +1 -1
- package/dist/cjs/behavior/system/network/ServerNetworkRuntime.d.ts.map +1 -1
- package/dist/cjs/behavior/system/network/ServerNetworkRuntime.js +7 -7
- package/dist/cjs/behavior/system/network/ServerNetworkRuntime.js.map +1 -1
- package/dist/cjs/behavior/system/subscription/SubscriptionBehavior.d.ts +2 -3
- package/dist/cjs/behavior/system/subscription/SubscriptionBehavior.d.ts.map +1 -1
- package/dist/cjs/behavior/system/subscription/SubscriptionBehavior.js.map +1 -1
- package/dist/cjs/node/server/InteractionServer.d.ts +84 -0
- package/dist/cjs/node/server/InteractionServer.d.ts.map +1 -0
- package/dist/cjs/node/server/InteractionServer.js +1326 -0
- package/dist/cjs/node/server/InteractionServer.js.map +6 -0
- package/dist/cjs/node/server/ProtocolService.d.ts.map +1 -1
- package/dist/cjs/node/server/ProtocolService.js +9 -8
- package/dist/cjs/node/server/ProtocolService.js.map +2 -2
- package/dist/cjs/node/server/index.d.ts +1 -1
- package/dist/cjs/node/server/index.d.ts.map +1 -1
- package/dist/cjs/node/server/index.js +1 -1
- package/dist/cjs/node/server/index.js.map +1 -1
- package/dist/esm/behavior/context/server/OnlineContext.d.ts.map +1 -1
- package/dist/esm/behavior/context/server/OnlineContext.js +6 -3
- package/dist/esm/behavior/context/server/OnlineContext.js.map +1 -1
- package/dist/esm/behavior/system/controller/ControllerBehavior.js +1 -1
- package/dist/esm/behavior/system/controller/ControllerBehavior.js.map +1 -1
- package/dist/esm/behavior/system/network/ServerNetworkRuntime.d.ts.map +1 -1
- package/dist/esm/behavior/system/network/ServerNetworkRuntime.js +2 -3
- package/dist/esm/behavior/system/network/ServerNetworkRuntime.js.map +1 -1
- package/dist/esm/behavior/system/subscription/SubscriptionBehavior.d.ts +2 -3
- package/dist/esm/behavior/system/subscription/SubscriptionBehavior.d.ts.map +1 -1
- package/dist/esm/behavior/system/subscription/SubscriptionBehavior.js.map +1 -1
- package/dist/esm/node/server/InteractionServer.d.ts +84 -0
- package/dist/esm/node/server/InteractionServer.d.ts.map +1 -0
- package/dist/esm/node/server/InteractionServer.js +1348 -0
- package/dist/esm/node/server/InteractionServer.js.map +6 -0
- package/dist/esm/node/server/ProtocolService.d.ts.map +1 -1
- package/dist/esm/node/server/ProtocolService.js +9 -8
- package/dist/esm/node/server/ProtocolService.js.map +1 -1
- package/dist/esm/node/server/index.d.ts +1 -1
- package/dist/esm/node/server/index.d.ts.map +1 -1
- package/dist/esm/node/server/index.js +1 -1
- package/package.json +7 -7
- package/src/behavior/context/server/OnlineContext.ts +9 -4
- package/src/behavior/system/controller/ControllerBehavior.ts +1 -1
- package/src/behavior/system/network/ServerNetworkRuntime.ts +4 -7
- package/src/behavior/system/subscription/SubscriptionBehavior.ts +2 -3
- package/src/node/server/InteractionServer.ts +1757 -0
- package/src/node/server/ProtocolService.ts +10 -8
- package/src/node/server/index.ts +1 -1
- package/dist/cjs/node/server/TransactionalInteractionServer.d.ts +0 -57
- package/dist/cjs/node/server/TransactionalInteractionServer.d.ts.map +0 -1
- package/dist/cjs/node/server/TransactionalInteractionServer.js +0 -334
- package/dist/cjs/node/server/TransactionalInteractionServer.js.map +0 -6
- package/dist/esm/node/server/TransactionalInteractionServer.d.ts +0 -57
- package/dist/esm/node/server/TransactionalInteractionServer.d.ts.map +0 -1
- package/dist/esm/node/server/TransactionalInteractionServer.js +0 -322
- package/dist/esm/node/server/TransactionalInteractionServer.js.map +0 -6
- package/src/node/server/TransactionalInteractionServer.ts +0 -413
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
2
|
-
var __typeError = (msg) => {
|
|
3
|
-
throw TypeError(msg);
|
|
4
|
-
};
|
|
5
|
-
var __using = (stack, value, async) => {
|
|
6
|
-
if (value != null) {
|
|
7
|
-
if (typeof value !== "object" && typeof value !== "function") __typeError("Object expected");
|
|
8
|
-
var dispose, inner;
|
|
9
|
-
if (async) dispose = value[__knownSymbol("asyncDispose")];
|
|
10
|
-
if (dispose === void 0) {
|
|
11
|
-
dispose = value[__knownSymbol("dispose")];
|
|
12
|
-
if (async) inner = dispose;
|
|
13
|
-
}
|
|
14
|
-
if (typeof dispose !== "function") __typeError("Object not disposable");
|
|
15
|
-
if (inner) dispose = function() {
|
|
16
|
-
try {
|
|
17
|
-
inner.call(this);
|
|
18
|
-
} catch (e) {
|
|
19
|
-
return Promise.reject(e);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
stack.push([async, dispose, value]);
|
|
23
|
-
} else if (async) {
|
|
24
|
-
stack.push([async]);
|
|
25
|
-
}
|
|
26
|
-
return value;
|
|
27
|
-
};
|
|
28
|
-
var __callDispose = (stack, error, hasError) => {
|
|
29
|
-
var E = typeof SuppressedError === "function" ? SuppressedError : function(e, s, m, _) {
|
|
30
|
-
return _ = Error(m), _.name = "SuppressedError", _.error = e, _.suppressed = s, _;
|
|
31
|
-
};
|
|
32
|
-
var fail = (e) => error = hasError ? new E(e, error, "An error was suppressed during disposal") : (hasError = true, e);
|
|
33
|
-
var next = (it) => {
|
|
34
|
-
while (it = stack.pop()) {
|
|
35
|
-
try {
|
|
36
|
-
var result = it[1] && it[1].call(it[2]);
|
|
37
|
-
if (it[0]) return Promise.resolve(result).then(next, (e) => (fail(e), next()));
|
|
38
|
-
} catch (e) {
|
|
39
|
-
fail(e);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (hasError) throw error;
|
|
43
|
-
};
|
|
44
|
-
return next();
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* @license
|
|
48
|
-
* Copyright 2022-2025 Matter.js Authors
|
|
49
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
50
|
-
*/
|
|
51
|
-
import { ActionTracer } from "#behavior/context/ActionTracer.js";
|
|
52
|
-
import { NodeActivity } from "#behavior/context/NodeActivity.js";
|
|
53
|
-
import { OfflineContext } from "#behavior/context/server/OfflineContext.js";
|
|
54
|
-
import { OnlineContext } from "#behavior/context/server/OnlineContext.js";
|
|
55
|
-
import { AccessControlCluster } from "#clusters/access-control";
|
|
56
|
-
import { EndpointLifecycle } from "#endpoint/properties/EndpointLifecycle.js";
|
|
57
|
-
import { EndpointServer } from "#endpoint/server/EndpointServer.js";
|
|
58
|
-
import { Diagnostic, InternalError, Logger, MaybePromise } from "#general";
|
|
59
|
-
import {
|
|
60
|
-
AccessControl,
|
|
61
|
-
AccessDeniedError,
|
|
62
|
-
ExchangeManager,
|
|
63
|
-
InteractionEndpointStructure,
|
|
64
|
-
InteractionServer,
|
|
65
|
-
InteractionServerMessenger,
|
|
66
|
-
MessageType
|
|
67
|
-
} from "#protocol";
|
|
68
|
-
import { StatusCode, StatusResponseError } from "#types";
|
|
69
|
-
import { AccessControlServer } from "../../behaviors/access-control/AccessControlServer.js";
|
|
70
|
-
const logger = Logger.get("TransactionalInteractionServer");
|
|
71
|
-
const activityKey = Symbol("activity");
|
|
72
|
-
const AclClusterId = AccessControlCluster.id;
|
|
73
|
-
const AclAttributeId = AccessControlCluster.attributes.acl.id;
|
|
74
|
-
class TransactionalInteractionServer extends InteractionServer {
|
|
75
|
-
#endpointStructure;
|
|
76
|
-
#changeListener;
|
|
77
|
-
#node;
|
|
78
|
-
#activity;
|
|
79
|
-
#newActivityBlocked = false;
|
|
80
|
-
#aclServer;
|
|
81
|
-
#aclUpdateIsDelayedInExchange = /* @__PURE__ */ new Set();
|
|
82
|
-
static async create(node, sessions) {
|
|
83
|
-
const structure = new InteractionEndpointStructure();
|
|
84
|
-
return new TransactionalInteractionServer(node, {
|
|
85
|
-
sessions,
|
|
86
|
-
structure,
|
|
87
|
-
subscriptionOptions: node.state.network.subscriptionOptions,
|
|
88
|
-
maxPathsPerInvoke: node.state.basicInformation.maxPathsPerInvoke,
|
|
89
|
-
initiateExchange: (address, protocolId) => node.env.get(ExchangeManager).initiateExchange(address, protocolId)
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
constructor(node, context) {
|
|
93
|
-
super(context);
|
|
94
|
-
const { structure } = context;
|
|
95
|
-
this.#activity = node.env.get(NodeActivity);
|
|
96
|
-
this.#node = node;
|
|
97
|
-
this.#endpointStructure = structure;
|
|
98
|
-
this.#updateStructure();
|
|
99
|
-
this.#changeListener = (type, endpoint) => {
|
|
100
|
-
switch (type) {
|
|
101
|
-
case EndpointLifecycle.Change.ServersChanged:
|
|
102
|
-
EndpointServer.forEndpoint(endpoint).updateServers();
|
|
103
|
-
this.#updateStructure();
|
|
104
|
-
break;
|
|
105
|
-
case EndpointLifecycle.Change.PartsReady:
|
|
106
|
-
case EndpointLifecycle.Change.ClientsChanged:
|
|
107
|
-
case EndpointLifecycle.Change.Destroyed:
|
|
108
|
-
this.#updateStructure();
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
node.lifecycle.changed.on(this.#changeListener);
|
|
113
|
-
}
|
|
114
|
-
async [Symbol.asyncDispose]() {
|
|
115
|
-
this.#node.lifecycle.changed.off(this.#changeListener);
|
|
116
|
-
await this.close();
|
|
117
|
-
this.#endpointStructure.close();
|
|
118
|
-
await EndpointServer.forEndpoint(this.#node)[Symbol.asyncDispose]();
|
|
119
|
-
}
|
|
120
|
-
blockNewActivity() {
|
|
121
|
-
this.#newActivityBlocked = true;
|
|
122
|
-
}
|
|
123
|
-
async onNewExchange(exchange, message) {
|
|
124
|
-
var _stack = [];
|
|
125
|
-
try {
|
|
126
|
-
if (this.#newActivityBlocked || this.isClosing) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (message.payloadHeader.messageType === MessageType.ReportData && this.clientHandler) {
|
|
130
|
-
return this.clientHandler.onNewExchange(exchange, message);
|
|
131
|
-
}
|
|
132
|
-
const activity = __using(_stack, this.#activity.begin(`session#${exchange.session.id.toString(16)}`));
|
|
133
|
-
exchange[activityKey] = activity;
|
|
134
|
-
return new InteractionServerMessenger(exchange).handleRequest(this).finally(() => delete exchange[activityKey]);
|
|
135
|
-
} catch (_) {
|
|
136
|
-
var _error = _, _hasError = true;
|
|
137
|
-
} finally {
|
|
138
|
-
__callDispose(_stack, _error, _hasError);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
get aclServer() {
|
|
142
|
-
if (this.#aclServer !== void 0) {
|
|
143
|
-
return this.#aclServer;
|
|
144
|
-
}
|
|
145
|
-
const aclServer = this.#node.act((agent) => agent.get(AccessControlServer));
|
|
146
|
-
if (MaybePromise.is(aclServer)) {
|
|
147
|
-
throw new InternalError("AccessControlServer should already be initialized.");
|
|
148
|
-
}
|
|
149
|
-
return this.#aclServer = aclServer;
|
|
150
|
-
}
|
|
151
|
-
readAttribute(path, attribute, exchange, fabricFiltered, message, offline = false) {
|
|
152
|
-
const readAttribute = () => super.readAttribute(path, attribute, exchange, fabricFiltered, message, offline);
|
|
153
|
-
const endpoint = this.#endpointStructure.getEndpoint(path.endpointId);
|
|
154
|
-
if (!endpoint) {
|
|
155
|
-
throw new InternalError("Endpoint not found for ACL check. This should never happen.");
|
|
156
|
-
}
|
|
157
|
-
const result = offline ? OfflineContext.act("offline-read", this.#activity, readAttribute) : OnlineContext({
|
|
158
|
-
activity: exchange[activityKey],
|
|
159
|
-
fabricFiltered,
|
|
160
|
-
message,
|
|
161
|
-
exchange,
|
|
162
|
-
tracer: this.#tracer,
|
|
163
|
-
actionType: ActionTracer.ActionType.Read,
|
|
164
|
-
node: this.#node
|
|
165
|
-
}).act(readAttribute);
|
|
166
|
-
if (MaybePromise.is(result)) {
|
|
167
|
-
throw new InternalError("Reads should not return a promise.");
|
|
168
|
-
}
|
|
169
|
-
return result;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Reads the attributes for the given endpoint.
|
|
173
|
-
* This can currently only be used for subscriptions because errors are ignored!
|
|
174
|
-
*/
|
|
175
|
-
readEndpointAttributesForSubscription(attributes, exchange, fabricFiltered, message, offline = false) {
|
|
176
|
-
const readAttributes = () => {
|
|
177
|
-
const result2 = new Array();
|
|
178
|
-
for (const { path, attribute } of attributes) {
|
|
179
|
-
try {
|
|
180
|
-
const value = super.readAttribute(path, attribute, exchange, fabricFiltered, message, offline);
|
|
181
|
-
result2.push({ path, attribute, value: value.value, version: value.version });
|
|
182
|
-
} catch (error) {
|
|
183
|
-
if (StatusResponseError.is(error, StatusCode.UnsupportedAccess)) {
|
|
184
|
-
logger.warn(
|
|
185
|
-
`Permission denied reading attribute ${this.#endpointStructure.resolveAttributeName(path)}`
|
|
186
|
-
);
|
|
187
|
-
} else {
|
|
188
|
-
logger.warn(
|
|
189
|
-
`Error reading attribute ${this.#endpointStructure.resolveAttributeName(path)}:`,
|
|
190
|
-
error
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return result2;
|
|
196
|
-
};
|
|
197
|
-
const result = offline ? OfflineContext.act("offline-read", this.#activity, readAttributes) : OnlineContext({
|
|
198
|
-
activity: exchange[activityKey],
|
|
199
|
-
fabricFiltered,
|
|
200
|
-
message,
|
|
201
|
-
exchange,
|
|
202
|
-
tracer: this.#tracer,
|
|
203
|
-
actionType: ActionTracer.ActionType.Read,
|
|
204
|
-
node: this.#node
|
|
205
|
-
}).act(readAttributes);
|
|
206
|
-
if (MaybePromise.is(result)) {
|
|
207
|
-
throw new InternalError("Online read should not return a promise.");
|
|
208
|
-
}
|
|
209
|
-
return result;
|
|
210
|
-
}
|
|
211
|
-
async readEvent(path, eventFilters, event, exchange, fabricFiltered, message) {
|
|
212
|
-
const readEvent = (context) => {
|
|
213
|
-
if (context.authorityAt(event.readAcl, {
|
|
214
|
-
endpoint: path.endpointId,
|
|
215
|
-
cluster: path.clusterId
|
|
216
|
-
}) !== AccessControl.Authority.Granted) {
|
|
217
|
-
throw new AccessDeniedError(
|
|
218
|
-
`Access to ${path.endpointId}/${Diagnostic.hex(path.clusterId)} denied on ${exchange.session.name}.`
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
return super.readEvent(path, eventFilters, event, exchange, fabricFiltered, message);
|
|
222
|
-
};
|
|
223
|
-
return OnlineContext({
|
|
224
|
-
activity: exchange[activityKey],
|
|
225
|
-
fabricFiltered,
|
|
226
|
-
message,
|
|
227
|
-
exchange,
|
|
228
|
-
tracer: this.#tracer,
|
|
229
|
-
actionType: ActionTracer.ActionType.Read,
|
|
230
|
-
node: this.#node
|
|
231
|
-
}).act(readEvent);
|
|
232
|
-
}
|
|
233
|
-
async handleWriteRequest(exchange, writeRequest, message) {
|
|
234
|
-
let result;
|
|
235
|
-
try {
|
|
236
|
-
result = await super.handleWriteRequest(exchange, writeRequest, message);
|
|
237
|
-
} catch (error) {
|
|
238
|
-
if (this.#aclUpdateIsDelayedInExchange.has(exchange)) {
|
|
239
|
-
this.#aclUpdateIsDelayedInExchange.delete(exchange);
|
|
240
|
-
if (this.#aclUpdateIsDelayedInExchange.size === 0) {
|
|
241
|
-
this.aclServer.resetDelayedAccessControlList();
|
|
242
|
-
} else {
|
|
243
|
-
logger.error("One of multiple concurrent ACL writes failed, unhandled case for now.");
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
throw error;
|
|
247
|
-
}
|
|
248
|
-
if (this.#aclUpdateIsDelayedInExchange.has(exchange)) {
|
|
249
|
-
this.#aclUpdateIsDelayedInExchange.delete(exchange);
|
|
250
|
-
if (this.#aclUpdateIsDelayedInExchange.size === 0) {
|
|
251
|
-
this.aclServer.aclUpdateDelayed = false;
|
|
252
|
-
} else {
|
|
253
|
-
logger.info("Multiple concurrent ACL writes, waiting for all to finish.");
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return result;
|
|
257
|
-
}
|
|
258
|
-
async writeAttribute(path, attribute, value, exchange, message, endpoint, timed = false, isListWrite) {
|
|
259
|
-
const writeAttribute = () => super.writeAttribute(path, attribute, value, exchange, message, endpoint, timed, isListWrite);
|
|
260
|
-
if (path.endpointId === 0 && path.clusterId === AclClusterId && path.attributeId === AclAttributeId) {
|
|
261
|
-
this.aclServer.aclUpdateDelayed = true;
|
|
262
|
-
this.#aclUpdateIsDelayedInExchange.add(exchange);
|
|
263
|
-
} else {
|
|
264
|
-
if (this.#aclUpdateIsDelayedInExchange.has(exchange)) {
|
|
265
|
-
this.#aclUpdateIsDelayedInExchange.delete(exchange);
|
|
266
|
-
if (this.#aclUpdateIsDelayedInExchange.size === 0) {
|
|
267
|
-
this.aclServer.aclUpdateDelayed = false;
|
|
268
|
-
} else {
|
|
269
|
-
logger.info("Multiple concurrent ACL writes, waiting for all to finish.");
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
return OnlineContext({
|
|
274
|
-
activity: exchange[activityKey],
|
|
275
|
-
timed,
|
|
276
|
-
message,
|
|
277
|
-
exchange,
|
|
278
|
-
fabricFiltered: true,
|
|
279
|
-
tracer: this.#tracer,
|
|
280
|
-
actionType: ActionTracer.ActionType.Write,
|
|
281
|
-
node: this.#node
|
|
282
|
-
}).act(writeAttribute);
|
|
283
|
-
}
|
|
284
|
-
async invokeCommand(path, command, exchange, commandFields, message, endpoint, timed = false) {
|
|
285
|
-
const invokeCommand = (context) => {
|
|
286
|
-
if (context.authorityAt(command.invokeAcl, {
|
|
287
|
-
endpoint: endpoint.number,
|
|
288
|
-
cluster: path.clusterId
|
|
289
|
-
}) !== AccessControl.Authority.Granted) {
|
|
290
|
-
throw new AccessDeniedError(
|
|
291
|
-
`Access to ${endpoint.number}/${Diagnostic.hex(path.clusterId)} denied on ${exchange.session.name}.`
|
|
292
|
-
);
|
|
293
|
-
}
|
|
294
|
-
return super.invokeCommand(path, command, exchange, commandFields, message, endpoint, timed);
|
|
295
|
-
};
|
|
296
|
-
return OnlineContext({
|
|
297
|
-
activity: exchange[activityKey],
|
|
298
|
-
command: true,
|
|
299
|
-
timed,
|
|
300
|
-
message,
|
|
301
|
-
exchange,
|
|
302
|
-
tracer: this.#tracer,
|
|
303
|
-
actionType: ActionTracer.ActionType.Invoke,
|
|
304
|
-
node: this.#node
|
|
305
|
-
}).act(invokeCommand);
|
|
306
|
-
}
|
|
307
|
-
get #tracer() {
|
|
308
|
-
if (this.#node.env.has(ActionTracer)) {
|
|
309
|
-
return this.#node.env.get(ActionTracer);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
#updateStructure() {
|
|
313
|
-
if (this.#node.lifecycle.isPartsReady) {
|
|
314
|
-
const server = EndpointServer.forEndpoint(this.#node);
|
|
315
|
-
this.#endpointStructure.initializeFromEndpoint(server);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
export {
|
|
320
|
-
TransactionalInteractionServer
|
|
321
|
-
};
|
|
322
|
-
//# sourceMappingURL=TransactionalInteractionServer.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/node/server/TransactionalInteractionServer.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AAErC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,YAAY,eAAe,QAAQ,oBAAoB;AAChE;AAAA,EACI;AAAA,EACA;AAAA,EASA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,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