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