@northern.tech/store 0.1.3 → 0.2.1

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 (217) hide show
  1. package/dist/actions.js +251 -135
  2. package/dist/actions.js.map +1 -1
  3. package/dist/actions.mjs +13 -13
  4. package/dist/api/general-api.js +102 -51
  5. package/dist/api/general-api.js.map +1 -1
  6. package/dist/api/general-api.mjs +6 -6
  7. package/dist/api/users-api.js +104 -66
  8. package/dist/api/users-api.js.map +1 -1
  9. package/dist/api/users-api.mjs +7 -7
  10. package/dist/appSlice/constants.js +1 -39
  11. package/dist/appSlice/constants.js.map +1 -1
  12. package/dist/appSlice/constants.mjs +2 -2
  13. package/dist/appSlice/index.js +111 -64
  14. package/dist/appSlice/index.js.map +1 -1
  15. package/dist/appSlice/index.mjs +5 -5
  16. package/dist/appSlice/selectors.js +1 -43
  17. package/dist/appSlice/selectors.js.map +1 -1
  18. package/dist/appSlice/selectors.mjs +2 -2
  19. package/dist/appSlice/thunks.js +649 -552
  20. package/dist/appSlice/thunks.js.map +1 -1
  21. package/dist/appSlice/thunks.mjs +28 -28
  22. package/dist/auth.js +99 -51
  23. package/dist/auth.js.map +1 -1
  24. package/dist/auth.mjs +5 -5
  25. package/dist/{chunk-C2YZYTJ6.mjs → chunk-2Z3RFYW4.mjs} +2 -11
  26. package/dist/{chunk-C2YZYTJ6.mjs.map → chunk-2Z3RFYW4.mjs.map} +1 -1
  27. package/dist/{chunk-F37LUTBX.mjs → chunk-3ORTTLIB.mjs} +19 -16
  28. package/dist/{chunk-F37LUTBX.mjs.map → chunk-3ORTTLIB.mjs.map} +1 -1
  29. package/dist/{chunk-7E7KJHY3.mjs → chunk-4SDUITD4.mjs} +6 -12
  30. package/dist/{chunk-7E7KJHY3.mjs.map → chunk-4SDUITD4.mjs.map} +1 -1
  31. package/dist/{chunk-BOSBROA3.mjs → chunk-5VNQCCAQ.mjs} +2 -7
  32. package/dist/{chunk-BOSBROA3.mjs.map → chunk-5VNQCCAQ.mjs.map} +1 -1
  33. package/dist/{chunk-R2GBNXLV.mjs → chunk-65YIOCCD.mjs} +6 -11
  34. package/dist/{chunk-R2GBNXLV.mjs.map → chunk-65YIOCCD.mjs.map} +1 -1
  35. package/dist/{chunk-ZIYGEXSJ.mjs → chunk-6CSGHZ3E.mjs} +9 -21
  36. package/dist/{chunk-ZIYGEXSJ.mjs.map → chunk-6CSGHZ3E.mjs.map} +1 -1
  37. package/dist/{chunk-HRWZJQMH.mjs → chunk-AZRVRNXT.mjs} +40 -30
  38. package/dist/{chunk-HRWZJQMH.mjs.map → chunk-AZRVRNXT.mjs.map} +1 -1
  39. package/dist/{chunk-M4U5R7A4.mjs → chunk-B42NUKMZ.mjs} +2 -6
  40. package/dist/{chunk-M4U5R7A4.mjs.map → chunk-B42NUKMZ.mjs.map} +1 -1
  41. package/dist/{chunk-DZBVTSIX.mjs → chunk-CHUCIHMY.mjs} +3 -4
  42. package/dist/{chunk-DZBVTSIX.mjs.map → chunk-CHUCIHMY.mjs.map} +1 -1
  43. package/dist/{chunk-YNVSU3AA.mjs → chunk-DIZJVB6M.mjs} +307 -292
  44. package/dist/chunk-DIZJVB6M.mjs.map +1 -0
  45. package/dist/chunk-H5UCKQWK.mjs +41 -0
  46. package/dist/{chunk-IPPIKGIB.mjs.map → chunk-H5UCKQWK.mjs.map} +1 -1
  47. package/dist/{chunk-ZNST5R6O.mjs → chunk-IFWKT27G.mjs} +92 -29
  48. package/dist/chunk-IFWKT27G.mjs.map +1 -0
  49. package/dist/{chunk-6667TCAJ.mjs → chunk-JA27QXVB.mjs} +37 -28
  50. package/dist/{chunk-6667TCAJ.mjs.map → chunk-JA27QXVB.mjs.map} +1 -1
  51. package/dist/{chunk-HVHZG2H4.mjs → chunk-K2NZL5V4.mjs} +4 -7
  52. package/dist/chunk-K2NZL5V4.mjs.map +1 -0
  53. package/dist/{chunk-RQOE5OOT.mjs → chunk-KJAZNKV2.mjs} +66 -55
  54. package/dist/chunk-KJAZNKV2.mjs.map +1 -0
  55. package/dist/{chunk-G32LAKW4.mjs → chunk-KPPU6OWF.mjs} +27 -39
  56. package/dist/{chunk-G32LAKW4.mjs.map → chunk-KPPU6OWF.mjs.map} +1 -1
  57. package/dist/{chunk-BJSH2G7W.mjs → chunk-KZSTW27Q.mjs} +30 -18
  58. package/dist/{chunk-BJSH2G7W.mjs.map → chunk-KZSTW27Q.mjs.map} +1 -1
  59. package/dist/chunk-LZOMFHX3.mjs +38 -0
  60. package/dist/{chunk-XYVPYFSM.mjs → chunk-NJNSCJEY.mjs} +22 -26
  61. package/dist/{chunk-XYVPYFSM.mjs.map → chunk-NJNSCJEY.mjs.map} +1 -1
  62. package/dist/{chunk-N7G6QK2E.mjs → chunk-O6TYYKSD.mjs} +62 -60
  63. package/dist/chunk-O6TYYKSD.mjs.map +1 -0
  64. package/dist/{chunk-G3I53JGW.mjs → chunk-QQBUNZHA.mjs} +3 -6
  65. package/dist/{chunk-G3I53JGW.mjs.map → chunk-QQBUNZHA.mjs.map} +1 -1
  66. package/dist/{chunk-TD45YTYK.mjs → chunk-R7LXL3KJ.mjs} +22 -23
  67. package/dist/chunk-R7LXL3KJ.mjs.map +1 -0
  68. package/dist/{chunk-G7LATUT6.mjs → chunk-WCUGLHYM.mjs} +16 -20
  69. package/dist/{chunk-G7LATUT6.mjs.map → chunk-WCUGLHYM.mjs.map} +1 -1
  70. package/dist/chunk-WYHJFSMQ.mjs +25 -0
  71. package/dist/{chunk-IVSYYXTC.mjs.map → chunk-WYHJFSMQ.mjs.map} +1 -1
  72. package/dist/{chunk-O6O3D52B.mjs → chunk-XC5UXEIB.mjs} +4 -11
  73. package/dist/{chunk-O6O3D52B.mjs.map → chunk-XC5UXEIB.mjs.map} +1 -1
  74. package/dist/{chunk-BRHSKNFC.mjs → chunk-XD7INCM4.mjs} +11 -17
  75. package/dist/{chunk-BRHSKNFC.mjs.map → chunk-XD7INCM4.mjs.map} +1 -1
  76. package/dist/{chunk-RH6ONMG7.mjs → chunk-ZE7R2XXE.mjs} +10 -12
  77. package/dist/{chunk-RH6ONMG7.mjs.map → chunk-ZE7R2XXE.mjs.map} +1 -1
  78. package/dist/{chunk-HXPYJ6QN.mjs → chunk-ZK4W5T53.mjs} +7 -11
  79. package/dist/{chunk-HXPYJ6QN.mjs.map → chunk-ZK4W5T53.mjs.map} +1 -1
  80. package/dist/commonConstants.d.mts +18 -19
  81. package/dist/commonConstants.d.ts +18 -19
  82. package/dist/commonConstants.js +2 -35
  83. package/dist/commonConstants.js.map +1 -1
  84. package/dist/commonConstants.mjs +2 -2
  85. package/dist/commonSelectors.d.mts +42 -1
  86. package/dist/commonSelectors.d.ts +42 -1
  87. package/dist/commonSelectors.js +149 -129
  88. package/dist/commonSelectors.js.map +1 -1
  89. package/dist/commonSelectors.mjs +14 -12
  90. package/dist/constants.d.mts +3 -3
  91. package/dist/constants.d.ts +3 -3
  92. package/dist/constants.js +92 -147
  93. package/dist/constants.js.map +1 -1
  94. package/dist/constants.mjs +18 -14
  95. package/dist/deploymentsSlice/constants.js +94 -55
  96. package/dist/deploymentsSlice/constants.js.map +1 -1
  97. package/dist/deploymentsSlice/constants.mjs +4 -4
  98. package/dist/deploymentsSlice/index.js +128 -75
  99. package/dist/deploymentsSlice/index.js.map +1 -1
  100. package/dist/deploymentsSlice/index.mjs +5 -5
  101. package/dist/deploymentsSlice/selectors.js +95 -48
  102. package/dist/deploymentsSlice/selectors.js.map +1 -1
  103. package/dist/deploymentsSlice/selectors.mjs +5 -5
  104. package/dist/deploymentsSlice/thunks.js +649 -561
  105. package/dist/deploymentsSlice/thunks.js.map +1 -1
  106. package/dist/deploymentsSlice/thunks.mjs +28 -28
  107. package/dist/devicesSlice/constants.js +94 -54
  108. package/dist/devicesSlice/constants.js.map +1 -1
  109. package/dist/devicesSlice/constants.mjs +4 -4
  110. package/dist/devicesSlice/index.js +131 -77
  111. package/dist/devicesSlice/index.js.map +1 -1
  112. package/dist/devicesSlice/index.mjs +5 -5
  113. package/dist/devicesSlice/selectors.js +100 -85
  114. package/dist/devicesSlice/selectors.js.map +1 -1
  115. package/dist/devicesSlice/selectors.mjs +5 -5
  116. package/dist/devicesSlice/thunks.js +649 -597
  117. package/dist/devicesSlice/thunks.js.map +1 -1
  118. package/dist/devicesSlice/thunks.mjs +28 -28
  119. package/dist/monitorSlice/constants.js +94 -41
  120. package/dist/monitorSlice/constants.js.map +1 -1
  121. package/dist/monitorSlice/constants.mjs +4 -4
  122. package/dist/monitorSlice/index.js +101 -48
  123. package/dist/monitorSlice/index.js.map +1 -1
  124. package/dist/monitorSlice/index.mjs +5 -5
  125. package/dist/monitorSlice/selectors.js +0 -4
  126. package/dist/monitorSlice/selectors.mjs +1 -1
  127. package/dist/monitorSlice/thunks.js +333 -238
  128. package/dist/monitorSlice/thunks.js.map +1 -1
  129. package/dist/monitorSlice/thunks.mjs +25 -25
  130. package/dist/onboardingSlice/constants.js +0 -5
  131. package/dist/onboardingSlice/constants.mjs +1 -1
  132. package/dist/onboardingSlice/index.js +1 -22
  133. package/dist/onboardingSlice/index.js.map +1 -1
  134. package/dist/onboardingSlice/index.mjs +2 -2
  135. package/dist/onboardingSlice/selectors.js +0 -4
  136. package/dist/onboardingSlice/selectors.mjs +1 -1
  137. package/dist/onboardingSlice/thunks.js +649 -555
  138. package/dist/onboardingSlice/thunks.js.map +1 -1
  139. package/dist/onboardingSlice/thunks.mjs +28 -28
  140. package/dist/organizationSlice/constants.d.mts +6 -1
  141. package/dist/organizationSlice/constants.d.ts +6 -1
  142. package/dist/organizationSlice/constants.js +89 -51
  143. package/dist/organizationSlice/constants.js.map +1 -1
  144. package/dist/organizationSlice/constants.mjs +6 -4
  145. package/dist/organizationSlice/index.d.mts +224 -246
  146. package/dist/organizationSlice/index.d.ts +224 -246
  147. package/dist/organizationSlice/index.js +113 -59
  148. package/dist/organizationSlice/index.js.map +1 -1
  149. package/dist/organizationSlice/index.mjs +5 -5
  150. package/dist/organizationSlice/selectors.js +96 -58
  151. package/dist/organizationSlice/selectors.js.map +1 -1
  152. package/dist/organizationSlice/selectors.mjs +5 -5
  153. package/dist/organizationSlice/thunks.js +649 -580
  154. package/dist/organizationSlice/thunks.js.map +1 -1
  155. package/dist/organizationSlice/thunks.mjs +28 -28
  156. package/dist/releasesSlice/constants.js +0 -7
  157. package/dist/releasesSlice/constants.mjs +1 -1
  158. package/dist/releasesSlice/index.js +98 -60
  159. package/dist/releasesSlice/index.js.map +1 -1
  160. package/dist/releasesSlice/index.mjs +5 -5
  161. package/dist/releasesSlice/selectors.js +97 -53
  162. package/dist/releasesSlice/selectors.js.map +1 -1
  163. package/dist/releasesSlice/selectors.mjs +6 -6
  164. package/dist/releasesSlice/thunks.js +377 -287
  165. package/dist/releasesSlice/thunks.js.map +1 -1
  166. package/dist/releasesSlice/thunks.mjs +25 -25
  167. package/dist/selectors.d.mts +1 -1
  168. package/dist/selectors.d.ts +1 -1
  169. package/dist/selectors.js +150 -202
  170. package/dist/selectors.js.map +1 -1
  171. package/dist/selectors.mjs +45 -43
  172. package/dist/store.d.mts +235 -135
  173. package/dist/store.d.ts +235 -135
  174. package/dist/store.js +262 -157
  175. package/dist/store.js.map +1 -1
  176. package/dist/store.mjs +16 -16
  177. package/dist/storehooks.d.mts +3 -1
  178. package/dist/storehooks.d.ts +3 -1
  179. package/dist/storehooks.js +686 -569
  180. package/dist/storehooks.js.map +1 -1
  181. package/dist/storehooks.mjs +71 -54
  182. package/dist/storehooks.mjs.map +1 -1
  183. package/dist/thunks.js +649 -710
  184. package/dist/thunks.js.map +1 -1
  185. package/dist/thunks.mjs +28 -28
  186. package/dist/usersSlice/constants.d.mts +192 -17
  187. package/dist/usersSlice/constants.d.ts +192 -17
  188. package/dist/usersSlice/constants.js +97 -61
  189. package/dist/usersSlice/constants.js.map +1 -1
  190. package/dist/usersSlice/constants.mjs +6 -4
  191. package/dist/usersSlice/index.d.mts +1628 -704
  192. package/dist/usersSlice/index.d.ts +1628 -704
  193. package/dist/usersSlice/index.js +122 -67
  194. package/dist/usersSlice/index.js.map +1 -1
  195. package/dist/usersSlice/index.mjs +5 -5
  196. package/dist/usersSlice/selectors.js +101 -62
  197. package/dist/usersSlice/selectors.js.map +1 -1
  198. package/dist/usersSlice/selectors.mjs +6 -6
  199. package/dist/usersSlice/thunks.js +649 -584
  200. package/dist/usersSlice/thunks.js.map +1 -1
  201. package/dist/usersSlice/thunks.mjs +28 -28
  202. package/dist/utils.d.mts +6 -5
  203. package/dist/utils.d.ts +6 -5
  204. package/dist/utils.js +117 -89
  205. package/dist/utils.js.map +1 -1
  206. package/dist/utils.mjs +5 -5
  207. package/package.json +66 -1
  208. package/dist/chunk-HVHZG2H4.mjs.map +0 -1
  209. package/dist/chunk-IPPIKGIB.mjs +0 -35
  210. package/dist/chunk-IVSYYXTC.mjs +0 -36
  211. package/dist/chunk-N7G6QK2E.mjs.map +0 -1
  212. package/dist/chunk-RQOE5OOT.mjs.map +0 -1
  213. package/dist/chunk-TD45YTYK.mjs.map +0 -1
  214. package/dist/chunk-XWBD7VOK.mjs +0 -93
  215. package/dist/chunk-YNVSU3AA.mjs.map +0 -1
  216. package/dist/chunk-ZNST5R6O.mjs.map +0 -1
  217. /package/dist/{chunk-XWBD7VOK.mjs.map → chunk-LZOMFHX3.mjs.map} +0 -0
@@ -1,40 +1,10 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __restKey = (key) => typeof key === "symbol" ? key : key + "";
26
- var __objRest = (source, exclude) => {
27
- var target = {};
28
- for (var prop in source)
29
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
- target[prop] = source[prop];
31
- if (source != null && __getOwnPropSymbols)
32
- for (var prop of __getOwnPropSymbols(source)) {
33
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
- target[prop] = source[prop];
35
- }
36
- return target;
37
- };
38
8
  var __commonJS = (cb, mod) => function __require() {
39
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
40
10
  };
@@ -59,33 +29,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
59
29
  mod
60
30
  ));
61
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
62
- var __async = (__this, __arguments, generator) => {
63
- return new Promise((resolve, reject) => {
64
- var fulfilled = (value) => {
65
- try {
66
- step(generator.next(value));
67
- } catch (e) {
68
- reject(e);
69
- }
70
- };
71
- var rejected = (value) => {
72
- try {
73
- step(generator.throw(value));
74
- } catch (e) {
75
- reject(e);
76
- }
77
- };
78
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
79
- step((generator = generator.apply(__this, __arguments)).next());
80
- });
81
- };
82
32
 
83
33
  // ../../node_modules/pluralize/pluralize.js
84
34
  var require_pluralize = __commonJS({
85
- "../../node_modules/pluralize/pluralize.js"(exports2, module2) {
35
+ "../../node_modules/pluralize/pluralize.js"(exports, module2) {
86
36
  "use strict";
87
37
  (function(root, pluralize2) {
88
- if (typeof require === "function" && typeof exports2 === "object" && typeof module2 === "object") {
38
+ if (typeof require === "function" && typeof exports === "object" && typeof module2 === "object") {
89
39
  module2.exports = pluralize2();
90
40
  } else if (typeof define === "function" && define.amd) {
91
41
  define(function() {
@@ -94,7 +44,7 @@ var require_pluralize = __commonJS({
94
44
  } else {
95
45
  root.pluralize = pluralize2();
96
46
  }
97
- })(exports2, function() {
47
+ })(exports, function() {
98
48
  var pluralRules = [];
99
49
  var singularRules = [];
100
50
  var uncountables = {};
@@ -511,7 +461,7 @@ var chartTypes = {
511
461
  };
512
462
  var emptyChartSelection = { software: "", group: "", chartType: chartTypes.bar.key, attribute: "artifact_name" };
513
463
  var defaultReportType = "distribution";
514
- var defaultReports = [__spreadProps(__spreadValues({}, emptyChartSelection), { group: null, attribute: "artifact_name", type: defaultReportType })];
464
+ var defaultReports = [{ ...emptyChartSelection, group: null, attribute: "artifact_name", type: defaultReportType }];
515
465
  var locations = {};
516
466
  var PLANS = {
517
467
  os: {
@@ -837,13 +787,14 @@ var emptyUiPermissions = Object.freeze({
837
787
  deployments: [],
838
788
  groups: Object.freeze({}),
839
789
  releases: Object.freeze({}),
790
+ tenantManagement: [],
840
791
  userManagement: []
841
792
  });
842
793
  var emptyRole = Object.freeze({
843
794
  name: void 0,
844
795
  description: "",
845
796
  permissions: [],
846
- uiPermissions: Object.freeze(__spreadValues({}, emptyUiPermissions))
797
+ uiPermissions: Object.freeze({ ...emptyUiPermissions })
847
798
  });
848
799
 
849
800
  // src/deploymentsSlice/constants.ts
@@ -872,11 +823,12 @@ var deploymentStatesToSubstates = {
872
823
  pending: [deploymentSubstates.pending],
873
824
  successes: [deploymentSubstates.success, deploymentSubstates.alreadyInstalled, deploymentSubstates.noartifact]
874
825
  };
875
- var deploymentStatesToSubstatesWithSkipped = __spreadProps(__spreadValues({}, deploymentStatesToSubstates), {
826
+ var deploymentStatesToSubstatesWithSkipped = {
827
+ ...deploymentStatesToSubstates,
876
828
  failures: [deploymentSubstates.failure],
877
829
  skipped: [deploymentSubstates.aborted, deploymentSubstates.noartifact, deploymentSubstates.alreadyInstalled, deploymentSubstates.decommissioned],
878
830
  successes: [deploymentSubstates.success]
879
- });
831
+ };
880
832
  var installationSubstatesMap = {
881
833
  download: {
882
834
  title: "download",
@@ -921,8 +873,8 @@ var DEPLOYMENT_STATES = {
921
873
  var listDefaultsByState = {
922
874
  [DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
923
875
  [DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
924
- [DEPLOYMENT_STATES.scheduled]: __spreadValues({}, DEVICE_LIST_DEFAULTS),
925
- [DEPLOYMENT_STATES.finished]: __spreadValues({}, DEVICE_LIST_DEFAULTS),
876
+ [DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },
877
+ [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },
926
878
  sort: { direction: SORTING_OPTIONS.desc }
927
879
  };
928
880
  var DEFAULT_PENDING_INPROGRESS_COUNT = 10;
@@ -1084,6 +1036,13 @@ var SSO_TYPES = {
1084
1036
  configDetails: [{ key: "startURL", label: "Start Url", getValue: getOidcStartUrl }]
1085
1037
  }
1086
1038
  };
1039
+ var AUDIT_LOGS_TYPES = [
1040
+ { title: "Artifact", queryParameter: "object_type", value: "artifact" },
1041
+ { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
1042
+ { title: "Device", queryParameter: "object_id", value: "device" },
1043
+ { title: "User", queryParameter: "object_id", value: "user" }
1044
+ ];
1045
+ var SP_AUDIT_LOGS_TYPES = [AUDIT_LOGS_TYPES[3], { title: "Tenant", queryParameter: "object_id", value: "tenant" }];
1087
1046
  var emptyWebhook = {
1088
1047
  description: "",
1089
1048
  enabled: true,
@@ -1132,10 +1091,12 @@ var permissionSetIds = {
1132
1091
  DeployToDevices: "DeployToDevices",
1133
1092
  ManageDevices: "ManageDevices",
1134
1093
  ManageReleases: "ManageReleases",
1094
+ ManageTenants: "ManageTenants",
1135
1095
  ManageUsers: "ManageUsers",
1136
1096
  ReadAuditLogs: "ReadAuditLogs",
1137
1097
  ReadDevices: "ReadDevices",
1138
1098
  ReadReleases: "ReadReleases",
1099
+ ReadTenants: "ReadTenants",
1139
1100
  ReadUsers: "ReadUsers",
1140
1101
  SuperUser: "SuperUser",
1141
1102
  UploadArtifacts: "UploadArtifacts"
@@ -1174,6 +1135,7 @@ var uiPermissionsById = {
1174
1135
  permissionSets: {
1175
1136
  groups: permissionSetIds.ManageDevices,
1176
1137
  releases: permissionSetIds.ManageReleases,
1138
+ tenantManagement: permissionSetIds.ManageTenants,
1177
1139
  userManagement: permissionSetIds.ManageUsers
1178
1140
  },
1179
1141
  title: "Manage",
@@ -1187,6 +1149,7 @@ var uiPermissionsById = {
1187
1149
  auditlog: permissionSetIds.ReadAuditLogs,
1188
1150
  groups: permissionSetIds.ReadDevices,
1189
1151
  releases: permissionSetIds.ReadReleases,
1152
+ tenantManagement: permissionSetIds.ReadTenants,
1190
1153
  userManagement: permissionSetIds.ReadUsers
1191
1154
  },
1192
1155
  title: "Read",
@@ -1211,6 +1174,7 @@ var uiPermissionsByArea = {
1211
1174
  auditlog: {
1212
1175
  endpoints: [{ path: /\/(auditlog)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] }],
1213
1176
  explanation: "Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.",
1177
+ key: "auditlog",
1214
1178
  uiPermissions: [uiPermissionsById.read],
1215
1179
  title: "System audit log"
1216
1180
  },
@@ -1221,6 +1185,7 @@ var uiPermissionsByArea = {
1221
1185
  { path: /\/(deployments\/config)/i, types: [PermissionTypes.Get, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] }
1222
1186
  ],
1223
1187
  explanation: "Providing deploy permissions will allow deployments to be created using the releases and devices a user has access to.",
1188
+ key: "deployments",
1224
1189
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.deploy],
1225
1190
  title: "Deployments"
1226
1191
  },
@@ -1236,6 +1201,7 @@ var uiPermissionsByArea = {
1236
1201
  { path: /\/(deviceconnect\/devices)/i, types: [PermissionTypes.Get, PermissionTypes.Post], uiPermissions: [uiPermissionsById.connect] }
1237
1202
  ],
1238
1203
  explanation: "Device group management permissions control the degree to which devices in a group can be accessed and moved to other groups.",
1204
+ key: "groups",
1239
1205
  scope: scopedPermissionAreas.groups.scopeType,
1240
1206
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.deploy, uiPermissionsById.configure, uiPermissionsById.connect],
1241
1207
  title: "Group Management"
@@ -1255,22 +1221,35 @@ var uiPermissionsByArea = {
1255
1221
  }
1256
1222
  ],
1257
1223
  explanation: "Release permissions can be granted to allow artifact & release modifications, as well as the creation of new releases.",
1224
+ key: "releases",
1258
1225
  scope: "ReleaseTags",
1259
1226
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.upload],
1260
1227
  title: "Release Management"
1261
1228
  },
1229
+ tenantManagement: {
1230
+ endpoints: [
1231
+ { path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
1232
+ { path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] },
1233
+ { path: /\/(users\/exists)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.manage] }
1234
+ ],
1235
+ explanation: "Tenant management permissions allow listing, creating and modifying child tenants",
1236
+ key: "tenantManagement",
1237
+ uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
1238
+ title: "Tenant Management"
1239
+ },
1262
1240
  userManagement: {
1263
1241
  endpoints: [
1264
1242
  { path: /\/(useradm)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
1265
1243
  { path: /\/(useradm)/i, types: [PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] }
1266
1244
  ],
1267
1245
  explanation: "User management permissions should be granted carefully, as these allow privilege increases for any users managed by a user with user management permissions",
1246
+ key: "userManagement",
1268
1247
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
1269
1248
  title: "User Management"
1270
1249
  }
1271
1250
  };
1272
1251
  var permissionMapper = (permission) => permission.value;
1273
- var itemUiPermissionsReducer = (accu, { item, uiPermissions }) => item ? __spreadProps(__spreadValues({}, accu), { [item]: uiPermissions }) : accu;
1252
+ var itemUiPermissionsReducer = (accu, { item, uiPermissions }) => item ? { ...accu, [item]: uiPermissions } : accu;
1274
1253
  var rolesById = Object.freeze({
1275
1254
  [staticRolesByName.admin]: {
1276
1255
  name: "Admin",
@@ -1278,56 +1257,87 @@ var rolesById = Object.freeze({
1278
1257
  description: "Full access",
1279
1258
  permissions: [],
1280
1259
  // permissions refers to the values returned from the backend
1281
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1260
+ uiPermissions: {
1261
+ ...emptyUiPermissions,
1282
1262
  auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
1283
1263
  deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
1284
1264
  groups: { [ALL_DEVICES]: uiPermissionsByArea.groups.uiPermissions.map(permissionMapper) },
1285
1265
  releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) },
1286
1266
  userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper)
1287
- })
1267
+ }
1288
1268
  },
1289
1269
  [staticRolesByName.readOnly]: {
1290
1270
  name: "Read Access",
1291
1271
  value: staticRolesByName.readOnly,
1292
1272
  description: "",
1293
1273
  permissions: [],
1294
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1274
+ uiPermissions: {
1275
+ ...emptyUiPermissions,
1295
1276
  deployments: [uiPermissionsById.read.value],
1296
1277
  groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] },
1297
1278
  releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] },
1298
1279
  userManagement: [uiPermissionsById.read.value]
1299
- })
1280
+ }
1300
1281
  },
1301
1282
  [staticRolesByName.ci]: {
1302
1283
  name: "Releases Manager",
1303
1284
  value: staticRolesByName.ci,
1304
1285
  description: "",
1305
1286
  permissions: [],
1306
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1287
+ uiPermissions: {
1288
+ ...emptyUiPermissions,
1307
1289
  releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) }
1308
- })
1290
+ }
1309
1291
  },
1310
1292
  [staticRolesByName.deploymentsManager]: {
1311
1293
  name: "Deployments Manager",
1312
1294
  value: staticRolesByName.deploymentsManager,
1313
1295
  description: "",
1314
1296
  permissions: [],
1315
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1297
+ uiPermissions: {
1298
+ ...emptyUiPermissions,
1316
1299
  deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
1317
1300
  groups: { [ALL_DEVICES]: [uiPermissionsById.deploy.value, uiPermissionsById.read.value] },
1318
1301
  releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
1319
- })
1302
+ }
1320
1303
  },
1321
1304
  [staticRolesByName.terminalAccess]: {
1322
1305
  name: "Troubleshooting",
1323
1306
  value: staticRolesByName.terminalAccess,
1324
1307
  description: "Access to the troubleshooting features: Remote Terminal, File Transfer, Port Forwarding",
1325
1308
  permissions: [],
1326
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1309
+ uiPermissions: {
1310
+ ...emptyUiPermissions,
1327
1311
  groups: { [ALL_DEVICES]: [uiPermissionsById.connect.value] }
1328
- })
1312
+ }
1329
1313
  }
1330
1314
  });
1315
+ var serviceProviderRolesById = {
1316
+ admin: {
1317
+ name: "Admin",
1318
+ value: staticRolesByName.admin,
1319
+ description: "Full access",
1320
+ permissions: [],
1321
+ uiPermissions: {
1322
+ ...emptyUiPermissions,
1323
+ auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
1324
+ userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper),
1325
+ tenantManagement: uiPermissionsByArea.tenantManagement.uiPermissions.map(permissionMapper)
1326
+ }
1327
+ },
1328
+ readOnly: {
1329
+ name: "Read access",
1330
+ value: staticRolesByName.admin,
1331
+ description: "This role can see all linked organizations but cannot make any changes",
1332
+ permissions: [],
1333
+ uiPermissions: {
1334
+ ...emptyUiPermissions,
1335
+ auditlog: [uiPermissionsById.read.value],
1336
+ userManagement: [uiPermissionsById.read.value],
1337
+ tenantManagement: [uiPermissionsById.read.value]
1338
+ }
1339
+ }
1340
+ };
1331
1341
  var defaultPermissionSets = {
1332
1342
  [permissionSetIds.Basic]: {
1333
1343
  name: permissionSetIds.Basic,
@@ -1338,7 +1348,9 @@ var defaultPermissionSets = {
1338
1348
  },
1339
1349
  [permissionSetIds.SuperUser]: {
1340
1350
  name: permissionSetIds.SuperUser,
1341
- result: __spreadValues({}, rolesById[staticRolesByName.admin].uiPermissions)
1351
+ result: {
1352
+ ...rolesById[staticRolesByName.admin].uiPermissions
1353
+ }
1342
1354
  },
1343
1355
  [permissionSetIds.ManageUsers]: {
1344
1356
  name: permissionSetIds.ManageUsers,
@@ -1358,6 +1370,18 @@ var defaultPermissionSets = {
1358
1370
  releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
1359
1371
  }
1360
1372
  },
1373
+ [permissionSetIds.ReadTenants]: {
1374
+ name: permissionSetIds.ReadTenants,
1375
+ result: {
1376
+ tenantManagement: [uiPermissionsById.read.value]
1377
+ }
1378
+ },
1379
+ [permissionSetIds.ManageTenants]: {
1380
+ name: permissionSetIds.ManageTenants,
1381
+ result: {
1382
+ tenantManagement: [uiPermissionsById.manage.value]
1383
+ }
1384
+ },
1361
1385
  [permissionSetIds.ReadUsers]: {
1362
1386
  name: permissionSetIds.ReadUsers,
1363
1387
  result: {
@@ -1411,11 +1435,12 @@ var defaultPermissionSets = {
1411
1435
  };
1412
1436
  var USER_LOGOUT = "USER_LOGOUT";
1413
1437
  var OWN_USER_ID = "me";
1414
- var rolesByName = __spreadProps(__spreadValues({}, staticRolesByName), {
1438
+ var rolesByName = {
1439
+ ...staticRolesByName,
1415
1440
  deploymentCreation: { action: "CREATE_DEPLOYMENT", object: { type: "DEVICE_GROUP", value: void 0 } },
1416
1441
  groupAccess: { action: "VIEW_DEVICE", object: { type: "DEVICE_GROUP", value: void 0 } },
1417
1442
  userManagement: { action: "http", object: { type: "any", value: `${useradmApiUrlv1}/.*` } }
1418
- });
1443
+ };
1419
1444
  var twoFAStates = {
1420
1445
  enabled: "enabled",
1421
1446
  disabled: "disabled",
@@ -1503,7 +1528,10 @@ var appSlice = (0, import_toolkit.createSlice)({
1503
1528
  initialState,
1504
1529
  reducers: {
1505
1530
  setFeatures: (state, action) => {
1506
- state.features = __spreadValues(__spreadValues({}, state.features), action.payload);
1531
+ state.features = {
1532
+ ...state.features,
1533
+ ...action.payload
1534
+ };
1507
1535
  },
1508
1536
  setSnackbar: (state, { payload }) => {
1509
1537
  let { message, autoHideDuration, action, children, onClick, onClose } = payload;
@@ -1528,7 +1556,10 @@ var appSlice = (0, import_toolkit.createSlice)({
1528
1556
  state.hostedAnnouncement = action.payload;
1529
1557
  },
1530
1558
  setSearchState: (state, action) => {
1531
- state.searchState = __spreadValues(__spreadValues({}, state.searchState), action.payload);
1559
+ state.searchState = {
1560
+ ...state.searchState,
1561
+ ...action.payload
1562
+ };
1532
1563
  },
1533
1564
  setOfflineThreshold: (state, action) => {
1534
1565
  state.offlineThreshold = action.payload;
@@ -1539,20 +1570,23 @@ var appSlice = (0, import_toolkit.createSlice)({
1539
1570
  },
1540
1571
  uploadProgress: (state, action) => {
1541
1572
  const { id, progress: progress2 } = action.payload;
1542
- state.uploadsById[id] = __spreadProps(__spreadValues({}, state.uploadsById[id]), {
1573
+ state.uploadsById[id] = {
1574
+ ...state.uploadsById[id],
1543
1575
  progress: progress2
1544
- });
1576
+ };
1545
1577
  },
1546
1578
  cleanUpUpload: (state, action) => {
1547
- var _a;
1548
- const _b2 = state.uploadsById, { [_a = action.payload]: current } = _b2, remainder = __objRest(_b2, [__restKey(_a)]);
1579
+ const { [action.payload]: current, ...remainder } = state.uploadsById;
1549
1580
  state.uploadsById = remainder;
1550
1581
  },
1551
1582
  setVersionInformation: (state, action) => {
1552
- state.versionInformation = __spreadValues(__spreadValues({}, state.versionInformation), action.payload);
1583
+ state.versionInformation = {
1584
+ ...state.versionInformation,
1585
+ ...action.payload
1586
+ };
1553
1587
  },
1554
1588
  setEnvironmentData: (state, action) => {
1555
- return __spreadValues(__spreadValues({}, state), action.payload);
1589
+ return { ...state, ...action.payload };
1556
1590
  }
1557
1591
  }
1558
1592
  });
@@ -1584,7 +1618,7 @@ var initialState2 = {
1584
1618
  sourceWindow: -1
1585
1619
  },
1586
1620
  binaryDeltaLimits: {
1587
- timeout: __spreadProps(__spreadValues({}, limitDefault), { default: 60, max: 3600, min: 60 }),
1621
+ timeout: { ...limitDefault, default: 60, max: 3600, min: 60 },
1588
1622
  sourceWindow: limitDefault,
1589
1623
  inputWindow: limitDefault,
1590
1624
  duplicatesWindow: limitDefault,
@@ -1594,10 +1628,10 @@ var initialState2 = {
1594
1628
  deploymentDeviceLimit: 5e3,
1595
1629
  selectedDeviceIds: [],
1596
1630
  selectionState: {
1597
- finished: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" }),
1598
- inprogress: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] }),
1599
- pending: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] }),
1600
- scheduled: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { selection: [] }),
1631
+ finished: { ...DEVICE_LIST_DEFAULTS, endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" },
1632
+ inprogress: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
1633
+ pending: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
1634
+ scheduled: { ...DEVICE_LIST_DEFAULTS, selection: [] },
1601
1635
  general: {
1602
1636
  state: DEPLOYMENT_ROUTES.active.key,
1603
1637
  showCreationDialog: false,
@@ -1613,40 +1647,55 @@ var deploymentsSlice = (0, import_toolkit2.createSlice)({
1613
1647
  initialState: initialState2,
1614
1648
  reducers: {
1615
1649
  createdDeployment: (state, action) => {
1616
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, deploymentPrototype), action.payload);
1650
+ state.byId[action.payload.id] = {
1651
+ ...deploymentPrototype,
1652
+ ...action.payload
1653
+ };
1617
1654
  state.byStatus[DEPLOYMENT_STATES.pending].total = state.byStatus[DEPLOYMENT_STATES.pending].total + 1;
1618
1655
  state.byStatus[DEPLOYMENT_STATES.pending].deploymentIds = [...state.byStatus.pending.deploymentIds, action.payload.id];
1619
1656
  state.selectionState[DEPLOYMENT_STATES.pending].selection = [action.payload.id, ...state.selectionState[DEPLOYMENT_STATES.pending].selection], state.selectionState[DEPLOYMENT_STATES.pending].total = state.selectionState[DEPLOYMENT_STATES.pending].total + 1;
1620
1657
  },
1621
1658
  removedDeployment: (state, action) => {
1622
- var _a;
1623
- const _b2 = state.byId, { [_a = action.payload]: removedDeployment } = _b2, remainder = __objRest(_b2, [__restKey(_a)]);
1659
+ const { [action.payload]: removedDeployment, ...remainder } = state.byId;
1624
1660
  state.byId = remainder;
1625
1661
  },
1626
1662
  receivedDeployment: (state, action) => {
1627
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, state.byId[action.payload.id] || {}), action.payload);
1663
+ state.byId[action.payload.id] = {
1664
+ ...state.byId[action.payload.id] || {},
1665
+ ...action.payload
1666
+ };
1628
1667
  },
1629
1668
  receivedDeploymentDeviceLog: (state, action) => {
1630
1669
  const { id, deviceId, log } = action.payload;
1631
- const deployment = __spreadValues(__spreadValues({}, deploymentPrototype), state.byId[id]);
1632
- state.byId[id] = __spreadProps(__spreadValues({}, deployment), {
1633
- devices: __spreadProps(__spreadValues({}, deployment.devices), {
1634
- [deviceId]: __spreadProps(__spreadValues({}, deployment.devices[deviceId]), {
1670
+ const deployment = {
1671
+ ...deploymentPrototype,
1672
+ ...state.byId[id]
1673
+ };
1674
+ state.byId[id] = {
1675
+ ...deployment,
1676
+ devices: {
1677
+ ...deployment.devices,
1678
+ [deviceId]: {
1679
+ ...deployment.devices[deviceId],
1635
1680
  log
1636
- })
1637
- })
1638
- });
1681
+ }
1682
+ }
1683
+ };
1639
1684
  },
1640
1685
  receivedDeploymentDevices: (state, action) => {
1641
1686
  const { id, devices, selectedDeviceIds, totalDeviceCount } = action.payload;
1642
- state.byId[id] = __spreadProps(__spreadValues({}, state.byId[id]), {
1687
+ state.byId[id] = {
1688
+ ...state.byId[id],
1643
1689
  devices,
1644
1690
  totalDeviceCount
1645
- });
1691
+ };
1646
1692
  state.selectedDeviceIds = selectedDeviceIds;
1647
1693
  },
1648
1694
  receivedDeployments: (state, action) => {
1649
- state.byId = __spreadValues(__spreadValues({}, state.byId), action.payload);
1695
+ state.byId = {
1696
+ ...state.byId,
1697
+ ...action.payload
1698
+ };
1650
1699
  },
1651
1700
  receivedDeploymentsForStatus: (state, action) => {
1652
1701
  const { status, deploymentIds, total } = action.payload;
@@ -1688,9 +1737,9 @@ var initialState3 = {
1688
1737
  [DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
1689
1738
  [DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
1690
1739
  },
1691
- deviceList: __spreadProps(__spreadValues({
1692
- deviceIds: []
1693
- }, DEVICE_LIST_DEFAULTS), {
1740
+ deviceList: {
1741
+ deviceIds: [],
1742
+ ...DEVICE_LIST_DEFAULTS,
1694
1743
  selectedAttributes: [],
1695
1744
  selectedIssues: [],
1696
1745
  selection: [],
@@ -1701,7 +1750,7 @@ var initialState3 = {
1701
1750
  },
1702
1751
  state: DEVICE_STATES.accepted,
1703
1752
  total: 0
1704
- }),
1753
+ },
1705
1754
  filters: [
1706
1755
  // { key: 'device_type', value: 'raspberry', operator: '$eq', scope: 'inventory' }
1707
1756
  ],
@@ -1736,49 +1785,59 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
1736
1785
  },
1737
1786
  addToGroup: (state, action) => {
1738
1787
  const { group, deviceIds } = action.payload;
1739
- const maybeExistingGroup = __spreadValues({
1788
+ const maybeExistingGroup = {
1740
1789
  filters: [],
1741
- deviceIds: []
1742
- }, state.groups.byId[group]);
1743
- state.groups.byId[group] = __spreadProps(__spreadValues({}, maybeExistingGroup), {
1790
+ deviceIds: [],
1791
+ ...state.groups.byId[group]
1792
+ };
1793
+ state.groups.byId[group] = {
1794
+ ...maybeExistingGroup,
1744
1795
  deviceIds: [...maybeExistingGroup.deviceIds, ...deviceIds].filter(import_helpers.duplicateFilter),
1745
1796
  total: (maybeExistingGroup.total || 0) + 1
1746
- });
1797
+ };
1747
1798
  },
1748
1799
  removeFromGroup: (state, action) => {
1749
1800
  const { group, deviceIds: removedIds } = action.payload;
1750
- const _a = state.groups.byId[group] || {}, { deviceIds = [], total = 0 } = _a, maybeExistingGroup = __objRest(_a, ["deviceIds", "total"]);
1751
- const changedGroup = __spreadProps(__spreadValues({}, maybeExistingGroup), {
1801
+ const { deviceIds = [], total = 0, ...maybeExistingGroup } = state.groups.byId[group] || {};
1802
+ const changedGroup = {
1803
+ ...maybeExistingGroup,
1752
1804
  deviceIds: deviceIds.filter((id) => !removedIds.includes(id)),
1753
1805
  total: Math.max(total - removedIds.length, 0)
1754
- });
1806
+ };
1755
1807
  if (changedGroup.total || changedGroup.deviceIds.length) {
1756
1808
  state.groups.byId[group] = changedGroup;
1757
1809
  return;
1758
1810
  } else if (state.groups.selectedGroup === group) {
1759
1811
  state.groups.selectedGroup = void 0;
1760
1812
  }
1761
- const _b2 = state.groups.byId, { [group]: removal } = _b2, remainingById = __objRest(_b2, [__restKey(group)]);
1813
+ const { [group]: removal, ...remainingById } = state.groups.byId;
1762
1814
  state.groups.byId = remainingById;
1763
1815
  },
1764
1816
  addGroup: (state, action) => {
1765
1817
  const { groupName, group } = action.payload;
1766
- state.groups.byId[groupName] = __spreadValues(__spreadValues({}, state.groups.byId[groupName]), group);
1818
+ state.groups.byId[groupName] = {
1819
+ ...state.groups.byId[groupName],
1820
+ ...group
1821
+ };
1767
1822
  },
1768
1823
  selectGroup: (state, { payload: group }) => {
1769
1824
  state.deviceList.deviceIds = state.groups.byId[group] && state.groups.byId[group].deviceIds.length > 0 ? state.groups.byId[group].deviceIds : [];
1770
1825
  state.groups.selectedGroup = group;
1771
1826
  },
1772
1827
  removeGroup: (state, action) => {
1773
- var _a;
1774
- const _b2 = state.groups.byId, { [_a = action.payload]: removal } = _b2, remainingById = __objRest(_b2, [__restKey(_a)]);
1828
+ const { [action.payload]: removal, ...remainingById } = state.groups.byId;
1775
1829
  state.groups.byId = remainingById;
1776
1830
  state.groups.selectedGroup = state.groups.selectedGroup === action.payload ? void 0 : state.groups.selectedGroup;
1777
1831
  },
1778
1832
  setDeviceListState: (state, action) => {
1779
- state.deviceList = __spreadProps(__spreadValues(__spreadValues({}, state.deviceList), action.payload), {
1780
- sort: __spreadValues(__spreadValues({}, state.deviceList.sort), action.payload.sort)
1781
- });
1833
+ state.deviceList = {
1834
+ ...state.deviceList,
1835
+ ...action.payload,
1836
+ sort: {
1837
+ ...state.deviceList.sort,
1838
+ ...action.payload.sort
1839
+ }
1840
+ };
1782
1841
  },
1783
1842
  setFilterAttributes: (state, action) => {
1784
1843
  state.filteringAttributes = action.payload;
@@ -1787,7 +1846,10 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
1787
1846
  state.filteringAttributesConfig = action.payload;
1788
1847
  },
1789
1848
  receivedDevices: (state, action) => {
1790
- state.byId = __spreadValues(__spreadValues({}, state.byId), action.payload);
1849
+ state.byId = {
1850
+ ...state.byId,
1851
+ ...action.payload
1852
+ };
1791
1853
  },
1792
1854
  setDeviceFilters: (state, action) => {
1793
1855
  if ((0, import_helpers.deepCompare)(action.payload, state.filters)) {
@@ -1818,7 +1880,10 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
1818
1880
  state.limit = action.payload;
1819
1881
  },
1820
1882
  receivedDevice: (state, action) => {
1821
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, state.byId[action.payload.id]), action.payload);
1883
+ state.byId[action.payload.id] = {
1884
+ ...state.byId[action.payload.id],
1885
+ ...action.payload
1886
+ };
1822
1887
  },
1823
1888
  maybeUpdateDevicesByStatus: (state, action) => {
1824
1889
  const { deviceId, authId } = action.payload;
@@ -1839,15 +1904,17 @@ var import_toolkit4 = require("@reduxjs/toolkit");
1839
1904
  var sliceName4 = "monitor";
1840
1905
  var initialState4 = {
1841
1906
  alerts: {
1842
- alertList: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { total: 0 }),
1907
+ alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },
1843
1908
  byDeviceId: {}
1844
1909
  },
1845
1910
  issueCounts: {
1846
- byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => __spreadProps(__spreadValues({}, accu), { [key]: { filtered: 0, total: 0 } }), {})
1911
+ byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})
1847
1912
  },
1848
1913
  settings: {
1849
1914
  global: {
1850
- channels: __spreadValues({}, Object.keys(alertChannels).reduce((accu, item) => __spreadProps(__spreadValues({}, accu), { [item]: { enabled: true } }), {}))
1915
+ channels: {
1916
+ ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
1917
+ }
1851
1918
  }
1852
1919
  }
1853
1920
  };
@@ -1865,14 +1932,14 @@ var monitorSlice = (0, import_toolkit4.createSlice)({
1865
1932
  },
1866
1933
  receiveLatestDeviceAlerts: (state, action) => {
1867
1934
  const { deviceId, alerts } = action.payload;
1868
- state.alerts.byDeviceId[deviceId] = __spreadProps(__spreadValues({}, state.alerts.byDeviceId[deviceId]), { latest: alerts });
1935
+ state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };
1869
1936
  },
1870
1937
  receiveDeviceIssueCounts: (state, action) => {
1871
1938
  const { issueType, counts } = action.payload;
1872
1939
  state.issueCounts.byType[issueType] = counts;
1873
1940
  },
1874
1941
  setAlertListState: (state, action) => {
1875
- state.alerts.alertList = __spreadValues(__spreadValues({}, state.alerts.alertList), action.payload);
1942
+ state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };
1876
1943
  }
1877
1944
  }
1878
1945
  });
@@ -1896,7 +1963,7 @@ var onboardingSlice = (0, import_toolkit5.createSlice)({
1896
1963
  initialState: initialState5,
1897
1964
  reducers: {
1898
1965
  setOnboardingState: (state, action) => {
1899
- return __spreadValues(__spreadValues({}, state), action.payload);
1966
+ return { ...state, ...action.payload };
1900
1967
  },
1901
1968
  setDemoArtifactPort: (state, action) => {
1902
1969
  state.demoArtifactPort = action.payload;
@@ -1934,21 +2001,23 @@ var initialState6 = {
1934
2001
  brand: ""
1935
2002
  },
1936
2003
  intentId: null,
2004
+ tenantList: {
2005
+ ...TENANT_LIST_DEFAULT,
2006
+ total: 0,
2007
+ tenants: [],
2008
+ selectedTenant: null,
2009
+ sort: {
2010
+ direction: SORTING_OPTIONS.desc,
2011
+ key: "name"
2012
+ }
2013
+ },
1937
2014
  organization: {
1938
- tenantList: __spreadProps(__spreadValues({}, TENANT_LIST_DEFAULT), {
1939
- total: 0,
1940
- tenants: [],
1941
- selectedTenant: null,
1942
- sort: {
1943
- direction: SORTING_OPTIONS.desc,
1944
- key: "name"
1945
- }
1946
- })
1947
2015
  // id, name, status, tenant_token, plan
1948
2016
  },
1949
2017
  auditlog: {
1950
2018
  events: [],
1951
- selectionState: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), {
2019
+ selectionState: {
2020
+ ...DEVICE_LIST_DEFAULTS,
1952
2021
  detail: void 0,
1953
2022
  endDate: void 0,
1954
2023
  selectedIssue: void 0,
@@ -1957,7 +2026,7 @@ var initialState6 = {
1957
2026
  total: 0,
1958
2027
  type: void 0,
1959
2028
  user: void 0
1960
- })
2029
+ }
1961
2030
  },
1962
2031
  externalDeviceIntegrations: [
1963
2032
  // { <connection_string|x509|...>, id, provider }
@@ -1980,7 +2049,10 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
1980
2049
  state.auditlog.selectionState.total = total;
1981
2050
  },
1982
2051
  setAuditLogState: (state, action) => {
1983
- state.auditlog.selectionState = __spreadValues(__spreadValues({}, state.auditlog.selectionState), action.payload);
2052
+ state.auditlog.selectionState = {
2053
+ ...state.auditlog.selectionState,
2054
+ ...action.payload
2055
+ };
1984
2056
  },
1985
2057
  receiveCurrentCard: (state, action) => {
1986
2058
  state.card = action.payload;
@@ -1989,12 +2061,10 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
1989
2061
  state.intentId = action.payload;
1990
2062
  },
1991
2063
  setOrganization: (state, action) => {
1992
- state.organization = __spreadProps(__spreadValues(__spreadValues({}, state.organization), action.payload), {
1993
- tenantList: __spreadValues(__spreadValues({}, state.organization.tenantList), action.payload.tenantList)
1994
- });
2064
+ state.organization = { ...state.organization, ...action.payload };
1995
2065
  },
1996
2066
  setTenantListState: (state, action) => {
1997
- state.organization.tenantList = action.payload;
2067
+ state.tenantList = action.payload;
1998
2068
  },
1999
2069
  receiveExternalDeviceIntegrations: (state, action) => {
2000
2070
  state.externalDeviceIntegrations = action.payload;
@@ -2054,7 +2124,8 @@ var initialState7 = {
2054
2124
  }
2055
2125
  */
2056
2126
  },
2057
- releasesList: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), {
2127
+ releasesList: {
2128
+ ...DEVICE_LIST_DEFAULTS,
2058
2129
  searchedIds: [],
2059
2130
  releaseIds: [],
2060
2131
  selection: [],
@@ -2068,7 +2139,7 @@ var initialState7 = {
2068
2139
  selectedTags: [],
2069
2140
  total: 0,
2070
2141
  type: ""
2071
- }),
2142
+ },
2072
2143
  tags: [],
2073
2144
  updateTypes: [],
2074
2145
  /*
@@ -2094,8 +2165,7 @@ var releaseSlice = (0, import_toolkit7.createSlice)({
2094
2165
  state.updateTypes = action.payload;
2095
2166
  },
2096
2167
  removeRelease: (state, action) => {
2097
- var _a;
2098
- const _b2 = state.byId, { [_a = action.payload]: toBeRemoved } = _b2, byId = __objRest(_b2, [__restKey(_a)]);
2168
+ const { [action.payload]: toBeRemoved, ...byId } = state.byId;
2099
2169
  state.byId = byId;
2100
2170
  state.selectedRelease = action.payload === state.selectedRelease ? null : state.selectedRelease;
2101
2171
  },
@@ -2128,8 +2198,12 @@ var initialState8 = {
2128
2198
  previousPhases: [],
2129
2199
  retries: 0
2130
2200
  },
2131
- permissionSetsById: __spreadValues({}, defaultPermissionSets),
2132
- rolesById: __spreadValues({}, rolesById),
2201
+ permissionSetsById: {
2202
+ ...defaultPermissionSets
2203
+ },
2204
+ rolesById: {
2205
+ ...rolesById
2206
+ },
2133
2207
  settingsInitialized: false,
2134
2208
  showConnectDeviceDialog: false,
2135
2209
  showFeedbackDialog: false,
@@ -2169,13 +2243,15 @@ var usersSlice = (0, import_toolkit8.createSlice)({
2169
2243
  state.byId[0] = action.payload;
2170
2244
  },
2171
2245
  removedUser: (state, action) => {
2172
- var _a;
2173
- const _b2 = state.byId, { [_a = action.payload]: removedUser } = _b2, byId = __objRest(_b2, [__restKey(_a)]);
2246
+ const { [action.payload]: removedUser, ...byId } = state.byId;
2174
2247
  state.byId = byId;
2175
2248
  state.currentUser = state.currentUser === action.payload ? null : state.currentUser;
2176
2249
  },
2177
2250
  updatedUser: (state, action) => {
2178
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, state.byId[action.payload.id]), action.payload);
2251
+ state.byId[action.payload.id] = {
2252
+ ...state.byId[action.payload.id],
2253
+ ...action.payload
2254
+ };
2179
2255
  },
2180
2256
  receivedPermissionSets: (state, action) => {
2181
2257
  state.permissionSetsById = action.payload;
@@ -2184,11 +2260,13 @@ var usersSlice = (0, import_toolkit8.createSlice)({
2184
2260
  state.rolesById = action.payload;
2185
2261
  },
2186
2262
  createdRole: (state, action) => {
2187
- state.rolesById[action.payload.name] = __spreadValues(__spreadValues({}, state.rolesById[action.payload.name]), action.payload);
2263
+ state.rolesById[action.payload.name] = {
2264
+ ...state.rolesById[action.payload.name],
2265
+ ...action.payload
2266
+ };
2188
2267
  },
2189
2268
  removedRole: (state, action) => {
2190
- var _a;
2191
- const _b2 = state.rolesById, { [_a = action.payload]: toBeRemoved } = _b2, rolesById2 = __objRest(_b2, [__restKey(_a)]);
2269
+ const { [action.payload]: toBeRemoved, ...rolesById2 } = state.rolesById;
2192
2270
  state.rolesById = rolesById2;
2193
2271
  },
2194
2272
  setCustomColumns: (state, action) => {
@@ -2196,18 +2274,27 @@ var usersSlice = (0, import_toolkit8.createSlice)({
2196
2274
  },
2197
2275
  setGlobalSettings: (state, action) => {
2198
2276
  state.settingsInitialized = true;
2199
- state.globalSettings = __spreadValues(__spreadValues({}, state.globalSettings), action.payload);
2277
+ state.globalSettings = {
2278
+ ...state.globalSettings,
2279
+ ...action.payload
2280
+ };
2200
2281
  },
2201
2282
  setUserSettings: (state, action) => {
2202
2283
  state.userSettingsInitialized = true;
2203
- state.userSettings = __spreadValues(__spreadValues({}, state.userSettings), action.payload);
2284
+ state.userSettings = {
2285
+ ...state.userSettings,
2286
+ ...action.payload
2287
+ };
2204
2288
  },
2205
2289
  setTooltipState: (state, action) => {
2206
2290
  const { id, readState = READ_STATES.read } = action.payload;
2207
2291
  state.tooltips.byId[id].readState = readState;
2208
2292
  },
2209
2293
  setTooltipsState: (state, action) => {
2210
- state.tooltips.byId = __spreadValues(__spreadValues({}, state.tooltips.byId), action.payload);
2294
+ state.tooltips.byId = {
2295
+ ...state.tooltips.byId,
2296
+ ...action.payload
2297
+ };
2211
2298
  },
2212
2299
  setShowFeedbackDialog: (state, action) => {
2213
2300
  state.showFeedbackDialog = action.payload;
@@ -2224,7 +2311,16 @@ var actions8 = usersSlice.actions;
2224
2311
  var usersSlice_default = usersSlice.reducer;
2225
2312
 
2226
2313
  // src/actions.ts
2227
- var actions_default = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, actions), actions2), actions3), actions4), actions5), actions6), actions7), actions8);
2314
+ var actions_default = {
2315
+ ...actions,
2316
+ ...actions2,
2317
+ ...actions3,
2318
+ ...actions4,
2319
+ ...actions5,
2320
+ ...actions6,
2321
+ ...actions7,
2322
+ ...actions8
2323
+ };
2228
2324
 
2229
2325
  // src/api/general-api.ts
2230
2326
  var import_axios = __toESM(require("axios"));
@@ -2235,18 +2331,17 @@ var cookies = new import_universal_cookie.default();
2235
2331
  var emptySession = Object.freeze({ token: "", exiresAt: void 0 });
2236
2332
  var tokenCache = "";
2237
2333
  var getSessionInfo = () => {
2238
- var _a, _b2;
2239
- let sessionInfo = __spreadValues({}, emptySession);
2334
+ let sessionInfo = { ...emptySession };
2240
2335
  try {
2241
- sessionInfo = JSON.parse((_a = window.localStorage.getItem("JWT")) != null ? _a : "");
2242
- } catch (e) {
2336
+ sessionInfo = JSON.parse(window.localStorage.getItem("JWT") ?? "");
2337
+ } catch {
2243
2338
  }
2244
2339
  if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < /* @__PURE__ */ new Date()) {
2245
2340
  cleanUp();
2246
- return __spreadValues({}, emptySession);
2341
+ return { ...emptySession };
2247
2342
  }
2248
2343
  if (!sessionInfo.token) {
2249
- let jwtTokenFromCookie = (_b2 = cookies.get("JWT", { doNotParse: true })) != null ? _b2 : "";
2344
+ let jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
2250
2345
  if (jwtTokenFromCookie) {
2251
2346
  setSessionInfo({ token: jwtTokenFromCookie, undefined: void 0 });
2252
2347
  sessionInfo.token = jwtTokenFromCookie;
@@ -2274,8 +2369,7 @@ var maxSessionAge = 900;
2274
2369
 
2275
2370
  // src/api/general-api.ts
2276
2371
  var unauthorizedRedirect = (error) => {
2277
- var _a;
2278
- if (!(0, import_axios.isCancel)(error) && ((_a = error.response) == null ? void 0 : _a.status) === 401 && getToken()) {
2372
+ if (!(0, import_axios.isCancel)(error) && error.response?.status === 401 && getToken()) {
2279
2373
  cleanUp();
2280
2374
  window.location.replace("/ui/");
2281
2375
  }
@@ -2285,7 +2379,7 @@ var commonRequestConfig = { timeout: TIMEOUTS.refreshDefault, headers: { "Conten
2285
2379
  var authenticatedRequest = import_axios.default.create(commonRequestConfig);
2286
2380
  authenticatedRequest.interceptors.response.use((res) => res, unauthorizedRedirect);
2287
2381
  authenticatedRequest.interceptors.request.use(
2288
- (config) => __spreadProps(__spreadValues({}, config), { headers: __spreadProps(__spreadValues({}, config.headers), { Authorization: `Bearer ${getToken()}` }) }),
2382
+ (config) => ({ ...config, headers: { ...config.headers, Authorization: `Bearer ${getToken()}` } }),
2289
2383
  (error) => Promise.reject(error)
2290
2384
  );
2291
2385
  var Api = {
@@ -2293,7 +2387,7 @@ var Api = {
2293
2387
  delete: (url, data) => authenticatedRequest.request({ method: "delete", url, data }),
2294
2388
  patch: authenticatedRequest.patch,
2295
2389
  post: authenticatedRequest.post,
2296
- postUnauthorized: (url, data, config = {}) => import_axios.default.post(url, data, __spreadValues(__spreadValues({}, commonRequestConfig), config)),
2390
+ postUnauthorized: (url, data, config = {}) => import_axios.default.post(url, data, { ...commonRequestConfig, ...config }),
2297
2391
  put: authenticatedRequest.put,
2298
2392
  upload: (url, formData, progress2, cancelSignal) => authenticatedRequest.post(url, formData, {
2299
2393
  headers: { "Content-Type": "multipart/form-data" },
@@ -2324,10 +2418,7 @@ var getSearchState = (state) => state.app.searchState;
2324
2418
  var getSearchedDevices = (0, import_toolkit9.createSelector)([getSearchState], ({ deviceIds }) => deviceIds);
2325
2419
  var getVersionInformation = (0, import_toolkit9.createSelector)(
2326
2420
  [getFullVersionInformation, getFeatures],
2327
- (_a, { isHosted }) => {
2328
- var _b2 = _a, { Integration } = _b2, remainder = __objRest(_b2, ["Integration"]);
2329
- return isHosted && Integration !== "next" ? remainder : __spreadProps(__spreadValues({}, remainder), { Integration });
2330
- }
2421
+ ({ Integration, ...remainder }, { isHosted }) => isHosted && Integration !== "next" ? remainder : { ...remainder, Integration }
2331
2422
  );
2332
2423
  var getIsPreview = (0, import_toolkit9.createSelector)([getFullVersionInformation], ({ Integration }) => (0, import_helpers2.versionCompare)(Integration, "next") > -1);
2333
2424
 
@@ -2344,8 +2435,7 @@ var getDeploymentsSelectionState = (state) => state.deployments.selectionState;
2344
2435
  var getMappedDeploymentSelection = (0, import_toolkit10.createSelector)(
2345
2436
  [getDeploymentsSelectionState, (_, deploymentsState) => deploymentsState, getDeploymentsById],
2346
2437
  (selectionState, deploymentsState, deploymentsById) => {
2347
- var _a;
2348
- const { selection = [] } = (_a = selectionState[deploymentsState]) != null ? _a : {};
2438
+ const { selection = [] } = selectionState[deploymentsState] ?? {};
2349
2439
  return selection.reduce((accu, id) => {
2350
2440
  if (deploymentsById[id]) {
2351
2441
  accu.push(deploymentsById[id]);
@@ -2389,7 +2479,8 @@ var getListedDevices = (state) => state.devices.deviceList.deviceIds;
2389
2479
  var getFilteringAttributes = (state) => state.devices.filteringAttributes;
2390
2480
  var getDeviceFilters = (state) => state.devices.filters || [];
2391
2481
  var getFilteringAttributesFromConfig = (state) => state.devices.filteringAttributesConfig.attributes;
2392
- var getSortedFilteringAttributes = (0, import_toolkit11.createSelector)([getFilteringAttributes], (filteringAttributes) => __spreadProps(__spreadValues({}, filteringAttributes), {
2482
+ var getSortedFilteringAttributes = (0, import_toolkit11.createSelector)([getFilteringAttributes], (filteringAttributes) => ({
2483
+ ...filteringAttributes,
2393
2484
  identityAttributes: [...filteringAttributes.identityAttributes, "id"]
2394
2485
  }));
2395
2486
  var getDeviceLimit = (state) => state.devices.limit;
@@ -2417,10 +2508,7 @@ var getDeviceCountsByStatus = (0, import_toolkit11.createSelector)(
2417
2508
  return accu;
2418
2509
  }, {})
2419
2510
  );
2420
- var getDeviceById = (0, import_toolkit11.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => {
2421
- var _a;
2422
- return (_a = devicesById[deviceId]) != null ? _a : {};
2423
- });
2511
+ var getDeviceById = (0, import_toolkit11.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => devicesById[deviceId] ?? {});
2424
2512
  var getSelectedGroupInfo = (0, import_toolkit11.createSelector)(
2425
2513
  [getAcceptedDevices, getGroupsById, getSelectedGroup],
2426
2514
  ({ total: acceptedDeviceTotal }, groupsById, selectedGroup) => {
@@ -2437,17 +2525,13 @@ var getLimitMaxed = (0, import_toolkit11.createSelector)(
2437
2525
  [getAcceptedDevices, getDeviceLimit],
2438
2526
  ({ total: acceptedDevices = 0 }, deviceLimit) => Boolean(deviceLimit && deviceLimit <= acceptedDevices)
2439
2527
  );
2440
- var _b;
2441
- var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], (_a) => {
2442
- var _c = _a, { [_b = UNGROUPED_GROUP.id]: ungrouped } = _c, groups = __objRest(_c, [__restKey(_b)]);
2443
- return groups;
2444
- });
2528
+ var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
2445
2529
  var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsById) => {
2446
2530
  const groupNames = Object.keys(groupsById).sort();
2447
2531
  const groupedGroups = Object.entries(groupsById).sort((a, b) => a[0].localeCompare(b[0])).reduce(
2448
2532
  (accu, [groupname, group]) => {
2449
2533
  const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;
2450
- const groupItem = __spreadProps(__spreadValues({}, group), { groupId: name, name: groupname });
2534
+ const groupItem = { ...group, groupId: name, name: groupname };
2451
2535
  if (group.filters.length > 0) {
2452
2536
  if (groupname !== UNGROUPED_GROUP.id) {
2453
2537
  accu.dynamic.push(groupItem);
@@ -2461,7 +2545,7 @@ var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsByI
2461
2545
  },
2462
2546
  { dynamic: [], static: [], ungrouped: [] }
2463
2547
  );
2464
- return __spreadValues({ groupNames }, groupedGroups);
2548
+ return { groupNames, ...groupedGroups };
2465
2549
  });
2466
2550
  var getAttributesList = (0, import_toolkit11.createSelector)(
2467
2551
  [getFilteringAttributes, getFilteringAttributesFromConfig],
@@ -2496,15 +2580,12 @@ var getExternalIntegrations = (state) => state.organization.externalDeviceIntegr
2496
2580
  var getAuditlogState = (state) => state.organization.auditlog.selectionState;
2497
2581
  var getAuditLog = (state) => state.organization.auditlog.events;
2498
2582
  var getAuditLogSelectionState = (state) => state.organization.auditlog.selectionState;
2499
- var getTenantsList = (state) => state.organization.organization.tenantList;
2583
+ var getTenantsList = (state) => state.organization.tenantList;
2500
2584
  var getWebhookEvents = (state) => state.organization.webhooks.events;
2501
2585
  var getWebhookEventTotal = (state) => state.organization.webhooks.eventTotal;
2502
2586
  var getDeviceTwinIntegrations = (0, import_toolkit12.createSelector)(
2503
2587
  [getExternalIntegrations],
2504
- (integrations) => integrations.filter((integration) => {
2505
- var _a;
2506
- return integration.id && ((_a = EXTERNAL_PROVIDER[integration.provider]) == null ? void 0 : _a.deviceTwin);
2507
- })
2588
+ (integrations) => integrations.filter((integration) => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)
2508
2589
  );
2509
2590
  var getIsServiceProvider = (state) => state.organization.organization.service_provider;
2510
2591
  var getWebhooks = (0, import_toolkit12.createSelector)(
@@ -2538,15 +2619,12 @@ var filterProcessors = {
2538
2619
  var filterAliases = {
2539
2620
  $nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
2540
2621
  };
2541
- var mapFiltersToTerms = (filters) => filters.map((filter) => {
2542
- var _a;
2543
- return {
2544
- scope: filter.scope,
2545
- attribute: filter.key,
2546
- type: ((_a = filterAliases[filter.operator]) == null ? void 0 : _a.alias) || filter.operator,
2547
- value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
2548
- };
2549
- });
2622
+ var mapFiltersToTerms = (filters) => filters.map((filter) => ({
2623
+ scope: filter.scope,
2624
+ attribute: filter.key,
2625
+ type: filterAliases[filter.operator]?.alias || filter.operator,
2626
+ value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
2627
+ }));
2550
2628
  var mapTermsToFilters = (terms) => terms.map((term) => {
2551
2629
  const aliasedFilter = Object.entries(filterAliases).find(
2552
2630
  (aliasDefinition) => aliasDefinition[1].alias === term.type && aliasDefinition[1].value === term.value
@@ -2556,14 +2634,13 @@ var mapTermsToFilters = (terms) => terms.map((term) => {
2556
2634
  });
2557
2635
  var convertIssueOptionsToFilters = (issuesSelection, filtersState = {}) => issuesSelection.map((item) => {
2558
2636
  if (typeof DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
2559
- return __spreadProps(__spreadValues({}, DEVICE_ISSUE_OPTIONS[item].filterRule), { value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) });
2637
+ return { ...DEVICE_ISSUE_OPTIONS[item].filterRule, value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
2560
2638
  }
2561
2639
  return DEVICE_ISSUE_OPTIONS[item].filterRule;
2562
2640
  });
2563
2641
  var convertDeviceListStateToFilters = ({ filters = [], group, groups = { byId: {} }, offlineThreshold, selectedIssues = [], status }) => {
2564
- var _a;
2565
2642
  let applicableFilters = [...filters];
2566
- if (typeof group === "string" && !(((_a = groups.byId[group]) == null ? void 0 : _a.filters) || applicableFilters).length) {
2643
+ if (typeof group === "string" && !(groups.byId[group]?.filters || applicableFilters).length) {
2567
2644
  applicableFilters.push({ key: "group", value: group, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
2568
2645
  }
2569
2646
  const nonMonitorFilters = applicableFilters.filter(
@@ -2584,12 +2661,12 @@ var filtersFilter = (item, index, array) => {
2584
2661
  var listItemMapper = (byId, ids, { defaultObject = {}, cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH }) => {
2585
2662
  return ids.slice(0, cutOffSize).reduce((accu, id) => {
2586
2663
  if (id && byId[id]) {
2587
- accu.push(__spreadValues(__spreadValues({}, defaultObject), byId[id]));
2664
+ accu.push({ ...defaultObject, ...byId[id] });
2588
2665
  }
2589
2666
  return accu;
2590
2667
  }, []);
2591
2668
  };
2592
- var mergePermissions = (existingPermissions = __spreadValues({}, emptyUiPermissions), addedPermissions) => Object.entries(existingPermissions).reduce(
2669
+ var mergePermissions = (existingPermissions = { ...emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
2593
2670
  (accu, [key, value]) => {
2594
2671
  let values;
2595
2672
  if (!accu[key]) {
@@ -2599,12 +2676,12 @@ var mergePermissions = (existingPermissions = __spreadValues({}, emptyUiPermissi
2599
2676
  if (Array.isArray(value)) {
2600
2677
  values = [...value, ...accu[key]].filter(import_helpers4.duplicateFilter);
2601
2678
  } else {
2602
- values = mergePermissions(accu[key], __spreadValues({}, value));
2679
+ values = mergePermissions(accu[key], { ...value });
2603
2680
  }
2604
2681
  accu[key] = values;
2605
2682
  return accu;
2606
2683
  },
2607
- __spreadValues({}, addedPermissions)
2684
+ { ...addedPermissions }
2608
2685
  );
2609
2686
  var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
2610
2687
  (accu, roleId) => {
@@ -2613,20 +2690,17 @@ var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
2613
2690
  }
2614
2691
  return mergePermissions(accu, roles[roleId].uiPermissions);
2615
2692
  },
2616
- __spreadValues({}, emptyUiPermissions)
2693
+ { ...emptyUiPermissions }
2617
2694
  );
2618
2695
  var progress = ({ loaded, total }) => {
2619
2696
  let uploadProgress4 = loaded / total * 100;
2620
2697
  return uploadProgress4 = uploadProgress4 < 50 ? Math.ceil(uploadProgress4) : Math.round(uploadProgress4);
2621
2698
  };
2622
- var extractErrorMessage = (err, fallback = "") => {
2623
- var _a, _b2, _c, _d, _e;
2624
- return ((_c = (_b2 = (_a = err.response) == null ? void 0 : _a.data) == null ? void 0 : _b2.error) == null ? void 0 : _c.message) || ((_e = (_d = err.response) == null ? void 0 : _d.data) == null ? void 0 : _e.error) || err.error || err.message || fallback;
2625
- };
2699
+ var extractErrorMessage = (err, fallback = "") => err.response?.data?.error?.message || err.response?.data?.error || err.error || err.message || fallback;
2626
2700
  var preformatWithRequestID = (res, failMsg) => {
2627
2701
  if (failMsg.length > 100) failMsg = `${failMsg.substring(0, 220)}...`;
2628
2702
  try {
2629
- if ((res == null ? void 0 : res.data) && Object.keys(res.data).includes("request_id")) {
2703
+ if (res?.data && Object.keys(res.data).includes("request_id")) {
2630
2704
  let shortRequestUUID = res.data["request_id"].substring(0, 8);
2631
2705
  return `${failMsg} [Request ID: ${shortRequestUUID}]`;
2632
2706
  }
@@ -2641,9 +2715,10 @@ var mapDeviceAttributes = (attributes = []) => attributes.reduce(
2641
2715
  if (!(attribute.value && attribute.name) && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
2642
2716
  return accu;
2643
2717
  }
2644
- accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] = __spreadProps(__spreadValues({}, accu[attribute.scope || ATTRIBUTE_SCOPES.inventory]), {
2718
+ accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] = {
2719
+ ...accu[attribute.scope || ATTRIBUTE_SCOPES.inventory],
2645
2720
  [attribute.name]: attribute.value
2646
- });
2721
+ };
2647
2722
  if (attribute.name === "device_type" && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
2648
2723
  accu.inventory.device_type = [].concat(attribute.value);
2649
2724
  }
@@ -2662,15 +2737,12 @@ var getReleaseListState = (state) => state.releases.releasesList;
2662
2737
  var getListedReleases = (state) => state.releases.releasesList.releaseIds;
2663
2738
  var getReleaseMappingDefaults = () => ({});
2664
2739
  var getReleasesList = (0, import_toolkit13.createSelector)([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);
2665
- var getReleaseTagsById = (0, import_toolkit13.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => __spreadProps(__spreadValues({}, accu), { [key]: key }), {}));
2740
+ var getReleaseTagsById = (0, import_toolkit13.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));
2666
2741
  var getHasReleases = (0, import_toolkit13.createSelector)(
2667
2742
  [getReleaseListState, getReleasesById],
2668
2743
  ({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)
2669
2744
  );
2670
- var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => {
2671
- var _a;
2672
- return (_a = byId[id]) != null ? _a : {};
2673
- });
2745
+ var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});
2674
2746
 
2675
2747
  // src/usersSlice/selectors.ts
2676
2748
  var import_toolkit14 = require("@reduxjs/toolkit");
@@ -2679,10 +2751,7 @@ var getTooltipsById = (state) => state.users.tooltips.byId;
2679
2751
  var getGlobalSettings = (state) => state.users.globalSettings;
2680
2752
  var getCurrentUserId = (state) => state.users.currentUser;
2681
2753
  var getUsersById = (state) => state.users.byId;
2682
- var getCurrentUser = (0, import_toolkit14.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => {
2683
- var _a;
2684
- return (_a = usersById[userId]) != null ? _a : {};
2685
- });
2754
+ var getCurrentUser = (0, import_toolkit14.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});
2686
2755
  var getUserSettings = (state) => state.users.userSettings;
2687
2756
  var getIsDarkMode = (0, import_toolkit14.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
2688
2757
  var getShowHelptips = (0, import_toolkit14.createSelector)(
@@ -2693,22 +2762,22 @@ var getTooltipsState = (0, import_toolkit14.createSelector)(
2693
2762
  [getTooltipsById, getUserSettings],
2694
2763
  (byId, { tooltips = {} }) => Object.entries(byId).reduce(
2695
2764
  (accu, [id, value]) => {
2696
- accu[id] = __spreadValues(__spreadValues({}, accu[id]), value);
2765
+ accu[id] = { ...accu[id], ...value };
2697
2766
  return accu;
2698
2767
  },
2699
- __spreadValues({}, tooltips)
2768
+ { ...tooltips }
2700
2769
  )
2701
2770
  );
2702
2771
  var getHas2FA = (0, import_toolkit14.createSelector)(
2703
2772
  [getCurrentUser],
2704
2773
  (currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === twoFAStates.enabled
2705
2774
  );
2706
- var getIdAttribute = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ id_attribute = __spreadValues({}, defaultIdAttribute) }) => id_attribute);
2775
+ var getIdAttribute = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);
2707
2776
  var getOfflineThresholdSettings = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ offlineThreshold }) => ({
2708
- interval: (offlineThreshold == null ? void 0 : offlineThreshold.interval) || DEVICE_ONLINE_CUTOFF.interval,
2709
- intervalUnit: (offlineThreshold == null ? void 0 : offlineThreshold.intervalUnit) || DEVICE_ONLINE_CUTOFF.intervalName
2777
+ interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,
2778
+ intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
2710
2779
  }));
2711
- var getRolesList = (0, import_toolkit14.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([id, role]) => __spreadValues({ id }, role)));
2780
+ var getRolesList = (0, import_toolkit14.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([id, role]) => ({ id, ...role })));
2712
2781
  var getCurrentSession = (state) => state.users.currentSession;
2713
2782
 
2714
2783
  // src/commonSelectors.ts
@@ -2727,8 +2796,7 @@ var getSearchEndpoint = (0, import_toolkit15.createSelector)(
2727
2796
  var getUserRoles = (0, import_toolkit15.createSelector)(
2728
2797
  [getCurrentUser, getRolesById, getIsEnterprise, getFeatures, getOrganization],
2729
2798
  (currentUser, rolesById2, isEnterprise, { isHosted, hasMultitenancy }, { plan = PLANS.os.id }) => {
2730
- var _a;
2731
- const isAdmin = ((_a = currentUser.roles) == null ? void 0 : _a.length) ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
2799
+ const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
2732
2800
  const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
2733
2801
  return { isAdmin, uiPermissions };
2734
2802
  }
@@ -2797,10 +2865,11 @@ var getFilterAttributes = (0, import_toolkit15.createSelector)(
2797
2865
  const deviceNameAttribute = { key: "name", value: "Name", scope: ATTRIBUTE_SCOPES.tags, category: ATTRIBUTE_SCOPES.tags, priority: 1 };
2798
2866
  const deviceIdAttribute = { key: "id", value: "Device ID", scope: ATTRIBUTE_SCOPES.identity, category: ATTRIBUTE_SCOPES.identity, priority: 1 };
2799
2867
  const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
2800
- const updateAttribute = __spreadProps(__spreadValues({}, checkInAttribute), { key: "updated_ts", value: "Last inventory update" });
2868
+ const updateAttribute = { ...checkInAttribute, key: "updated_ts", value: "Last inventory update" };
2801
2869
  const firstRequestAttribute = { key: "created_ts", value: "First request", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
2802
2870
  const attributes = [
2803
- ...previousFilters.map((item) => __spreadProps(__spreadValues({}, item), {
2871
+ ...previousFilters.map((item) => ({
2872
+ ...item,
2804
2873
  value: deviceIdAttribute.key === item.key ? deviceIdAttribute.value : item.key,
2805
2874
  category: "recently used",
2806
2875
  priority: 0
@@ -2818,14 +2887,13 @@ var getFilterAttributes = (0, import_toolkit15.createSelector)(
2818
2887
  return (0, import_helpers5.attributeDuplicateFilter)(attributes, "key");
2819
2888
  }
2820
2889
  );
2821
- var getOnboardingState = (0, import_toolkit15.createSelector)([getOnboarding, getUserSettings], (_a, { onboarding = {} }) => {
2822
- var _b2 = _a, { complete, progress: progress2, showTips } = _b2, remainder = __objRest(_b2, ["complete", "progress", "showTips"]);
2823
- return __spreadProps(__spreadValues(__spreadValues({}, remainder), onboarding), {
2824
- complete: onboarding.complete || complete,
2825
- progress: Object.keys(onboardingSteps).findIndex((step) => step === progress2) > Object.keys(onboardingSteps).findIndex((step) => step === onboarding.progress) ? progress2 : onboarding.progress,
2826
- showTips: !onboarding.showTips ? onboarding.showTips : showTips
2827
- });
2828
- });
2890
+ var getOnboardingState = (0, import_toolkit15.createSelector)([getOnboarding, getUserSettings], ({ complete, progress: progress2, showTips, ...remainder }, { onboarding = {} }) => ({
2891
+ ...remainder,
2892
+ ...onboarding,
2893
+ complete: onboarding.complete || complete,
2894
+ progress: Object.keys(onboardingSteps).findIndex((step) => step === progress2) > Object.keys(onboardingSteps).findIndex((step) => step === onboarding.progress) ? progress2 : onboarding.progress,
2895
+ showTips: !onboarding.showTips ? onboarding.showTips : showTips
2896
+ }));
2829
2897
  var getDemoDeviceAddress = (0, import_toolkit15.createSelector)([getDevicesById, getOnboarding], (devicesById, { approach, demoArtifactPort }) => {
2830
2898
  const demoDeviceAddress = `http://${(0, import_helpers5.getDemoDeviceAddress)(Object.values(devicesById), approach)}`;
2831
2899
  return demoArtifactPort ? `${demoDeviceAddress}:${demoArtifactPort}` : demoDeviceAddress;
@@ -2846,12 +2914,11 @@ var getDeploymentRelease = (0, import_toolkit15.createSelector)(
2846
2914
  var getSelectedDeploymentData = (0, import_toolkit15.createSelector)(
2847
2915
  [getDeploymentsById, getDeploymentsSelectionState, getDevicesById, getSelectedDeploymentDeviceIds],
2848
2916
  (deploymentsById, { selectedId }, devicesById, selectedDeviceIds) => {
2849
- var _a;
2850
- const deployment = (_a = deploymentsById[selectedId]) != null ? _a : {};
2917
+ const deployment = deploymentsById[selectedId] ?? {};
2851
2918
  const { devices = {} } = deployment;
2852
2919
  return {
2853
2920
  deployment,
2854
- selectedDevices: selectedDeviceIds.map((deviceId) => __spreadValues(__spreadValues({}, devicesById[deviceId]), devices[deviceId]))
2921
+ selectedDevices: selectedDeviceIds.map((deviceId) => ({ ...devicesById[deviceId], ...devices[deviceId] }))
2855
2922
  };
2856
2923
  }
2857
2924
  );
@@ -2866,8 +2933,7 @@ var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
2866
2933
  }, {})
2867
2934
  );
2868
2935
  var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUserRoles, (_, options = {}) => options], (groupsById, { uiPermissions }, { staticOnly }) => {
2869
- var _a;
2870
- const _b2 = groupsById, { [_a = UNGROUPED_GROUP.id]: ungrouped } = _b2, groups = __objRest(_b2, [__restKey(_a)]);
2936
+ const { [UNGROUPED_GROUP.id]: ungrouped, ...groups } = groupsById;
2871
2937
  if (staticOnly) {
2872
2938
  return Object.keys(uiPermissions.groups).sort();
2873
2939
  }
@@ -2901,9 +2967,25 @@ var getAuditlogDevice = (0, import_toolkit15.createSelector)([getAuditLogEntry,
2901
2967
  if (auditlogEvent) {
2902
2968
  const { object = {} } = auditlogEvent;
2903
2969
  const { device = {}, id, type } = object;
2904
- auditlogDevice = type === "device" ? __spreadValues({ id }, device) : auditlogDevice;
2970
+ auditlogDevice = type === "device" ? { id, ...device } : auditlogDevice;
2905
2971
  }
2906
- return __spreadValues(__spreadValues({}, auditlogDevice), devicesById[auditlogDevice.id]);
2972
+ return { ...auditlogDevice, ...devicesById[auditlogDevice.id] };
2973
+ });
2974
+ var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, getRolesList], ({ service_provider }, roles) => {
2975
+ if (service_provider) {
2976
+ return roles.reduce((accu, role) => {
2977
+ if (rolesById[role.id]) {
2978
+ return accu;
2979
+ }
2980
+ accu.push(role);
2981
+ return accu;
2982
+ }, Object.values(serviceProviderRolesById));
2983
+ }
2984
+ return Object.keys(rolesById).reverse().reduce((accu, key) => {
2985
+ const index = accu.findIndex(({ id }) => id === key);
2986
+ accu = [accu[index], ...accu.filter((item, itemIndex) => index !== itemIndex)];
2987
+ return accu;
2988
+ }, roles);
2907
2989
  });
2908
2990
 
2909
2991
  // src/store.ts
@@ -2939,8 +3021,9 @@ var sessionReducer = (state, action) => {
2939
3021
  return rootReducer(state, action);
2940
3022
  };
2941
3023
  var getConfiguredStore = (options = {}) => {
2942
- const _a = options, { preloadedState = {} } = _a, config = __objRest(_a, ["preloadedState"]);
2943
- return (0, import_toolkit16.configureStore)(__spreadProps(__spreadValues({}, config), {
3024
+ const { preloadedState = {}, ...config } = options;
3025
+ return (0, import_toolkit16.configureStore)({
3026
+ ...config,
2944
3027
  preloadedState,
2945
3028
  reducer: sessionReducer,
2946
3029
  middleware: (getDefaultMiddleware) => getDefaultMiddleware({
@@ -2953,7 +3036,7 @@ var getConfiguredStore = (options = {}) => {
2953
3036
  ignoredPaths: ["app.uploadsById", "app.snackbar", "organization.externalDeviceIntegrations"]
2954
3037
  }
2955
3038
  })
2956
- }));
3039
+ });
2957
3040
  };
2958
3041
  var store = getConfiguredStore({
2959
3042
  preloadedState: {}
@@ -2973,17 +3056,16 @@ var dateFunctionMap = {
2973
3056
  setDays: "setDate"
2974
3057
  };
2975
3058
  var setOfflineThreshold = (0, import_toolkit17.createAsyncThunk)(`${sliceName}/setOfflineThreshold`, (_, { dispatch, getState }) => {
2976
- var _a, _b2;
2977
3059
  const { interval, intervalUnit } = getOfflineThresholdSettings(getState());
2978
3060
  const today = /* @__PURE__ */ new Date();
2979
3061
  const intervalName = `${intervalUnit.charAt(0).toUpperCase()}${intervalUnit.substring(1)}`;
2980
- const setter = (_a = dateFunctionMap[`set${intervalName}`]) != null ? _a : `set${intervalName}`;
2981
- const getter = (_b2 = dateFunctionMap[`get${intervalName}`]) != null ? _b2 : `get${intervalName}`;
3062
+ const setter = dateFunctionMap[`set${intervalName}`] ?? `set${intervalName}`;
3063
+ const getter = dateFunctionMap[`get${intervalName}`] ?? `get${intervalName}`;
2982
3064
  today[setter](today[getter]() - interval);
2983
3065
  let value;
2984
3066
  try {
2985
3067
  value = today.toISOString();
2986
- } catch (e) {
3068
+ } catch {
2987
3069
  return Promise.resolve(dispatch(actions.setSnackbar("There was an error saving the offline threshold, please check your settings.")));
2988
3070
  }
2989
3071
  return Promise.resolve(dispatch(actions.setOfflineThreshold(value)));
@@ -3024,37 +3106,43 @@ var getLatestReleaseInfo = (0, import_toolkit17.createAsyncThunk)(`${sliceName}/
3024
3106
  accu.latestRepos[item.name] = getComparisonCompatibleVersion(item.version);
3025
3107
  return accu;
3026
3108
  },
3027
- { latestVersions: __spreadValues({}, getState().app.versionInformation), latestRepos: {} }
3109
+ { latestVersions: { ...getState().app.versionInformation }, latestRepos: {} }
3028
3110
  );
3029
3111
  const info = deductSaasState(latestRelease, guiTags, saas);
3030
3112
  return Promise.resolve(
3031
3113
  dispatch(
3032
- actions.setVersionInformation(__spreadProps(__spreadValues({}, latestVersions), {
3114
+ actions.setVersionInformation({
3115
+ ...latestVersions,
3033
3116
  backend: info,
3034
3117
  GUI: info,
3035
3118
  latestRelease: {
3036
3119
  releaseDate: latestRelease.release_date,
3037
3120
  repos: latestRepos
3038
3121
  }
3039
- }))
3122
+ })
3040
3123
  )
3041
3124
  );
3042
3125
  });
3043
3126
  });
3044
3127
  var setSearchState = (0, import_toolkit17.createAsyncThunk)(`${sliceName}/setSearchState`, (searchState, { dispatch, getState }) => {
3045
3128
  const currentState = getSearchState(getState());
3046
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), searchState), {
3047
- sort: __spreadValues(__spreadValues({}, currentState.sort), searchState.sort)
3048
- });
3129
+ let nextState = {
3130
+ ...currentState,
3131
+ ...searchState,
3132
+ sort: {
3133
+ ...currentState.sort,
3134
+ ...searchState.sort
3135
+ }
3136
+ };
3049
3137
  let tasks = [];
3050
- const _a = currentState, { isSearching: currentSearching, deviceIds: currentDevices, searchTotal: currentTotal } = _a, currentRequestState = __objRest(_a, ["isSearching", "deviceIds", "searchTotal"]);
3051
- const _b2 = nextState, { isSearching: nextSearching, deviceIds: nextDevices, searchTotal: nextTotal } = _b2, nextRequestState = __objRest(_b2, ["isSearching", "deviceIds", "searchTotal"]);
3138
+ const { isSearching: currentSearching, deviceIds: currentDevices, searchTotal: currentTotal, ...currentRequestState } = currentState;
3139
+ const { isSearching: nextSearching, deviceIds: nextDevices, searchTotal: nextTotal, ...nextRequestState } = nextState;
3052
3140
  if (nextRequestState.searchTerm && !(0, import_helpers6.deepCompare)(currentRequestState, nextRequestState)) {
3053
3141
  nextState.isSearching = true;
3054
3142
  tasks.push(
3055
3143
  dispatch(searchDevices(nextState)).unwrap().then((results) => {
3056
3144
  const searchResult = results[results.length - 1];
3057
- return dispatch(actions.setSearchState(__spreadProps(__spreadValues({}, searchResult), { isSearching: false })));
3145
+ return dispatch(actions.setSearchState({ ...searchResult, isSearching: false }));
3058
3146
  }).catch(() => dispatch(actions.setSearchState({ isSearching: false, searchTotal: 0 })))
3059
3147
  );
3060
3148
  }
@@ -3071,13 +3159,15 @@ var { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;
3071
3159
  var deriveDeploymentGroup = ({ filter = {}, group, groups = [], name }) => group || groups.length === 1 && !(0, import_isUUID.default)(name) ? groups[0] : filter.name;
3072
3160
  var transformDeployments = (deployments, deploymentsById) => deployments.sort(import_helpers7.startTimeSort).reduce(
3073
3161
  (accu, item) => {
3074
- var _a, _b2;
3075
- const filter = (_a = item.filter) != null ? _a : {};
3076
- let deployment = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, deploymentPrototype), deploymentsById[item.id]), item), {
3077
- filter: item.filter ? __spreadProps(__spreadValues({}, filter), { name: (_b2 = filter.name) != null ? _b2 : filter.id, filters: mapTermsToFilters(filter.terms) }) : void 0,
3162
+ const filter = item.filter ?? {};
3163
+ let deployment = {
3164
+ ...deploymentPrototype,
3165
+ ...deploymentsById[item.id],
3166
+ ...item,
3167
+ filter: item.filter ? { ...filter, name: filter.name ?? filter.id, filters: mapTermsToFilters(filter.terms) } : void 0,
3078
3168
  name: decodeURIComponent(item.name)
3079
- });
3080
- deployment = __spreadProps(__spreadValues({}, deployment), { group: deriveDeploymentGroup(deployment) });
3169
+ };
3170
+ deployment = { ...deployment, group: deriveDeploymentGroup(deployment) };
3081
3171
  accu.deployments[item.id] = deployment;
3082
3172
  accu.deploymentIds.push(item.id);
3083
3173
  return accu;
@@ -3131,11 +3221,12 @@ var createDeployment = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/cre
3131
3221
  return request.catch((err) => commonErrorHandler(err, "Error creating deployment.", dispatch)).then((data) => {
3132
3222
  const lastslashindex = data.headers.location.lastIndexOf("/");
3133
3223
  const deploymentId = data.headers.location.substring(lastslashindex + 1);
3134
- const deployment = __spreadProps(__spreadValues({}, newDeployment), {
3224
+ const deployment = {
3225
+ ...newDeployment,
3135
3226
  id: deploymentId,
3136
3227
  devices: newDeployment.devices ? newDeployment.devices.map((id) => ({ id, status: "pending" })) : [],
3137
3228
  statistics: { status: {} }
3138
- });
3229
+ };
3139
3230
  let tasks = [
3140
3231
  dispatch(actions2.createdDeployment(deployment)),
3141
3232
  dispatch(getSingleDeployment(deploymentId)),
@@ -3278,14 +3369,23 @@ var updateDeploymentControlMap = (0, import_toolkit18.createAsyncThunk)(
3278
3369
  ({ deploymentId, updateControlMap }, { dispatch }) => general_api_default.patch(`${deploymentsApiUrl}/deployments/${deploymentId}`, { update_control_map: updateControlMap }).catch((err) => commonErrorHandler(err, "There was an error while updating the deployment status:", dispatch)).then(() => Promise.resolve(dispatch(getSingleDeployment(deploymentId))))
3279
3370
  );
3280
3371
  var setDeploymentsState = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/setDeploymentsState`, (selection, { dispatch, getState }) => {
3281
- const _a = selection, { page, perPage } = _a, selectionState = __objRest(_a, ["page", "perPage"]);
3372
+ const { page, perPage, ...selectionState } = selection;
3282
3373
  const currentState = getState().deployments.selectionState;
3283
- let nextState = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, currentState), selectionState), Object.keys(DEPLOYMENT_STATES).reduce((accu, item) => {
3284
- accu[item] = __spreadValues(__spreadValues({}, currentState[item]), selectionState[item]);
3285
- return accu;
3286
- }, {})), {
3287
- general: __spreadValues(__spreadValues({}, currentState.general), selectionState.general)
3288
- });
3374
+ let nextState = {
3375
+ ...currentState,
3376
+ ...selectionState,
3377
+ ...Object.keys(DEPLOYMENT_STATES).reduce((accu, item) => {
3378
+ accu[item] = {
3379
+ ...currentState[item],
3380
+ ...selectionState[item]
3381
+ };
3382
+ return accu;
3383
+ }, {}),
3384
+ general: {
3385
+ ...currentState.general,
3386
+ ...selectionState.general
3387
+ }
3388
+ };
3289
3389
  let tasks = [dispatch(actions2.setDeploymentsState(nextState))];
3290
3390
  if (nextState.selectedId && currentState.selectedId !== nextState.selectedId) {
3291
3391
  tasks.push(dispatch(getSingleDeployment(nextState.selectedId)));
@@ -3315,15 +3415,20 @@ var getDeploymentsConfig = (0, import_toolkit18.createAsyncThunk)(
3315
3415
  const { binary_delta = {}, binary_delta_limits = {} } = delta;
3316
3416
  const { xdelta_args = {}, timeout: timeoutConfig = oldConfig.binaryDelta.timeout } = binary_delta;
3317
3417
  const { xdelta_args_limits = {}, timeout: timeoutLimit = oldConfig.binaryDeltaLimits.timeout } = binary_delta_limits;
3318
- const config = __spreadProps(__spreadValues({}, oldConfig), {
3418
+ const config = {
3419
+ ...oldConfig,
3319
3420
  hasDelta: Boolean(delta.enabled),
3320
- binaryDelta: __spreadValues(__spreadProps(__spreadValues({}, oldConfig.binaryDelta), {
3321
- timeout: timeoutConfig
3322
- }), mapExternalDeltaConfig(xdelta_args)),
3323
- binaryDeltaLimits: __spreadValues(__spreadProps(__spreadValues({}, oldConfig.binaryDeltaLimits), {
3324
- timeout: timeoutLimit
3325
- }), mapExternalDeltaConfig(xdelta_args_limits))
3326
- });
3421
+ binaryDelta: {
3422
+ ...oldConfig.binaryDelta,
3423
+ timeout: timeoutConfig,
3424
+ ...mapExternalDeltaConfig(xdelta_args)
3425
+ },
3426
+ binaryDeltaLimits: {
3427
+ ...oldConfig.binaryDeltaLimits,
3428
+ timeout: timeoutLimit,
3429
+ ...mapExternalDeltaConfig(xdelta_args_limits)
3430
+ }
3431
+ };
3327
3432
  return Promise.resolve(dispatch(actions2.setDeploymentsConfig(config)));
3328
3433
  })
3329
3434
  );
@@ -3333,7 +3438,7 @@ var deepClean = (source) => Object.entries(source).reduce((accu, [key, value]) =
3333
3438
  if (cleanedValue === void 0 || typeof cleanedValue === "object" && (0, import_helpers7.isEmpty)(cleanedValue)) {
3334
3439
  return accu;
3335
3440
  }
3336
- accu = __spreadProps(__spreadValues({}, accu != null ? accu : {}), { [key]: cleanedValue });
3441
+ accu = { ...accu ?? {}, [key]: cleanedValue };
3337
3442
  }
3338
3443
  return accu;
3339
3444
  }, void 0);
@@ -3353,9 +3458,13 @@ var saveDeltaDeploymentsConfig = (0, import_toolkit18.createAsyncThunk)(`${slice
3353
3458
  }
3354
3459
  return general_api_default.put(`${deploymentsApiUrl}/config/binary_delta`, result).catch((err) => commonErrorHandler(err, "There was a problem storing your delta artifact generation configuration.", dispatch)).then(() => {
3355
3460
  const oldConfig = getState().deployments.config;
3356
- const newConfig = __spreadProps(__spreadValues({}, oldConfig), {
3357
- binaryDelta: __spreadValues(__spreadValues({}, oldConfig.binaryDelta), config)
3358
- });
3461
+ const newConfig = {
3462
+ ...oldConfig,
3463
+ binaryDelta: {
3464
+ ...oldConfig.binaryDelta,
3465
+ ...config
3466
+ }
3467
+ };
3359
3468
  return Promise.all([dispatch(actions2.setDeploymentsConfig(newConfig)), dispatch(setSnackbar2("Settings saved successfully"))]);
3360
3469
  });
3361
3470
  });
@@ -3366,7 +3475,7 @@ var { page: defaultPage2, perPage: defaultPerPage2 } = DEVICE_LIST_DEFAULTS;
3366
3475
  var cutoffLength = 75;
3367
3476
  var ellipsis = "...";
3368
3477
  var longTextTrimmer = (text) => text.length >= cutoffLength + ellipsis.length ? `${text.substring(0, cutoffLength + ellipsis.length)}${ellipsis}` : text;
3369
- var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) => __spreadProps(__spreadValues({}, alert), { fullName: alert.name, name: longTextTrimmer(alert.name) }));
3478
+ var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name) }));
3370
3479
  var getDeviceAlerts = (0, import_toolkit19.createAsyncThunk)(`${sliceName4}/getDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {
3371
3480
  const { page = defaultPage2, perPage = defaultPerPage2, issuedBefore, issuedAfter, sortAscending = false } = config;
3372
3481
  const issued_after = issuedAfter ? `&issued_after=${issuedAfter}` : "";
@@ -3384,14 +3493,15 @@ var getLatestDeviceAlerts = (0, import_toolkit19.createAsyncThunk)(`${sliceName4
3384
3493
  });
3385
3494
  var getIssueCountsByType2 = (0, import_toolkit19.createAsyncThunk)(`${sliceName4}/getIssueCountsByType`, ({ type, options = {} }, { dispatch, getState }) => {
3386
3495
  const state = getState();
3387
- const _a = options, { filters = getDeviceFilters(state), group, status } = _a, remainder = __objRest(_a, ["filters", "group", "status"]);
3388
- const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters(__spreadProps(__spreadValues({}, remainder), {
3496
+ const { filters = getDeviceFilters(state), group, status, ...remainder } = options;
3497
+ const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({
3498
+ ...remainder,
3389
3499
  filters,
3390
3500
  group,
3391
3501
  offlineThreshold: state.app.offlineThreshold,
3392
3502
  selectedIssues: [type],
3393
3503
  status
3394
- }));
3504
+ });
3395
3505
  return general_api_default.post(getSearchEndpoint(getState()), {
3396
3506
  page: 1,
3397
3507
  per_page: 1,
@@ -3443,21 +3553,21 @@ var determineProgress = (acceptedDevices, pendingDevices, releases, pastDeployme
3443
3553
  return steps[progress2];
3444
3554
  };
3445
3555
  var deductOnboardingState = ({ devicesById, devicesByStatus, onboardingState, pastDeployments, releases, userCapabilities, userId }) => {
3446
- var _a;
3447
3556
  const { canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases } = userCapabilities;
3448
3557
  const userCookie = cookies3.get(`${userId}-onboarded`);
3449
3558
  const acceptedDevices = devicesByStatus[DEVICE_STATES.accepted].deviceIds;
3450
3559
  const pendingDevices = devicesByStatus[DEVICE_STATES.pending].deviceIds;
3451
- let deviceType = (_a = onboardingState.deviceType) != null ? _a : [];
3560
+ let deviceType = onboardingState.deviceType ?? [];
3452
3561
  deviceType = !deviceType.length && acceptedDevices.length && devicesById[acceptedDevices[0]].hasOwnProperty("attributes") ? devicesById[acceptedDevices[0]].attributes.device_type : deviceType;
3453
3562
  const progress2 = applyOnboardingFallbacks(onboardingState.progress || determineProgress(acceptedDevices, pendingDevices, releases, pastDeployments));
3454
- return __spreadProps(__spreadValues({}, onboardingState), {
3563
+ return {
3564
+ ...onboardingState,
3455
3565
  complete: !!(Boolean(userCookie) || onboardingState.complete || acceptedDevices.length > 1 && pendingDevices.length > 0 && releases.length > 1 && pastDeployments.length > 1 || acceptedDevices.length >= 1 && releases.length >= 2 && pastDeployments.length > 2 || acceptedDevices.length >= 1 && pendingDevices.length > 0 && releases.length >= 2 && pastDeployments.length >= 2 || orderedOnboardingSteps.findIndex((step) => step === progress2) >= orderedOnboardingSteps.length - 1 || onboardingState.disable || ![canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases].every((i) => i)),
3456
3566
  showTips: onboardingState.showTips != null ? onboardingState.showTips : true,
3457
3567
  deviceType,
3458
3568
  approach: onboardingState.approach || (deviceType.some((type) => type.startsWith("qemu")) ? "virtual" : "physical"),
3459
3569
  progress: progress2
3460
- });
3570
+ };
3461
3571
  };
3462
3572
  var getOnboardingState2 = (0, import_toolkit20.createAsyncThunk)(`${sliceName5}/getOnboardingState`, (_, { dispatch, getState }) => {
3463
3573
  const state = getState();
@@ -3515,7 +3625,7 @@ var advanceOnboarding = (0, import_toolkit20.createAsyncThunk)(`${sliceName5}/ad
3515
3625
  return;
3516
3626
  }
3517
3627
  const madeProgress = steps[stepIndex + 1];
3518
- const state = __spreadProps(__spreadValues({}, getOnboardingState(getState())), { progress: madeProgress });
3628
+ const state = { ...getOnboardingState(getState()), progress: madeProgress };
3519
3629
  state.complete = stepIndex + 1 >= steps.findIndex((step) => step === onboardingSteps.DEPLOYMENTS_PAST_COMPLETED_FAILURE) ? true : state.complete;
3520
3630
  return Promise.all([dispatch(actions5.setOnboardingProgress(madeProgress)), dispatch(saveUserSettings({ onboarding: state }))]);
3521
3631
  });
@@ -3598,8 +3708,8 @@ var completeUpgrade = (0, import_toolkit21.createAsyncThunk)(
3598
3708
  ({ tenantId, plan }, { dispatch }) => general_api_default.post(`${tenantadmApiUrlv2}/tenants/${tenantId}/upgrade/complete`, { plan }).catch((err) => commonErrorHandler(err, `There was an error upgrading your account:`, dispatch)).then(() => Promise.resolve(dispatch(getUserOrganization())))
3599
3709
  );
3600
3710
  var prepareAuditlogQuery = ({ startDate, endDate, user: userFilter, type, detail: detailFilter, sort = {} }) => {
3601
- const userId = (userFilter == null ? void 0 : userFilter.id) || userFilter;
3602
- const detail = (detailFilter == null ? void 0 : detailFilter.id) || detailFilter;
3711
+ const userId = userFilter?.id || userFilter;
3712
+ const detail = detailFilter?.id || detailFilter;
3603
3713
  const createdAfter = startDate ? `&created_after=${Math.round(Date.parse(startDate) / 1e3)}` : "";
3604
3714
  const createdBefore = endDate ? `&created_before=${Math.round(Date.parse(endDate) / 1e3)}` : "";
3605
3715
  const typeSearch = type ? `&object_type=${type.value}`.toLowerCase() : "";
@@ -3626,12 +3736,14 @@ var getAuditLogsCsvLink = (0, import_toolkit21.createAsyncThunk)(
3626
3736
  );
3627
3737
  var setAuditlogsState = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/setAuditlogsState`, (selectionState, { dispatch, getState }) => {
3628
3738
  const currentState = getAuditlogState(getState());
3629
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), selectionState), {
3630
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
3631
- });
3739
+ let nextState = {
3740
+ ...currentState,
3741
+ ...selectionState,
3742
+ sort: { ...currentState.sort, ...selectionState.sort }
3743
+ };
3632
3744
  let tasks = [];
3633
- const _a = currentState, { isLoading: currentLoading, selectedIssue: currentIssue } = _a, currentRequestState = __objRest(_a, ["isLoading", "selectedIssue"]);
3634
- const _b2 = nextState, { isLoading: selectionLoading, selectedIssue: selectionIssue } = _b2, selectionRequestState = __objRest(_b2, ["isLoading", "selectedIssue"]);
3745
+ const { isLoading: currentLoading, selectedIssue: currentIssue, ...currentRequestState } = currentState;
3746
+ const { isLoading: selectionLoading, selectedIssue: selectionIssue, ...selectionRequestState } = nextState;
3635
3747
  if (!(0, import_helpers9.deepCompare)(currentRequestState, selectionRequestState)) {
3636
3748
  nextState.isLoading = true;
3637
3749
  tasks.push(dispatch(getAuditLogs(nextState)).finally(() => dispatch(actions6.setAuditLogState({ isLoading: false }))));
@@ -3643,27 +3755,30 @@ var tenantDataDivergedMessage = "The system detected there is a change in your p
3643
3755
  var addTenant = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/createTenant`, (selectionState, { dispatch }) => {
3644
3756
  return general_api_default.post(`${tenantadmApiUrlv2}/tenants`, selectionState).then(() => Promise.all([dispatch(getTenants()), dispatch(setSnackbar3("Tenant was created successfully."))])).catch((err) => commonErrorHandler(err, "There was an error creating tenant", dispatch, commonErrorFallback));
3645
3757
  });
3646
- var tenantListRetrieval = (config) => __async(void 0, null, function* () {
3758
+ var tenantListRetrieval = async (config) => {
3647
3759
  const { page, perPage } = config;
3648
3760
  const params = new URLSearchParams({ page, per_page: perPage }).toString();
3649
- const tenantList = yield general_api_default.get(`${tenantadmApiUrlv2}/tenants?${params}`);
3761
+ const tenantList = await general_api_default.get(`${tenantadmApiUrlv2}/tenants?${params}`);
3650
3762
  const totalCount = tenantList.headers[headerNames.total] || TENANT_LIST_DEFAULT.perPage;
3651
- return [tenantList.data, totalCount];
3652
- });
3653
- var getTenants = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/getTenants`, (_0, _1) => __async(void 0, [_0, _1], function* (_, { dispatch, getState }) {
3763
+ return [tenantList.data, Number(totalCount)];
3764
+ };
3765
+ var getTenants = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/getTenants`, async (_, { dispatch, getState }) => {
3654
3766
  const currentState = getTenantsList(getState());
3655
- const [tenants, pageCount] = yield tenantListRetrieval(currentState);
3656
- dispatch(actions6.setTenantListState(__spreadProps(__spreadValues({}, currentState), { total: pageCount, tenants })));
3657
- }));
3658
- var setTenantsListState = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/setTenantsListState`, (_0, _1) => __async(void 0, [_0, _1], function* (selectionState, { dispatch, getState }) {
3767
+ const [tenants, pageCount] = await tenantListRetrieval(currentState);
3768
+ dispatch(actions6.setTenantListState({ ...currentState, total: pageCount, tenants }));
3769
+ });
3770
+ var setTenantsListState = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/setTenantsListState`, async (selectionState, { dispatch, getState }) => {
3659
3771
  const currentState = getTenantsList(getState());
3660
- const nextState = __spreadValues(__spreadValues({}, currentState), selectionState);
3772
+ const nextState = {
3773
+ ...currentState,
3774
+ ...selectionState
3775
+ };
3661
3776
  if (!(0, import_helpers9.deepCompare)(currentState, selectionState)) {
3662
- const [tenants, pageCount] = yield tenantListRetrieval(nextState);
3663
- return dispatch(actions6.setTenantListState(__spreadProps(__spreadValues({}, nextState), { tenants, total: pageCount })));
3777
+ const [tenants, pageCount] = await tenantListRetrieval(nextState);
3778
+ return dispatch(actions6.setTenantListState({ ...nextState, tenants, total: pageCount }));
3664
3779
  }
3665
- return dispatch(actions6.setTenantListState(__spreadValues({}, nextState)));
3666
- }));
3780
+ return dispatch(actions6.setTenantListState({ ...nextState }));
3781
+ });
3667
3782
  var editTenantDeviceLimit = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/editDeviceLimit`, ({ newLimit, id, name }, { dispatch }) => {
3668
3783
  return general_api_default.put(`${tenantadmApiUrlv2}/tenants/${id}/child`, { device_limit: newLimit, name }).catch((err) => commonErrorHandler(err, `Device Limit cannot be changed`, dispatch)).then(() => {
3669
3784
  const tasks = [Promise.resolve(dispatch(setSnackbar3("Device Limit was changed successfully")))];
@@ -3706,10 +3821,7 @@ var downloadLicenseReport = (0, import_toolkit21.createAsyncThunk)(
3706
3821
  );
3707
3822
  var createIntegration = (0, import_toolkit21.createAsyncThunk)(
3708
3823
  `${sliceName6}/createIntegration`,
3709
- (_a, { dispatch }) => {
3710
- var _b2 = _a, { id } = _b2, integration = __objRest(_b2, ["id"]);
3711
- return general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar3("The integration was set up successfully")), dispatch(getIntegrations())]));
3712
- }
3824
+ ({ id, ...integration }, { dispatch }) => general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar3("The integration was set up successfully")), dispatch(getIntegrations())]))
3713
3825
  );
3714
3826
  var changeIntegration = (0, import_toolkit21.createAsyncThunk)(
3715
3827
  `${sliceName6}/changeIntegration`,
@@ -3730,9 +3842,8 @@ var getIntegrations = (0, import_toolkit21.createAsyncThunk)(
3730
3842
  (_, { dispatch, getState }) => general_api_default.get(`${iotManagerBaseURL}/integrations`).catch((err) => commonErrorHandler(err, "There was an error retrieving the integration", dispatch, commonErrorFallback)).then(({ data }) => {
3731
3843
  const existingIntegrations = getState().organization.externalDeviceIntegrations;
3732
3844
  const integrations = data.reduce((accu, item) => {
3733
- var _a;
3734
- const existingIntegration = (_a = existingIntegrations.find((integration2) => item.id === integration2.id)) != null ? _a : {};
3735
- const integration = __spreadValues(__spreadValues({}, existingIntegration), item);
3845
+ const existingIntegration = existingIntegrations.find((integration2) => item.id === integration2.id) ?? {};
3846
+ const integration = { ...existingIntegration, ...item };
3736
3847
  accu.push(integration);
3737
3848
  return accu;
3738
3849
  }, []);
@@ -3784,7 +3895,7 @@ var getSsoConfigById = (0, import_toolkit21.createAsyncThunk)(
3784
3895
  `${sliceName6}/getSsoConfigById`,
3785
3896
  (config, { dispatch }) => general_api_default.get(`${ssoIdpApiUrlv1}/${config.id}`).catch((err) => dispatch(ssoConfigActionErrorHandler(err, "read"))).then(({ data, headers }) => {
3786
3897
  const sso = Object.values(SSO_TYPES).find(({ contentType }) => contentType === headers["content-type"]);
3787
- return sso ? Promise.resolve(__spreadProps(__spreadValues({}, config), { config: data, type: sso.id })) : Promise.reject("Unsupported SSO config content type.");
3898
+ return sso ? Promise.resolve({ ...config, config: data, type: sso.id }) : Promise.reject("Unsupported SSO config content type.");
3788
3899
  })
3789
3900
  );
3790
3901
  var getSsoConfigs = (0, import_toolkit21.createAsyncThunk)(
@@ -3800,19 +3911,20 @@ var import_locationutils = require("@northern.tech/utils/locationutils");
3800
3911
  var import_toolkit22 = require("@reduxjs/toolkit");
3801
3912
  var import_axios2 = require("axios");
3802
3913
 
3803
- // ../../node_modules/uuid/dist/esm-node/rng.js
3804
- var import_crypto = __toESM(require("crypto"));
3805
- var rnds8Pool = new Uint8Array(256);
3806
- var poolPtr = rnds8Pool.length;
3914
+ // ../../node_modules/uuid/dist/esm-browser/rng.js
3915
+ var getRandomValues;
3916
+ var rnds8 = new Uint8Array(16);
3807
3917
  function rng() {
3808
- if (poolPtr > rnds8Pool.length - 16) {
3809
- import_crypto.default.randomFillSync(rnds8Pool);
3810
- poolPtr = 0;
3918
+ if (!getRandomValues) {
3919
+ getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
3920
+ if (!getRandomValues) {
3921
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3922
+ }
3811
3923
  }
3812
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
3924
+ return getRandomValues(rnds8);
3813
3925
  }
3814
3926
 
3815
- // ../../node_modules/uuid/dist/esm-node/stringify.js
3927
+ // ../../node_modules/uuid/dist/esm-browser/stringify.js
3816
3928
  var byteToHex = [];
3817
3929
  for (let i = 0; i < 256; ++i) {
3818
3930
  byteToHex.push((i + 256).toString(16).slice(1));
@@ -3821,13 +3933,13 @@ function unsafeStringify(arr, offset = 0) {
3821
3933
  return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
3822
3934
  }
3823
3935
 
3824
- // ../../node_modules/uuid/dist/esm-node/native.js
3825
- var import_crypto2 = __toESM(require("crypto"));
3936
+ // ../../node_modules/uuid/dist/esm-browser/native.js
3937
+ var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3826
3938
  var native_default = {
3827
- randomUUID: import_crypto2.default.randomUUID
3939
+ randomUUID
3828
3940
  };
3829
3941
 
3830
- // ../../node_modules/uuid/dist/esm-node/v4.js
3942
+ // ../../node_modules/uuid/dist/esm-browser/v4.js
3831
3943
  function v4(options, buf, offset) {
3832
3944
  if (native_default.randomUUID && !buf && !options) {
3833
3945
  return native_default.randomUUID();
@@ -3852,20 +3964,21 @@ var { setSnackbar: setSnackbar4, initUpload, uploadProgress: uploadProgress2, cl
3852
3964
  var { page: defaultPage4, perPage: defaultPerPage4 } = DEVICE_LIST_DEFAULTS;
3853
3965
  var sortingDefaults = { direction: SORTING_OPTIONS.desc, key: "modified" };
3854
3966
  var flattenRelease = (release, stateRelease) => {
3855
- var _a;
3856
- const updatedArtifacts = ((_a = release.artifacts) == null ? void 0 : _a.sort((0, import_helpers10.customSort)(1, "modified"))) || [];
3967
+ const updatedArtifacts = release.artifacts?.sort((0, import_helpers10.customSort)(1, "modified")) || [];
3857
3968
  const { artifacts, deviceTypes, modified } = updatedArtifacts.reduce(
3858
3969
  (accu, item) => {
3859
- var _a2;
3860
3970
  accu.deviceTypes.push(...item.device_types_compatible);
3861
- const stateArtifact = ((_a2 = stateRelease.artifacts) == null ? void 0 : _a2.find((releaseArtifact) => releaseArtifact.id === item.id)) || {};
3971
+ const stateArtifact = stateRelease.artifacts?.find((releaseArtifact) => releaseArtifact.id === item.id) || {};
3862
3972
  accu.modified = accu.modified ? accu.modified : item.modified;
3863
- accu.artifacts.push(__spreadValues(__spreadValues({}, stateArtifact), item));
3973
+ accu.artifacts.push({
3974
+ ...stateArtifact,
3975
+ ...item
3976
+ });
3864
3977
  return accu;
3865
3978
  },
3866
3979
  { artifacts: [], deviceTypes: [], modified: void 0 }
3867
3980
  );
3868
- return __spreadProps(__spreadValues(__spreadValues({}, stateRelease), release), { artifacts, device_types_compatible: deviceTypes.filter(import_helpers10.duplicateFilter), modified });
3981
+ return { ...stateRelease, ...release, artifacts, device_types_compatible: deviceTypes.filter(import_helpers10.duplicateFilter), modified };
3869
3982
  };
3870
3983
  var reduceReceivedReleases = (releases, stateReleasesById) => releases.reduce((accu, release) => {
3871
3984
  const stateRelease = stateReleasesById[release.name] || {};
@@ -3883,17 +3996,16 @@ var findArtifactIndexInRelease = (releases, id) => Object.values(releases).reduc
3883
3996
  { release: null, index: -1 }
3884
3997
  );
3885
3998
  var getArtifactInstallCount = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/getArtifactInstallCount`, (id, { dispatch, getState }) => {
3886
- var _a;
3887
3999
  let { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);
3888
4000
  if (!release || index === -1) {
3889
4001
  return;
3890
4002
  }
3891
4003
  const releaseArtifacts = [...release.artifacts];
3892
4004
  const artifact = releaseArtifacts[index];
3893
- const { key, name, version } = (_a = (0, import_helpers10.extractSoftwareItem)(artifact.artifact_provides)) != null ? _a : {};
4005
+ const { key, name, version } = (0, import_helpers10.extractSoftwareItem)(artifact.artifact_provides) ?? {};
3894
4006
  const attribute = `${key}${name ? `.${name}` : ""}.version`;
3895
4007
  const { filterTerms } = convertDeviceListStateToFilters({
3896
- filters: [__spreadProps(__spreadValues({}, emptyFilter), { key: attribute, value: version, scope: "inventory" })]
4008
+ filters: [{ ...emptyFilter, key: attribute, value: version, scope: "inventory" }]
3897
4009
  });
3898
4010
  return general_api_default.post(getSearchEndpoint(getState()), {
3899
4011
  page: 1,
@@ -3907,10 +4019,11 @@ var getArtifactInstallCount = (0, import_toolkit22.createAsyncThunk)(`${sliceNam
3907
4019
  }
3908
4020
  const installCount = Number(headers[headerNames.total]);
3909
4021
  const releaseArtifacts2 = [...release2.artifacts];
3910
- releaseArtifacts2[index2] = __spreadProps(__spreadValues({}, releaseArtifacts2[index2]), { installCount });
3911
- release2 = __spreadProps(__spreadValues({}, release2), {
4022
+ releaseArtifacts2[index2] = { ...releaseArtifacts2[index2], installCount };
4023
+ release2 = {
4024
+ ...release2,
3912
4025
  artifacts: releaseArtifacts2
3913
- });
4026
+ };
3914
4027
  return dispatch(actions7.receiveRelease(release2));
3915
4028
  });
3916
4029
  });
@@ -3922,12 +4035,14 @@ var getArtifactUrl = (0, import_toolkit22.createAsyncThunk)(
3922
4035
  return dispatch(getReleases());
3923
4036
  }
3924
4037
  const releaseArtifacts = [...release.artifacts];
3925
- releaseArtifacts[index] = __spreadProps(__spreadValues({}, releaseArtifacts[index]), {
4038
+ releaseArtifacts[index] = {
4039
+ ...releaseArtifacts[index],
3926
4040
  url: response.data.uri
3927
- });
3928
- release = __spreadProps(__spreadValues({}, release), {
4041
+ };
4042
+ release = {
4043
+ ...release,
3929
4044
  artifacts: releaseArtifacts
3930
- });
4045
+ };
3931
4046
  return dispatch(actions7.receiveRelease(release));
3932
4047
  })
3933
4048
  );
@@ -4052,12 +4167,14 @@ var selectRelease = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/select
4052
4167
  });
4053
4168
  var setReleasesListState = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/setReleasesListState`, (selectionState, { dispatch, getState }) => {
4054
4169
  const currentState = getState().releases.releasesList;
4055
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), selectionState), {
4056
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
4057
- });
4170
+ let nextState = {
4171
+ ...currentState,
4172
+ ...selectionState,
4173
+ sort: { ...currentState.sort, ...selectionState.sort }
4174
+ };
4058
4175
  let tasks = [];
4059
- const _a = currentState, { isLoading: currentLoading } = _a, currentRequestState = __objRest(_a, ["isLoading"]);
4060
- const _b2 = nextState, { isLoading: selectionLoading } = _b2, selectionRequestState = __objRest(_b2, ["isLoading"]);
4176
+ const { isLoading: currentLoading, ...currentRequestState } = currentState;
4177
+ const { isLoading: selectionLoading, ...selectionRequestState } = nextState;
4061
4178
  if (!(0, import_helpers10.deepCompare)(currentRequestState, selectionRequestState)) {
4062
4179
  nextState.isLoading = true;
4063
4180
  tasks.push(dispatch(getReleases(nextState)).finally(() => dispatch(setReleasesListState({ isLoading: false }))));
@@ -4076,29 +4193,30 @@ var releaseListRetrieval = (config) => {
4076
4193
  );
4077
4194
  };
4078
4195
  var deductSearchState = (receivedReleases, config, total, state) => {
4079
- let releaseListState = __spreadValues({}, state.releasesList);
4196
+ let releaseListState = { ...state.releasesList };
4080
4197
  const { searchTerm, searchOnly, sort = {}, selectedTags = [], type } = config;
4081
4198
  const flattenedReleases = Object.values(receivedReleases).sort((0, import_helpers10.customSort)(sort.direction === SORTING_OPTIONS.desc, sort.key));
4082
4199
  const releaseIds = flattenedReleases.map((item) => item.name);
4083
4200
  const isFiltering = !!(selectedTags.length || type || searchTerm);
4084
4201
  if (searchOnly) {
4085
- releaseListState = __spreadProps(__spreadValues({}, releaseListState), { searchedIds: releaseIds });
4202
+ releaseListState = { ...releaseListState, searchedIds: releaseIds };
4086
4203
  } else {
4087
- releaseListState = __spreadProps(__spreadValues({}, releaseListState), {
4204
+ releaseListState = {
4205
+ ...releaseListState,
4088
4206
  releaseIds,
4089
4207
  searchTotal: isFiltering ? total : state.releasesList.searchTotal,
4090
4208
  total: !isFiltering ? total : state.releasesList.total
4091
- });
4209
+ };
4092
4210
  }
4093
4211
  return releaseListState;
4094
4212
  };
4095
4213
  var getReleases = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/getReleases`, (passedConfig = {}, { dispatch, getState }) => {
4096
- const config = __spreadValues(__spreadValues({}, getState().releases.releasesList), passedConfig);
4214
+ const config = { ...getState().releases.releasesList, ...passedConfig };
4097
4215
  return releaseListRetrieval(config).then(({ data: receivedReleases = [], headers = {} }) => {
4098
4216
  const total = headers[headerNames.total] ? Number(headers[headerNames.total]) : 0;
4099
4217
  const state = getState().releases;
4100
4218
  const flatReleases = reduceReceivedReleases(receivedReleases, state.byId);
4101
- const combinedReleases = __spreadValues(__spreadValues({}, state.byId), flatReleases);
4219
+ const combinedReleases = { ...state.byId, ...flatReleases };
4102
4220
  let tasks = [dispatch(actions7.receiveReleases(combinedReleases))];
4103
4221
  const releaseListState = deductSearchState(receivedReleases, config, total, state);
4104
4222
  tasks.push(dispatch(actions7.setReleaseListState(releaseListState)));
@@ -4119,7 +4237,7 @@ var updateReleaseInfo = (0, import_toolkit22.createAsyncThunk)(
4119
4237
  `${sliceName7}/updateReleaseInfo`,
4120
4238
  ({ name, info }, { dispatch, getState }) => general_api_default.patch(`${deploymentsApiUrlV2}/deployments/releases/${name}`, info).catch((err) => commonErrorHandler(err, `Release details couldn't be updated.`, dispatch)).then(() => {
4121
4239
  return Promise.all([
4122
- dispatch(actions7.receiveRelease(__spreadProps(__spreadValues(__spreadValues({}, getReleasesById(getState())[name]), info), { name }))),
4240
+ dispatch(actions7.receiveRelease({ ...getReleasesById(getState())[name], ...info, name })),
4123
4241
  dispatch(setSnackbar4("Release details were updated successfully.", TIMEOUTS.fiveSeconds, ""))
4124
4242
  ]);
4125
4243
  })
@@ -4128,7 +4246,7 @@ var setReleaseTags = (0, import_toolkit22.createAsyncThunk)(
4128
4246
  `${sliceName7}/setReleaseTags`,
4129
4247
  ({ name, tags = [] }, { dispatch, getState }) => general_api_default.put(`${deploymentsApiUrlV2}/deployments/releases/${name}/tags`, tags).catch((err) => commonErrorHandler(err, `Release tags couldn't be set.`, dispatch)).then(() => {
4130
4248
  return Promise.all([
4131
- dispatch(actions7.receiveRelease(__spreadProps(__spreadValues({}, getReleasesById(getState())[name]), { name, tags }))),
4249
+ dispatch(actions7.receiveRelease({ ...getReleasesById(getState())[name], name, tags })),
4132
4250
  dispatch(setSnackbar4("Release tags were set successfully.", TIMEOUTS.fiveSeconds, ""))
4133
4251
  ]);
4134
4252
  })
@@ -4145,19 +4263,13 @@ var getUpdateTypes = (0, import_toolkit22.createAsyncThunk)(
4145
4263
  // src/api/users-api.ts
4146
4264
  var import_axios3 = __toESM(require("axios"));
4147
4265
  var Api2 = {
4148
- postLogin: (url, _a) => {
4149
- var _b2 = _a, { email: username, password } = _b2, body = __objRest(_b2, ["email", "password"]);
4150
- return import_axios3.default.post(url, body, __spreadProps(__spreadValues({}, commonRequestConfig), { auth: { username, password } })).then((res) => {
4151
- var _a2;
4152
- return { text: res.data, code: res.status, contentType: (_a2 = res.headers) == null ? void 0 : _a2["content-type"] };
4153
- });
4154
- },
4266
+ postLogin: (url, { email: username, password, ...body }) => import_axios3.default.post(url, body, { ...commonRequestConfig, auth: { username, password } }).then((res) => ({ text: res.data, code: res.status, contentType: res.headers?.["content-type"] })),
4155
4267
  putVerifyTFA: (url, userData) => {
4156
4268
  let body = {};
4157
4269
  if (userData.hasOwnProperty("token2fa")) {
4158
4270
  body = { token2fa: userData.token2fa };
4159
4271
  }
4160
- return import_axios3.default.put(url, body, __spreadProps(__spreadValues({}, commonRequestConfig), { headers: __spreadProps(__spreadValues({}, commonRequestConfig.headers), { Authorization: `Bearer ${getToken()}` }) }));
4272
+ return import_axios3.default.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });
4161
4273
  }
4162
4274
  };
4163
4275
  var users_api_default = Api2;
@@ -4185,43 +4297,40 @@ var handleLoginError = (err, { token2fa: has2FA, password }, rejectWithValue) =>
4185
4297
  };
4186
4298
  var loginUser = (0, import_toolkit23.createAsyncThunk)(
4187
4299
  `${sliceName8}/loginUser`,
4188
- (_a, { dispatch, rejectWithValue }) => {
4189
- var _b2 = _a, { stayLoggedIn } = _b2, userData = __objRest(_b2, ["stayLoggedIn"]);
4190
- return users_api_default.postLogin(`${useradmApiUrlv1}/auth/login`, __spreadProps(__spreadValues({}, userData), { no_expiry: stayLoggedIn })).catch((err) => {
4191
- cleanUp();
4192
- return Promise.reject(dispatch(handleLoginError(err, userData, rejectWithValue)));
4193
- }).then(({ text: response, contentType }) => {
4194
- if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) {
4195
- const { id, kind } = response;
4196
- const type = kind.split("/")[1];
4197
- const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id);
4198
- window.location.replace(ssoLoginUrl);
4199
- return;
4200
- }
4201
- const token = response;
4202
- if (contentType !== APPLICATION_JWT_CONTENT_TYPE || !token) {
4203
- return;
4204
- }
4205
- let now = /* @__PURE__ */ new Date();
4206
- now.setSeconds(now.getSeconds() + maxSessionAge);
4207
- const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
4208
- setSessionInfo({ token, expiresAt });
4209
- cookies5.remove("JWT", { path: "/" });
4210
- return (
4211
- // @ts-ignore
4212
- Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
4213
- cleanUp();
4214
- return Promise.reject(dispatch(setSnackbar5(extractErrorMessage(e))));
4215
- }).then(() => {
4216
- window.sessionStorage.removeItem("pendings-redirect");
4217
- if (window.location.pathname !== "/ui/") {
4218
- window.location.replace("/ui/");
4219
- }
4220
- return Promise.resolve(dispatch(actions8.successfullyLoggedIn({ expiresAt, token })));
4221
- })
4222
- );
4223
- });
4224
- }
4300
+ ({ stayLoggedIn, ...userData }, { dispatch, rejectWithValue }) => users_api_default.postLogin(`${useradmApiUrlv1}/auth/login`, { ...userData, no_expiry: stayLoggedIn }).catch((err) => {
4301
+ cleanUp();
4302
+ return Promise.reject(dispatch(handleLoginError(err, userData, rejectWithValue)));
4303
+ }).then(({ text: response, contentType }) => {
4304
+ if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) {
4305
+ const { id, kind } = response;
4306
+ const type = kind.split("/")[1];
4307
+ const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id);
4308
+ window.location.replace(ssoLoginUrl);
4309
+ return;
4310
+ }
4311
+ const token = response;
4312
+ if (contentType !== APPLICATION_JWT_CONTENT_TYPE || !token) {
4313
+ return;
4314
+ }
4315
+ let now = /* @__PURE__ */ new Date();
4316
+ now.setSeconds(now.getSeconds() + maxSessionAge);
4317
+ const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
4318
+ setSessionInfo({ token, expiresAt });
4319
+ cookies5.remove("JWT", { path: "/" });
4320
+ return (
4321
+ // @ts-ignore
4322
+ Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
4323
+ cleanUp();
4324
+ return Promise.reject(dispatch(setSnackbar5(extractErrorMessage(e))));
4325
+ }).then(() => {
4326
+ window.sessionStorage.removeItem("pendings-redirect");
4327
+ if (window.location.pathname !== "/ui/") {
4328
+ window.location.replace("/ui/");
4329
+ }
4330
+ return Promise.resolve(dispatch(actions8.successfullyLoggedIn({ expiresAt, token })));
4331
+ })
4332
+ );
4333
+ })
4225
4334
  );
4226
4335
  var logoutUser = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/logoutUser`, (_, { dispatch, getState }) => {
4227
4336
  if (Object.keys(getState().app.uploadsById).length) {
@@ -4238,7 +4347,7 @@ var switchUserOrganization = (0, import_toolkit23.createAsyncThunk)(`${sliceName
4238
4347
  return Promise.reject();
4239
4348
  }
4240
4349
  return general_api_default.get(`${useradmApiUrlv1}/users/tenants/${tenantId}/token`).then(({ data: token }) => {
4241
- setSessionInfo(__spreadProps(__spreadValues({}, getSessionInfo()), { token }));
4350
+ setSessionInfo({ ...getSessionInfo(), token });
4242
4351
  window.location.reload();
4243
4352
  });
4244
4353
  });
@@ -4301,13 +4410,13 @@ var getUser = (0, import_toolkit23.createAsyncThunk)(
4301
4410
  );
4302
4411
  var initializeSelf = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/initializeSelf`, (_, { dispatch }) => dispatch(getUser(OWN_USER_ID)));
4303
4412
  var updateUserColumnSettings = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/updateUserColumnSettings`, ({ columns, currentUserId }, { dispatch, getState }) => {
4304
- const userId = currentUserId != null ? currentUserId : getCurrentUser(getState()).id;
4413
+ const userId = currentUserId ?? getCurrentUser(getState()).id;
4305
4414
  const storageKey = `${userId}-column-widths`;
4306
4415
  let customColumns = [];
4307
4416
  if (!columns) {
4308
4417
  try {
4309
4418
  customColumns = JSON.parse(window.localStorage.getItem(storageKey)) || customColumns;
4310
- } catch (e) {
4419
+ } catch {
4311
4420
  }
4312
4421
  } else {
4313
4422
  customColumns = columns;
@@ -4336,10 +4445,7 @@ var userActions = {
4336
4445
  var userActionErrorHandler = (err, type, dispatch) => commonErrorHandler(err, `There was an error ${userActions[type].errorMessage} the user.`, dispatch);
4337
4446
  var createUser = (0, import_toolkit23.createAsyncThunk)(
4338
4447
  `${sliceName8}/createUser`,
4339
- (_a, { dispatch }) => {
4340
- var _b2 = _a, { shouldResetPassword } = _b2, userData = __objRest(_b2, ["shouldResetPassword"]);
4341
- return general_api_default.post(`${useradmApiUrlv1}/users`, __spreadProps(__spreadValues({}, userData), { send_reset_password: shouldResetPassword })).then(() => Promise.all([dispatch(actions8.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar5(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch));
4342
- }
4448
+ ({ shouldResetPassword, ...userData }, { dispatch }) => general_api_default.post(`${useradmApiUrlv1}/users`, { ...userData, send_reset_password: shouldResetPassword }).then(() => Promise.all([dispatch(actions8.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar5(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch))
4343
4449
  );
4344
4450
  var removeUser = (0, import_toolkit23.createAsyncThunk)(
4345
4451
  `${sliceName8}/removeUser`,
@@ -4350,15 +4456,12 @@ var removeUser = (0, import_toolkit23.createAsyncThunk)(
4350
4456
  );
4351
4457
  var editUser = (0, import_toolkit23.createAsyncThunk)(
4352
4458
  `${sliceName8}/editUser`,
4353
- (_a, { dispatch, getState }) => {
4354
- var _b2 = _a, { id } = _b2, userData = __objRest(_b2, ["id"]);
4355
- return general_api_default.put(`${useradmApiUrlv1}/users/${id}`, userData).then(
4356
- () => Promise.all([
4357
- dispatch(actions8.updatedUser(__spreadProps(__spreadValues({}, userData), { id: id === OWN_USER_ID ? getCurrentUser(getState()).id : id }))),
4358
- dispatch(setSnackbar5(userActions.edit.successMessage))
4359
- ])
4360
- );
4361
- }
4459
+ ({ id, ...userData }, { dispatch, getState }) => general_api_default.put(`${useradmApiUrlv1}/users/${id}`, userData).then(
4460
+ () => Promise.all([
4461
+ dispatch(actions8.updatedUser({ ...userData, id: id === OWN_USER_ID ? getCurrentUser(getState()).id : id })),
4462
+ dispatch(setSnackbar5(userActions.edit.successMessage))
4463
+ ])
4464
+ )
4362
4465
  );
4363
4466
  var addUserToCurrentTenant = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/addUserToTenant`, (userId, { dispatch, getState }) => {
4364
4467
  const { id } = getOrganization(getState());
@@ -4393,7 +4496,7 @@ var mapHttpPermission = (permission) => Object.entries(uiPermissionsByArea).redu
4393
4496
  }
4394
4497
  return accu;
4395
4498
  },
4396
- __spreadValues({}, emptyUiPermissions)
4499
+ { ...emptyUiPermissions }
4397
4500
  );
4398
4501
  var permissionActionTypes = {
4399
4502
  any: mapHttpPermission,
@@ -4416,20 +4519,21 @@ var combinePermissions = (existingPermissions, additionalPermissions = {}) => Ob
4416
4519
  }, existingPermissions);
4417
4520
  var tryParseCustomPermission = (permission) => {
4418
4521
  const uiPermissions = permissionActionTypes[permission.action](permission.object);
4419
- const result = mergePermissions(__spreadValues({}, emptyUiPermissions), uiPermissions);
4522
+ const result = mergePermissions({ ...emptyUiPermissions }, uiPermissions);
4420
4523
  return { isCustom: true, permission, result };
4421
4524
  };
4422
4525
  var customPermissionHandler = (accu, permission) => {
4423
4526
  let processor = tryParseCustomPermission(permission);
4424
- return __spreadProps(__spreadValues({}, accu), {
4527
+ return {
4528
+ ...accu,
4425
4529
  isCustom: accu.isCustom || processor.isCustom,
4426
4530
  uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
4427
- });
4531
+ };
4428
4532
  };
4429
4533
  var mapPermissionSet = (permissionSetName, names, scope, existingGroupsPermissions = {}) => {
4430
4534
  const permission = Object.values(uiPermissionsById).find((permission2) => permission2.permissionSets[scope] === permissionSetName).value;
4431
4535
  const scopedPermissions = names.reduce((accu, name) => combinePermissions(accu, { [name]: [permission] }), existingGroupsPermissions);
4432
- return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) => __spreadProps(__spreadValues({}, accu), { [key]: deriveImpliedAreaPermissions(scope, permissions) }), {});
4536
+ return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) => ({ ...accu, [key]: deriveImpliedAreaPermissions(scope, permissions) }), {});
4433
4537
  };
4434
4538
  var isEmptyPermissionSet = (permissionSet) => !Object.values(permissionSet).reduce((accu, permissions) => {
4435
4539
  if (Array.isArray(permissions)) {
@@ -4444,60 +4548,59 @@ var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = []
4444
4548
  if (!processor) {
4445
4549
  return accu;
4446
4550
  }
4447
- const scope = Object.keys(scopedPermissionAreas).find((scope2) => {
4448
- var _a;
4449
- return uiPermissionsByArea[scope2].scope === ((_a = permissionSet.scope) == null ? void 0 : _a.type);
4450
- });
4551
+ const scope = Object.keys(scopedPermissionAreas).find((scope2) => uiPermissionsByArea[scope2].scope === permissionSet.scope?.type);
4451
4552
  if (scope) {
4452
4553
  const result = mapPermissionSet(permissionSet.name, permissionSet.scope.value, scope, accu.uiPermissions[scope]);
4453
- return __spreadProps(__spreadValues({}, accu), { uiPermissions: __spreadProps(__spreadValues({}, accu.uiPermissions), { [scope]: result }) });
4554
+ return { ...accu, uiPermissions: { ...accu.uiPermissions, [scope]: result } };
4454
4555
  } else if (isEmptyPermissionSet(processor.result)) {
4455
4556
  return processor.permissions.reduce(customPermissionHandler, accu);
4456
4557
  }
4457
- return __spreadProps(__spreadValues({}, accu), {
4558
+ return {
4559
+ ...accu,
4458
4560
  isCustom: accu.isCustom || processor.isCustom,
4459
4561
  uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
4460
- });
4562
+ };
4461
4563
  },
4462
- { isCustom: false, uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), { groups: {}, releases: {} }) }
4564
+ { isCustom: false, uiPermissions: { ...emptyUiPermissions, groups: {}, releases: {} } }
4463
4565
  );
4464
4566
  return permissions.reduce(customPermissionHandler, preliminaryResult);
4465
4567
  };
4466
4568
  var normalizeRbacRoles = (roles, rolesById2, permissionSets) => roles.reduce(
4467
4569
  (accu, role) => {
4468
- var _a;
4469
4570
  let normalizedPermissions;
4470
4571
  let isCustom = false;
4471
4572
  if (rolesById2[role.name]) {
4472
- normalizedPermissions = __spreadProps(__spreadValues({}, rolesById2[role.name].uiPermissions), {
4473
- groups: __spreadValues({}, rolesById2[role.name].uiPermissions.groups),
4474
- releases: __spreadValues({}, rolesById2[role.name].uiPermissions.releases)
4475
- });
4573
+ normalizedPermissions = {
4574
+ ...rolesById2[role.name].uiPermissions,
4575
+ groups: { ...rolesById2[role.name].uiPermissions.groups },
4576
+ releases: { ...rolesById2[role.name].uiPermissions.releases }
4577
+ };
4476
4578
  } else {
4477
4579
  const result = parseRolePermissions(role, permissionSets);
4478
4580
  normalizedPermissions = result.uiPermissions;
4479
4581
  isCustom = result.isCustom;
4480
4582
  }
4481
- const roleState = (_a = accu[role.name]) != null ? _a : __spreadValues({}, emptyRole);
4482
- accu[role.name] = __spreadProps(__spreadValues(__spreadValues({}, roleState), role), {
4583
+ const roleState = accu[role.name] ?? { ...emptyRole };
4584
+ accu[role.name] = {
4585
+ ...roleState,
4586
+ ...role,
4483
4587
  description: roleState.description ? roleState.description : role.description,
4484
4588
  editable: !rolesById[role.name] && !isCustom && (typeof roleState.editable !== "undefined" ? roleState.editable : true),
4485
4589
  isCustom,
4486
4590
  name: roleState.name ? roleState.name : role.name,
4487
4591
  uiPermissions: normalizedPermissions
4488
- });
4592
+ };
4489
4593
  return accu;
4490
4594
  },
4491
- __spreadValues({}, rolesById2)
4595
+ { ...rolesById2 }
4492
4596
  );
4493
4597
  var getPermissionSets = (0, import_toolkit23.createAsyncThunk)(
4494
4598
  `${sliceName8}/getPermissionSets`,
4495
4599
  (_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv2}/permission_sets?per_page=500`).then(({ data }) => {
4496
4600
  const permissionSets = data.reduce(
4497
4601
  (accu, permissionSet) => {
4498
- var _a, _b2;
4499
- const permissionSetState = (_a = accu[permissionSet.name]) != null ? _a : {};
4500
- let permissionSetObject = __spreadValues(__spreadValues({}, permissionSetState), permissionSet);
4602
+ const permissionSetState = accu[permissionSet.name] ?? {};
4603
+ let permissionSetObject = { ...permissionSetState, ...permissionSet };
4501
4604
  permissionSetObject.result = Object.values(uiPermissionsById).reduce(
4502
4605
  (accu2, item) => Object.entries(item.permissionSets).reduce((collector, [area, permissionSet2]) => {
4503
4606
  if (scopedPermissionAreas[area]) {
@@ -4508,11 +4611,10 @@ var getPermissionSets = (0, import_toolkit23.createAsyncThunk)(
4508
4611
  }
4509
4612
  return collector;
4510
4613
  }, accu2),
4511
- __spreadValues(__spreadValues({}, emptyUiPermissions), (_b2 = permissionSetObject.result) != null ? _b2 : {})
4614
+ { ...emptyUiPermissions, ...permissionSetObject.result ?? {} }
4512
4615
  );
4513
4616
  const scopes = Object.values(scopedPermissionAreas).reduce((accu2, { key, scopeType }) => {
4514
- var _a2, _b3;
4515
- if (((_a2 = permissionSetObject.supported_scope_types) == null ? void 0 : _a2.includes(key)) || ((_b3 = permissionSetObject.supported_scope_types) == null ? void 0 : _b3.includes(scopeType))) {
4617
+ if (permissionSetObject.supported_scope_types?.includes(key) || permissionSetObject.supported_scope_types?.includes(scopeType)) {
4516
4618
  accu2.push(key);
4517
4619
  }
4518
4620
  return accu2;
@@ -4525,7 +4627,7 @@ var getPermissionSets = (0, import_toolkit23.createAsyncThunk)(
4525
4627
  return accu;
4526
4628
  },
4527
4629
  // @ts-ignore
4528
- __spreadValues({}, getState().users.permissionSetsById)
4630
+ { ...getState().users.permissionSetsById }
4529
4631
  );
4530
4632
  return Promise.all([dispatch(actions8.receivedPermissionSets(permissionSets)), permissionSets]);
4531
4633
  }).catch(() => console.log("Permission set retrieval failed - likely accessing a non-RBAC backend"))
@@ -4558,28 +4660,27 @@ var transformAreaRoleDataToScopedPermissionsSets = (area, areaPermissions, exces
4558
4660
  const skipPermissions = scopedPermissionAreas.releases.key === area && item !== ALL_RELEASES ? [uiPermissionsById.upload.value] : [];
4559
4661
  const impliedPermissions = deriveImpliedAreaPermissions(area, uiPermissions, skipPermissions);
4560
4662
  accu = impliedPermissions.reduce((itemPermissionAccu, impliedPermission) => {
4561
- var _a;
4562
- const permissionSetState = (_a = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]]) != null ? _a : {
4663
+ const permissionSetState = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] ?? {
4563
4664
  type: uiPermissionsByArea[area].scope,
4564
4665
  value: []
4565
4666
  };
4566
- itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] = __spreadProps(__spreadValues({}, permissionSetState), {
4667
+ itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] = {
4668
+ ...permissionSetState,
4567
4669
  value: [...permissionSetState.value, item]
4568
- });
4670
+ };
4569
4671
  return itemPermissionAccu;
4570
4672
  }, accu);
4571
4673
  return accu;
4572
4674
  }, {});
4573
- return Object.entries(permissionSetObject).map((_a) => {
4574
- var [name, _b2] = _a, _c = _b2, { value } = _c, scope = __objRest(_c, ["value"]);
4675
+ return Object.entries(permissionSetObject).map(([name, { value, ...scope }]) => {
4575
4676
  if (value.includes(excessiveAccessSelector)) {
4576
4677
  return { name };
4577
4678
  }
4578
- return { name, scope: __spreadProps(__spreadValues({}, scope), { value: value.filter(import_helpers11.duplicateFilter) }) };
4679
+ return { name, scope: { ...scope, value: value.filter(import_helpers11.duplicateFilter) } };
4579
4680
  });
4580
4681
  };
4581
4682
  var transformRoleDataToRole = (roleData, roleState = {}) => {
4582
- const role = __spreadValues(__spreadValues({}, roleState), roleData);
4683
+ const role = { ...roleState, ...roleData };
4583
4684
  const { description = "", name, uiPermissions = emptyUiPermissions } = role;
4584
4685
  const { maybeUiPermissions, remainderKeys } = Object.entries(emptyUiPermissions).reduce(
4585
4686
  (accu, [key, emptyPermissions]) => {
@@ -4615,12 +4716,17 @@ var transformRoleDataToRole = (roleData, roleState = {}) => {
4615
4716
  }, []);
4616
4717
  return {
4617
4718
  permissionSetsWithScope: [...permissionSetsWithScope, ...scopedPermissionSets],
4618
- role: __spreadProps(__spreadValues({}, emptyRole), {
4719
+ role: {
4720
+ ...emptyRole,
4619
4721
  name,
4620
4722
  // @ts-ignore
4621
4723
  description: description ? description : roleState.description,
4622
- uiPermissions: __spreadValues(__spreadValues(__spreadValues({}, emptyUiPermissions), roleUiPermissions), maybeUiPermissions)
4623
- })
4724
+ uiPermissions: {
4725
+ ...emptyUiPermissions,
4726
+ ...roleUiPermissions,
4727
+ ...maybeUiPermissions
4728
+ }
4729
+ }
4624
4730
  };
4625
4731
  };
4626
4732
  var roleActions = {
@@ -4671,13 +4777,12 @@ var getGlobalSettings2 = (0, import_toolkit23.createAsyncThunk)(
4671
4777
  var saveGlobalSettings = (0, import_toolkit23.createAsyncThunk)(
4672
4778
  `${sliceName8}/saveGlobalSettings`,
4673
4779
  // @ts-ignore
4674
- (_a, { dispatch, getState }) => {
4675
- var _b2 = _a, { beOptimistic = false, notify = false } = _b2, settings = __objRest(_b2, ["beOptimistic", "notify"]);
4780
+ ({ beOptimistic = false, notify = false, ...settings }, { dispatch, getState }) => {
4676
4781
  if (!window.sessionStorage.getItem(settingsKeys.initialized) && !beOptimistic) {
4677
4782
  return;
4678
4783
  }
4679
4784
  return dispatch(getGlobalSettings2()).unwrap().then((result) => {
4680
- let updatedSettings = __spreadValues(__spreadValues({}, getState().users.globalSettings), settings);
4785
+ let updatedSettings = { ...getState().users.globalSettings, ...settings };
4681
4786
  if (getCurrentUser(getState()).verified) {
4682
4787
  updatedSettings["2fa"] = twoFAStates.enabled;
4683
4788
  } else {
@@ -4715,10 +4820,17 @@ var saveUserSettings = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/sav
4715
4820
  const userSettings = getUserSettings(getState());
4716
4821
  const onboardingState = getOnboardingState(getState());
4717
4822
  const tooltipState = getTooltipsState(getState());
4718
- const updatedSettings = __spreadProps(__spreadValues(__spreadValues({}, userSettings), settings), {
4719
- onboarding: __spreadValues(__spreadValues({}, onboardingState), settings.onboarding),
4823
+ const updatedSettings = {
4824
+ ...userSettings,
4825
+ // @ts-ignore
4826
+ ...settings,
4827
+ onboarding: {
4828
+ ...onboardingState,
4829
+ // @ts-ignore
4830
+ ...settings.onboarding
4831
+ },
4720
4832
  tooltips: tooltipState
4721
- });
4833
+ };
4722
4834
  const headers = result[result.length - 1] ? { "If-Match": result[result.length - 1] } : {};
4723
4835
  return Promise.all([
4724
4836
  Promise.resolve(dispatch(actions8.setUserSettings(updatedSettings))),
@@ -4744,9 +4856,10 @@ var getTokens = (0, import_toolkit23.createAsyncThunk)(
4744
4856
  `${sliceName8}/getTokens`,
4745
4857
  (_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv1}/settings/tokens`).then(({ data: tokens }) => {
4746
4858
  const user = getCurrentUser(getState());
4747
- const updatedUser = __spreadProps(__spreadValues({}, user), {
4859
+ const updatedUser = {
4860
+ ...user,
4748
4861
  tokens
4749
- });
4862
+ };
4750
4863
  return Promise.resolve(dispatch(actions8.updatedUser(updatedUser)));
4751
4864
  })
4752
4865
  );
@@ -4762,8 +4875,7 @@ var revokeToken = (0, import_toolkit23.createAsyncThunk)(
4762
4875
  general_api_default.delete(`${useradmApiUrlv1}/settings/tokens/${token.id}`).then(() => Promise.resolve(dispatch(getTokens())))
4763
4876
  )
4764
4877
  );
4765
- var setTooltipReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/setTooltipReadState`, (_a, { dispatch }) => {
4766
- var _b2 = _a, { persist } = _b2, remainder = __objRest(_b2, ["persist"]);
4878
+ var setTooltipReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/setTooltipReadState`, ({ persist, ...remainder }, { dispatch }) => {
4767
4879
  let tasks = [dispatch(actions8.setTooltipState(remainder))];
4768
4880
  if (persist) {
4769
4881
  tasks.push(dispatch(saveUserSettings()));
@@ -4771,14 +4883,13 @@ var setTooltipReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/
4771
4883
  return Promise.all(tasks);
4772
4884
  });
4773
4885
  var setAllTooltipsReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/toggleHelptips`, ({ readState = READ_STATES.read, tooltips }, { dispatch }) => {
4774
- const updatedTips = tooltips.reduce((accu, id) => __spreadProps(__spreadValues({}, accu), { [id]: { readState } }), {});
4886
+ const updatedTips = tooltips.reduce((accu, id) => ({ ...accu, [id]: { readState } }), {});
4775
4887
  return Promise.resolve(dispatch(actions8.setTooltipsState(updatedTips))).then(() => dispatch(saveUserSettings()));
4776
4888
  });
4777
4889
  var submitFeedback = (0, import_toolkit23.createAsyncThunk)(
4778
4890
  `${sliceName8}/submitFeedback`,
4779
4891
  // @ts-ignore
4780
- (_a, { dispatch }) => {
4781
- var _b2 = _a, { satisfaction, feedback } = _b2, meta = __objRest(_b2, ["satisfaction", "feedback"]);
4892
+ ({ satisfaction, feedback, ...meta }, { dispatch }) => {
4782
4893
  return general_api_default.post(`${tenantadmApiUrlv2}/contact/support`, {
4783
4894
  subject: "feedback submission",
4784
4895
  body: JSON.stringify({ feedback, satisfaction, meta })
@@ -4816,14 +4927,13 @@ var getGroups2 = (0, import_toolkit24.createAsyncThunk)(
4816
4927
  (_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrl}/groups`).then((res) => {
4817
4928
  const state = getGroupsById(getState());
4818
4929
  const dynamicGroups = Object.entries(state).reduce((accu, [id, group]) => {
4819
- var _a;
4820
- if (group.id || ((_a = group.filters) == null ? void 0 : _a.length) && id !== UNGROUPED_GROUP.id) {
4930
+ if (group.id || group.filters?.length && id !== UNGROUPED_GROUP.id) {
4821
4931
  accu[id] = group;
4822
4932
  }
4823
4933
  return accu;
4824
4934
  }, {});
4825
4935
  const groups = res.data.reduce((accu, group) => {
4826
- accu[group] = __spreadValues({ deviceIds: [], filters: [], total: 0 }, state[group]);
4936
+ accu[group] = { deviceIds: [], filters: [], total: 0, ...state[group] };
4827
4937
  return accu;
4828
4938
  }, dynamicGroups);
4829
4939
  const filters = [{ key: "group", value: res.data, operator: DEVICE_FILTERING_OPTIONS.$nin.key, scope: "system" }];
@@ -4881,7 +4991,7 @@ var addStaticGroup = (0, import_toolkit24.createAsyncThunk)(
4881
4991
  () => Promise.resolve(
4882
4992
  dispatch(
4883
4993
  actions3.addGroup({
4884
- group: __spreadValues({ deviceIds: [], total: 0, filters: [] }, getState().devices.groups.byId[group]),
4994
+ group: { deviceIds: [], total: 0, filters: [], ...getState().devices.groups.byId[group] },
4885
4995
  groupName: group
4886
4996
  })
4887
4997
  )
@@ -4909,20 +5019,19 @@ var getDynamicGroups = (0, import_toolkit24.createAsyncThunk)(
4909
5019
  (_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrlV2}/filters?per_page=${MAX_PAGE_SIZE}`).then(({ data: filters }) => {
4910
5020
  const state = getGroupsById(getState());
4911
5021
  const staticGroups = Object.entries(state).reduce((accu, [id, group]) => {
4912
- var _a;
4913
- if (!(group.id || ((_a = group.filters) == null ? void 0 : _a.length))) {
5022
+ if (!(group.id || group.filters?.length)) {
4914
5023
  accu[id] = group;
4915
5024
  }
4916
5025
  return accu;
4917
5026
  }, {});
4918
5027
  const groups = (filters || []).reduce((accu, filter) => {
4919
- accu[filter.name] = __spreadProps(__spreadValues({
5028
+ accu[filter.name] = {
4920
5029
  deviceIds: [],
4921
- total: 0
4922
- }, state[filter.name]), {
5030
+ total: 0,
5031
+ ...state[filter.name],
4923
5032
  id: filter.id,
4924
5033
  filters: mapTermsToFilters(filter.terms)
4925
- });
5034
+ };
4926
5035
  return accu;
4927
5036
  }, staticGroups);
4928
5037
  return Promise.resolve(dispatch(actions3.receivedGroups(groups)));
@@ -4962,10 +5071,9 @@ var removeDynamicGroup = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/r
4962
5071
  );
4963
5072
  });
4964
5073
  var getGroupFilters = (group, groupsState, filters = []) => {
4965
- var _a;
4966
5074
  const groupName = group === UNGROUPED_GROUP.id || group === UNGROUPED_GROUP.name ? UNGROUPED_GROUP.id : group;
4967
5075
  const selectedGroup = groupsState.byId[groupName];
4968
- const groupFilterLength = ((_a = selectedGroup == null ? void 0 : selectedGroup.filters) == null ? void 0 : _a.length) || 0;
5076
+ const groupFilterLength = selectedGroup?.filters?.length || 0;
4969
5077
  const cleanedFilters = groupFilterLength ? [...filters, ...selectedGroup.filters].filter(filtersFilter) : filters;
4970
5078
  return { cleanedFilters, groupName, selectedGroup, groupFilterLength };
4971
5079
  };
@@ -4988,7 +5096,6 @@ var selectGroup = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/selectGr
4988
5096
  var getEarliestTs = (dateA = "", dateB = "") => !dateA || !dateB ? dateA || dateB : dateA < dateB ? dateA : dateB;
4989
5097
  var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
4990
5098
  (accu, device) => {
4991
- var _a, _b2, _c;
4992
5099
  const stateDevice = getDeviceById(state, device.id);
4993
5100
  const {
4994
5101
  attributes: storedAttributes = {},
@@ -4998,29 +5105,29 @@ var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
4998
5105
  group: storedGroup
4999
5106
  } = stateDevice;
5000
5107
  const { identity, inventory, monitor, system = {}, tags } = mapDeviceAttributes(device.attributes);
5001
- device.tags = __spreadValues(__spreadValues({}, storedTags), tags);
5002
- device.group = (_a = system.group) != null ? _a : storedGroup;
5003
- device.monitor = __spreadValues(__spreadValues({}, storedMonitor), monitor);
5004
- device.identity_data = __spreadValues(__spreadValues(__spreadValues({}, storedIdentity), identity), device.identity_data ? device.identity_data : {});
5108
+ device.tags = { ...storedTags, ...tags };
5109
+ device.group = system.group ?? storedGroup;
5110
+ device.monitor = { ...storedMonitor, ...monitor };
5111
+ device.identity_data = { ...storedIdentity, ...identity, ...device.identity_data ? device.identity_data : {} };
5005
5112
  device.status = status ? status : device.status || identity.status;
5006
- device.check_in_time_rounded = (_b2 = system.check_in_time) != null ? _b2 : stateDevice.check_in_time_rounded;
5007
- device.check_in_time_exact = (_c = device.check_in_time) != null ? _c : stateDevice.check_in_time_exact;
5113
+ device.check_in_time_rounded = system.check_in_time ?? stateDevice.check_in_time_rounded;
5114
+ device.check_in_time_exact = device.check_in_time ?? stateDevice.check_in_time_exact;
5008
5115
  device.created_ts = getEarliestTs(getEarliestTs(system.created_ts, device.created_ts), stateDevice.created_ts);
5009
5116
  device.updated_ts = device.attributes ? device.updated_ts : stateDevice.updated_ts;
5010
5117
  device.isNew = new Date(device.created_ts) > new Date(state.app.newThreshold);
5011
5118
  device.isOffline = new Date(device.check_in_time_rounded) < new Date(state.app.offlineThreshold) || device.check_in_time_rounded === void 0;
5012
- device.attributes = device.attributes ? __spreadValues(__spreadValues({}, storedAttributes), inventory) : storedAttributes;
5013
- accu.devicesById[device.id] = __spreadValues(__spreadValues({}, stateDevice), device);
5119
+ device.attributes = device.attributes ? { ...storedAttributes, ...inventory } : storedAttributes;
5120
+ accu.devicesById[device.id] = { ...stateDevice, ...device };
5014
5121
  accu.ids.push(device.id);
5015
5122
  return accu;
5016
5123
  },
5017
5124
  { ids, devicesById: {} }
5018
5125
  );
5019
5126
  var getGroupDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getGroupDevices`, (options, { dispatch, getState }) => {
5020
- const _a = options, { group, shouldIncludeAllStates } = _a, remainder = __objRest(_a, ["group", "shouldIncludeAllStates"]);
5127
+ const { group, shouldIncludeAllStates, ...remainder } = options;
5021
5128
  const { cleanedFilters: filterSelection } = getGroupFilters(group, getState().devices.groups);
5022
5129
  return Promise.resolve(
5023
- dispatch(getDevicesByStatus2(__spreadProps(__spreadValues({}, remainder), { filterSelection, group, status: shouldIncludeAllStates ? void 0 : DEVICE_STATES.accepted })))
5130
+ dispatch(getDevicesByStatus2({ ...remainder, filterSelection, group, status: shouldIncludeAllStates ? void 0 : DEVICE_STATES.accepted }))
5024
5131
  ).unwrap().then((results) => {
5025
5132
  if (!group) {
5026
5133
  return Promise.resolve();
@@ -5034,7 +5141,7 @@ var getGroupDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getG
5034
5141
  dispatch(
5035
5142
  actions3.addGroup({
5036
5143
  group: {
5037
- deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length > (stateGroup == null ? void 0 : stateGroup.deviceIds) ? deviceAccu.ids : stateGroup.deviceIds,
5144
+ deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length > stateGroup?.deviceIds ? deviceAccu.ids : stateGroup.deviceIds,
5038
5145
  total
5039
5146
  },
5040
5147
  groupName: group
@@ -5183,27 +5290,26 @@ var getDeviceLimit2 = (0, import_toolkit24.createAsyncThunk)(
5183
5290
  );
5184
5291
  var setDeviceListState = (0, import_toolkit24.createAsyncThunk)(
5185
5292
  `${sliceName3}/setDeviceListState`,
5186
- (_a, { dispatch, getState }) => {
5187
- var _b2 = _a, { shouldSelectDevices = true, forceRefresh, fetchAuth = true } = _b2, selectionState = __objRest(_b2, ["shouldSelectDevices", "forceRefresh", "fetchAuth"]);
5188
- var _c;
5293
+ ({ shouldSelectDevices = true, forceRefresh, fetchAuth = true, ...selectionState }, { dispatch, getState }) => {
5189
5294
  const currentState = getDeviceListState(getState());
5190
5295
  const refreshTrigger = forceRefresh ? !currentState.refreshTrigger : selectionState.refreshTrigger;
5191
- let nextState = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, currentState), {
5296
+ let nextState = {
5297
+ ...currentState,
5192
5298
  setOnly: false,
5193
- refreshTrigger
5194
- }), selectionState), {
5195
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
5196
- });
5299
+ refreshTrigger,
5300
+ ...selectionState,
5301
+ sort: { ...currentState.sort, ...selectionState.sort }
5302
+ };
5197
5303
  let tasks = [];
5198
- const _a2 = currentState, { isLoading: currentLoading, deviceIds: currentDevices, selection: currentSelection } = _a2, currentRequestState = __objRest(_a2, ["isLoading", "deviceIds", "selection"]);
5199
- const _b3 = nextState, { isLoading: nextLoading, deviceIds: nextDevices, selection: nextSelection } = _b3, nextRequestState = __objRest(_b3, ["isLoading", "deviceIds", "selection"]);
5304
+ const { isLoading: currentLoading, deviceIds: currentDevices, selection: currentSelection, ...currentRequestState } = currentState;
5305
+ const { isLoading: nextLoading, deviceIds: nextDevices, selection: nextSelection, ...nextRequestState } = nextState;
5200
5306
  if (!nextState.setOnly && !(0, import_helpers12.deepCompare)(currentRequestState, nextRequestState)) {
5201
- const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } = (_c = nextState.sort) != null ? _c : {};
5307
+ const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } = nextState.sort ?? {};
5202
5308
  const sortBy = sortCol ? [{ attribute: sortCol, order: sortDown, scope: sortScope }] : void 0;
5203
5309
  const applicableSelectedState = nextState.state === ALL_DEVICE_STATES ? void 0 : nextState.state;
5204
5310
  nextState.isLoading = true;
5205
5311
  tasks.push(
5206
- dispatch(getDevicesByStatus2(__spreadProps(__spreadValues({}, nextState), { status: applicableSelectedState, sortOptions: sortBy, fetchAuth }))).unwrap().then((results) => {
5312
+ dispatch(getDevicesByStatus2({ ...nextState, status: applicableSelectedState, sortOptions: sortBy, fetchAuth })).unwrap().then((results) => {
5207
5313
  const { deviceAccu, total } = results[results.length - 1];
5208
5314
  const devicesState = shouldSelectDevices ? { deviceIds: deviceAccu.ids, total, isLoading: false } : { isLoading: false };
5209
5315
  return Promise.resolve(dispatch(actions3.setDeviceListState(devicesState)));
@@ -5228,8 +5334,8 @@ var getDevicesByStatus2 = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/
5228
5334
  } = options;
5229
5335
  const state = getState();
5230
5336
  const { applicableFilters, filterTerms } = convertDeviceListStateToFilters({
5231
- filters: filterSelection != null ? filterSelection : getDeviceFilters(state),
5232
- group: group != null ? group : getSelectedGroup(state),
5337
+ filters: filterSelection ?? getDeviceFilters(state),
5338
+ group: group ?? getSelectedGroup(state),
5233
5339
  groups: state.devices.groups,
5234
5340
  offlineThreshold: state.app.offlineThreshold,
5235
5341
  selectedIssues,
@@ -5290,7 +5396,7 @@ var getAllDevicesByStatus = (0, import_toolkit24.createAsyncThunk)(`${sliceName3
5290
5396
  });
5291
5397
  var searchDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/searchDevices`, (passedOptions = {}, { dispatch, getState }) => {
5292
5398
  const state = getState();
5293
- let options = __spreadValues(__spreadValues({}, state.app.searchState), passedOptions);
5399
+ let options = { ...state.app.searchState, ...passedOptions };
5294
5400
  const { page = defaultPage5, searchTerm, sortOptions = [] } = options;
5295
5401
  const { columnSelection = [] } = getUserSettings(state);
5296
5402
  const selectedAttributes = columnSelection.map((column) => ({ attribute: column.key, scope: column.scope }));
@@ -5425,8 +5531,7 @@ var getSessionDetails = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/ge
5425
5531
  ({ data: auditLogEntries }) => {
5426
5532
  const { start, end } = auditLogEntries.reduce(
5427
5533
  (accu, item) => {
5428
- var _a, _b2;
5429
- if ((_b2 = (_a = item.meta) == null ? void 0 : _a.session_id) == null ? void 0 : _b2.includes(sessionId)) {
5534
+ if (item.meta?.session_id?.includes(sessionId)) {
5430
5535
  accu.start = new Date(item.action.startsWith("open") ? item.time : accu.start);
5431
5536
  accu.end = new Date(item.action.startsWith("close") ? item.time : accu.end);
5432
5537
  }
@@ -5533,8 +5638,7 @@ var decommissionDevice = (0, import_toolkit24.createAsyncThunk)(
5533
5638
  var getDeviceConfig = (0, import_toolkit24.createAsyncThunk)(
5534
5639
  `${sliceName3}/getDeviceConfig`,
5535
5640
  (deviceId, { dispatch }) => general_api_default.get(`${deviceConfig}/${deviceId}`).then(({ data }) => Promise.all([dispatch(actions3.receivedDevice({ id: deviceId, config: data })), Promise.resolve(data)])).catch((err) => {
5536
- var _a, _b2;
5537
- if (((_b2 = (_a = err.response) == null ? void 0 : _a.data) == null ? void 0 : _b2.error.status_code) !== 404) {
5641
+ if (err.response?.data?.error.status_code !== 404) {
5538
5642
  return commonErrorHandler(err, `There was an error retrieving the configuration for device ${deviceId}.`, dispatch, commonErrorFallback);
5539
5643
  }
5540
5644
  })
@@ -5546,15 +5650,14 @@ var setDeviceConfig = (0, import_toolkit24.createAsyncThunk)(
5546
5650
  var applyDeviceConfig = (0, import_toolkit24.createAsyncThunk)(
5547
5651
  `${sliceName3}/applyDeviceConfig`,
5548
5652
  ({ deviceId, configDeploymentConfiguration, isDefault, config }, { dispatch, getState }) => general_api_default.post(`${deviceConfig}/${deviceId}/deploy`, configDeploymentConfiguration).catch((err) => commonErrorHandler(err, `There was an error deploying the configuration to device ${deviceId}.`, dispatch, commonErrorFallback)).then(({ data }) => {
5549
- var _a;
5550
5653
  const device = getDeviceById(getState(), deviceId);
5551
5654
  const { canManageUsers } = getUserCapabilities(getState());
5552
5655
  let tasks = [
5553
- dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { config: __spreadProps(__spreadValues({}, device.config), { deployment_id: data.deployment_id }) }))),
5656
+ dispatch(actions3.receivedDevice({ ...device, config: { ...device.config, deployment_id: data.deployment_id } })),
5554
5657
  new Promise((resolve) => setTimeout(() => resolve(dispatch(getSingleDeployment(data.deployment_id))), TIMEOUTS.oneSecond))
5555
5658
  ];
5556
5659
  if (isDefault && canManageUsers) {
5557
- const { previous } = (_a = getGlobalSettings(getState()).defaultDeviceConfig) != null ? _a : {};
5660
+ const { previous } = getGlobalSettings(getState()).defaultDeviceConfig ?? {};
5558
5661
  tasks.push(dispatch(saveGlobalSettings({ defaultDeviceConfig: { current: config, previous } })));
5559
5662
  }
5560
5663
  return Promise.all(tasks);
@@ -5570,21 +5673,21 @@ var setDeviceTags = (0, import_toolkit24.createAsyncThunk)(
5570
5673
  `${inventoryApiUrl}/devices/${deviceId}/tags`,
5571
5674
  Object.entries(tags).map(([name, value]) => ({ name, value })),
5572
5675
  { headers }
5573
- ).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { id: deviceId, tags }))), dispatch(setSnackbar6("Device name changed"))]));
5676
+ ).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice({ ...device, id: deviceId, tags })), dispatch(setSnackbar6("Device name changed"))]));
5574
5677
  })
5575
5678
  )
5576
5679
  );
5577
5680
  var getDeviceTwin = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getDeviceTwin`, ({ deviceId, integration }, { dispatch, getState }) => {
5578
5681
  let providerResult = {};
5579
5682
  return general_api_default.get(`${iotManagerBaseURL}/devices/${deviceId}/state`).then(({ data }) => {
5580
- providerResult = __spreadProps(__spreadValues({}, data), { twinError: "" });
5683
+ providerResult = { ...data, twinError: "" };
5581
5684
  }).catch((err) => {
5582
5685
  providerResult = {
5583
5686
  twinError: `There was an error getting the ${EXTERNAL_PROVIDER[integration.provider].twinTitle.toLowerCase()} for device ${deviceId}. ${err}`
5584
5687
  };
5585
5688
  }).finally(() => {
5586
5689
  const device = getDeviceById(getState(), deviceId);
5587
- Promise.resolve(dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { twinsByIntegration: __spreadValues(__spreadValues({}, device.twinsByIntegration), providerResult) }))));
5690
+ Promise.resolve(dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...device.twinsByIntegration, ...providerResult } })));
5588
5691
  });
5589
5692
  });
5590
5693
  var setDeviceTwin = (0, import_toolkit24.createAsyncThunk)(
@@ -5600,7 +5703,7 @@ var setDeviceTwin = (0, import_toolkit24.createAsyncThunk)(
5600
5703
  const { twinsByIntegration = {} } = device;
5601
5704
  const { [integration.id]: currentState = {} } = twinsByIntegration;
5602
5705
  return Promise.resolve(
5603
- dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { twinsByIntegration: __spreadProps(__spreadValues({}, twinsByIntegration), { [integration.id]: __spreadProps(__spreadValues({}, currentState), { desired: settings }) }) })))
5706
+ dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...twinsByIntegration, [integration.id]: { ...currentState, desired: settings } } }))
5604
5707
  );
5605
5708
  })
5606
5709
  );
@@ -5621,8 +5724,8 @@ var getSystemDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/get
5621
5724
  const { attributes: deviceAttributes = {} } = getDeviceById(state, id);
5622
5725
  const { mender_gateway_system_id = "" } = deviceAttributes;
5623
5726
  const filters = [
5624
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: "true", scope: "inventory" }),
5625
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" })
5727
+ { ...emptyFilter, key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: "true", scope: "inventory" },
5728
+ { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
5626
5729
  ];
5627
5730
  const { attributes, filterTerms } = prepareSearchArguments({ filters, state });
5628
5731
  return general_api_default.post(getSearchEndpoint(getState()), {
@@ -5634,11 +5737,12 @@ var getSystemDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/get
5634
5737
  }).catch((err) => commonErrorHandler(err, `There was an error getting system devices device ${id}.`, dispatch, "Please check your connection.")).then(({ data, headers }) => {
5635
5738
  const state2 = getState();
5636
5739
  const { devicesById, ids } = reduceReceivedDevices(data, [], state2);
5637
- const device = __spreadProps(__spreadValues({}, getDeviceById(state2, id)), {
5740
+ const device = {
5741
+ ...getDeviceById(state2, id),
5638
5742
  systemDeviceIds: ids,
5639
5743
  systemDeviceTotal: Number(headers[headerNames.total])
5640
- });
5641
- return Promise.resolve(dispatch(actions3.receivedDevices(__spreadProps(__spreadValues({}, devicesById), { [id]: device }))));
5744
+ };
5745
+ return Promise.resolve(dispatch(actions3.receivedDevices({ ...devicesById, [id]: device })));
5642
5746
  });
5643
5747
  });
5644
5748
  var getGatewayDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getGatewayDevices`, (deviceId, { dispatch, getState }) => {
@@ -5646,9 +5750,9 @@ var getGatewayDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/ge
5646
5750
  const { attributes = {} } = getDeviceById(state, deviceId);
5647
5751
  const { mender_gateway_system_id = "" } = attributes;
5648
5752
  const filters = [
5649
- __spreadProps(__spreadValues({}, emptyFilter), { key: "id", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: deviceId, scope: "identity" }),
5650
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_is_gateway", value: "true", scope: "inventory" }),
5651
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" })
5753
+ { ...emptyFilter, key: "id", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: deviceId, scope: "identity" },
5754
+ { ...emptyFilter, key: "mender_is_gateway", value: "true", scope: "inventory" },
5755
+ { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
5652
5756
  ];
5653
5757
  const { attributes: attributeSelection, filterTerms } = prepareSearchArguments({ filters, state });
5654
5758
  return general_api_default.post(getSearchEndpoint(getState()), {
@@ -5688,56 +5792,4 @@ var getDevicesInBounds = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/g
5688
5792
  return Promise.resolve(dispatch(actions3.receivedDevices(devicesById)));
5689
5793
  });
5690
5794
  });
5691
- // Annotate the CommonJS export names for ESM import in node:
5692
- 0 && (module.exports = {
5693
- addDevicesToGroup,
5694
- addDynamicGroup,
5695
- addStaticGroup,
5696
- applyDeviceConfig,
5697
- decommissionDevice,
5698
- deleteAuthset,
5699
- deriveInactiveDevices,
5700
- deriveReportsData,
5701
- deviceFileUpload,
5702
- ensureVersionString,
5703
- getAllDeviceCounts,
5704
- getAllDevicesByStatus,
5705
- getAllDynamicGroupDevices,
5706
- getAllGroupDevices,
5707
- getDeviceAttributes,
5708
- getDeviceAuth,
5709
- getDeviceById,
5710
- getDeviceConfig,
5711
- getDeviceConnect,
5712
- getDeviceCount,
5713
- getDeviceFileDownloadLink,
5714
- getDeviceInfo,
5715
- getDeviceLimit,
5716
- getDeviceTwin,
5717
- getDevicesByStatus,
5718
- getDevicesInBounds,
5719
- getDevicesWithAuth,
5720
- getDynamicGroups,
5721
- getGatewayDevices,
5722
- getGroupDevices,
5723
- getGroups,
5724
- getReportingLimits,
5725
- getReportsData,
5726
- getReportsDataWithoutBackendSupport,
5727
- getSessionDetails,
5728
- getSystemDevices,
5729
- preauthDevice,
5730
- removeDevicesFromGroup,
5731
- removeDynamicGroup,
5732
- removeStaticGroup,
5733
- searchDevices,
5734
- selectGroup,
5735
- setDeviceConfig,
5736
- setDeviceListState,
5737
- setDeviceTags,
5738
- setDeviceTwin,
5739
- updateDeviceAuth,
5740
- updateDevicesAuth,
5741
- updateDynamicGroup
5742
- });
5743
5795
  //# sourceMappingURL=thunks.js.map