@intuitionrobotics/thunderstorm 0.41.69 → 0.41.72
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/app-backend/api/v1/utils/version/_assert.js +1 -1
- package/app-backend/api/v1/utils/version/_assert.js.map +1 -1
- package/app-backend/api/v1/utils/version/assert.js +13 -58
- package/app-backend/api/v1/utils/version/assert.js.map +1 -1
- package/app-backend/core/BaseStorm.js +34 -87
- package/app-backend/core/BaseStorm.js.map +1 -1
- package/app-backend/core/Storm.js +42 -112
- package/app-backend/core/Storm.js.map +1 -1
- package/app-backend/exceptions.js +11 -27
- package/app-backend/exceptions.js.map +1 -1
- package/app-backend/modules/CleanupScheduler.js +24 -92
- package/app-backend/modules/CleanupScheduler.js.map +1 -1
- package/app-backend/modules/FirestoreBackupScheduler.js +47 -138
- package/app-backend/modules/FirestoreBackupScheduler.js.map +1 -1
- package/app-backend/modules/ForceUpgrade.js +31 -82
- package/app-backend/modules/ForceUpgrade.js.map +1 -1
- package/app-backend/modules/http/AxiosHttpModule.js +116 -184
- package/app-backend/modules/http/AxiosHttpModule.js.map +1 -1
- package/app-backend/modules/proxy/RemoteProxy.js +40 -90
- package/app-backend/modules/proxy/RemoteProxy.js.map +1 -1
- package/app-backend/modules/proxy/RemoteProxyCaller.js +49 -122
- package/app-backend/modules/proxy/RemoteProxyCaller.js.map +1 -1
- package/app-backend/modules/server/HttpServer.js +153 -216
- package/app-backend/modules/server/HttpServer.js.map +1 -1
- package/app-backend/modules/server/server-api.js +236 -361
- package/app-backend/modules/server/server-api.js.map +1 -1
- package/app-backend/modules/server/server-errors.js +51 -91
- package/app-backend/modules/server/server-errors.js.map +1 -1
- package/app-backend/utils/LogClient_File.js +23 -42
- package/app-backend/utils/LogClient_File.js.map +1 -1
- package/app-backend/utils/file.js +7 -50
- package/app-backend/utils/file.js.map +1 -1
- package/app-backend/utils/promisify-request.js +13 -43
- package/app-backend/utils/promisify-request.js.map +1 -1
- package/app-backend/utils/to-be-removed.js +7 -8
- package/app-backend/utils/to-be-removed.js.map +1 -1
- package/app-backend/utils/types.js +1 -1
- package/app-backend/utils/types.js.map +1 -1
- package/app-frontend/components/ActionButton.js +5 -5
- package/app-frontend/components/ActionButton.js.map +1 -1
- package/app-frontend/components/DropDown.js +91 -119
- package/app-frontend/components/DropDown.js.map +1 -1
- package/app-frontend/components/FilterInput.js +31 -48
- package/app-frontend/components/FilterInput.js.map +1 -1
- package/app-frontend/components/GenericSelect.js +30 -59
- package/app-frontend/components/GenericSelect.js.map +1 -1
- package/app-frontend/components/GenericTabs.js +5 -23
- package/app-frontend/components/GenericTabs.js.map +1 -1
- package/app-frontend/components/Overlay.js +15 -34
- package/app-frontend/components/Overlay.js.map +1 -1
- package/app-frontend/components/TS_Input.js +43 -60
- package/app-frontend/components/TS_Input.js.map +1 -1
- package/app-frontend/components/TS_Table.js +31 -48
- package/app-frontend/components/TS_Table.js.map +1 -1
- package/app-frontend/components/TS_TextArea.js +21 -48
- package/app-frontend/components/TS_TextArea.js.map +1 -1
- package/app-frontend/components/Tabs.js +16 -33
- package/app-frontend/components/Tabs.js.map +1 -1
- package/app-frontend/components/adapter/Adapter.js +103 -154
- package/app-frontend/components/adapter/Adapter.js.map +1 -1
- package/app-frontend/components/adapter/BaseRenderer.js +9 -32
- package/app-frontend/components/adapter/BaseRenderer.js.map +1 -1
- package/app-frontend/components/checkbox/TS_Checkbox.js +12 -29
- package/app-frontend/components/checkbox/TS_Checkbox.js.map +1 -1
- package/app-frontend/components/checkbox/TS_CheckboxField.js +16 -34
- package/app-frontend/components/checkbox/TS_CheckboxField.js.map +1 -1
- package/app-frontend/components/form/Form.js +21 -39
- package/app-frontend/components/form/Form.js.map +1 -1
- package/app-frontend/components/playground/Example_NewProps.js +25 -53
- package/app-frontend/components/playground/Example_NewProps.js.map +1 -1
- package/app-frontend/components/playground/Playground.js +21 -49
- package/app-frontend/components/playground/Playground.js.map +1 -1
- package/app-frontend/components/tree/MenuComponent.js +11 -27
- package/app-frontend/components/tree/MenuComponent.js.map +1 -1
- package/app-frontend/components/tree/MultiTypeAdaptor.js +16 -32
- package/app-frontend/components/tree/MultiTypeAdaptor.js.map +1 -1
- package/app-frontend/components/tree/SimpleTreeNodeRenderer.js +18 -52
- package/app-frontend/components/tree/SimpleTreeNodeRenderer.js.map +1 -1
- package/app-frontend/components/tree/Tree.js +142 -178
- package/app-frontend/components/tree/Tree.js.map +1 -1
- package/app-frontend/components/treeicons.js +5 -5
- package/app-frontend/components/treeicons.js.map +1 -1
- package/app-frontend/core/AbstractThunder.js +27 -43
- package/app-frontend/core/AbstractThunder.js.map +1 -1
- package/app-frontend/core/AppPage.js +16 -32
- package/app-frontend/core/AppPage.js.map +1 -1
- package/app-frontend/core/AppWrapper.js +9 -10
- package/app-frontend/core/AppWrapper.js.map +1 -1
- package/app-frontend/core/BaseComponent.js +62 -106
- package/app-frontend/core/BaseComponent.js.map +1 -1
- package/app-frontend/core/SimpleScriptInjector.js +12 -31
- package/app-frontend/core/SimpleScriptInjector.js.map +1 -1
- package/app-frontend/core/Thunder.js +32 -48
- package/app-frontend/core/Thunder.js.map +1 -1
- package/app-frontend/core/thunder-dispatcher.js +18 -67
- package/app-frontend/core/thunder-dispatcher.js.map +1 -1
- package/app-frontend/modules/ConnectivityModule.js +16 -32
- package/app-frontend/modules/ConnectivityModule.js.map +1 -1
- package/app-frontend/modules/ForceUpgrade.js +17 -33
- package/app-frontend/modules/ForceUpgrade.js.map +1 -1
- package/app-frontend/modules/HistoryModule.js +51 -79
- package/app-frontend/modules/HistoryModule.js.map +1 -1
- package/app-frontend/modules/ResourcesModule.js +12 -28
- package/app-frontend/modules/ResourcesModule.js.map +1 -1
- package/app-frontend/modules/StorageModule.js +47 -68
- package/app-frontend/modules/StorageModule.js.map +1 -1
- package/app-frontend/modules/ThunderstormModule.js +15 -31
- package/app-frontend/modules/ThunderstormModule.js.map +1 -1
- package/app-frontend/modules/component-loader/ReactEntryComponentInjector.js +24 -41
- package/app-frontend/modules/component-loader/ReactEntryComponentInjector.js.map +1 -1
- package/app-frontend/modules/component-loader/entry-component-loading-module.js +19 -36
- package/app-frontend/modules/component-loader/entry-component-loading-module.js.map +1 -1
- package/app-frontend/modules/dialog/Dialog.js +55 -96
- package/app-frontend/modules/dialog/Dialog.js.map +1 -1
- package/app-frontend/modules/dialog/DialogModule.js +48 -84
- package/app-frontend/modules/dialog/DialogModule.js.map +1 -1
- package/app-frontend/modules/http/HttpClient.js +46 -93
- package/app-frontend/modules/http/HttpClient.js.map +1 -1
- package/app-frontend/modules/http/XhrHttpModule.js +66 -88
- package/app-frontend/modules/http/XhrHttpModule.js.map +1 -1
- package/app-frontend/modules/locale/LocaleModule.js +23 -50
- package/app-frontend/modules/locale/LocaleModule.js.map +1 -1
- package/app-frontend/modules/menu/MenuAndButton.js +23 -40
- package/app-frontend/modules/menu/MenuAndButton.js.map +1 -1
- package/app-frontend/modules/menu/MenuModule.js +25 -42
- package/app-frontend/modules/menu/MenuModule.js.map +1 -1
- package/app-frontend/modules/menu/PopupMenu.js +37 -64
- package/app-frontend/modules/menu/PopupMenu.js.map +1 -1
- package/app-frontend/modules/routing/RoutingModule.js +47 -66
- package/app-frontend/modules/routing/RoutingModule.js.map +1 -1
- package/app-frontend/modules/routing/route.js +31 -33
- package/app-frontend/modules/routing/route.js.map +1 -1
- package/app-frontend/modules/toaster/BaseToaster.js +18 -36
- package/app-frontend/modules/toaster/BaseToaster.js.map +1 -1
- package/app-frontend/modules/toaster/Toaster.js +12 -38
- package/app-frontend/modules/toaster/Toaster.js.map +1 -1
- package/app-frontend/modules/toaster/ToasterModule.js +61 -88
- package/app-frontend/modules/toaster/ToasterModule.js.map +1 -1
- package/app-frontend/modules/tooltip/Tooltip.js +25 -52
- package/app-frontend/modules/tooltip/Tooltip.js.map +1 -1
- package/app-frontend/modules/tooltip/TooltipModule.js +32 -51
- package/app-frontend/modules/tooltip/TooltipModule.js.map +1 -1
- package/app-frontend/tools/KeyboardListener.js +24 -41
- package/app-frontend/tools/KeyboardListener.js.map +1 -1
- package/app-frontend/tools/Stylable.js +14 -28
- package/app-frontend/tools/Stylable.js.map +1 -1
- package/app-frontend/utils/tools.js +8 -8
- package/app-frontend/utils/tools.js.map +1 -1
- package/app-frontend/widgets/FieldEditor.js +16 -32
- package/app-frontend/widgets/FieldEditor.js.map +1 -1
- package/app-frontend/widgets/FieldEditorClick.js +32 -49
- package/app-frontend/widgets/FieldEditorClick.js.map +1 -1
- package/app-frontend/widgets/FieldEditorWithButtons.js +33 -49
- package/app-frontend/widgets/FieldEditorWithButtons.js.map +1 -1
- package/app-frontend/widgets/click-to-drag/ClickToDrag.js +25 -41
- package/app-frontend/widgets/click-to-drag/ClickToDrag.js.map +1 -1
- package/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.js +22 -38
- package/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.js.map +1 -1
- package/package.json +4 -4
- package/shared/BaseHttpModule.js +44 -64
- package/shared/BaseHttpModule.js.map +1 -1
- package/shared/BaseHttpRequest.js +122 -176
- package/shared/BaseHttpRequest.js.map +1 -1
- package/shared/request-types.js +4 -19
- package/shared/request-types.js.map +1 -1
- package/test-backend/StormTester.js +37 -90
- package/test-backend/StormTester.js.map +1 -1
|
@@ -19,51 +19,32 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.Overlay = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
zIndex
|
|
24
|
+
const React = require("react");
|
|
25
|
+
const overlayStyle = (zIndex) => ({
|
|
26
|
+
zIndex,
|
|
40
27
|
position: 'fixed',
|
|
41
28
|
top: 0,
|
|
42
29
|
left: 0,
|
|
43
30
|
right: 0,
|
|
44
31
|
bottom: 0
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
zIndex
|
|
32
|
+
});
|
|
33
|
+
const childrenStyle = (zIndex) => ({
|
|
34
|
+
zIndex,
|
|
48
35
|
display: "inline-block"
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
function Overlay() {
|
|
53
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
54
|
-
}
|
|
55
|
-
Overlay.prototype.render = function () {
|
|
56
|
-
var _this = this;
|
|
36
|
+
});
|
|
37
|
+
class Overlay extends React.Component {
|
|
38
|
+
render() {
|
|
57
39
|
if (!this.props.showOverlay)
|
|
58
40
|
return this.props.children;
|
|
59
41
|
return React.createElement(React.Fragment, null,
|
|
60
42
|
React.createElement("div", { style: childrenStyle(this.props.zIndex + 1) }, this.props.children),
|
|
61
|
-
React.createElement("div", { onClick:
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
zIndex: 2
|
|
65
|
-
};
|
|
66
|
-
return Overlay;
|
|
67
|
-
}(React.Component));
|
|
43
|
+
React.createElement("div", { onClick: event => this.props.onClickOverlay(event), style: overlayStyle(this.props.zIndex) }));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
68
46
|
exports.Overlay = Overlay;
|
|
47
|
+
Overlay.defaultProps = {
|
|
48
|
+
zIndex: 2
|
|
49
|
+
};
|
|
69
50
|
//# sourceMappingURL=Overlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/Overlay.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"Overlay.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/Overlay.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,+BAA+B;AAS/B,MAAM,YAAY,GAAG,CAAC,MAAc,EAAiB,EAAE,CAAC,CAAC;IACxD,MAAM;IACN,QAAQ,EAAE,OAAO;IACjB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;CACT,CAAC,CAAC;AACH,MAAM,aAAa,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAC1C,MAAM;IACN,OAAO,EAAE,cAAc;CACvB,CAAC,CAAC;AAEH,MAAa,OACZ,SAAQ,KAAK,CAAC,SAAgB;IAM9B,MAAM;QACL,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QAE5B,OAAO;YACN,6BAAK,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CACf;YACN,6BACC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAClD,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GACrC,CACA,CAAA;IACJ,CAAC;;AApBF,0BAqBC;AAlBO,oBAAY,GAAmB;IACrC,MAAM,EAAE,CAAC;CACT,CAAC"}
|
|
@@ -19,92 +19,75 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.TS_Input = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
__extends(TS_Input, _super);
|
|
24
|
+
const React = require("react");
|
|
25
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
26
|
+
const MIN_DELTA = 200;
|
|
27
|
+
class TS_Input extends React.Component {
|
|
42
28
|
// static defaultProps: Partial<Props_FilterInput<string>> = {
|
|
43
29
|
// id: generateHex(16)
|
|
44
30
|
// };
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
constructor(props) {
|
|
32
|
+
super(props);
|
|
33
|
+
this.handleKeyEvent = (ev) => {
|
|
48
34
|
ev.stopPropagation();
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
if (
|
|
52
|
-
|
|
35
|
+
if (this.props.onAccept && ev.key === "Enter")
|
|
36
|
+
this.props.onAccept();
|
|
37
|
+
if (this.props.onCancel && ev.key === "Escape")
|
|
38
|
+
this.props.onCancel();
|
|
53
39
|
};
|
|
54
|
-
|
|
55
|
-
if (!
|
|
40
|
+
this.onClick = (ev) => {
|
|
41
|
+
if (!this.ref || !this.props.focus)
|
|
56
42
|
return;
|
|
57
43
|
ev.stopPropagation();
|
|
58
|
-
|
|
59
|
-
if (!
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
delete
|
|
63
|
-
|
|
44
|
+
const now = ts_common_1.currentTimeMillies();
|
|
45
|
+
if (!this.clickedTimestamp || now - this.clickedTimestamp >= MIN_DELTA)
|
|
46
|
+
return this.clickedTimestamp = now;
|
|
47
|
+
this.timeout && ts_common_1._clearTimeout(this.timeout);
|
|
48
|
+
delete this.clickedTimestamp;
|
|
49
|
+
this.ref.select();
|
|
64
50
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
51
|
+
this.changeValue = (event) => {
|
|
52
|
+
const value = event.target.value;
|
|
53
|
+
this.props.onChange(value, event.target.id);
|
|
54
|
+
this.setState({ value: value });
|
|
69
55
|
};
|
|
70
|
-
|
|
71
|
-
return _this;
|
|
56
|
+
this.state = TS_Input.getInitialState(props);
|
|
72
57
|
}
|
|
73
58
|
;
|
|
74
|
-
|
|
59
|
+
static getInitialState(props) {
|
|
75
60
|
return {
|
|
76
61
|
id: props.id,
|
|
77
62
|
name: props.name,
|
|
78
63
|
initialValue: props.value,
|
|
79
64
|
value: props.value || ""
|
|
80
65
|
};
|
|
81
|
-
}
|
|
82
|
-
|
|
66
|
+
}
|
|
67
|
+
static getDerivedStateFromProps(props, state) {
|
|
83
68
|
if (props.id === state.id && state.name === props.name && state.initialValue === props.value)
|
|
84
69
|
return { value: state.value };
|
|
85
70
|
return TS_Input.getInitialState(props);
|
|
86
|
-
}
|
|
87
|
-
|
|
71
|
+
}
|
|
72
|
+
componentWillUnmount() {
|
|
88
73
|
var _a;
|
|
89
74
|
(_a = this.ref) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.props.handleKeyEvent || this.handleKeyEvent);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return React.createElement("input", { className: this.props.className, name: this.props.name || this.props.id, style: this.props.style, key: this.props.id, id: this.props.id, type: this.props.type, onClick: this.onClick, value: this.state.value, placeholder: this.props.placeholder, onChange: this.changeValue, onBlur: function () {
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
const handleKeyEvent = this.props.handleKeyEvent || this.handleKeyEvent;
|
|
78
|
+
return React.createElement("input", { className: this.props.className, name: this.props.name || this.props.id, style: this.props.style, key: this.props.id, id: this.props.id, type: this.props.type, onClick: this.onClick, value: this.state.value, placeholder: this.props.placeholder, onChange: this.changeValue, onBlur: () => {
|
|
95
79
|
var _a;
|
|
96
|
-
(_a =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}, ref:
|
|
100
|
-
if (
|
|
80
|
+
(_a = this.ref) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', handleKeyEvent);
|
|
81
|
+
this.ref = null;
|
|
82
|
+
this.props.onBlur && this.props.onBlur();
|
|
83
|
+
}, ref: input => {
|
|
84
|
+
if (this.ref || !input)
|
|
101
85
|
return;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
86
|
+
this.ref = input;
|
|
87
|
+
this.props.focus && this.ref.focus();
|
|
88
|
+
this.ref.addEventListener('keydown', handleKeyEvent);
|
|
105
89
|
}, spellCheck: this.props.spellCheck });
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
}(React.Component));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
109
92
|
exports.TS_Input = TS_Input;
|
|
110
93
|
//# sourceMappingURL=TS_Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TS_Input.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/TS_Input.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"TS_Input.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/TS_Input.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;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AAC,EAAE,EACtC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EACjB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAC1B,MAAM,EAAE,GAAG,EAAE;;gBACZ,MAAA,IAAI,CAAC,GAAG,0CAAE,mBAAmB,CAAC,SAAS,EAAE,cAAc,EAAE;gBACzD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;gBAChB,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YAC1C,CAAC,EACD,GAAG,EAAE,KAAK,CAAC,EAAE;gBACZ,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK;oBACrB,OAAO;gBAER,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;gBACjB,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;gBACrC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;YACtD,CAAC,EACD,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GAChC,CAAC;IACJ,CAAC;CACD;AAjGD,4BAiGC"}
|
|
@@ -19,85 +19,68 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.TS_Table = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return _super.call(this, p) || this;
|
|
24
|
+
const React = require("react");
|
|
25
|
+
class TS_Table extends React.Component {
|
|
26
|
+
constructor(p) {
|
|
27
|
+
super(p);
|
|
42
28
|
}
|
|
43
|
-
|
|
29
|
+
render() {
|
|
44
30
|
var _a, _b;
|
|
45
31
|
return React.createElement("table", { className: this.props.className, style: this.props.style },
|
|
46
32
|
React.createElement("tbody", { className: (_a = this.props.body) === null || _a === void 0 ? void 0 : _a.className, style: (_b = this.props.body) === null || _b === void 0 ? void 0 : _b.style },
|
|
47
33
|
this.renderTableHeader(),
|
|
48
34
|
this.renderTableBody()));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
var _this = this;
|
|
35
|
+
}
|
|
36
|
+
renderTableHeader() {
|
|
52
37
|
var _a, _b, _c;
|
|
53
|
-
|
|
38
|
+
let renderers;
|
|
54
39
|
if (typeof this.props.headerRenderer === "object")
|
|
55
40
|
renderers = this.props.headerRenderer;
|
|
56
41
|
else
|
|
57
|
-
renderers = this.props.header.reduce(
|
|
58
|
-
toRet[headerProp] =
|
|
42
|
+
renderers = this.props.header.reduce((toRet, headerProp) => {
|
|
43
|
+
toRet[headerProp] = this.props.headerRenderer;
|
|
59
44
|
return toRet;
|
|
60
45
|
}, {});
|
|
61
|
-
return (React.createElement("tr", { key: this.props.id
|
|
62
|
-
this.props.header.map(
|
|
46
|
+
return (React.createElement("tr", { key: `${this.props.id}-0`, className: (_a = this.props.tr) === null || _a === void 0 ? void 0 : _a.className, style: (_b = this.props.tr) === null || _b === void 0 ? void 0 : _b.style },
|
|
47
|
+
this.props.header.map((header, index) => {
|
|
63
48
|
var _a, _b;
|
|
64
|
-
return React.createElement("td", { key:
|
|
49
|
+
return React.createElement("td", { key: `${this.props.id}-${index}`, className: (_a = this.props.td) === null || _a === void 0 ? void 0 : _a.className, style: (_b = this.props.td) === null || _b === void 0 ? void 0 : _b.style }, renderers[header](header));
|
|
65
50
|
}), (_c = this.props.actions) === null || _c === void 0 ? void 0 :
|
|
66
|
-
_c.map(
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
var _this = this;
|
|
51
|
+
_c.map((action, index) => React.createElement("td", { key: `${this.props.id}-${this.props.header.length + index}` }))));
|
|
52
|
+
}
|
|
53
|
+
renderTableBody() {
|
|
70
54
|
var _a;
|
|
71
|
-
|
|
55
|
+
let renderers;
|
|
72
56
|
if (typeof this.props.cellRenderer === "object")
|
|
73
57
|
renderers = this.props.cellRenderer;
|
|
74
58
|
else
|
|
75
|
-
renderers = this.props.header.reduce(
|
|
76
|
-
toRet[headerProp] =
|
|
59
|
+
renderers = this.props.header.reduce((toRet, headerProp) => {
|
|
60
|
+
toRet[headerProp] = this.props.cellRenderer;
|
|
77
61
|
return toRet;
|
|
78
62
|
}, {});
|
|
79
|
-
|
|
63
|
+
let actionsRenderers;
|
|
80
64
|
if (typeof this.props.actionsRenderer === "object")
|
|
81
65
|
actionsRenderers = this.props.actionsRenderer;
|
|
82
66
|
else
|
|
83
|
-
actionsRenderers = (_a = this.props.actions) === null || _a === void 0 ? void 0 : _a.reduce(
|
|
84
|
-
toRet[actionKey] =
|
|
67
|
+
actionsRenderers = (_a = this.props.actions) === null || _a === void 0 ? void 0 : _a.reduce((toRet, actionKey) => {
|
|
68
|
+
toRet[actionKey] = this.props.actionsRenderer;
|
|
85
69
|
return toRet;
|
|
86
70
|
}, {});
|
|
87
|
-
return this.props.rows.map(
|
|
71
|
+
return this.props.rows.map((row, rowIndex) => {
|
|
88
72
|
var _a, _b, _c;
|
|
89
|
-
return (React.createElement("tr", { key:
|
|
90
|
-
|
|
73
|
+
return (React.createElement("tr", { key: `${this.props.id}-${rowIndex}`, className: (_a = this.props.tr) === null || _a === void 0 ? void 0 : _a.className, style: (_b = this.props.tr) === null || _b === void 0 ? void 0 : _b.style },
|
|
74
|
+
this.props.header.map((header, columnIndex) => {
|
|
91
75
|
var _a, _b;
|
|
92
|
-
return React.createElement("td", { key:
|
|
93
|
-
}), (_c =
|
|
94
|
-
_c.map(
|
|
76
|
+
return React.createElement("td", { key: `${this.props.id}-${columnIndex}`, className: (_a = this.props.td) === null || _a === void 0 ? void 0 : _a.className, style: (_b = this.props.td) === null || _b === void 0 ? void 0 : _b.style }, renderers[header](row[header], rowIndex, this.props.header[columnIndex]));
|
|
77
|
+
}), (_c = this.props.actions) === null || _c === void 0 ? void 0 :
|
|
78
|
+
_c.map((actionKey, index) => {
|
|
95
79
|
var _a, _b;
|
|
96
|
-
return React.createElement("td", { key:
|
|
80
|
+
return React.createElement("td", { key: `${this.props.id}-${this.props.header.length + index}`, className: (_a = this.props.td) === null || _a === void 0 ? void 0 : _a.className, style: (_b = this.props.td) === null || _b === void 0 ? void 0 : _b.style }, actionsRenderers === null || actionsRenderers === void 0 ? void 0 : actionsRenderers[actionKey](rowIndex, actionKey));
|
|
97
81
|
})));
|
|
98
82
|
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
}(React.Component));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
102
85
|
exports.TS_Table = TS_Table;
|
|
103
86
|
//# sourceMappingURL=TS_Table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TS_Table.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/TS_Table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AAC,MAAM,GAAG,KAAK,EAAE,EAAE,SAAS,QAAE,IAAI,CAAC,KAAK,CAAC,EAAE,0CAAE,SAAS,EAChG,KAAK,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,EAAE,0CAAE,KAAsB,IACrD,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,SAAS,EAAE,QAAQ,EAAE,SAAS,EAC9C,CAAC;gBACP,CAAC,EACG,CACL,CAAA;SAAA,CAAC,CAAC;IACJ,CAAC;CACD;AAvED,4BAuEC"}
|
|
@@ -19,70 +19,43 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __assign = (this && this.__assign) || function () {
|
|
36
|
-
__assign = Object.assign || function(t) {
|
|
37
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
38
|
-
s = arguments[i];
|
|
39
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
40
|
-
t[p] = s[p];
|
|
41
|
-
}
|
|
42
|
-
return t;
|
|
43
|
-
};
|
|
44
|
-
return __assign.apply(this, arguments);
|
|
45
|
-
};
|
|
46
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
23
|
exports.TS_TextArea = void 0;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
_this.changeValue = function (event) {
|
|
24
|
+
const React = require("react");
|
|
25
|
+
class TS_TextArea extends React.Component {
|
|
26
|
+
constructor(props) {
|
|
27
|
+
super(props);
|
|
28
|
+
this.changeValue = (event) => {
|
|
54
29
|
var _a, _b;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
(_b = (_a =
|
|
30
|
+
const value = event.target.value;
|
|
31
|
+
this.setState({ value });
|
|
32
|
+
(_b = (_a = this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value, event.target.id);
|
|
58
33
|
};
|
|
59
|
-
|
|
60
|
-
if (!
|
|
34
|
+
this.handleKeyPress = (event) => {
|
|
35
|
+
if (!this.props.onAccept)
|
|
61
36
|
return;
|
|
62
37
|
if (event.key === "Escape")
|
|
63
|
-
|
|
38
|
+
this.props.onAccept();
|
|
64
39
|
};
|
|
65
|
-
|
|
66
|
-
return _this;
|
|
40
|
+
this.state = TS_TextArea.getInitialState(props);
|
|
67
41
|
}
|
|
68
|
-
|
|
42
|
+
static getInitialState(props) {
|
|
69
43
|
return {
|
|
70
44
|
id: props.id,
|
|
71
45
|
name: props.name,
|
|
72
46
|
initialValue: props.value,
|
|
73
47
|
value: props.value || ""
|
|
74
48
|
};
|
|
75
|
-
}
|
|
76
|
-
|
|
49
|
+
}
|
|
50
|
+
static getDerivedStateFromProps(props, state) {
|
|
77
51
|
if (props.id === state.id && state.name === props.name && state.initialValue === props.value)
|
|
78
52
|
return { value: state.value };
|
|
79
53
|
return TS_TextArea.getInitialState(props);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return React.createElement("textarea", { disabled: this.props.enable === false, key: id, id: id, onKeyPress: this.handleKeyPress, onChange: this.changeValue, value: this.state.value, placeholder: placeholder, style:
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
}(React.Component));
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
const { id, placeholder, style } = this.props;
|
|
57
|
+
return React.createElement("textarea", { disabled: this.props.enable === false, key: id, id: id, onKeyPress: this.handleKeyPress, onChange: this.changeValue, value: this.state.value, placeholder: placeholder, style: Object.assign({}, style) });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
87
60
|
exports.TS_TextArea = TS_TextArea;
|
|
88
61
|
//# sourceMappingURL=TS_TextArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TS_TextArea.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/TS_TextArea.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"TS_TextArea.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/TS_TextArea.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,+BAA+B;AAwB/B,MAAa,WACZ,SAAQ,KAAK,CAAC,SAAuC;IAErD,YAAY,KAA4B;QACvC,KAAK,CAAC,KAAK,CAAC,CAAC;QAsBd,gBAAW,GAAG,CAAC,KAA6C,EAAE,EAAE;;YAC/D,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;YACjC,IAAI,CAAC,QAAQ,CAAC,EAAC,KAAK,EAAC,CAAC,CAAC;YACvB,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,QAAQ,mDAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAS,EAAE;QACtD,CAAC,CAAC;QAEF,mBAAc,GAAG,CAAC,KAAoB,EAAE,EAAE;YACzC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACvB,OAAO;YAER,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;gBACzB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC;QAhCD,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;IAEO,MAAM,CAAC,eAAe,CAAC,KAA4B;QAC1D,OAAO;YACN,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,YAAY,EAAE,KAAK,CAAC,KAAK;YACzB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;SACxB,CAAC;IACH,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAA4B,EAAE,KAAY;QACzE,IAAI,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,YAAY,KAAK,KAAK,CAAC,KAAK;YAC3F,OAAO,EAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAC,CAAC;QAE7B,OAAO,WAAW,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAiBD,MAAM;QACL,MAAM,EAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5C,OAAO,kCACN,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,KAAK,EACrC,GAAG,EAAE,EAAE,EACP,EAAE,EAAE,EAAE,EACN,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,QAAQ,EAAE,IAAI,CAAC,WAAW,EAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,WAAW,EAAE,WAAW,EACxB,KAAK,oBAAM,KAAK,IACf,CAAC;IACJ,CAAC;CAED;AAtDD,kCAsDC"}
|
|
@@ -1,49 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.Tabs = exports.Tab = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
const React = require("react");
|
|
5
|
+
class Tab {
|
|
6
|
+
constructor(title, content) {
|
|
20
7
|
this.title = title;
|
|
21
8
|
this.content = content;
|
|
22
9
|
}
|
|
23
|
-
|
|
24
|
-
}());
|
|
10
|
+
}
|
|
25
11
|
exports.Tab = Tab;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var style = selected ? _this.props.selectedStyle : _this.props.nonSelectedStyle;
|
|
12
|
+
class Tabs extends React.Component {
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
this.renderTabHandle = (tab, key) => {
|
|
16
|
+
const selected = tab === this.state.selectedTab;
|
|
17
|
+
const style = selected ? this.props.selectedStyle : this.props.nonSelectedStyle;
|
|
33
18
|
return React.createElement("div", { key: key, style: { paddingLeft: 10, paddingRight: 10 } },
|
|
34
|
-
React.createElement("span", { className:
|
|
19
|
+
React.createElement("span", { className: `clickable`, onClick: () => this.setState({ selectedTab: tab }), style: style }, tab.title));
|
|
35
20
|
};
|
|
36
|
-
|
|
37
|
-
selectedTab:
|
|
21
|
+
this.state = {
|
|
22
|
+
selectedTab: this.props.tabs[0]
|
|
38
23
|
};
|
|
39
|
-
return _this;
|
|
40
24
|
}
|
|
41
|
-
|
|
25
|
+
render() {
|
|
42
26
|
return React.createElement("div", null,
|
|
43
27
|
React.createElement("div", { className: 'll_h_c', style: { height: 28, justifyContent: "center" } }, this.props.tabs.map(this.renderTabHandle)),
|
|
44
28
|
this.state.selectedTab.content);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
}(React.Component));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
48
31
|
exports.Tabs = Tabs;
|
|
49
32
|
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/Tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/main/app-frontend/components/Tabs.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAM/B,MAAa,GAAG;IAKf,YAAY,KAAa,EAAE,OAAkB;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;CAED;AAVD,kBAUC;AAYD,MAAa,IACZ,SAAQ,KAAK,CAAC,SAAuB;IAErC,YAAY,KAAY;QACvB,KAAK,CAAC,KAAK,CAAC,CAAC;QAed,oBAAe,GAAG,CAAC,GAAQ,EAAE,GAAW,EAAE,EAAE;YAC3C,MAAM,QAAQ,GAAG,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;YAChD,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC;YAChF,OAAO,6BAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAC,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAC;gBAC/D,8BAAM,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CA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