@shapediver/viewer.session-engine.session-engine 3.14.8 → 3.14.9
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/implementation/OutputLoader.d.ts.map +1 -1
- package/dist/implementation/OutputLoader.js +19 -0
- package/dist/implementation/OutputLoader.js.map +1 -1
- package/dist/implementation/SessionEngine.d.ts.map +1 -1
- package/dist/implementation/SessionEngine.js +0 -4
- package/dist/implementation/SessionEngine.js.map +1 -1
- package/dist/implementation/SessionEngineCore.d.ts +49 -75
- package/dist/implementation/SessionEngineCore.d.ts.map +1 -1
- package/dist/implementation/SessionEngineCore.js +88 -265
- package/dist/implementation/SessionEngineCore.js.map +1 -1
- package/dist/implementation/SessionEngineFacade.d.ts +16 -11
- package/dist/implementation/SessionEngineFacade.d.ts.map +1 -1
- package/dist/implementation/SessionEngineFacade.js +19 -18
- package/dist/implementation/SessionEngineFacade.js.map +1 -1
- package/dist/implementation/managers/CustomizationManager.d.ts +41 -6
- package/dist/implementation/managers/CustomizationManager.d.ts.map +1 -1
- package/dist/implementation/managers/CustomizationManager.js +114 -56
- package/dist/implementation/managers/CustomizationManager.js.map +1 -1
- package/dist/implementation/managers/ExportManager.d.ts +49 -5
- package/dist/implementation/managers/ExportManager.d.ts.map +1 -1
- package/dist/implementation/managers/ExportManager.js +105 -42
- package/dist/implementation/managers/ExportManager.js.map +1 -1
- package/dist/implementation/managers/FileUploadManager.d.ts +41 -3
- package/dist/implementation/managers/FileUploadManager.d.ts.map +1 -1
- package/dist/implementation/managers/FileUploadManager.js +110 -67
- package/dist/implementation/managers/FileUploadManager.js.map +1 -1
- package/dist/implementation/managers/ModelStateManager.d.ts +42 -4
- package/dist/implementation/managers/ModelStateManager.d.ts.map +1 -1
- package/dist/implementation/managers/ModelStateManager.js +71 -24
- package/dist/implementation/managers/ModelStateManager.js.map +1 -1
- package/dist/implementation/managers/OutputManager.d.ts +48 -10
- package/dist/implementation/managers/OutputManager.d.ts.map +1 -1
- package/dist/implementation/managers/OutputManager.js +144 -84
- package/dist/implementation/managers/OutputManager.js.map +1 -1
- package/dist/implementation/managers/ParameterManager.d.ts +51 -4
- package/dist/implementation/managers/ParameterManager.d.ts.map +1 -1
- package/dist/implementation/managers/ParameterManager.js +164 -13
- package/dist/implementation/managers/ParameterManager.js.map +1 -1
- package/dist/implementation/managers/SettingsManager.d.ts +27 -2
- package/dist/implementation/managers/SettingsManager.d.ts.map +1 -1
- package/dist/implementation/managers/SettingsManager.js +120 -74
- package/dist/implementation/managers/SettingsManager.js.map +1 -1
- package/dist/implementation/managers/UtilsManager.d.ts +79 -17
- package/dist/implementation/managers/UtilsManager.d.ts.map +1 -1
- package/dist/implementation/managers/UtilsManager.js +191 -126
- package/dist/implementation/managers/UtilsManager.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportManager.d.ts","sourceRoot":"","sources":["../../../src/implementation/managers/ExportManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,SAAS,
|
|
1
|
+
{"version":3,"file":"ExportManager.d.ts","sourceRoot":"","sources":["../../../src/implementation/managers/ExportManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,SAAS,EAGT,MAAM,qCAAqC,CAAC;AAQ7C,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AAErD,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,aAAa;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IACrD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgC;IACzD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAoB;IACvD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA0B;gBAE7C,iBAAiB,EAAE,iBAAiB;IAIhD,IAAW,OAAO,IAAI;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAE7C;IAED;;;;;;OAMG;IACI,qBAAqB,CAAC,UAAU,EAAE;QACxC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,GAAG,gBAAgB;IAyCpB;;;;;;;OAOG;IACI,oBAAoB,IAAI,IAAI;IA+BnC;;;;;;;;OAQG;IACU,aAAa,CACzB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,EACpC,WAAW,EAAE,MAAM,EACnB,KAAK,UAAQ,GACX,OAAO,CAAC,SAAS,CAAC;IA4BrB;;;;;;;;OAQG;IACU,cAAc,CAC1B,IAAI,EAAE,SAAS,EACf,WAAW,GAAE,OAAe,EAC5B,WAAW,CAAC,EAAE,MAAM,EACpB,KAAK,UAAQ,GACX,OAAO,CAAC,OAAO,CAAC;IAuHnB;;;;;OAKG;IACU,oBAAoB,CAChC,OAAO,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,MAAM,EAAE,OAAO,CAAC;YAChB,KAAK,EAAE,MAAM,CAAC;YACd,OAAO,EAAE,MAAM,CAAC;SAChB,CAAC;KACF,EACD,KAAK,UAAQ,GACX,OAAO,CAAC,OAAO,CAAC;CAkBnB"}
|
|
@@ -13,54 +13,143 @@ exports.ExportManager = void 0;
|
|
|
13
13
|
const sdk_geometry_api_sdk_v2_1 = require("@shapediver/sdk.geometry-api-sdk-v2");
|
|
14
14
|
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
15
15
|
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
16
|
+
const Export_1 = require("../dto/Export");
|
|
17
|
+
/**
|
|
18
|
+
* Manager for exports and export related operations.
|
|
19
|
+
*
|
|
20
|
+
* The manager is created by the SessionEngineCore and can be accessed
|
|
21
|
+
* via the `exportManager` property.
|
|
22
|
+
*/
|
|
16
23
|
class ExportManager {
|
|
17
24
|
constructor(sessionEngineCore) {
|
|
18
|
-
this._uuidGenerator = viewer_shared_services_1.UuidGenerator.instance;
|
|
19
25
|
this._eventEngine = viewer_shared_services_1.EventEngine.instance;
|
|
26
|
+
this._exports = {};
|
|
27
|
+
this._uuidGenerator = viewer_shared_services_1.UuidGenerator.instance;
|
|
20
28
|
this._sessionEngineCore = sessionEngineCore;
|
|
21
|
-
this._utilsManager = this._sessionEngineCore.utilsManager;
|
|
22
29
|
}
|
|
30
|
+
get exports() {
|
|
31
|
+
return this._exports;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Cleans the provided export parameters by converting names/displaynames to ids
|
|
35
|
+
* and filling in missing parameters with current session values.
|
|
36
|
+
*
|
|
37
|
+
* @param parameters The provided export parameters
|
|
38
|
+
* @returns The cleaned export parameters
|
|
39
|
+
*/
|
|
40
|
+
cleanExportParameters(parameters) {
|
|
41
|
+
const requestParameterSet = {};
|
|
42
|
+
// first step, we convert all our names and displaynames to ids
|
|
43
|
+
for (const parameterIdOrName in parameters) {
|
|
44
|
+
// we prioritize id, then name and then displayname
|
|
45
|
+
// if there are two parameters with the same name or displayname, we take the one that is found first (no way for us to evaluate which one the user meant)
|
|
46
|
+
const parameterObject = Object.values(this._sessionEngineCore.parameterManager.parameters).find((p) => p.id === parameterIdOrName ||
|
|
47
|
+
p.name === parameterIdOrName ||
|
|
48
|
+
p.displayname === parameterIdOrName);
|
|
49
|
+
// in case the key of the key value pair was neither the id, name or displayname, skip
|
|
50
|
+
if (!parameterObject)
|
|
51
|
+
continue;
|
|
52
|
+
// copy into new dictionary
|
|
53
|
+
requestParameterSet[parameterObject.id] = (" " + parameterObject.stringify(parameters[parameterIdOrName])).slice(1);
|
|
54
|
+
}
|
|
55
|
+
// seconds step, fill all other parameter values that are currently not set
|
|
56
|
+
const currentParameters = this._sessionEngineCore.parameterManager.parameterValues;
|
|
57
|
+
for (const parameterId in currentParameters) {
|
|
58
|
+
// if already set by input values, skip
|
|
59
|
+
if (requestParameterSet[parameterId] !== undefined)
|
|
60
|
+
continue;
|
|
61
|
+
// deep copy into new dictionary
|
|
62
|
+
requestParameterSet[parameterId] = (" " + currentParameters[parameterId]).slice(1);
|
|
63
|
+
}
|
|
64
|
+
return requestParameterSet;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Creates export objects from the current response DTO.
|
|
68
|
+
*
|
|
69
|
+
* Called internally after each customization or export request to update the exports.
|
|
70
|
+
* Exports of type EMAIL and DOWNLOAD are created.
|
|
71
|
+
*
|
|
72
|
+
* Called by SessionEngineCore.updateResponseDto.
|
|
73
|
+
*/
|
|
74
|
+
createExportsFromDto() {
|
|
75
|
+
if (!this._sessionEngineCore.responseDto)
|
|
76
|
+
return;
|
|
77
|
+
for (const exportId in this._sessionEngineCore.responseDto.exports) {
|
|
78
|
+
if (this._sessionEngineCore.responseDto.exports[exportId].type ===
|
|
79
|
+
sdk_geometry_api_sdk_v2_1.ResExportDefinitionType.EMAIL ||
|
|
80
|
+
this._sessionEngineCore.responseDto.exports[exportId].type ===
|
|
81
|
+
sdk_geometry_api_sdk_v2_1.ResExportDefinitionType.DOWNLOAD) {
|
|
82
|
+
if (!this.exports[exportId]) {
|
|
83
|
+
this._sessionEngineCore.responseDto.exports[exportId].id =
|
|
84
|
+
exportId;
|
|
85
|
+
this.exports[exportId] = new Export_1.Export(this._sessionEngineCore.responseDto.exports[exportId], this._sessionEngineCore, this);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this.exports[exportId].updateExport(this._sessionEngineCore.responseDto.exports[exportId]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Requests an export.
|
|
95
|
+
*
|
|
96
|
+
* @param exportId The id of the export to request
|
|
97
|
+
* @param parameters The parameters to use for the export
|
|
98
|
+
* @param maxWaitTime The maximum time to wait for the export to complete
|
|
99
|
+
* @param retry Whether to retry the request in case of failure
|
|
100
|
+
* @returns Promise with the requested export
|
|
101
|
+
*/
|
|
23
102
|
requestExport(exportId, parameters, maxWaitTime, retry = false) {
|
|
24
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
this.
|
|
104
|
+
this._sessionEngineCore.utilsManager.checkAvailability("export");
|
|
26
105
|
try {
|
|
27
106
|
yield this._sessionEngineCore.fileUploadManager.uploadFileParameters(parameters);
|
|
28
107
|
const requestParameterSet = this.cleanExportParameters(parameters);
|
|
29
|
-
const responseDto = yield new sdk_geometry_api_sdk_v2_1.UtilsApi(this._sessionEngineCore.sdkConfig).submitAndWaitForExport(this._sessionEngineCore.sessionId, { exports: [exportId], parameters: requestParameterSet }, maxWaitTime, this._sessionEngineCore.ignoreUnknownParams);
|
|
108
|
+
const responseDto = yield new sdk_geometry_api_sdk_v2_1.UtilsApi(this._sessionEngineCore.sdkConfig).submitAndWaitForExport(this._sessionEngineCore.sessionId, { exports: [exportId], parameters: requestParameterSet }, maxWaitTime, this._sessionEngineCore.parameterManager.ignoreUnknownParams);
|
|
30
109
|
this._sessionEngineCore.updateResponseDto(responseDto);
|
|
31
|
-
return this.
|
|
110
|
+
return this.exports[exportId];
|
|
32
111
|
}
|
|
33
112
|
catch (e) {
|
|
34
|
-
yield this.
|
|
113
|
+
yield this._sessionEngineCore.utilsManager.handleError(e, retry);
|
|
35
114
|
return yield this.requestExport(exportId, parameters, maxWaitTime, true);
|
|
36
115
|
}
|
|
37
116
|
});
|
|
38
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Requests multiple exports.
|
|
120
|
+
*
|
|
121
|
+
* @param body The export request body
|
|
122
|
+
* @param loadOutputs Whether to load outputs as part of the export request
|
|
123
|
+
* @param maxWaitMsec The maximum time to wait for the export to complete
|
|
124
|
+
* @param retry Whether to retry the request in case of failure
|
|
125
|
+
* @returns Promise with the response DTO
|
|
126
|
+
*/
|
|
39
127
|
requestExports(body, loadOutputs = false, maxWaitMsec, retry = false) {
|
|
40
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
129
|
let processId;
|
|
42
130
|
const eventId = this._uuidGenerator.create();
|
|
43
131
|
// if the outputs are loaded, we treat this as a customization by sending the same events
|
|
44
132
|
const treatInternallyAsCustomization = loadOutputs === true &&
|
|
45
|
-
this._sessionEngineCore.allowOutputLoading === true;
|
|
133
|
+
this._sessionEngineCore.outputManager.allowOutputLoading === true;
|
|
46
134
|
const eventInfo = {
|
|
47
135
|
type: viewer_shared_types_1.TASK_TYPE.SESSION_CUSTOMIZATION,
|
|
48
136
|
category: viewer_shared_types_1.TASK_CATEGORY.SESSION_CUSTOMIZATION.CUSTOMIZE_VIA_EXPORTS,
|
|
49
137
|
id: eventId,
|
|
50
138
|
data: { sessionId: this._sessionEngineCore.id },
|
|
51
139
|
};
|
|
52
|
-
this.
|
|
140
|
+
this._sessionEngineCore.utilsManager.checkAvailability("export");
|
|
53
141
|
try {
|
|
54
142
|
if (treatInternallyAsCustomization) {
|
|
55
143
|
this._eventEngine.emitEvent(viewer_shared_services_1.EVENTTYPE.TASK.TASK_START, Object.assign(Object.assign({}, eventInfo), { progress: 0, status: "Customizing session" }));
|
|
56
144
|
}
|
|
57
145
|
// activate the busy mode if outputs are loaded
|
|
58
146
|
if (loadOutputs === true &&
|
|
59
|
-
this._sessionEngineCore.allowOutputLoading ===
|
|
147
|
+
this._sessionEngineCore.outputManager.allowOutputLoading ===
|
|
148
|
+
true &&
|
|
60
149
|
body.outputs &&
|
|
61
150
|
Object.keys(body.outputs).length > 0) {
|
|
62
151
|
processId = this._uuidGenerator.create();
|
|
63
|
-
this.
|
|
152
|
+
this._sessionEngineCore.utilsManager.addBusyMode(processId);
|
|
64
153
|
}
|
|
65
154
|
if (treatInternallyAsCustomization) {
|
|
66
155
|
this._eventEngine.emitEvent(viewer_shared_services_1.EVENTTYPE.TASK.TASK_PROCESS, Object.assign(Object.assign({}, eventInfo), { progress: 0.1, status: "Uploading file parameters" }));
|
|
@@ -75,7 +164,7 @@ class ExportManager {
|
|
|
75
164
|
parameters: requestParameterSet,
|
|
76
165
|
outputs: body.outputs,
|
|
77
166
|
max_wait_time: body.max_wait_time,
|
|
78
|
-
}, maxWaitMsec, this._sessionEngineCore.ignoreUnknownParams);
|
|
167
|
+
}, maxWaitMsec, this._sessionEngineCore.parameterManager.ignoreUnknownParams);
|
|
79
168
|
this._sessionEngineCore.updateResponseDto(responseDto);
|
|
80
169
|
if (treatInternallyAsCustomization) {
|
|
81
170
|
yield this._sessionEngineCore.outputManager.updateOutputs(Object.assign(Object.assign({}, eventInfo), { progressRange: {
|
|
@@ -86,7 +175,7 @@ class ExportManager {
|
|
|
86
175
|
this._eventEngine.emitEvent(viewer_shared_services_1.EVENTTYPE.TASK.TASK_END, Object.assign(Object.assign({}, eventInfo), { progress: 1, status: "Session customized" }));
|
|
87
176
|
}
|
|
88
177
|
if (processId)
|
|
89
|
-
this.
|
|
178
|
+
this._sessionEngineCore.utilsManager.removeBusyMode(processId);
|
|
90
179
|
return responseDto;
|
|
91
180
|
}
|
|
92
181
|
catch (e) {
|
|
@@ -94,38 +183,12 @@ class ExportManager {
|
|
|
94
183
|
this._eventEngine.emitEvent(viewer_shared_services_1.EVENTTYPE.TASK.TASK_CANCEL, Object.assign(Object.assign({}, eventInfo), { progress: 1, status: "Session customization failed" }));
|
|
95
184
|
}
|
|
96
185
|
if (processId)
|
|
97
|
-
this.
|
|
98
|
-
yield this.
|
|
186
|
+
this._sessionEngineCore.utilsManager.removeBusyMode(processId);
|
|
187
|
+
yield this._sessionEngineCore.utilsManager.handleError(e, retry);
|
|
99
188
|
return yield this.requestExports(body, loadOutputs, maxWaitMsec, true);
|
|
100
189
|
}
|
|
101
190
|
});
|
|
102
191
|
}
|
|
103
|
-
cleanExportParameters(parameters) {
|
|
104
|
-
const requestParameterSet = {};
|
|
105
|
-
// first step, we convert all our names and displaynames to ids
|
|
106
|
-
for (const parameterIdOrName in parameters) {
|
|
107
|
-
// we prioritize id, then name and then displayname
|
|
108
|
-
// if there are two parameters with the same name or displayname, we take the one that is found first (no way for us to evaluate which one the user meant)
|
|
109
|
-
const parameterObject = Object.values(this._sessionEngineCore.parameters).find((p) => p.id === parameterIdOrName ||
|
|
110
|
-
p.name === parameterIdOrName ||
|
|
111
|
-
p.displayname === parameterIdOrName);
|
|
112
|
-
// in case the key of the key value pair was neither the id, name or displayname, skip
|
|
113
|
-
if (!parameterObject)
|
|
114
|
-
continue;
|
|
115
|
-
// copy into new dictionary
|
|
116
|
-
requestParameterSet[parameterObject.id] = (" " + parameterObject.stringify(parameters[parameterIdOrName])).slice(1);
|
|
117
|
-
}
|
|
118
|
-
// seconds step, fill all other parameter values that are currently not set
|
|
119
|
-
const currentParameters = this._sessionEngineCore.parameterValues;
|
|
120
|
-
for (const parameterId in currentParameters) {
|
|
121
|
-
// if already set by input values, skip
|
|
122
|
-
if (requestParameterSet[parameterId] !== undefined)
|
|
123
|
-
continue;
|
|
124
|
-
// deep copy into new dictionary
|
|
125
|
-
requestParameterSet[parameterId] = (" " + currentParameters[parameterId]).slice(1);
|
|
126
|
-
}
|
|
127
|
-
return requestParameterSet;
|
|
128
|
-
}
|
|
129
192
|
/**
|
|
130
193
|
* Save the export properties for displayname, order, tooltip and hidden
|
|
131
194
|
*
|
|
@@ -134,13 +197,13 @@ class ExportManager {
|
|
|
134
197
|
*/
|
|
135
198
|
saveExportProperties(exports, retry = false) {
|
|
136
199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
this.
|
|
200
|
+
this._sessionEngineCore.utilsManager.checkAvailability("export-definition", true);
|
|
138
201
|
try {
|
|
139
202
|
yield new sdk_geometry_api_sdk_v2_1.ExportApi(this._sessionEngineCore.sdkConfig).updateExportDefinitions(this._sessionEngineCore.modelId, exports);
|
|
140
203
|
return true;
|
|
141
204
|
}
|
|
142
205
|
catch (e) {
|
|
143
|
-
yield this.
|
|
206
|
+
yield this._sessionEngineCore.utilsManager.handleError(e, retry);
|
|
144
207
|
return yield this.saveExportProperties(exports, true);
|
|
145
208
|
}
|
|
146
209
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportManager.js","sourceRoot":"","sources":["../../../src/implementation/managers/ExportManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ExportManager.js","sourceRoot":"","sources":["../../../src/implementation/managers/ExportManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iFAQ6C;AAC7C,+EAI4C;AAC5C,yEAAyE;AAGzE,0CAAqC;AAGrC;;;;;GAKG;AACH,MAAa,aAAa;IAMzB,YAAY,iBAAoC;QAL/B,iBAAY,GAAG,oCAAW,CAAC,QAAQ,CAAC;QACpC,aAAQ,GAA6B,EAAE,CAAC;QAExC,mBAAc,GAAG,sCAAa,CAAC,QAAQ,CAAC;QAGxD,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;IAED,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACI,qBAAqB,CAAC,UAE5B;QACA,MAAM,mBAAmB,GAAqB,EAAE,CAAC;QAEjD,+DAA+D;QAC/D,KAAK,MAAM,iBAAiB,IAAI,UAAU,EAAE;YAC3C,mDAAmD;YACnD,0JAA0J;YAC1J,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CACpC,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,UAAU,CACnD,CAAC,IAAI,CACL,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,CAAC,EAAE,KAAK,iBAAiB;gBAC1B,CAAC,CAAC,IAAI,KAAK,iBAAiB;gBAC5B,CAAC,CAAC,WAAW,KAAK,iBAAiB,CACpC,CAAC;YAEF,sFAAsF;YACtF,IAAI,CAAC,eAAe;gBAAE,SAAS;YAE/B,2BAA2B;YAC3B,mBAAmB,CAAC,eAAe,CA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C,EAAE;gBACX,MAAM,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;gBACjE,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;aACtD;QACF,CAAC;KAAA;CACD;AAxTD,sCAwTC"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { QueryGltfConversion, ResAssetDefinition, ResBase, ResFileInfo } from "@shapediver/sdk.geometry-api-sdk-v2";
|
|
2
2
|
import { SessionEngineCore } from "../SessionEngineCore";
|
|
3
|
+
/**
|
|
4
|
+
* Manager responsible for file uploads.
|
|
5
|
+
*
|
|
6
|
+
* The manager is created by the SessionEngineCore and can be accessed
|
|
7
|
+
* via the `fileUploadManager` property.
|
|
8
|
+
*/
|
|
3
9
|
export declare class FileUploadManager {
|
|
4
10
|
private readonly _sessionEngineCore;
|
|
5
|
-
private readonly _utilsManager;
|
|
6
11
|
constructor(sessionEngineCore: SessionEngineCore);
|
|
12
|
+
get canUploadGLTF(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves file information for a given parameter and file ID.
|
|
15
|
+
*
|
|
16
|
+
* @param parameterId The ID of the parameter
|
|
17
|
+
* @param fileId The ID of the file
|
|
18
|
+
* @param retry Whether to retry the request in case of failure
|
|
19
|
+
* @returns Promise with the file information
|
|
20
|
+
*/
|
|
7
21
|
getFileInfo(parameterId: string, fileId: string, retry?: boolean): Promise<ResFileInfo>;
|
|
8
|
-
uploadGLTF(blob: Blob, conversion?: QueryGltfConversion, retry?: boolean): Promise<ResBase>;
|
|
9
22
|
/**
|
|
10
23
|
* Get all file parameters from the parameter set.
|
|
11
24
|
* If the parameter is not set in the parameter set, the value from the parameter object is used.
|
|
@@ -18,7 +31,15 @@ export declare class FileUploadManager {
|
|
|
18
31
|
}): {
|
|
19
32
|
[key: string]: string | File | Blob;
|
|
20
33
|
};
|
|
21
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Uploads a file for a given parameter.
|
|
36
|
+
*
|
|
37
|
+
* @param parameterId The ID of the parameter
|
|
38
|
+
* @param data The file to upload
|
|
39
|
+
* @param type The MIME type of the file
|
|
40
|
+
* @param retry Whether to retry the request in case of failure
|
|
41
|
+
* @returns Promise with the file ID
|
|
42
|
+
*/
|
|
22
43
|
uploadFile(parameterId: string, data: File, type: string, retry?: boolean): Promise<string>;
|
|
23
44
|
/**
|
|
24
45
|
* Uploads all file parameters and returns the file parameter values.
|
|
@@ -32,5 +53,22 @@ export declare class FileUploadManager {
|
|
|
32
53
|
}): Promise<{
|
|
33
54
|
[key: string]: string;
|
|
34
55
|
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Uploads a GLTF file to the session.
|
|
58
|
+
*
|
|
59
|
+
* @param blob The GLTF file as a Blob
|
|
60
|
+
* @param conversion The type of conversion to apply
|
|
61
|
+
* @param retry Whether to retry the request in case of failure
|
|
62
|
+
* @returns Promise with the response data
|
|
63
|
+
*/
|
|
64
|
+
uploadGLTF(blob: Blob, conversion?: QueryGltfConversion, retry?: boolean): Promise<ResBase>;
|
|
65
|
+
/**
|
|
66
|
+
* Uploads SDTF files to the session.
|
|
67
|
+
*
|
|
68
|
+
* @param arrayBuffers The SDTF files as ArrayBuffers
|
|
69
|
+
* @param retry Whether to retry the request in case of failure
|
|
70
|
+
* @returns Promise with the response data
|
|
71
|
+
*/
|
|
72
|
+
uploadSDTF(arrayBuffers: ArrayBuffer[], retry?: boolean): Promise<ResAssetDefinition[]>;
|
|
35
73
|
}
|
|
36
74
|
//# sourceMappingURL=FileUploadManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadManager.d.ts","sourceRoot":"","sources":["../../../src/implementation/managers/FileUploadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,mBAAmB,EAEnB,kBAAkB,EAClB,OAAO,EACP,WAAW,EAGX,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"FileUploadManager.d.ts","sourceRoot":"","sources":["../../../src/implementation/managers/FileUploadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,mBAAmB,EAEnB,kBAAkB,EAClB,OAAO,EACP,WAAW,EAGX,MAAM,qCAAqC,CAAC;AAK7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAoB;gBAE3C,iBAAiB,EAAE,iBAAiB;IAIhD,IAAW,aAAa,IAAI,OAAO,CASlC;IAED;;;;;;;OAOG;IACU,WAAW,CACvB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,KAAK,UAAQ,GACX,OAAO,CAAC,WAAW,CAAC;IAwBvB;;;;;;OAMG;IACI,mBAAmB,CAAC,UAAU,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,GAAG;QACjE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;KACpC;IAqBD;;;;;;;;OAQG;IACU,UAAU,CACtB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,KAAK,UAAQ,GACX,OAAO,CAAC,MAAM,CAAC;IA0ClB;;;;;;OAMG;IACU,oBAAoB,CAAC,eAAe,CAAC,EAAE;QACnD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,GAAG,OAAO,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;IAwDpC;;;;;;;OAOG;IACU,UAAU,CACtB,IAAI,EAAE,IAAI,EACV,UAAU,GAAE,mBAA8C,EAC1D,KAAK,UAAQ,GACX,OAAO,CAAC,OAAO,CAAC;IAuBnB;;;;;;OAMG;IACU,UAAU,CACtB,YAAY,EAAE,WAAW,EAAE,EAC3B,KAAK,UAAQ,GACX,OAAO,CAAC,kBAAkB,EAAE,CAAC;CA0ChC"}
|
|
@@ -13,14 +13,36 @@ exports.FileUploadManager = void 0;
|
|
|
13
13
|
const sdk_geometry_api_sdk_v2_1 = require("@shapediver/sdk.geometry-api-sdk-v2");
|
|
14
14
|
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
15
15
|
const FileParameter_1 = require("../dto/FileParameter");
|
|
16
|
+
/**
|
|
17
|
+
* Manager responsible for file uploads.
|
|
18
|
+
*
|
|
19
|
+
* The manager is created by the SessionEngineCore and can be accessed
|
|
20
|
+
* via the `fileUploadManager` property.
|
|
21
|
+
*/
|
|
16
22
|
class FileUploadManager {
|
|
17
23
|
constructor(sessionEngineCore) {
|
|
18
24
|
this._sessionEngineCore = sessionEngineCore;
|
|
19
|
-
this._utilsManager = this._sessionEngineCore.utilsManager;
|
|
20
25
|
}
|
|
26
|
+
get canUploadGLTF() {
|
|
27
|
+
try {
|
|
28
|
+
this._sessionEngineCore.utilsManager.checkAvailability("gltf-upload");
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves file information for a given parameter and file ID.
|
|
37
|
+
*
|
|
38
|
+
* @param parameterId The ID of the parameter
|
|
39
|
+
* @param fileId The ID of the file
|
|
40
|
+
* @param retry Whether to retry the request in case of failure
|
|
41
|
+
* @returns Promise with the file information
|
|
42
|
+
*/
|
|
21
43
|
getFileInfo(parameterId, fileId, retry = false) {
|
|
22
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
this.
|
|
45
|
+
this._sessionEngineCore.utilsManager.checkAvailability();
|
|
24
46
|
try {
|
|
25
47
|
const response = yield new sdk_geometry_api_sdk_v2_1.FileApi(this._sessionEngineCore.sdkConfig).getFileMetadata(this._sessionEngineCore.sessionId, parameterId, fileId);
|
|
26
48
|
const { size, filename } = (0, sdk_geometry_api_sdk_v2_1.extractFileInfo)(response.headers);
|
|
@@ -32,28 +54,11 @@ class FileUploadManager {
|
|
|
32
54
|
};
|
|
33
55
|
}
|
|
34
56
|
catch (e) {
|
|
35
|
-
yield this.
|
|
57
|
+
yield this._sessionEngineCore.utilsManager.handleError(e, retry);
|
|
36
58
|
return yield this.getFileInfo(parameterId, fileId, true);
|
|
37
59
|
}
|
|
38
60
|
});
|
|
39
61
|
}
|
|
40
|
-
uploadGLTF(blob, conversion = sdk_geometry_api_sdk_v2_1.QueryGltfConversion.NONE, retry = false) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
this._utilsManager.checkAvailability("gltf-upload");
|
|
43
|
-
try {
|
|
44
|
-
const responseDto = (yield new sdk_geometry_api_sdk_v2_1.GltfApi(this._sessionEngineCore.sdkConfig).uploadGltf(this._sessionEngineCore.sessionId, new File([blob], "model.gltf", {
|
|
45
|
-
type: "model/gltf-binary",
|
|
46
|
-
}), conversion)).data;
|
|
47
|
-
if (!responseDto || !responseDto.gltf || !responseDto.gltf.href)
|
|
48
|
-
throw new viewer_shared_services_1.ShapeDiverViewerSessionError("Session.uploadGLTF: Upload reply has not the required format.");
|
|
49
|
-
return responseDto;
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
yield this._utilsManager.handleError(e, retry);
|
|
53
|
-
return yield this.uploadGLTF(blob, conversion, true);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
62
|
/**
|
|
58
63
|
* Get all file parameters from the parameter set.
|
|
59
64
|
* If the parameter is not set in the parameter set, the value from the parameter object is used.
|
|
@@ -63,49 +68,30 @@ class FileUploadManager {
|
|
|
63
68
|
*/
|
|
64
69
|
getFileParameterSet(parameters) {
|
|
65
70
|
const fileParameterSet = {};
|
|
66
|
-
for (const parameterId in this._sessionEngineCore.
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
for (const parameterId in this._sessionEngineCore.parameterManager
|
|
72
|
+
.parameters) {
|
|
73
|
+
if (this._sessionEngineCore.parameterManager.parameters[parameterId] instanceof FileParameter_1.FileParameter) {
|
|
69
74
|
fileParameterSet[parameterId] =
|
|
70
75
|
parameters[parameterId] !== undefined
|
|
71
76
|
? parameters[parameterId]
|
|
72
|
-
: this._sessionEngineCore.
|
|
77
|
+
: this._sessionEngineCore.parameterManager
|
|
78
|
+
.parameters[parameterId].value;
|
|
73
79
|
}
|
|
74
80
|
}
|
|
75
81
|
return fileParameterSet;
|
|
76
82
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
87
|
-
}))).data;
|
|
88
|
-
if (!responseDto ||
|
|
89
|
-
!responseDto.asset ||
|
|
90
|
-
!responseDto.asset.sdtf ||
|
|
91
|
-
responseDto.asset.sdtf.length !== arrayBuffers.length)
|
|
92
|
-
throw new viewer_shared_services_1.ShapeDiverViewerSessionError("Session.uploadSDTF: Upload reply has not the required format.");
|
|
93
|
-
const promises = arrayBuffers.map((buffer, index) => {
|
|
94
|
-
const url = responseDto.asset.sdtf[index].href;
|
|
95
|
-
return new sdk_geometry_api_sdk_v2_1.UtilsApi(this._sessionEngineCore.sdkConfig).upload(url, buffer, sdk_geometry_api_sdk_v2_1.ReqSdtfType.MODEL_SDTF);
|
|
96
|
-
});
|
|
97
|
-
yield Promise.all(promises);
|
|
98
|
-
return responseDto.asset.sdtf;
|
|
99
|
-
}
|
|
100
|
-
catch (e) {
|
|
101
|
-
yield this._utilsManager.handleError(e, retry);
|
|
102
|
-
return yield this.uploadSDTF(arrayBuffers, true);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
83
|
+
/**
|
|
84
|
+
* Uploads a file for a given parameter.
|
|
85
|
+
*
|
|
86
|
+
* @param parameterId The ID of the parameter
|
|
87
|
+
* @param data The file to upload
|
|
88
|
+
* @param type The MIME type of the file
|
|
89
|
+
* @param retry Whether to retry the request in case of failure
|
|
90
|
+
* @returns Promise with the file ID
|
|
91
|
+
*/
|
|
106
92
|
uploadFile(parameterId, data, type, retry = false) {
|
|
107
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
this.
|
|
94
|
+
this._sessionEngineCore.utilsManager.checkAvailability("file-upload");
|
|
109
95
|
try {
|
|
110
96
|
const result = (yield new sdk_geometry_api_sdk_v2_1.FileApi(this._sessionEngineCore.sdkConfig).uploadFile(this._sessionEngineCore.sessionId, {
|
|
111
97
|
[parameterId]: {
|
|
@@ -127,7 +113,7 @@ class FileUploadManager {
|
|
|
127
113
|
}
|
|
128
114
|
}
|
|
129
115
|
catch (e) {
|
|
130
|
-
yield this.
|
|
116
|
+
yield this._sessionEngineCore.utilsManager.handleError(e, retry);
|
|
131
117
|
return yield this.uploadFile(parameterId, data, type, true);
|
|
132
118
|
}
|
|
133
119
|
});
|
|
@@ -146,10 +132,10 @@ class FileUploadManager {
|
|
|
146
132
|
: undefined;
|
|
147
133
|
const fileParameterValues = {};
|
|
148
134
|
// load file parameter first
|
|
149
|
-
for (const parameterId in this._sessionEngineCore.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
fileParameterValues[parameterId] = yield (this._sessionEngineCore.parameters[parameterId]).upload(parameterValueSet
|
|
135
|
+
for (const parameterId in this._sessionEngineCore.parameterManager
|
|
136
|
+
.parameters) {
|
|
137
|
+
if (this._sessionEngineCore.parameterManager.parameters[parameterId] instanceof FileParameter_1.FileParameter) {
|
|
138
|
+
fileParameterValues[parameterId] = yield (this._sessionEngineCore.parameterManager.parameters[parameterId]).upload(parameterValueSet
|
|
153
139
|
? parameterValueSet[parameterId]
|
|
154
140
|
: undefined);
|
|
155
141
|
if (parameterValues &&
|
|
@@ -158,21 +144,78 @@ class FileUploadManager {
|
|
|
158
144
|
parameterValues[parameterId] =
|
|
159
145
|
fileParameterValues[parameterId];
|
|
160
146
|
// if the parameter value of the file parameter was used, set the value to the parameter
|
|
161
|
-
if (this._sessionEngineCore.parameters[parameterId]
|
|
162
|
-
.value
|
|
163
|
-
this._sessionEngineCore.parameters[parameterId].value =
|
|
164
|
-
fileParameterValues[parameterId];
|
|
147
|
+
if (this._sessionEngineCore.parameterManager.parameters[parameterId].value !== fileParameterValues[parameterId])
|
|
148
|
+
this._sessionEngineCore.parameterManager.parameters[parameterId].value = fileParameterValues[parameterId];
|
|
165
149
|
}
|
|
166
|
-
else if (this._sessionEngineCore.parameters[parameterId].value !==
|
|
167
|
-
fileParameterValues[parameterId]
|
|
168
|
-
this._sessionEngineCore.parameters[parameterId].value =
|
|
169
|
-
fileParameterValues[parameterId];
|
|
150
|
+
else if (this._sessionEngineCore.parameterManager.parameters[parameterId].value !== fileParameterValues[parameterId]) {
|
|
151
|
+
this._sessionEngineCore.parameterManager.parameters[parameterId].value = fileParameterValues[parameterId];
|
|
170
152
|
}
|
|
171
153
|
}
|
|
172
154
|
}
|
|
173
155
|
return fileParameterValues;
|
|
174
156
|
});
|
|
175
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Uploads a GLTF file to the session.
|
|
160
|
+
*
|
|
161
|
+
* @param blob The GLTF file as a Blob
|
|
162
|
+
* @param conversion The type of conversion to apply
|
|
163
|
+
* @param retry Whether to retry the request in case of failure
|
|
164
|
+
* @returns Promise with the response data
|
|
165
|
+
*/
|
|
166
|
+
uploadGLTF(blob, conversion = sdk_geometry_api_sdk_v2_1.QueryGltfConversion.NONE, retry = false) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
this._sessionEngineCore.utilsManager.checkAvailability("gltf-upload");
|
|
169
|
+
try {
|
|
170
|
+
const responseDto = (yield new sdk_geometry_api_sdk_v2_1.GltfApi(this._sessionEngineCore.sdkConfig).uploadGltf(this._sessionEngineCore.sessionId, new File([blob], "model.gltf", {
|
|
171
|
+
type: "model/gltf-binary",
|
|
172
|
+
}), conversion)).data;
|
|
173
|
+
if (!responseDto || !responseDto.gltf || !responseDto.gltf.href)
|
|
174
|
+
throw new viewer_shared_services_1.ShapeDiverViewerSessionError("Session.uploadGLTF: Upload reply has not the required format.");
|
|
175
|
+
return responseDto;
|
|
176
|
+
}
|
|
177
|
+
catch (e) {
|
|
178
|
+
yield this._sessionEngineCore.utilsManager.handleError(e, retry);
|
|
179
|
+
return yield this.uploadGLTF(blob, conversion, true);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Uploads SDTF files to the session.
|
|
185
|
+
*
|
|
186
|
+
* @param arrayBuffers The SDTF files as ArrayBuffers
|
|
187
|
+
* @param retry Whether to retry the request in case of failure
|
|
188
|
+
* @returns Promise with the response data
|
|
189
|
+
*/
|
|
190
|
+
uploadSDTF(arrayBuffers, retry = false) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
this._sessionEngineCore.utilsManager.checkAvailability("file-upload");
|
|
193
|
+
try {
|
|
194
|
+
const responseDto = (yield new sdk_geometry_api_sdk_v2_1.SdtfApi(this._sessionEngineCore.sdkConfig).uploadSdtf(this._sessionEngineCore.sessionId, arrayBuffers.map((arrayBuffer) => {
|
|
195
|
+
return {
|
|
196
|
+
namespace: "pub",
|
|
197
|
+
content_length: arrayBuffer.byteLength,
|
|
198
|
+
content_type: sdk_geometry_api_sdk_v2_1.ReqSdtfType.MODEL_SDTF,
|
|
199
|
+
};
|
|
200
|
+
}))).data;
|
|
201
|
+
if (!responseDto ||
|
|
202
|
+
!responseDto.asset ||
|
|
203
|
+
!responseDto.asset.sdtf ||
|
|
204
|
+
responseDto.asset.sdtf.length !== arrayBuffers.length)
|
|
205
|
+
throw new viewer_shared_services_1.ShapeDiverViewerSessionError("Session.uploadSDTF: Upload reply has not the required format.");
|
|
206
|
+
const promises = arrayBuffers.map((buffer, index) => {
|
|
207
|
+
const url = responseDto.asset.sdtf[index].href;
|
|
208
|
+
return new sdk_geometry_api_sdk_v2_1.UtilsApi(this._sessionEngineCore.sdkConfig).upload(url, buffer, sdk_geometry_api_sdk_v2_1.ReqSdtfType.MODEL_SDTF);
|
|
209
|
+
});
|
|
210
|
+
yield Promise.all(promises);
|
|
211
|
+
return responseDto.asset.sdtf;
|
|
212
|
+
}
|
|
213
|
+
catch (e) {
|
|
214
|
+
yield this._sessionEngineCore.utilsManager.handleError(e, retry);
|
|
215
|
+
return yield this.uploadSDTF(arrayBuffers, true);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
176
219
|
}
|
|
177
220
|
exports.FileUploadManager = FileUploadManager;
|
|
178
221
|
//# sourceMappingURL=FileUploadManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadManager.js","sourceRoot":"","sources":["../../../src/implementation/managers/FileUploadManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iFAW6C;AAC7C,+EAAgF;
|
|
1
|
+
{"version":3,"file":"FileUploadManager.js","sourceRoot":"","sources":["../../../src/implementation/managers/FileUploadManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iFAW6C;AAC7C,+EAAgF;AAGhF,wDAAmD;AAGnD;;;;;GAKG;AACH,MAAa,iBAAiB;IAG7B,YAAY,iBAAoC;QAC/C,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;IAED,IAAW,aAAa;QACvB,IAAI;YACH,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,iBAAiB,CACrD,aAAa,CACb,CAAC;YACF,OAAO,IAAI,CAAC;SACZ;QAAC,OAAO,CAAC,EAAE;YACX,OAAO,KAAK,CAAC;SACb;IACF,CAAC;IAED;;;;;;;OAOG;IACU,WAAW,CACvB,WAAmB,EACnB,MAAc,EACd,KAAK,GAAG,KAAK;;YAEb,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;YACzD,IAAI;gBACH,MAAM,QAAQ,GAA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