@egovernments/digit-ui-libraries 1.5.0-beta.27 → 1.5.0-beta.28

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
@@ -35904,23 +35904,50 @@ function cloneDeep(value) {
35904
35904
 
35905
35905
  var cloneDeep_1 = cloneDeep;
35906
35906
 
35907
- var getThumbnails = function getThumbnails(ids, tenantId) {
35907
+ var getThumbnails = function getThumbnails(ids, tenantId, documents) {
35908
+ if (documents === void 0) {
35909
+ documents = [];
35910
+ }
35911
+
35908
35912
  try {
35909
35913
  tenantId = window.location.href.includes("/obps/") ? Digit.ULBService.getStateId() : tenantId;
35910
- return Promise.resolve(Digit.UploadServices.Filefetch(ids, tenantId)).then(function (res) {
35911
- if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) {
35912
- return {
35913
- thumbs: res.data.fileStoreIds.map(function (o) {
35914
- return o.url.split(",")[3] || o.url.split(",")[0];
35915
- }),
35916
- images: res.data.fileStoreIds.map(function (o) {
35917
- return Digit.Utils.getFileUrl(o.url);
35918
- })
35919
- };
35914
+
35915
+ if (window.location.href.includes("/obps/")) {
35916
+ var _documents;
35917
+
35918
+ if (((_documents = documents) === null || _documents === void 0 ? void 0 : _documents.length) > 0) {
35919
+ var _documents2;
35920
+
35921
+ var workflowsDocs = [];
35922
+ (_documents2 = documents) === null || _documents2 === void 0 ? void 0 : _documents2.map(function (doc) {
35923
+ if (doc !== null && doc !== void 0 && doc.url) {
35924
+ var thumbs = doc.url.split(",")[3] || doc.url.split(",")[0];
35925
+ workflowsDocs.push({
35926
+ thumbs: [thumbs],
35927
+ images: [Digit.Utils.getFileUrl(doc.url)]
35928
+ });
35929
+ }
35930
+ });
35931
+ return Promise.resolve(workflowsDocs === null || workflowsDocs === void 0 ? void 0 : workflowsDocs[0]);
35920
35932
  } else {
35921
- return null;
35933
+ return Promise.resolve(null);
35922
35934
  }
35923
- });
35935
+ } else {
35936
+ return Promise.resolve(Digit.UploadServices.Filefetch(ids, tenantId)).then(function (res) {
35937
+ if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) {
35938
+ return {
35939
+ thumbs: res.data.fileStoreIds.map(function (o) {
35940
+ return o.url.split(",")[3] || o.url.split(",")[0];
35941
+ }),
35942
+ images: res.data.fileStoreIds.map(function (o) {
35943
+ return Digit.Utils.getFileUrl(o.url);
35944
+ })
35945
+ };
35946
+ } else {
35947
+ return null;
35948
+ }
35949
+ });
35950
+ }
35924
35951
  } catch (e) {
35925
35952
  return Promise.reject(e);
35926
35953
  }
@@ -35928,45 +35955,86 @@ var getThumbnails = function getThumbnails(ids, tenantId) {
35928
35955
 
35929
35956
  var makeCommentsSubsidariesOfPreviousActions = function makeCommentsSubsidariesOfPreviousActions(wf) {
35930
35957
  try {
35931
- var _temp5 = function _temp5() {
35932
- var response = TimelineMap.get("tlActions");
35933
- return response;
35934
- };
35958
+ var _wf$;
35935
35959
 
35936
- var TimelineMap = new Map();
35960
+ var _temp9 = function _temp9() {
35961
+ function _temp6() {
35962
+ var response = TimelineMap.get("tlActions");
35963
+ return response;
35964
+ }
35937
35965
 
35938
- var _temp6 = _forOf(wf, function (eventHappened) {
35939
- function _temp2() {
35940
- if (eventHappened.action === "COMMENT") {
35941
- var commentAccumulator = TimelineMap.get("tlCommentStack") || [];
35942
- TimelineMap.set("tlCommentStack", [].concat(commentAccumulator, [eventHappened]));
35943
- } else {
35944
- var eventAccumulator = TimelineMap.get("tlActions") || [];
35966
+ var _temp5 = _forOf(wf, function (eventHappened) {
35967
+ function _temp4() {
35968
+ if (eventHappened.action === "COMMENT") {
35969
+ var commentAccumulator = TimelineMap.get("tlCommentStack") || [];
35970
+ TimelineMap.set("tlCommentStack", [].concat(commentAccumulator, [eventHappened]));
35971
+ } else {
35972
+ var eventAccumulator = TimelineMap.get("tlActions") || [];
35945
35973
 
35946
- var _commentAccumulator = TimelineMap.get("tlCommentStack") || [];
35974
+ var _commentAccumulator = TimelineMap.get("tlCommentStack") || [];
35947
35975
 
35948
- eventHappened.wfComments = [].concat(_commentAccumulator, eventHappened.comment ? [eventHappened] : []);
35949
- TimelineMap.set("tlActions", [].concat(eventAccumulator, [eventHappened]));
35950
- TimelineMap.delete("tlCommentStack");
35976
+ eventHappened.wfComments = [].concat(_commentAccumulator, eventHappened.comment ? [eventHappened] : []);
35977
+ TimelineMap.set("tlActions", [].concat(eventAccumulator, [eventHappened]));
35978
+ TimelineMap.delete("tlCommentStack");
35979
+ }
35951
35980
  }
35952
- }
35953
35981
 
35954
- var _temp = function () {
35955
- if (eventHappened !== null && eventHappened !== void 0 && eventHappened.documents) {
35956
- var _eventHappened$docume;
35982
+ var _temp3 = function () {
35983
+ if (eventHappened !== null && eventHappened !== void 0 && eventHappened.documents) {
35984
+ var _eventHappened$docume;
35985
+
35986
+ return Promise.resolve(getThumbnails(eventHappened === null || eventHappened === void 0 ? void 0 : (_eventHappened$docume = eventHappened.documents) === null || _eventHappened$docume === void 0 ? void 0 : _eventHappened$docume.map(function (e) {
35987
+ return e === null || e === void 0 ? void 0 : e.fileStoreId;
35988
+ }), eventHappened === null || eventHappened === void 0 ? void 0 : eventHappened.tenantId, eventHappened === null || eventHappened === void 0 ? void 0 : eventHappened.documents)).then(function (_getThumbnails) {
35989
+ eventHappened.thumbnailsToShow = _getThumbnails;
35990
+ });
35991
+ }
35992
+ }();
35993
+
35994
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
35995
+ });
35996
+
35997
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
35998
+ };
35999
+
36000
+ var TimelineMap = new Map();
36001
+ var tenantId = window.location.href.includes("/obps/") ? Digit.ULBService.getStateId() : wf === null || wf === void 0 ? void 0 : (_wf$ = wf[0]) === null || _wf$ === void 0 ? void 0 : _wf$.tenantId;
36002
+ var fileStoreIdsList = [];
36003
+ var res = {};
36004
+
36005
+ var _temp10 = function () {
36006
+ if (window.location.href.includes("/obps/")) {
36007
+ var _temp11 = function _temp11() {
36008
+ wf === null || wf === void 0 ? void 0 : wf.forEach(function (wfData) {
36009
+ var _wfData$documents;
36010
+
36011
+ wfData === null || wfData === void 0 ? void 0 : (_wfData$documents = wfData.documents) === null || _wfData$documents === void 0 ? void 0 : _wfData$documents.forEach(function (wfDoc) {
36012
+ if (wfDoc !== null && wfDoc !== void 0 && wfDoc.fileStoreId) wfDoc.url = res.data[wfDoc === null || wfDoc === void 0 ? void 0 : wfDoc.fileStoreId];
36013
+ });
36014
+ });
36015
+ };
36016
+
36017
+ wf === null || wf === void 0 ? void 0 : wf.map(function (wfData) {
36018
+ var _wfData$documents2;
35957
36019
 
35958
- return Promise.resolve(getThumbnails(eventHappened === null || eventHappened === void 0 ? void 0 : (_eventHappened$docume = eventHappened.documents) === null || _eventHappened$docume === void 0 ? void 0 : _eventHappened$docume.map(function (e) {
35959
- return e === null || e === void 0 ? void 0 : e.fileStoreId;
35960
- }), eventHappened === null || eventHappened === void 0 ? void 0 : eventHappened.tenantId)).then(function (_getThumbnails) {
35961
- eventHappened.thumbnailsToShow = _getThumbnails;
36020
+ wfData === null || wfData === void 0 ? void 0 : (_wfData$documents2 = wfData.documents) === null || _wfData$documents2 === void 0 ? void 0 : _wfData$documents2.map(function (wfDoc) {
36021
+ if (wfDoc !== null && wfDoc !== void 0 && wfDoc.fileStoreId) fileStoreIdsList.push(wfDoc === null || wfDoc === void 0 ? void 0 : wfDoc.fileStoreId);
35962
36022
  });
35963
- }
35964
- }();
36023
+ });
35965
36024
 
35966
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
35967
- });
36025
+ var _temp12 = function () {
36026
+ if ((fileStoreIdsList === null || fileStoreIdsList === void 0 ? void 0 : fileStoreIdsList.length) > 0) {
36027
+ return Promise.resolve(Digit.UploadServices.Filefetch(fileStoreIdsList, tenantId)).then(function (_Digit$UploadServices) {
36028
+ res = _Digit$UploadServices;
36029
+ });
36030
+ }
36031
+ }();
36032
+
36033
+ return _temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12);
36034
+ }
36035
+ }();
35968
36036
 
35969
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp5) : _temp5(_temp6));
36037
+ return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(_temp9) : _temp9(_temp10));
35970
36038
  } catch (e) {
35971
36039
  return Promise.reject(e);
35972
36040
  }
@@ -36026,13 +36094,13 @@ var WorkflowService = {
36026
36094
 
36027
36095
  var _exit = false;
36028
36096
 
36029
- function _temp14(_result2) {
36097
+ function _temp20(_result2) {
36030
36098
  return _exit ? _result2 : {};
36031
36099
  }
36032
36100
 
36033
36101
  var businessServiceResponse = _Digit$WorkflowServic === null || _Digit$WorkflowServic === void 0 ? void 0 : (_Digit$WorkflowServic2 = _Digit$WorkflowServic.BusinessServices[0]) === null || _Digit$WorkflowServic2 === void 0 ? void 0 : _Digit$WorkflowServic2.states;
36034
36102
 
36035
- var _temp13 = function () {
36103
+ var _temp19 = function () {
36036
36104
  if (workflow && workflow.ProcessInstances) {
36037
36105
  var _processInstances$, _businessServiceRespo;
36038
36106
 
@@ -36113,7 +36181,7 @@ var WorkflowService = {
36113
36181
  return function () {
36114
36182
  if (processInstances.length > 0) {
36115
36183
  return Promise.resolve(makeCommentsSubsidariesOfPreviousActions(processInstances)).then(function (TLEnrichedWithWorflowData) {
36116
- function _temp12() {
36184
+ function _temp18() {
36117
36185
  var _workflow$ProcessInst, _workflow$ProcessInst2;
36118
36186
 
36119
36187
  var nextActions = actionRolePair;
@@ -36181,17 +36249,17 @@ var WorkflowService = {
36181
36249
  return checkPoint;
36182
36250
  });
36183
36251
 
36184
- var _temp11 = function () {
36252
+ var _temp17 = function () {
36185
36253
  if (getTripData) {
36186
- var _temp15 = _catch(function () {
36254
+ var _temp21 = _catch(function () {
36187
36255
  var filters = {
36188
36256
  businessService: 'FSM_VEHICLE_TRIP',
36189
36257
  refernceNos: id
36190
36258
  };
36191
36259
  return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
36192
- var _temp9 = function () {
36260
+ var _temp15 = function () {
36193
36261
  if (tripSearchResp && tripSearchResp.vehicleTrip && tripSearchResp.vehicleTrip.length) {
36194
- var _temp16 = function _temp16() {
36262
+ var _temp22 = function _temp22() {
36195
36263
  var tripTimeline = [];
36196
36264
  var disposalInProgressPosition = timeline.findIndex(function (data) {
36197
36265
  return data.status === "DISPOSAL_IN_PROGRESS";
@@ -36230,7 +36298,7 @@ var WorkflowService = {
36230
36298
  var _waitingForDisposedAction = [];
36231
36299
  var _disposedAction = [];
36232
36300
 
36233
- var _temp17 = _forOf(tripSearchResp.vehicleTrip, function (data) {
36301
+ var _temp23 = _forOf(tripSearchResp.vehicleTrip, function (data) {
36234
36302
  return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, data.applicationNo)).then(function (resp) {
36235
36303
  var _resp$ProcessInstance;
36236
36304
 
@@ -36300,19 +36368,19 @@ var WorkflowService = {
36300
36368
  });
36301
36369
  });
36302
36370
 
36303
- return _temp17 && _temp17.then ? _temp17.then(_temp16) : _temp16(_temp17);
36371
+ return _temp23 && _temp23.then ? _temp23.then(_temp22) : _temp22(_temp23);
36304
36372
  }
36305
36373
  }();
36306
36374
 
36307
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
36375
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
36308
36376
  });
36309
36377
  }, function () {});
36310
36378
 
36311
- if (_temp15 && _temp15.then) return _temp15.then(function () {});
36379
+ if (_temp21 && _temp21.then) return _temp21.then(function () {});
36312
36380
  }
36313
36381
  }();
36314
36382
 
36315
- return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
36383
+ return _temp17 && _temp17.then ? _temp17.then(_temp18) : _temp18(_temp17);
36316
36384
  });
36317
36385
  }
36318
36386
  }();
@@ -36321,7 +36389,7 @@ var WorkflowService = {
36321
36389
  }
36322
36390
  }();
36323
36391
 
36324
- return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
36392
+ return _temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19);
36325
36393
  });
36326
36394
  });
36327
36395
  } catch (e) {
@@ -37324,254 +37392,1314 @@ var ULBService = {
37324
37392
  getCitizenCurrentTenant: function getCitizenCurrentTenant(selectedCity) {
37325
37393
  var _Digit$SessionStorage, _Digit$UserService$ge, _Digit$UserService$ge2;
37326
37394
 
37327
- if (selectedCity === void 0) {
37328
- selectedCity = false;
37395
+ if (selectedCity === void 0) {
37396
+ selectedCity = false;
37397
+ }
37398
+
37399
+ var homeCity = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
37400
+
37401
+ if (selectedCity) {
37402
+ return homeCity;
37403
+ }
37404
+
37405
+ return homeCity || ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.permanentCity) || ULBService.getStateId();
37406
+ },
37407
+ getUserUlbs: function getUserUlbs(userRole) {
37408
+ if (userRole === void 0) {
37409
+ userRole = "";
37410
+ }
37411
+
37412
+ var stringReplaceAll = function stringReplaceAll(str, searcher, replaceWith) {
37413
+ if (str === void 0) {
37414
+ str = "";
37415
+ }
37416
+
37417
+ if (searcher === void 0) {
37418
+ searcher = "";
37419
+ }
37420
+
37421
+ if (replaceWith === void 0) {
37422
+ replaceWith = "";
37423
+ }
37424
+
37425
+ if (searcher == "") return str;
37426
+
37427
+ while ((_str = str) !== null && _str !== void 0 && _str.includes(searcher)) {
37428
+ var _str, _str2;
37429
+
37430
+ str = (_str2 = str) === null || _str2 === void 0 ? void 0 : _str2.replace(searcher, replaceWith);
37431
+ }
37432
+
37433
+ return str;
37434
+ };
37435
+
37436
+ var userloggedValues = Digit.SessionStorage.get("citizen.userRequestObject");
37437
+ var teantsArray = [],
37438
+ filteredArray = [];
37439
+
37440
+ if (userRole === "") {
37441
+ var _userloggedValues$inf, _userloggedValues$inf2;
37442
+
37443
+ userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf = userloggedValues.info) === null || _userloggedValues$inf === void 0 ? void 0 : (_userloggedValues$inf2 = _userloggedValues$inf.roles) === null || _userloggedValues$inf2 === void 0 ? void 0 : _userloggedValues$inf2.forEach(function (role) {
37444
+ return teantsArray.push(role.tenantId);
37445
+ });
37446
+ var unique = teantsArray.filter(function (item, i, ar) {
37447
+ return ar.indexOf(item) === i;
37448
+ });
37449
+ unique === null || unique === void 0 ? void 0 : unique.forEach(function (uniCode) {
37450
+ var _stringReplaceAll;
37451
+
37452
+ filteredArray.push({
37453
+ i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll === void 0 ? void 0 : _stringReplaceAll.toUpperCase()),
37454
+ value: uniCode,
37455
+ code: uniCode,
37456
+ name: uniCode.substring(uniCode.indexOf(".") + 1)
37457
+ });
37458
+ });
37459
+ return filteredArray;
37460
+ } else {
37461
+ var _userloggedValues$inf3, _userloggedValues$inf4;
37462
+
37463
+ userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf3 = userloggedValues.info) === null || _userloggedValues$inf3 === void 0 ? void 0 : (_userloggedValues$inf4 = _userloggedValues$inf3.roles) === null || _userloggedValues$inf4 === void 0 ? void 0 : _userloggedValues$inf4.forEach(function (role) {
37464
+ if (userRole === role.code) teantsArray.push(role.tenantId);
37465
+ });
37466
+
37467
+ var _unique = teantsArray.filter(function (item, i, ar) {
37468
+ return ar.indexOf(item) === i;
37469
+ });
37470
+
37471
+ _unique === null || _unique === void 0 ? void 0 : _unique.forEach(function (uniCode) {
37472
+ var _stringReplaceAll2;
37473
+
37474
+ filteredArray.push({
37475
+ i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll2 = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll2 === void 0 ? void 0 : _stringReplaceAll2.toUpperCase()),
37476
+ value: uniCode,
37477
+ code: uniCode,
37478
+ name: uniCode.substring(uniCode.indexOf(".") + 1)
37479
+ });
37480
+ });
37481
+ return filteredArray;
37482
+ }
37483
+ }
37484
+ };
37485
+
37486
+ var FileDesludging = {
37487
+ create: function (tenantId, data) {
37488
+ try {
37489
+ return Promise.resolve(FSMService.create(data, tenantId));
37490
+ } catch (e) {
37491
+ return Promise.reject(e);
37492
+ }
37493
+ }
37494
+ };
37495
+
37496
+ var ComponentRegistry = /*#__PURE__*/function () {
37497
+ function ComponentRegistry() {
37498
+ this._registry = {};
37499
+ }
37500
+
37501
+ var _proto = ComponentRegistry.prototype;
37502
+
37503
+ _proto.getComponent = function getComponent(id) {
37504
+ return this._registry[id];
37505
+ };
37506
+
37507
+ _proto.setComponent = function setComponent(id, component) {
37508
+ this._registry[id] = component;
37509
+ return true;
37510
+ };
37511
+
37512
+ _proto.setAllComponents = function setAllComponents(components) {
37513
+ var _this = this;
37514
+
37515
+ Object.entries(components).forEach(function (_ref) {
37516
+ var key = _ref[0],
37517
+ value = _ref[1];
37518
+
37519
+ _this.setComponent(key, value);
37520
+ });
37521
+ return this._registry;
37522
+ };
37523
+
37524
+ return ComponentRegistry;
37525
+ }();
37526
+
37527
+ var componentRegistry = new ComponentRegistry();
37528
+ var ComponentRegistryService = {
37529
+ getComponent: function getComponent(id) {
37530
+ return componentRegistry.getComponent(id);
37531
+ },
37532
+ setComponent: function setComponent(id, component) {
37533
+ if (component === void 0) {
37534
+ component = {};
37535
+ }
37536
+
37537
+ return componentRegistry.setComponent(id, component);
37538
+ },
37539
+ setupRegistry: function setupRegistry(components) {
37540
+ return componentRegistry.setAllComponents(components);
37541
+ },
37542
+ getRegistry: function getRegistry() {
37543
+ return componentRegistry;
37544
+ }
37545
+ };
37546
+
37547
+ var StoreData = {
37548
+ getInitData: function getInitData() {
37549
+ return StoreService.getInitData();
37550
+ },
37551
+ getCurrentLanguage: function getCurrentLanguage() {
37552
+ return Digit.SessionStorage.get("locale") || "en_IN";
37553
+ }
37554
+ };
37555
+
37556
+ var ComponentProvider = React__default.createContext();
37557
+ var Contexts = {
37558
+ ComponentProvider: ComponentProvider
37559
+ };
37560
+
37561
+ var useWorkflowDetails = function useWorkflowDetails(_ref) {
37562
+ var tenantId = _ref.tenantId,
37563
+ id = _ref.id,
37564
+ moduleCode = _ref.moduleCode,
37565
+ _ref$role = _ref.role,
37566
+ role = _ref$role === void 0 ? "CITIZEN" : _ref$role,
37567
+ getStaleData = _ref.getStaleData,
37568
+ config = _ref.config,
37569
+ _ref$getTripData = _ref.getTripData,
37570
+ getTripData = _ref$getTripData === void 0 ? false : _ref$getTripData;
37571
+ var queryClient = reactQuery.useQueryClient();
37572
+ var staleDataConfig = {
37573
+ staleTime: Infinity
37574
+ };
37575
+
37576
+ var _useQuery = reactQuery.useQuery(["workFlowDetails", tenantId, id, moduleCode, role, config], function () {
37577
+ return Digit.WorkflowService.getDetailsById({
37578
+ tenantId: tenantId,
37579
+ id: id,
37580
+ moduleCode: moduleCode,
37581
+ role: role,
37582
+ getTripData: getTripData
37583
+ });
37584
+ }, getStaleData ? _extends({}, staleDataConfig, config) : config),
37585
+ isLoading = _useQuery.isLoading,
37586
+ error = _useQuery.error,
37587
+ isError = _useQuery.isError,
37588
+ data = _useQuery.data;
37589
+
37590
+ if (getStaleData) return {
37591
+ isLoading: isLoading,
37592
+ error: error,
37593
+ isError: isError,
37594
+ data: data
37595
+ };
37596
+ return {
37597
+ isLoading: isLoading,
37598
+ error: error,
37599
+ isError: isError,
37600
+ data: data,
37601
+ revalidate: function revalidate() {
37602
+ return queryClient.invalidateQueries(["workFlowDetails", tenantId, id, moduleCode, role]);
37603
+ }
37604
+ };
37605
+ };
37606
+
37607
+ var useSessionStorage = function useSessionStorage(key, initialValue) {
37608
+ var _useState = React.useState(function () {
37609
+ try {
37610
+ var data = Digit.SessionStorage.get(key);
37611
+ return data ? data : initialValue;
37612
+ } catch (err) {
37613
+ return initialValue;
37614
+ }
37615
+ }),
37616
+ storedValue = _useState[0],
37617
+ setStoredValue = _useState[1];
37618
+
37619
+ var setValue = function setValue(value) {
37620
+ try {
37621
+ var valueToStore = value instanceof Function ? value(storedValue) : value;
37622
+ setStoredValue(valueToStore);
37623
+ Digit.SessionStorage.set(key, valueToStore);
37624
+ } catch (err) {}
37625
+ };
37626
+
37627
+ var clearValue = function clearValue() {
37628
+ setStoredValue(initialValue);
37629
+ Digit.SessionStorage.set(key, initialValue);
37630
+ };
37631
+
37632
+ return [storedValue, setValue, clearValue];
37633
+ };
37634
+
37635
+ var useQueryParams = function useQueryParams() {
37636
+ var queryString = window.location.search;
37637
+ var urlParams = new URLSearchParams(queryString);
37638
+ var params = {};
37639
+ urlParams.forEach(function (value, key) {
37640
+ params[key] = value;
37641
+ });
37642
+ return params;
37643
+ };
37644
+
37645
+ var b$1 = "function" === typeof Symbol && Symbol.for,
37646
+ c = b$1 ? Symbol.for("react.element") : 60103,
37647
+ d = b$1 ? Symbol.for("react.portal") : 60106,
37648
+ e = b$1 ? Symbol.for("react.fragment") : 60107,
37649
+ f = b$1 ? Symbol.for("react.strict_mode") : 60108,
37650
+ g = b$1 ? Symbol.for("react.profiler") : 60114,
37651
+ h = b$1 ? Symbol.for("react.provider") : 60109,
37652
+ k$1 = b$1 ? Symbol.for("react.context") : 60110,
37653
+ l = b$1 ? Symbol.for("react.async_mode") : 60111,
37654
+ m = b$1 ? Symbol.for("react.concurrent_mode") : 60111,
37655
+ n = b$1 ? Symbol.for("react.forward_ref") : 60112,
37656
+ p = b$1 ? Symbol.for("react.suspense") : 60113,
37657
+ q = b$1 ? Symbol.for("react.suspense_list") : 60120,
37658
+ r = b$1 ? Symbol.for("react.memo") : 60115,
37659
+ t = b$1 ? Symbol.for("react.lazy") : 60116,
37660
+ v = b$1 ? Symbol.for("react.block") : 60121,
37661
+ w = b$1 ? Symbol.for("react.fundamental") : 60117,
37662
+ x = b$1 ? Symbol.for("react.responder") : 60118,
37663
+ y$1 = b$1 ? Symbol.for("react.scope") : 60119;
37664
+
37665
+ function z(a) {
37666
+ if ("object" === typeof a && null !== a) {
37667
+ var u = a.$$typeof;
37668
+
37669
+ switch (u) {
37670
+ case c:
37671
+ switch (a = a.type, a) {
37672
+ case l:
37673
+ case m:
37674
+ case e:
37675
+ case g:
37676
+ case f:
37677
+ case p:
37678
+ return a;
37679
+
37680
+ default:
37681
+ switch (a = a && a.$$typeof, a) {
37682
+ case k$1:
37683
+ case n:
37684
+ case t:
37685
+ case r:
37686
+ case h:
37687
+ return a;
37688
+
37689
+ default:
37690
+ return u;
37691
+ }
37692
+
37693
+ }
37694
+
37695
+ case d:
37696
+ return u;
37697
+ }
37698
+ }
37699
+ }
37700
+
37701
+ function A(a) {
37702
+ return z(a) === m;
37703
+ }
37704
+
37705
+ var AsyncMode = l;
37706
+ var ConcurrentMode = m;
37707
+ var ContextConsumer = k$1;
37708
+ var ContextProvider = h;
37709
+ var Element = c;
37710
+ var ForwardRef = n;
37711
+ var Fragment = e;
37712
+ var Lazy = t;
37713
+ var Memo = r;
37714
+ var Portal = d;
37715
+ var Profiler = g;
37716
+ var StrictMode = f;
37717
+ var Suspense = p;
37718
+
37719
+ var isAsyncMode = function isAsyncMode(a) {
37720
+ return A(a) || z(a) === l;
37721
+ };
37722
+
37723
+ var isConcurrentMode = A;
37724
+
37725
+ var isContextConsumer = function isContextConsumer(a) {
37726
+ return z(a) === k$1;
37727
+ };
37728
+
37729
+ var isContextProvider = function isContextProvider(a) {
37730
+ return z(a) === h;
37731
+ };
37732
+
37733
+ var isElement = function isElement(a) {
37734
+ return "object" === typeof a && null !== a && a.$$typeof === c;
37735
+ };
37736
+
37737
+ var isForwardRef = function isForwardRef(a) {
37738
+ return z(a) === n;
37739
+ };
37740
+
37741
+ var isFragment = function isFragment(a) {
37742
+ return z(a) === e;
37743
+ };
37744
+
37745
+ var isLazy = function isLazy(a) {
37746
+ return z(a) === t;
37747
+ };
37748
+
37749
+ var isMemo = function isMemo(a) {
37750
+ return z(a) === r;
37751
+ };
37752
+
37753
+ var isPortal = function isPortal(a) {
37754
+ return z(a) === d;
37755
+ };
37756
+
37757
+ var isProfiler = function isProfiler(a) {
37758
+ return z(a) === g;
37759
+ };
37760
+
37761
+ var isStrictMode = function isStrictMode(a) {
37762
+ return z(a) === f;
37763
+ };
37764
+
37765
+ var isSuspense = function isSuspense(a) {
37766
+ return z(a) === p;
37767
+ };
37768
+
37769
+ var isValidElementType = function isValidElementType(a) {
37770
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k$1 || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y$1 || a.$$typeof === v);
37771
+ };
37772
+
37773
+ var typeOf = z;
37774
+ var reactIs_production_min = {
37775
+ AsyncMode: AsyncMode,
37776
+ ConcurrentMode: ConcurrentMode,
37777
+ ContextConsumer: ContextConsumer,
37778
+ ContextProvider: ContextProvider,
37779
+ Element: Element,
37780
+ ForwardRef: ForwardRef,
37781
+ Fragment: Fragment,
37782
+ Lazy: Lazy,
37783
+ Memo: Memo,
37784
+ Portal: Portal,
37785
+ Profiler: Profiler,
37786
+ StrictMode: StrictMode,
37787
+ Suspense: Suspense,
37788
+ isAsyncMode: isAsyncMode,
37789
+ isConcurrentMode: isConcurrentMode,
37790
+ isContextConsumer: isContextConsumer,
37791
+ isContextProvider: isContextProvider,
37792
+ isElement: isElement,
37793
+ isForwardRef: isForwardRef,
37794
+ isFragment: isFragment,
37795
+ isLazy: isLazy,
37796
+ isMemo: isMemo,
37797
+ isPortal: isPortal,
37798
+ isProfiler: isProfiler,
37799
+ isStrictMode: isStrictMode,
37800
+ isSuspense: isSuspense,
37801
+ isValidElementType: isValidElementType,
37802
+ typeOf: typeOf
37803
+ };
37804
+
37805
+ var reactIs_development = createCommonjsModule(function (module, exports) {
37806
+
37807
+ if (process.env.NODE_ENV !== "production") {
37808
+ (function () {
37809
+
37810
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
37811
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
37812
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
37813
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
37814
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
37815
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
37816
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
37817
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
37818
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
37819
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
37820
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
37821
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
37822
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
37823
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
37824
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
37825
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
37826
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
37827
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
37828
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
37829
+
37830
+ function isValidElementType(type) {
37831
+ return typeof type === 'string' || typeof type === 'function' || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
37832
+ }
37833
+
37834
+ function typeOf(object) {
37835
+ if (typeof object === 'object' && object !== null) {
37836
+ var $$typeof = object.$$typeof;
37837
+
37838
+ switch ($$typeof) {
37839
+ case REACT_ELEMENT_TYPE:
37840
+ var type = object.type;
37841
+
37842
+ switch (type) {
37843
+ case REACT_ASYNC_MODE_TYPE:
37844
+ case REACT_CONCURRENT_MODE_TYPE:
37845
+ case REACT_FRAGMENT_TYPE:
37846
+ case REACT_PROFILER_TYPE:
37847
+ case REACT_STRICT_MODE_TYPE:
37848
+ case REACT_SUSPENSE_TYPE:
37849
+ return type;
37850
+
37851
+ default:
37852
+ var $$typeofType = type && type.$$typeof;
37853
+
37854
+ switch ($$typeofType) {
37855
+ case REACT_CONTEXT_TYPE:
37856
+ case REACT_FORWARD_REF_TYPE:
37857
+ case REACT_LAZY_TYPE:
37858
+ case REACT_MEMO_TYPE:
37859
+ case REACT_PROVIDER_TYPE:
37860
+ return $$typeofType;
37861
+
37862
+ default:
37863
+ return $$typeof;
37864
+ }
37865
+
37866
+ }
37867
+
37868
+ case REACT_PORTAL_TYPE:
37869
+ return $$typeof;
37870
+ }
37871
+ }
37872
+
37873
+ return undefined;
37874
+ }
37875
+
37876
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
37877
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
37878
+ var ContextConsumer = REACT_CONTEXT_TYPE;
37879
+ var ContextProvider = REACT_PROVIDER_TYPE;
37880
+ var Element = REACT_ELEMENT_TYPE;
37881
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
37882
+ var Fragment = REACT_FRAGMENT_TYPE;
37883
+ var Lazy = REACT_LAZY_TYPE;
37884
+ var Memo = REACT_MEMO_TYPE;
37885
+ var Portal = REACT_PORTAL_TYPE;
37886
+ var Profiler = REACT_PROFILER_TYPE;
37887
+ var StrictMode = REACT_STRICT_MODE_TYPE;
37888
+ var Suspense = REACT_SUSPENSE_TYPE;
37889
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
37890
+
37891
+ function isAsyncMode(object) {
37892
+ {
37893
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
37894
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
37895
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
37896
+ }
37897
+ }
37898
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
37899
+ }
37900
+
37901
+ function isConcurrentMode(object) {
37902
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
37903
+ }
37904
+
37905
+ function isContextConsumer(object) {
37906
+ return typeOf(object) === REACT_CONTEXT_TYPE;
37907
+ }
37908
+
37909
+ function isContextProvider(object) {
37910
+ return typeOf(object) === REACT_PROVIDER_TYPE;
37911
+ }
37912
+
37913
+ function isElement(object) {
37914
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
37915
+ }
37916
+
37917
+ function isForwardRef(object) {
37918
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
37919
+ }
37920
+
37921
+ function isFragment(object) {
37922
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
37923
+ }
37924
+
37925
+ function isLazy(object) {
37926
+ return typeOf(object) === REACT_LAZY_TYPE;
37927
+ }
37928
+
37929
+ function isMemo(object) {
37930
+ return typeOf(object) === REACT_MEMO_TYPE;
37931
+ }
37932
+
37933
+ function isPortal(object) {
37934
+ return typeOf(object) === REACT_PORTAL_TYPE;
37935
+ }
37936
+
37937
+ function isProfiler(object) {
37938
+ return typeOf(object) === REACT_PROFILER_TYPE;
37939
+ }
37940
+
37941
+ function isStrictMode(object) {
37942
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
37943
+ }
37944
+
37945
+ function isSuspense(object) {
37946
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
37947
+ }
37948
+
37949
+ exports.AsyncMode = AsyncMode;
37950
+ exports.ConcurrentMode = ConcurrentMode;
37951
+ exports.ContextConsumer = ContextConsumer;
37952
+ exports.ContextProvider = ContextProvider;
37953
+ exports.Element = Element;
37954
+ exports.ForwardRef = ForwardRef;
37955
+ exports.Fragment = Fragment;
37956
+ exports.Lazy = Lazy;
37957
+ exports.Memo = Memo;
37958
+ exports.Portal = Portal;
37959
+ exports.Profiler = Profiler;
37960
+ exports.StrictMode = StrictMode;
37961
+ exports.Suspense = Suspense;
37962
+ exports.isAsyncMode = isAsyncMode;
37963
+ exports.isConcurrentMode = isConcurrentMode;
37964
+ exports.isContextConsumer = isContextConsumer;
37965
+ exports.isContextProvider = isContextProvider;
37966
+ exports.isElement = isElement;
37967
+ exports.isForwardRef = isForwardRef;
37968
+ exports.isFragment = isFragment;
37969
+ exports.isLazy = isLazy;
37970
+ exports.isMemo = isMemo;
37971
+ exports.isPortal = isPortal;
37972
+ exports.isProfiler = isProfiler;
37973
+ exports.isStrictMode = isStrictMode;
37974
+ exports.isSuspense = isSuspense;
37975
+ exports.isValidElementType = isValidElementType;
37976
+ exports.typeOf = typeOf;
37977
+ })();
37978
+ }
37979
+ });
37980
+
37981
+ var reactIs = createCommonjsModule(function (module) {
37982
+
37983
+ if (process.env.NODE_ENV === 'production') {
37984
+ module.exports = reactIs_production_min;
37985
+ } else {
37986
+ module.exports = reactIs_development;
37987
+ }
37988
+ });
37989
+
37990
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
37991
+ var ReactPropTypesSecret_1 = ReactPropTypesSecret;
37992
+
37993
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
37994
+
37995
+ var printWarning = function printWarning() {};
37996
+
37997
+ if (process.env.NODE_ENV !== 'production') {
37998
+ var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
37999
+ var loggedTypeFailures = {};
38000
+ var has$1 = has;
38001
+
38002
+ printWarning = function printWarning(text) {
38003
+ var message = 'Warning: ' + text;
38004
+
38005
+ if (typeof console !== 'undefined') {
38006
+ console.error(message);
38007
+ }
38008
+
38009
+ try {
38010
+ throw new Error(message);
38011
+ } catch (x) {}
38012
+ };
38013
+ }
38014
+
38015
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
38016
+ if (process.env.NODE_ENV !== 'production') {
38017
+ for (var typeSpecName in typeSpecs) {
38018
+ if (has$1(typeSpecs, typeSpecName)) {
38019
+ var error;
38020
+
38021
+ try {
38022
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
38023
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
38024
+ err.name = 'Invariant Violation';
38025
+ throw err;
38026
+ }
38027
+
38028
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
38029
+ } catch (ex) {
38030
+ error = ex;
38031
+ }
38032
+
38033
+ if (error && !(error instanceof Error)) {
38034
+ printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
38035
+ }
38036
+
38037
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
38038
+ loggedTypeFailures[error.message] = true;
38039
+ var stack = getStack ? getStack() : '';
38040
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
38041
+ }
38042
+ }
38043
+ }
38044
+ }
38045
+ }
38046
+
38047
+ checkPropTypes.resetWarningCache = function () {
38048
+ if (process.env.NODE_ENV !== 'production') {
38049
+ loggedTypeFailures = {};
38050
+ }
38051
+ };
38052
+
38053
+ var checkPropTypes_1 = checkPropTypes;
38054
+
38055
+ var printWarning$1 = function printWarning() {};
38056
+
38057
+ if (process.env.NODE_ENV !== 'production') {
38058
+ printWarning$1 = function printWarning(text) {
38059
+ var message = 'Warning: ' + text;
38060
+
38061
+ if (typeof console !== 'undefined') {
38062
+ console.error(message);
38063
+ }
38064
+
38065
+ try {
38066
+ throw new Error(message);
38067
+ } catch (x) {}
38068
+ };
38069
+ }
38070
+
38071
+ function emptyFunctionThatReturnsNull() {
38072
+ return null;
38073
+ }
38074
+
38075
+ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) {
38076
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
38077
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
38078
+
38079
+ function getIteratorFn(maybeIterable) {
38080
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
38081
+
38082
+ if (typeof iteratorFn === 'function') {
38083
+ return iteratorFn;
38084
+ }
38085
+ }
38086
+
38087
+ var ANONYMOUS = '<<anonymous>>';
38088
+ var ReactPropTypes = {
38089
+ array: createPrimitiveTypeChecker('array'),
38090
+ bigint: createPrimitiveTypeChecker('bigint'),
38091
+ bool: createPrimitiveTypeChecker('boolean'),
38092
+ func: createPrimitiveTypeChecker('function'),
38093
+ number: createPrimitiveTypeChecker('number'),
38094
+ object: createPrimitiveTypeChecker('object'),
38095
+ string: createPrimitiveTypeChecker('string'),
38096
+ symbol: createPrimitiveTypeChecker('symbol'),
38097
+ any: createAnyTypeChecker(),
38098
+ arrayOf: createArrayOfTypeChecker,
38099
+ element: createElementTypeChecker(),
38100
+ elementType: createElementTypeTypeChecker(),
38101
+ instanceOf: createInstanceTypeChecker,
38102
+ node: createNodeChecker(),
38103
+ objectOf: createObjectOfTypeChecker,
38104
+ oneOf: createEnumTypeChecker,
38105
+ oneOfType: createUnionTypeChecker,
38106
+ shape: createShapeTypeChecker,
38107
+ exact: createStrictShapeTypeChecker
38108
+ };
38109
+
38110
+ function is(x, y) {
38111
+ if (x === y) {
38112
+ return x !== 0 || 1 / x === 1 / y;
38113
+ } else {
38114
+ return x !== x && y !== y;
38115
+ }
38116
+ }
38117
+
38118
+ function PropTypeError(message, data) {
38119
+ this.message = message;
38120
+ this.data = data && typeof data === 'object' ? data : {};
38121
+ this.stack = '';
38122
+ }
38123
+
38124
+ PropTypeError.prototype = Error.prototype;
38125
+
38126
+ function createChainableTypeChecker(validate) {
38127
+ if (process.env.NODE_ENV !== 'production') {
38128
+ var manualPropTypeCallCache = {};
38129
+ var manualPropTypeWarningCount = 0;
38130
+ }
38131
+
38132
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
38133
+ componentName = componentName || ANONYMOUS;
38134
+ propFullName = propFullName || propName;
38135
+
38136
+ if (secret !== ReactPropTypesSecret_1) {
38137
+ if (throwOnDirectAccess) {
38138
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
38139
+ err.name = 'Invariant Violation';
38140
+ throw err;
38141
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
38142
+ var cacheKey = componentName + ':' + propName;
38143
+
38144
+ if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
38145
+ printWarning$1('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
38146
+ manualPropTypeCallCache[cacheKey] = true;
38147
+ manualPropTypeWarningCount++;
38148
+ }
38149
+ }
38150
+ }
38151
+
38152
+ if (props[propName] == null) {
38153
+ if (isRequired) {
38154
+ if (props[propName] === null) {
38155
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
38156
+ }
38157
+
38158
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
38159
+ }
38160
+
38161
+ return null;
38162
+ } else {
38163
+ return validate(props, propName, componentName, location, propFullName);
38164
+ }
38165
+ }
38166
+
38167
+ var chainedCheckType = checkType.bind(null, false);
38168
+ chainedCheckType.isRequired = checkType.bind(null, true);
38169
+ return chainedCheckType;
38170
+ }
38171
+
38172
+ function createPrimitiveTypeChecker(expectedType) {
38173
+ function validate(props, propName, componentName, location, propFullName, secret) {
38174
+ var propValue = props[propName];
38175
+ var propType = getPropType(propValue);
38176
+
38177
+ if (propType !== expectedType) {
38178
+ var preciseType = getPreciseType(propValue);
38179
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
38180
+ expectedType: expectedType
38181
+ });
38182
+ }
38183
+
38184
+ return null;
38185
+ }
38186
+
38187
+ return createChainableTypeChecker(validate);
38188
+ }
38189
+
38190
+ function createAnyTypeChecker() {
38191
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
38192
+ }
38193
+
38194
+ function createArrayOfTypeChecker(typeChecker) {
38195
+ function validate(props, propName, componentName, location, propFullName) {
38196
+ if (typeof typeChecker !== 'function') {
38197
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
38198
+ }
38199
+
38200
+ var propValue = props[propName];
38201
+
38202
+ if (!Array.isArray(propValue)) {
38203
+ var propType = getPropType(propValue);
38204
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
38205
+ }
38206
+
38207
+ for (var i = 0; i < propValue.length; i++) {
38208
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
38209
+
38210
+ if (error instanceof Error) {
38211
+ return error;
38212
+ }
38213
+ }
38214
+
38215
+ return null;
38216
+ }
38217
+
38218
+ return createChainableTypeChecker(validate);
38219
+ }
38220
+
38221
+ function createElementTypeChecker() {
38222
+ function validate(props, propName, componentName, location, propFullName) {
38223
+ var propValue = props[propName];
38224
+
38225
+ if (!isValidElement(propValue)) {
38226
+ var propType = getPropType(propValue);
38227
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
38228
+ }
38229
+
38230
+ return null;
38231
+ }
38232
+
38233
+ return createChainableTypeChecker(validate);
38234
+ }
38235
+
38236
+ function createElementTypeTypeChecker() {
38237
+ function validate(props, propName, componentName, location, propFullName) {
38238
+ var propValue = props[propName];
38239
+
38240
+ if (!reactIs.isValidElementType(propValue)) {
38241
+ var propType = getPropType(propValue);
38242
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
38243
+ }
38244
+
38245
+ return null;
38246
+ }
38247
+
38248
+ return createChainableTypeChecker(validate);
38249
+ }
38250
+
38251
+ function createInstanceTypeChecker(expectedClass) {
38252
+ function validate(props, propName, componentName, location, propFullName) {
38253
+ if (!(props[propName] instanceof expectedClass)) {
38254
+ var expectedClassName = expectedClass.name || ANONYMOUS;
38255
+ var actualClassName = getClassName(props[propName]);
38256
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
38257
+ }
38258
+
38259
+ return null;
38260
+ }
38261
+
38262
+ return createChainableTypeChecker(validate);
38263
+ }
38264
+
38265
+ function createEnumTypeChecker(expectedValues) {
38266
+ if (!Array.isArray(expectedValues)) {
38267
+ if (process.env.NODE_ENV !== 'production') {
38268
+ if (arguments.length > 1) {
38269
+ printWarning$1('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
38270
+ } else {
38271
+ printWarning$1('Invalid argument supplied to oneOf, expected an array.');
38272
+ }
38273
+ }
38274
+
38275
+ return emptyFunctionThatReturnsNull;
38276
+ }
38277
+
38278
+ function validate(props, propName, componentName, location, propFullName) {
38279
+ var propValue = props[propName];
38280
+
38281
+ for (var i = 0; i < expectedValues.length; i++) {
38282
+ if (is(propValue, expectedValues[i])) {
38283
+ return null;
38284
+ }
38285
+ }
38286
+
38287
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
38288
+ var type = getPreciseType(value);
38289
+
38290
+ if (type === 'symbol') {
38291
+ return String(value);
38292
+ }
38293
+
38294
+ return value;
38295
+ });
38296
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
38297
+ }
38298
+
38299
+ return createChainableTypeChecker(validate);
38300
+ }
38301
+
38302
+ function createObjectOfTypeChecker(typeChecker) {
38303
+ function validate(props, propName, componentName, location, propFullName) {
38304
+ if (typeof typeChecker !== 'function') {
38305
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
38306
+ }
38307
+
38308
+ var propValue = props[propName];
38309
+ var propType = getPropType(propValue);
38310
+
38311
+ if (propType !== 'object') {
38312
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
38313
+ }
38314
+
38315
+ for (var key in propValue) {
38316
+ if (has(propValue, key)) {
38317
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
38318
+
38319
+ if (error instanceof Error) {
38320
+ return error;
38321
+ }
38322
+ }
38323
+ }
38324
+
38325
+ return null;
38326
+ }
38327
+
38328
+ return createChainableTypeChecker(validate);
38329
+ }
38330
+
38331
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
38332
+ if (!Array.isArray(arrayOfTypeCheckers)) {
38333
+ process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
38334
+ return emptyFunctionThatReturnsNull;
38335
+ }
38336
+
38337
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
38338
+ var checker = arrayOfTypeCheckers[i];
38339
+
38340
+ if (typeof checker !== 'function') {
38341
+ printWarning$1('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
38342
+ return emptyFunctionThatReturnsNull;
38343
+ }
38344
+ }
38345
+
38346
+ function validate(props, propName, componentName, location, propFullName) {
38347
+ var expectedTypes = [];
38348
+
38349
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
38350
+ var checker = arrayOfTypeCheckers[i];
38351
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
38352
+
38353
+ if (checkerResult == null) {
38354
+ return null;
38355
+ }
38356
+
38357
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
38358
+ expectedTypes.push(checkerResult.data.expectedType);
38359
+ }
38360
+ }
38361
+
38362
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
38363
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
38364
+ }
38365
+
38366
+ return createChainableTypeChecker(validate);
38367
+ }
38368
+
38369
+ function createNodeChecker() {
38370
+ function validate(props, propName, componentName, location, propFullName) {
38371
+ if (!isNode(props[propName])) {
38372
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
38373
+ }
38374
+
38375
+ return null;
38376
+ }
38377
+
38378
+ return createChainableTypeChecker(validate);
38379
+ }
38380
+
38381
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
38382
+ return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
38383
+ }
38384
+
38385
+ function createShapeTypeChecker(shapeTypes) {
38386
+ function validate(props, propName, componentName, location, propFullName) {
38387
+ var propValue = props[propName];
38388
+ var propType = getPropType(propValue);
38389
+
38390
+ if (propType !== 'object') {
38391
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
38392
+ }
38393
+
38394
+ for (var key in shapeTypes) {
38395
+ var checker = shapeTypes[key];
38396
+
38397
+ if (typeof checker !== 'function') {
38398
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
38399
+ }
38400
+
38401
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
38402
+
38403
+ if (error) {
38404
+ return error;
38405
+ }
38406
+ }
38407
+
38408
+ return null;
38409
+ }
38410
+
38411
+ return createChainableTypeChecker(validate);
38412
+ }
38413
+
38414
+ function createStrictShapeTypeChecker(shapeTypes) {
38415
+ function validate(props, propName, componentName, location, propFullName) {
38416
+ var propValue = props[propName];
38417
+ var propType = getPropType(propValue);
38418
+
38419
+ if (propType !== 'object') {
38420
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
38421
+ }
38422
+
38423
+ var allKeys = objectAssign({}, props[propName], shapeTypes);
38424
+
38425
+ for (var key in allKeys) {
38426
+ var checker = shapeTypes[key];
38427
+
38428
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
38429
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
38430
+ }
38431
+
38432
+ if (!checker) {
38433
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
38434
+ }
38435
+
38436
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
38437
+
38438
+ if (error) {
38439
+ return error;
38440
+ }
38441
+ }
38442
+
38443
+ return null;
38444
+ }
38445
+
38446
+ return createChainableTypeChecker(validate);
38447
+ }
38448
+
38449
+ function isNode(propValue) {
38450
+ switch (typeof propValue) {
38451
+ case 'number':
38452
+ case 'string':
38453
+ case 'undefined':
38454
+ return true;
38455
+
38456
+ case 'boolean':
38457
+ return !propValue;
38458
+
38459
+ case 'object':
38460
+ if (Array.isArray(propValue)) {
38461
+ return propValue.every(isNode);
38462
+ }
38463
+
38464
+ if (propValue === null || isValidElement(propValue)) {
38465
+ return true;
38466
+ }
38467
+
38468
+ var iteratorFn = getIteratorFn(propValue);
38469
+
38470
+ if (iteratorFn) {
38471
+ var iterator = iteratorFn.call(propValue);
38472
+ var step;
38473
+
38474
+ if (iteratorFn !== propValue.entries) {
38475
+ while (!(step = iterator.next()).done) {
38476
+ if (!isNode(step.value)) {
38477
+ return false;
38478
+ }
38479
+ }
38480
+ } else {
38481
+ while (!(step = iterator.next()).done) {
38482
+ var entry = step.value;
38483
+
38484
+ if (entry) {
38485
+ if (!isNode(entry[1])) {
38486
+ return false;
38487
+ }
38488
+ }
38489
+ }
38490
+ }
38491
+ } else {
38492
+ return false;
38493
+ }
38494
+
38495
+ return true;
38496
+
38497
+ default:
38498
+ return false;
37329
38499
  }
38500
+ }
37330
38501
 
37331
- var homeCity = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
38502
+ function isSymbol(propType, propValue) {
38503
+ if (propType === 'symbol') {
38504
+ return true;
38505
+ }
37332
38506
 
37333
- if (selectedCity) {
37334
- return homeCity;
38507
+ if (!propValue) {
38508
+ return false;
37335
38509
  }
37336
38510
 
37337
- return homeCity || ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.permanentCity) || ULBService.getStateId();
37338
- },
37339
- getUserUlbs: function getUserUlbs(userRole) {
37340
- if (userRole === void 0) {
37341
- userRole = "";
38511
+ if (propValue['@@toStringTag'] === 'Symbol') {
38512
+ return true;
37342
38513
  }
37343
38514
 
37344
- var stringReplaceAll = function stringReplaceAll(str, searcher, replaceWith) {
37345
- if (str === void 0) {
37346
- str = "";
37347
- }
38515
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
38516
+ return true;
38517
+ }
37348
38518
 
37349
- if (searcher === void 0) {
37350
- searcher = "";
37351
- }
38519
+ return false;
38520
+ }
37352
38521
 
37353
- if (replaceWith === void 0) {
37354
- replaceWith = "";
37355
- }
38522
+ function getPropType(propValue) {
38523
+ var propType = typeof propValue;
37356
38524
 
37357
- if (searcher == "") return str;
38525
+ if (Array.isArray(propValue)) {
38526
+ return 'array';
38527
+ }
37358
38528
 
37359
- while ((_str = str) !== null && _str !== void 0 && _str.includes(searcher)) {
37360
- var _str, _str2;
38529
+ if (propValue instanceof RegExp) {
38530
+ return 'object';
38531
+ }
37361
38532
 
37362
- str = (_str2 = str) === null || _str2 === void 0 ? void 0 : _str2.replace(searcher, replaceWith);
37363
- }
38533
+ if (isSymbol(propType, propValue)) {
38534
+ return 'symbol';
38535
+ }
37364
38536
 
37365
- return str;
37366
- };
38537
+ return propType;
38538
+ }
37367
38539
 
37368
- var userloggedValues = Digit.SessionStorage.get("citizen.userRequestObject");
37369
- var teantsArray = [],
37370
- filteredArray = [];
38540
+ function getPreciseType(propValue) {
38541
+ if (typeof propValue === 'undefined' || propValue === null) {
38542
+ return '' + propValue;
38543
+ }
37371
38544
 
37372
- if (userRole === "") {
37373
- var _userloggedValues$inf, _userloggedValues$inf2;
38545
+ var propType = getPropType(propValue);
37374
38546
 
37375
- userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf = userloggedValues.info) === null || _userloggedValues$inf === void 0 ? void 0 : (_userloggedValues$inf2 = _userloggedValues$inf.roles) === null || _userloggedValues$inf2 === void 0 ? void 0 : _userloggedValues$inf2.forEach(function (role) {
37376
- return teantsArray.push(role.tenantId);
37377
- });
37378
- var unique = teantsArray.filter(function (item, i, ar) {
37379
- return ar.indexOf(item) === i;
37380
- });
37381
- unique === null || unique === void 0 ? void 0 : unique.forEach(function (uniCode) {
37382
- var _stringReplaceAll;
38547
+ if (propType === 'object') {
38548
+ if (propValue instanceof Date) {
38549
+ return 'date';
38550
+ } else if (propValue instanceof RegExp) {
38551
+ return 'regexp';
38552
+ }
38553
+ }
37383
38554
 
37384
- filteredArray.push({
37385
- i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll === void 0 ? void 0 : _stringReplaceAll.toUpperCase()),
37386
- value: uniCode,
37387
- code: uniCode,
37388
- name: uniCode.substring(uniCode.indexOf(".") + 1)
37389
- });
37390
- });
37391
- return filteredArray;
37392
- } else {
37393
- var _userloggedValues$inf3, _userloggedValues$inf4;
38555
+ return propType;
38556
+ }
37394
38557
 
37395
- userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf3 = userloggedValues.info) === null || _userloggedValues$inf3 === void 0 ? void 0 : (_userloggedValues$inf4 = _userloggedValues$inf3.roles) === null || _userloggedValues$inf4 === void 0 ? void 0 : _userloggedValues$inf4.forEach(function (role) {
37396
- if (userRole === role.code) teantsArray.push(role.tenantId);
37397
- });
38558
+ function getPostfixForTypeWarning(value) {
38559
+ var type = getPreciseType(value);
37398
38560
 
37399
- var _unique = teantsArray.filter(function (item, i, ar) {
37400
- return ar.indexOf(item) === i;
37401
- });
38561
+ switch (type) {
38562
+ case 'array':
38563
+ case 'object':
38564
+ return 'an ' + type;
37402
38565
 
37403
- _unique === null || _unique === void 0 ? void 0 : _unique.forEach(function (uniCode) {
37404
- var _stringReplaceAll2;
38566
+ case 'boolean':
38567
+ case 'date':
38568
+ case 'regexp':
38569
+ return 'a ' + type;
37405
38570
 
37406
- filteredArray.push({
37407
- i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll2 = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll2 === void 0 ? void 0 : _stringReplaceAll2.toUpperCase()),
37408
- value: uniCode,
37409
- code: uniCode,
37410
- name: uniCode.substring(uniCode.indexOf(".") + 1)
37411
- });
37412
- });
37413
- return filteredArray;
38571
+ default:
38572
+ return type;
37414
38573
  }
37415
38574
  }
37416
- };
37417
38575
 
37418
- var FileDesludging = {
37419
- create: function (tenantId, data) {
37420
- try {
37421
- return Promise.resolve(FSMService.create(data, tenantId));
37422
- } catch (e) {
37423
- return Promise.reject(e);
38576
+ function getClassName(propValue) {
38577
+ if (!propValue.constructor || !propValue.constructor.name) {
38578
+ return ANONYMOUS;
37424
38579
  }
37425
- }
37426
- };
37427
38580
 
37428
- var ComponentRegistry = /*#__PURE__*/function () {
37429
- function ComponentRegistry() {
37430
- this._registry = {};
38581
+ return propValue.constructor.name;
37431
38582
  }
37432
38583
 
37433
- var _proto = ComponentRegistry.prototype;
38584
+ ReactPropTypes.checkPropTypes = checkPropTypes_1;
38585
+ ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
38586
+ ReactPropTypes.PropTypes = ReactPropTypes;
38587
+ return ReactPropTypes;
38588
+ };
37434
38589
 
37435
- _proto.getComponent = function getComponent(id) {
37436
- return this._registry[id];
37437
- };
38590
+ function emptyFunction() {}
37438
38591
 
37439
- _proto.setComponent = function setComponent(id, component) {
37440
- this._registry[id] = component;
37441
- return true;
37442
- };
38592
+ function emptyFunctionWithReset() {}
37443
38593
 
37444
- _proto.setAllComponents = function setAllComponents(components) {
37445
- var _this = this;
38594
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
37446
38595
 
37447
- Object.entries(components).forEach(function (_ref) {
37448
- var key = _ref[0],
37449
- value = _ref[1];
38596
+ var factoryWithThrowingShims = function factoryWithThrowingShims() {
38597
+ function shim(props, propName, componentName, location, propFullName, secret) {
38598
+ if (secret === ReactPropTypesSecret_1) {
38599
+ return;
38600
+ }
37450
38601
 
37451
- _this.setComponent(key, value);
37452
- });
37453
- return this._registry;
38602
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
38603
+ err.name = 'Invariant Violation';
38604
+ throw err;
38605
+ }
38606
+ shim.isRequired = shim;
38607
+
38608
+ function getShim() {
38609
+ return shim;
38610
+ }
38611
+ var ReactPropTypes = {
38612
+ array: shim,
38613
+ bigint: shim,
38614
+ bool: shim,
38615
+ func: shim,
38616
+ number: shim,
38617
+ object: shim,
38618
+ string: shim,
38619
+ symbol: shim,
38620
+ any: shim,
38621
+ arrayOf: getShim,
38622
+ element: shim,
38623
+ elementType: shim,
38624
+ instanceOf: getShim,
38625
+ node: shim,
38626
+ objectOf: getShim,
38627
+ oneOf: getShim,
38628
+ oneOfType: getShim,
38629
+ shape: getShim,
38630
+ exact: getShim,
38631
+ checkPropTypes: emptyFunctionWithReset,
38632
+ resetWarningCache: emptyFunction
37454
38633
  };
38634
+ ReactPropTypes.PropTypes = ReactPropTypes;
38635
+ return ReactPropTypes;
38636
+ };
37455
38637
 
37456
- return ComponentRegistry;
37457
- }();
38638
+ var propTypes = createCommonjsModule(function (module) {
38639
+ if (process.env.NODE_ENV !== 'production') {
38640
+ var ReactIs = reactIs;
38641
+ var throwOnDirectAccess = true;
38642
+ module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
38643
+ } else {
38644
+ module.exports = factoryWithThrowingShims();
38645
+ }
38646
+ });
37458
38647
 
37459
- var componentRegistry = new ComponentRegistry();
37460
- var ComponentRegistryService = {
37461
- getComponent: function getComponent(id) {
37462
- return componentRegistry.getComponent(id);
37463
- },
37464
- setComponent: function setComponent(id, component) {
37465
- if (component === void 0) {
37466
- component = {};
37467
- }
38648
+ var useDocumentSearch = function useDocumentSearch(documents, config) {
38649
+ var _documents;
37468
38650
 
37469
- return componentRegistry.setComponent(id, component);
37470
- },
37471
- setupRegistry: function setupRegistry(components) {
37472
- return componentRegistry.setAllComponents(components);
37473
- },
37474
- getRegistry: function getRegistry() {
37475
- return componentRegistry;
38651
+ if (documents === void 0) {
38652
+ documents = [];
37476
38653
  }
37477
- };
37478
38654
 
37479
- var StoreData = {
37480
- getInitData: function getInitData() {
37481
- return StoreService.getInitData();
37482
- },
37483
- getCurrentLanguage: function getCurrentLanguage() {
37484
- return Digit.SessionStorage.get("locale") || "en_IN";
38655
+ if (config === void 0) {
38656
+ config = {};
37485
38657
  }
37486
- };
37487
38658
 
37488
- var ComponentProvider = React__default.createContext();
37489
- var Contexts = {
37490
- ComponentProvider: ComponentProvider
37491
- };
38659
+ var client = reactQuery.useQueryClient();
38660
+ var tenant = Digit.ULBService.getStateId();
38661
+ var filesArray = (_documents = documents) === null || _documents === void 0 ? void 0 : _documents.map(function (value) {
38662
+ return value === null || value === void 0 ? void 0 : value.fileStoreId;
38663
+ });
37492
38664
 
37493
- var useWorkflowDetails = function useWorkflowDetails(_ref) {
37494
- var tenantId = _ref.tenantId,
37495
- id = _ref.id,
37496
- moduleCode = _ref.moduleCode,
37497
- _ref$role = _ref.role,
37498
- role = _ref$role === void 0 ? "CITIZEN" : _ref$role,
37499
- getStaleData = _ref.getStaleData,
37500
- config = _ref.config,
37501
- _ref$getTripData = _ref.getTripData,
37502
- getTripData = _ref$getTripData === void 0 ? false : _ref$getTripData;
37503
- var queryClient = reactQuery.useQueryClient();
37504
- var staleDataConfig = {
37505
- staleTime: Infinity
37506
- };
38665
+ var _useQuery = reactQuery.useQuery([filesArray.join('')], function () {
38666
+ return Digit.UploadServices.Filefetch(filesArray, tenant);
38667
+ }, _extends({
38668
+ enabled: filesArray && filesArray.length > 0,
38669
+ select: function select(data) {
38670
+ return documents.map(function (document) {
38671
+ var _data$data, _data$data2, _data$data3;
37507
38672
 
37508
- var _useQuery = reactQuery.useQuery(["workFlowDetails", tenantId, id, moduleCode, role, config], function () {
37509
- return Digit.WorkflowService.getDetailsById({
37510
- tenantId: tenantId,
37511
- id: id,
37512
- moduleCode: moduleCode,
37513
- role: role,
37514
- getTripData: getTripData
37515
- });
37516
- }, getStaleData ? _extends({}, staleDataConfig, config) : config),
38673
+ return _extends({}, document, {
38674
+ fileURL: (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[document === null || document === void 0 ? void 0 : document.fileStoreId]) && Digit.Utils.getFileUrl(data.data[document === null || document === void 0 ? void 0 : document.fileStoreId]),
38675
+ url: (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2[document === null || document === void 0 ? void 0 : document.fileStoreId]) && Digit.Utils.getFileUrl(data.data[document === null || document === void 0 ? void 0 : document.fileStoreId]),
38676
+ fileResponse: (data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3[document === null || document === void 0 ? void 0 : document.fileStoreId]) || ""
38677
+ });
38678
+ });
38679
+ }
38680
+ }, config)),
37517
38681
  isLoading = _useQuery.isLoading,
37518
38682
  error = _useQuery.error,
37519
- isError = _useQuery.isError,
37520
38683
  data = _useQuery.data;
37521
38684
 
37522
- if (getStaleData) return {
37523
- isLoading: isLoading,
37524
- error: error,
37525
- isError: isError,
37526
- data: data
37527
- };
37528
38685
  return {
37529
38686
  isLoading: isLoading,
37530
38687
  error: error,
37531
- isError: isError,
37532
- data: data,
38688
+ data: {
38689
+ pdfFiles: data
38690
+ },
37533
38691
  revalidate: function revalidate() {
37534
- return queryClient.invalidateQueries(["workFlowDetails", tenantId, id, moduleCode, role]);
38692
+ return client.invalidateQueries([filesArray.join('')]);
37535
38693
  }
37536
38694
  };
37537
38695
  };
37538
-
37539
- var useSessionStorage = function useSessionStorage(key, initialValue) {
37540
- var _useState = React.useState(function () {
37541
- try {
37542
- var data = Digit.SessionStorage.get(key);
37543
- return data ? data : initialValue;
37544
- } catch (err) {
37545
- return initialValue;
37546
- }
37547
- }),
37548
- storedValue = _useState[0],
37549
- setStoredValue = _useState[1];
37550
-
37551
- var setValue = function setValue(value) {
37552
- try {
37553
- var valueToStore = value instanceof Function ? value(storedValue) : value;
37554
- setStoredValue(valueToStore);
37555
- Digit.SessionStorage.set(key, valueToStore);
37556
- } catch (err) {}
37557
- };
37558
-
37559
- var clearValue = function clearValue() {
37560
- setStoredValue(initialValue);
37561
- Digit.SessionStorage.set(key, initialValue);
37562
- };
37563
-
37564
- return [storedValue, setValue, clearValue];
38696
+ useDocumentSearch.propTypes = {
38697
+ documents: propTypes.array,
38698
+ config: propTypes.object
37565
38699
  };
37566
-
37567
- var useQueryParams = function useQueryParams() {
37568
- var queryString = window.location.search;
37569
- var urlParams = new URLSearchParams(queryString);
37570
- var params = {};
37571
- urlParams.forEach(function (value, key) {
37572
- params[key] = value;
37573
- });
37574
- return params;
38700
+ useDocumentSearch.defaultProps = {
38701
+ documents: [],
38702
+ config: {}
37575
38703
  };
37576
38704
 
37577
38705
  var useOnClickOutside = function useOnClickOutside(ref, handler, isActive, eventParam) {
@@ -45110,9 +46238,15 @@ var useBPAInbox = function useBPAInbox(_ref) {
45110
46238
  return item.code.split("_").pop();
45111
46239
  }).join(",")
45112
46240
  } : {}),
45113
- limit: limit,
45114
- offset: offset
46241
+ limit: limit
45115
46242
  };
46243
+
46244
+ if (!applicationNo) {
46245
+ _filters = _extends({}, _filters, {
46246
+ offset: offset
46247
+ });
46248
+ }
46249
+
45116
46250
  return useInbox({
45117
46251
  tenantId: tenantId,
45118
46252
  filters: _filters,
@@ -45509,8 +46643,8 @@ var useBusinessServiceData = function useBusinessServiceData(tenantId, businessS
45509
46643
  }, config);
45510
46644
  };
45511
46645
 
45512
- var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStateDocuments) {
45513
- var _bpaDocs$BPA, _filtredBpaDocs, _filtredBpaDocs$, _filtredBpaDocs$$docT;
46646
+ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, beforeUploadDocuments) {
46647
+ var _beforeUploadDocument, _data$pdfFiles, _bpaDocs$BPA, _filtredBpaDocs, _filtredBpaDocs$, _filtredBpaDocs$$docT;
45514
46648
 
45515
46649
  var _Digit$Hooks$obps$use = Digit.Hooks.obps.useMDMS(stateId, "BPA", ["DocTypeMapping"]),
45516
46650
  bpaDocsLoading = _Digit$Hooks$obps$use.isLoading,
@@ -45520,6 +46654,17 @@ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStat
45520
46654
  commonDocsLoading = _Digit$Hooks$obps$use2.isLoading,
45521
46655
  commonDocs = _Digit$Hooks$obps$use2.data;
45522
46656
 
46657
+ var documents = beforeUploadDocuments;
46658
+
46659
+ var _Digit$Hooks$useDocum = Digit.Hooks.useDocumentSearch(documents, {
46660
+ enabled: ((_beforeUploadDocument = beforeUploadDocuments) === null || _beforeUploadDocument === void 0 ? void 0 : _beforeUploadDocument.length) > 0 ? true : false
46661
+ }),
46662
+ data = _Digit$Hooks$useDocum.data;
46663
+
46664
+ if ((data === null || data === void 0 ? void 0 : (_data$pdfFiles = data.pdfFiles) === null || _data$pdfFiles === void 0 ? void 0 : _data$pdfFiles.length) > 0) {
46665
+ beforeUploadDocuments = data === null || data === void 0 ? void 0 : data.pdfFiles;
46666
+ }
46667
+
45523
46668
  var filtredBpaDocs = [];
45524
46669
 
45525
46670
  if (bpaDocs !== null && bpaDocs !== void 0 && (_bpaDocs$BPA = bpaDocs.BPA) !== null && _bpaDocs$BPA !== void 0 && _bpaDocs$BPA.DocTypeMapping) {
@@ -45550,7 +46695,7 @@ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStat
45550
46695
  });
45551
46696
  doc.uploadedDocuments[0] = {};
45552
46697
  doc.uploadedDocuments[0].values = [];
45553
- PrevStateDocuments.map(function (upDocs) {
46698
+ beforeUploadDocuments.map(function (upDocs) {
45554
46699
  var _upDocs$documentType, _upDocs$documentType2;
45555
46700
 
45556
46701
  if (code === (upDocs === null || upDocs === void 0 ? void 0 : (_upDocs$documentType = upDocs.documentType) === null || _upDocs$documentType === void 0 ? void 0 : _upDocs$documentType.split('.')[0]) + "." + (upDocs === null || upDocs === void 0 ? void 0 : (_upDocs$documentType2 = upDocs.documentType) === null || _upDocs$documentType2 === void 0 ? void 0 : _upDocs$documentType2.split('.')[1])) {
@@ -46631,6 +47776,7 @@ var Hooks = {
46631
47776
  useClearNotifications: useClearNotifications,
46632
47777
  useNotificationCount: useNotificationCount,
46633
47778
  useStore: useStore$1,
47779
+ useDocumentSearch: useDocumentSearch,
46634
47780
  useTenants: useTenants,
46635
47781
  useInbox: useTLInbox,
46636
47782
  pgr: pgr,