@devtron-labs/devtron-fe-common-lib 0.0.45 → 0.0.47-beta-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
5
  var ReactDOM = require('react-dom');
6
6
  var reactRouterDom = require('react-router-dom');
7
+ var vm = require('vm');
7
8
  var RJSF = require('@rjsf/core');
8
9
  var RJSFValidator = require('@rjsf/validator-ajv8');
9
10
  var utils = require('@rjsf/utils');
@@ -47,7 +48,8 @@ var ROUTES = {
47
48
  PROJECT_LIST_MIN: 'team/autocomplete',
48
49
  USER_CHECK_ROLE: 'user/check/roles',
49
50
  IMAGE_TAGGING: 'app/image-tagging',
50
- CD_MATERIAL_GET: 'app/cd-pipeline'
51
+ CD_MATERIAL_GET: 'app/cd-pipeline',
52
+ DEPLOYMENT_TEMPLATE_LIST: 'app/template/list'
51
53
  };
52
54
  exports.KEY_VALUE = void 0;
53
55
  (function (KEY_VALUE) {
@@ -279,7 +281,7 @@ var extendStatics = function(d, b) {
279
281
  return extendStatics(d, b);
280
282
  };
281
283
 
282
- function __extends(d, b) {
284
+ function __extends$1(d, b) {
283
285
  if (typeof b !== "function" && b !== null)
284
286
  throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
285
287
  extendStatics(d, b);
@@ -385,7 +387,7 @@ var ServerError = /** @class */ (function () {
385
387
  return ServerError;
386
388
  }());
387
389
  var ServerErrors = /** @class */ (function (_super) {
388
- __extends(ServerErrors, _super);
390
+ __extends$1(ServerErrors, _super);
389
391
  function ServerErrors(obj) {
390
392
  var _this = _super.call(this) || this;
391
393
  _this.code = obj.code;
@@ -2147,7 +2149,7 @@ eventManager.on(2
2147
2149
  });
2148
2150
 
2149
2151
  var ToastBody = /** @class */ (function (_super) {
2150
- __extends(ToastBody, _super);
2152
+ __extends$1(ToastBody, _super);
2151
2153
  function ToastBody() {
2152
2154
  return _super !== null && _super.apply(this, arguments) || this;
2153
2155
  }
@@ -2157,7 +2159,7 @@ var ToastBody = /** @class */ (function (_super) {
2157
2159
  return ToastBody;
2158
2160
  }(React.Component));
2159
2161
  var ToastBody3 = /** @class */ (function (_super) {
2160
- __extends(ToastBody3, _super);
2162
+ __extends$1(ToastBody3, _super);
2161
2163
  function ToastBody3() {
2162
2164
  return _super !== null && _super.apply(this, arguments) || this;
2163
2165
  }
@@ -2167,7 +2169,7 @@ var ToastBody3 = /** @class */ (function (_super) {
2167
2169
  return ToastBody3;
2168
2170
  }(React.Component));
2169
2171
  var ToastBodyWithButton = /** @class */ (function (_super) {
2170
- __extends(ToastBodyWithButton, _super);
2172
+ __extends$1(ToastBodyWithButton, _super);
2171
2173
  function ToastBodyWithButton() {
2172
2174
  return _super !== null && _super.apply(this, arguments) || this;
2173
2175
  }
@@ -2216,7 +2218,7 @@ function ErrorScreenNotFound() {
2216
2218
  }
2217
2219
 
2218
2220
  var ErrorScreenManager = /** @class */ (function (_super) {
2219
- __extends(ErrorScreenManager, _super);
2221
+ __extends$1(ErrorScreenManager, _super);
2220
2222
  function ErrorScreenManager() {
2221
2223
  return _super !== null && _super.apply(this, arguments) || this;
2222
2224
  }
@@ -2247,7 +2249,7 @@ var ErrorScreenManager = /** @class */ (function (_super) {
2247
2249
  return ErrorScreenManager;
2248
2250
  }(React.Component));
2249
2251
  var ErrorScreenNotAuthorized = /** @class */ (function (_super) {
2250
- __extends(ErrorScreenNotAuthorized, _super);
2252
+ __extends$1(ErrorScreenNotAuthorized, _super);
2251
2253
  function ErrorScreenNotAuthorized() {
2252
2254
  return _super !== null && _super.apply(this, arguments) || this;
2253
2255
  }
@@ -9836,27 +9838,1505 @@ var moment$1 = {
9836
9838
 
9837
9839
  var moment = momentExports;
9838
9840
 
9839
- var _g$5;
9840
- function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
9841
- var SvgIcWarning = function SvgIcWarning(props) {
9842
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
9843
- xmlns: "http://www.w3.org/2000/svg",
9844
- width: "1em",
9845
- height: "1em",
9846
- viewBox: "0 0 32 32"
9847
- }, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
9848
- fill: "none",
9849
- fillRule: "evenodd"
9850
- }, /*#__PURE__*/React__namespace.createElement("path", {
9851
- d: "M0 0h32v32H0z"
9852
- }), /*#__PURE__*/React__namespace.createElement("path", {
9853
- fill: "#FFCB5D",
9854
- d: "M18.315 5.052 29.72 25.01A2.667 2.667 0 0 1 27.405 29H4.595a2.667 2.667 0 0 1-2.315-3.99L13.685 5.052a2.667 2.667 0 0 1 4.63 0z"
9855
- }), /*#__PURE__*/React__namespace.createElement("path", {
9856
- fill: "#FFF",
9857
- d: "M16 22.667a1.333 1.333 0 1 1 0 2.666 1.333 1.333 0 0 1 0-2.666zM16 12c.736 0 1.333.597 1.333 1.333v6.334a1.333 1.333 0 1 1-2.666 0v-6.334c0-.736.597-1.333 1.333-1.333z"
9858
- }))));
9841
+ const {
9842
+ hasOwnProperty: hasOwnProp
9843
+ } = Object.prototype;
9844
+ /**
9845
+ * @typedef {null|boolean|number|string|PlainObject|GenericArray} JSONObject
9846
+ */
9847
+
9848
+ /**
9849
+ * @typedef {any} AnyItem
9850
+ */
9851
+
9852
+ /**
9853
+ * @typedef {any} AnyResult
9854
+ */
9855
+
9856
+ /**
9857
+ * Copies array and then pushes item into it.
9858
+ * @param {GenericArray} arr Array to copy and into which to push
9859
+ * @param {AnyItem} item Array item to add (to end)
9860
+ * @returns {GenericArray} Copy of the original array
9861
+ */
9862
+
9863
+ function push(arr, item) {
9864
+ arr = arr.slice();
9865
+ arr.push(item);
9866
+ return arr;
9867
+ }
9868
+ /**
9869
+ * Copies array and then unshifts item into it.
9870
+ * @param {AnyItem} item Array item to add (to beginning)
9871
+ * @param {GenericArray} arr Array to copy and into which to unshift
9872
+ * @returns {GenericArray} Copy of the original array
9873
+ */
9874
+
9875
+
9876
+ function unshift(item, arr) {
9877
+ arr = arr.slice();
9878
+ arr.unshift(item);
9879
+ return arr;
9880
+ }
9881
+ /**
9882
+ * Caught when JSONPath is used without `new` but rethrown if with `new`
9883
+ * @extends Error
9884
+ */
9885
+
9886
+
9887
+ class NewError extends Error {
9888
+ /**
9889
+ * @param {AnyResult} value The evaluated scalar value
9890
+ */
9891
+ constructor(value) {
9892
+ super('JSONPath should not be called with "new" (it prevents return ' + 'of (unwrapped) scalar values)');
9893
+ this.avoidNew = true;
9894
+ this.value = value;
9895
+ this.name = 'NewError';
9896
+ }
9897
+
9898
+ }
9899
+ /**
9900
+ * @typedef {PlainObject} ReturnObject
9901
+ * @property {string} path
9902
+ * @property {JSONObject} value
9903
+ * @property {PlainObject|GenericArray} parent
9904
+ * @property {string} parentProperty
9905
+ */
9906
+
9907
+ /**
9908
+ * @callback JSONPathCallback
9909
+ * @param {string|PlainObject} preferredOutput
9910
+ * @param {"value"|"property"} type
9911
+ * @param {ReturnObject} fullRetObj
9912
+ * @returns {void}
9913
+ */
9914
+
9915
+ /**
9916
+ * @callback OtherTypeCallback
9917
+ * @param {JSONObject} val
9918
+ * @param {string} path
9919
+ * @param {PlainObject|GenericArray} parent
9920
+ * @param {string} parentPropName
9921
+ * @returns {boolean}
9922
+ */
9923
+
9924
+ /* eslint-disable max-len -- Can make multiline type after https://github.com/syavorsky/comment-parser/issues/109 */
9925
+
9926
+ /**
9927
+ * @typedef {PlainObject} JSONPathOptions
9928
+ * @property {JSON} json
9929
+ * @property {string|string[]} path
9930
+ * @property {"value"|"path"|"pointer"|"parent"|"parentProperty"|"all"} [resultType="value"]
9931
+ * @property {boolean} [flatten=false]
9932
+ * @property {boolean} [wrap=true]
9933
+ * @property {PlainObject} [sandbox={}]
9934
+ * @property {boolean} [preventEval=false]
9935
+ * @property {PlainObject|GenericArray|null} [parent=null]
9936
+ * @property {string|null} [parentProperty=null]
9937
+ * @property {JSONPathCallback} [callback]
9938
+ * @property {OtherTypeCallback} [otherTypeCallback] Defaults to
9939
+ * function which throws on encountering `@other`
9940
+ * @property {boolean} [autostart=true]
9941
+ */
9942
+
9943
+ /* eslint-enable max-len -- Can make multiline type after https://github.com/syavorsky/comment-parser/issues/109 */
9944
+
9945
+ /**
9946
+ * @param {string|JSONPathOptions} opts If a string, will be treated as `expr`
9947
+ * @param {string} [expr] JSON path to evaluate
9948
+ * @param {JSON} [obj] JSON object to evaluate against
9949
+ * @param {JSONPathCallback} [callback] Passed 3 arguments: 1) desired payload
9950
+ * per `resultType`, 2) `"value"|"property"`, 3) Full returned object with
9951
+ * all payloads
9952
+ * @param {OtherTypeCallback} [otherTypeCallback] If `@other()` is at the end
9953
+ * of one's query, this will be invoked with the value of the item, its
9954
+ * path, its parent, and its parent's property name, and it should return
9955
+ * a boolean indicating whether the supplied value belongs to the "other"
9956
+ * type or not (or it may handle transformations and return `false`).
9957
+ * @returns {JSONPath}
9958
+ * @class
9959
+ */
9960
+
9961
+
9962
+ function JSONPath(opts, expr, obj, callback, otherTypeCallback) {
9963
+ // eslint-disable-next-line no-restricted-syntax
9964
+ if (!(this instanceof JSONPath)) {
9965
+ try {
9966
+ return new JSONPath(opts, expr, obj, callback, otherTypeCallback);
9967
+ } catch (e) {
9968
+ if (!e.avoidNew) {
9969
+ throw e;
9970
+ }
9971
+
9972
+ return e.value;
9973
+ }
9974
+ }
9975
+
9976
+ if (typeof opts === 'string') {
9977
+ otherTypeCallback = callback;
9978
+ callback = obj;
9979
+ obj = expr;
9980
+ expr = opts;
9981
+ opts = null;
9982
+ }
9983
+
9984
+ const optObj = opts && typeof opts === 'object';
9985
+ opts = opts || {};
9986
+ this.json = opts.json || obj;
9987
+ this.path = opts.path || expr;
9988
+ this.resultType = opts.resultType || 'value';
9989
+ this.flatten = opts.flatten || false;
9990
+ this.wrap = hasOwnProp.call(opts, 'wrap') ? opts.wrap : true;
9991
+ this.sandbox = opts.sandbox || {};
9992
+ this.preventEval = opts.preventEval || false;
9993
+ this.parent = opts.parent || null;
9994
+ this.parentProperty = opts.parentProperty || null;
9995
+ this.callback = opts.callback || callback || null;
9996
+
9997
+ this.otherTypeCallback = opts.otherTypeCallback || otherTypeCallback || function () {
9998
+ throw new TypeError('You must supply an otherTypeCallback callback option ' + 'with the @other() operator.');
9999
+ };
10000
+
10001
+ if (opts.autostart !== false) {
10002
+ const args = {
10003
+ path: optObj ? opts.path : expr
10004
+ };
10005
+
10006
+ if (!optObj) {
10007
+ args.json = obj;
10008
+ } else if ('json' in opts) {
10009
+ args.json = opts.json;
10010
+ }
10011
+
10012
+ const ret = this.evaluate(args);
10013
+
10014
+ if (!ret || typeof ret !== 'object') {
10015
+ throw new NewError(ret);
10016
+ }
10017
+
10018
+ return ret;
10019
+ }
10020
+ } // PUBLIC METHODS
10021
+
10022
+
10023
+ JSONPath.prototype.evaluate = function (expr, json, callback, otherTypeCallback) {
10024
+ let currParent = this.parent,
10025
+ currParentProperty = this.parentProperty;
10026
+ let {
10027
+ flatten,
10028
+ wrap
10029
+ } = this;
10030
+ this.currResultType = this.resultType;
10031
+ this.currPreventEval = this.preventEval;
10032
+ this.currSandbox = this.sandbox;
10033
+ callback = callback || this.callback;
10034
+ this.currOtherTypeCallback = otherTypeCallback || this.otherTypeCallback;
10035
+ json = json || this.json;
10036
+ expr = expr || this.path;
10037
+
10038
+ if (expr && typeof expr === 'object' && !Array.isArray(expr)) {
10039
+ if (!expr.path && expr.path !== '') {
10040
+ throw new TypeError('You must supply a "path" property when providing an object ' + 'argument to JSONPath.evaluate().');
10041
+ }
10042
+
10043
+ if (!hasOwnProp.call(expr, 'json')) {
10044
+ throw new TypeError('You must supply a "json" property when providing an object ' + 'argument to JSONPath.evaluate().');
10045
+ }
10046
+
10047
+ ({
10048
+ json
10049
+ } = expr);
10050
+ flatten = hasOwnProp.call(expr, 'flatten') ? expr.flatten : flatten;
10051
+ this.currResultType = hasOwnProp.call(expr, 'resultType') ? expr.resultType : this.currResultType;
10052
+ this.currSandbox = hasOwnProp.call(expr, 'sandbox') ? expr.sandbox : this.currSandbox;
10053
+ wrap = hasOwnProp.call(expr, 'wrap') ? expr.wrap : wrap;
10054
+ this.currPreventEval = hasOwnProp.call(expr, 'preventEval') ? expr.preventEval : this.currPreventEval;
10055
+ callback = hasOwnProp.call(expr, 'callback') ? expr.callback : callback;
10056
+ this.currOtherTypeCallback = hasOwnProp.call(expr, 'otherTypeCallback') ? expr.otherTypeCallback : this.currOtherTypeCallback;
10057
+ currParent = hasOwnProp.call(expr, 'parent') ? expr.parent : currParent;
10058
+ currParentProperty = hasOwnProp.call(expr, 'parentProperty') ? expr.parentProperty : currParentProperty;
10059
+ expr = expr.path;
10060
+ }
10061
+
10062
+ currParent = currParent || null;
10063
+ currParentProperty = currParentProperty || null;
10064
+
10065
+ if (Array.isArray(expr)) {
10066
+ expr = JSONPath.toPathString(expr);
10067
+ }
10068
+
10069
+ if (!expr && expr !== '' || !json) {
10070
+ return undefined;
10071
+ }
10072
+
10073
+ const exprList = JSONPath.toPathArray(expr);
10074
+
10075
+ if (exprList[0] === '$' && exprList.length > 1) {
10076
+ exprList.shift();
10077
+ }
10078
+
10079
+ this._hasParentSelector = null;
10080
+
10081
+ const result = this._trace(exprList, json, ['$'], currParent, currParentProperty, callback).filter(function (ea) {
10082
+ return ea && !ea.isParentSelector;
10083
+ });
10084
+
10085
+ if (!result.length) {
10086
+ return wrap ? [] : undefined;
10087
+ }
10088
+
10089
+ if (!wrap && result.length === 1 && !result[0].hasArrExpr) {
10090
+ return this._getPreferredOutput(result[0]);
10091
+ }
10092
+
10093
+ return result.reduce((rslt, ea) => {
10094
+ const valOrPath = this._getPreferredOutput(ea);
10095
+
10096
+ if (flatten && Array.isArray(valOrPath)) {
10097
+ rslt = rslt.concat(valOrPath);
10098
+ } else {
10099
+ rslt.push(valOrPath);
10100
+ }
10101
+
10102
+ return rslt;
10103
+ }, []);
10104
+ }; // PRIVATE METHODS
10105
+
10106
+
10107
+ JSONPath.prototype._getPreferredOutput = function (ea) {
10108
+ const resultType = this.currResultType;
10109
+
10110
+ switch (resultType) {
10111
+ case 'all':
10112
+ {
10113
+ const path = Array.isArray(ea.path) ? ea.path : JSONPath.toPathArray(ea.path);
10114
+ ea.pointer = JSONPath.toPointer(path);
10115
+ ea.path = typeof ea.path === 'string' ? ea.path : JSONPath.toPathString(ea.path);
10116
+ return ea;
10117
+ }
10118
+
10119
+ case 'value':
10120
+ case 'parent':
10121
+ case 'parentProperty':
10122
+ return ea[resultType];
10123
+
10124
+ case 'path':
10125
+ return JSONPath.toPathString(ea[resultType]);
10126
+
10127
+ case 'pointer':
10128
+ return JSONPath.toPointer(ea.path);
10129
+
10130
+ default:
10131
+ throw new TypeError('Unknown result type');
10132
+ }
10133
+ };
10134
+
10135
+ JSONPath.prototype._handleCallback = function (fullRetObj, callback, type) {
10136
+ if (callback) {
10137
+ const preferredOutput = this._getPreferredOutput(fullRetObj);
10138
+
10139
+ fullRetObj.path = typeof fullRetObj.path === 'string' ? fullRetObj.path : JSONPath.toPathString(fullRetObj.path); // eslint-disable-next-line n/callback-return
10140
+
10141
+ callback(preferredOutput, type, fullRetObj);
10142
+ }
10143
+ };
10144
+ /**
10145
+ *
10146
+ * @param {string} expr
10147
+ * @param {JSONObject} val
10148
+ * @param {string} path
10149
+ * @param {PlainObject|GenericArray} parent
10150
+ * @param {string} parentPropName
10151
+ * @param {JSONPathCallback} callback
10152
+ * @param {boolean} hasArrExpr
10153
+ * @param {boolean} literalPriority
10154
+ * @returns {ReturnObject|ReturnObject[]}
10155
+ */
10156
+
10157
+
10158
+ JSONPath.prototype._trace = function (expr, val, path, parent, parentPropName, callback, hasArrExpr, literalPriority) {
10159
+ // No expr to follow? return path and value as the result of
10160
+ // this trace branch
10161
+ let retObj;
10162
+
10163
+ if (!expr.length) {
10164
+ retObj = {
10165
+ path,
10166
+ value: val,
10167
+ parent,
10168
+ parentProperty: parentPropName,
10169
+ hasArrExpr
10170
+ };
10171
+
10172
+ this._handleCallback(retObj, callback, 'value');
10173
+
10174
+ return retObj;
10175
+ }
10176
+
10177
+ const loc = expr[0],
10178
+ x = expr.slice(1); // We need to gather the return value of recursive trace calls in order to
10179
+ // do the parent sel computation.
10180
+
10181
+ const ret = [];
10182
+ /**
10183
+ *
10184
+ * @param {ReturnObject|ReturnObject[]} elems
10185
+ * @returns {void}
10186
+ */
10187
+
10188
+ function addRet(elems) {
10189
+ if (Array.isArray(elems)) {
10190
+ // This was causing excessive stack size in Node (with or
10191
+ // without Babel) against our performance test:
10192
+ // `ret.push(...elems);`
10193
+ elems.forEach(t => {
10194
+ ret.push(t);
10195
+ });
10196
+ } else {
10197
+ ret.push(elems);
10198
+ }
10199
+ }
10200
+
10201
+ if ((typeof loc !== 'string' || literalPriority) && val && hasOwnProp.call(val, loc)) {
10202
+ // simple case--directly follow property
10203
+ addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr)); // eslint-disable-next-line unicorn/prefer-switch -- Part of larger `if`
10204
+ } else if (loc === '*') {
10205
+ // all child properties
10206
+ this._walk(val, m => {
10207
+ addRet(this._trace(x, val[m], push(path, m), val, m, callback, true, true));
10208
+ });
10209
+ } else if (loc === '..') {
10210
+ // all descendent parent properties
10211
+ // Check remaining expression with val's immediate children
10212
+ addRet(this._trace(x, val, path, parent, parentPropName, callback, hasArrExpr));
10213
+
10214
+ this._walk(val, m => {
10215
+ // We don't join m and x here because we only want parents,
10216
+ // not scalar values
10217
+ if (typeof val[m] === 'object') {
10218
+ // Keep going with recursive descent on val's
10219
+ // object children
10220
+ addRet(this._trace(expr.slice(), val[m], push(path, m), val, m, callback, true));
10221
+ }
10222
+ }); // The parent sel computation is handled in the frame above using the
10223
+ // ancestor object of val
10224
+
10225
+ } else if (loc === '^') {
10226
+ // This is not a final endpoint, so we do not invoke the callback here
10227
+ this._hasParentSelector = true;
10228
+ return {
10229
+ path: path.slice(0, -1),
10230
+ expr: x,
10231
+ isParentSelector: true
10232
+ };
10233
+ } else if (loc === '~') {
10234
+ // property name
10235
+ retObj = {
10236
+ path: push(path, loc),
10237
+ value: parentPropName,
10238
+ parent,
10239
+ parentProperty: null
10240
+ };
10241
+
10242
+ this._handleCallback(retObj, callback, 'property');
10243
+
10244
+ return retObj;
10245
+ } else if (loc === '$') {
10246
+ // root only
10247
+ addRet(this._trace(x, val, path, null, null, callback, hasArrExpr));
10248
+ } else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(loc)) {
10249
+ // [start:end:step] Python slice syntax
10250
+ addRet(this._slice(loc, x, val, path, parent, parentPropName, callback));
10251
+ } else if (loc.indexOf('?(') === 0) {
10252
+ // [?(expr)] (filtering)
10253
+ if (this.currPreventEval) {
10254
+ throw new Error('Eval [?(expr)] prevented in JSONPath expression.');
10255
+ }
10256
+
10257
+ const safeLoc = loc.replace(/^\?\((.*?)\)$/u, '$1');
10258
+
10259
+ this._walk(val, m => {
10260
+ if (this._eval(safeLoc, val[m], m, path, parent, parentPropName)) {
10261
+ addRet(this._trace(x, val[m], push(path, m), val, m, callback, true));
10262
+ }
10263
+ });
10264
+ } else if (loc[0] === '(') {
10265
+ // [(expr)] (dynamic property/index)
10266
+ if (this.currPreventEval) {
10267
+ throw new Error('Eval [(expr)] prevented in JSONPath expression.');
10268
+ } // As this will resolve to a property name (but we don't know it
10269
+ // yet), property and parent information is relative to the
10270
+ // parent of the property to which this expression will resolve
10271
+
10272
+
10273
+ addRet(this._trace(unshift(this._eval(loc, val, path[path.length - 1], path.slice(0, -1), parent, parentPropName), x), val, path, parent, parentPropName, callback, hasArrExpr));
10274
+ } else if (loc[0] === '@') {
10275
+ // value type: @boolean(), etc.
10276
+ let addType = false;
10277
+ const valueType = loc.slice(1, -2);
10278
+
10279
+ switch (valueType) {
10280
+ case 'scalar':
10281
+ if (!val || !['object', 'function'].includes(typeof val)) {
10282
+ addType = true;
10283
+ }
10284
+
10285
+ break;
10286
+
10287
+ case 'boolean':
10288
+ case 'string':
10289
+ case 'undefined':
10290
+ case 'function':
10291
+ // eslint-disable-next-line valid-typeof
10292
+ if (typeof val === valueType) {
10293
+ addType = true;
10294
+ }
10295
+
10296
+ break;
10297
+
10298
+ case 'integer':
10299
+ if (Number.isFinite(val) && !(val % 1)) {
10300
+ addType = true;
10301
+ }
10302
+
10303
+ break;
10304
+
10305
+ case 'number':
10306
+ if (Number.isFinite(val)) {
10307
+ addType = true;
10308
+ }
10309
+
10310
+ break;
10311
+
10312
+ case 'nonFinite':
10313
+ if (typeof val === 'number' && !Number.isFinite(val)) {
10314
+ addType = true;
10315
+ }
10316
+
10317
+ break;
10318
+
10319
+ case 'object':
10320
+ // eslint-disable-next-line valid-typeof
10321
+ if (val && typeof val === valueType) {
10322
+ addType = true;
10323
+ }
10324
+
10325
+ break;
10326
+
10327
+ case 'array':
10328
+ if (Array.isArray(val)) {
10329
+ addType = true;
10330
+ }
10331
+
10332
+ break;
10333
+
10334
+ case 'other':
10335
+ addType = this.currOtherTypeCallback(val, path, parent, parentPropName);
10336
+ break;
10337
+
10338
+ case 'null':
10339
+ if (val === null) {
10340
+ addType = true;
10341
+ }
10342
+
10343
+ break;
10344
+
10345
+ /* c8 ignore next 2 */
10346
+
10347
+ default:
10348
+ throw new TypeError('Unknown value type ' + valueType);
10349
+ }
10350
+
10351
+ if (addType) {
10352
+ retObj = {
10353
+ path,
10354
+ value: val,
10355
+ parent,
10356
+ parentProperty: parentPropName
10357
+ };
10358
+
10359
+ this._handleCallback(retObj, callback, 'value');
10360
+
10361
+ return retObj;
10362
+ } // `-escaped property
10363
+
10364
+ } else if (loc[0] === '`' && val && hasOwnProp.call(val, loc.slice(1))) {
10365
+ const locProp = loc.slice(1);
10366
+ addRet(this._trace(x, val[locProp], push(path, locProp), val, locProp, callback, hasArrExpr, true));
10367
+ } else if (loc.includes(',')) {
10368
+ // [name1,name2,...]
10369
+ const parts = loc.split(',');
10370
+
10371
+ for (const part of parts) {
10372
+ addRet(this._trace(unshift(part, x), val, path, parent, parentPropName, callback, true));
10373
+ } // simple case--directly follow property
10374
+
10375
+ } else if (!literalPriority && val && hasOwnProp.call(val, loc)) {
10376
+ addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr, true));
10377
+ } // We check the resulting values for parent selections. For parent
10378
+ // selections we discard the value object and continue the trace with the
10379
+ // current val object
10380
+
10381
+
10382
+ if (this._hasParentSelector) {
10383
+ for (let t = 0; t < ret.length; t++) {
10384
+ const rett = ret[t];
10385
+
10386
+ if (rett && rett.isParentSelector) {
10387
+ const tmp = this._trace(rett.expr, val, rett.path, parent, parentPropName, callback, hasArrExpr);
10388
+
10389
+ if (Array.isArray(tmp)) {
10390
+ ret[t] = tmp[0];
10391
+ const tl = tmp.length;
10392
+
10393
+ for (let tt = 1; tt < tl; tt++) {
10394
+ t++;
10395
+ ret.splice(t, 0, tmp[tt]);
10396
+ }
10397
+ } else {
10398
+ ret[t] = tmp;
10399
+ }
10400
+ }
10401
+ }
10402
+ }
10403
+
10404
+ return ret;
10405
+ };
10406
+
10407
+ JSONPath.prototype._walk = function (val, f) {
10408
+ if (Array.isArray(val)) {
10409
+ const n = val.length;
10410
+
10411
+ for (let i = 0; i < n; i++) {
10412
+ f(i);
10413
+ }
10414
+ } else if (val && typeof val === 'object') {
10415
+ Object.keys(val).forEach(m => {
10416
+ f(m);
10417
+ });
10418
+ }
10419
+ };
10420
+
10421
+ JSONPath.prototype._slice = function (loc, expr, val, path, parent, parentPropName, callback) {
10422
+ if (!Array.isArray(val)) {
10423
+ return undefined;
10424
+ }
10425
+
10426
+ const len = val.length,
10427
+ parts = loc.split(':'),
10428
+ step = parts[2] && Number.parseInt(parts[2]) || 1;
10429
+ let start = parts[0] && Number.parseInt(parts[0]) || 0,
10430
+ end = parts[1] && Number.parseInt(parts[1]) || len;
10431
+ start = start < 0 ? Math.max(0, start + len) : Math.min(len, start);
10432
+ end = end < 0 ? Math.max(0, end + len) : Math.min(len, end);
10433
+ const ret = [];
10434
+
10435
+ for (let i = start; i < end; i += step) {
10436
+ const tmp = this._trace(unshift(i, expr), val, path, parent, parentPropName, callback, true); // Should only be possible to be an array here since first part of
10437
+ // ``unshift(i, expr)` passed in above would not be empty, nor `~`,
10438
+ // nor begin with `@` (as could return objects)
10439
+ // This was causing excessive stack size in Node (with or
10440
+ // without Babel) against our performance test: `ret.push(...tmp);`
10441
+
10442
+
10443
+ tmp.forEach(t => {
10444
+ ret.push(t);
10445
+ });
10446
+ }
10447
+
10448
+ return ret;
10449
+ };
10450
+
10451
+ JSONPath.prototype._eval = function (code, _v, _vname, path, parent, parentPropName) {
10452
+ this.currSandbox._$_parentProperty = parentPropName;
10453
+ this.currSandbox._$_parent = parent;
10454
+ this.currSandbox._$_property = _vname;
10455
+ this.currSandbox._$_root = this.json;
10456
+ this.currSandbox._$_v = _v;
10457
+ const containsPath = code.includes('@path');
10458
+
10459
+ if (containsPath) {
10460
+ this.currSandbox._$_path = JSONPath.toPathString(path.concat([_vname]));
10461
+ }
10462
+
10463
+ const scriptCacheKey = 'script:' + code;
10464
+
10465
+ if (!JSONPath.cache[scriptCacheKey]) {
10466
+ let script = code.replace(/@parentProperty/gu, '_$_parentProperty').replace(/@parent/gu, '_$_parent').replace(/@property/gu, '_$_property').replace(/@root/gu, '_$_root').replace(/@([.\s)[])/gu, '_$_v$1');
10467
+
10468
+ if (containsPath) {
10469
+ script = script.replace(/@path/gu, '_$_path');
10470
+ }
10471
+
10472
+ JSONPath.cache[scriptCacheKey] = new this.vm.Script(script);
10473
+ }
10474
+
10475
+ try {
10476
+ return JSONPath.cache[scriptCacheKey].runInNewContext(this.currSandbox);
10477
+ } catch (e) {
10478
+ throw new Error('jsonPath: ' + e.message + ': ' + code);
10479
+ }
10480
+ }; // PUBLIC CLASS PROPERTIES AND METHODS
10481
+ // Could store the cache object itself
10482
+
10483
+
10484
+ JSONPath.cache = {};
10485
+ /**
10486
+ * @param {string[]} pathArr Array to convert
10487
+ * @returns {string} The path string
10488
+ */
10489
+
10490
+ JSONPath.toPathString = function (pathArr) {
10491
+ const x = pathArr,
10492
+ n = x.length;
10493
+ let p = '$';
10494
+
10495
+ for (let i = 1; i < n; i++) {
10496
+ if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) {
10497
+ p += /^[0-9*]+$/u.test(x[i]) ? '[' + x[i] + ']' : "['" + x[i] + "']";
10498
+ }
10499
+ }
10500
+
10501
+ return p;
10502
+ };
10503
+ /**
10504
+ * @param {string} pointer JSON Path
10505
+ * @returns {string} JSON Pointer
10506
+ */
10507
+
10508
+
10509
+ JSONPath.toPointer = function (pointer) {
10510
+ const x = pointer,
10511
+ n = x.length;
10512
+ let p = '';
10513
+
10514
+ for (let i = 1; i < n; i++) {
10515
+ if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) {
10516
+ p += '/' + x[i].toString().replace(/~/gu, '~0').replace(/\//gu, '~1');
10517
+ }
10518
+ }
10519
+
10520
+ return p;
10521
+ };
10522
+ /**
10523
+ * @param {string} expr Expression to convert
10524
+ * @returns {string[]}
10525
+ */
10526
+
10527
+
10528
+ JSONPath.toPathArray = function (expr) {
10529
+ const {
10530
+ cache
10531
+ } = JSONPath;
10532
+
10533
+ if (cache[expr]) {
10534
+ return cache[expr].concat();
10535
+ }
10536
+
10537
+ const subx = [];
10538
+ const normalized = expr // Properties
10539
+ .replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ';$&;') // Parenthetical evaluations (filtering and otherwise), directly
10540
+ // within brackets or single quotes
10541
+ .replace(/[['](\??\(.*?\))[\]']/gu, function ($0, $1) {
10542
+ return '[#' + (subx.push($1) - 1) + ']';
10543
+ }) // Escape periods and tildes within properties
10544
+ .replace(/\[['"]([^'\]]*)['"]\]/gu, function ($0, prop) {
10545
+ return "['" + prop.replace(/\./gu, '%@%').replace(/~/gu, '%%@@%%') + "']";
10546
+ }) // Properties operator
10547
+ .replace(/~/gu, ';~;') // Split by property boundaries
10548
+ .replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ';') // Reinsert periods within properties
10549
+ .replace(/%@%/gu, '.') // Reinsert tildes within properties
10550
+ .replace(/%%@@%%/gu, '~') // Parent
10551
+ .replace(/(?:;)?(\^+)(?:;)?/gu, function ($0, ups) {
10552
+ return ';' + ups.split('').join(';') + ';';
10553
+ }) // Descendents
10554
+ .replace(/;;;|;;/gu, ';..;') // Remove trailing
10555
+ .replace(/;$|'?\]|'$/gu, '');
10556
+ const exprList = normalized.split(';').map(function (exp) {
10557
+ const match = exp.match(/#(\d+)/u);
10558
+ return !match || !match[1] ? exp : subx[match[1]];
10559
+ });
10560
+ cache[expr] = exprList;
10561
+ return cache[expr].concat();
10562
+ };
10563
+
10564
+ JSONPath.prototype.vm = vm;
10565
+
10566
+ /*!
10567
+ * https://github.com/Starcounter-Jack/JSON-Patch
10568
+ * (c) 2017-2022 Joachim Wester
10569
+ * MIT licensed
10570
+ */
10571
+ var __extends = (undefined && undefined.__extends) || (function () {
10572
+ var extendStatics = function (d, b) {
10573
+ extendStatics = Object.setPrototypeOf ||
10574
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10575
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
10576
+ return extendStatics(d, b);
10577
+ };
10578
+ return function (d, b) {
10579
+ extendStatics(d, b);
10580
+ function __() { this.constructor = d; }
10581
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10582
+ };
10583
+ })();
10584
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
10585
+ function hasOwnProperty$b(obj, key) {
10586
+ return _hasOwnProperty.call(obj, key);
10587
+ }
10588
+ function _objectKeys(obj) {
10589
+ if (Array.isArray(obj)) {
10590
+ var keys_1 = new Array(obj.length);
10591
+ for (var k = 0; k < keys_1.length; k++) {
10592
+ keys_1[k] = "" + k;
10593
+ }
10594
+ return keys_1;
10595
+ }
10596
+ if (Object.keys) {
10597
+ return Object.keys(obj);
10598
+ }
10599
+ var keys = [];
10600
+ for (var i in obj) {
10601
+ if (hasOwnProperty$b(obj, i)) {
10602
+ keys.push(i);
10603
+ }
10604
+ }
10605
+ return keys;
10606
+ }
10607
+ /**
10608
+ * Deeply clone the object.
10609
+ * https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)
10610
+ * @param {any} obj value to clone
10611
+ * @return {any} cloned obj
10612
+ */
10613
+ function _deepClone(obj) {
10614
+ switch (typeof obj) {
10615
+ case "object":
10616
+ return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5
10617
+ case "undefined":
10618
+ return null; //this is how JSON.stringify behaves for array items
10619
+ default:
10620
+ return obj; //no need to clone primitives
10621
+ }
10622
+ }
10623
+ //3x faster than cached /^\d+$/.test(str)
10624
+ function isInteger(str) {
10625
+ var i = 0;
10626
+ var len = str.length;
10627
+ var charCode;
10628
+ while (i < len) {
10629
+ charCode = str.charCodeAt(i);
10630
+ if (charCode >= 48 && charCode <= 57) {
10631
+ i++;
10632
+ continue;
10633
+ }
10634
+ return false;
10635
+ }
10636
+ return true;
10637
+ }
10638
+ /**
10639
+ * Escapes a json pointer path
10640
+ * @param path The raw pointer
10641
+ * @return the Escaped path
10642
+ */
10643
+ function escapePathComponent(path) {
10644
+ if (path.indexOf('/') === -1 && path.indexOf('~') === -1)
10645
+ return path;
10646
+ return path.replace(/~/g, '~0').replace(/\//g, '~1');
10647
+ }
10648
+ /**
10649
+ * Unescapes a json pointer path
10650
+ * @param path The escaped pointer
10651
+ * @return The unescaped path
10652
+ */
10653
+ function unescapePathComponent(path) {
10654
+ return path.replace(/~1/g, '/').replace(/~0/g, '~');
10655
+ }
10656
+ /**
10657
+ * Recursively checks whether an object has any undefined values inside.
10658
+ */
10659
+ function hasUndefined(obj) {
10660
+ if (obj === undefined) {
10661
+ return true;
10662
+ }
10663
+ if (obj) {
10664
+ if (Array.isArray(obj)) {
10665
+ for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
10666
+ if (hasUndefined(obj[i_1])) {
10667
+ return true;
10668
+ }
10669
+ }
10670
+ }
10671
+ else if (typeof obj === "object") {
10672
+ var objKeys = _objectKeys(obj);
10673
+ var objKeysLength = objKeys.length;
10674
+ for (var i = 0; i < objKeysLength; i++) {
10675
+ if (hasUndefined(obj[objKeys[i]])) {
10676
+ return true;
10677
+ }
10678
+ }
10679
+ }
10680
+ }
10681
+ return false;
10682
+ }
10683
+ function patchErrorMessageFormatter(message, args) {
10684
+ var messageParts = [message];
10685
+ for (var key in args) {
10686
+ var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
10687
+ if (typeof value !== 'undefined') {
10688
+ messageParts.push(key + ": " + value);
10689
+ }
10690
+ }
10691
+ return messageParts.join('\n');
10692
+ }
10693
+ var PatchError = /** @class */ (function (_super) {
10694
+ __extends(PatchError, _super);
10695
+ function PatchError(message, name, index, operation, tree) {
10696
+ var _newTarget = this.constructor;
10697
+ var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
10698
+ _this.name = name;
10699
+ _this.index = index;
10700
+ _this.operation = operation;
10701
+ _this.tree = tree;
10702
+ Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
10703
+ _this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
10704
+ return _this;
10705
+ }
10706
+ return PatchError;
10707
+ }(Error));
10708
+
10709
+ var JsonPatchError = PatchError;
10710
+ var deepClone = _deepClone;
10711
+ /* We use a Javascript hash to store each
10712
+ function. Each hash entry (property) uses
10713
+ the operation identifiers specified in rfc6902.
10714
+ In this way, we can map each patch operation
10715
+ to its dedicated function in efficient way.
10716
+ */
10717
+ /* The operations applicable to an object */
10718
+ var objOps = {
10719
+ add: function (obj, key, document) {
10720
+ obj[key] = this.value;
10721
+ return { newDocument: document };
10722
+ },
10723
+ remove: function (obj, key, document) {
10724
+ var removed = obj[key];
10725
+ delete obj[key];
10726
+ return { newDocument: document, removed: removed };
10727
+ },
10728
+ replace: function (obj, key, document) {
10729
+ var removed = obj[key];
10730
+ obj[key] = this.value;
10731
+ return { newDocument: document, removed: removed };
10732
+ },
10733
+ move: function (obj, key, document) {
10734
+ /* in case move target overwrites an existing value,
10735
+ return the removed value, this can be taxing performance-wise,
10736
+ and is potentially unneeded */
10737
+ var removed = getValueByPointer(document, this.path);
10738
+ if (removed) {
10739
+ removed = _deepClone(removed);
10740
+ }
10741
+ var originalValue = applyOperation(document, { op: "remove", path: this.from }).removed;
10742
+ applyOperation(document, { op: "add", path: this.path, value: originalValue });
10743
+ return { newDocument: document, removed: removed };
10744
+ },
10745
+ copy: function (obj, key, document) {
10746
+ var valueToCopy = getValueByPointer(document, this.from);
10747
+ // enforce copy by value so further operations don't affect source (see issue #177)
10748
+ applyOperation(document, { op: "add", path: this.path, value: _deepClone(valueToCopy) });
10749
+ return { newDocument: document };
10750
+ },
10751
+ test: function (obj, key, document) {
10752
+ return { newDocument: document, test: _areEquals(obj[key], this.value) };
10753
+ },
10754
+ _get: function (obj, key, document) {
10755
+ this.value = obj[key];
10756
+ return { newDocument: document };
10757
+ }
10758
+ };
10759
+ /* The operations applicable to an array. Many are the same as for the object */
10760
+ var arrOps = {
10761
+ add: function (arr, i, document) {
10762
+ if (isInteger(i)) {
10763
+ arr.splice(i, 0, this.value);
10764
+ }
10765
+ else { // array props
10766
+ arr[i] = this.value;
10767
+ }
10768
+ // this may be needed when using '-' in an array
10769
+ return { newDocument: document, index: i };
10770
+ },
10771
+ remove: function (arr, i, document) {
10772
+ var removedList = arr.splice(i, 1);
10773
+ return { newDocument: document, removed: removedList[0] };
10774
+ },
10775
+ replace: function (arr, i, document) {
10776
+ var removed = arr[i];
10777
+ arr[i] = this.value;
10778
+ return { newDocument: document, removed: removed };
10779
+ },
10780
+ move: objOps.move,
10781
+ copy: objOps.copy,
10782
+ test: objOps.test,
10783
+ _get: objOps._get
9859
10784
  };
10785
+ /**
10786
+ * Retrieves a value from a JSON document by a JSON pointer.
10787
+ * Returns the value.
10788
+ *
10789
+ * @param document The document to get the value from
10790
+ * @param pointer an escaped JSON pointer
10791
+ * @return The retrieved value
10792
+ */
10793
+ function getValueByPointer(document, pointer) {
10794
+ if (pointer == '') {
10795
+ return document;
10796
+ }
10797
+ var getOriginalDestination = { op: "_get", path: pointer };
10798
+ applyOperation(document, getOriginalDestination);
10799
+ return getOriginalDestination.value;
10800
+ }
10801
+ /**
10802
+ * Apply a single JSON Patch Operation on a JSON document.
10803
+ * Returns the {newDocument, result} of the operation.
10804
+ * It modifies the `document` and `operation` objects - it gets the values by reference.
10805
+ * If you would like to avoid touching your values, clone them:
10806
+ * `jsonpatch.applyOperation(document, jsonpatch._deepClone(operation))`.
10807
+ *
10808
+ * @param document The document to patch
10809
+ * @param operation The operation to apply
10810
+ * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.
10811
+ * @param mutateDocument Whether to mutate the original document or clone it before applying
10812
+ * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.
10813
+ * @return `{newDocument, result}` after the operation
10814
+ */
10815
+ function applyOperation(document, operation, validateOperation, mutateDocument, banPrototypeModifications, index) {
10816
+ if (validateOperation === void 0) { validateOperation = false; }
10817
+ if (mutateDocument === void 0) { mutateDocument = true; }
10818
+ if (banPrototypeModifications === void 0) { banPrototypeModifications = true; }
10819
+ if (index === void 0) { index = 0; }
10820
+ if (validateOperation) {
10821
+ if (typeof validateOperation == 'function') {
10822
+ validateOperation(operation, 0, document, operation.path);
10823
+ }
10824
+ else {
10825
+ validator$1(operation, 0);
10826
+ }
10827
+ }
10828
+ /* ROOT OPERATIONS */
10829
+ if (operation.path === "") {
10830
+ var returnValue = { newDocument: document };
10831
+ if (operation.op === 'add') {
10832
+ returnValue.newDocument = operation.value;
10833
+ return returnValue;
10834
+ }
10835
+ else if (operation.op === 'replace') {
10836
+ returnValue.newDocument = operation.value;
10837
+ returnValue.removed = document; //document we removed
10838
+ return returnValue;
10839
+ }
10840
+ else if (operation.op === 'move' || operation.op === 'copy') { // it's a move or copy to root
10841
+ returnValue.newDocument = getValueByPointer(document, operation.from); // get the value by json-pointer in `from` field
10842
+ if (operation.op === 'move') { // report removed item
10843
+ returnValue.removed = document;
10844
+ }
10845
+ return returnValue;
10846
+ }
10847
+ else if (operation.op === 'test') {
10848
+ returnValue.test = _areEquals(document, operation.value);
10849
+ if (returnValue.test === false) {
10850
+ throw new JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
10851
+ }
10852
+ returnValue.newDocument = document;
10853
+ return returnValue;
10854
+ }
10855
+ else if (operation.op === 'remove') { // a remove on root
10856
+ returnValue.removed = document;
10857
+ returnValue.newDocument = null;
10858
+ return returnValue;
10859
+ }
10860
+ else if (operation.op === '_get') {
10861
+ operation.value = document;
10862
+ return returnValue;
10863
+ }
10864
+ else { /* bad operation */
10865
+ if (validateOperation) {
10866
+ throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);
10867
+ }
10868
+ else {
10869
+ return returnValue;
10870
+ }
10871
+ }
10872
+ } /* END ROOT OPERATIONS */
10873
+ else {
10874
+ if (!mutateDocument) {
10875
+ document = _deepClone(document);
10876
+ }
10877
+ var path = operation.path || "";
10878
+ var keys = path.split('/');
10879
+ var obj = document;
10880
+ var t = 1; //skip empty element - http://jsperf.com/to-shift-or-not-to-shift
10881
+ var len = keys.length;
10882
+ var existingPathFragment = undefined;
10883
+ var key = void 0;
10884
+ var validateFunction = void 0;
10885
+ if (typeof validateOperation == 'function') {
10886
+ validateFunction = validateOperation;
10887
+ }
10888
+ else {
10889
+ validateFunction = validator$1;
10890
+ }
10891
+ while (true) {
10892
+ key = keys[t];
10893
+ if (key && key.indexOf('~') != -1) {
10894
+ key = unescapePathComponent(key);
10895
+ }
10896
+ if (banPrototypeModifications &&
10897
+ (key == '__proto__' ||
10898
+ (key == 'prototype' && t > 0 && keys[t - 1] == 'constructor'))) {
10899
+ throw new TypeError('JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');
10900
+ }
10901
+ if (validateOperation) {
10902
+ if (existingPathFragment === undefined) {
10903
+ if (obj[key] === undefined) {
10904
+ existingPathFragment = keys.slice(0, t).join('/');
10905
+ }
10906
+ else if (t == len - 1) {
10907
+ existingPathFragment = operation.path;
10908
+ }
10909
+ if (existingPathFragment !== undefined) {
10910
+ validateFunction(operation, 0, document, existingPathFragment);
10911
+ }
10912
+ }
10913
+ }
10914
+ t++;
10915
+ if (Array.isArray(obj)) {
10916
+ if (key === '-') {
10917
+ key = obj.length;
10918
+ }
10919
+ else {
10920
+ if (validateOperation && !isInteger(key)) {
10921
+ throw new JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", index, operation, document);
10922
+ } // only parse key when it's an integer for `arr.prop` to work
10923
+ else if (isInteger(key)) {
10924
+ key = ~~key;
10925
+ }
10926
+ }
10927
+ if (t >= len) {
10928
+ if (validateOperation && operation.op === "add" && key > obj.length) {
10929
+ throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index, operation, document);
10930
+ }
10931
+ var returnValue = arrOps[operation.op].call(operation, obj, key, document); // Apply patch
10932
+ if (returnValue.test === false) {
10933
+ throw new JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
10934
+ }
10935
+ return returnValue;
10936
+ }
10937
+ }
10938
+ else {
10939
+ if (t >= len) {
10940
+ var returnValue = objOps[operation.op].call(operation, obj, key, document); // Apply patch
10941
+ if (returnValue.test === false) {
10942
+ throw new JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
10943
+ }
10944
+ return returnValue;
10945
+ }
10946
+ }
10947
+ obj = obj[key];
10948
+ // If we have more keys in the path, but the next value isn't a non-null object,
10949
+ // throw an OPERATION_PATH_UNRESOLVABLE error instead of iterating again.
10950
+ if (validateOperation && t < len && (!obj || typeof obj !== "object")) {
10951
+ throw new JsonPatchError('Cannot perform operation at the desired path', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);
10952
+ }
10953
+ }
10954
+ }
10955
+ }
10956
+ /**
10957
+ * Apply a full JSON Patch array on a JSON document.
10958
+ * Returns the {newDocument, result} of the patch.
10959
+ * It modifies the `document` object and `patch` - it gets the values by reference.
10960
+ * If you would like to avoid touching your values, clone them:
10961
+ * `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`.
10962
+ *
10963
+ * @param document The document to patch
10964
+ * @param patch The patch to apply
10965
+ * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.
10966
+ * @param mutateDocument Whether to mutate the original document or clone it before applying
10967
+ * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.
10968
+ * @return An array of `{newDocument, result}` after the patch
10969
+ */
10970
+ function applyPatch(document, patch, validateOperation, mutateDocument, banPrototypeModifications) {
10971
+ if (mutateDocument === void 0) { mutateDocument = true; }
10972
+ if (banPrototypeModifications === void 0) { banPrototypeModifications = true; }
10973
+ if (validateOperation) {
10974
+ if (!Array.isArray(patch)) {
10975
+ throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');
10976
+ }
10977
+ }
10978
+ if (!mutateDocument) {
10979
+ document = _deepClone(document);
10980
+ }
10981
+ var results = new Array(patch.length);
10982
+ for (var i = 0, length_1 = patch.length; i < length_1; i++) {
10983
+ // we don't need to pass mutateDocument argument because if it was true, we already deep cloned the object, we'll just pass `true`
10984
+ results[i] = applyOperation(document, patch[i], validateOperation, true, banPrototypeModifications, i);
10985
+ document = results[i].newDocument; // in case root was replaced
10986
+ }
10987
+ results.newDocument = document;
10988
+ return results;
10989
+ }
10990
+ /**
10991
+ * Apply a single JSON Patch Operation on a JSON document.
10992
+ * Returns the updated document.
10993
+ * Suitable as a reducer.
10994
+ *
10995
+ * @param document The document to patch
10996
+ * @param operation The operation to apply
10997
+ * @return The updated document
10998
+ */
10999
+ function applyReducer(document, operation, index) {
11000
+ var operationResult = applyOperation(document, operation);
11001
+ if (operationResult.test === false) { // failed test
11002
+ throw new JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
11003
+ }
11004
+ return operationResult.newDocument;
11005
+ }
11006
+ /**
11007
+ * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.
11008
+ * @param {object} operation - operation object (patch)
11009
+ * @param {number} index - index of operation in the sequence
11010
+ * @param {object} [document] - object where the operation is supposed to be applied
11011
+ * @param {string} [existingPathFragment] - comes along with `document`
11012
+ */
11013
+ function validator$1(operation, index, document, existingPathFragment) {
11014
+ if (typeof operation !== 'object' || operation === null || Array.isArray(operation)) {
11015
+ throw new JsonPatchError('Operation is not an object', 'OPERATION_NOT_AN_OBJECT', index, operation, document);
11016
+ }
11017
+ else if (!objOps[operation.op]) {
11018
+ throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);
11019
+ }
11020
+ else if (typeof operation.path !== 'string') {
11021
+ throw new JsonPatchError('Operation `path` property is not a string', 'OPERATION_PATH_INVALID', index, operation, document);
11022
+ }
11023
+ else if (operation.path.indexOf('/') !== 0 && operation.path.length > 0) {
11024
+ // paths that aren't empty string should start with "/"
11025
+ throw new JsonPatchError('Operation `path` property must start with "/"', 'OPERATION_PATH_INVALID', index, operation, document);
11026
+ }
11027
+ else if ((operation.op === 'move' || operation.op === 'copy') && typeof operation.from !== 'string') {
11028
+ throw new JsonPatchError('Operation `from` property is not present (applicable in `move` and `copy` operations)', 'OPERATION_FROM_REQUIRED', index, operation, document);
11029
+ }
11030
+ else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && operation.value === undefined) {
11031
+ throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_REQUIRED', index, operation, document);
11032
+ }
11033
+ else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && hasUndefined(operation.value)) {
11034
+ throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED', index, operation, document);
11035
+ }
11036
+ else if (document) {
11037
+ if (operation.op == "add") {
11038
+ var pathLen = operation.path.split("/").length;
11039
+ var existingPathLen = existingPathFragment.split("/").length;
11040
+ if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {
11041
+ throw new JsonPatchError('Cannot perform an `add` operation at the desired path', 'OPERATION_PATH_CANNOT_ADD', index, operation, document);
11042
+ }
11043
+ }
11044
+ else if (operation.op === 'replace' || operation.op === 'remove' || operation.op === '_get') {
11045
+ if (operation.path !== existingPathFragment) {
11046
+ throw new JsonPatchError('Cannot perform the operation at a path that does not exist', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);
11047
+ }
11048
+ }
11049
+ else if (operation.op === 'move' || operation.op === 'copy') {
11050
+ var existingValue = { op: "_get", path: operation.from, value: undefined };
11051
+ var error = validate([existingValue], document);
11052
+ if (error && error.name === 'OPERATION_PATH_UNRESOLVABLE') {
11053
+ throw new JsonPatchError('Cannot perform the operation from a path that does not exist', 'OPERATION_FROM_UNRESOLVABLE', index, operation, document);
11054
+ }
11055
+ }
11056
+ }
11057
+ }
11058
+ /**
11059
+ * Validates a sequence of operations. If `document` parameter is provided, the sequence is additionally validated against the object document.
11060
+ * If error is encountered, returns a JsonPatchError object
11061
+ * @param sequence
11062
+ * @param document
11063
+ * @returns {JsonPatchError|undefined}
11064
+ */
11065
+ function validate(sequence, document, externalValidator) {
11066
+ try {
11067
+ if (!Array.isArray(sequence)) {
11068
+ throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');
11069
+ }
11070
+ if (document) {
11071
+ //clone document and sequence so that we can safely try applying operations
11072
+ applyPatch(_deepClone(document), _deepClone(sequence), externalValidator || true);
11073
+ }
11074
+ else {
11075
+ externalValidator = externalValidator || validator$1;
11076
+ for (var i = 0; i < sequence.length; i++) {
11077
+ externalValidator(sequence[i], i, document, undefined);
11078
+ }
11079
+ }
11080
+ }
11081
+ catch (e) {
11082
+ if (e instanceof JsonPatchError) {
11083
+ return e;
11084
+ }
11085
+ else {
11086
+ throw e;
11087
+ }
11088
+ }
11089
+ }
11090
+ // based on https://github.com/epoberezkin/fast-deep-equal
11091
+ // MIT License
11092
+ // Copyright (c) 2017 Evgeny Poberezkin
11093
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
11094
+ // of this software and associated documentation files (the "Software"), to deal
11095
+ // in the Software without restriction, including without limitation the rights
11096
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11097
+ // copies of the Software, and to permit persons to whom the Software is
11098
+ // furnished to do so, subject to the following conditions:
11099
+ // The above copyright notice and this permission notice shall be included in all
11100
+ // copies or substantial portions of the Software.
11101
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11102
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11103
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11104
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11105
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11106
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
11107
+ // SOFTWARE.
11108
+ function _areEquals(a, b) {
11109
+ if (a === b)
11110
+ return true;
11111
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
11112
+ var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;
11113
+ if (arrA && arrB) {
11114
+ length = a.length;
11115
+ if (length != b.length)
11116
+ return false;
11117
+ for (i = length; i-- !== 0;)
11118
+ if (!_areEquals(a[i], b[i]))
11119
+ return false;
11120
+ return true;
11121
+ }
11122
+ if (arrA != arrB)
11123
+ return false;
11124
+ var keys = Object.keys(a);
11125
+ length = keys.length;
11126
+ if (length !== Object.keys(b).length)
11127
+ return false;
11128
+ for (i = length; i-- !== 0;)
11129
+ if (!b.hasOwnProperty(keys[i]))
11130
+ return false;
11131
+ for (i = length; i-- !== 0;) {
11132
+ key = keys[i];
11133
+ if (!_areEquals(a[key], b[key]))
11134
+ return false;
11135
+ }
11136
+ return true;
11137
+ }
11138
+ return a !== a && b !== b;
11139
+ }
11140
+
11141
+ var core = /*#__PURE__*/Object.freeze({
11142
+ __proto__: null,
11143
+ JsonPatchError: JsonPatchError,
11144
+ _areEquals: _areEquals,
11145
+ applyOperation: applyOperation,
11146
+ applyPatch: applyPatch,
11147
+ applyReducer: applyReducer,
11148
+ deepClone: deepClone,
11149
+ getValueByPointer: getValueByPointer,
11150
+ validate: validate,
11151
+ validator: validator$1
11152
+ });
11153
+
11154
+ /*!
11155
+ * https://github.com/Starcounter-Jack/JSON-Patch
11156
+ * (c) 2017-2021 Joachim Wester
11157
+ * MIT license
11158
+ */
11159
+ var beforeDict = new WeakMap();
11160
+ var Mirror = /** @class */ (function () {
11161
+ function Mirror(obj) {
11162
+ this.observers = new Map();
11163
+ this.obj = obj;
11164
+ }
11165
+ return Mirror;
11166
+ }());
11167
+ var ObserverInfo = /** @class */ (function () {
11168
+ function ObserverInfo(callback, observer) {
11169
+ this.callback = callback;
11170
+ this.observer = observer;
11171
+ }
11172
+ return ObserverInfo;
11173
+ }());
11174
+ function getMirror(obj) {
11175
+ return beforeDict.get(obj);
11176
+ }
11177
+ function getObserverFromMirror(mirror, callback) {
11178
+ return mirror.observers.get(callback);
11179
+ }
11180
+ function removeObserverFromMirror(mirror, observer) {
11181
+ mirror.observers.delete(observer.callback);
11182
+ }
11183
+ /**
11184
+ * Detach an observer from an object
11185
+ */
11186
+ function unobserve(root, observer) {
11187
+ observer.unobserve();
11188
+ }
11189
+ /**
11190
+ * Observes changes made to an object, which can then be retrieved using generate
11191
+ */
11192
+ function observe(obj, callback) {
11193
+ var patches = [];
11194
+ var observer;
11195
+ var mirror = getMirror(obj);
11196
+ if (!mirror) {
11197
+ mirror = new Mirror(obj);
11198
+ beforeDict.set(obj, mirror);
11199
+ }
11200
+ else {
11201
+ var observerInfo = getObserverFromMirror(mirror, callback);
11202
+ observer = observerInfo && observerInfo.observer;
11203
+ }
11204
+ if (observer) {
11205
+ return observer;
11206
+ }
11207
+ observer = {};
11208
+ mirror.value = _deepClone(obj);
11209
+ if (callback) {
11210
+ observer.callback = callback;
11211
+ observer.next = null;
11212
+ var dirtyCheck = function () {
11213
+ generate(observer);
11214
+ };
11215
+ var fastCheck = function () {
11216
+ clearTimeout(observer.next);
11217
+ observer.next = setTimeout(dirtyCheck);
11218
+ };
11219
+ if (typeof window !== 'undefined') { //not Node
11220
+ window.addEventListener('mouseup', fastCheck);
11221
+ window.addEventListener('keyup', fastCheck);
11222
+ window.addEventListener('mousedown', fastCheck);
11223
+ window.addEventListener('keydown', fastCheck);
11224
+ window.addEventListener('change', fastCheck);
11225
+ }
11226
+ }
11227
+ observer.patches = patches;
11228
+ observer.object = obj;
11229
+ observer.unobserve = function () {
11230
+ generate(observer);
11231
+ clearTimeout(observer.next);
11232
+ removeObserverFromMirror(mirror, observer);
11233
+ if (typeof window !== 'undefined') {
11234
+ window.removeEventListener('mouseup', fastCheck);
11235
+ window.removeEventListener('keyup', fastCheck);
11236
+ window.removeEventListener('mousedown', fastCheck);
11237
+ window.removeEventListener('keydown', fastCheck);
11238
+ window.removeEventListener('change', fastCheck);
11239
+ }
11240
+ };
11241
+ mirror.observers.set(callback, new ObserverInfo(callback, observer));
11242
+ return observer;
11243
+ }
11244
+ /**
11245
+ * Generate an array of patches from an observer
11246
+ */
11247
+ function generate(observer, invertible) {
11248
+ if (invertible === void 0) { invertible = false; }
11249
+ var mirror = beforeDict.get(observer.object);
11250
+ _generate(mirror.value, observer.object, observer.patches, "", invertible);
11251
+ if (observer.patches.length) {
11252
+ applyPatch(mirror.value, observer.patches);
11253
+ }
11254
+ var temp = observer.patches;
11255
+ if (temp.length > 0) {
11256
+ observer.patches = [];
11257
+ if (observer.callback) {
11258
+ observer.callback(temp);
11259
+ }
11260
+ }
11261
+ return temp;
11262
+ }
11263
+ // Dirty check if obj is different from mirror, generate patches and update mirror
11264
+ function _generate(mirror, obj, patches, path, invertible) {
11265
+ if (obj === mirror) {
11266
+ return;
11267
+ }
11268
+ if (typeof obj.toJSON === "function") {
11269
+ obj = obj.toJSON();
11270
+ }
11271
+ var newKeys = _objectKeys(obj);
11272
+ var oldKeys = _objectKeys(mirror);
11273
+ var deleted = false;
11274
+ //if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)"
11275
+ for (var t = oldKeys.length - 1; t >= 0; t--) {
11276
+ var key = oldKeys[t];
11277
+ var oldVal = mirror[key];
11278
+ if (hasOwnProperty$b(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) {
11279
+ var newVal = obj[key];
11280
+ if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null && Array.isArray(oldVal) === Array.isArray(newVal)) {
11281
+ _generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key), invertible);
11282
+ }
11283
+ else {
11284
+ if (oldVal !== newVal) {
11285
+ if (invertible) {
11286
+ patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) });
11287
+ }
11288
+ patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), value: _deepClone(newVal) });
11289
+ }
11290
+ }
11291
+ }
11292
+ else if (Array.isArray(mirror) === Array.isArray(obj)) {
11293
+ if (invertible) {
11294
+ patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) });
11295
+ }
11296
+ patches.push({ op: "remove", path: path + "/" + escapePathComponent(key) });
11297
+ deleted = true; // property has been deleted
11298
+ }
11299
+ else {
11300
+ if (invertible) {
11301
+ patches.push({ op: "test", path: path, value: mirror });
11302
+ }
11303
+ patches.push({ op: "replace", path: path, value: obj });
11304
+ }
11305
+ }
11306
+ if (!deleted && newKeys.length == oldKeys.length) {
11307
+ return;
11308
+ }
11309
+ for (var t = 0; t < newKeys.length; t++) {
11310
+ var key = newKeys[t];
11311
+ if (!hasOwnProperty$b(mirror, key) && obj[key] !== undefined) {
11312
+ patches.push({ op: "add", path: path + "/" + escapePathComponent(key), value: _deepClone(obj[key]) });
11313
+ }
11314
+ }
11315
+ }
11316
+ /**
11317
+ * Create an array of patches from the differences in two objects
11318
+ */
11319
+ function compare(tree1, tree2, invertible) {
11320
+ if (invertible === void 0) { invertible = false; }
11321
+ var patches = [];
11322
+ _generate(tree1, tree2, patches, '', invertible);
11323
+ return patches;
11324
+ }
11325
+
11326
+ var duplex = /*#__PURE__*/Object.freeze({
11327
+ __proto__: null,
11328
+ compare: compare,
11329
+ generate: generate,
11330
+ observe: observe,
11331
+ unobserve: unobserve
11332
+ });
11333
+
11334
+ Object.assign({}, core, duplex, {
11335
+ JsonPatchError: PatchError,
11336
+ deepClone: _deepClone,
11337
+ escapePathComponent,
11338
+ unescapePathComponent
11339
+ });
9860
11340
 
9861
11341
  toast.configure({
9862
11342
  autoClose: 3000,
@@ -9956,10 +11436,11 @@ function getRandomColor(email) {
9956
11436
  }
9957
11437
  return colors$1[sum % colors$1.length];
9958
11438
  }
9959
- var getAlphabetIcon = function (str, intialAlphabetClassName) {
11439
+ var getAlphabetIcon = function (str, rootClassName) {
11440
+ if (rootClassName === void 0) { rootClassName = ""; }
9960
11441
  if (!str)
9961
11442
  return null;
9962
- return (jsxRuntime.jsx("span", __assign({ className: "".concat(intialAlphabetClassName ? intialAlphabetClassName : "", " alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8"), style: { backgroundColor: getRandomColor(str) } }, { children: str[0] })));
11443
+ return (jsxRuntime.jsx("span", __assign({ className: "".concat(rootClassName, " alphabet-icon__initial fs-13 icon-dim-20 flex cn-0 mr-8"), style: { backgroundColor: getRandomColor(str) } }, { children: str[0] })));
9963
11444
  };
9964
11445
  var getEmptyArrayOfLength = function (length) {
9965
11446
  return Array.from({ length: length });
@@ -10085,22 +11566,6 @@ function useForm(stateSchema, validationSchema, callback) {
10085
11566
  };
10086
11567
  return { state: state, disable: disable, handleOnChange: handleOnChange, handleOnSubmit: handleOnSubmit };
10087
11568
  }
10088
- function handleError(error) {
10089
- if (!error) {
10090
- return [];
10091
- }
10092
- if (!Array.isArray(error)) {
10093
- return [error];
10094
- }
10095
- return error;
10096
- }
10097
- function CustomInput(_a) {
10098
- var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onBlur, onBlur = _b === void 0 ? function (e) { } : _b, _c = _a.onFocus, onFocus = _c === void 0 ? function (e) { } : _c, label = _a.label, _d = _a.type, type = _d === void 0 ? 'text' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e; _a.autoComplete; var _g = _a.labelClassName, labelClassName = _g === void 0 ? '' : _g, _h = _a.placeholder, placeholder = _h === void 0 ? '' : _h, _j = _a.tabIndex, tabIndex = _j === void 0 ? 1 : _j, _k = _a.dataTestid, dataTestid = _k === void 0 ? '' : _k;
10099
- return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top" }, { children: [jsxRuntime.jsx("label", __assign({ className: "form__label ".concat(labelClassName) }, { children: label })), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: "off", className: "form__input", onChange: function (e) {
10100
- e.persist();
10101
- onChange(e);
10102
- }, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex }), handleError(error).map(function (err) { return (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), err] }), err)); })] })));
10103
- }
10104
11569
  function handleUTCTime(ts, isRelativeTime) {
10105
11570
  if (isRelativeTime === void 0) { isRelativeTime = false; }
10106
11571
  var timestamp = '';
@@ -10270,7 +11735,79 @@ var getUrlWithSearchParams = function (url, params) {
10270
11735
  /**
10271
11736
  * Custom exception logger function for logging errors to sentry
10272
11737
  */
10273
- var logExceptionToSentry = captureException.bind(window);
11738
+ var logExceptionToSentry = captureException.bind(window);
11739
+ var customStyles = {
11740
+ control: function (base, state) { return (__assign(__assign({}, base), { minHeight: '32px', boxShadow: 'none', border: 'none', cursor: 'pointer', background: 'transparent' })); },
11741
+ indicatorSeparator: function (base, state) { return (__assign(__assign({}, base), { width: 0 })); },
11742
+ valueContainer: function (base, state) { return (__assign(__assign({}, base), { padding: '0', fontSize: '13px', fontWeight: '600' })); },
11743
+ dropdownIndicator: function (base, state) { return (__assign(__assign({}, base), { color: 'var(--N400)', padding: '0 8px', transition: 'all .2s ease', transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' })); },
11744
+ };
11745
+ var getFilteredChartVersions = function (charts, selectedChartType) {
11746
+ // Filter chart versions based on selected chart type
11747
+ return charts
11748
+ .filter(function (item) { return (item === null || item === void 0 ? void 0 : item.chartType) === selectedChartType.value; })
11749
+ .map(function (item) { return ({
11750
+ value: item === null || item === void 0 ? void 0 : item.chartVersion,
11751
+ label: item === null || item === void 0 ? void 0 : item.chartVersion,
11752
+ chartRefId: item.chartRefId,
11753
+ }); });
11754
+ };
11755
+ function removeEmptyObjectKeysAndNullValues(obj) {
11756
+ //it recursively removes empty object keys and array values that are null
11757
+ for (var key in obj) {
11758
+ if (Array.isArray(obj[key]))
11759
+ obj[key] = obj[key].filter(function (item) { return item !== null; });
11760
+ if (obj[key].length === 0) {
11761
+ // Check if the array is empty
11762
+ delete obj[key]; // Delete the key if the array is empty
11763
+ }
11764
+ else if (obj[key] && typeof obj[key] === 'object') {
11765
+ if (removeEmptyObjectKeysAndNullValues(obj[key])) {
11766
+ delete obj[key];
11767
+ }
11768
+ }
11769
+ else if (obj[key] === null || obj[key] === undefined) {
11770
+ delete obj[key];
11771
+ }
11772
+ }
11773
+ return Object.keys(obj).length === 0;
11774
+ }
11775
+ function getUnlockedJSON(json, jsonPathArray) {
11776
+ var jsonCopy = JSON.parse(JSON.stringify(json));
11777
+ var patches = jsonPathArray.flatMap(function (jsonPath) {
11778
+ var pathsToRemove = JSONPath({ path: jsonPath, json: jsonCopy, resultType: 'all' });
11779
+ return pathsToRemove.map(function (result) {
11780
+ return Array.isArray(result.parent)
11781
+ ? { op: 'replace', path: result.pointer, value: null }
11782
+ : { op: 'remove', path: result.pointer };
11783
+ });
11784
+ });
11785
+ var newDocument = applyPatch(jsonCopy, patches).newDocument;
11786
+ removeEmptyObjectKeysAndNullValues(newDocument);
11787
+ return newDocument;
11788
+ }
11789
+ function getLockedJSON(json, jsonPathArray) {
11790
+ var jsonCopy = JSON.parse(JSON.stringify(json));
11791
+ var resultJson = {};
11792
+ jsonPathArray.forEach(function (jsonPath) {
11793
+ var elements = JSONPath({ path: jsonPath, json: jsonCopy, resultType: 'all' });
11794
+ elements.forEach(function (element) {
11795
+ var pathArray = JSONPath.toPathArray(element.path);
11796
+ var lastPath = pathArray.pop();
11797
+ var current = resultJson;
11798
+ for (var i = 0; i < pathArray.length; i++) {
11799
+ var key_1 = isNaN(Number(pathArray[i])) ? pathArray[i] : parseInt(pathArray[i]);
11800
+ if (!current[key_1]) {
11801
+ current[key_1] = isNaN(Number(pathArray[i + 1])) ? {} : [];
11802
+ }
11803
+ current = current[key_1];
11804
+ }
11805
+ var key = isNaN(Number(lastPath)) ? lastPath : parseInt(lastPath);
11806
+ current[key] = element.value;
11807
+ });
11808
+ });
11809
+ return resultJson['$'];
11810
+ }
10274
11811
 
10275
11812
  function Progressing(_a) {
10276
11813
  var pageLoader = _a.pageLoader, size = _a.size, theme = _a.theme, styles = _a.styles, fillColor = _a.fillColor;
@@ -10283,7 +11820,7 @@ function DetailsProgressing(_a) {
10283
11820
  }
10284
11821
 
10285
11822
  var VisibleModal = /** @class */ (function (_super) {
10286
- __extends(VisibleModal, _super);
11823
+ __extends$1(VisibleModal, _super);
10287
11824
  function VisibleModal(props) {
10288
11825
  var _this = _super.call(this, props) || this;
10289
11826
  _this.modalRef = document.getElementById('visible-modal');
@@ -10398,9 +11935,9 @@ var Modal = function (_a) {
10398
11935
  };
10399
11936
 
10400
11937
  var _path$c;
10401
- function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
11938
+ function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
10402
11939
  var SvgIcCross = function SvgIcCross(props) {
10403
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
11940
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
10404
11941
  width: "1em",
10405
11942
  height: "1em",
10406
11943
  viewBox: "0 0 24 24",
@@ -10414,7 +11951,7 @@ var SvgIcCross = function SvgIcCross(props) {
10414
11951
  var close = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19.2803%205.78033C19.5732%205.48744%2019.5732%205.01256%2019.2803%204.71967C18.9874%204.42678%2018.5126%204.42678%2018.2197%204.71967L19.2803%205.78033ZM4.71967%2018.2197C4.42678%2018.5126%204.42678%2018.9874%204.71967%2019.2803C5.01256%2019.5732%205.48744%2019.5732%205.78033%2019.2803L4.71967%2018.2197ZM18.2197%2019.2803C18.5126%2019.5732%2018.9874%2019.5732%2019.2803%2019.2803C19.5732%2018.9874%2019.5732%2018.5126%2019.2803%2018.2197L18.2197%2019.2803ZM5.78033%204.71967C5.48744%204.42678%205.01256%204.42678%204.71967%204.71967C4.42678%205.01256%204.42678%205.48744%204.71967%205.78033L5.78033%204.71967ZM18.2197%204.71967L11.4697%2011.4697L12.5303%2012.5303L19.2803%205.78033L18.2197%204.71967ZM11.4697%2011.4697L4.71967%2018.2197L5.78033%2019.2803L12.5303%2012.5303L11.4697%2011.4697ZM19.2803%2018.2197L12.5303%2011.4697L11.4697%2012.5303L18.2197%2019.2803L19.2803%2018.2197ZM12.5303%2011.4697L5.78033%204.71967L4.71967%205.78033L11.4697%2012.5303L12.5303%2011.4697Z%22%20fill%3D%22%23596168%22%2F%3E%3C%2Fsvg%3E";
10415
11952
 
10416
11953
  var OpaqueModal = /** @class */ (function (_super) {
10417
- __extends(OpaqueModal, _super);
11954
+ __extends$1(OpaqueModal, _super);
10418
11955
  function OpaqueModal() {
10419
11956
  var _this = _super !== null && _super.apply(this, arguments) || this;
10420
11957
  _this.modalRef = document.getElementById('full-screen-modal');
@@ -10438,7 +11975,7 @@ var OpaqueModal = /** @class */ (function (_super) {
10438
11975
  }(React.Component));
10439
11976
 
10440
11977
  var VisibleModal2 = /** @class */ (function (_super) {
10441
- __extends(VisibleModal2, _super);
11978
+ __extends$1(VisibleModal2, _super);
10442
11979
  function VisibleModal2(props) {
10443
11980
  var _this = _super.call(this, props) || this;
10444
11981
  _this.modalRef = document.getElementById('visible-modal-2');
@@ -10549,7 +12086,7 @@ var BreadCrumb = function (_a) {
10549
12086
 
10550
12087
  var RadioGroupContext = React.createContext({ name: '', value: '', disabled: false, onChange: function (event) { } });
10551
12088
  var RadioGroupItem = /** @class */ (function (_super) {
10552
- __extends(RadioGroupItem, _super);
12089
+ __extends$1(RadioGroupItem, _super);
10553
12090
  function RadioGroupItem() {
10554
12091
  return _super !== null && _super.apply(this, arguments) || this;
10555
12092
  }
@@ -10562,7 +12099,7 @@ var RadioGroupItem = /** @class */ (function (_super) {
10562
12099
  return RadioGroupItem;
10563
12100
  }(React.Component));
10564
12101
  var RadioGroup$1 = /** @class */ (function (_super) {
10565
- __extends(RadioGroup, _super);
12102
+ __extends$1(RadioGroup, _super);
10566
12103
  function RadioGroup() {
10567
12104
  return _super !== null && _super.apply(this, arguments) || this;
10568
12105
  }
@@ -14706,9 +16243,9 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
14706
16243
  var Tippy = index;
14707
16244
 
14708
16245
  var _path$b;
14709
- function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
16246
+ function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
14710
16247
  var SvgIcHelp = function SvgIcHelp(props) {
14711
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
16248
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
14712
16249
  xmlns: "http://www.w3.org/2000/svg",
14713
16250
  width: "1em",
14714
16251
  height: "1em",
@@ -14721,9 +16258,9 @@ var SvgIcHelp = function SvgIcHelp(props) {
14721
16258
  };
14722
16259
 
14723
16260
  var _path$a;
14724
- function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
16261
+ function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
14725
16262
  var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
14726
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
16263
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
14727
16264
  xmlns: "http://www.w3.org/2000/svg",
14728
16265
  viewBox: "0 0 17 16",
14729
16266
  width: "1em",
@@ -14781,9 +16318,9 @@ function TippyCustomized(props) {
14781
16318
  }
14782
16319
 
14783
16320
  var _path$9, _circle, _path2$1;
14784
- function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
16321
+ function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
14785
16322
  var SvgInjectTag = function SvgInjectTag(props) {
14786
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
16323
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
14787
16324
  width: "1em",
14788
16325
  height: "1em",
14789
16326
  viewBox: "0 0 20 20",
@@ -14818,9 +16355,9 @@ function PropagateTagInfo(_a) {
14818
16355
  }
14819
16356
 
14820
16357
  var _path$8;
14821
- function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
16358
+ function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
14822
16359
  var SvgIcInfoOutlined = function SvgIcInfoOutlined(props) {
14823
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
16360
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
14824
16361
  xmlns: "http://www.w3.org/2000/svg",
14825
16362
  width: "1em",
14826
16363
  height: "1em",
@@ -15060,9 +16597,9 @@ var TagDetails = function (_a) {
15060
16597
  };
15061
16598
 
15062
16599
  var _path$7;
15063
- function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
16600
+ function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
15064
16601
  var SvgIcAdd = function SvgIcAdd(props) {
15065
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
16602
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
15066
16603
  xmlns: "http://www.w3.org/2000/svg",
15067
16604
  width: "1em",
15068
16605
  height: "1em",
@@ -15143,7 +16680,7 @@ DeleteDialog.Description = DeleteDialogDescription;
15143
16680
  //TODO: may not need context
15144
16681
  var DialogFormContext = React.createContext({ title: '', isLoading: false, close: function (event) { }, onSave: function (event) { } });
15145
16682
  var DialogForm = /** @class */ (function (_super) {
15146
- __extends(DialogForm, _super);
16683
+ __extends$1(DialogForm, _super);
15147
16684
  function DialogForm(props) {
15148
16685
  var _this = _super.call(this, props) || this;
15149
16686
  _this.escFunction = _this.escFunction.bind(_this);
@@ -15179,7 +16716,7 @@ var DialogForm = /** @class */ (function (_super) {
15179
16716
  return DialogForm;
15180
16717
  }(React.Component));
15181
16718
  var DialogFormSubmit = /** @class */ (function (_super) {
15182
- __extends(DialogFormSubmit, _super);
16719
+ __extends$1(DialogFormSubmit, _super);
15183
16720
  function DialogFormSubmit() {
15184
16721
  return _super !== null && _super.apply(this, arguments) || this;
15185
16722
  }
@@ -15197,8 +16734,8 @@ function ForceDeleteDialog(_a) {
15197
16734
  return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx(DeleteDialog, __assign({ title: forceDeleteDialogTitle, delete: onClickDelete, closeDelete: closeDeleteModal, deletePrefix: "Force " }, { children: jsxRuntime.jsxs(DeleteDialog.Description, { children: [jsxRuntime.jsxs("p", __assign({ className: "mt-12 mb-12 p-8 dc__break-word dc__window-bg" }, { children: ["Error: ", forceDeleteDialogMessage] })), jsxRuntime.jsx("p", { children: "Do you want to force delete?" })] }) })) }));
15198
16735
  }
15199
16736
 
15200
- function _extends$d() {
15201
- _extends$d = Object.assign ? Object.assign.bind() : function (target) {
16737
+ function _extends$e() {
16738
+ _extends$e = Object.assign ? Object.assign.bind() : function (target) {
15202
16739
  for (var i = 1; i < arguments.length; i++) {
15203
16740
  var source = arguments[i];
15204
16741
  for (var key in source) {
@@ -15209,7 +16746,7 @@ function _extends$d() {
15209
16746
  }
15210
16747
  return target;
15211
16748
  };
15212
- return _extends$d.apply(this, arguments);
16749
+ return _extends$e.apply(this, arguments);
15213
16750
  }
15214
16751
 
15215
16752
  /*
@@ -18750,7 +20287,7 @@ var Menu = function Menu(props) {
18750
20287
  getStyles = props.getStyles,
18751
20288
  innerRef = props.innerRef,
18752
20289
  innerProps = props.innerProps;
18753
- return jsx("div", _extends$d({
20290
+ return jsx("div", _extends$e({
18754
20291
  css: getStyles('menu', props),
18755
20292
  className: cx({
18756
20293
  menu: true
@@ -18782,7 +20319,7 @@ var MenuList$1 = function MenuList(props) {
18782
20319
  innerProps = props.innerProps,
18783
20320
  innerRef = props.innerRef,
18784
20321
  isMulti = props.isMulti;
18785
- return jsx("div", _extends$d({
20322
+ return jsx("div", _extends$e({
18786
20323
  css: getStyles('menuList', props),
18787
20324
  className: cx({
18788
20325
  'menu-list': true,
@@ -18813,7 +20350,7 @@ var NoOptionsMessage = function NoOptionsMessage(props) {
18813
20350
  cx = props.cx,
18814
20351
  getStyles = props.getStyles,
18815
20352
  innerProps = props.innerProps;
18816
- return jsx("div", _extends$d({
20353
+ return jsx("div", _extends$e({
18817
20354
  css: getStyles('noOptionsMessage', props),
18818
20355
  className: cx({
18819
20356
  'menu-notice': true,
@@ -18830,7 +20367,7 @@ var LoadingMessage = function LoadingMessage(props) {
18830
20367
  cx = props.cx,
18831
20368
  getStyles = props.getStyles,
18832
20369
  innerProps = props.innerProps;
18833
- return jsx("div", _extends$d({
20370
+ return jsx("div", _extends$e({
18834
20371
  css: getStyles('loadingMessage', props),
18835
20372
  className: cx({
18836
20373
  'menu-notice': true,
@@ -18918,7 +20455,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
18918
20455
  rect: rect
18919
20456
  }; // same wrapper element whether fixed or portalled
18920
20457
 
18921
- var menuWrapper = jsx("div", _extends$d({
20458
+ var menuWrapper = jsx("div", _extends$e({
18922
20459
  css: getStyles('menuPortal', state),
18923
20460
  className: cx({
18924
20461
  'menu-portal': true
@@ -18954,7 +20491,7 @@ var SelectContainer = function SelectContainer(props) {
18954
20491
  innerProps = props.innerProps,
18955
20492
  isDisabled = props.isDisabled,
18956
20493
  isRtl = props.isRtl;
18957
- return jsx("div", _extends$d({
20494
+ return jsx("div", _extends$e({
18958
20495
  css: getStyles('container', props),
18959
20496
  className: cx({
18960
20497
  '--is-disabled': isDisabled,
@@ -18989,7 +20526,7 @@ var ValueContainer = function ValueContainer(props) {
18989
20526
  isMulti = props.isMulti,
18990
20527
  getStyles = props.getStyles,
18991
20528
  hasValue = props.hasValue;
18992
- return jsx("div", _extends$d({
20529
+ return jsx("div", _extends$e({
18993
20530
  css: getStyles('valueContainer', props),
18994
20531
  className: cx({
18995
20532
  'value-container': true,
@@ -19015,7 +20552,7 @@ var IndicatorsContainer = function IndicatorsContainer(props) {
19015
20552
  cx = props.cx,
19016
20553
  innerProps = props.innerProps,
19017
20554
  getStyles = props.getStyles;
19018
- return jsx("div", _extends$d({
20555
+ return jsx("div", _extends$e({
19019
20556
  css: getStyles('indicatorsContainer', props),
19020
20557
  className: cx({
19021
20558
  indicators: true
@@ -19046,7 +20583,7 @@ var Svg = function Svg(_ref) {
19046
20583
  var size = _ref.size,
19047
20584
  props = _objectWithoutProperties(_ref, _excluded$2);
19048
20585
 
19049
- return jsx("svg", _extends$d({
20586
+ return jsx("svg", _extends$e({
19050
20587
  height: size,
19051
20588
  width: size,
19052
20589
  viewBox: "0 0 20 20",
@@ -19057,14 +20594,14 @@ var Svg = function Svg(_ref) {
19057
20594
  };
19058
20595
 
19059
20596
  var CrossIcon = function CrossIcon(props) {
19060
- return jsx(Svg, _extends$d({
20597
+ return jsx(Svg, _extends$e({
19061
20598
  size: 20
19062
20599
  }, props), jsx("path", {
19063
20600
  d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
19064
20601
  }));
19065
20602
  };
19066
20603
  var DownChevron = function DownChevron(props) {
19067
- return jsx(Svg, _extends$d({
20604
+ return jsx(Svg, _extends$e({
19068
20605
  size: 20
19069
20606
  }, props), jsx("path", {
19070
20607
  d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
@@ -19097,7 +20634,7 @@ var DropdownIndicator$1 = function DropdownIndicator(props) {
19097
20634
  cx = props.cx,
19098
20635
  getStyles = props.getStyles,
19099
20636
  innerProps = props.innerProps;
19100
- return jsx("div", _extends$d({
20637
+ return jsx("div", _extends$e({
19101
20638
  css: getStyles('dropdownIndicator', props),
19102
20639
  className: cx({
19103
20640
  indicator: true,
@@ -19112,7 +20649,7 @@ var ClearIndicator$1 = function ClearIndicator(props) {
19112
20649
  cx = props.cx,
19113
20650
  getStyles = props.getStyles,
19114
20651
  innerProps = props.innerProps;
19115
- return jsx("div", _extends$d({
20652
+ return jsx("div", _extends$e({
19116
20653
  css: getStyles('clearIndicator', props),
19117
20654
  className: cx({
19118
20655
  indicator: true,
@@ -19142,7 +20679,7 @@ var IndicatorSeparator = function IndicatorSeparator(props) {
19142
20679
  cx = props.cx,
19143
20680
  getStyles = props.getStyles,
19144
20681
  innerProps = props.innerProps;
19145
- return jsx("span", _extends$d({}, innerProps, {
20682
+ return jsx("span", _extends$e({}, innerProps, {
19146
20683
  css: getStyles('indicatorSeparator', props),
19147
20684
  className: cx({
19148
20685
  'indicator-separator': true
@@ -19197,7 +20734,7 @@ var LoadingIndicator = function LoadingIndicator(props) {
19197
20734
  getStyles = props.getStyles,
19198
20735
  innerProps = props.innerProps,
19199
20736
  isRtl = props.isRtl;
19200
- return jsx("div", _extends$d({
20737
+ return jsx("div", _extends$e({
19201
20738
  css: getStyles('loadingIndicator', props),
19202
20739
  className: cx({
19203
20740
  indicator: true,
@@ -19258,7 +20795,7 @@ var Control = function Control(props) {
19258
20795
  innerRef = props.innerRef,
19259
20796
  innerProps = props.innerProps,
19260
20797
  menuIsOpen = props.menuIsOpen;
19261
- return jsx("div", _extends$d({
20798
+ return jsx("div", _extends$e({
19262
20799
  ref: innerRef,
19263
20800
  css: getStyles('control', props),
19264
20801
  className: cx({
@@ -19290,12 +20827,12 @@ var Group = function Group(props) {
19290
20827
  label = props.label,
19291
20828
  theme = props.theme,
19292
20829
  selectProps = props.selectProps;
19293
- return jsx("div", _extends$d({
20830
+ return jsx("div", _extends$e({
19294
20831
  css: getStyles('group', props),
19295
20832
  className: cx({
19296
20833
  group: true
19297
20834
  }, className)
19298
- }, innerProps), jsx(Heading, _extends$d({}, headingProps, {
20835
+ }, innerProps), jsx(Heading, _extends$e({}, headingProps, {
19299
20836
  selectProps: selectProps,
19300
20837
  theme: theme,
19301
20838
  getStyles: getStyles,
@@ -19327,7 +20864,7 @@ var GroupHeading = function GroupHeading(props) {
19327
20864
  _cleanCommonProps.data;
19328
20865
  var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
19329
20866
 
19330
- return jsx("div", _extends$d({
20867
+ return jsx("div", _extends$e({
19331
20868
  css: getStyles('groupHeading', props),
19332
20869
  className: cx({
19333
20870
  'group-heading': true
@@ -19403,7 +20940,7 @@ var Input = function Input(props) {
19403
20940
  }, className),
19404
20941
  css: getStyles('input', props),
19405
20942
  "data-value": value || ''
19406
- }, jsx("input", _extends$d({
20943
+ }, jsx("input", _extends$e({
19407
20944
  className: cx({
19408
20945
  input: true
19409
20946
  }, inputClassName),
@@ -19473,7 +21010,7 @@ var MultiValueLabel = MultiValueGeneric;
19473
21010
  function MultiValueRemove$1(_ref5) {
19474
21011
  var children = _ref5.children,
19475
21012
  innerProps = _ref5.innerProps;
19476
- return jsx("div", _extends$d({
21013
+ return jsx("div", _extends$e({
19477
21014
  role: "button"
19478
21015
  }, innerProps), children || jsx(CrossIcon, {
19479
21016
  size: 14
@@ -19562,7 +21099,7 @@ var Option$1 = function Option(props) {
19562
21099
  isSelected = props.isSelected,
19563
21100
  innerRef = props.innerRef,
19564
21101
  innerProps = props.innerProps;
19565
- return jsx("div", _extends$d({
21102
+ return jsx("div", _extends$e({
19566
21103
  css: getStyles('option', props),
19567
21104
  className: cx({
19568
21105
  option: true,
@@ -19594,7 +21131,7 @@ var Placeholder = function Placeholder(props) {
19594
21131
  cx = props.cx,
19595
21132
  getStyles = props.getStyles,
19596
21133
  innerProps = props.innerProps;
19597
- return jsx("div", _extends$d({
21134
+ return jsx("div", _extends$e({
19598
21135
  css: getStyles('placeholder', props),
19599
21136
  className: cx({
19600
21137
  placeholder: true
@@ -19627,7 +21164,7 @@ var SingleValue = function SingleValue(props) {
19627
21164
  getStyles = props.getStyles,
19628
21165
  isDisabled = props.isDisabled,
19629
21166
  innerProps = props.innerProps;
19630
- return jsx("div", _extends$d({
21167
+ return jsx("div", _extends$e({
19631
21168
  css: getStyles('singleValue', props),
19632
21169
  className: cx({
19633
21170
  'single-value': true,
@@ -19875,7 +21412,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
19875
21412
  };
19876
21413
 
19877
21414
  var A11yText = function A11yText(props) {
19878
- return jsx("span", _extends$d({
21415
+ return jsx("span", _extends$e({
19879
21416
  css: _ref
19880
21417
  }, props));
19881
21418
  };
@@ -20411,7 +21948,7 @@ function DummyInput(_ref) {
20411
21948
  var innerRef = _ref.innerRef,
20412
21949
  props = _objectWithoutProperties(_ref, _excluded);
20413
21950
 
20414
- return jsx("input", _extends$d({
21951
+ return jsx("input", _extends$e({
20415
21952
  ref: innerRef
20416
21953
  }, props, {
20417
21954
  css: /*#__PURE__*/css$2({
@@ -22046,7 +23583,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22046
23583
 
22047
23584
  if (!isSearchable) {
22048
23585
  // use a dummy input to maintain focus/blur functionality
22049
- return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$d({
23586
+ return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends$e({
22050
23587
  id: id,
22051
23588
  innerRef: this.getInputRef,
22052
23589
  onBlur: this.onInputBlur,
@@ -22060,7 +23597,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22060
23597
  }, ariaAttributes));
22061
23598
  }
22062
23599
 
22063
- return /*#__PURE__*/React__namespace.createElement(Input, _extends$d({}, commonProps, {
23600
+ return /*#__PURE__*/React__namespace.createElement(Input, _extends$e({}, commonProps, {
22064
23601
  autoCapitalize: "none",
22065
23602
  autoComplete: "off",
22066
23603
  autoCorrect: "off",
@@ -22104,7 +23641,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22104
23641
  isFocused = _this$state5.isFocused;
22105
23642
 
22106
23643
  if (!this.hasValue() || !controlShouldRenderValue) {
22107
- return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$d({}, commonProps, {
23644
+ return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends$e({}, commonProps, {
22108
23645
  key: "placeholder",
22109
23646
  isDisabled: isDisabled,
22110
23647
  isFocused: isFocused,
@@ -22118,7 +23655,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22118
23655
  return selectValue.map(function (opt, index) {
22119
23656
  var isOptionFocused = opt === focusedValue;
22120
23657
  var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
22121
- return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$d({}, commonProps, {
23658
+ return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends$e({}, commonProps, {
22122
23659
  components: {
22123
23660
  Container: MultiValueContainer,
22124
23661
  Label: MultiValueLabel,
@@ -22150,7 +23687,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22150
23687
  }
22151
23688
 
22152
23689
  var singleValue = selectValue[0];
22153
- return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$d({}, commonProps, {
23690
+ return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends$e({}, commonProps, {
22154
23691
  data: singleValue,
22155
23692
  isDisabled: isDisabled
22156
23693
  }), this.formatOptionLabel(singleValue, 'value'));
@@ -22176,7 +23713,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22176
23713
  onTouchEnd: this.onClearIndicatorTouchEnd,
22177
23714
  'aria-hidden': 'true'
22178
23715
  };
22179
- return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$d({}, commonProps, {
23716
+ return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends$e({}, commonProps, {
22180
23717
  innerProps: innerProps,
22181
23718
  isFocused: isFocused
22182
23719
  }));
@@ -22196,7 +23733,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22196
23733
  var innerProps = {
22197
23734
  'aria-hidden': 'true'
22198
23735
  };
22199
- return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$d({}, commonProps, {
23736
+ return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends$e({}, commonProps, {
22200
23737
  innerProps: innerProps,
22201
23738
  isDisabled: isDisabled,
22202
23739
  isFocused: isFocused
@@ -22214,7 +23751,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22214
23751
  var commonProps = this.commonProps;
22215
23752
  var isDisabled = this.props.isDisabled;
22216
23753
  var isFocused = this.state.isFocused;
22217
- return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$d({}, commonProps, {
23754
+ return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends$e({}, commonProps, {
22218
23755
  isDisabled: isDisabled,
22219
23756
  isFocused: isFocused
22220
23757
  }));
@@ -22234,7 +23771,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22234
23771
  onTouchEnd: this.onDropdownIndicatorTouchEnd,
22235
23772
  'aria-hidden': 'true'
22236
23773
  };
22237
- return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$d({}, commonProps, {
23774
+ return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends$e({}, commonProps, {
22238
23775
  innerProps: innerProps,
22239
23776
  isDisabled: isDisabled,
22240
23777
  isFocused: isFocused
@@ -22297,7 +23834,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22297
23834
  onMouseOver: onHover,
22298
23835
  tabIndex: -1
22299
23836
  };
22300
- return /*#__PURE__*/React__namespace.createElement(Option, _extends$d({}, commonProps, {
23837
+ return /*#__PURE__*/React__namespace.createElement(Option, _extends$e({}, commonProps, {
22301
23838
  innerProps: innerProps,
22302
23839
  data: data,
22303
23840
  isDisabled: isDisabled,
@@ -22321,7 +23858,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22321
23858
  groupIndex = item.index;
22322
23859
  var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
22323
23860
  var headingId = "".concat(groupId, "-heading");
22324
- return /*#__PURE__*/React__namespace.createElement(Group, _extends$d({}, commonProps, {
23861
+ return /*#__PURE__*/React__namespace.createElement(Group, _extends$e({}, commonProps, {
22325
23862
  key: groupId,
22326
23863
  data: _data,
22327
23864
  options: options,
@@ -22360,12 +23897,12 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22360
23897
  menuPosition: menuPosition,
22361
23898
  menuShouldScrollIntoView: menuShouldScrollIntoView
22362
23899
  };
22363
- var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$d({}, commonProps, menuPlacementProps), function (_ref4) {
23900
+ var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends$e({}, commonProps, menuPlacementProps), function (_ref4) {
22364
23901
  var ref = _ref4.ref,
22365
23902
  _ref4$placerProps = _ref4.placerProps,
22366
23903
  placement = _ref4$placerProps.placement,
22367
23904
  maxHeight = _ref4$placerProps.maxHeight;
22368
- return /*#__PURE__*/React__namespace.createElement(Menu, _extends$d({}, commonProps, menuPlacementProps, {
23905
+ return /*#__PURE__*/React__namespace.createElement(Menu, _extends$e({}, commonProps, menuPlacementProps, {
22369
23906
  innerRef: ref,
22370
23907
  innerProps: {
22371
23908
  onMouseDown: _this4.onMenuMouseDown,
@@ -22380,7 +23917,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22380
23917
  onBottomArrive: onMenuScrollToBottom,
22381
23918
  lockEnabled: menuShouldBlockScroll
22382
23919
  }, function (scrollTargetRef) {
22383
- return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$d({}, commonProps, {
23920
+ return /*#__PURE__*/React__namespace.createElement(MenuList, _extends$e({}, commonProps, {
22384
23921
  innerRef: function innerRef(instance) {
22385
23922
  _this4.getMenuListRef(instance);
22386
23923
 
@@ -22395,7 +23932,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22395
23932
  // so we use the same component. the actual portalling logic is forked
22396
23933
  // within the component based on `menuPosition`
22397
23934
 
22398
- return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$d({}, commonProps, {
23935
+ return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends$e({}, commonProps, {
22399
23936
  appendTo: menuPortalTarget,
22400
23937
  controlElement: this.controlRef,
22401
23938
  menuPlacement: menuPlacement,
@@ -22460,7 +23997,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22460
23997
  isFocused = _this$state6.isFocused,
22461
23998
  selectValue = _this$state6.selectValue;
22462
23999
  var focusableOptions = this.getFocusableOptions();
22463
- return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$d({}, commonProps, {
24000
+ return /*#__PURE__*/React__namespace.createElement(LiveRegion, _extends$e({}, commonProps, {
22464
24001
  id: this.getElementId('live-region'),
22465
24002
  ariaSelection: ariaSelection,
22466
24003
  focusedOption: focusedOption,
@@ -22486,7 +24023,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22486
24023
  menuIsOpen = _this$props14.menuIsOpen;
22487
24024
  var isFocused = this.state.isFocused;
22488
24025
  var commonProps = this.commonProps = this.getCommonProps();
22489
- return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$d({}, commonProps, {
24026
+ return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends$e({}, commonProps, {
22490
24027
  className: className,
22491
24028
  innerProps: {
22492
24029
  id: id,
@@ -22494,7 +24031,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22494
24031
  },
22495
24032
  isDisabled: isDisabled,
22496
24033
  isFocused: isFocused
22497
- }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$d({}, commonProps, {
24034
+ }), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends$e({}, commonProps, {
22498
24035
  innerRef: this.getControlRef,
22499
24036
  innerProps: {
22500
24037
  onMouseDown: this.onControlMouseDown,
@@ -22503,9 +24040,9 @@ var Select$1 = /*#__PURE__*/function (_Component) {
22503
24040
  isDisabled: isDisabled,
22504
24041
  isFocused: isFocused,
22505
24042
  menuIsOpen: menuIsOpen
22506
- }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$d({}, commonProps, {
24043
+ }), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends$e({}, commonProps, {
22507
24044
  isDisabled: isDisabled
22508
- }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$d({}, commonProps, {
24045
+ }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends$e({}, commonProps, {
22509
24046
  isDisabled: isDisabled
22510
24047
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
22511
24048
  }
@@ -22578,22 +24115,22 @@ Select$1.defaultProps = defaultProps;
22578
24115
 
22579
24116
  var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
22580
24117
  var baseSelectProps = useStateManager(props);
22581
- return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$d({
24118
+ return /*#__PURE__*/React__namespace.createElement(Select$1, _extends$e({
22582
24119
  ref: ref
22583
24120
  }, baseSelectProps));
22584
24121
  });
22585
24122
 
22586
24123
  var ReactSelect = StateManagedSelect;
22587
24124
 
22588
- var _g$4;
22589
- function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
24125
+ var _g$5;
24126
+ function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
22590
24127
  var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
22591
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
24128
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
22592
24129
  xmlns: "http://www.w3.org/2000/svg",
22593
24130
  viewBox: "0 0 28 28",
22594
24131
  width: "1em",
22595
24132
  height: "1em"
22596
- }, props), _g$4 || (_g$4 = /*#__PURE__*/React__namespace.createElement("g", {
24133
+ }, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
22597
24134
  fill: "none",
22598
24135
  fillRule: "evenodd",
22599
24136
  transform: "translate(2 2)"
@@ -22610,9 +24147,9 @@ var SvgIcAppstatusCancelled = function SvgIcAppstatusCancelled(props) {
22610
24147
  };
22611
24148
 
22612
24149
  var _path$6;
22613
- function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
24150
+ function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
22614
24151
  var SvgIcCheck = function SvgIcCheck(props) {
22615
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
24152
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
22616
24153
  xmlns: "http://www.w3.org/2000/svg",
22617
24154
  width: "1em",
22618
24155
  height: "1em",
@@ -22628,15 +24165,15 @@ var SvgIcCheck = function SvgIcCheck(props) {
22628
24165
  })));
22629
24166
  };
22630
24167
 
22631
- var _g$3;
22632
- function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
24168
+ var _g$4;
24169
+ function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
22633
24170
  var SvgIcErrorMedium = function SvgIcErrorMedium(props) {
22634
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
24171
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
22635
24172
  xmlns: "http://www.w3.org/2000/svg",
22636
24173
  width: "1em",
22637
24174
  height: "1em",
22638
24175
  viewBox: "0 0 20 21"
22639
- }, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
24176
+ }, props), _g$4 || (_g$4 = /*#__PURE__*/React__namespace.createElement("g", {
22640
24177
  fill: "none",
22641
24178
  fillRule: "evenodd"
22642
24179
  }, /*#__PURE__*/React__namespace.createElement("path", {
@@ -22946,6 +24483,9 @@ function createGitCommitUrl(url, revision) {
22946
24483
  }
22947
24484
  }
22948
24485
  return "NA";
24486
+ }
24487
+ function fetchChartTemplateVersions() {
24488
+ return get("".concat(ROUTES.DEPLOYMENT_TEMPLATE_LIST, "?appId=-1&envId=-1"));
22949
24489
  }
22950
24490
 
22951
24491
  /*
@@ -22958,7 +24498,7 @@ Valid States of Checkbox:
22958
24498
  6. disabled: false, checked: true, value: CHECKED
22959
24499
  */
22960
24500
  var Checkbox$1 = /** @class */ (function (_super) {
22961
- __extends(Checkbox, _super);
24501
+ __extends$1(Checkbox, _super);
22962
24502
  function Checkbox() {
22963
24503
  return _super !== null && _super.apply(this, arguments) || this;
22964
24504
  }
@@ -23105,15 +24645,15 @@ exports.ConsequenceAction = void 0;
23105
24645
  ConsequenceAction["ALLOW_FOREVER"] = "ALLOW_FOREVER";
23106
24646
  })(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
23107
24647
 
23108
- var _g$2;
23109
- function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
24648
+ var _g$3;
24649
+ function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
23110
24650
  var SvgIcInfoFilled = function SvgIcInfoFilled(props) {
23111
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
24651
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
23112
24652
  xmlns: "http://www.w3.org/2000/svg",
23113
24653
  width: "1em",
23114
24654
  height: "1em",
23115
24655
  viewBox: "0 0 32 32"
23116
- }, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
24656
+ }, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
23117
24657
  fill: "none",
23118
24658
  fillRule: "evenodd"
23119
24659
  }, /*#__PURE__*/React__namespace.createElement("path", {
@@ -23188,9 +24728,9 @@ function DeleteComponent(_a) {
23188
24728
  }
23189
24729
 
23190
24730
  var _path$5;
23191
- function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
24731
+ function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
23192
24732
  var SvgIcPencil = function SvgIcPencil(props) {
23193
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
24733
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
23194
24734
  width: "1em",
23195
24735
  height: "1em",
23196
24736
  viewBox: "0 0 20 20",
@@ -23206,9 +24746,9 @@ var SvgIcPencil = function SvgIcPencil(props) {
23206
24746
  };
23207
24747
 
23208
24748
  var _path$4, _path2, _path3;
23209
- function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
24749
+ function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
23210
24750
  var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
23211
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
24751
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
23212
24752
  width: "1em",
23213
24753
  height: "1em",
23214
24754
  viewBox: "0 0 12 12",
@@ -23233,9 +24773,9 @@ var SvgIcArrowCounterClockwise = function SvgIcArrowCounterClockwise(props) {
23233
24773
  };
23234
24774
 
23235
24775
  var _path$3;
23236
- function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
24776
+ function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
23237
24777
  var SvgIcMinus = function SvgIcMinus(props) {
23238
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
24778
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
23239
24779
  xmlns: "http://www.w3.org/2000/svg",
23240
24780
  width: "1em",
23241
24781
  height: "1em",
@@ -23248,6 +24788,28 @@ var SvgIcMinus = function SvgIcMinus(props) {
23248
24788
  })));
23249
24789
  };
23250
24790
 
24791
+ var _g$2;
24792
+ function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
24793
+ var SvgIcWarning = function SvgIcWarning(props) {
24794
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
24795
+ xmlns: "http://www.w3.org/2000/svg",
24796
+ width: "1em",
24797
+ height: "1em",
24798
+ viewBox: "0 0 32 32"
24799
+ }, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
24800
+ fill: "none",
24801
+ fillRule: "evenodd"
24802
+ }, /*#__PURE__*/React__namespace.createElement("path", {
24803
+ d: "M0 0h32v32H0z"
24804
+ }), /*#__PURE__*/React__namespace.createElement("path", {
24805
+ fill: "#FFCB5D",
24806
+ d: "M18.315 5.052 29.72 25.01A2.667 2.667 0 0 1 27.405 29H4.595a2.667 2.667 0 0 1-2.315-3.99L13.685 5.052a2.667 2.667 0 0 1 4.63 0z"
24807
+ }), /*#__PURE__*/React__namespace.createElement("path", {
24808
+ fill: "#FFF",
24809
+ d: "M16 22.667a1.333 1.333 0 1 1 0 2.666 1.333 1.333 0 0 1 0-2.666zM16 12c.736 0 1.333.597 1.333 1.333v6.334a1.333 1.333 0 1 1-2.666 0v-6.334c0-.736.597-1.333 1.333-1.333z"
24810
+ }))));
24811
+ };
24812
+
23251
24813
  var _g$1;
23252
24814
  function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
23253
24815
  var SvgIcErrorExclamation = function SvgIcErrorExclamation(props) {
@@ -26638,11 +28200,115 @@ function DevtronProgressing(_a) {
26638
28200
  return (jsxRuntime.jsx("div", __assign({ className: parentClasses ? parentClasses : '' }, { children: jsxRuntime.jsx(SvgIcRotateDevtron, { className: classes ? classes : '' }) })));
26639
28201
  }
26640
28202
 
28203
+ // @TODO: Generalize this component to be used in CodeEditor as Chart selector toolbar
28204
+ // when the Code Editor is moved to the fe-common-lib
28205
+ var ChartVersionAndTypeSelector = function (_a) {
28206
+ var setSelectedChartRefId = _a.setSelectedChartRefId;
28207
+ var _b = __read(React.useState([]), 2), charts = _b[0], setCharts = _b[1];
28208
+ var _c = __read(React.useState(null), 2), selectedChartType = _c[0], setSelectedChartType = _c[1];
28209
+ var _d = __read(React.useState([]), 2), chartVersionOptions = _d[0], setChartVersionOptions = _d[1];
28210
+ var _e = __read(React.useState([]), 2), chartTypeOptions = _e[0], setChartTypeOptions = _e[1];
28211
+ var _f = __read(React.useState(null), 2), selectedChartVersion = _f[0], setSelectedChartVersion = _f[1];
28212
+ React.useEffect(function () {
28213
+ fetchChartTemplateVersions()
28214
+ .then(function (res) {
28215
+ var charts = (res === null || res === void 0 ? void 0 : res.result) || [];
28216
+ setCharts(charts);
28217
+ // Extract unique chart types from the data
28218
+ var chartTypeOptions = __spreadArray([], __read(new Set(charts.map(function (item) { return item.chartType; }))), false).map(function (type) { return ({
28219
+ value: type,
28220
+ label: type,
28221
+ }); });
28222
+ setChartTypeOptions(chartTypeOptions);
28223
+ var filteredVersions = getFilteredChartVersions(charts, chartTypeOptions[0]);
28224
+ selectFirstChartVersion(filteredVersions);
28225
+ })
28226
+ .catch(function (err) {
28227
+ showError(err);
28228
+ });
28229
+ }, []);
28230
+ var selectFirstChartVersion = function (filteredVersions) {
28231
+ var _a;
28232
+ setChartVersionOptions(filteredVersions);
28233
+ setSelectedChartVersion(filteredVersions[0]); // Select the first chart version by default
28234
+ setSelectedChartRefId((_a = filteredVersions[0]) === null || _a === void 0 ? void 0 : _a.chartRefId);
28235
+ };
28236
+ // Function to update chart version options based on selected chart type
28237
+ var handleChartTypeChange = function (selectedOption) {
28238
+ setSelectedChartType(selectedOption);
28239
+ var filteredVersions = getFilteredChartVersions(charts, selectedOption);
28240
+ selectFirstChartVersion(filteredVersions);
28241
+ };
28242
+ // Function to handle the change of the selected chart version
28243
+ var handleChartVersionChange = function (selectedOption) {
28244
+ setSelectedChartVersion(selectedOption);
28245
+ setSelectedChartRefId(selectedOption.chartRefId);
28246
+ };
28247
+ return (jsxRuntime.jsxs("div", __assign({ className: "flex" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "chart-type-options flex", "data-testid": "chart-type-options" }, { children: [jsxRuntime.jsx("span", __assign({ className: "chart-type-options-label mr-4" }, { children: "Chart Type" })), jsxRuntime.jsx(ReactSelect, { value: selectedChartType !== null && selectedChartType !== void 0 ? selectedChartType : chartTypeOptions[0], options: chartTypeOptions, onChange: handleChartTypeChange, styles: customStyles })] })), jsxRuntime.jsxs("div", __assign({ className: "chart-version-options flex", "data-testid": "chart-version-options" }, { children: [jsxRuntime.jsx("span", __assign({ className: "chart-version-options-label mr-4" }, { children: "Chart Version" })), jsxRuntime.jsx(ReactSelect, { value: selectedChartVersion !== null && selectedChartVersion !== void 0 ? selectedChartVersion : chartVersionOptions[0], options: chartVersionOptions, onChange: handleChartVersionChange, styles: customStyles })] }))] })));
28248
+ };
28249
+
28250
+ function CustomInput(_a) {
28251
+ var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 1 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo;
28252
+ function handleError(error) {
28253
+ if (!Array.isArray(error)) {
28254
+ return [error];
28255
+ }
28256
+ return error;
28257
+ }
28258
+ var onBlur = function (event) {
28259
+ var _a;
28260
+ //NOTE: This is to prevent the input from being trimmed when the user do not want to trim the input
28261
+ if (!noTrim) {
28262
+ event.stopPropagation();
28263
+ event.target.value = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
28264
+ onChange(event);
28265
+ }
28266
+ if (typeof handleOnBlur === 'function') {
28267
+ handleOnBlur(event);
28268
+ }
28269
+ };
28270
+ var renderFormErrorWithIcon = function (error) {
28271
+ return (jsxRuntime.jsxs("div", __assign({ className: "form__error" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), error, typeof additionalErrorInfo === 'function' && additionalErrorInfo()] }), error));
28272
+ };
28273
+ var getInputError = function () {
28274
+ if (!(error === null || error === void 0 ? void 0 : error.length)) {
28275
+ return null;
28276
+ }
28277
+ else {
28278
+ if (typeof error === 'object') {
28279
+ return handleError(error).map(function (err) { return renderFormErrorWithIcon(err); });
28280
+ }
28281
+ return renderFormErrorWithIcon(error);
28282
+ }
28283
+ };
28284
+ var renderInputLabelConditionally = function () {
28285
+ if (typeof label === 'string') {
28286
+ return jsxRuntime.jsx("span", __assign({ className: "".concat(isRequiredField ? 'dc__required-field' : '') }, { children: label }));
28287
+ }
28288
+ else {
28289
+ return label();
28290
+ }
28291
+ };
28292
+ var renderInputLabel = function () {
28293
+ if (!label) {
28294
+ return null;
28295
+ }
28296
+ else {
28297
+ return (jsxRuntime.jsx("label", __assign({ className: "form__label ".concat(labelClassName), "data-testid": "label-".concat(dataTestid) }, { children: renderInputLabelConditionally() })));
28298
+ }
28299
+ };
28300
+ return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top" }, { children: [renderInputLabel(), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input ".concat(rootClassName), onChange: function (e) {
28301
+ e.persist();
28302
+ onChange(e);
28303
+ }, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex, autoFocus: autoFocus, readOnly: readOnly, ref: ref, onKeyPress: onKeyPress, defaultValue: defaultValue, onKeyDown: onKeyDown, required: required }), getInputError(), helperText && (jsxRuntime.jsxs("div", __assign({ className: "form__text-field-info" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon form__icon--info" }), jsxRuntime.jsx("p", __assign({ className: "sentence-case" }, { children: helperText }))] })))] })));
28304
+ }
28305
+
26641
28306
  exports.AppStatus = AppStatus;
26642
28307
  exports.BreadCrumb = BreadCrumb;
26643
28308
  exports.BreadcrumbStore = Store;
26644
28309
  exports.BuildStageVariable = BuildStageVariable;
26645
28310
  exports.CDModalTab = CDModalTab;
28311
+ exports.ChartVersionAndTypeSelector = ChartVersionAndTypeSelector;
26646
28312
  exports.Checkbox = Checkbox$1;
26647
28313
  exports.ClearIndicator = ClearIndicator;
26648
28314
  exports.ClipboardButton = ClipboardButton;
@@ -26715,17 +28381,22 @@ exports.VisibleModal2 = VisibleModal2;
26715
28381
  exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
26716
28382
  exports.copyToClipboard = copyToClipboard;
26717
28383
  exports.createGitCommitUrl = createGitCommitUrl;
28384
+ exports.customStyles = customStyles;
26718
28385
  exports.extractImage = extractImage;
28386
+ exports.fetchChartTemplateVersions = fetchChartTemplateVersions;
26719
28387
  exports.genericCDMaterialsService = genericCDMaterialsService;
26720
28388
  exports.get = get;
26721
28389
  exports.getAlphabetIcon = getAlphabetIcon;
26722
28390
  exports.getCookie = getCookie;
26723
28391
  exports.getEmptyArrayOfLength = getEmptyArrayOfLength;
28392
+ exports.getFilteredChartVersions = getFilteredChartVersions;
26724
28393
  exports.getInferredTypeFromValueType = getInferredTypeFromValueType;
28394
+ exports.getLockedJSON = getLockedJSON;
26725
28395
  exports.getLoginInfo = getLoginInfo;
26726
28396
  exports.getRandomColor = getRandomColor;
26727
28397
  exports.getRedirectionProps = getRedirectionProps;
26728
28398
  exports.getTeamListMin = getTeamListMin;
28399
+ exports.getUnlockedJSON = getUnlockedJSON;
26729
28400
  exports.getUrlWithSearchParams = getUrlWithSearchParams;
26730
28401
  exports.getUserRole = getUserRole;
26731
28402
  exports.handleUTCTime = handleUTCTime;