opengate-js 14.4.0 → 14.6.0

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.
Files changed (42) hide show
  1. package/bower.json +1 -1
  2. package/dist/{opengate-api-bower-14.4.0.js → opengate-api-bower-14.6.0.js} +75 -78
  3. package/dist/opengate-api-bower-14.6.0.js.map +1 -0
  4. package/dist/{opengate-api-bower-14.4.0.min.js → opengate-api-bower-14.6.0.min.js} +2 -2
  5. package/dist/opengate-api-bower-14.6.0.min.js.map +1 -0
  6. package/dist/src/connectorsFunctions/configuration/ConnectorFunctionsHelper.js +2 -16
  7. package/dist/src/connectorsFunctions/configuration/ConnectorFunctionsHelper.js.map +1 -1
  8. package/dist/src/rulesConfiguration/RuleConfigurationsHelper.js +2 -16
  9. package/dist/src/rulesConfiguration/RuleConfigurationsHelper.js.map +1 -1
  10. package/dist/src/searching/builder/AlarmsSearchBuilder.js +1 -1
  11. package/dist/src/timeseries/TimeseriesFinder.js +66 -41
  12. package/dist/src/timeseries/TimeseriesFinder.js.map +1 -1
  13. package/docs/ast/source/connectorsFunctions/configuration/ConnectorFunctionsHelper.js.json +2967 -4055
  14. package/docs/ast/source/rulesConfiguration/RuleConfigurationsHelper.js.json +2026 -3114
  15. package/docs/ast/source/searching/builder/AlarmsSearchBuilder.js.json +94 -94
  16. package/docs/ast/source/timeseries/TimeseriesFinder.js.json +5383 -1025
  17. package/docs/class/src/connectorsFunctions/configuration/ConnectorFunctionsHelper.js~ConnectorFunctionsHelper.html +4 -88
  18. package/docs/class/src/rulesConfiguration/RuleConfigurationsHelper.js~RuleConfigurationsHelper.html +2 -86
  19. package/docs/class/src/searching/builder/AlarmsSearchBuilder.js~AlarmsSearchBuilder.html +3 -3
  20. package/docs/class/src/timeseries/TimeseriesFinder.js~TimeseriesFinder.html +18 -4
  21. package/docs/coverage.json +9 -9
  22. package/docs/dump.json +2315 -2397
  23. package/docs/file/src/connectorsFunctions/configuration/ConnectorFunctionsHelper.js.html +0 -12
  24. package/docs/file/src/rulesConfiguration/RuleConfigurationsHelper.js.html +0 -12
  25. package/docs/file/src/searching/builder/AlarmsSearchBuilder.js.html +1 -1
  26. package/docs/file/src/timeseries/TimeseriesFinder.js.html +26 -1
  27. package/docs/package.json +1 -1
  28. package/docs/script/search_index.js +0 -12
  29. package/docs/source.html +244 -244
  30. package/features/features/provision/rulesConfiguration/find_ruleConfigurationsHelper.feature +5 -5
  31. package/features/features/provision/timeseries/find_timeseries.feature +114 -3
  32. package/features/step_definitions/then_step_definitions_using_model.js +0 -3
  33. package/features/step_definitions/when_step_definitions_using_model.js +17 -7
  34. package/features/support/find_model.js +7 -3
  35. package/features/support/world.js +4 -4
  36. package/package.json +1 -1
  37. package/src/connectorsFunctions/configuration/ConnectorFunctionsHelper.js +0 -12
  38. package/src/rulesConfiguration/RuleConfigurationsHelper.js +0 -12
  39. package/src/searching/builder/AlarmsSearchBuilder.js +1 -1
  40. package/src/timeseries/TimeseriesFinder.js +26 -1
  41. package/dist/opengate-api-bower-14.4.0.js.map +0 -1
  42. package/dist/opengate-api-bower-14.4.0.min.js.map +0 -1
@@ -52,27 +52,13 @@ var ConnectorFunctionsHelper = (function (_GenericFinder) {
52
52
  }
53
53
 
54
54
  /**
55
- * Performs a get that returns dummy functions from rules service
55
+ * Performs a get that returns documentation private of javascript functions from rules service
56
56
  * @test
57
- * ogapi.newConnectorFunctionsHelper().getdDummyFunctions();
57
+ * ogapi.newConnectorFunctionsHelper().getDocPrivateJavascriptFunctions();
58
58
  * @return {Promise}
59
59
  */
60
60
 
61
61
  _createClass(ConnectorFunctionsHelper, [{
62
- key: 'getdDummyFunctions',
63
- value: function getdDummyFunctions() {
64
- this._setExtraHeaders(this._jsHeaders);
65
- this._id = 'doc/jsApi/javascript';
66
- return this._execute();
67
- }
68
-
69
- /**
70
- * Performs a get that returns documentation private of javascript functions from rules service
71
- * @test
72
- * ogapi.newConnectorFunctionsHelper().getDocPrivateJavascriptFunctions();
73
- * @return {Promise}
74
- */
75
- }, {
76
62
  key: 'getDocPrivateJavascriptFunctions',
77
63
  value: function getDocPrivateJavascriptFunctions() {
78
64
  this._setExtraHeaders(this._mdHeaders);
@@ -1 +1 @@
1
- {"version":3,"sources":["src/connectorsFunctions/configuration/ConnectorFunctionsHelper.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;8BAEa,qBAAqB;;;;iBACjC,GAAG;;;;+BACM,mBAAmB;;;;yCAMnC,+BAA+B;;;;;;IAKjB,wBAAwB;cAAxB,wBAAwB;;;;;;AAK9B,aALM,wBAAwB,CAK7B,KAAK,EAAE;8BALF,wBAAwB;;AAMrC,mCANa,wBAAwB,6CAM/B,KAAK,EAAE,oBAAoB,EAAE;AACnC,YAAI,CAAC,UAAU,GAAE;AACb,oBAAQ,EAAE,wBAAwB;SACrC,CAAC;AACF,YAAI,CAAC,UAAU,GAAI;AACf,oBAAQ,EAAE,eAAe;SAC5B,CAAA;KACJ;;;;;;;;;iBAbgB,wBAAwB;;eAqBvB,8BAAG;AACjB,gBAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACtC,gBAAI,CAAC,GAAG,GAAG,sBAAsB,CAAA;AACjC,mBAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;SAC1B;;;;;;;;;;eAQgC,4CAAG;AAChC,gBAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACtC,gBAAI,CAAC,GAAG,GAAG,oBAAoB,CAAA;AAC/B,mBAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;;;;;;;;;;;;;;SAc1B;;;;;;;;;;eAOyB,qCAAG;AACzB,gBAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACtC,gBAAI,CAAC,GAAG,GAAG,kBAAkB,CAAA;AAC7B,mBAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;;;;;;;;;;;;;;SAc1B;;;;;;;;eAMQ,oBAAG;AACR,gBAAI,OAAO,GAAG,eAAE,KAAK,EAAE,CAAC;AACxB,gBAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAC9B,gBAAI,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;AAC7C,gBAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAC1F,IAAI,CAAC,UAAC,GAAG,EAAK;AACX,oBAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE;AACxB,2BAAO,CAAC,MAAM,CAAC;AACX,6BAAK,EAAE,gBAAgB;AACvB,kCAAU,EAAE,6BAAW,SAAS;qBACnC,CAAC,CAAC;iBACN,MAAM;AACH,2BAAO,CAAC,OAAO,CAAC;AACZ,4BAAI,EAAE,GAAG;AACT,kCAAU,EAAE,GAAG,CAAC,UAAU;qBAC7B,CAAC,CAAC;iBACN;aACJ,CAAC,SACI,CAAC,UAAC,KAAK,EAAK;AACd,uBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACzB,CAAC,CAAC;AACP,mBAAO,OAAO,CAAC;SAClB;;;eAEyB,sCAAG;AACzB,iFAA0C;SAC7C;;;eAEc,2BAAG;AACd,+EAAwC;SAC3C;;;WA9GgB,wBAAwB;;;qBAAxB,wBAAwB","file":"ConnectorFunctionsHelper.js","sourceRoot":"../../../.."}
1
+ {"version":3,"sources":["src/connectorsFunctions/configuration/ConnectorFunctionsHelper.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;8BAEa,qBAAqB;;;;iBACjC,GAAG;;;;+BACM,mBAAmB;;;;yCAMnC,+BAA+B;;;;;;IAKjB,wBAAwB;cAAxB,wBAAwB;;;;;;AAK9B,aALM,wBAAwB,CAK7B,KAAK,EAAE;8BALF,wBAAwB;;AAMrC,mCANa,wBAAwB,6CAM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AAC,CAAC;iBACN;aACJ,CAAC,SACI,CAAC,UAAC,KAAK,EAAK;AACd,uBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACzB,CAAC,CAAC;AACP,mBAAO,OAAO,CAAC;SAClB;;;eAEyB,sCAAG;AACzB,iFAA0C;SAC7C;;;eAEc,2BAAG;AACd,+EAAwC;SAC3C;;;WAlGgB,wBAAwB;;;qBAAxB,wBAAwB","file":"ConnectorFunctionsHelper.js","sourceRoot":"../../../.."}
@@ -50,27 +50,13 @@ var RuleConfigurationsHelper = (function (_GenericFinder) {
50
50
  }
51
51
 
52
52
  /**
53
- * Performs a get that returns dummy functions from rules service
53
+ * Performs a get that returns documentation private of javascript functions from rules service
54
54
  * @test
55
- * ogapi.newRuleConfigurationsHelper().getdDummyFunctions();
55
+ * ogapi.newRuleConfigurationsHelper().getDocPrivateJavascriptFunctions();
56
56
  * @return {Promise}
57
57
  */
58
58
 
59
59
  _createClass(RuleConfigurationsHelper, [{
60
- key: 'getdDummyFunctions',
61
- value: function getdDummyFunctions() {
62
- this._setExtraHeaders(this._jsHeaders);
63
- this._id = 'js/dummyFunctions';
64
- return this._execute();
65
- }
66
-
67
- /**
68
- * Performs a get that returns documentation private of javascript functions from rules service
69
- * @test
70
- * ogapi.newRuleConfigurationsHelper().getDocPrivateJavascriptFunctions();
71
- * @return {Promise}
72
- */
73
- }, {
74
60
  key: 'getDocPrivateJavascriptFunctions',
75
61
  value: function getDocPrivateJavascriptFunctions() {
76
62
  this._setExtraHeaders(this._mdHeaders);
@@ -1 +1 @@
1
- {"version":3,"sources":["src/rulesConfiguration/RuleConfigurationsHelper.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;8BAEa,kBAAkB;;;;iBAC9B,GAAG;;;;+BACM,mBAAmB;;;;;;;;IAKrB,wBAAwB;cAAxB,wBAAwB;;;;;;AAK9B,aALM,wBAAwB,CAK7B,KAAK,EAAE;8BALF,wBAAwB;;AAMrC,mCANa,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B;AACvB,kCAAU,EAAE,6BAAW,SAAS;qBACnC,CAAC,CAAC;iBACN,MAAM;AACH,2BAAO,CAAC,OAAO,CAAC;AACZ,4BAAI,EAAE,GAAG;AACT,kCAAU,EAAE,GAAG,CAAC,UAAU;qBAC7B,CAAC,CAAC;iBACN;aACJ,CAAC,SACI,CAAC,UAAC,KAAK,EAAK;AACd,uBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACzB,CAAC,CAAC;AACP,mBAAO,OAAO,CAAC;SAClB;;;WA5EgB,wBAAwB;;;qBAAxB,wBAAwB","file":"RuleConfigurationsHelper.js","sourceRoot":"../../.."}
1
+ {"version":3,"sources":["src/rulesConfiguration/RuleConfigurationsHelper.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;8BAEa,kBAAkB;;;;iBAC9B,GAAG;;;;+BACM,mBAAmB;;;;;;;;IAKrB,wBAAwB;cAAxB,wBAAwB;;;;;;AAK9B,aALM,wBAAwB,CAK7B,KAAK,EAAE;8BALF,wBAAwB;;AAMrC,mCANa,wBAAwB,6CAM/B,KAAK,EAAE,OAAO,EAAE;AACtB,YAAI,CAAC,UAAU,GAAE;AACb,oBAAQ,EAAE,wBAAwB;SACrC,CAAC;AACF,YAAI,CAAC,UAAU,GAAI;AACf,oBAAQ,EAAE,eAAe;SAC5B,CAAA;KACJ;;;;;;;;;iBAbgB,wBAAwB;;eAqBR,4CAAG;AAChC,gBAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACtC,gBAAI,CAAC,GAAG,GAAG,iCAAiC,CAAA;AAC5C,mBAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;SAC1B;;;;;;;;;;eAOyB,qCAAG;AACzB,gBAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACtC,gBAAI,CAAC,GAAG,GAAG,yBAAyB,CAAA;AACpC,mBAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;SAC1B;;;;;;;;eAMQ,oBAAG;AACR,gBAAI,OAAO,GAAG,eAAE,KAAK,EAAE,CAAC;AACxB,gBAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAC9B,gBAAI,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;AAC7C,gBAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAC1F,IAAI,CAAC,UAAC,GAAG,EAAK;AACX,oBAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE;AACxB,2BAAO,CAAC,MAAM,CAAC;AACX,6BAAK,EAAE,gBAAgB;AACvB,kCAAU,EAAE,6BAAW,SAAS;qBACnC,CAAC,CAAC;iBACN,MAAM;AACH,2BAAO,CAAC,OAAO,CAAC;AACZ,4BAAI,EAAE,GAAG;AACT,kCAAU,EAAE,GAAG,CAAC,UAAU;qBAC7B,CAAC,CAAC;iBACN;aACJ,CAAC,SACI,CAAC,UAAC,KAAK,EAAK;AACd,uBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACzB,CAAC,CAAC;AACP,mBAAO,OAAO,CAAC;SAClB;;;WAhEgB,wBAAwB;;;qBAAxB,wBAAwB","file":"RuleConfigurationsHelper.js","sourceRoot":"../../.."}
@@ -63,7 +63,7 @@ var AlarmsSearchBuilder = (function (_SearchWithSummaryBuilder) {
63
63
  * The search request will have this group by
64
64
  * @example
65
65
  * @param {!(object)} group
66
- * @return {TimeserieSearchBuilder}
66
+ * @return {AlarmsSearchBuilder}
67
67
  */
68
68
  }, {
69
69
  key: 'group',
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', {
4
- value: true
4
+ value: true
5
5
  });
6
6
 
7
7
  var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
@@ -23,50 +23,75 @@ var _GenericFinder3 = _interopRequireDefault(_GenericFinder2);
23
23
  */
24
24
 
25
25
  var TimeseriesFinder = (function (_GenericFinder) {
26
- _inherits(TimeseriesFinder, _GenericFinder);
27
-
28
- /**
29
- * @param {InternalOpenGateAPI} ogapi - Reference to the API object.
30
- */
31
-
32
- function TimeseriesFinder(ogapi) {
33
- _classCallCheck(this, TimeseriesFinder);
34
-
35
- _get(Object.getPrototypeOf(TimeseriesFinder.prototype), 'constructor', this).call(this, ogapi, 'timeseries/provision/organizations', 'timeseries');
36
- }
37
-
38
- /**
39
- * Performs a get that returns list of timeseries
40
- * @test
41
- * ogapi.newTimeserieFinder().findByOrganization(organization);
42
- * @param {string} organization - organization
43
- * @return {Promise}
44
- */
45
-
46
- _createClass(TimeseriesFinder, [{
47
- key: 'findByOrganization',
48
- value: function findByOrganization(organization) {
49
- this._withId(organization);
50
- return this._execute();
51
- }
26
+ _inherits(TimeseriesFinder, _GenericFinder);
52
27
 
53
- /**
54
- * Performs a get that returns a definition of timeserie
55
- * @test
56
- * ogapi.newTimeserieFinder().findByOrganizationAndTimeserieId(organization, timeserieId);
57
- * @param {string} organization - organization
58
- * @param {string} timeserieId - timeserie identifier
59
- * @return {Promise}
28
+ /**
29
+ * @param {InternalOpenGateAPI} ogapi - Reference to the API object.
60
30
  */
61
- }, {
62
- key: 'findByOrganizationAndTimeserieId',
63
- value: function findByOrganizationAndTimeserieId(organization, timeserieId) {
64
- this._withId(organization + '/' + timeserieId);
65
- return this._execute();
31
+
32
+ function TimeseriesFinder(ogapi) {
33
+ _classCallCheck(this, TimeseriesFinder);
34
+
35
+ _get(Object.getPrototypeOf(TimeseriesFinder.prototype), 'constructor', this).call(this, ogapi, 'timeseries/provision/organizations', 'timeseries');
66
36
  }
67
- }]);
68
37
 
69
- return TimeseriesFinder;
38
+ /**
39
+ * Performs a get that returns list of timeseries
40
+ * @test
41
+ * ogapi.newTimeserieFinder().findByOrganization(organization);
42
+ * ogapi.newTimeserieFinder().findByOrganization(organization, ['columns', 'context']);
43
+ * ogapi.newTimeserieFinder().findByOrganization(organization, [], ['ds_id_1', 'ds_id-2']);
44
+ * ogapi.newTimeserieFinder().findByOrganization(organization, ['columns'], []);
45
+ * ogapi.newTimeserieFinder().findByOrganization(organization, ['columns'], undefined);
46
+ * ogapi.newTimeserieFinder().findByOrganization(organization, undefined, ['ds_id_2']);
47
+ * @param {string} organization - organization
48
+ * @param {Array} expand - ['columns', 'context']
49
+ * @param {Array} dataStreams - ["ds_id_1","ds_id_2"]
50
+ * @return {Promise}
51
+ */
52
+
53
+ _createClass(TimeseriesFinder, [{
54
+ key: 'findByOrganization',
55
+ value: function findByOrganization(organization, expand, dataStreams) {
56
+ this._withId(organization);
57
+ var parameters = {};
58
+ if (expand) {
59
+ if (!(expand instanceof Array)) {
60
+ throw new Error({
61
+ message: "Parameter expand requires an array",
62
+ parameter: 'expand'
63
+ });
64
+ } else if (expand.length > 0) parameters.expand = expand.join();
65
+ }
66
+ if (dataStreams) {
67
+ if (!(dataStreams instanceof Array)) {
68
+ throw new Error({
69
+ message: "Parameter dataStreams requires an array",
70
+ parameter: 'dataStreams'
71
+ });
72
+ } else if (dataStreams.length > 0) parameters.dataStreams = dataStreams.join();
73
+ }
74
+ this._setUrlParameters(parameters);
75
+ return this._execute();
76
+ }
77
+
78
+ /**
79
+ * Performs a get that returns a definition of timeserie
80
+ * @test
81
+ * ogapi.newTimeserieFinder().findByOrganizationAndTimeserieId(organization, timeserieId);
82
+ * @param {string} organization - organization
83
+ * @param {string} timeserieId - timeserie identifier
84
+ * @return {Promise}
85
+ */
86
+ }, {
87
+ key: 'findByOrganizationAndTimeserieId',
88
+ value: function findByOrganizationAndTimeserieId(organization, timeserieId) {
89
+ this._withId(organization + '/' + timeserieId);
90
+ return this._execute();
91
+ }
92
+ }]);
93
+
94
+ return TimeseriesFinder;
70
95
  })(_GenericFinder3['default']);
71
96
 
72
97
  exports['default'] = TimeseriesFinder;
@@ -1 +1 @@
1
- {"version":3,"sources":["src/timeseries/TimeseriesFinder.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;8BAEa,kBAAkB;;;;;;;;IAKvB,gBAAgB;YAAhB,gBAAgB;;;;;;AAKrB,WALK,gBAAgB,CAKpB,KAAK,EAAE;0BALH,gBAAgB;;AAM7B,+BANa,gBAAgB,6CAMvB,KAAK,EAAE,oCAAoC,EAAE,YAAY,EAAE;GACpE;;;;;;;;;;eAPgB,gBAAgB;;WAgBf,4BAAC,YAAY,EAAE;AAC7B,UAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAC3B,aAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;KAC1B;;;;;;;;;;;;WAUgC,0CAAC,YAAY,EAAE,WAAW,EAAE;AACzD,UAAI,CAAC,OAAO,CAAC,YAAY,GAAG,GAAG,GAAG,WAAW,CAAC,CAAC;AAC/C,aAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;KAC1B;;;SAhCgB,gBAAgB;;;qBAAhB,gBAAgB","file":"TimeseriesFinder.js","sourceRoot":"../../.."}
1
+ {"version":3,"sources":["src/timeseries/TimeseriesFinder.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;8BAEa,kBAAkB;;;;;;;;IAKvB,gBAAgB;cAAhB,gBAAgB;;;;;;AAKrB,aALK,gBAAgB,CAKpB,KAAK,EAAE;8BALH,gBAAgB;;AAM7B,mCANa,gBAAgB,6CAMvB,KAAK,EAAE,oCAAoC,EAAE,YAAY,EAAE;KACpE;;;;;;;;;;;;;;;;;iBAPgB,gBAAgB;;eAuBf,4BAAC,YAAY,EAAE,M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