@egovernments/digit-ui-libraries 1.5.0-beta.9 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ import 'date-fns/esm';
13
13
  import { Link } from 'react-router-dom';
14
14
 
15
15
  function _extends() {
16
- _extends = Object.assign || function (target) {
16
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
17
17
  for (var i = 1; i < arguments.length; i++) {
18
18
  var source = arguments[i];
19
19
 
@@ -26,7 +26,6 @@ function _extends() {
26
26
 
27
27
  return target;
28
28
  };
29
-
30
29
  return _extends.apply(this, arguments);
31
30
  }
32
31
 
@@ -35901,23 +35900,50 @@ function cloneDeep(value) {
35901
35900
 
35902
35901
  var cloneDeep_1 = cloneDeep;
35903
35902
 
35904
- var getThumbnails = function getThumbnails(ids, tenantId) {
35903
+ var getThumbnails = function getThumbnails(ids, tenantId, documents) {
35904
+ if (documents === void 0) {
35905
+ documents = [];
35906
+ }
35907
+
35905
35908
  try {
35906
35909
  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
- };
35910
+
35911
+ if (window.location.href.includes("/obps/")) {
35912
+ var _documents;
35913
+
35914
+ if (((_documents = documents) === null || _documents === void 0 ? void 0 : _documents.length) > 0) {
35915
+ var _documents2;
35916
+
35917
+ var workflowsDocs = [];
35918
+ (_documents2 = documents) === null || _documents2 === void 0 ? void 0 : _documents2.map(function (doc) {
35919
+ if (doc !== null && doc !== void 0 && doc.url) {
35920
+ var thumbs = doc.url.split(",")[3] || doc.url.split(",")[0];
35921
+ workflowsDocs.push({
35922
+ thumbs: [thumbs],
35923
+ images: [Digit.Utils.getFileUrl(doc.url)]
35924
+ });
35925
+ }
35926
+ });
35927
+ return Promise.resolve(workflowsDocs === null || workflowsDocs === void 0 ? void 0 : workflowsDocs[0]);
35917
35928
  } else {
35918
- return null;
35929
+ return Promise.resolve(null);
35919
35930
  }
35920
- });
35931
+ } else {
35932
+ return Promise.resolve(Digit.UploadServices.Filefetch(ids, tenantId)).then(function (res) {
35933
+ if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) {
35934
+ return {
35935
+ thumbs: res.data.fileStoreIds.map(function (o) {
35936
+ return o.url.split(",")[3] || o.url.split(",")[0];
35937
+ }),
35938
+ images: res.data.fileStoreIds.map(function (o) {
35939
+ return Digit.Utils.getFileUrl(o.url);
35940
+ })
35941
+ };
35942
+ } else {
35943
+ return null;
35944
+ }
35945
+ });
35946
+ }
35921
35947
  } catch (e) {
35922
35948
  return Promise.reject(e);
35923
35949
  }
@@ -35925,45 +35951,86 @@ var getThumbnails = function getThumbnails(ids, tenantId) {
35925
35951
 
35926
35952
  var makeCommentsSubsidariesOfPreviousActions = function makeCommentsSubsidariesOfPreviousActions(wf) {
35927
35953
  try {
35928
- var _temp5 = function _temp5() {
35929
- var response = TimelineMap.get("tlActions");
35930
- return response;
35931
- };
35954
+ var _wf$;
35932
35955
 
35933
- var TimelineMap = new Map();
35956
+ var _temp9 = function _temp9() {
35957
+ function _temp6() {
35958
+ var response = TimelineMap.get("tlActions");
35959
+ return response;
35960
+ }
35934
35961
 
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") || [];
35962
+ var _temp5 = _forOf(wf, function (eventHappened) {
35963
+ function _temp4() {
35964
+ if (eventHappened.action === "COMMENT") {
35965
+ var commentAccumulator = TimelineMap.get("tlCommentStack") || [];
35966
+ TimelineMap.set("tlCommentStack", [].concat(commentAccumulator, [eventHappened]));
35967
+ } else {
35968
+ var eventAccumulator = TimelineMap.get("tlActions") || [];
35942
35969
 
35943
- var _commentAccumulator = TimelineMap.get("tlCommentStack") || [];
35970
+ var _commentAccumulator = TimelineMap.get("tlCommentStack") || [];
35944
35971
 
35945
- eventHappened.wfComments = [].concat(_commentAccumulator, eventHappened.comment ? [eventHappened] : []);
35946
- TimelineMap.set("tlActions", [].concat(eventAccumulator, [eventHappened]));
35947
- TimelineMap.delete("tlCommentStack");
35972
+ eventHappened.wfComments = [].concat(_commentAccumulator, eventHappened.comment ? [eventHappened] : []);
35973
+ TimelineMap.set("tlActions", [].concat(eventAccumulator, [eventHappened]));
35974
+ TimelineMap.delete("tlCommentStack");
35975
+ }
35948
35976
  }
35949
- }
35950
35977
 
35951
- var _temp = function () {
35952
- if (eventHappened !== null && eventHappened !== void 0 && eventHappened.documents) {
35953
- var _eventHappened$docume;
35978
+ var _temp3 = function () {
35979
+ if (eventHappened !== null && eventHappened !== void 0 && eventHappened.documents) {
35980
+ var _eventHappened$docume;
35981
+
35982
+ 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) {
35983
+ return e === null || e === void 0 ? void 0 : e.fileStoreId;
35984
+ }), eventHappened === null || eventHappened === void 0 ? void 0 : eventHappened.tenantId, eventHappened === null || eventHappened === void 0 ? void 0 : eventHappened.documents)).then(function (_getThumbnails) {
35985
+ eventHappened.thumbnailsToShow = _getThumbnails;
35986
+ });
35987
+ }
35988
+ }();
35989
+
35990
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
35991
+ });
35992
+
35993
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
35994
+ };
35995
+
35996
+ var TimelineMap = new Map();
35997
+ 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;
35998
+ var fileStoreIdsList = [];
35999
+ var res = {};
36000
+
36001
+ var _temp10 = function () {
36002
+ if (window.location.href.includes("/obps/")) {
36003
+ var _temp11 = function _temp11() {
36004
+ wf === null || wf === void 0 ? void 0 : wf.forEach(function (wfData) {
36005
+ var _wfData$documents;
36006
+
36007
+ wfData === null || wfData === void 0 ? void 0 : (_wfData$documents = wfData.documents) === null || _wfData$documents === void 0 ? void 0 : _wfData$documents.forEach(function (wfDoc) {
36008
+ if (wfDoc !== null && wfDoc !== void 0 && wfDoc.fileStoreId) wfDoc.url = res.data[wfDoc === null || wfDoc === void 0 ? void 0 : wfDoc.fileStoreId];
36009
+ });
36010
+ });
36011
+ };
35954
36012
 
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;
36013
+ wf === null || wf === void 0 ? void 0 : wf.map(function (wfData) {
36014
+ var _wfData$documents2;
36015
+
36016
+ wfData === null || wfData === void 0 ? void 0 : (_wfData$documents2 = wfData.documents) === null || _wfData$documents2 === void 0 ? void 0 : _wfData$documents2.map(function (wfDoc) {
36017
+ if (wfDoc !== null && wfDoc !== void 0 && wfDoc.fileStoreId) fileStoreIdsList.push(wfDoc === null || wfDoc === void 0 ? void 0 : wfDoc.fileStoreId);
35959
36018
  });
35960
- }
35961
- }();
36019
+ });
35962
36020
 
35963
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
35964
- });
36021
+ var _temp12 = function () {
36022
+ if ((fileStoreIdsList === null || fileStoreIdsList === void 0 ? void 0 : fileStoreIdsList.length) > 0) {
36023
+ return Promise.resolve(Digit.UploadServices.Filefetch(fileStoreIdsList, tenantId)).then(function (_Digit$UploadServices) {
36024
+ res = _Digit$UploadServices;
36025
+ });
36026
+ }
36027
+ }();
35965
36028
 
35966
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp5) : _temp5(_temp6));
36029
+ return _temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12);
36030
+ }
36031
+ }();
36032
+
36033
+ return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(_temp9) : _temp9(_temp10));
35967
36034
  } catch (e) {
35968
36035
  return Promise.reject(e);
35969
36036
  }
@@ -36023,13 +36090,13 @@ var WorkflowService = {
36023
36090
 
36024
36091
  var _exit = false;
36025
36092
 
36026
- function _temp14(_result2) {
36093
+ function _temp20(_result2) {
36027
36094
  return _exit ? _result2 : {};
36028
36095
  }
36029
36096
 
36030
36097
  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
36098
 
36032
- var _temp13 = function () {
36099
+ var _temp19 = function () {
36033
36100
  if (workflow && workflow.ProcessInstances) {
36034
36101
  var _processInstances$, _businessServiceRespo;
36035
36102
 
@@ -36110,7 +36177,7 @@ var WorkflowService = {
36110
36177
  return function () {
36111
36178
  if (processInstances.length > 0) {
36112
36179
  return Promise.resolve(makeCommentsSubsidariesOfPreviousActions(processInstances)).then(function (TLEnrichedWithWorflowData) {
36113
- function _temp12() {
36180
+ function _temp18() {
36114
36181
  var _workflow$ProcessInst, _workflow$ProcessInst2;
36115
36182
 
36116
36183
  var nextActions = actionRolePair;
@@ -36178,17 +36245,17 @@ var WorkflowService = {
36178
36245
  return checkPoint;
36179
36246
  });
36180
36247
 
36181
- var _temp11 = function () {
36248
+ var _temp17 = function () {
36182
36249
  if (getTripData) {
36183
- var _temp15 = _catch(function () {
36250
+ var _temp21 = _catch(function () {
36184
36251
  var filters = {
36185
36252
  businessService: 'FSM_VEHICLE_TRIP',
36186
36253
  refernceNos: id
36187
36254
  };
36188
36255
  return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
36189
- var _temp9 = function () {
36256
+ var _temp15 = function () {
36190
36257
  if (tripSearchResp && tripSearchResp.vehicleTrip && tripSearchResp.vehicleTrip.length) {
36191
- var _temp16 = function _temp16() {
36258
+ var _temp22 = function _temp22() {
36192
36259
  var tripTimeline = [];
36193
36260
  var disposalInProgressPosition = timeline.findIndex(function (data) {
36194
36261
  return data.status === "DISPOSAL_IN_PROGRESS";
@@ -36227,7 +36294,7 @@ var WorkflowService = {
36227
36294
  var _waitingForDisposedAction = [];
36228
36295
  var _disposedAction = [];
36229
36296
 
36230
- var _temp17 = _forOf(tripSearchResp.vehicleTrip, function (data) {
36297
+ var _temp23 = _forOf(tripSearchResp.vehicleTrip, function (data) {
36231
36298
  return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, data.applicationNo)).then(function (resp) {
36232
36299
  var _resp$ProcessInstance;
36233
36300
 
@@ -36297,19 +36364,19 @@ var WorkflowService = {
36297
36364
  });
36298
36365
  });
36299
36366
 
36300
- return _temp17 && _temp17.then ? _temp17.then(_temp16) : _temp16(_temp17);
36367
+ return _temp23 && _temp23.then ? _temp23.then(_temp22) : _temp22(_temp23);
36301
36368
  }
36302
36369
  }();
36303
36370
 
36304
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
36371
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
36305
36372
  });
36306
36373
  }, function () {});
36307
36374
 
36308
- if (_temp15 && _temp15.then) return _temp15.then(function () {});
36375
+ if (_temp21 && _temp21.then) return _temp21.then(function () {});
36309
36376
  }
36310
36377
  }();
36311
36378
 
36312
- return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
36379
+ return _temp17 && _temp17.then ? _temp17.then(_temp18) : _temp18(_temp17);
36313
36380
  });
36314
36381
  }
36315
36382
  }();
@@ -36318,7 +36385,7 @@ var WorkflowService = {
36318
36385
  }
36319
36386
  }();
36320
36387
 
36321
- return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
36388
+ return _temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19);
36322
36389
  });
36323
36390
  });
36324
36391
  } catch (e) {
@@ -37571,6 +37638,1066 @@ var useQueryParams = function useQueryParams() {
37571
37638
  return params;
37572
37639
  };
37573
37640
 
37641
+ var b$1 = "function" === typeof Symbol && Symbol.for,
37642
+ c = b$1 ? Symbol.for("react.element") : 60103,
37643
+ d = b$1 ? Symbol.for("react.portal") : 60106,
37644
+ e = b$1 ? Symbol.for("react.fragment") : 60107,
37645
+ f = b$1 ? Symbol.for("react.strict_mode") : 60108,
37646
+ g = b$1 ? Symbol.for("react.profiler") : 60114,
37647
+ h = b$1 ? Symbol.for("react.provider") : 60109,
37648
+ k$1 = b$1 ? Symbol.for("react.context") : 60110,
37649
+ l = b$1 ? Symbol.for("react.async_mode") : 60111,
37650
+ m = b$1 ? Symbol.for("react.concurrent_mode") : 60111,
37651
+ n = b$1 ? Symbol.for("react.forward_ref") : 60112,
37652
+ p = b$1 ? Symbol.for("react.suspense") : 60113,
37653
+ q = b$1 ? Symbol.for("react.suspense_list") : 60120,
37654
+ r = b$1 ? Symbol.for("react.memo") : 60115,
37655
+ t = b$1 ? Symbol.for("react.lazy") : 60116,
37656
+ v = b$1 ? Symbol.for("react.block") : 60121,
37657
+ w = b$1 ? Symbol.for("react.fundamental") : 60117,
37658
+ x = b$1 ? Symbol.for("react.responder") : 60118,
37659
+ y$1 = b$1 ? Symbol.for("react.scope") : 60119;
37660
+
37661
+ function z(a) {
37662
+ if ("object" === typeof a && null !== a) {
37663
+ var u = a.$$typeof;
37664
+
37665
+ switch (u) {
37666
+ case c:
37667
+ switch (a = a.type, a) {
37668
+ case l:
37669
+ case m:
37670
+ case e:
37671
+ case g:
37672
+ case f:
37673
+ case p:
37674
+ return a;
37675
+
37676
+ default:
37677
+ switch (a = a && a.$$typeof, a) {
37678
+ case k$1:
37679
+ case n:
37680
+ case t:
37681
+ case r:
37682
+ case h:
37683
+ return a;
37684
+
37685
+ default:
37686
+ return u;
37687
+ }
37688
+
37689
+ }
37690
+
37691
+ case d:
37692
+ return u;
37693
+ }
37694
+ }
37695
+ }
37696
+
37697
+ function A(a) {
37698
+ return z(a) === m;
37699
+ }
37700
+
37701
+ var AsyncMode = l;
37702
+ var ConcurrentMode = m;
37703
+ var ContextConsumer = k$1;
37704
+ var ContextProvider = h;
37705
+ var Element = c;
37706
+ var ForwardRef = n;
37707
+ var Fragment = e;
37708
+ var Lazy = t;
37709
+ var Memo = r;
37710
+ var Portal = d;
37711
+ var Profiler = g;
37712
+ var StrictMode = f;
37713
+ var Suspense = p;
37714
+
37715
+ var isAsyncMode = function isAsyncMode(a) {
37716
+ return A(a) || z(a) === l;
37717
+ };
37718
+
37719
+ var isConcurrentMode = A;
37720
+
37721
+ var isContextConsumer = function isContextConsumer(a) {
37722
+ return z(a) === k$1;
37723
+ };
37724
+
37725
+ var isContextProvider = function isContextProvider(a) {
37726
+ return z(a) === h;
37727
+ };
37728
+
37729
+ var isElement = function isElement(a) {
37730
+ return "object" === typeof a && null !== a && a.$$typeof === c;
37731
+ };
37732
+
37733
+ var isForwardRef = function isForwardRef(a) {
37734
+ return z(a) === n;
37735
+ };
37736
+
37737
+ var isFragment = function isFragment(a) {
37738
+ return z(a) === e;
37739
+ };
37740
+
37741
+ var isLazy = function isLazy(a) {
37742
+ return z(a) === t;
37743
+ };
37744
+
37745
+ var isMemo = function isMemo(a) {
37746
+ return z(a) === r;
37747
+ };
37748
+
37749
+ var isPortal = function isPortal(a) {
37750
+ return z(a) === d;
37751
+ };
37752
+
37753
+ var isProfiler = function isProfiler(a) {
37754
+ return z(a) === g;
37755
+ };
37756
+
37757
+ var isStrictMode = function isStrictMode(a) {
37758
+ return z(a) === f;
37759
+ };
37760
+
37761
+ var isSuspense = function isSuspense(a) {
37762
+ return z(a) === p;
37763
+ };
37764
+
37765
+ var isValidElementType = function isValidElementType(a) {
37766
+ 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);
37767
+ };
37768
+
37769
+ var typeOf = z;
37770
+ var reactIs_production_min = {
37771
+ AsyncMode: AsyncMode,
37772
+ ConcurrentMode: ConcurrentMode,
37773
+ ContextConsumer: ContextConsumer,
37774
+ ContextProvider: ContextProvider,
37775
+ Element: Element,
37776
+ ForwardRef: ForwardRef,
37777
+ Fragment: Fragment,
37778
+ Lazy: Lazy,
37779
+ Memo: Memo,
37780
+ Portal: Portal,
37781
+ Profiler: Profiler,
37782
+ StrictMode: StrictMode,
37783
+ Suspense: Suspense,
37784
+ isAsyncMode: isAsyncMode,
37785
+ isConcurrentMode: isConcurrentMode,
37786
+ isContextConsumer: isContextConsumer,
37787
+ isContextProvider: isContextProvider,
37788
+ isElement: isElement,
37789
+ isForwardRef: isForwardRef,
37790
+ isFragment: isFragment,
37791
+ isLazy: isLazy,
37792
+ isMemo: isMemo,
37793
+ isPortal: isPortal,
37794
+ isProfiler: isProfiler,
37795
+ isStrictMode: isStrictMode,
37796
+ isSuspense: isSuspense,
37797
+ isValidElementType: isValidElementType,
37798
+ typeOf: typeOf
37799
+ };
37800
+
37801
+ var reactIs_development = createCommonjsModule(function (module, exports) {
37802
+
37803
+ if (process.env.NODE_ENV !== "production") {
37804
+ (function () {
37805
+
37806
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
37807
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
37808
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
37809
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
37810
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
37811
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
37812
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
37813
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
37814
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
37815
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
37816
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
37817
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
37818
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
37819
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
37820
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
37821
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
37822
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
37823
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
37824
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
37825
+
37826
+ function isValidElementType(type) {
37827
+ 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);
37828
+ }
37829
+
37830
+ function typeOf(object) {
37831
+ if (typeof object === 'object' && object !== null) {
37832
+ var $$typeof = object.$$typeof;
37833
+
37834
+ switch ($$typeof) {
37835
+ case REACT_ELEMENT_TYPE:
37836
+ var type = object.type;
37837
+
37838
+ switch (type) {
37839
+ case REACT_ASYNC_MODE_TYPE:
37840
+ case REACT_CONCURRENT_MODE_TYPE:
37841
+ case REACT_FRAGMENT_TYPE:
37842
+ case REACT_PROFILER_TYPE:
37843
+ case REACT_STRICT_MODE_TYPE:
37844
+ case REACT_SUSPENSE_TYPE:
37845
+ return type;
37846
+
37847
+ default:
37848
+ var $$typeofType = type && type.$$typeof;
37849
+
37850
+ switch ($$typeofType) {
37851
+ case REACT_CONTEXT_TYPE:
37852
+ case REACT_FORWARD_REF_TYPE:
37853
+ case REACT_LAZY_TYPE:
37854
+ case REACT_MEMO_TYPE:
37855
+ case REACT_PROVIDER_TYPE:
37856
+ return $$typeofType;
37857
+
37858
+ default:
37859
+ return $$typeof;
37860
+ }
37861
+
37862
+ }
37863
+
37864
+ case REACT_PORTAL_TYPE:
37865
+ return $$typeof;
37866
+ }
37867
+ }
37868
+
37869
+ return undefined;
37870
+ }
37871
+
37872
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
37873
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
37874
+ var ContextConsumer = REACT_CONTEXT_TYPE;
37875
+ var ContextProvider = REACT_PROVIDER_TYPE;
37876
+ var Element = REACT_ELEMENT_TYPE;
37877
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
37878
+ var Fragment = REACT_FRAGMENT_TYPE;
37879
+ var Lazy = REACT_LAZY_TYPE;
37880
+ var Memo = REACT_MEMO_TYPE;
37881
+ var Portal = REACT_PORTAL_TYPE;
37882
+ var Profiler = REACT_PROFILER_TYPE;
37883
+ var StrictMode = REACT_STRICT_MODE_TYPE;
37884
+ var Suspense = REACT_SUSPENSE_TYPE;
37885
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
37886
+
37887
+ function isAsyncMode(object) {
37888
+ {
37889
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
37890
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
37891
+ 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.');
37892
+ }
37893
+ }
37894
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
37895
+ }
37896
+
37897
+ function isConcurrentMode(object) {
37898
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
37899
+ }
37900
+
37901
+ function isContextConsumer(object) {
37902
+ return typeOf(object) === REACT_CONTEXT_TYPE;
37903
+ }
37904
+
37905
+ function isContextProvider(object) {
37906
+ return typeOf(object) === REACT_PROVIDER_TYPE;
37907
+ }
37908
+
37909
+ function isElement(object) {
37910
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
37911
+ }
37912
+
37913
+ function isForwardRef(object) {
37914
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
37915
+ }
37916
+
37917
+ function isFragment(object) {
37918
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
37919
+ }
37920
+
37921
+ function isLazy(object) {
37922
+ return typeOf(object) === REACT_LAZY_TYPE;
37923
+ }
37924
+
37925
+ function isMemo(object) {
37926
+ return typeOf(object) === REACT_MEMO_TYPE;
37927
+ }
37928
+
37929
+ function isPortal(object) {
37930
+ return typeOf(object) === REACT_PORTAL_TYPE;
37931
+ }
37932
+
37933
+ function isProfiler(object) {
37934
+ return typeOf(object) === REACT_PROFILER_TYPE;
37935
+ }
37936
+
37937
+ function isStrictMode(object) {
37938
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
37939
+ }
37940
+
37941
+ function isSuspense(object) {
37942
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
37943
+ }
37944
+
37945
+ exports.AsyncMode = AsyncMode;
37946
+ exports.ConcurrentMode = ConcurrentMode;
37947
+ exports.ContextConsumer = ContextConsumer;
37948
+ exports.ContextProvider = ContextProvider;
37949
+ exports.Element = Element;
37950
+ exports.ForwardRef = ForwardRef;
37951
+ exports.Fragment = Fragment;
37952
+ exports.Lazy = Lazy;
37953
+ exports.Memo = Memo;
37954
+ exports.Portal = Portal;
37955
+ exports.Profiler = Profiler;
37956
+ exports.StrictMode = StrictMode;
37957
+ exports.Suspense = Suspense;
37958
+ exports.isAsyncMode = isAsyncMode;
37959
+ exports.isConcurrentMode = isConcurrentMode;
37960
+ exports.isContextConsumer = isContextConsumer;
37961
+ exports.isContextProvider = isContextProvider;
37962
+ exports.isElement = isElement;
37963
+ exports.isForwardRef = isForwardRef;
37964
+ exports.isFragment = isFragment;
37965
+ exports.isLazy = isLazy;
37966
+ exports.isMemo = isMemo;
37967
+ exports.isPortal = isPortal;
37968
+ exports.isProfiler = isProfiler;
37969
+ exports.isStrictMode = isStrictMode;
37970
+ exports.isSuspense = isSuspense;
37971
+ exports.isValidElementType = isValidElementType;
37972
+ exports.typeOf = typeOf;
37973
+ })();
37974
+ }
37975
+ });
37976
+
37977
+ var reactIs = createCommonjsModule(function (module) {
37978
+
37979
+ if (process.env.NODE_ENV === 'production') {
37980
+ module.exports = reactIs_production_min;
37981
+ } else {
37982
+ module.exports = reactIs_development;
37983
+ }
37984
+ });
37985
+
37986
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
37987
+ var ReactPropTypesSecret_1 = ReactPropTypesSecret;
37988
+
37989
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
37990
+
37991
+ var printWarning = function printWarning() {};
37992
+
37993
+ if (process.env.NODE_ENV !== 'production') {
37994
+ var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
37995
+ var loggedTypeFailures = {};
37996
+ var has$1 = has;
37997
+
37998
+ printWarning = function printWarning(text) {
37999
+ var message = 'Warning: ' + text;
38000
+
38001
+ if (typeof console !== 'undefined') {
38002
+ console.error(message);
38003
+ }
38004
+
38005
+ try {
38006
+ throw new Error(message);
38007
+ } catch (x) {}
38008
+ };
38009
+ }
38010
+
38011
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
38012
+ if (process.env.NODE_ENV !== 'production') {
38013
+ for (var typeSpecName in typeSpecs) {
38014
+ if (has$1(typeSpecs, typeSpecName)) {
38015
+ var error;
38016
+
38017
+ try {
38018
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
38019
+ 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`.');
38020
+ err.name = 'Invariant Violation';
38021
+ throw err;
38022
+ }
38023
+
38024
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
38025
+ } catch (ex) {
38026
+ error = ex;
38027
+ }
38028
+
38029
+ if (error && !(error instanceof Error)) {
38030
+ 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).');
38031
+ }
38032
+
38033
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
38034
+ loggedTypeFailures[error.message] = true;
38035
+ var stack = getStack ? getStack() : '';
38036
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
38037
+ }
38038
+ }
38039
+ }
38040
+ }
38041
+ }
38042
+
38043
+ checkPropTypes.resetWarningCache = function () {
38044
+ if (process.env.NODE_ENV !== 'production') {
38045
+ loggedTypeFailures = {};
38046
+ }
38047
+ };
38048
+
38049
+ var checkPropTypes_1 = checkPropTypes;
38050
+
38051
+ var printWarning$1 = function printWarning() {};
38052
+
38053
+ if (process.env.NODE_ENV !== 'production') {
38054
+ printWarning$1 = function printWarning(text) {
38055
+ var message = 'Warning: ' + text;
38056
+
38057
+ if (typeof console !== 'undefined') {
38058
+ console.error(message);
38059
+ }
38060
+
38061
+ try {
38062
+ throw new Error(message);
38063
+ } catch (x) {}
38064
+ };
38065
+ }
38066
+
38067
+ function emptyFunctionThatReturnsNull() {
38068
+ return null;
38069
+ }
38070
+
38071
+ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) {
38072
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
38073
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
38074
+
38075
+ function getIteratorFn(maybeIterable) {
38076
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
38077
+
38078
+ if (typeof iteratorFn === 'function') {
38079
+ return iteratorFn;
38080
+ }
38081
+ }
38082
+
38083
+ var ANONYMOUS = '<<anonymous>>';
38084
+ var ReactPropTypes = {
38085
+ array: createPrimitiveTypeChecker('array'),
38086
+ bigint: createPrimitiveTypeChecker('bigint'),
38087
+ bool: createPrimitiveTypeChecker('boolean'),
38088
+ func: createPrimitiveTypeChecker('function'),
38089
+ number: createPrimitiveTypeChecker('number'),
38090
+ object: createPrimitiveTypeChecker('object'),
38091
+ string: createPrimitiveTypeChecker('string'),
38092
+ symbol: createPrimitiveTypeChecker('symbol'),
38093
+ any: createAnyTypeChecker(),
38094
+ arrayOf: createArrayOfTypeChecker,
38095
+ element: createElementTypeChecker(),
38096
+ elementType: createElementTypeTypeChecker(),
38097
+ instanceOf: createInstanceTypeChecker,
38098
+ node: createNodeChecker(),
38099
+ objectOf: createObjectOfTypeChecker,
38100
+ oneOf: createEnumTypeChecker,
38101
+ oneOfType: createUnionTypeChecker,
38102
+ shape: createShapeTypeChecker,
38103
+ exact: createStrictShapeTypeChecker
38104
+ };
38105
+
38106
+ function is(x, y) {
38107
+ if (x === y) {
38108
+ return x !== 0 || 1 / x === 1 / y;
38109
+ } else {
38110
+ return x !== x && y !== y;
38111
+ }
38112
+ }
38113
+
38114
+ function PropTypeError(message, data) {
38115
+ this.message = message;
38116
+ this.data = data && typeof data === 'object' ? data : {};
38117
+ this.stack = '';
38118
+ }
38119
+
38120
+ PropTypeError.prototype = Error.prototype;
38121
+
38122
+ function createChainableTypeChecker(validate) {
38123
+ if (process.env.NODE_ENV !== 'production') {
38124
+ var manualPropTypeCallCache = {};
38125
+ var manualPropTypeWarningCount = 0;
38126
+ }
38127
+
38128
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
38129
+ componentName = componentName || ANONYMOUS;
38130
+ propFullName = propFullName || propName;
38131
+
38132
+ if (secret !== ReactPropTypesSecret_1) {
38133
+ if (throwOnDirectAccess) {
38134
+ 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');
38135
+ err.name = 'Invariant Violation';
38136
+ throw err;
38137
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
38138
+ var cacheKey = componentName + ':' + propName;
38139
+
38140
+ if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
38141
+ 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.');
38142
+ manualPropTypeCallCache[cacheKey] = true;
38143
+ manualPropTypeWarningCount++;
38144
+ }
38145
+ }
38146
+ }
38147
+
38148
+ if (props[propName] == null) {
38149
+ if (isRequired) {
38150
+ if (props[propName] === null) {
38151
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
38152
+ }
38153
+
38154
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
38155
+ }
38156
+
38157
+ return null;
38158
+ } else {
38159
+ return validate(props, propName, componentName, location, propFullName);
38160
+ }
38161
+ }
38162
+
38163
+ var chainedCheckType = checkType.bind(null, false);
38164
+ chainedCheckType.isRequired = checkType.bind(null, true);
38165
+ return chainedCheckType;
38166
+ }
38167
+
38168
+ function createPrimitiveTypeChecker(expectedType) {
38169
+ function validate(props, propName, componentName, location, propFullName, secret) {
38170
+ var propValue = props[propName];
38171
+ var propType = getPropType(propValue);
38172
+
38173
+ if (propType !== expectedType) {
38174
+ var preciseType = getPreciseType(propValue);
38175
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
38176
+ expectedType: expectedType
38177
+ });
38178
+ }
38179
+
38180
+ return null;
38181
+ }
38182
+
38183
+ return createChainableTypeChecker(validate);
38184
+ }
38185
+
38186
+ function createAnyTypeChecker() {
38187
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
38188
+ }
38189
+
38190
+ function createArrayOfTypeChecker(typeChecker) {
38191
+ function validate(props, propName, componentName, location, propFullName) {
38192
+ if (typeof typeChecker !== 'function') {
38193
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
38194
+ }
38195
+
38196
+ var propValue = props[propName];
38197
+
38198
+ if (!Array.isArray(propValue)) {
38199
+ var propType = getPropType(propValue);
38200
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
38201
+ }
38202
+
38203
+ for (var i = 0; i < propValue.length; i++) {
38204
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
38205
+
38206
+ if (error instanceof Error) {
38207
+ return error;
38208
+ }
38209
+ }
38210
+
38211
+ return null;
38212
+ }
38213
+
38214
+ return createChainableTypeChecker(validate);
38215
+ }
38216
+
38217
+ function createElementTypeChecker() {
38218
+ function validate(props, propName, componentName, location, propFullName) {
38219
+ var propValue = props[propName];
38220
+
38221
+ if (!isValidElement(propValue)) {
38222
+ var propType = getPropType(propValue);
38223
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
38224
+ }
38225
+
38226
+ return null;
38227
+ }
38228
+
38229
+ return createChainableTypeChecker(validate);
38230
+ }
38231
+
38232
+ function createElementTypeTypeChecker() {
38233
+ function validate(props, propName, componentName, location, propFullName) {
38234
+ var propValue = props[propName];
38235
+
38236
+ if (!reactIs.isValidElementType(propValue)) {
38237
+ var propType = getPropType(propValue);
38238
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
38239
+ }
38240
+
38241
+ return null;
38242
+ }
38243
+
38244
+ return createChainableTypeChecker(validate);
38245
+ }
38246
+
38247
+ function createInstanceTypeChecker(expectedClass) {
38248
+ function validate(props, propName, componentName, location, propFullName) {
38249
+ if (!(props[propName] instanceof expectedClass)) {
38250
+ var expectedClassName = expectedClass.name || ANONYMOUS;
38251
+ var actualClassName = getClassName(props[propName]);
38252
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
38253
+ }
38254
+
38255
+ return null;
38256
+ }
38257
+
38258
+ return createChainableTypeChecker(validate);
38259
+ }
38260
+
38261
+ function createEnumTypeChecker(expectedValues) {
38262
+ if (!Array.isArray(expectedValues)) {
38263
+ if (process.env.NODE_ENV !== 'production') {
38264
+ if (arguments.length > 1) {
38265
+ 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]).');
38266
+ } else {
38267
+ printWarning$1('Invalid argument supplied to oneOf, expected an array.');
38268
+ }
38269
+ }
38270
+
38271
+ return emptyFunctionThatReturnsNull;
38272
+ }
38273
+
38274
+ function validate(props, propName, componentName, location, propFullName) {
38275
+ var propValue = props[propName];
38276
+
38277
+ for (var i = 0; i < expectedValues.length; i++) {
38278
+ if (is(propValue, expectedValues[i])) {
38279
+ return null;
38280
+ }
38281
+ }
38282
+
38283
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
38284
+ var type = getPreciseType(value);
38285
+
38286
+ if (type === 'symbol') {
38287
+ return String(value);
38288
+ }
38289
+
38290
+ return value;
38291
+ });
38292
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
38293
+ }
38294
+
38295
+ return createChainableTypeChecker(validate);
38296
+ }
38297
+
38298
+ function createObjectOfTypeChecker(typeChecker) {
38299
+ function validate(props, propName, componentName, location, propFullName) {
38300
+ if (typeof typeChecker !== 'function') {
38301
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
38302
+ }
38303
+
38304
+ var propValue = props[propName];
38305
+ var propType = getPropType(propValue);
38306
+
38307
+ if (propType !== 'object') {
38308
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
38309
+ }
38310
+
38311
+ for (var key in propValue) {
38312
+ if (has(propValue, key)) {
38313
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
38314
+
38315
+ if (error instanceof Error) {
38316
+ return error;
38317
+ }
38318
+ }
38319
+ }
38320
+
38321
+ return null;
38322
+ }
38323
+
38324
+ return createChainableTypeChecker(validate);
38325
+ }
38326
+
38327
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
38328
+ if (!Array.isArray(arrayOfTypeCheckers)) {
38329
+ process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
38330
+ return emptyFunctionThatReturnsNull;
38331
+ }
38332
+
38333
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
38334
+ var checker = arrayOfTypeCheckers[i];
38335
+
38336
+ if (typeof checker !== 'function') {
38337
+ printWarning$1('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
38338
+ return emptyFunctionThatReturnsNull;
38339
+ }
38340
+ }
38341
+
38342
+ function validate(props, propName, componentName, location, propFullName) {
38343
+ var expectedTypes = [];
38344
+
38345
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
38346
+ var checker = arrayOfTypeCheckers[i];
38347
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
38348
+
38349
+ if (checkerResult == null) {
38350
+ return null;
38351
+ }
38352
+
38353
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
38354
+ expectedTypes.push(checkerResult.data.expectedType);
38355
+ }
38356
+ }
38357
+
38358
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
38359
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
38360
+ }
38361
+
38362
+ return createChainableTypeChecker(validate);
38363
+ }
38364
+
38365
+ function createNodeChecker() {
38366
+ function validate(props, propName, componentName, location, propFullName) {
38367
+ if (!isNode(props[propName])) {
38368
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
38369
+ }
38370
+
38371
+ return null;
38372
+ }
38373
+
38374
+ return createChainableTypeChecker(validate);
38375
+ }
38376
+
38377
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
38378
+ 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 + '`.');
38379
+ }
38380
+
38381
+ function createShapeTypeChecker(shapeTypes) {
38382
+ function validate(props, propName, componentName, location, propFullName) {
38383
+ var propValue = props[propName];
38384
+ var propType = getPropType(propValue);
38385
+
38386
+ if (propType !== 'object') {
38387
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
38388
+ }
38389
+
38390
+ for (var key in shapeTypes) {
38391
+ var checker = shapeTypes[key];
38392
+
38393
+ if (typeof checker !== 'function') {
38394
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
38395
+ }
38396
+
38397
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
38398
+
38399
+ if (error) {
38400
+ return error;
38401
+ }
38402
+ }
38403
+
38404
+ return null;
38405
+ }
38406
+
38407
+ return createChainableTypeChecker(validate);
38408
+ }
38409
+
38410
+ function createStrictShapeTypeChecker(shapeTypes) {
38411
+ function validate(props, propName, componentName, location, propFullName) {
38412
+ var propValue = props[propName];
38413
+ var propType = getPropType(propValue);
38414
+
38415
+ if (propType !== 'object') {
38416
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
38417
+ }
38418
+
38419
+ var allKeys = objectAssign({}, props[propName], shapeTypes);
38420
+
38421
+ for (var key in allKeys) {
38422
+ var checker = shapeTypes[key];
38423
+
38424
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
38425
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
38426
+ }
38427
+
38428
+ if (!checker) {
38429
+ 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, ' '));
38430
+ }
38431
+
38432
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
38433
+
38434
+ if (error) {
38435
+ return error;
38436
+ }
38437
+ }
38438
+
38439
+ return null;
38440
+ }
38441
+
38442
+ return createChainableTypeChecker(validate);
38443
+ }
38444
+
38445
+ function isNode(propValue) {
38446
+ switch (typeof propValue) {
38447
+ case 'number':
38448
+ case 'string':
38449
+ case 'undefined':
38450
+ return true;
38451
+
38452
+ case 'boolean':
38453
+ return !propValue;
38454
+
38455
+ case 'object':
38456
+ if (Array.isArray(propValue)) {
38457
+ return propValue.every(isNode);
38458
+ }
38459
+
38460
+ if (propValue === null || isValidElement(propValue)) {
38461
+ return true;
38462
+ }
38463
+
38464
+ var iteratorFn = getIteratorFn(propValue);
38465
+
38466
+ if (iteratorFn) {
38467
+ var iterator = iteratorFn.call(propValue);
38468
+ var step;
38469
+
38470
+ if (iteratorFn !== propValue.entries) {
38471
+ while (!(step = iterator.next()).done) {
38472
+ if (!isNode(step.value)) {
38473
+ return false;
38474
+ }
38475
+ }
38476
+ } else {
38477
+ while (!(step = iterator.next()).done) {
38478
+ var entry = step.value;
38479
+
38480
+ if (entry) {
38481
+ if (!isNode(entry[1])) {
38482
+ return false;
38483
+ }
38484
+ }
38485
+ }
38486
+ }
38487
+ } else {
38488
+ return false;
38489
+ }
38490
+
38491
+ return true;
38492
+
38493
+ default:
38494
+ return false;
38495
+ }
38496
+ }
38497
+
38498
+ function isSymbol(propType, propValue) {
38499
+ if (propType === 'symbol') {
38500
+ return true;
38501
+ }
38502
+
38503
+ if (!propValue) {
38504
+ return false;
38505
+ }
38506
+
38507
+ if (propValue['@@toStringTag'] === 'Symbol') {
38508
+ return true;
38509
+ }
38510
+
38511
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
38512
+ return true;
38513
+ }
38514
+
38515
+ return false;
38516
+ }
38517
+
38518
+ function getPropType(propValue) {
38519
+ var propType = typeof propValue;
38520
+
38521
+ if (Array.isArray(propValue)) {
38522
+ return 'array';
38523
+ }
38524
+
38525
+ if (propValue instanceof RegExp) {
38526
+ return 'object';
38527
+ }
38528
+
38529
+ if (isSymbol(propType, propValue)) {
38530
+ return 'symbol';
38531
+ }
38532
+
38533
+ return propType;
38534
+ }
38535
+
38536
+ function getPreciseType(propValue) {
38537
+ if (typeof propValue === 'undefined' || propValue === null) {
38538
+ return '' + propValue;
38539
+ }
38540
+
38541
+ var propType = getPropType(propValue);
38542
+
38543
+ if (propType === 'object') {
38544
+ if (propValue instanceof Date) {
38545
+ return 'date';
38546
+ } else if (propValue instanceof RegExp) {
38547
+ return 'regexp';
38548
+ }
38549
+ }
38550
+
38551
+ return propType;
38552
+ }
38553
+
38554
+ function getPostfixForTypeWarning(value) {
38555
+ var type = getPreciseType(value);
38556
+
38557
+ switch (type) {
38558
+ case 'array':
38559
+ case 'object':
38560
+ return 'an ' + type;
38561
+
38562
+ case 'boolean':
38563
+ case 'date':
38564
+ case 'regexp':
38565
+ return 'a ' + type;
38566
+
38567
+ default:
38568
+ return type;
38569
+ }
38570
+ }
38571
+
38572
+ function getClassName(propValue) {
38573
+ if (!propValue.constructor || !propValue.constructor.name) {
38574
+ return ANONYMOUS;
38575
+ }
38576
+
38577
+ return propValue.constructor.name;
38578
+ }
38579
+
38580
+ ReactPropTypes.checkPropTypes = checkPropTypes_1;
38581
+ ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
38582
+ ReactPropTypes.PropTypes = ReactPropTypes;
38583
+ return ReactPropTypes;
38584
+ };
38585
+
38586
+ function emptyFunction() {}
38587
+
38588
+ function emptyFunctionWithReset() {}
38589
+
38590
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
38591
+
38592
+ var factoryWithThrowingShims = function factoryWithThrowingShims() {
38593
+ function shim(props, propName, componentName, location, propFullName, secret) {
38594
+ if (secret === ReactPropTypesSecret_1) {
38595
+ return;
38596
+ }
38597
+
38598
+ 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');
38599
+ err.name = 'Invariant Violation';
38600
+ throw err;
38601
+ }
38602
+ shim.isRequired = shim;
38603
+
38604
+ function getShim() {
38605
+ return shim;
38606
+ }
38607
+ var ReactPropTypes = {
38608
+ array: shim,
38609
+ bigint: shim,
38610
+ bool: shim,
38611
+ func: shim,
38612
+ number: shim,
38613
+ object: shim,
38614
+ string: shim,
38615
+ symbol: shim,
38616
+ any: shim,
38617
+ arrayOf: getShim,
38618
+ element: shim,
38619
+ elementType: shim,
38620
+ instanceOf: getShim,
38621
+ node: shim,
38622
+ objectOf: getShim,
38623
+ oneOf: getShim,
38624
+ oneOfType: getShim,
38625
+ shape: getShim,
38626
+ exact: getShim,
38627
+ checkPropTypes: emptyFunctionWithReset,
38628
+ resetWarningCache: emptyFunction
38629
+ };
38630
+ ReactPropTypes.PropTypes = ReactPropTypes;
38631
+ return ReactPropTypes;
38632
+ };
38633
+
38634
+ var propTypes = createCommonjsModule(function (module) {
38635
+ if (process.env.NODE_ENV !== 'production') {
38636
+ var ReactIs = reactIs;
38637
+ var throwOnDirectAccess = true;
38638
+ module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
38639
+ } else {
38640
+ module.exports = factoryWithThrowingShims();
38641
+ }
38642
+ });
38643
+
38644
+ var useDocumentSearch = function useDocumentSearch(documents, config) {
38645
+ var _documents;
38646
+
38647
+ if (documents === void 0) {
38648
+ documents = [];
38649
+ }
38650
+
38651
+ if (config === void 0) {
38652
+ config = {};
38653
+ }
38654
+
38655
+ var client = useQueryClient();
38656
+ var tenant = Digit.ULBService.getStateId();
38657
+ var filesArray = (_documents = documents) === null || _documents === void 0 ? void 0 : _documents.map(function (value) {
38658
+ return value === null || value === void 0 ? void 0 : value.fileStoreId;
38659
+ });
38660
+
38661
+ var _useQuery = useQuery([filesArray.join('')], function () {
38662
+ return Digit.UploadServices.Filefetch(filesArray, tenant);
38663
+ }, _extends({
38664
+ enabled: filesArray && filesArray.length > 0,
38665
+ select: function select(data) {
38666
+ return documents.map(function (document) {
38667
+ var _data$data, _data$data2, _data$data3;
38668
+
38669
+ return _extends({}, document, {
38670
+ 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]),
38671
+ 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]),
38672
+ 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]) || ""
38673
+ });
38674
+ });
38675
+ }
38676
+ }, config)),
38677
+ isLoading = _useQuery.isLoading,
38678
+ error = _useQuery.error,
38679
+ data = _useQuery.data;
38680
+
38681
+ return {
38682
+ isLoading: isLoading,
38683
+ error: error,
38684
+ data: {
38685
+ pdfFiles: data
38686
+ },
38687
+ revalidate: function revalidate() {
38688
+ return client.invalidateQueries([filesArray.join('')]);
38689
+ }
38690
+ };
38691
+ };
38692
+ useDocumentSearch.propTypes = {
38693
+ documents: propTypes.array,
38694
+ config: propTypes.object
38695
+ };
38696
+ useDocumentSearch.defaultProps = {
38697
+ documents: [],
38698
+ config: {}
38699
+ };
38700
+
37574
38701
  var useOnClickOutside = function useOnClickOutside(ref, handler, isActive, eventParam) {
37575
38702
  if (eventParam === void 0) {
37576
38703
  eventParam = false;
@@ -42264,7 +43391,7 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
42264
43391
  };
42265
43392
 
42266
43393
  var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
42267
- var _data, _data$value, _data$value$tradeLice, _data2, _data2$value, _data2$value$owners, _data2$value$owners$d, _data3, _data3$value, _data3$value$owners, _data3$value$owners$d, _data4, _data4$value, _data4$value$owners, _data4$value$owners$d;
43394
+ var _data, _data$value, _data$value$tradeLice, _data2, _data2$value, _data3, _data3$value, _data3$value$workflow, _data4, _data4$value, _data4$value$owners, _data4$value$owners$d, _data5, _data5$value, _data5$value$owners, _data5$value$owners$d, _data6, _data6$value, _data6$value$owners, _data6$value$owners$d;
42268
43395
 
42269
43396
  if (data1 === void 0) {
42270
43397
  data1 = {};
@@ -42276,9 +43403,12 @@ var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
42276
43403
  var filesArray = window.location.href.includes("/tl/tradelicence/application/") ? (_data = data1) === null || _data === void 0 ? void 0 : (_data$value = _data.value) === null || _data$value === void 0 ? void 0 : (_data$value$tradeLice = _data$value.tradeLicenseDetail) === null || _data$value$tradeLice === void 0 ? void 0 : _data$value$tradeLice.applicationDocuments.map(function (ob) {
42277
43404
  return ob === null || ob === void 0 ? void 0 : ob.fileStoreId;
42278
43405
  }) : [];
42279
- if ((_data2 = data1) !== null && _data2 !== void 0 && (_data2$value = _data2.value) !== null && _data2$value !== void 0 && (_data2$value$owners = _data2$value.owners) !== null && _data2$value$owners !== void 0 && (_data2$value$owners$d = _data2$value$owners.documents["OwnerPhotoProof"]) !== null && _data2$value$owners$d !== void 0 && _data2$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["OwnerPhotoProof"].fileStoreId);
42280
- if ((_data3 = data1) !== null && _data3 !== void 0 && (_data3$value = _data3.value) !== null && _data3$value !== void 0 && (_data3$value$owners = _data3$value.owners) !== null && _data3$value$owners !== void 0 && (_data3$value$owners$d = _data3$value$owners.documents["ProofOfIdentity"]) !== null && _data3$value$owners$d !== void 0 && _data3$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfIdentity"].fileStoreId);
42281
- if ((_data4 = data1) !== null && _data4 !== void 0 && (_data4$value = _data4.value) !== null && _data4$value !== void 0 && (_data4$value$owners = _data4$value.owners) !== null && _data4$value$owners !== void 0 && (_data4$value$owners$d = _data4$value$owners.documents["ProofOfOwnership"]) !== null && _data4$value$owners$d !== void 0 && _data4$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfOwnership"].fileStoreId);
43406
+ if ((_data2 = data1) !== null && _data2 !== void 0 && (_data2$value = _data2.value) !== null && _data2$value !== void 0 && _data2$value.workflowDocs) filesArray = (_data3 = data1) === null || _data3 === void 0 ? void 0 : (_data3$value = _data3.value) === null || _data3$value === void 0 ? void 0 : (_data3$value$workflow = _data3$value.workflowDocs) === null || _data3$value$workflow === void 0 ? void 0 : _data3$value$workflow.map(function (ob) {
43407
+ return ob === null || ob === void 0 ? void 0 : ob.fileStoreId;
43408
+ });
43409
+ if ((_data4 = data1) !== null && _data4 !== void 0 && (_data4$value = _data4.value) !== null && _data4$value !== void 0 && (_data4$value$owners = _data4$value.owners) !== null && _data4$value$owners !== void 0 && (_data4$value$owners$d = _data4$value$owners.documents["OwnerPhotoProof"]) !== null && _data4$value$owners$d !== void 0 && _data4$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["OwnerPhotoProof"].fileStoreId);
43410
+ if ((_data5 = data1) !== null && _data5 !== void 0 && (_data5$value = _data5.value) !== null && _data5$value !== void 0 && (_data5$value$owners = _data5$value.owners) !== null && _data5$value$owners !== void 0 && (_data5$value$owners$d = _data5$value$owners.documents["ProofOfIdentity"]) !== null && _data5$value$owners$d !== void 0 && _data5$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfIdentity"].fileStoreId);
43411
+ if ((_data6 = data1) !== null && _data6 !== void 0 && (_data6$value = _data6.value) !== null && _data6$value !== void 0 && (_data6$value$owners = _data6$value.owners) !== null && _data6$value$owners !== void 0 && (_data6$value$owners$d = _data6$value$owners.documents["ProofOfOwnership"]) !== null && _data6$value$owners$d !== void 0 && _data6$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfOwnership"].fileStoreId);
42282
43412
 
42283
43413
  var _useQuery = useQuery(["tlDocuments-" + 1, filesArray], function () {
42284
43414
  return Digit.UploadServices.Filefetch(filesArray, tenant);
@@ -42588,7 +43718,7 @@ var TLSearch = {
42588
43718
  value: response !== null && response !== void 0 && (_response$tradeLicens2 = response.tradeLicenseDetail) !== null && _response$tradeLicens2 !== void 0 && _response$tradeLicens2.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens3 = response.tradeLicenseDetail) === null || _response$tradeLicens3 === void 0 ? void 0 : (_response$tradeLicens4 = _response$tradeLicens3.structureType) === null || _response$tradeLicens4 === void 0 ? void 0 : _response$tradeLicens4.split(".")[0]) : "NA"
42589
43719
  }, {
42590
43720
  title: "TL_NEW_TRADE_DETAILS_STRUCT_SUB_TYPE_LABEL",
42591
- value: response !== null && response !== void 0 && (_response$tradeLicens5 = response.tradeLicenseDetail) !== null && _response$tradeLicens5 !== void 0 && _response$tradeLicens5.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + stringReplaceAll$2(response === null || response === void 0 ? void 0 : (_response$tradeLicens6 = response.tradeLicenseDetail) === null || _response$tradeLicens6 === void 0 ? void 0 : _response$tradeLicens6.structureType, ".", "_") : "NA"
43721
+ value: response !== null && response !== void 0 && (_response$tradeLicens5 = response.tradeLicenseDetail) !== null && _response$tradeLicens5 !== void 0 && _response$tradeLicens5.structureType ? "TL_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens6 = response.tradeLicenseDetail) === null || _response$tradeLicens6 === void 0 ? void 0 : _response$tradeLicens6.tradeType) : "NA"
42592
43722
  }, {
42593
43723
  title: "TL_NEW_TRADE_DETAILS_TRADE_COMM_DATE_LABEL",
42594
43724
  value: response !== null && response !== void 0 && response.commencementDate ? convertEpochToDate(response === null || response === void 0 ? void 0 : response.commencementDate) : "NA"
@@ -43533,13 +44663,14 @@ var SearchMdmsTypes = {
43533
44663
  var _data$BPA3, _data$BPA3$BPAAppicat;
43534
44664
 
43535
44665
  return [].concat(data === null || data === void 0 ? void 0 : (_data$BPA3 = data.BPA) === null || _data$BPA3 === void 0 ? void 0 : (_data$BPA3$BPAAppicat = _data$BPA3.BPAAppicationMapping) === null || _data$BPA3$BPAAppicat === void 0 ? void 0 : _data$BPA3$BPAAppicat.filter(function (currentObject) {
43536
- var _currentObject$roles;
44666
+ var _userInfo$value, _currentObject$roles;
43537
44667
 
44668
+ var userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
44669
+ var userInfo = userInfos ? JSON.parse(userInfos) : {};
44670
+ var userInformation = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$value = userInfo.value) === null || _userInfo$value === void 0 ? void 0 : _userInfo$value.info;
43538
44671
  var flag = 0;
43539
44672
  currentObject === null || currentObject === void 0 ? void 0 : (_currentObject$roles = currentObject.roles) === null || _currentObject$roles === void 0 ? void 0 : _currentObject$roles.map(function (bpaRole) {
43540
- var _Digit$UserService$ge, _Digit$UserService$ge2;
43541
-
43542
- var found = (_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.roles.some(function (role) {
44673
+ var found = userInformation === null || userInformation === void 0 ? void 0 : userInformation.roles.some(function (role) {
43543
44674
  return (role === null || role === void 0 ? void 0 : role.code) === bpaRole;
43544
44675
  });
43545
44676
  if (found == true) flag = 1;
@@ -43857,21 +44988,124 @@ var OBPSService = {
43857
44988
  isEmployee: true
43858
44989
  })).then(function (paymentRes) {
43859
44990
  return Promise.resolve(MdmsService.getMultipleTypes(License === null || License === void 0 ? void 0 : License.tenantId, "StakeholderRegistraition", ["TradeTypetoRoleMapping"])).then(function (mdmsRes) {
43860
- var _License$tradeLicense, _License$tradeLicense2, _mdmsRes$StakeholderR, _mdmsRes$StakeholderR2, _License$tradeLicense8, _License$tradeLicense9, _License$tradeLicense10, _License$tradeLicense11, _License$tradeLicense12, _License$tradeLicense13, _License$tradeLicense14, _License$tradeLicense15, _License$tradeLicense16, _License$tradeLicense17, _License$tradeLicense18, _License$tradeLicense19, _License$tradeLicense20, _License$tradeLicense21, _License$tradeLicense22, _License$tradeLicense23, _License$tradeLicense24, _License$tradeLicense25, _License$tradeLicense26, _License$tradeLicense27, _License$tradeLicense28, _License$tradeLicense29, _License$tradeLicense30, _License$tradeLicense31, _License$tradeLicense32, _License$tradeLicense33, _License$tradeLicense34, _License$tradeLicense35, _License$tradeLicense36, _License$tradeLicense37, _License$tradeLicense38, _License$tradeLicense39, _License$tradeLicense40, _License$tradeLicense41, _License$tradeLicense42, _License$tradeLicense43, _paymentRes$Payments, _paymentRes$Payments2, _paymentRes$Payments3, _paymentRes$Payments4, _paymentRes$Payments5, _ref;
44991
+ var _License$tradeLicense37, _License$tradeLicense38, _mdmsRes$StakeholderR, _mdmsRes$StakeholderR2, _License$tradeLicense44, _License$tradeLicense45;
43861
44992
 
43862
- if (License !== null && License !== void 0 && (_License$tradeLicense = License.tradeLicenseDetail) !== null && _License$tradeLicense !== void 0 && (_License$tradeLicense2 = _License$tradeLicense.applicationDocuments) !== null && _License$tradeLicense2 !== void 0 && _License$tradeLicense2.length && (mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$StakeholderR = mdmsRes.StakeholderRegistraition) === null || _mdmsRes$StakeholderR === void 0 ? void 0 : (_mdmsRes$StakeholderR2 = _mdmsRes$StakeholderR.TradeTypetoRoleMapping) === null || _mdmsRes$StakeholderR2 === void 0 ? void 0 : _mdmsRes$StakeholderR2.length) > 0) {
44993
+ function _temp2() {
44994
+ var _License$tradeLicense, _License$tradeLicense2, _License$tradeLicense3, _License$tradeLicense4, _License$tradeLicense5, _License$tradeLicense6, _License$tradeLicense7, _License$tradeLicense8, _License$tradeLicense9, _License$tradeLicense10, _License$tradeLicense11, _License$tradeLicense12, _License$tradeLicense13, _License$tradeLicense14, _License$tradeLicense15, _License$tradeLicense16, _License$tradeLicense17, _License$tradeLicense18, _License$tradeLicense19, _License$tradeLicense20, _License$tradeLicense21, _License$tradeLicense22, _License$tradeLicense23, _License$tradeLicense24, _License$tradeLicense25, _License$tradeLicense26, _License$tradeLicense27, _License$tradeLicense28, _License$tradeLicense29, _License$tradeLicense30, _License$tradeLicense31, _License$tradeLicense32, _License$tradeLicense33, _License$tradeLicense34, _License$tradeLicense35, _License$tradeLicense36, _paymentRes$Payments, _paymentRes$Payments2, _paymentRes$Payments3, _paymentRes$Payments4, _paymentRes$Payments5, _ref;
44995
+
44996
+ var details = [{
44997
+ title: " ",
44998
+ values: [{
44999
+ title: "BPA_APPLICATION_NUMBER_LABEL",
45000
+ value: (License === null || License === void 0 ? void 0 : License.applicationNumber) || "NA"
45001
+ }]
45002
+ }, License !== null && License !== void 0 && (_License$tradeLicense = License.tradeLicenseDetail) !== null && _License$tradeLicense !== void 0 && (_License$tradeLicense2 = _License$tradeLicense.tradeUnits) !== null && _License$tradeLicense2 !== void 0 && (_License$tradeLicense3 = _License$tradeLicense2[0]) !== null && _License$tradeLicense3 !== void 0 && _License$tradeLicense3.tradeType.includes("ARCHITECT") ? {
45003
+ title: "BPA_LICENSE_DETAILS_LABEL",
45004
+ asSectionHeader: true,
45005
+ values: [{
45006
+ title: "BPA_LICENSE_TYPE",
45007
+ value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense4 = License.tradeLicenseDetail) === null || _License$tradeLicense4 === void 0 ? void 0 : (_License$tradeLicense5 = _License$tradeLicense4.tradeUnits) === null || _License$tradeLicense5 === void 0 ? void 0 : (_License$tradeLicense6 = _License$tradeLicense5[0]) === null || _License$tradeLicense6 === void 0 ? void 0 : (_License$tradeLicense7 = _License$tradeLicense6.tradeType) === null || _License$tradeLicense7 === void 0 ? void 0 : _License$tradeLicense7.split(".")[0]) || "NA"
45008
+ }, {
45009
+ title: "BPA_COUNCIL_OF_ARCH_NO_LABEL",
45010
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense8 = License.tradeLicenseDetail) === null || _License$tradeLicense8 === void 0 ? void 0 : (_License$tradeLicense9 = _License$tradeLicense8.additionalDetail) === null || _License$tradeLicense9 === void 0 ? void 0 : _License$tradeLicense9.counsilForArchNo) || "NA"
45011
+ }]
45012
+ } : {
45013
+ title: "BPA_LICENSE_DETAILS_LABEL",
45014
+ asSectionHeader: true,
45015
+ values: [{
45016
+ title: "BPA_LICENSE_TYPE",
45017
+ value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense10 = License.tradeLicenseDetail) === null || _License$tradeLicense10 === void 0 ? void 0 : (_License$tradeLicense11 = _License$tradeLicense10.tradeUnits) === null || _License$tradeLicense11 === void 0 ? void 0 : (_License$tradeLicense12 = _License$tradeLicense11[0]) === null || _License$tradeLicense12 === void 0 ? void 0 : (_License$tradeLicense13 = _License$tradeLicense12.tradeType) === null || _License$tradeLicense13 === void 0 ? void 0 : _License$tradeLicense13.split(".")[0]) || "NA"
45018
+ }]
45019
+ }, {
45020
+ title: "BPA_LICENSEE_DETAILS_HEADER_OWNER_INFO",
45021
+ asSectionHeader: true,
45022
+ values: [{
45023
+ title: "BPA_APPLICANT_NAME_LABEL",
45024
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense14 = License.tradeLicenseDetail) === null || _License$tradeLicense14 === void 0 ? void 0 : (_License$tradeLicense15 = _License$tradeLicense14.owners) === null || _License$tradeLicense15 === void 0 ? void 0 : (_License$tradeLicense16 = _License$tradeLicense15[0]) === null || _License$tradeLicense16 === void 0 ? void 0 : _License$tradeLicense16.name) || "NA"
45025
+ }, {
45026
+ title: "BPA_APPLICANT_GENDER_LABEL",
45027
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense17 = License.tradeLicenseDetail) === null || _License$tradeLicense17 === void 0 ? void 0 : (_License$tradeLicense18 = _License$tradeLicense17.owners) === null || _License$tradeLicense18 === void 0 ? void 0 : (_License$tradeLicense19 = _License$tradeLicense18[0]) === null || _License$tradeLicense19 === void 0 ? void 0 : _License$tradeLicense19.gender) || "NA"
45028
+ }, {
45029
+ title: "BPA_OWNER_MOBILE_NO_LABEL",
45030
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense20 = License.tradeLicenseDetail) === null || _License$tradeLicense20 === void 0 ? void 0 : (_License$tradeLicense21 = _License$tradeLicense20.owners) === null || _License$tradeLicense21 === void 0 ? void 0 : (_License$tradeLicense22 = _License$tradeLicense21[0]) === null || _License$tradeLicense22 === void 0 ? void 0 : _License$tradeLicense22.mobileNumber) || "NA"
45031
+ }, {
45032
+ title: "BPA_APPLICANT_EMAIL_LABEL",
45033
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense23 = License.tradeLicenseDetail) === null || _License$tradeLicense23 === void 0 ? void 0 : (_License$tradeLicense24 = _License$tradeLicense23.owners) === null || _License$tradeLicense24 === void 0 ? void 0 : (_License$tradeLicense25 = _License$tradeLicense24[0]) === null || _License$tradeLicense25 === void 0 ? void 0 : _License$tradeLicense25.emailId) || "NA"
45034
+ }, {
45035
+ title: "BPA_APPLICANT_PAN_NO",
45036
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense26 = License.tradeLicenseDetail) === null || _License$tradeLicense26 === void 0 ? void 0 : (_License$tradeLicense27 = _License$tradeLicense26.owners) === null || _License$tradeLicense27 === void 0 ? void 0 : (_License$tradeLicense28 = _License$tradeLicense27[0]) === null || _License$tradeLicense28 === void 0 ? void 0 : _License$tradeLicense28.pan) || "NA"
45037
+ }]
45038
+ }, {
45039
+ title: "BPA_PERMANANT_ADDRESS_LABEL",
45040
+ asSectionHeader: true,
45041
+ values: [{
45042
+ title: "BPA_PERMANANT_ADDRESS_LABEL",
45043
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense29 = License.tradeLicenseDetail) === null || _License$tradeLicense29 === void 0 ? void 0 : (_License$tradeLicense30 = _License$tradeLicense29.owners) === null || _License$tradeLicense30 === void 0 ? void 0 : (_License$tradeLicense31 = _License$tradeLicense30[0]) === null || _License$tradeLicense31 === void 0 ? void 0 : _License$tradeLicense31.permanentAddress) || "NA"
45044
+ }]
45045
+ }, {
45046
+ title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
45047
+ asSectionHeader: true,
45048
+ values: [{
45049
+ title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
45050
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense32 = License.tradeLicenseDetail) === null || _License$tradeLicense32 === void 0 ? void 0 : (_License$tradeLicense33 = _License$tradeLicense32.owners) === null || _License$tradeLicense33 === void 0 ? void 0 : (_License$tradeLicense34 = _License$tradeLicense33[0]) === null || _License$tradeLicense34 === void 0 ? void 0 : _License$tradeLicense34.correspondenceAddress) || "NA"
45051
+ }]
45052
+ }, {
45053
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45054
+ asSectionHeader: true,
45055
+ additionalDetails: {
45056
+ documentsWithUrl: [{
45057
+ title: "",
45058
+ values: License === null || License === void 0 ? void 0 : (_License$tradeLicense35 = License.tradeLicenseDetail) === null || _License$tradeLicense35 === void 0 ? void 0 : (_License$tradeLicense36 = _License$tradeLicense35.applicationDocuments) === null || _License$tradeLicense36 === void 0 ? void 0 : _License$tradeLicense36.map(function (doc) {
45059
+ var _doc$documentType, _fileDetails, _fileDetails2, _fileDetails2$data$do;
45060
+
45061
+ return {
45062
+ title: "BPAREG_HEADER_" + (doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replaceAll('.', '_')),
45063
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45064
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45065
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45066
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45067
+ docInfo: doc === null || doc === void 0 ? void 0 : doc.info,
45068
+ url: (_fileDetails = fileDetails) !== null && _fileDetails !== void 0 && _fileDetails.data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails2 = fileDetails) === null || _fileDetails2 === void 0 ? void 0 : (_fileDetails2$data$do = _fileDetails2.data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails2$data$do === void 0 ? void 0 : _fileDetails2$data$do.split(',')[0] : ""
45069
+ };
45070
+ })
45071
+ }]
45072
+ }
45073
+ }, (paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments = paymentRes.Payments) === null || _paymentRes$Payments === void 0 ? void 0 : _paymentRes$Payments.length) > 0 && {
45074
+ title: "BPA_FEE_DETAILS_LABEL",
45075
+ additionalDetails: {
45076
+ inspectionReport: [],
45077
+ values: [{
45078
+ title: "BPAREG_FEES",
45079
+ value: /*#__PURE__*/React.createElement("span", null, "\u20B9", paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments2 = paymentRes.Payments) === null || _paymentRes$Payments2 === void 0 ? void 0 : (_paymentRes$Payments3 = _paymentRes$Payments2[0]) === null || _paymentRes$Payments3 === void 0 ? void 0 : _paymentRes$Payments3.totalAmountPaid)
45080
+ }, (_ref = {
45081
+ title: "BPA_STATUS_LABEL",
45082
+ isTransLate: true,
45083
+ isStatus: true,
45084
+ value: paymentRes !== null && paymentRes !== void 0 && (_paymentRes$Payments4 = paymentRes.Payments) !== null && _paymentRes$Payments4 !== void 0 && (_paymentRes$Payments5 = _paymentRes$Payments4[0]) !== null && _paymentRes$Payments5 !== void 0 && _paymentRes$Payments5.totalAmountPaid ? "WF_BPA_PAID" : "NA"
45085
+ }, _ref["isTransLate"] = true, _ref)]
45086
+ }
45087
+ }];
45088
+ return {
45089
+ applicationData: License,
45090
+ applicationDetails: details,
45091
+ tenantId: License === null || License === void 0 ? void 0 : License.tenantId,
45092
+ payments: (paymentRes === null || paymentRes === void 0 ? void 0 : paymentRes.Payments) || []
45093
+ };
45094
+ }
45095
+
45096
+ if (License !== null && License !== void 0 && (_License$tradeLicense37 = License.tradeLicenseDetail) !== null && _License$tradeLicense37 !== void 0 && (_License$tradeLicense38 = _License$tradeLicense37.applicationDocuments) !== null && _License$tradeLicense38 !== void 0 && _License$tradeLicense38.length && (mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$StakeholderR = mdmsRes.StakeholderRegistraition) === null || _mdmsRes$StakeholderR === void 0 ? void 0 : (_mdmsRes$StakeholderR2 = _mdmsRes$StakeholderR.TradeTypetoRoleMapping) === null || _mdmsRes$StakeholderR2 === void 0 ? void 0 : _mdmsRes$StakeholderR2.length) > 0) {
43863
45097
  var _mdmsRes$StakeholderR3, _mdmsRes$StakeholderR4;
43864
45098
 
43865
45099
  mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$StakeholderR3 = mdmsRes.StakeholderRegistraition) === null || _mdmsRes$StakeholderR3 === void 0 ? void 0 : (_mdmsRes$StakeholderR4 = _mdmsRes$StakeholderR3.TradeTypetoRoleMapping) === null || _mdmsRes$StakeholderR4 === void 0 ? void 0 : _mdmsRes$StakeholderR4.map(function (doc) {
43866
- var _doc$docTypes, _License$tradeLicense3, _License$tradeLicense4, _License$tradeLicense5;
45100
+ var _doc$docTypes, _License$tradeLicense39, _License$tradeLicense40, _License$tradeLicense41;
43867
45101
 
43868
- if ((doc === null || doc === void 0 ? void 0 : (_doc$docTypes = doc.docTypes) === null || _doc$docTypes === void 0 ? void 0 : _doc$docTypes.length) > 0 && (doc === null || doc === void 0 ? void 0 : doc.tradeType) == (License === null || License === void 0 ? void 0 : (_License$tradeLicense3 = License.tradeLicenseDetail) === null || _License$tradeLicense3 === void 0 ? void 0 : (_License$tradeLicense4 = _License$tradeLicense3.tradeUnits) === null || _License$tradeLicense4 === void 0 ? void 0 : (_License$tradeLicense5 = _License$tradeLicense4[0]) === null || _License$tradeLicense5 === void 0 ? void 0 : _License$tradeLicense5.tradeType)) {
45102
+ if ((doc === null || doc === void 0 ? void 0 : (_doc$docTypes = doc.docTypes) === null || _doc$docTypes === void 0 ? void 0 : _doc$docTypes.length) > 0 && (doc === null || doc === void 0 ? void 0 : doc.tradeType) == (License === null || License === void 0 ? void 0 : (_License$tradeLicense39 = License.tradeLicenseDetail) === null || _License$tradeLicense39 === void 0 ? void 0 : (_License$tradeLicense40 = _License$tradeLicense39.tradeUnits) === null || _License$tradeLicense40 === void 0 ? void 0 : (_License$tradeLicense41 = _License$tradeLicense40[0]) === null || _License$tradeLicense41 === void 0 ? void 0 : _License$tradeLicense41.tradeType)) {
43869
45103
  var _doc$docTypes2;
43870
45104
 
43871
45105
  doc === null || doc === void 0 ? void 0 : (_doc$docTypes2 = doc.docTypes) === null || _doc$docTypes2 === void 0 ? void 0 : _doc$docTypes2.map(function (docType) {
43872
- var _License$tradeLicense6, _License$tradeLicense7;
45106
+ var _License$tradeLicense42, _License$tradeLicense43;
43873
45107
 
43874
- License === null || License === void 0 ? void 0 : (_License$tradeLicense6 = License.tradeLicenseDetail) === null || _License$tradeLicense6 === void 0 ? void 0 : (_License$tradeLicense7 = _License$tradeLicense6.applicationDocuments) === null || _License$tradeLicense7 === void 0 ? void 0 : _License$tradeLicense7.forEach(function (document) {
45108
+ License === null || License === void 0 ? void 0 : (_License$tradeLicense42 = License.tradeLicenseDetail) === null || _License$tradeLicense42 === void 0 ? void 0 : (_License$tradeLicense43 = _License$tradeLicense42.applicationDocuments) === null || _License$tradeLicense43 === void 0 ? void 0 : _License$tradeLicense43.forEach(function (document) {
43875
45109
  if ((docType === null || docType === void 0 ? void 0 : docType.code) == (document === null || document === void 0 ? void 0 : document.documentType) && docType !== null && docType !== void 0 && docType.info) document.info = docType === null || docType === void 0 ? void 0 : docType.info;
43876
45110
  });
43877
45111
  });
@@ -43879,103 +45113,20 @@ var OBPSService = {
43879
45113
  });
43880
45114
  }
43881
45115
 
43882
- var details = [{
43883
- title: " ",
43884
- values: [{
43885
- title: "BPA_APPLICATION_NUMBER_LABEL",
43886
- value: (License === null || License === void 0 ? void 0 : License.applicationNumber) || "NA"
43887
- }]
43888
- }, License !== null && License !== void 0 && (_License$tradeLicense8 = License.tradeLicenseDetail) !== null && _License$tradeLicense8 !== void 0 && (_License$tradeLicense9 = _License$tradeLicense8.tradeUnits) !== null && _License$tradeLicense9 !== void 0 && (_License$tradeLicense10 = _License$tradeLicense9[0]) !== null && _License$tradeLicense10 !== void 0 && _License$tradeLicense10.tradeType.includes("ARCHITECT") ? {
43889
- title: "BPA_LICENSE_DETAILS_LABEL",
43890
- asSectionHeader: true,
43891
- values: [{
43892
- title: "BPA_LICENSE_TYPE",
43893
- value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense11 = License.tradeLicenseDetail) === null || _License$tradeLicense11 === void 0 ? void 0 : (_License$tradeLicense12 = _License$tradeLicense11.tradeUnits) === null || _License$tradeLicense12 === void 0 ? void 0 : (_License$tradeLicense13 = _License$tradeLicense12[0]) === null || _License$tradeLicense13 === void 0 ? void 0 : (_License$tradeLicense14 = _License$tradeLicense13.tradeType) === null || _License$tradeLicense14 === void 0 ? void 0 : _License$tradeLicense14.split(".")[0]) || "NA"
43894
- }, {
43895
- title: "BPA_COUNCIL_OF_ARCH_NO_LABEL",
43896
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense15 = License.tradeLicenseDetail) === null || _License$tradeLicense15 === void 0 ? void 0 : (_License$tradeLicense16 = _License$tradeLicense15.additionalDetail) === null || _License$tradeLicense16 === void 0 ? void 0 : _License$tradeLicense16.counsilForArchNo) || "NA"
43897
- }]
43898
- } : {
43899
- title: "BPA_LICENSE_DETAILS_LABEL",
43900
- asSectionHeader: true,
43901
- values: [{
43902
- title: "BPA_LICENSE_TYPE",
43903
- value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense17 = License.tradeLicenseDetail) === null || _License$tradeLicense17 === void 0 ? void 0 : (_License$tradeLicense18 = _License$tradeLicense17.tradeUnits) === null || _License$tradeLicense18 === void 0 ? void 0 : (_License$tradeLicense19 = _License$tradeLicense18[0]) === null || _License$tradeLicense19 === void 0 ? void 0 : (_License$tradeLicense20 = _License$tradeLicense19.tradeType) === null || _License$tradeLicense20 === void 0 ? void 0 : _License$tradeLicense20.split(".")[0]) || "NA"
43904
- }]
43905
- }, {
43906
- title: "BPA_LICENSEE_DETAILS_HEADER_OWNER_INFO",
43907
- asSectionHeader: true,
43908
- values: [{
43909
- title: "BPA_APPLICANT_NAME_LABEL",
43910
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense21 = License.tradeLicenseDetail) === null || _License$tradeLicense21 === void 0 ? void 0 : (_License$tradeLicense22 = _License$tradeLicense21.owners) === null || _License$tradeLicense22 === void 0 ? void 0 : (_License$tradeLicense23 = _License$tradeLicense22[0]) === null || _License$tradeLicense23 === void 0 ? void 0 : _License$tradeLicense23.name) || "NA"
43911
- }, {
43912
- title: "BPA_APPLICANT_GENDER_LABEL",
43913
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense24 = License.tradeLicenseDetail) === null || _License$tradeLicense24 === void 0 ? void 0 : (_License$tradeLicense25 = _License$tradeLicense24.owners) === null || _License$tradeLicense25 === void 0 ? void 0 : (_License$tradeLicense26 = _License$tradeLicense25[0]) === null || _License$tradeLicense26 === void 0 ? void 0 : _License$tradeLicense26.gender) || "NA"
43914
- }, {
43915
- title: "BPA_OWNER_MOBILE_NO_LABEL",
43916
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense27 = License.tradeLicenseDetail) === null || _License$tradeLicense27 === void 0 ? void 0 : (_License$tradeLicense28 = _License$tradeLicense27.owners) === null || _License$tradeLicense28 === void 0 ? void 0 : (_License$tradeLicense29 = _License$tradeLicense28[0]) === null || _License$tradeLicense29 === void 0 ? void 0 : _License$tradeLicense29.mobileNumber) || "NA"
43917
- }, {
43918
- title: "BPA_APPLICANT_EMAIL_LABEL",
43919
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense30 = License.tradeLicenseDetail) === null || _License$tradeLicense30 === void 0 ? void 0 : (_License$tradeLicense31 = _License$tradeLicense30.owners) === null || _License$tradeLicense31 === void 0 ? void 0 : (_License$tradeLicense32 = _License$tradeLicense31[0]) === null || _License$tradeLicense32 === void 0 ? void 0 : _License$tradeLicense32.emailId) || "NA"
43920
- }, {
43921
- title: "BPA_APPLICANT_PAN_NO",
43922
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense33 = License.tradeLicenseDetail) === null || _License$tradeLicense33 === void 0 ? void 0 : (_License$tradeLicense34 = _License$tradeLicense33.owners) === null || _License$tradeLicense34 === void 0 ? void 0 : (_License$tradeLicense35 = _License$tradeLicense34[0]) === null || _License$tradeLicense35 === void 0 ? void 0 : _License$tradeLicense35.pan) || "NA"
43923
- }]
43924
- }, {
43925
- title: "BPA_PERMANANT_ADDRESS_LABEL",
43926
- asSectionHeader: true,
43927
- values: [{
43928
- title: "BPA_PERMANANT_ADDRESS_LABEL",
43929
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense36 = License.tradeLicenseDetail) === null || _License$tradeLicense36 === void 0 ? void 0 : (_License$tradeLicense37 = _License$tradeLicense36.owners) === null || _License$tradeLicense37 === void 0 ? void 0 : (_License$tradeLicense38 = _License$tradeLicense37[0]) === null || _License$tradeLicense38 === void 0 ? void 0 : _License$tradeLicense38.permanentAddress) || "NA"
43930
- }]
43931
- }, {
43932
- title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
43933
- asSectionHeader: true,
43934
- values: [{
43935
- title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
43936
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense39 = License.tradeLicenseDetail) === null || _License$tradeLicense39 === void 0 ? void 0 : (_License$tradeLicense40 = _License$tradeLicense39.owners) === null || _License$tradeLicense40 === void 0 ? void 0 : (_License$tradeLicense41 = _License$tradeLicense40[0]) === null || _License$tradeLicense41 === void 0 ? void 0 : _License$tradeLicense41.correspondenceAddress) || "NA"
43937
- }]
43938
- }, {
43939
- title: "BPA_DOCUMENT_DETAILS_LABEL",
43940
- asSectionHeader: true,
43941
- additionalDetails: {
43942
- documents: [{
43943
- title: "",
43944
- values: License === null || License === void 0 ? void 0 : (_License$tradeLicense42 = License.tradeLicenseDetail) === null || _License$tradeLicense42 === void 0 ? void 0 : (_License$tradeLicense43 = _License$tradeLicense42.applicationDocuments) === null || _License$tradeLicense43 === void 0 ? void 0 : _License$tradeLicense43.map(function (doc) {
43945
- var _doc$documentType;
45116
+ var appDocumentFileStoreIds = License === null || License === void 0 ? void 0 : (_License$tradeLicense44 = License.tradeLicenseDetail) === null || _License$tradeLicense44 === void 0 ? void 0 : (_License$tradeLicense45 = _License$tradeLicense44.applicationDocuments) === null || _License$tradeLicense45 === void 0 ? void 0 : _License$tradeLicense45.map(function (appDoc) {
45117
+ return appDoc === null || appDoc === void 0 ? void 0 : appDoc.fileStoreId;
45118
+ });
45119
+ var fileDetails = {};
43946
45120
 
43947
- return {
43948
- title: "BPAREG_HEADER_" + (doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replaceAll('.', '_')),
43949
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
43950
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
43951
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
43952
- id: doc === null || doc === void 0 ? void 0 : doc.id,
43953
- docInfo: doc === null || doc === void 0 ? void 0 : doc.info
43954
- };
43955
- })
43956
- }]
45121
+ var _temp = function () {
45122
+ if ((appDocumentFileStoreIds === null || appDocumentFileStoreIds === void 0 ? void 0 : appDocumentFileStoreIds.length) > 0) {
45123
+ return Promise.resolve(UploadServices.Filefetch(appDocumentFileStoreIds, Digit.ULBService.getStateId())).then(function (_UploadServices$Filef) {
45124
+ fileDetails = _UploadServices$Filef;
45125
+ });
43957
45126
  }
43958
- }, (paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments = paymentRes.Payments) === null || _paymentRes$Payments === void 0 ? void 0 : _paymentRes$Payments.length) > 0 && {
43959
- title: "BPA_FEE_DETAILS_LABEL",
43960
- additionalDetails: {
43961
- inspectionReport: [],
43962
- values: [{
43963
- title: "BPAREG_FEES",
43964
- value: /*#__PURE__*/React.createElement("span", null, "\u20B9", paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments2 = paymentRes.Payments) === null || _paymentRes$Payments2 === void 0 ? void 0 : (_paymentRes$Payments3 = _paymentRes$Payments2[0]) === null || _paymentRes$Payments3 === void 0 ? void 0 : _paymentRes$Payments3.totalAmountPaid)
43965
- }, (_ref = {
43966
- title: "BPA_STATUS_LABEL",
43967
- isTransLate: true,
43968
- isStatus: true,
43969
- value: paymentRes !== null && paymentRes !== void 0 && (_paymentRes$Payments4 = paymentRes.Payments) !== null && _paymentRes$Payments4 !== void 0 && (_paymentRes$Payments5 = _paymentRes$Payments4[0]) !== null && _paymentRes$Payments5 !== void 0 && _paymentRes$Payments5.totalAmountPaid ? "WF_BPA_PAID" : "NA"
43970
- }, _ref["isTransLate"] = true, _ref)]
43971
- }
43972
- }];
43973
- return {
43974
- applicationData: License,
43975
- applicationDetails: details,
43976
- tenantId: License === null || License === void 0 ? void 0 : License.tenantId,
43977
- payments: (paymentRes === null || paymentRes === void 0 ? void 0 : paymentRes.Payments) || []
43978
- };
45127
+ }();
45128
+
45129
+ return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
43979
45130
  });
43980
45131
  });
43981
45132
  });
@@ -43986,16 +45137,28 @@ var OBPSService = {
43986
45137
  BPADetailsPage: function (tenantId, filters) {
43987
45138
  try {
43988
45139
  return Promise.resolve(OBPSService.BPASearch(tenantId, filters)).then(function (response) {
43989
- var _response$BPA, _response$BPA2, _response$BPA2$, _response$BPA2$$addit, _response$BPA3, _response$BPA3$, _response$BPA3$$addit;
45140
+ var _response$BPA, _response$BPA$, _response$BPA$$docume, _response$BPA2, _response$BPA2$, _response$BPA2$$addit, _response$BPA2$$addit2, _response$BPA3, _response$BPA4, _response$BPA4$, _response$BPA4$$addit, _response$BPA5, _response$BPA5$, _response$BPA5$$addit;
45141
+
45142
+ var appDocumentFileStoreIds = response === null || response === void 0 ? void 0 : (_response$BPA = response.BPA) === null || _response$BPA === void 0 ? void 0 : (_response$BPA$ = _response$BPA[0]) === null || _response$BPA$ === void 0 ? void 0 : (_response$BPA$$docume = _response$BPA$.documents) === null || _response$BPA$$docume === void 0 ? void 0 : _response$BPA$$docume.map(function (docId) {
45143
+ return docId.fileStoreId;
45144
+ });
45145
+ if (!appDocumentFileStoreIds) appDocumentFileStoreIds = [];
45146
+ response === null || response === void 0 ? void 0 : (_response$BPA2 = response.BPA) === null || _response$BPA2 === void 0 ? void 0 : (_response$BPA2$ = _response$BPA2[0]) === null || _response$BPA2$ === void 0 ? void 0 : (_response$BPA2$$addit = _response$BPA2$.additionalDetails) === null || _response$BPA2$$addit === void 0 ? void 0 : (_response$BPA2$$addit2 = _response$BPA2$$addit.fieldinspection_pending) === null || _response$BPA2$$addit2 === void 0 ? void 0 : _response$BPA2$$addit2.map(function (fiData) {
45147
+ var _fiData$docs;
43990
45148
 
43991
- if (!(response !== null && response !== void 0 && (_response$BPA = response.BPA) !== null && _response$BPA !== void 0 && _response$BPA.length)) {
45149
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs = fiData.docs) === null || _fiData$docs === void 0 ? void 0 : _fiData$docs.map(function (fiDoc) {
45150
+ if (fiDoc !== null && fiDoc !== void 0 && fiDoc.fileStoreId) appDocumentFileStoreIds.push(fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId);
45151
+ });
45152
+ });
45153
+
45154
+ if (!(response !== null && response !== void 0 && (_response$BPA3 = response.BPA) !== null && _response$BPA3 !== void 0 && _response$BPA3.length)) {
43992
45155
  return;
43993
45156
  }
43994
45157
 
43995
- sessionStorage.setItem("BPA_ARCHITECT_NAME", JSON.stringify(response !== null && response !== void 0 && (_response$BPA2 = response.BPA) !== null && _response$BPA2 !== void 0 && (_response$BPA2$ = _response$BPA2[0]) !== null && _response$BPA2$ !== void 0 && (_response$BPA2$$addit = _response$BPA2$.additionalDetails) !== null && _response$BPA2$$addit !== void 0 && _response$BPA2$$addit.typeOfArchitect ? response === null || response === void 0 ? void 0 : (_response$BPA3 = response.BPA) === null || _response$BPA3 === void 0 ? void 0 : (_response$BPA3$ = _response$BPA3[0]) === null || _response$BPA3$ === void 0 ? void 0 : (_response$BPA3$$addit = _response$BPA3$.additionalDetails) === null || _response$BPA3$$addit === void 0 ? void 0 : _response$BPA3$$addit.typeOfArchitect : "ARCHITECT"));
45158
+ sessionStorage.setItem("BPA_ARCHITECT_NAME", JSON.stringify(response !== null && response !== void 0 && (_response$BPA4 = response.BPA) !== null && _response$BPA4 !== void 0 && (_response$BPA4$ = _response$BPA4[0]) !== null && _response$BPA4$ !== void 0 && (_response$BPA4$$addit = _response$BPA4$.additionalDetails) !== null && _response$BPA4$$addit !== void 0 && _response$BPA4$$addit.typeOfArchitect ? response === null || response === void 0 ? void 0 : (_response$BPA5 = response.BPA) === null || _response$BPA5 === void 0 ? void 0 : (_response$BPA5$ = _response$BPA5[0]) === null || _response$BPA5$ === void 0 ? void 0 : (_response$BPA5$$addit = _response$BPA5$.additionalDetails) === null || _response$BPA5$$addit === void 0 ? void 0 : _response$BPA5$$addit.typeOfArchitect : "ARCHITECT"));
43996
45159
 
43997
- var _response$BPA4 = response === null || response === void 0 ? void 0 : response.BPA,
43998
- BPA = _response$BPA4[0];
45160
+ var _response$BPA6 = response === null || response === void 0 ? void 0 : response.BPA,
45161
+ BPA = _response$BPA6[0];
43999
45162
 
44000
45163
  return Promise.resolve(OBPSService.scrutinyDetails(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
44001
45164
  edcrNumber: BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber
@@ -44022,491 +45185,642 @@ var OBPSService = {
44022
45185
  ocdcrNumber: BPA !== null && BPA !== void 0 && BPA.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA = bpaResponse.BPA) === null || _bpaResponse$BPA === void 0 ? void 0 : (_bpaResponse$BPA$ = _bpaResponse$BPA[0]) === null || _bpaResponse$BPA$ === void 0 ? void 0 : _bpaResponse$BPA$.edcrNumber,
44023
45186
  edcrNumber: bpaResponse !== null && bpaResponse !== void 0 && (_bpaResponse$BPA2 = bpaResponse.BPA) !== null && _bpaResponse$BPA2 !== void 0 && (_bpaResponse$BPA2$ = _bpaResponse$BPA2[0]) !== null && _bpaResponse$BPA2$ !== void 0 && _bpaResponse$BPA2$.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA3 = bpaResponse.BPA) === null || _bpaResponse$BPA3 === void 0 ? void 0 : (_bpaResponse$BPA3$ = _bpaResponse$BPA3[0]) === null || _bpaResponse$BPA3$ === void 0 ? void 0 : _bpaResponse$BPA3$.edcrNumber
44024
45187
  };
45188
+ return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
45189
+ function _temp8() {
45190
+ function _temp6() {
45191
+ function _temp4() {
45192
+ var _fetchBillRes, _fetchBillRes$Bill, _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _BPA$additionalDetail6, _BPA$additionalDetail7, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail11, _BPA$additionalDetail12, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _BPA$additionalDetail18, _BPA$additionalDetail19, _billDetails$addition, _billDetails$addition2, _details;
45193
+
45194
+ if ((collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.length) > 0) {
45195
+ collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.map(function (ob) {
45196
+ var _ob$paymentDetails, _ob$paymentDetails$, _ob$paymentDetails$$b, _ob$paymentDetails$$b2, _ob$paymentDetails$$b3;
45197
+
45198
+ ob === null || ob === void 0 ? void 0 : (_ob$paymentDetails = ob.paymentDetails) === null || _ob$paymentDetails === void 0 ? void 0 : (_ob$paymentDetails$ = _ob$paymentDetails[0]) === null || _ob$paymentDetails$ === void 0 ? void 0 : (_ob$paymentDetails$$b = _ob$paymentDetails$.bill) === null || _ob$paymentDetails$$b === void 0 ? void 0 : (_ob$paymentDetails$$b2 = _ob$paymentDetails$$b.billDetails) === null || _ob$paymentDetails$$b2 === void 0 ? void 0 : (_ob$paymentDetails$$b3 = _ob$paymentDetails$$b2[0]) === null || _ob$paymentDetails$$b3 === void 0 ? void 0 : _ob$paymentDetails$$b3.billAccountDetails.map(function (bill, index) {
45199
+ collectionBillArray.push({
45200
+ title: (bill === null || bill === void 0 ? void 0 : bill.taxHeadCode) + "_DETAILS",
45201
+ value: "",
45202
+ isSubTitle: true
45203
+ }, {
45204
+ title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
45205
+ value: "\u20B9" + (bill === null || bill === void 0 ? void 0 : bill.amount)
45206
+ }, {
45207
+ title: "BPA_STATUS_LABEL",
45208
+ value: "Paid"
45209
+ });
45210
+ totalAmount = totalAmount + parseInt(bill === null || bill === void 0 ? void 0 : bill.amount);
45211
+ });
45212
+ });
45213
+ }
44025
45214
 
44026
- function ConvertEpochToValidityDate(dateEpoch) {
44027
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
44028
- return "NA";
44029
- }
45215
+ if (((_fetchBillRes = fetchBillRes) === null || _fetchBillRes === void 0 ? void 0 : (_fetchBillRes$Bill = _fetchBillRes.Bill) === null || _fetchBillRes$Bill === void 0 ? void 0 : _fetchBillRes$Bill.length) > 0) {
45216
+ var _fetchBillRes2, _fetchBillRes2$Bill, _fetchBillRes2$Bill$, _fetchBillRes2$Bill$$, _fetchBillRes2$Bill$$2, _fetchBillRes2$Bill$$3, _fetchBillRes2$Bill$$4, _fetchBillRes3, _fetchBillRes3$Bill, _fetchBillRes3$Bill$;
44030
45217
 
44031
- var dateFromApi = new Date(dateEpoch);
44032
- var month = dateFromApi.getMonth() + 1;
44033
- var day = dateFromApi.getDate();
44034
- var year = dateFromApi.getFullYear() - 3;
44035
- month = (month > 9 ? "" : "0") + month;
44036
- day = (day > 9 ? "" : "0") + day;
44037
- return day + "/" + month + "/" + year;
44038
- }
45218
+ collectionBillArray.push({
45219
+ title: ((_fetchBillRes2 = fetchBillRes) === null || _fetchBillRes2 === void 0 ? void 0 : (_fetchBillRes2$Bill = _fetchBillRes2.Bill) === null || _fetchBillRes2$Bill === void 0 ? void 0 : (_fetchBillRes2$Bill$ = _fetchBillRes2$Bill[0]) === null || _fetchBillRes2$Bill$ === void 0 ? void 0 : (_fetchBillRes2$Bill$$ = _fetchBillRes2$Bill$.billDetails) === null || _fetchBillRes2$Bill$$ === void 0 ? void 0 : (_fetchBillRes2$Bill$$2 = _fetchBillRes2$Bill$$[0]) === null || _fetchBillRes2$Bill$$2 === void 0 ? void 0 : (_fetchBillRes2$Bill$$3 = _fetchBillRes2$Bill$$2.billAccountDetails) === null || _fetchBillRes2$Bill$$3 === void 0 ? void 0 : (_fetchBillRes2$Bill$$4 = _fetchBillRes2$Bill$$3[0]) === null || _fetchBillRes2$Bill$$4 === void 0 ? void 0 : _fetchBillRes2$Bill$$4.taxHeadCode) + "_DETAILS" || "BPA_SANC_FEE_DETAILS",
45220
+ value: "",
45221
+ isSubTitle: true
45222
+ }, {
45223
+ title: "BPA_SANC_FEE_LABEL",
45224
+ value: "\u20B9" + ((_fetchBillRes3 = fetchBillRes) === null || _fetchBillRes3 === void 0 ? void 0 : (_fetchBillRes3$Bill = _fetchBillRes3.Bill) === null || _fetchBillRes3$Bill === void 0 ? void 0 : (_fetchBillRes3$Bill$ = _fetchBillRes3$Bill[0]) === null || _fetchBillRes3$Bill$ === void 0 ? void 0 : _fetchBillRes3$Bill$.totalAmount)
45225
+ }, {
45226
+ title: "BPA_STATUS_LABEL",
45227
+ value: "Unpaid"
45228
+ });
45229
+ }
44039
45230
 
44040
- return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
44041
- var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail9, _BPA$additionalDetail10, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail11, _BPA$additionalDetail12, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _details;
45231
+ totalAmount > 0 && collectionBillArray.push({
45232
+ title: "BPA_TOT_AMT_PAID",
45233
+ value: "\u20B9" + totalAmount
45234
+ });
45235
+ var billDetails = {
45236
+ title: "BPA_FEE_DETAILS_LABEL",
45237
+ isFeeDetails: true,
45238
+ additionalDetails: {
45239
+ inspectionReport: [],
45240
+ values: [].concat(collectionBillArray)
45241
+ }
45242
+ };
44042
45243
 
44043
- var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
44044
- var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45244
+ function ConvertEpochToValidityDate(dateEpoch) {
45245
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45246
+ return "NA";
45247
+ }
45248
+
45249
+ var dateFromApi = new Date(dateEpoch);
45250
+ var month = dateFromApi.getMonth() + 1;
45251
+ var day = dateFromApi.getDate();
45252
+ var year = dateFromApi.getFullYear() - 3;
45253
+ month = (month > 9 ? "" : "0") + month;
45254
+ day = (day > 9 ? "" : "0") + day;
45255
+ return day + "/" + month + "/" + year;
45256
+ }
44045
45257
 
44046
- return {
44047
- title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
44048
- values: [{
44049
- title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
44050
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
44051
- isNotTranslated: true
44052
- }, {
44053
- title: "BPA_NOC_STATUS",
44054
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
44055
- field: "STATUS"
44056
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
44057
- title: "BPA_SUDMITTED_ON_LABEL",
44058
- value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
44059
- isNotTranslated: true
44060
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
44061
- title: "BPA_APPROVAL_NUMBER_LABEL",
44062
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
44063
- isNotTranslated: true
44064
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
44065
- title: "BPA_APPROVED_REJECTED_ON_LABEL",
44066
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
44067
- isNotTranslated: true
44068
- }],
44069
- additionalDetails: {
44070
- data: nocDetails,
44071
- noc: [{
44072
- title: "BPA_DOCUMENT_DETAILS_LABEL",
44073
- values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
44074
- var _doc$documentType2;
44075
-
44076
- return {
44077
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
44078
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44079
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
44080
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44081
- id: doc === null || doc === void 0 ? void 0 : doc.id
44082
- };
44083
- })
44084
- }]
44085
- }
44086
- };
44087
- });
44088
- var inspectionReport = [];
44089
- var checklist = [];
44090
- BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail = BPA.additionalDetails) === null || _BPA$additionalDetail === void 0 ? void 0 : (_BPA$additionalDetail2 = _BPA$additionalDetail.fieldinspection_pending) === null || _BPA$additionalDetail2 === void 0 ? void 0 : _BPA$additionalDetail2.filter(function (ob) {
44091
- return ob.docs && ob.docs.length > 0;
44092
- }).map(function (ob, ind) {
44093
- var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
44094
-
44095
- checklist = [];
44096
- inspectionReport.push({
44097
- title: "BPA_FI_REPORT",
44098
- asSectionHeader: true,
44099
- values: [{
44100
- title: "BPA_FI_DATE_LABEL",
44101
- value: ob.date.includes("-") ? ((_ob$date = ob.date) === null || _ob$date === void 0 ? void 0 : _ob$date.split("-")[2]) + "/" + ((_ob$date2 = ob.date) === null || _ob$date2 === void 0 ? void 0 : _ob$date2.split("-")[1]) + "/" + ((_ob$date3 = ob.date) === null || _ob$date3 === void 0 ? void 0 : _ob$date3.split("-")[0]) : ob.date
44102
- }, {
44103
- title: "BPA_FI_TIME_LABEL",
44104
- value: ob.time
44105
- }]
44106
- });
44107
- ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
44108
- checklist.push({
44109
- title: q.question,
44110
- value: q.value
44111
- });
44112
- checklist.push({
44113
- title: "BPA_ENTER_REMARKS",
44114
- value: q.remarks
44115
- });
44116
- });
44117
- inspectionReport.push({
44118
- title: "BPA_CHECK_LIST_DETAILS",
44119
- asSectionHeader: true,
44120
- values: checklist
44121
- });
44122
- inspectionReport.push({
44123
- title: "BPA_DOCUMENT_DETAILS_LABEL",
44124
- asSectionHeader: true,
44125
- additionalDetails: {
44126
- obpsDocuments: [{
44127
- title: "",
44128
- values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
44129
- var _doc$documentType3;
44130
-
44131
- return {
44132
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
44133
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44134
- documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
44135
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44136
- id: doc === null || doc === void 0 ? void 0 : doc.id
44137
- };
44138
- })
44139
- }]
44140
- }
44141
- });
44142
- });
44143
- var details = [];
44144
- var applicationDetailsInfo = {
44145
- title: " ",
44146
- isCommon: true,
44147
- values: [{
44148
- title: "BPA_APPLICATION_NUMBER_LABEL",
44149
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
44150
- }]
44151
- };
45258
+ BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail = BPA.additionalDetails) === null || _BPA$additionalDetail === void 0 ? void 0 : (_BPA$additionalDetail2 = _BPA$additionalDetail.fieldinspection_pending) === null || _BPA$additionalDetail2 === void 0 ? void 0 : _BPA$additionalDetail2.forEach(function (fiData) {
45259
+ var _fiData$docs2;
44152
45260
 
44153
- if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
44154
- var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
45261
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45262
+ var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
44155
45263
 
44156
- applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
44157
- title: "BPA_PERMIT_APP_NUMBER",
44158
- to: "/digit-ui/employee/obps/bpa/" + (bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA4 = bpaResponse.BPA) === null || _bpaResponse$BPA4 === void 0 ? void 0 : (_bpaResponse$BPA4$ = _bpaResponse$BPA4[0]) === null || _bpaResponse$BPA4$ === void 0 ? void 0 : _bpaResponse$BPA4$.applicationNo),
44159
- value: bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA5 = bpaResponse.BPA) === null || _bpaResponse$BPA5 === void 0 ? void 0 : (_bpaResponse$BPA5$ = _bpaResponse$BPA5[0]) === null || _bpaResponse$BPA5$ === void 0 ? void 0 : _bpaResponse$BPA5$.applicationNo,
44160
- isLink: true
44161
- }]);
44162
- }
45264
+ if ((_fileDetails3 = fileDetails) !== null && _fileDetails3 !== void 0 && _fileDetails3.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) fiDoc.url = (_fileDetails4 = fileDetails) === null || _fileDetails4 === void 0 ? void 0 : (_fileDetails4$data$fi = _fileDetails4.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) === null || _fileDetails4$data$fi === void 0 ? void 0 : _fileDetails4$data$fi.split(',')[0];
45265
+ });
45266
+ });
45267
+ var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45268
+ var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
44163
45269
 
44164
- var permitcondn = [];
44165
- (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : _BPA$additionalDetail3.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail4 = BPA.additionalDetails) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval.map(function (ob, index) {
44166
- permitcondn.push({
44167
- title: index + 1 + ". " + ob,
44168
- value: ""
44169
- });
44170
- }));
44171
- var PermitConditions = {
44172
- title: "BPA_PERMIT_CONDITIONS",
44173
- isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
44174
- isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
44175
- additionalDetails: {
44176
- inspectionReport: [],
44177
- permit: [].concat(permitcondn)
44178
- }
44179
- };
44180
- if (permitcondn.length == 0) PermitConditions = {};
45270
+ return {
45271
+ title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45272
+ values: [{
45273
+ title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45274
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45275
+ isNotTranslated: true
45276
+ }, {
45277
+ title: "BPA_NOC_STATUS",
45278
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45279
+ field: "STATUS"
45280
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45281
+ title: "BPA_SUDMITTED_ON_LABEL",
45282
+ value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
45283
+ isNotTranslated: true
45284
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45285
+ title: "BPA_APPROVAL_NUMBER_LABEL",
45286
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45287
+ isNotTranslated: true
45288
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45289
+ title: "BPA_APPROVED_REJECTED_ON_LABEL",
45290
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
45291
+ isNotTranslated: true
45292
+ }],
45293
+ additionalDetails: {
45294
+ data: nocDetails,
45295
+ noc: [{
45296
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45297
+ values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45298
+ var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45299
+
45300
+ return {
45301
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45302
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45303
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45304
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45305
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45306
+ url: (_fileDetails5 = fileDetails) !== null && _fileDetails5 !== void 0 && (_fileDetails5$data = _fileDetails5.data) !== null && _fileDetails5$data !== void 0 && _fileDetails5$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails6 = fileDetails) === null || _fileDetails6 === void 0 ? void 0 : (_fileDetails6$data = _fileDetails6.data) === null || _fileDetails6$data === void 0 ? void 0 : (_fileDetails6$data$do = _fileDetails6$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails6$data$do === void 0 ? void 0 : _fileDetails6$data$do.split(',')[0] : ""
45307
+ };
45308
+ })
45309
+ }]
45310
+ }
45311
+ };
45312
+ });
45313
+ var inspectionReport = [];
45314
+ var checklist = [];
45315
+ BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : (_BPA$additionalDetail4 = _BPA$additionalDetail3.fieldinspection_pending) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.filter(function (ob) {
45316
+ return ob.docs && ob.docs.length > 0;
45317
+ }).map(function (ob, ind) {
45318
+ var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45319
+
45320
+ checklist = [];
45321
+ inspectionReport.push({
45322
+ title: "BPA_FI_REPORT",
45323
+ asSectionHeader: true,
45324
+ values: [{
45325
+ title: "BPA_FI_DATE_LABEL",
45326
+ value: ob.date.includes("-") ? ((_ob$date = ob.date) === null || _ob$date === void 0 ? void 0 : _ob$date.split("-")[2]) + "/" + ((_ob$date2 = ob.date) === null || _ob$date2 === void 0 ? void 0 : _ob$date2.split("-")[1]) + "/" + ((_ob$date3 = ob.date) === null || _ob$date3 === void 0 ? void 0 : _ob$date3.split("-")[0]) : ob.date
45327
+ }, {
45328
+ title: "BPA_FI_TIME_LABEL",
45329
+ value: ob.time
45330
+ }]
45331
+ });
45332
+ ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45333
+ checklist.push({
45334
+ title: q.question,
45335
+ value: q.value
45336
+ });
45337
+ checklist.push({
45338
+ title: "BPA_ENTER_REMARKS",
45339
+ value: q.remarks
45340
+ });
45341
+ });
45342
+ inspectionReport.push({
45343
+ title: "BPA_CHECK_LIST_DETAILS",
45344
+ asSectionHeader: true,
45345
+ values: checklist
45346
+ });
45347
+ inspectionReport.push({
45348
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45349
+ asSectionHeader: true,
45350
+ additionalDetails: {
45351
+ obpsDocuments: [{
45352
+ title: "",
45353
+ values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45354
+ var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45355
+
45356
+ return {
45357
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45358
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45359
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45360
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45361
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45362
+ url: (_fileDetails7 = fileDetails) !== null && _fileDetails7 !== void 0 && (_fileDetails7$data = _fileDetails7.data) !== null && _fileDetails7$data !== void 0 && _fileDetails7$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails8 = fileDetails) === null || _fileDetails8 === void 0 ? void 0 : (_fileDetails8$data = _fileDetails8.data) === null || _fileDetails8$data === void 0 ? void 0 : (_fileDetails8$data$do = _fileDetails8$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails8$data$do === void 0 ? void 0 : _fileDetails8$data$do.split(',')[0] : ""
45363
+ };
45364
+ })
45365
+ }]
45366
+ }
45367
+ });
45368
+ });
45369
+ var details = [];
45370
+ var applicationDetailsInfo = {
45371
+ title: " ",
45372
+ isCommon: true,
45373
+ values: [{
45374
+ title: "BPA_APPLICATION_NUMBER_LABEL",
45375
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45376
+ }]
45377
+ };
44181
45378
 
44182
- if (riskType == "LOW" && permitcondn.length > 0) {
44183
- permitcondn = [];
44184
- PermitConditions = {};
44185
- }
45379
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45380
+ var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
44186
45381
 
44187
- if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
44188
- var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7, _BPA$additionalDetail8;
45382
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45383
+ title: "BPA_PERMIT_APP_NUMBER",
45384
+ to: "/digit-ui/employee/obps/bpa/" + (bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA4 = bpaResponse.BPA) === null || _bpaResponse$BPA4 === void 0 ? void 0 : (_bpaResponse$BPA4$ = _bpaResponse$BPA4[0]) === null || _bpaResponse$BPA4$ === void 0 ? void 0 : _bpaResponse$BPA4$.applicationNo),
45385
+ value: bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA5 = bpaResponse.BPA) === null || _bpaResponse$BPA5 === void 0 ? void 0 : (_bpaResponse$BPA5$ = _bpaResponse$BPA5[0]) === null || _bpaResponse$BPA5$ === void 0 ? void 0 : _bpaResponse$BPA5$.applicationNo,
45386
+ isLink: true
45387
+ }]);
45388
+ }
44189
45389
 
44190
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
44191
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
44192
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
44193
- });
44194
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
44195
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
44196
- value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail6 = BPA.additionalDetails) !== null && _BPA$additionalDetail6 !== void 0 && _BPA$additionalDetail6.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.validityDate) + " - " + format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail8 = BPA.additionalDetails) === null || _BPA$additionalDetail8 === void 0 ? void 0 : _BPA$additionalDetail8.validityDate), 'dd/MM/yyyy') : "NA"
44197
- });
44198
- }
45390
+ var permitcondn = [];
45391
+ (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail6 = BPA.additionalDetails) === null || _BPA$additionalDetail6 === void 0 ? void 0 : _BPA$additionalDetail6.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.pendingapproval.map(function (ob, index) {
45392
+ permitcondn.push({
45393
+ title: index + 1 + ". " + ob,
45394
+ value: ""
45395
+ });
45396
+ }));
45397
+ var PermitConditions = {
45398
+ title: "BPA_PERMIT_CONDITIONS",
45399
+ isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45400
+ isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45401
+ additionalDetails: {
45402
+ inspectionReport: [],
45403
+ permit: [].concat(permitcondn)
45404
+ }
45405
+ };
45406
+ if (permitcondn.length == 0) PermitConditions = {};
44199
45407
 
44200
- var basicDetails = {
44201
- title: "BPA_BASIC_DETAILS_TITLE",
44202
- asSectionHeader: true,
44203
- isInsert: true,
44204
- isCommon: true,
44205
- values: [{
44206
- title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
44207
- value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
44208
- }, {
44209
- title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
44210
- value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
44211
- }, {
44212
- title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
44213
- value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
44214
- }, {
44215
- title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
44216
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail3 = edcr.planDetail) === null || _edcr$planDetail3 === void 0 ? void 0 : (_edcr$planDetail3$pla = _edcr$planDetail3.planInformation) === null || _edcr$planDetail3$pla === void 0 ? void 0 : _edcr$planDetail3$pla.occupancy
44217
- }, {
44218
- title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
44219
- value: "WF_BPA_" + riskType,
44220
- isInsert: true
44221
- }, {
44222
- title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
44223
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail4 = edcr.planDetail) === null || _edcr$planDetail4 === void 0 ? void 0 : (_edcr$planDetail4$pla = _edcr$planDetail4.planInformation) === null || _edcr$planDetail4$pla === void 0 ? void 0 : _edcr$planDetail4$pla.applicantName
44224
- }]
44225
- };
44226
- var plotDetails = {
44227
- title: "BPA_PLOT_DETAILS_TITLE",
44228
- asSectionHeader: true,
44229
- isCommon: true,
44230
- values: [{
44231
- title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
44232
- value: "" + (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail5 = edcr.planDetail) === null || _edcr$planDetail5 === void 0 ? void 0 : (_edcr$planDetail5$pla = _edcr$planDetail5.planInformation) === null || _edcr$planDetail5$pla === void 0 ? void 0 : _edcr$planDetail5$pla.plotArea),
44233
- isNotTranslated: true,
44234
- isUnit: "BPA_SQ_FT_LABEL"
44235
- }, {
44236
- title: "BPA_PLOT_NUMBER_LABEL",
44237
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail6 = edcr.planDetail) === null || _edcr$planDetail6 === void 0 ? void 0 : (_edcr$planDetail6$pla = _edcr$planDetail6.planInformation) === null || _edcr$planDetail6$pla === void 0 ? void 0 : _edcr$planDetail6$pla.plotNo) || "NA",
44238
- isNotTranslated: true
44239
- }, {
44240
- title: "BPA_KHATHA_NUMBER_LABEL",
44241
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail7 = edcr.planDetail) === null || _edcr$planDetail7 === void 0 ? void 0 : (_edcr$planDetail7$pla = _edcr$planDetail7.planInformation) === null || _edcr$planDetail7$pla === void 0 ? void 0 : _edcr$planDetail7$pla.khataNo) || "NA",
44242
- isNotTranslated: true
44243
- }, {
44244
- title: "BPA_HOLDING_NUMBER_LABEL",
44245
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.holdingNo) || "NA",
44246
- isNotTranslated: true
44247
- }, {
44248
- title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
44249
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.registrationDetails) || "NA",
44250
- isNotTranslated: true
44251
- }]
44252
- };
44253
- var scrutinyDetails = {
44254
- title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
44255
- isScrutinyDetails: true,
44256
- isBackGroundColor: true,
44257
- additionalDetails: {
44258
- values: [{
44259
- title: "BPA_EDCR_DETAILS",
44260
- value: " ",
44261
- isHeader: true
44262
- }, {
44263
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
44264
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
44265
- }],
44266
- scruntinyDetails: [{
44267
- title: "BPA_UPLOADED_PLAN_DIAGRAM",
44268
- value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
44269
- text: "BPA_UPLOADED_PLAN_DXF"
44270
- }, {
44271
- title: "BPA_SCRUNTINY_REPORT_OUTPUT",
44272
- value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
44273
- text: "BPA_SCRUTINY_REPORT_PDF"
44274
- }]
44275
- }
44276
- };
44277
- var buildingExtractionDetails = {
44278
- title: "",
44279
- isScrutinyDetails: true,
44280
- isBackGroundColor: true,
44281
- additionalDetails: {
44282
- values: [{
44283
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
44284
- value: " ",
44285
- isHeader: true
44286
- }, {
44287
- title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
44288
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail8 = edcr.planDetail) === null || _edcr$planDetail8 === void 0 ? void 0 : (_edcr$planDetail8$blo = _edcr$planDetail8.blocks) === null || _edcr$planDetail8$blo === void 0 ? void 0 : (_edcr$planDetail8$blo2 = _edcr$planDetail8$blo[0]) === null || _edcr$planDetail8$blo2 === void 0 ? void 0 : (_edcr$planDetail8$blo3 = _edcr$planDetail8$blo2.building) === null || _edcr$planDetail8$blo3 === void 0 ? void 0 : _edcr$planDetail8$blo3.totalBuitUpArea,
44289
- isUnit: "BPA_SQ_MTRS_LABEL"
44290
- }, {
44291
- title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
44292
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail9 = edcr.planDetail) === null || _edcr$planDetail9 === void 0 ? void 0 : (_edcr$planDetail9$blo = _edcr$planDetail9.blocks) === null || _edcr$planDetail9$blo === void 0 ? void 0 : (_edcr$planDetail9$blo2 = _edcr$planDetail9$blo[0]) === null || _edcr$planDetail9$blo2 === void 0 ? void 0 : (_edcr$planDetail9$blo3 = _edcr$planDetail9$blo2.building) === null || _edcr$planDetail9$blo3 === void 0 ? void 0 : _edcr$planDetail9$blo3.totalFloors) || "NA"
44293
- }, {
44294
- title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
44295
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail10 = edcr.planDetail) === null || _edcr$planDetail10 === void 0 ? void 0 : (_edcr$planDetail10$bl = _edcr$planDetail10.blocks) === null || _edcr$planDetail10$bl === void 0 ? void 0 : (_edcr$planDetail10$bl2 = _edcr$planDetail10$bl[0]) === null || _edcr$planDetail10$bl2 === void 0 ? void 0 : (_edcr$planDetail10$bl3 = _edcr$planDetail10$bl2.building) === null || _edcr$planDetail10$bl3 === void 0 ? void 0 : _edcr$planDetail10$bl3.declaredBuildingHeigh,
44296
- isUnit: "BPA_MTRS_LABEL"
44297
- }],
44298
- scruntinyDetails: []
44299
- }
44300
- };
44301
- var demolitionAreaDetails = {
44302
- title: "",
44303
- isScrutinyDetails: true,
44304
- isBackGroundColor: true,
44305
- additionalDetails: {
44306
- values: [{
44307
- title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
44308
- value: " ",
44309
- isHeader: true
44310
- }, {
44311
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
44312
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail11 = edcr.planDetail) === null || _edcr$planDetail11 === void 0 ? void 0 : (_edcr$planDetail11$pl = _edcr$planDetail11.planInformation) === null || _edcr$planDetail11$pl === void 0 ? void 0 : _edcr$planDetail11$pl.demolitionArea,
44313
- isUnit: "BPA_SQ_MTRS_LABEL"
44314
- }],
44315
- scruntinyDetails: []
44316
- }
44317
- };
44318
- var subOccupancyTableDetails = {
44319
- title: "",
44320
- isSubOccupancyTable: true,
44321
- isTitleRepeat: true,
44322
- additionalDetails: {
44323
- values: [{
44324
- title: "BPA_OCC_SUBOCC_HEADER",
44325
- value: " ",
44326
- isHeader: true
44327
- }],
44328
- subOccupancyTableDetails: [{
44329
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
44330
- value: edcr
44331
- }, {
44332
- title: "NO_REPEAT",
44333
- value: ""
44334
- }]
44335
- }
44336
- };
44337
- var addressDetails = {
44338
- title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
44339
- asSectionHeader: true,
44340
- isCommon: true,
44341
- values: [{
44342
- title: "BPA_DETAILS_PIN_LABEL",
44343
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo = BPA.landInfo) === null || _BPA$landInfo === void 0 ? void 0 : (_BPA$landInfo$address = _BPA$landInfo.address) === null || _BPA$landInfo$address === void 0 ? void 0 : _BPA$landInfo$address.pincode
44344
- }, {
44345
- title: "BPA_CITY_LABEL",
44346
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo2 = BPA.landInfo) === null || _BPA$landInfo2 === void 0 ? void 0 : (_BPA$landInfo2$addres = _BPA$landInfo2.address) === null || _BPA$landInfo2$addres === void 0 ? void 0 : _BPA$landInfo2$addres.city
44347
- }, {
44348
- title: "BPA_LOC_MOHALLA_LABEL",
44349
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo3 = BPA.landInfo) === null || _BPA$landInfo3 === void 0 ? void 0 : (_BPA$landInfo3$addres = _BPA$landInfo3.address) === null || _BPA$landInfo3$addres === void 0 ? void 0 : (_BPA$landInfo3$addres2 = _BPA$landInfo3$addres.locality) === null || _BPA$landInfo3$addres2 === void 0 ? void 0 : _BPA$landInfo3$addres2.name
44350
- }, {
44351
- title: "BPA_DETAILS_SRT_NAME_LABEL",
44352
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo4 = BPA.landInfo) === null || _BPA$landInfo4 === void 0 ? void 0 : (_BPA$landInfo4$addres = _BPA$landInfo4.address) === null || _BPA$landInfo4$addres === void 0 ? void 0 : _BPA$landInfo4$addres.street
44353
- }, {
44354
- title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
44355
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo5 = BPA.landInfo) === null || _BPA$landInfo5 === void 0 ? void 0 : (_BPA$landInfo5$addres = _BPA$landInfo5.address) === null || _BPA$landInfo5$addres === void 0 ? void 0 : _BPA$landInfo5$addres.landmark
44356
- }]
44357
- };
44358
- var checkOwnerLength = (BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo6 = BPA.landInfo) === null || _BPA$landInfo6 === void 0 ? void 0 : (_BPA$landInfo6$owners = _BPA$landInfo6.owners) === null || _BPA$landInfo6$owners === void 0 ? void 0 : _BPA$landInfo6$owners.length) || 1;
45408
+ if (riskType == "LOW" && permitcondn.length > 0) {
45409
+ permitcondn = [];
45410
+ PermitConditions = {};
45411
+ }
44359
45412
 
44360
- if ((BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo7 = BPA.landInfo) === null || _BPA$landInfo7 === void 0 ? void 0 : (_BPA$landInfo7$owners = _BPA$landInfo7.owners) === null || _BPA$landInfo7$owners === void 0 ? void 0 : _BPA$landInfo7$owners.length) > 0) {
44361
- var _BPA$landInfo8, _BPA$landInfo8$owners;
45413
+ if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45414
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
44362
45415
 
44363
- BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo8 = BPA.landInfo) === null || _BPA$landInfo8 === void 0 ? void 0 : (_BPA$landInfo8$owners = _BPA$landInfo8.owners) === null || _BPA$landInfo8$owners === void 0 ? void 0 : _BPA$landInfo8$owners.forEach(function (ownerD) {
44364
- if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
44365
- });
44366
- }
45416
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45417
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45418
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45419
+ });
45420
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45421
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45422
+ value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail8 = BPA.additionalDetails) !== null && _BPA$additionalDetail8 !== void 0 && _BPA$additionalDetail8.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.validityDate) + " - " + format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.validityDate), 'dd/MM/yyyy') : "NA"
45423
+ });
45424
+ }
44367
45425
 
44368
- var ownerDetails = {
44369
- title: "BPA_APPLICANT_DETAILS_HEADER",
44370
- isOwnerDetails: true,
44371
- additionalDetails: {
44372
- owners: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo9 = BPA.landInfo) === null || _BPA$landInfo9 === void 0 ? void 0 : (_BPA$landInfo9$owners = _BPA$landInfo9.owners) === null || _BPA$landInfo9$owners === void 0 ? void 0 : _BPA$landInfo9$owners.map(function (owner, index) {
44373
- return {
44374
- title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45426
+ var basicDetails = {
45427
+ title: "BPA_BASIC_DETAILS_TITLE",
45428
+ asSectionHeader: true,
45429
+ isInsert: true,
45430
+ isCommon: true,
44375
45431
  values: [{
44376
- title: "CORE_COMMON_NAME",
44377
- value: owner === null || owner === void 0 ? void 0 : owner.name
45432
+ title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45433
+ value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
45434
+ }, {
45435
+ title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45436
+ value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45437
+ }, {
45438
+ title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45439
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
44378
45440
  }, {
44379
- title: "BPA_APPLICANT_GENDER_LABEL",
44380
- value: owner === null || owner === void 0 ? void 0 : owner.gender
45441
+ title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45442
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail3 = edcr.planDetail) === null || _edcr$planDetail3 === void 0 ? void 0 : (_edcr$planDetail3$pla = _edcr$planDetail3.planInformation) === null || _edcr$planDetail3$pla === void 0 ? void 0 : _edcr$planDetail3$pla.occupancy
44381
45443
  }, {
44382
- title: "CORE_COMMON_MOBILE_NUMBER",
44383
- value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45444
+ title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45445
+ value: "WF_BPA_" + riskType,
45446
+ isInsert: true
44384
45447
  }, {
44385
- title: "BPA_IS_PRIMARY_OWNER_LABEL",
44386
- value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
44387
- isNotTranslated: false
45448
+ title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45449
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail4 = edcr.planDetail) === null || _edcr$planDetail4 === void 0 ? void 0 : (_edcr$planDetail4$pla = _edcr$planDetail4.planInformation) === null || _edcr$planDetail4$pla === void 0 ? void 0 : _edcr$planDetail4$pla.applicantName
44388
45450
  }]
44389
45451
  };
44390
- })
44391
- }
44392
- };
44393
- var documentDetails = {
44394
- title: "BPA_DOCUMENT_DETAILS_LABEL",
44395
- asSectionHeader: true,
44396
- isDocumentDetails: true,
44397
- additionalDetails: {
44398
- obpsDocuments: [{
44399
- title: "",
44400
- values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
44401
- var _doc$documentType4;
45452
+ var plotDetails = {
45453
+ title: "BPA_PLOT_DETAILS_TITLE",
45454
+ asSectionHeader: true,
45455
+ isCommon: true,
45456
+ values: [{
45457
+ title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45458
+ value: "" + (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail5 = edcr.planDetail) === null || _edcr$planDetail5 === void 0 ? void 0 : (_edcr$planDetail5$pla = _edcr$planDetail5.planInformation) === null || _edcr$planDetail5$pla === void 0 ? void 0 : _edcr$planDetail5$pla.plotArea),
45459
+ isNotTranslated: true,
45460
+ isUnit: "BPA_SQ_FT_LABEL"
45461
+ }, {
45462
+ title: "BPA_PLOT_NUMBER_LABEL",
45463
+ value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail6 = edcr.planDetail) === null || _edcr$planDetail6 === void 0 ? void 0 : (_edcr$planDetail6$pla = _edcr$planDetail6.planInformation) === null || _edcr$planDetail6$pla === void 0 ? void 0 : _edcr$planDetail6$pla.plotNo) || "NA",
45464
+ isNotTranslated: true
45465
+ }, {
45466
+ title: "BPA_KHATHA_NUMBER_LABEL",
45467
+ value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail7 = edcr.planDetail) === null || _edcr$planDetail7 === void 0 ? void 0 : (_edcr$planDetail7$pla = _edcr$planDetail7.planInformation) === null || _edcr$planDetail7$pla === void 0 ? void 0 : _edcr$planDetail7$pla.khataNo) || "NA",
45468
+ isNotTranslated: true
45469
+ }, {
45470
+ title: "BPA_HOLDING_NUMBER_LABEL",
45471
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45472
+ isNotTranslated: true
45473
+ }, {
45474
+ title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45475
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45476
+ isNotTranslated: true
45477
+ }]
45478
+ };
45479
+ var scrutinyDetails = {
45480
+ title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45481
+ isScrutinyDetails: true,
45482
+ isBackGroundColor: true,
45483
+ additionalDetails: {
45484
+ values: [{
45485
+ title: "BPA_EDCR_DETAILS",
45486
+ value: " ",
45487
+ isHeader: true
45488
+ }, {
45489
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45490
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45491
+ }],
45492
+ scruntinyDetails: [{
45493
+ title: "BPA_UPLOADED_PLAN_DIAGRAM",
45494
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45495
+ text: "BPA_UPLOADED_PLAN_DXF"
45496
+ }, {
45497
+ title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45498
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45499
+ text: "BPA_SCRUTINY_REPORT_PDF"
45500
+ }]
45501
+ }
45502
+ };
45503
+ var buildingExtractionDetails = {
45504
+ title: "",
45505
+ isScrutinyDetails: true,
45506
+ isBackGroundColor: true,
45507
+ additionalDetails: {
45508
+ values: [{
45509
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45510
+ value: " ",
45511
+ isHeader: true
45512
+ }, {
45513
+ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45514
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail8 = edcr.planDetail) === null || _edcr$planDetail8 === void 0 ? void 0 : (_edcr$planDetail8$blo = _edcr$planDetail8.blocks) === null || _edcr$planDetail8$blo === void 0 ? void 0 : (_edcr$planDetail8$blo2 = _edcr$planDetail8$blo[0]) === null || _edcr$planDetail8$blo2 === void 0 ? void 0 : (_edcr$planDetail8$blo3 = _edcr$planDetail8$blo2.building) === null || _edcr$planDetail8$blo3 === void 0 ? void 0 : _edcr$planDetail8$blo3.totalBuitUpArea,
45515
+ isUnit: "BPA_SQ_MTRS_LABEL"
45516
+ }, {
45517
+ title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45518
+ value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail9 = edcr.planDetail) === null || _edcr$planDetail9 === void 0 ? void 0 : (_edcr$planDetail9$blo = _edcr$planDetail9.blocks) === null || _edcr$planDetail9$blo === void 0 ? void 0 : (_edcr$planDetail9$blo2 = _edcr$planDetail9$blo[0]) === null || _edcr$planDetail9$blo2 === void 0 ? void 0 : (_edcr$planDetail9$blo3 = _edcr$planDetail9$blo2.building) === null || _edcr$planDetail9$blo3 === void 0 ? void 0 : _edcr$planDetail9$blo3.totalFloors) || "NA"
45519
+ }, {
45520
+ title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45521
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail10 = edcr.planDetail) === null || _edcr$planDetail10 === void 0 ? void 0 : (_edcr$planDetail10$bl = _edcr$planDetail10.blocks) === null || _edcr$planDetail10$bl === void 0 ? void 0 : (_edcr$planDetail10$bl2 = _edcr$planDetail10$bl[0]) === null || _edcr$planDetail10$bl2 === void 0 ? void 0 : (_edcr$planDetail10$bl3 = _edcr$planDetail10$bl2.building) === null || _edcr$planDetail10$bl3 === void 0 ? void 0 : _edcr$planDetail10$bl3.declaredBuildingHeigh,
45522
+ isUnit: "BPA_MTRS_LABEL"
45523
+ }],
45524
+ scruntinyDetails: []
45525
+ }
45526
+ };
45527
+ var demolitionAreaDetails = {
45528
+ title: "",
45529
+ isScrutinyDetails: true,
45530
+ isBackGroundColor: true,
45531
+ additionalDetails: {
45532
+ values: [{
45533
+ title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45534
+ value: " ",
45535
+ isHeader: true
45536
+ }, {
45537
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45538
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail11 = edcr.planDetail) === null || _edcr$planDetail11 === void 0 ? void 0 : (_edcr$planDetail11$pl = _edcr$planDetail11.planInformation) === null || _edcr$planDetail11$pl === void 0 ? void 0 : _edcr$planDetail11$pl.demolitionArea,
45539
+ isUnit: "BPA_SQ_MTRS_LABEL"
45540
+ }],
45541
+ scruntinyDetails: []
45542
+ }
45543
+ };
45544
+ var subOccupancyTableDetails = {
45545
+ title: "",
45546
+ isSubOccupancyTable: true,
45547
+ isTitleRepeat: true,
45548
+ additionalDetails: {
45549
+ values: [{
45550
+ title: "BPA_OCC_SUBOCC_HEADER",
45551
+ value: " ",
45552
+ isHeader: true
45553
+ }],
45554
+ subOccupancyTableDetails: [{
45555
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45556
+ value: edcr
45557
+ }, {
45558
+ title: "NO_REPEAT",
45559
+ value: ""
45560
+ }]
45561
+ }
45562
+ };
45563
+ var addressDetails = {
45564
+ title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45565
+ asSectionHeader: true,
45566
+ isCommon: true,
45567
+ values: [{
45568
+ title: "BPA_DETAILS_PIN_LABEL",
45569
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo = BPA.landInfo) === null || _BPA$landInfo === void 0 ? void 0 : (_BPA$landInfo$address = _BPA$landInfo.address) === null || _BPA$landInfo$address === void 0 ? void 0 : _BPA$landInfo$address.pincode
45570
+ }, {
45571
+ title: "BPA_CITY_LABEL",
45572
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo2 = BPA.landInfo) === null || _BPA$landInfo2 === void 0 ? void 0 : (_BPA$landInfo2$addres = _BPA$landInfo2.address) === null || _BPA$landInfo2$addres === void 0 ? void 0 : _BPA$landInfo2$addres.city
45573
+ }, {
45574
+ title: "BPA_LOC_MOHALLA_LABEL",
45575
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo3 = BPA.landInfo) === null || _BPA$landInfo3 === void 0 ? void 0 : (_BPA$landInfo3$addres = _BPA$landInfo3.address) === null || _BPA$landInfo3$addres === void 0 ? void 0 : (_BPA$landInfo3$addres2 = _BPA$landInfo3$addres.locality) === null || _BPA$landInfo3$addres2 === void 0 ? void 0 : _BPA$landInfo3$addres2.name
45576
+ }, {
45577
+ title: "BPA_DETAILS_SRT_NAME_LABEL",
45578
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo4 = BPA.landInfo) === null || _BPA$landInfo4 === void 0 ? void 0 : (_BPA$landInfo4$addres = _BPA$landInfo4.address) === null || _BPA$landInfo4$addres === void 0 ? void 0 : _BPA$landInfo4$addres.street
45579
+ }, {
45580
+ title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45581
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo5 = BPA.landInfo) === null || _BPA$landInfo5 === void 0 ? void 0 : (_BPA$landInfo5$addres = _BPA$landInfo5.address) === null || _BPA$landInfo5$addres === void 0 ? void 0 : _BPA$landInfo5$addres.landmark
45582
+ }]
45583
+ };
45584
+ var checkOwnerLength = (BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo6 = BPA.landInfo) === null || _BPA$landInfo6 === void 0 ? void 0 : (_BPA$landInfo6$owners = _BPA$landInfo6.owners) === null || _BPA$landInfo6$owners === void 0 ? void 0 : _BPA$landInfo6$owners.length) || 1;
44402
45585
 
44403
- return {
44404
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
44405
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44406
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
44407
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44408
- id: doc === null || doc === void 0 ? void 0 : doc.id
45586
+ if ((BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo7 = BPA.landInfo) === null || _BPA$landInfo7 === void 0 ? void 0 : (_BPA$landInfo7$owners = _BPA$landInfo7.owners) === null || _BPA$landInfo7$owners === void 0 ? void 0 : _BPA$landInfo7$owners.length) > 0) {
45587
+ var _BPA$landInfo8, _BPA$landInfo8$owners;
45588
+
45589
+ BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo8 = BPA.landInfo) === null || _BPA$landInfo8 === void 0 ? void 0 : (_BPA$landInfo8$owners = _BPA$landInfo8.owners) === null || _BPA$landInfo8$owners === void 0 ? void 0 : _BPA$landInfo8$owners.forEach(function (ownerD) {
45590
+ if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45591
+ });
45592
+ }
45593
+
45594
+ var ownerDetails = {
45595
+ title: "BPA_APPLICANT_DETAILS_HEADER",
45596
+ isOwnerDetails: true,
45597
+ additionalDetails: {
45598
+ owners: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo9 = BPA.landInfo) === null || _BPA$landInfo9 === void 0 ? void 0 : (_BPA$landInfo9$owners = _BPA$landInfo9.owners) === null || _BPA$landInfo9$owners === void 0 ? void 0 : _BPA$landInfo9$owners.map(function (owner, index) {
45599
+ return {
45600
+ title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45601
+ values: [{
45602
+ title: "CORE_COMMON_NAME",
45603
+ value: owner === null || owner === void 0 ? void 0 : owner.name
45604
+ }, {
45605
+ title: "BPA_APPLICANT_GENDER_LABEL",
45606
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
45607
+ }, {
45608
+ title: "CORE_COMMON_MOBILE_NUMBER",
45609
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45610
+ }, {
45611
+ title: "BPA_IS_PRIMARY_OWNER_LABEL",
45612
+ value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45613
+ isNotTranslated: false
45614
+ }]
45615
+ };
45616
+ })
45617
+ }
45618
+ };
45619
+ var documentDetails = {
45620
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45621
+ asSectionHeader: true,
45622
+ isDocumentDetails: true,
45623
+ additionalDetails: {
45624
+ obpsDocuments: [{
45625
+ title: "",
45626
+ values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45627
+ var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45628
+
45629
+ return {
45630
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45631
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45632
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45633
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45634
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45635
+ url: (_fileDetails9 = fileDetails) !== null && _fileDetails9 !== void 0 && (_fileDetails9$data = _fileDetails9.data) !== null && _fileDetails9$data !== void 0 && _fileDetails9$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails10 = fileDetails) === null || _fileDetails10 === void 0 ? void 0 : (_fileDetails10$data = _fileDetails10.data) === null || _fileDetails10$data === void 0 ? void 0 : (_fileDetails10$data$d = _fileDetails10$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails10$data$d === void 0 ? void 0 : _fileDetails10$data$d.split(',')[0] : ""
45636
+ };
45637
+ })
45638
+ }]
45639
+ }
45640
+ };
45641
+ var approvalChecks = [];
45642
+ var approvalChecksDetails = {};
45643
+
45644
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45645
+ var _mdmsRes$BPA2;
45646
+
45647
+ mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45648
+ var _checklist$conditions;
45649
+
45650
+ if ((checklist === null || checklist === void 0 ? void 0 : checklist.RiskType) === riskType && (checklist === null || checklist === void 0 ? void 0 : checklist.applicationType) === (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType) && (checklist === null || checklist === void 0 ? void 0 : checklist.ServiceType) === (edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType) && (checklist === null || checklist === void 0 ? void 0 : checklist.WFState) === "PENDINGAPPROVAL" && (checklist === null || checklist === void 0 ? void 0 : (_checklist$conditions = checklist.conditions) === null || _checklist$conditions === void 0 ? void 0 : _checklist$conditions.length) > 0) {
45651
+ approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45652
+ }
45653
+ });
45654
+ approvalChecksDetails = {
45655
+ title: "",
45656
+ isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45657
+ asSectionHeader: true,
45658
+ isPermissions: true,
45659
+ additionalDetails: {
45660
+ permissions: approvalChecks
45661
+ }
44409
45662
  };
44410
- })
44411
- }]
44412
- }
44413
- };
44414
- var approvalChecks = [];
44415
- var approvalChecksDetails = {};
45663
+ }
45664
+
45665
+ if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45666
+ var val;
45667
+ var i;
45668
+ var FieldInspectionData = [];
45669
+ inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail13 = BPA.additionalDetails) === null || _BPA$additionalDetail13 === void 0 ? void 0 : (_BPA$additionalDetail14 = _BPA$additionalDetail13.fieldinspection_pending) === null || _BPA$additionalDetail14 === void 0 ? void 0 : (_BPA$additionalDetail15 = _BPA$additionalDetail14[0]) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.questions.length) > 0 && inspectionReport.map(function (ob, index) {
45670
+ if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45671
+ title: ob.title,
45672
+ additionalDetails: {
45673
+ inspectionReport: [],
45674
+ values: ob.values
45675
+ }
45676
+ }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45677
+ title: ob.title,
45678
+ additionalDetails: {
45679
+ isChecklist: true,
45680
+ inspectionReport: [],
45681
+ values: ob.values
45682
+ }
45683
+ }]);else {
45684
+ var _ob$additionalDetails, _ob$additionalDetails2;
45685
+
45686
+ var improvedDoc = [].concat((_ob$additionalDetails = ob.additionalDetails.obpsDocuments) === null || _ob$additionalDetails === void 0 ? void 0 : (_ob$additionalDetails2 = _ob$additionalDetails[0]) === null || _ob$additionalDetails2 === void 0 ? void 0 : _ob$additionalDetails2.values);
45687
+ improvedDoc.map(function (ob) {
45688
+ ob["isNotDuplicate"] = true;
45689
+ });
45690
+ improvedDoc.map(function (ob, index) {
45691
+ val = ob.documentType;
45692
+ if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45693
+ if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45694
+ }
45695
+ });
45696
+ FieldInspectionData = [].concat(FieldInspectionData, [{
45697
+ title: ob.title,
45698
+ additionalDetails: {
45699
+ FIdocuments: [],
45700
+ "documents": [{
45701
+ values: improvedDoc
45702
+ }]
45703
+ }
45704
+ }]);
45705
+ }
45706
+ });
45707
+ var fiReports = {
45708
+ title: "",
45709
+ isFieldInspection: true,
45710
+ isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail16 = BPA.additionalDetails) === null || _BPA$additionalDetail16 === void 0 ? void 0 : (_BPA$additionalDetail17 = _BPA$additionalDetail16.fieldinspection_pending) === null || _BPA$additionalDetail17 === void 0 ? void 0 : _BPA$additionalDetail17.length) > 0 ? false : true,
45711
+ additionalDetails: {
45712
+ values: [],
45713
+ fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail18 = BPA.additionalDetails) === null || _BPA$additionalDetail18 === void 0 ? void 0 : (_BPA$additionalDetail19 = _BPA$additionalDetail18.fieldinspection_pending) === null || _BPA$additionalDetail19 === void 0 ? void 0 : _BPA$additionalDetail19.length) > 0 ? true : false
45714
+ }
45715
+ };
44416
45716
 
44417
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
44418
- var _mdmsRes$BPA2;
45717
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45718
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45719
+ } else {
45720
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45721
+ }
44419
45722
 
44420
- mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
44421
- var _checklist$conditions;
45723
+ if (billDetails !== null && billDetails !== void 0 && (_billDetails$addition = billDetails.additionalDetails) !== null && _billDetails$addition !== void 0 && (_billDetails$addition2 = _billDetails$addition.values) !== null && _billDetails$addition2 !== void 0 && _billDetails$addition2.length) {
45724
+ details.push(billDetails);
45725
+ }
44422
45726
 
44423
- if ((checklist === null || checklist === void 0 ? void 0 : checklist.RiskType) === riskType && (checklist === null || checklist === void 0 ? void 0 : checklist.applicationType) === (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType) && (checklist === null || checklist === void 0 ? void 0 : checklist.ServiceType) === (edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType) && (checklist === null || checklist === void 0 ? void 0 : checklist.WFState) === "PENDINGAPPROVAL" && (checklist === null || checklist === void 0 ? void 0 : (_checklist$conditions = checklist.conditions) === null || _checklist$conditions === void 0 ? void 0 : _checklist$conditions.length) > 0) {
44424
- approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
44425
- }
44426
- });
44427
- approvalChecksDetails = {
44428
- title: "",
44429
- isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
44430
- asSectionHeader: true,
44431
- isPermissions: true,
44432
- additionalDetails: {
44433
- permissions: approvalChecks
45727
+ var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45728
+ return data;
45729
+ });
45730
+ return {
45731
+ applicationData: BPA,
45732
+ applicationDetails: bpaFilterDetails,
45733
+ tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45734
+ edcrDetails: edcr,
45735
+ nocData: noc,
45736
+ comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45737
+ businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45738
+ applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45739
+ applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status,
45740
+ collectionBillDetails: collectionBillDetails
45741
+ };
44434
45742
  }
44435
- };
44436
- }
44437
45743
 
44438
- if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
44439
- var val;
44440
- var i;
44441
- var FieldInspectionData = [];
44442
- inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : (_BPA$additionalDetail12 = _BPA$additionalDetail11.fieldinspection_pending) === null || _BPA$additionalDetail12 === void 0 ? void 0 : (_BPA$additionalDetail13 = _BPA$additionalDetail12[0]) === null || _BPA$additionalDetail13 === void 0 ? void 0 : _BPA$additionalDetail13.questions.length) > 0 && inspectionReport.map(function (ob, index) {
44443
- if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
44444
- title: ob.title,
44445
- additionalDetails: {
44446
- inspectionReport: [],
44447
- values: ob.values
44448
- }
44449
- }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
44450
- title: ob.title,
44451
- additionalDetails: {
44452
- isChecklist: true,
44453
- inspectionReport: [],
44454
- values: ob.values
44455
- }
44456
- }]);else {
44457
- var _ob$additionalDetails, _ob$additionalDetails2;
45744
+ var i = 0;
44458
45745
 
44459
- var improvedDoc = [].concat((_ob$additionalDetails = ob.additionalDetails.obpsDocuments) === null || _ob$additionalDetails === void 0 ? void 0 : (_ob$additionalDetails2 = _ob$additionalDetails[0]) === null || _ob$additionalDetails2 === void 0 ? void 0 : _ob$additionalDetails2.values);
44460
- improvedDoc.map(function (ob) {
44461
- ob["isNotDuplicate"] = true;
44462
- });
44463
- improvedDoc.map(function (ob, index) {
44464
- val = ob.documentType;
44465
- if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
44466
- if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
44467
- }
45746
+ var _temp3 = _for(function () {
45747
+ var _appBusinessService;
45748
+
45749
+ return i < ((_appBusinessService = appBusinessService) === null || _appBusinessService === void 0 ? void 0 : _appBusinessService.length);
45750
+ }, function () {
45751
+ return i++;
45752
+ }, function () {
45753
+ return Promise.resolve(Digit.PaymentService.recieptSearch(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, appBusinessService[i], {
45754
+ consumerCodes: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45755
+ isEmployee: true
45756
+ })).then(function (collectionres) {
45757
+ var _collectionres$Paymen, _collectionres$Paymen3;
45758
+
45759
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen = collectionres.Payments) === null || _collectionres$Paymen === void 0 ? void 0 : _collectionres$Paymen.length) > 0) {
45760
+ var _collectionres$Paymen2;
45761
+
45762
+ collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen2 = collectionres.Payments) === null || _collectionres$Paymen2 === void 0 ? void 0 : _collectionres$Paymen2.map(function (res) {
45763
+ var _res$paymentDetails;
45764
+
45765
+ res === null || res === void 0 ? void 0 : (_res$paymentDetails = res.paymentDetails) === null || _res$paymentDetails === void 0 ? void 0 : _res$paymentDetails.map(function (resData) {
45766
+ if ((resData === null || resData === void 0 ? void 0 : resData.businessService) == appBusinessService[i]) {
45767
+ collectionBillRes.push(res);
45768
+ }
45769
+ });
45770
+ });
45771
+ }
45772
+
45773
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen3 = collectionres.Payments) === null || _collectionres$Paymen3 === void 0 ? void 0 : _collectionres$Paymen3.length) > 0) collectionBillDetails.push.apply(collectionBillDetails, collectionres === null || collectionres === void 0 ? void 0 : collectionres.Payments);
45774
+ });
44468
45775
  });
44469
- FieldInspectionData = [].concat(FieldInspectionData, [{
44470
- title: ob.title,
44471
- additionalDetails: {
44472
- FIdocuments: [],
44473
- "documents": [{
44474
- values: improvedDoc
44475
- }]
44476
- }
44477
- }]);
44478
- }
44479
- });
44480
- var fiReports = {
44481
- title: "",
44482
- isFieldInspection: true,
44483
- isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail14 = BPA.additionalDetails) === null || _BPA$additionalDetail14 === void 0 ? void 0 : (_BPA$additionalDetail15 = _BPA$additionalDetail14.fieldinspection_pending) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.length) > 0 ? false : true,
44484
- additionalDetails: {
44485
- values: [],
44486
- fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail16 = BPA.additionalDetails) === null || _BPA$additionalDetail16 === void 0 ? void 0 : (_BPA$additionalDetail17 = _BPA$additionalDetail16.fieldinspection_pending) === null || _BPA$additionalDetail17 === void 0 ? void 0 : _BPA$additionalDetail17.length) > 0 ? true : false
45776
+
45777
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
44487
45778
  }
44488
- };
44489
45779
 
44490
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
44491
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
44492
- } else {
44493
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45780
+ var appBusinessService = [],
45781
+ collectionBillDetails = [],
45782
+ collectionBillArray = [],
45783
+ totalAmount = 0,
45784
+ collectionBillRes = [];
45785
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA_LOW") appBusinessService = ["BPA.LOW_RISK_PERMIT_FEE"];else if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA") appBusinessService = ["BPA.NC_APP_FEE", "BPA.NC_SAN_FEE"];else if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA_OC") appBusinessService = ["BPA.NC_OC_APP_FEE", "BPA.NC_OC_SAN_FEE"];
45786
+ var fetchBillRes = {};
45787
+
45788
+ var _temp5 = function () {
45789
+ var _appBusinessService2;
45790
+
45791
+ if ((_appBusinessService2 = appBusinessService) !== null && _appBusinessService2 !== void 0 && _appBusinessService2[1]) {
45792
+ return Promise.resolve(Digit.PaymentService.fetchBill(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
45793
+ consumerCode: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45794
+ businessService: appBusinessService[1]
45795
+ })).then(function (_Digit$PaymentService) {
45796
+ fetchBillRes = _Digit$PaymentService;
45797
+ });
45798
+ }
45799
+ }();
45800
+
45801
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
44494
45802
  }
44495
45803
 
44496
- var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
44497
- return data;
45804
+ noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails) {
45805
+ var _nocDetails$documents2;
45806
+
45807
+ nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents2 = nocDetails.documents) === null || _nocDetails$documents2 === void 0 ? void 0 : _nocDetails$documents2.map(function (nocDoc) {
45808
+ if (nocDoc !== null && nocDoc !== void 0 && nocDoc.fileStoreId) appDocumentFileStoreIds.push(nocDoc === null || nocDoc === void 0 ? void 0 : nocDoc.fileStoreId);
45809
+ });
44498
45810
  });
44499
- return {
44500
- applicationData: BPA,
44501
- applicationDetails: bpaFilterDetails,
44502
- tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
44503
- edcrDetails: edcr,
44504
- nocData: noc,
44505
- comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
44506
- businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
44507
- applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
44508
- applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status
44509
- };
45811
+ var fileDetails = {};
45812
+
45813
+ var _temp7 = function () {
45814
+ var _appDocumentFileStore;
45815
+
45816
+ if (((_appDocumentFileStore = appDocumentFileStoreIds) === null || _appDocumentFileStore === void 0 ? void 0 : _appDocumentFileStore.length) > 0) {
45817
+ return Promise.resolve(UploadServices.Filefetch(appDocumentFileStoreIds, Digit.ULBService.getStateId())).then(function (_UploadServices$Filef2) {
45818
+ fileDetails = _UploadServices$Filef2;
45819
+ });
45820
+ }
45821
+ }();
45822
+
45823
+ return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
44510
45824
  });
44511
45825
  });
44512
45826
  });
@@ -44791,6 +46105,34 @@ var useOBPSDocumentSearch = function useOBPSDocumentSearch(_ref, config, Code, i
44791
46105
  };
44792
46106
  };
44793
46107
 
46108
+ var updateNOCAPI = function updateNOCAPI(data, tenantId) {
46109
+ try {
46110
+ return Promise.resolve(_catch(function () {
46111
+ return Promise.resolve(OBPSService.updateNOC(data, tenantId));
46112
+ }, function (error) {
46113
+ var _error$response, _error$response$data;
46114
+
46115
+ throw new Error(error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.Errors[0].code);
46116
+ }));
46117
+ } catch (e) {
46118
+ return Promise.reject(e);
46119
+ }
46120
+ };
46121
+
46122
+ var updateAPI = function updateAPI(data, tenantId) {
46123
+ try {
46124
+ return Promise.resolve(_catch(function () {
46125
+ return Promise.resolve(OBPSService.update(data, tenantId));
46126
+ }, function (error) {
46127
+ var _error$response2, _error$response2$data;
46128
+
46129
+ throw new Error(error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.Errors[0].code);
46130
+ }));
46131
+ } catch (e) {
46132
+ return Promise.reject(e);
46133
+ }
46134
+ };
46135
+
44794
46136
  var useObpsAPI = function useObpsAPI(tenantId, type) {
44795
46137
  if (type === void 0) {
44796
46138
  type = false;
@@ -44798,11 +46140,11 @@ var useObpsAPI = function useObpsAPI(tenantId, type) {
44798
46140
 
44799
46141
  if (type) {
44800
46142
  return useMutation(function (data) {
44801
- return OBPSService.updateNOC(data, tenantId);
46143
+ return updateNOCAPI(data, tenantId);
44802
46144
  });
44803
46145
  } else {
44804
46146
  return useMutation(function (data) {
44805
- return OBPSService.update(data, tenantId);
46147
+ return updateAPI(data, tenantId);
44806
46148
  });
44807
46149
  }
44808
46150
  };
@@ -44986,7 +46328,7 @@ var useBPAInbox = function useBPAInbox(_ref) {
44986
46328
  processSearchCriteria: _extends({
44987
46329
  assignee: assignee === "ASSIGNED_TO_ME" ? user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.uuid : "",
44988
46330
  moduleName: moduleName !== "BPAREG" ? "bpa-services" : "BPAREG",
44989
- businessService: moduleName !== "BPAREG" ? businessService ? [businessService] : ["BPA_LOW", "BPA", "BPA_OC"] : businessService ? [businessService.identifier] : ["ARCHITECT", "BUILDER", "ENGINEER", "STRUCTURALENGINEER"]
46331
+ businessService: moduleName !== "BPAREG" ? businessService ? [businessService] : ["BPA_LOW", "BPA", "BPA_OC"] : businessService ? [businessService.identifier] : ["ARCHITECT", "BUILDER", "ENGINEER", "STRUCTURALENGINEER", "TOWNPLANNER", "SUPERVISOR"]
44990
46332
  }, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
44991
46333
  status: applicationStatus
44992
46334
  } : {}),
@@ -45009,9 +46351,15 @@ var useBPAInbox = function useBPAInbox(_ref) {
45009
46351
  return item.code.split("_").pop();
45010
46352
  }).join(",")
45011
46353
  } : {}),
45012
- limit: limit,
45013
- offset: offset
46354
+ limit: limit
45014
46355
  };
46356
+
46357
+ if (!applicationNo) {
46358
+ _filters = _extends({}, _filters, {
46359
+ offset: offset
46360
+ });
46361
+ }
46362
+
45015
46363
  return useInbox({
45016
46364
  tenantId: tenantId,
45017
46365
  filters: _filters,
@@ -45408,8 +46756,8 @@ var useBusinessServiceData = function useBusinessServiceData(tenantId, businessS
45408
46756
  }, config);
45409
46757
  };
45410
46758
 
45411
- var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStateDocuments) {
45412
- var _bpaDocs$BPA, _filtredBpaDocs, _filtredBpaDocs$, _filtredBpaDocs$$docT;
46759
+ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, beforeUploadDocuments) {
46760
+ var _beforeUploadDocument, _data$pdfFiles, _bpaDocs$BPA, _filtredBpaDocs, _filtredBpaDocs$, _filtredBpaDocs$$docT;
45413
46761
 
45414
46762
  var _Digit$Hooks$obps$use = Digit.Hooks.obps.useMDMS(stateId, "BPA", ["DocTypeMapping"]),
45415
46763
  bpaDocsLoading = _Digit$Hooks$obps$use.isLoading,
@@ -45419,6 +46767,17 @@ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStat
45419
46767
  commonDocsLoading = _Digit$Hooks$obps$use2.isLoading,
45420
46768
  commonDocs = _Digit$Hooks$obps$use2.data;
45421
46769
 
46770
+ var documents = beforeUploadDocuments;
46771
+
46772
+ var _Digit$Hooks$useDocum = Digit.Hooks.useDocumentSearch(documents, {
46773
+ enabled: ((_beforeUploadDocument = beforeUploadDocuments) === null || _beforeUploadDocument === void 0 ? void 0 : _beforeUploadDocument.length) > 0 ? true : false
46774
+ }),
46775
+ data = _Digit$Hooks$useDocum.data;
46776
+
46777
+ if ((data === null || data === void 0 ? void 0 : (_data$pdfFiles = data.pdfFiles) === null || _data$pdfFiles === void 0 ? void 0 : _data$pdfFiles.length) > 0) {
46778
+ beforeUploadDocuments = data === null || data === void 0 ? void 0 : data.pdfFiles;
46779
+ }
46780
+
45422
46781
  var filtredBpaDocs = [];
45423
46782
 
45424
46783
  if (bpaDocs !== null && bpaDocs !== void 0 && (_bpaDocs$BPA = bpaDocs.BPA) !== null && _bpaDocs$BPA !== void 0 && _bpaDocs$BPA.DocTypeMapping) {
@@ -45449,7 +46808,7 @@ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStat
45449
46808
  });
45450
46809
  doc.uploadedDocuments[0] = {};
45451
46810
  doc.uploadedDocuments[0].values = [];
45452
- PrevStateDocuments.map(function (upDocs) {
46811
+ beforeUploadDocuments.map(function (upDocs) {
45453
46812
  var _upDocs$documentType, _upDocs$documentType2;
45454
46813
 
45455
46814
  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])) {
@@ -46530,6 +47889,7 @@ var Hooks = {
46530
47889
  useClearNotifications: useClearNotifications,
46531
47890
  useNotificationCount: useNotificationCount,
46532
47891
  useStore: useStore$1,
47892
+ useDocumentSearch: useDocumentSearch,
46533
47893
  useTenants: useTenants,
46534
47894
  useInbox: useTLInbox,
46535
47895
  pgr: pgr,