@autologix-engineering/shared 1.2.355 → 1.2.357

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/package.json +1 -1
  2. package/src/lib/commands/src/generate.pdf.invoice.d.ts +0 -1
  3. package/src/lib/commands/src/generate.pdf.invoice.js.map +1 -1
  4. package/src/lib/contract-state/src/contract.coverage.bound.d.ts +37 -0
  5. package/src/lib/contract-state/src/contract.coverage.bound.js +45 -0
  6. package/src/lib/contract-state/src/contract.coverage.bound.js.map +1 -0
  7. package/src/lib/contract-state/src/index.d.ts +1 -0
  8. package/src/lib/contract-state/src/index.js +1 -0
  9. package/src/lib/contract-state/src/index.js.map +1 -1
  10. package/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.d.ts +66 -0
  11. package/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.js +139 -0
  12. package/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.js.map +1 -0
  13. package/src/lib/data-transfer-objects/src/calculate.non.pool.ltr.invoice.data.dto.d.ts +1 -0
  14. package/src/lib/data-transfer-objects/src/calculate.non.pool.ltr.invoice.data.dto.js +5 -0
  15. package/src/lib/data-transfer-objects/src/calculate.non.pool.ltr.invoice.data.dto.js.map +1 -1
  16. package/src/lib/data-transfer-objects/src/command/add.ltr.vehicle.master.dto.d.ts +1 -0
  17. package/src/lib/data-transfer-objects/src/command/add.ltr.vehicle.master.dto.js +5 -0
  18. package/src/lib/data-transfer-objects/src/command/add.ltr.vehicle.master.dto.js.map +1 -1
  19. package/src/lib/data-transfer-objects/src/command/add.tds.config.dto.d.ts +7 -0
  20. package/src/lib/data-transfer-objects/src/command/add.tds.config.dto.js +30 -0
  21. package/src/lib/data-transfer-objects/src/command/add.tds.config.dto.js.map +1 -0
  22. package/src/lib/data-transfer-objects/src/command/index.d.ts +4 -0
  23. package/src/lib/data-transfer-objects/src/command/index.js +4 -0
  24. package/src/lib/data-transfer-objects/src/command/index.js.map +1 -1
  25. package/src/lib/data-transfer-objects/src/command/post.corporate.alerts.dto.js +6 -0
  26. package/src/lib/data-transfer-objects/src/command/post.corporate.alerts.dto.js.map +1 -1
  27. package/src/lib/data-transfer-objects/src/command/retry.generate.irn.dto.d.ts +3 -0
  28. package/src/lib/data-transfer-objects/src/command/retry.generate.irn.dto.js +9 -0
  29. package/src/lib/data-transfer-objects/src/command/retry.generate.irn.dto.js.map +1 -0
  30. package/src/lib/data-transfer-objects/src/command/update.ltr.request.dto.d.ts +1 -1
  31. package/src/lib/data-transfer-objects/src/command/update.ltr.request.dto.js +1 -0
  32. package/src/lib/data-transfer-objects/src/command/update.ltr.request.dto.js.map +1 -1
  33. package/src/lib/data-transfer-objects/src/command/update.tds.config.dto.d.ts +11 -0
  34. package/src/lib/data-transfer-objects/src/command/update.tds.config.dto.js +30 -0
  35. package/src/lib/data-transfer-objects/src/command/update.tds.config.dto.js.map +1 -0
  36. package/src/lib/data-transfer-objects/src/command/update.tds.config.status.dto.d.ts +7 -0
  37. package/src/lib/data-transfer-objects/src/command/update.tds.config.status.dto.js +22 -0
  38. package/src/lib/data-transfer-objects/src/command/update.tds.config.status.dto.js.map +1 -0
  39. package/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.d.ts +2 -0
  40. package/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.js +10 -0
  41. package/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.js.map +1 -1
  42. package/src/lib/data-transfer-objects/src/create.vendor.dto.d.ts +1 -0
  43. package/src/lib/data-transfer-objects/src/create.vendor.dto.js +7 -1
  44. package/src/lib/data-transfer-objects/src/create.vendor.dto.js.map +1 -1
  45. package/src/lib/data-transfer-objects/src/discard.business.associate.payout.draft.dto.d.ts +7 -0
  46. package/src/lib/data-transfer-objects/src/discard.business.associate.payout.draft.dto.js +28 -0
  47. package/src/lib/data-transfer-objects/src/discard.business.associate.payout.draft.dto.js.map +1 -0
  48. package/src/lib/data-transfer-objects/src/duties.query.dto.d.ts +14 -0
  49. package/src/lib/data-transfer-objects/src/duties.query.dto.js +5 -0
  50. package/src/lib/data-transfer-objects/src/duties.query.dto.js.map +1 -1
  51. package/src/lib/data-transfer-objects/src/gatekeeper/create.onboarding.user.dto.d.ts +1 -0
  52. package/src/lib/data-transfer-objects/src/gatekeeper/create.onboarding.user.dto.js +8 -1
  53. package/src/lib/data-transfer-objects/src/gatekeeper/create.onboarding.user.dto.js.map +1 -1
  54. package/src/lib/data-transfer-objects/src/gatekeeper/get.registered.user.ltr.dto.d.ts +7 -0
  55. package/src/lib/data-transfer-objects/src/gatekeeper/get.registered.user.ltr.dto.js +21 -0
  56. package/src/lib/data-transfer-objects/src/gatekeeper/get.registered.user.ltr.dto.js.map +1 -0
  57. package/src/lib/data-transfer-objects/src/gatekeeper/get.user.by.phone.dto.d.ts +1 -0
  58. package/src/lib/data-transfer-objects/src/gatekeeper/get.user.by.phone.dto.js +8 -1
  59. package/src/lib/data-transfer-objects/src/gatekeeper/get.user.by.phone.dto.js.map +1 -1
  60. package/src/lib/data-transfer-objects/src/gatekeeper/index.d.ts +2 -0
  61. package/src/lib/data-transfer-objects/src/gatekeeper/index.js +2 -0
  62. package/src/lib/data-transfer-objects/src/gatekeeper/index.js.map +1 -1
  63. package/src/lib/data-transfer-objects/src/gatekeeper/send.email.login.otp.dto.d.ts +37 -0
  64. package/src/lib/data-transfer-objects/src/gatekeeper/send.email.login.otp.dto.js +36 -1
  65. package/src/lib/data-transfer-objects/src/gatekeeper/send.email.login.otp.dto.js.map +1 -1
  66. package/src/lib/data-transfer-objects/src/gatekeeper/send.ltr.sign.off.otp.dto.d.ts +17 -0
  67. package/src/lib/data-transfer-objects/src/gatekeeper/send.ltr.sign.off.otp.dto.js +29 -0
  68. package/src/lib/data-transfer-objects/src/gatekeeper/send.ltr.sign.off.otp.dto.js.map +1 -0
  69. package/src/lib/data-transfer-objects/src/get.active.preferred.package.dto.d.ts +1 -0
  70. package/src/lib/data-transfer-objects/src/get.active.preferred.package.dto.js +6 -1
  71. package/src/lib/data-transfer-objects/src/get.active.preferred.package.dto.js.map +1 -1
  72. package/src/lib/data-transfer-objects/src/get.business.associate.payout.draft.dto.d.ts +25 -0
  73. package/src/lib/data-transfer-objects/src/get.business.associate.payout.draft.dto.js +25 -0
  74. package/src/lib/data-transfer-objects/src/get.business.associate.payout.draft.dto.js.map +1 -0
  75. package/src/lib/data-transfer-objects/src/get.ltr.driver.bookings.dto.d.ts +5 -0
  76. package/src/lib/data-transfer-objects/src/get.ltr.driver.bookings.dto.js +17 -0
  77. package/src/lib/data-transfer-objects/src/get.ltr.driver.bookings.dto.js.map +1 -0
  78. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.logs.dto.d.ts +18 -0
  79. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.logs.dto.js +33 -0
  80. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.logs.dto.js.map +1 -0
  81. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.d.ts +33 -0
  82. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.js +36 -0
  83. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.js.map +1 -0
  84. package/src/lib/data-transfer-objects/src/get.ltr.driver.payout.rows.dto.d.ts +66 -0
  85. package/src/lib/data-transfer-objects/src/get.ltr.driver.payout.rows.dto.js +53 -0
  86. package/src/lib/data-transfer-objects/src/get.ltr.driver.payout.rows.dto.js.map +1 -0
  87. package/src/lib/data-transfer-objects/src/get.ltr.vehicle.master.dto.d.ts +1 -0
  88. package/src/lib/data-transfer-objects/src/get.ltr.vehicle.master.dto.js +9 -2
  89. package/src/lib/data-transfer-objects/src/get.ltr.vehicle.master.dto.js.map +1 -1
  90. package/src/lib/data-transfer-objects/src/get.tds.config.dto.d.ts +9 -0
  91. package/src/lib/data-transfer-objects/src/get.tds.config.dto.js +34 -0
  92. package/src/lib/data-transfer-objects/src/get.tds.config.dto.js.map +1 -0
  93. package/src/lib/data-transfer-objects/src/gst.dto.d.ts +9 -4
  94. package/src/lib/data-transfer-objects/src/gst.dto.js +9 -1
  95. package/src/lib/data-transfer-objects/src/gst.dto.js.map +1 -1
  96. package/src/lib/data-transfer-objects/src/index.d.ts +14 -2
  97. package/src/lib/data-transfer-objects/src/index.js +14 -2
  98. package/src/lib/data-transfer-objects/src/index.js.map +1 -1
  99. package/src/lib/data-transfer-objects/src/passenger.persona.custom.dto.d.ts +1 -0
  100. package/src/lib/data-transfer-objects/src/passenger.persona.custom.dto.js +6 -1
  101. package/src/lib/data-transfer-objects/src/passenger.persona.custom.dto.js.map +1 -1
  102. package/src/lib/data-transfer-objects/src/save.business.associate.payout.draft.dto.d.ts +25 -0
  103. package/src/lib/data-transfer-objects/src/save.business.associate.payout.draft.dto.js +59 -0
  104. package/src/lib/data-transfer-objects/src/save.business.associate.payout.draft.dto.js.map +1 -0
  105. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.entry.dto.d.ts +44 -0
  106. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.entry.dto.js +51 -0
  107. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.entry.dto.js.map +1 -0
  108. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.month.dto.d.ts +60 -0
  109. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.month.dto.js +65 -0
  110. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.month.dto.js.map +1 -0
  111. package/src/lib/data-transfer-objects/src/update.global.config.dto.d.ts +10 -1
  112. package/src/lib/data-transfer-objects/src/update.global.config.dto.js +50 -2
  113. package/src/lib/data-transfer-objects/src/update.global.config.dto.js.map +1 -1
  114. package/src/lib/data-transfer-objects/src/update.ltr.log.confirmation.config.dto.d.ts +6 -0
  115. package/src/lib/data-transfer-objects/src/update.ltr.log.confirmation.config.dto.js +20 -0
  116. package/src/lib/data-transfer-objects/src/update.ltr.log.confirmation.config.dto.js.map +1 -0
  117. package/src/lib/data-transfer-objects/src/update.ltr.payout.rows.dto.d.ts +18 -0
  118. package/src/lib/data-transfer-objects/src/update.ltr.payout.rows.dto.js +20 -0
  119. package/src/lib/data-transfer-objects/src/update.ltr.payout.rows.dto.js.map +1 -0
  120. package/src/lib/enums/src/alert.command.types.js +1 -1
  121. package/src/lib/enums/src/alert.command.types.js.map +1 -1
  122. package/src/lib/enums/src/ba.payout.draft.enum.d.ts +13 -0
  123. package/src/lib/enums/src/ba.payout.draft.enum.js +15 -0
  124. package/src/lib/enums/src/ba.payout.draft.enum.js.map +1 -0
  125. package/src/lib/enums/src/city.state.mapping.js +2 -2
  126. package/src/lib/enums/src/command.type.enum.d.ts +12 -1
  127. package/src/lib/enums/src/command.type.enum.js +12 -1
  128. package/src/lib/enums/src/command.type.enum.js.map +1 -1
  129. package/src/lib/enums/src/index.d.ts +5 -0
  130. package/src/lib/enums/src/index.js +5 -0
  131. package/src/lib/enums/src/index.js.map +1 -1
  132. package/src/lib/enums/src/internal.alert.type.map.js +1 -0
  133. package/src/lib/enums/src/internal.alert.type.map.js.map +1 -1
  134. package/src/lib/enums/src/internal.alert.type.variable.map.js +7 -0
  135. package/src/lib/enums/src/internal.alert.type.variable.map.js.map +1 -1
  136. package/src/lib/enums/src/internal.alert.types.enum.d.ts +2 -1
  137. package/src/lib/enums/src/internal.alert.types.enum.js +1 -0
  138. package/src/lib/enums/src/internal.alert.types.enum.js.map +1 -1
  139. package/src/lib/enums/src/ltr.font.enum.d.ts +5 -0
  140. package/src/lib/enums/src/ltr.font.enum.js +7 -0
  141. package/src/lib/enums/src/ltr.font.enum.js.map +1 -0
  142. package/src/lib/enums/src/ltr.payout.enum.d.ts +67 -0
  143. package/src/lib/enums/src/ltr.payout.enum.js +74 -0
  144. package/src/lib/enums/src/ltr.payout.enum.js.map +1 -0
  145. package/src/lib/enums/src/model.enum.d.ts +8 -0
  146. package/src/lib/enums/src/model.enum.js +8 -0
  147. package/src/lib/enums/src/model.enum.js.map +1 -1
  148. package/src/lib/enums/src/others.default.data.js +5 -0
  149. package/src/lib/enums/src/others.default.data.js.map +1 -1
  150. package/src/lib/enums/src/otp.scope.enum.d.ts +16 -0
  151. package/src/lib/enums/src/otp.scope.enum.js +18 -0
  152. package/src/lib/enums/src/otp.scope.enum.js.map +1 -0
  153. package/src/lib/enums/src/query.type.enum.d.ts +6 -1
  154. package/src/lib/enums/src/query.type.enum.js +6 -1
  155. package/src/lib/enums/src/query.type.enum.js.map +1 -1
  156. package/src/lib/enums/src/report.command.types.js +1 -0
  157. package/src/lib/enums/src/report.command.types.js.map +1 -1
  158. package/src/lib/enums/src/retry.task.enum.d.ts +28 -0
  159. package/src/lib/enums/src/retry.task.enum.js +31 -0
  160. package/src/lib/enums/src/retry.task.enum.js.map +1 -0
  161. package/src/lib/enums/src/state.full.name.number.code.map.js +4 -0
  162. package/src/lib/enums/src/state.full.name.number.code.map.js.map +1 -1
  163. package/src/lib/enums/src/vendor.default.fields.json.js +19 -2
  164. package/src/lib/enums/src/vendor.default.fields.json.js.map +1 -1
  165. package/src/lib/models/src/auth.profile.model.d.ts +13 -0
  166. package/src/lib/models/src/auth.profile.model.js +7 -0
  167. package/src/lib/models/src/auth.profile.model.js.map +1 -1
  168. package/src/lib/models/src/ba.contract.model.d.ts +13 -0
  169. package/src/lib/models/src/ba.contract.model.js +2 -0
  170. package/src/lib/models/src/ba.contract.model.js.map +1 -1
  171. package/src/lib/models/src/ba.payout.draft.model.d.ts +77 -0
  172. package/src/lib/models/src/ba.payout.draft.model.js +31 -0
  173. package/src/lib/models/src/ba.payout.draft.model.js.map +1 -0
  174. package/src/lib/models/src/ba.payout.row.model.d.ts +35 -0
  175. package/src/lib/models/src/ba.payout.row.model.js +2 -0
  176. package/src/lib/models/src/ba.payout.row.model.js.map +1 -1
  177. package/src/lib/models/src/client.configuration.model.d.ts +9 -2
  178. package/src/lib/models/src/client.configuration.model.js +3 -0
  179. package/src/lib/models/src/client.configuration.model.js.map +1 -1
  180. package/src/lib/models/src/configurations.model.d.ts +18 -2
  181. package/src/lib/models/src/configurations.model.js +8 -0
  182. package/src/lib/models/src/configurations.model.js.map +1 -1
  183. package/src/lib/models/src/gst.model.d.ts +12 -2
  184. package/src/lib/models/src/gst.model.js +1 -0
  185. package/src/lib/models/src/gst.model.js.map +1 -1
  186. package/src/lib/models/src/index.d.ts +9 -0
  187. package/src/lib/models/src/index.js +9 -0
  188. package/src/lib/models/src/index.js.map +1 -1
  189. package/src/lib/models/src/ltr.log.confirmation.model.d.ts +30 -0
  190. package/src/lib/models/src/ltr.log.confirmation.model.js +15 -0
  191. package/src/lib/models/src/ltr.log.confirmation.model.js.map +1 -0
  192. package/src/lib/models/src/ltr.payout.model.d.ts +37 -2
  193. package/src/lib/models/src/ltr.payout.model.js +22 -0
  194. package/src/lib/models/src/ltr.payout.model.js.map +1 -1
  195. package/src/lib/models/src/ltr.payout.month.sign.off.model.d.ts +85 -0
  196. package/src/lib/models/src/ltr.payout.month.sign.off.model.js +28 -0
  197. package/src/lib/models/src/ltr.payout.month.sign.off.model.js.map +1 -0
  198. package/src/lib/models/src/ltr.payout.row.audit.model.d.ts +44 -0
  199. package/src/lib/models/src/ltr.payout.row.audit.model.js +22 -0
  200. package/src/lib/models/src/ltr.payout.row.audit.model.js.map +1 -0
  201. package/src/lib/models/src/ltr.payout.row.group.model.d.ts +73 -0
  202. package/src/lib/models/src/ltr.payout.row.group.model.js +25 -0
  203. package/src/lib/models/src/ltr.payout.row.group.model.js.map +1 -0
  204. package/src/lib/models/src/ltr.payout.row.image.model.d.ts +34 -0
  205. package/src/lib/models/src/ltr.payout.row.image.model.js +11 -0
  206. package/src/lib/models/src/ltr.payout.row.image.model.js.map +1 -0
  207. package/src/lib/models/src/ltr.vehicle.master.model.d.ts +2 -0
  208. package/src/lib/models/src/ltr.vehicle.master.model.js +1 -0
  209. package/src/lib/models/src/ltr.vehicle.master.model.js.map +1 -1
  210. package/src/lib/models/src/passenger.persona.model.d.ts +18 -2
  211. package/src/lib/models/src/passenger.persona.model.js +8 -0
  212. package/src/lib/models/src/passenger.persona.model.js.map +1 -1
  213. package/src/lib/models/src/retry.task.model.d.ts +56 -0
  214. package/src/lib/models/src/retry.task.model.js +26 -0
  215. package/src/lib/models/src/retry.task.model.js.map +1 -0
  216. package/src/lib/models/src/tds.config.activity.log.model.d.ts +34 -0
  217. package/src/lib/models/src/tds.config.activity.log.model.js +15 -0
  218. package/src/lib/models/src/tds.config.activity.log.model.js.map +1 -0
  219. package/src/lib/models/src/tds.config.model.d.ts +47 -0
  220. package/src/lib/models/src/tds.config.model.js +18 -0
  221. package/src/lib/models/src/tds.config.model.js.map +1 -0
  222. package/src/lib/models/src/vendor.persona.model.d.ts +6 -1
  223. package/src/lib/models/src/vendor.persona.model.js +2 -0
  224. package/src/lib/models/src/vendor.persona.model.js.map +1 -1
  225. package/src/lib/models/src/white.label.config.model.d.ts +6 -2
  226. package/src/lib/models/src/white.label.config.model.js +2 -0
  227. package/src/lib/models/src/white.label.config.model.js.map +1 -1
  228. package/src/lib/routes/src/command.registry.routes.d.ts +11 -0
  229. package/src/lib/routes/src/command.registry.routes.js +11 -0
  230. package/src/lib/routes/src/command.registry.routes.js.map +1 -1
  231. package/src/lib/routes/src/gatekeeper.routes.d.ts +2 -0
  232. package/src/lib/routes/src/gatekeeper.routes.js +2 -0
  233. package/src/lib/routes/src/gatekeeper.routes.js.map +1 -1
  234. package/src/lib/routes/src/query.service.routes.d.ts +6 -1
  235. package/src/lib/routes/src/query.service.routes.js +6 -1
  236. package/src/lib/routes/src/query.service.routes.js.map +1 -1
  237. package/src/lib/utilities/src/ba.contract.lock.d.ts +55 -0
  238. package/src/lib/utilities/src/ba.contract.lock.js +168 -0
  239. package/src/lib/utilities/src/ba.contract.lock.js.map +1 -0
  240. package/src/lib/utilities/src/index.d.ts +5 -1
  241. package/src/lib/utilities/src/index.js +5 -1
  242. package/src/lib/utilities/src/index.js.map +1 -1
  243. package/src/lib/utilities/src/ltr.cycle.month.index.d.ts +1 -0
  244. package/src/lib/utilities/src/ltr.cycle.month.index.js +9 -0
  245. package/src/lib/utilities/src/ltr.cycle.month.index.js.map +1 -0
  246. package/src/lib/utilities/src/ltr.payout.row.key.d.ts +43 -0
  247. package/src/lib/utilities/src/ltr.payout.row.key.js +78 -0
  248. package/src/lib/utilities/src/ltr.payout.row.key.js.map +1 -0
  249. package/src/lib/utilities/src/parse.display.date.d.ts +16 -0
  250. package/src/lib/utilities/src/parse.display.date.js +43 -0
  251. package/src/lib/utilities/src/parse.display.date.js.map +1 -0
  252. package/src/lib/utilities/src/resolve.gst.state.d.ts +23 -0
  253. package/src/lib/utilities/src/resolve.gst.state.js +32 -0
  254. package/src/lib/utilities/src/resolve.gst.state.js.map +1 -0
  255. package/src/lib/view-models/src/public.config.d.ts +5 -1
  256. package/src/lib/view-models/src/successful.response.d.ts +17 -0
  257. package/src/lib/data-transfer-objects/src/get.ext.available.ratecards.dto.d.ts +0 -5
  258. package/src/lib/data-transfer-objects/src/get.ext.available.ratecards.dto.js +0 -19
  259. package/src/lib/data-transfer-objects/src/get.ext.available.ratecards.dto.js.map +0 -1
  260. package/src/lib/utilities/src/pick.latest.numbered.invoice.d.ts +0 -21
  261. package/src/lib/utilities/src/pick.latest.numbered.invoice.js +0 -52
  262. package/src/lib/utilities/src/pick.latest.numbered.invoice.js.map +0 -1
@@ -0,0 +1,55 @@
1
+ import { BAContractField, IBAContract } from '../../models/src/index';
2
+ /**
3
+ * Has the contract run past its effective end day?
4
+ *
5
+ * "Expired" is not a status. BAContractStatus is Active | Inactive |
6
+ * Surrendered | Cancelled, and expiry is applied by the endBAContracts cron at
7
+ * 00:00 IST, which flips Active -> Inactive once the end date has passed. So a
8
+ * contract is expired in the stored sense the moment that cron touches it, and
9
+ * expired in the real sense from the day after its effective end. This answers
10
+ * the second question, which is the one that closes the up-to-24-hour window
11
+ * between the two.
12
+ *
13
+ * Strictly before today: a contract is still live on its own end date.
14
+ */
15
+ export declare function isBAContractExpired(contract: IBAContract | null | undefined, now?: Date): boolean;
16
+ /**
17
+ * Is the contract past termination, and therefore read-only apart from the RM
18
+ * and SD refund fields?
19
+ *
20
+ * True when the contract is Surrendered, or Inactive (where the expiry cron
21
+ * parks expired contracts), or still Active only because that cron has not run
22
+ * since its effective end day passed.
23
+ *
24
+ * Cancelled is deliberately not here. AD-3246 names Surrendered and Expired
25
+ * and nothing else, and a cancelled contract is editable today; folding it in
26
+ * would be a silent behaviour change nobody asked for. It is worth a ticket of
27
+ * its own.
28
+ *
29
+ * Inactive covers one case that is not strictly expiry — a contract
30
+ * deactivated because its business associate was switched off. Locking that is
31
+ * not a regression: an Inactive contract is already entirely read-only in the
32
+ * UI today, so the only thing this changes for it is that the RM and SD refund
33
+ * fields become editable, which is the point of the ticket.
34
+ */
35
+ export declare function isBAContractLocked(contract: IBAContract | null | undefined, now?: Date): boolean;
36
+ /**
37
+ * The only fields an editor may change on a locked contract: the RM block and
38
+ * the SD block, so finance and CS can still settle refunds after termination.
39
+ *
40
+ * Model field names, which is also what the `BAContracts` columns are called,
41
+ * so this list can be used directly to filter an entity patch. The UI holds
42
+ * the same eight fields under its own Formik names; there is no single
43
+ * spelling that serves both, so the pairing is written down here rather than
44
+ * pretended away.
45
+ *
46
+ * rvStatus / RVStatus RM Status
47
+ * rvAmount / RVRefundAmount RM Refund Amount
48
+ * rvRefundDate / RVRefundDate RM Refund Date
49
+ * rvRemarks / RVRemarks RM Remarks
50
+ * sdStatus / SDStatus SD Status
51
+ * refundAmount / RefundAmount SD Refund Amount
52
+ * refundDate / RefundDate SD Refund Date
53
+ * refundRemarks / RefundRemarks SD Remarks
54
+ */
55
+ export declare const BA_CONTRACT_LOCK_EDITABLE_FIELDS: BAContractField[];
@@ -0,0 +1,168 @@
1
+ import { BAContractField } from '../../models/src/index';
2
+ import { BAContractStatus } from '../../enums/src/index';
3
+ import { IST_OFFSET_MS } from './ist';
4
+ const MS_PER_DAY = 24 * 60 * 60 * 1000;
5
+ /**
6
+ * The IST calendar day an instant falls on, as a plain day number.
7
+ *
8
+ * Deliberately arithmetic rather than `toLocaleString('en-IN')` or a moment
9
+ * timezone: this file is compiled into both the API and the browser bundle,
10
+ * and the two have to agree. A locale-based conversion agrees only when the
11
+ * browser happens to be in Asia/Kolkata, which is exactly the case that hides
12
+ * the bug during local testing.
13
+ *
14
+ * An instant landing exactly on IST midnight is attributed to the day that is
15
+ * *starting*. That is the plain reading, and it is also the safe one — see the
16
+ * note on effectiveEndDay.
17
+ */
18
+ function istDayNumber(instant) {
19
+ return Math.floor((instant.getTime() + IST_OFFSET_MS) / MS_PER_DAY);
20
+ }
21
+ /**
22
+ * The day the contract actually stops running: the earlier of its end date and
23
+ * its surrender effective date.
24
+ *
25
+ * AND, not OR — the same rule findBAContractForBooking settled on. A contract
26
+ * surrendered early still carries its original, later `contractEndDate`, so
27
+ * taking whichever is present last would keep a surrendered contract alive
28
+ * until its untouched end date.
29
+ *
30
+ * Returns null when the contract has no usable end boundary at all, which the
31
+ * callers read as "cannot conclude it has expired".
32
+ *
33
+ * ---------------------------------------------------------------------------
34
+ * On the time-of-day spread in these two columns, and why this errs late
35
+ * ---------------------------------------------------------------------------
36
+ *
37
+ * Both are naive timestamps written by several generations of code, and they
38
+ * do not share a convention. On staging:
39
+ *
40
+ * contractEndDate 18:29:59.999Z (255) IST end of the stored day
41
+ * 18:30:00.000Z ( 46) IST midnight *starting* the
42
+ * next day — an exclusive bound
43
+ * 00:00:00.000Z ( 89) 05:30 IST on the stored day
44
+ *
45
+ * surrenderEffectiveDate 18:30:00.000Z (125) IST midnight of the effective
46
+ * day (a legacy startOfDay)
47
+ * 18:29:59.999Z ( 2) IST end of the effective day
48
+ * (today's formatToEndOfDay)
49
+ *
50
+ * Plain flooring gives the right day for every one of those except
51
+ * contractEndDate at 18:30:00.000Z, where it lands one day late — the instant
52
+ * sits exactly on a day boundary and is read as the day beginning.
53
+ *
54
+ * That is left alone on purpose. Nudging the boundary back (subtracting a
55
+ * millisecond before flooring) would fix those 46 rows and simultaneously
56
+ * break the 125 surrender rows, which carry the same literal timestamp with
57
+ * the opposite meaning. There is no single adjustment that is right for both
58
+ * columns, so the tie is broken by consequence rather than by neatness:
59
+ *
60
+ * - Late is free. The contract stays editable one extra day, which is the
61
+ * behaviour it had before this rule existed, and the endBAContracts cron
62
+ * flips it to Inactive anyway — at which point the status check locks it.
63
+ * - Early is a bug. It takes a contract that is still live and makes most of
64
+ * it read-only for a user who is entitled to edit it.
65
+ *
66
+ * This whole derived branch only covers the window between a contract ending
67
+ * and the 00:00 IST cron sweeping it. It is defence in depth, not the primary
68
+ * rule, and as of writing it changes the answer for zero of the 39 Active
69
+ * contracts on staging. Precision here is not worth a false lock.
70
+ */
71
+ function effectiveEndDay(contract) {
72
+ const endRaw = contract?.[BAContractField.ContractEndDate];
73
+ const surrenderRaw = contract?.[BAContractField.SurrenderEffectiveDate];
74
+ const days = [];
75
+ for (const raw of [endRaw, surrenderRaw]) {
76
+ if (!raw)
77
+ continue;
78
+ const parsed = new Date(raw);
79
+ if (isNaN(parsed.getTime()))
80
+ continue;
81
+ days.push(istDayNumber(parsed));
82
+ }
83
+ if (!days.length)
84
+ return null;
85
+ return Math.min(...days);
86
+ }
87
+ /**
88
+ * Has the contract run past its effective end day?
89
+ *
90
+ * "Expired" is not a status. BAContractStatus is Active | Inactive |
91
+ * Surrendered | Cancelled, and expiry is applied by the endBAContracts cron at
92
+ * 00:00 IST, which flips Active -> Inactive once the end date has passed. So a
93
+ * contract is expired in the stored sense the moment that cron touches it, and
94
+ * expired in the real sense from the day after its effective end. This answers
95
+ * the second question, which is the one that closes the up-to-24-hour window
96
+ * between the two.
97
+ *
98
+ * Strictly before today: a contract is still live on its own end date.
99
+ */
100
+ export function isBAContractExpired(contract, now = new Date()) {
101
+ if (!contract)
102
+ return false;
103
+ const endDay = effectiveEndDay(contract);
104
+ if (endDay === null)
105
+ return false;
106
+ return endDay < istDayNumber(now);
107
+ }
108
+ /**
109
+ * Is the contract past termination, and therefore read-only apart from the RM
110
+ * and SD refund fields?
111
+ *
112
+ * True when the contract is Surrendered, or Inactive (where the expiry cron
113
+ * parks expired contracts), or still Active only because that cron has not run
114
+ * since its effective end day passed.
115
+ *
116
+ * Cancelled is deliberately not here. AD-3246 names Surrendered and Expired
117
+ * and nothing else, and a cancelled contract is editable today; folding it in
118
+ * would be a silent behaviour change nobody asked for. It is worth a ticket of
119
+ * its own.
120
+ *
121
+ * Inactive covers one case that is not strictly expiry — a contract
122
+ * deactivated because its business associate was switched off. Locking that is
123
+ * not a regression: an Inactive contract is already entirely read-only in the
124
+ * UI today, so the only thing this changes for it is that the RM and SD refund
125
+ * fields become editable, which is the point of the ticket.
126
+ */
127
+ export function isBAContractLocked(contract, now = new Date()) {
128
+ if (!contract)
129
+ return false;
130
+ const status = contract?.[BAContractField.Status];
131
+ if (status === BAContractStatus.Cancelled)
132
+ return false;
133
+ if (status === BAContractStatus.Surrendered)
134
+ return true;
135
+ if (status === BAContractStatus.InActive)
136
+ return true;
137
+ return isBAContractExpired(contract, now);
138
+ }
139
+ /**
140
+ * The only fields an editor may change on a locked contract: the RM block and
141
+ * the SD block, so finance and CS can still settle refunds after termination.
142
+ *
143
+ * Model field names, which is also what the `BAContracts` columns are called,
144
+ * so this list can be used directly to filter an entity patch. The UI holds
145
+ * the same eight fields under its own Formik names; there is no single
146
+ * spelling that serves both, so the pairing is written down here rather than
147
+ * pretended away.
148
+ *
149
+ * rvStatus / RVStatus RM Status
150
+ * rvAmount / RVRefundAmount RM Refund Amount
151
+ * rvRefundDate / RVRefundDate RM Refund Date
152
+ * rvRemarks / RVRemarks RM Remarks
153
+ * sdStatus / SDStatus SD Status
154
+ * refundAmount / RefundAmount SD Refund Amount
155
+ * refundDate / RefundDate SD Refund Date
156
+ * refundRemarks / RefundRemarks SD Remarks
157
+ */
158
+ export const BA_CONTRACT_LOCK_EDITABLE_FIELDS = [
159
+ BAContractField.RVStatus,
160
+ BAContractField.RVAmount,
161
+ BAContractField.RVRefundDate,
162
+ BAContractField.RVRemarks,
163
+ BAContractField.SDStatus,
164
+ BAContractField.RefundAmount,
165
+ BAContractField.RefundDate,
166
+ BAContractField.RefundRemarks,
167
+ ];
168
+ //# sourceMappingURL=ba.contract.lock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ba.contract.lock.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/ba.contract.lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAe,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvC;;;;;;;;;;;;GAYG;AACH,SAAS,YAAY,CAAC,OAAa;IAClC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,GAAG,UAAU,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,SAAS,eAAe,CAAC,QAAqB;IAC7C,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAC3D,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;IAExE,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;QAC1C,IAAI,CAAC,GAAG;YAAE,SAAS;QACnB,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAAE,SAAS;QACtC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAClC,QAAwC,EACxC,MAAY,IAAI,IAAI,EAAE;IAEtB,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAClC,OAAO,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,kBAAkB,CACjC,QAAwC,EACxC,MAAY,IAAI,IAAI,EAAE;IAEtB,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAElD,IAAI,MAAM,KAAK,gBAAgB,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IACxD,IAAI,MAAM,KAAK,gBAAgB,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IACzD,IAAI,MAAM,KAAK,gBAAgB,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAEtD,OAAO,mBAAmB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAsB;IAClE,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,YAAY;IAC5B,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,YAAY;IAC5B,eAAe,CAAC,UAAU;IAC1B,eAAe,CAAC,aAAa;CAC7B,CAAC"}
@@ -17,6 +17,7 @@ export * from './bill.matrix.request.util';
17
17
  export * from './build.request.guests.in.pickup.order';
18
18
  export * from './dedupe.email.recipients';
19
19
  export * from './ist';
20
+ export * from './ltr.cycle.month.index';
20
21
  export * from './format.cleartax.b2c.error';
21
22
  export * from './build.cleartax.pay.dtls';
22
23
  export * from './resolve.cleartax.driver.sac.hsn';
@@ -24,7 +25,6 @@ export * from './resolve.passenger.display.name';
24
25
  export * from './remove.null.filter';
25
26
  export * from './calculate.deducted.sharing.amount';
26
27
  export * from './find.ba.contract.for.booking';
27
- export * from './pick.latest.numbered.invoice';
28
28
  export * from './pick.numbered.invoice.for.booking';
29
29
  export * from './pick.incentive.amount';
30
30
  export * from './line.item.helpers';
@@ -33,6 +33,10 @@ export * from './build.include.revenue.client.id.set';
33
33
  export * from './amount.in.words';
34
34
  export * from './calculate.ba.payout.working.days';
35
35
  export * from './garage.start.from.pickup';
36
+ export * from './parse.display.date';
37
+ export * from './ltr.payout.row.key';
36
38
  export * from './invoice.generation.alert.util';
37
39
  export * from './concurrency.peak';
38
40
  export * from './resolve.invoice.bank.details';
41
+ export * from './resolve.gst.state';
42
+ export * from './ba.contract.lock';
@@ -17,6 +17,7 @@ export * from './bill.matrix.request.util';
17
17
  export * from './build.request.guests.in.pickup.order';
18
18
  export * from './dedupe.email.recipients';
19
19
  export * from './ist';
20
+ export * from './ltr.cycle.month.index';
20
21
  export * from './format.cleartax.b2c.error';
21
22
  export * from './build.cleartax.pay.dtls';
22
23
  export * from './resolve.cleartax.driver.sac.hsn';
@@ -24,7 +25,6 @@ export * from './resolve.passenger.display.name';
24
25
  export * from './remove.null.filter';
25
26
  export * from './calculate.deducted.sharing.amount';
26
27
  export * from './find.ba.contract.for.booking';
27
- export * from './pick.latest.numbered.invoice';
28
28
  export * from './pick.numbered.invoice.for.booking';
29
29
  export * from './pick.incentive.amount';
30
30
  export * from './line.item.helpers';
@@ -33,7 +33,11 @@ export * from './build.include.revenue.client.id.set';
33
33
  export * from './amount.in.words';
34
34
  export * from './calculate.ba.payout.working.days';
35
35
  export * from './garage.start.from.pickup';
36
+ export * from './parse.display.date';
37
+ export * from './ltr.payout.row.key';
36
38
  export * from './invoice.generation.alert.util';
37
39
  export * from './concurrency.peak';
38
40
  export * from './resolve.invoice.bank.details';
41
+ export * from './resolve.gst.state';
42
+ export * from './ba.contract.lock';
39
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,OAAO,CAAC;AACtB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,OAAO,CAAC;AACtB,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function ltrCycleMonthIndex(anchor: Date, booking: Date): number;
@@ -0,0 +1,9 @@
1
+ import { IST_OFFSET_MS } from './ist';
2
+ export function ltrCycleMonthIndex(anchor, booking) {
3
+ const anchorIst = new Date(anchor.getTime() + IST_OFFSET_MS);
4
+ const bookingIst = new Date(booking.getTime() + IST_OFFSET_MS);
5
+ return ((bookingIst.getFullYear() - anchorIst.getFullYear()) * 12 +
6
+ (bookingIst.getMonth() - anchorIst.getMonth()) +
7
+ 1);
8
+ }
9
+ //# sourceMappingURL=ltr.cycle.month.index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ltr.cycle.month.index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/ltr.cycle.month.index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,UAAU,kBAAkB,CAAC,MAAY,EAAE,OAAa;IAC7D,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,CAAC;IAC7D,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,CAAC;IAC/D,OAAO,CACN,CAAC,UAAU,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE;QACzD,CAAC,UAAU,CAAC,QAAQ,EAAE,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC9C,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { LTRPayoutRow } from '../../models/src/index';
2
+ /**
3
+ * A payout row's stable identity: the calendar date it covers, plus its shift
4
+ * where the contract has shifts.
5
+ *
6
+ * Derived from the row's own content rather than its position in
7
+ * `LTRPayout.ltrPayoutRows`. That matters because the array is re-sorted by
8
+ * date whenever an entry is added, so a row logged for an earlier date shifts
9
+ * the index of every row after it — an index captured in one response is not
10
+ * the same row in the next.
11
+ *
12
+ * This is already the uniqueness rule the system enforces: at most one row per
13
+ * date, or per (date, shift) on a shift contract. Two rows can therefore never
14
+ * share a key.
15
+ *
16
+ * Returns null when the row carries no parsable date, which only happens on
17
+ * malformed data; callers should fall back to the array index for those.
18
+ */
19
+ export declare function ltrPayoutRowKey(row: LTRPayoutRow): string | null;
20
+ /**
21
+ * The instant a row starts, for ordering a booking's rows by date.
22
+ *
23
+ * Duty start first, garage start for garage-to-garage rows that record no
24
+ * separate duty window.
25
+ */
26
+ export declare function ltrPayoutRowStart(row: LTRPayoutRow): Date | null;
27
+ /**
28
+ * A booking's rows in date order.
29
+ *
30
+ * The stored array is kept sorted so the charge calculation sees the duty as
31
+ * one continuous sequence — running KM and overtime both depend on the
32
+ * preceding row.
33
+ */
34
+ export declare function sortLTRPayoutRowsByDate(rows: LTRPayoutRow[]): LTRPayoutRow[];
35
+ /**
36
+ * The first date in `newRows` that `existingRows` already occupies, as a label
37
+ * for the caller's error message — or null when there is no clash.
38
+ *
39
+ * Callers decide which rows count as "existing": adding an entry checks every
40
+ * stored row, while editing one checks only the OTHER entries, since the dates
41
+ * it currently holds are being released.
42
+ */
43
+ export declare function findOverlappingLTRPayoutDate(existingRows: LTRPayoutRow[], newRows: LTRPayoutRow[]): string | null;
@@ -0,0 +1,78 @@
1
+ import { LTRPayoutRowField } from '../../models/src/index';
2
+ import { firstParsableDisplayDate } from './parse.display.date';
3
+ /**
4
+ * A payout row's stable identity: the calendar date it covers, plus its shift
5
+ * where the contract has shifts.
6
+ *
7
+ * Derived from the row's own content rather than its position in
8
+ * `LTRPayout.ltrPayoutRows`. That matters because the array is re-sorted by
9
+ * date whenever an entry is added, so a row logged for an earlier date shifts
10
+ * the index of every row after it — an index captured in one response is not
11
+ * the same row in the next.
12
+ *
13
+ * This is already the uniqueness rule the system enforces: at most one row per
14
+ * date, or per (date, shift) on a shift contract. Two rows can therefore never
15
+ * share a key.
16
+ *
17
+ * Returns null when the row carries no parsable date, which only happens on
18
+ * malformed data; callers should fall back to the array index for those.
19
+ */
20
+ export function ltrPayoutRowKey(row) {
21
+ const date = firstParsableDisplayDate([
22
+ row?.[LTRPayoutRowField.DutyStartDateTime],
23
+ row?.[LTRPayoutRowField.DutyStartDate],
24
+ row?.[LTRPayoutRowField.GarageStartDateTime],
25
+ row?.[LTRPayoutRowField.GarageStartDate],
26
+ ]);
27
+ if (!date)
28
+ return null;
29
+ const datePart = `${String(date.getDate()).padStart(2, '0')}/${String(date.getMonth() + 1).padStart(2, '0')}/${date.getFullYear()}`;
30
+ const shift = row?.[LTRPayoutRowField.Shift];
31
+ return shift ? `${datePart}#${shift}` : datePart;
32
+ }
33
+ /**
34
+ * The instant a row starts, for ordering a booking's rows by date.
35
+ *
36
+ * Duty start first, garage start for garage-to-garage rows that record no
37
+ * separate duty window.
38
+ */
39
+ export function ltrPayoutRowStart(row) {
40
+ return firstParsableDisplayDate([
41
+ row?.[LTRPayoutRowField.DutyStartDateTime],
42
+ row?.[LTRPayoutRowField.GarageStartDateTime],
43
+ ]);
44
+ }
45
+ /**
46
+ * A booking's rows in date order.
47
+ *
48
+ * The stored array is kept sorted so the charge calculation sees the duty as
49
+ * one continuous sequence — running KM and overtime both depend on the
50
+ * preceding row.
51
+ */
52
+ export function sortLTRPayoutRowsByDate(rows) {
53
+ return [...rows].sort((a, b) => (ltrPayoutRowStart(a)?.getTime() ?? 0) -
54
+ (ltrPayoutRowStart(b)?.getTime() ?? 0));
55
+ }
56
+ /**
57
+ * The first date in `newRows` that `existingRows` already occupies, as a label
58
+ * for the caller's error message — or null when there is no clash.
59
+ *
60
+ * Callers decide which rows count as "existing": adding an entry checks every
61
+ * stored row, while editing one checks only the OTHER entries, since the dates
62
+ * it currently holds are being released.
63
+ */
64
+ export function findOverlappingLTRPayoutDate(existingRows, newRows) {
65
+ const taken = new Set(existingRows
66
+ .map((row) => ltrPayoutRowKey(row))
67
+ .filter((key) => !!key));
68
+ for (const row of newRows) {
69
+ const key = ltrPayoutRowKey(row);
70
+ if (!key || !taken.has(key))
71
+ continue;
72
+ const shift = row?.[LTRPayoutRowField.Shift];
73
+ const date = row?.[LTRPayoutRowField.DutyStartDate] ?? key.split('#')[0];
74
+ return shift ? `${date} (shift ${shift})` : date;
75
+ }
76
+ return null;
77
+ }
78
+ //# sourceMappingURL=ltr.payout.row.key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ltr.payout.row.key.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/ltr.payout.row.key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAAC,GAAiB;IAChD,MAAM,IAAI,GAAG,wBAAwB,CAAC;QACrC,GAAG,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;QAC1C,GAAG,EAAE,CAAC,iBAAiB,CAAC,aAAa,CAAC;QACtC,GAAG,EAAE,CAAC,iBAAiB,CAAC,mBAAmB,CAAC;QAC5C,GAAG,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC;KACxC,CAAC,CAAC;IACH,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,QAAQ,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CACpE,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CACnB,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;IAE3C,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC7C,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAiB;IAClD,OAAO,wBAAwB,CAAC;QAC/B,GAAG,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;QAC1C,GAAG,EAAE,CAAC,iBAAiB,CAAC,mBAAmB,CAAC;KAC5C,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAoB;IAC3D,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CACpB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACR,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CACvC,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,4BAA4B,CAC3C,YAA4B,EAC5B,OAAuB;IAEvB,MAAM,KAAK,GAAG,IAAI,GAAG,CACpB,YAAY;SACV,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;SAClC,MAAM,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CACvC,CAAC;IAEF,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAEtC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC7C,MAAM,IAAI,GACT,GAAG,EAAE,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7D,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,WAAW,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAClD,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Parses the `dd/MM/yyyy` / `dd-MM-yyyy` date strings — with an optional
3
+ * `HH:mm` — that LTR payout rows are stored in.
4
+ *
5
+ * Payout rows keep dates as display strings rather than timestamps (the Excel
6
+ * upload writes them that way and the sheet round-trips them), so every reader
7
+ * has to parse them back. This is the single implementation: it previously
8
+ * existed as three copies that were free to drift apart.
9
+ *
10
+ * Returns null for anything unparseable, including calendar dates that do not
11
+ * exist — `Date` silently rolls 31/02/2026 forward to 03/03/2026, which would
12
+ * otherwise place a row in the wrong month.
13
+ */
14
+ export declare function parseDisplayDate(value: unknown): Date | null;
15
+ /** First parsable value, for rows that record the same moment several ways. */
16
+ export declare function firstParsableDisplayDate(candidates: unknown[]): Date | null;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Parses the `dd/MM/yyyy` / `dd-MM-yyyy` date strings — with an optional
3
+ * `HH:mm` — that LTR payout rows are stored in.
4
+ *
5
+ * Payout rows keep dates as display strings rather than timestamps (the Excel
6
+ * upload writes them that way and the sheet round-trips them), so every reader
7
+ * has to parse them back. This is the single implementation: it previously
8
+ * existed as three copies that were free to drift apart.
9
+ *
10
+ * Returns null for anything unparseable, including calendar dates that do not
11
+ * exist — `Date` silently rolls 31/02/2026 forward to 03/03/2026, which would
12
+ * otherwise place a row in the wrong month.
13
+ */
14
+ export function parseDisplayDate(value) {
15
+ if (!value)
16
+ return null;
17
+ const match = String(value)
18
+ .trim()
19
+ .match(/^(\d{2})[-/](\d{2})[-/](\d{4})(?:\s+(\d{2}):(\d{2}))?$/);
20
+ if (!match)
21
+ return null;
22
+ const [, day, month, year, hour, minute] = match;
23
+ const date = new Date(Number(year), Number(month) - 1, Number(day), Number(hour ?? 0), Number(minute ?? 0));
24
+ if (isNaN(date.getTime()))
25
+ return null;
26
+ // Reject impossible calendar dates that Date silently rolls over.
27
+ if (date.getFullYear() !== Number(year) ||
28
+ date.getMonth() !== Number(month) - 1 ||
29
+ date.getDate() !== Number(day)) {
30
+ return null;
31
+ }
32
+ return date;
33
+ }
34
+ /** First parsable value, for rows that record the same moment several ways. */
35
+ export function firstParsableDisplayDate(candidates) {
36
+ for (const candidate of candidates) {
37
+ const parsed = parseDisplayDate(candidate);
38
+ if (parsed)
39
+ return parsed;
40
+ }
41
+ return null;
42
+ }
43
+ //# sourceMappingURL=parse.display.date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse.display.date.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/parse.display.date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC9C,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;SACzB,IAAI,EAAE;SACN,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAClE,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;IACjD,MAAM,IAAI,GAAG,IAAI,IAAI,CACpB,MAAM,CAAC,IAAI,CAAC,EACZ,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EACjB,MAAM,CAAC,GAAG,CAAC,EACX,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EACjB,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CACnB,CAAC;IACF,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,kEAAkE;IAClE,IACC,IAAI,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,QAAQ,EAAE,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;QACrC,IAAI,CAAC,OAAO,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,EAC7B,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,wBAAwB,CAAC,UAAqB;IAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,MAAM,MAAM,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAC3C,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { City, State } from '../../enums/src/index';
2
+ /** The subset of a GST city entry this resolver needs. */
3
+ interface GstStateCitySource {
4
+ cityName?: City | null;
5
+ }
6
+ /**
7
+ * Resolves the state to store on a GST record.
8
+ *
9
+ * The state is captured on the billing form but was historically never persisted, leaving every
10
+ * consumer to re-derive it from either the GSTIN prefix or the city. Neither source exists for a
11
+ * GST-unregistered record saved without a city, so it is stored instead — and every write path
12
+ * that can change the GSTIN or the cities has to keep it current, or the stored value goes stale.
13
+ *
14
+ * Priority:
15
+ * 1. An explicit state. Only the billing form sends one, and it is also the only form that can
16
+ * omit a GSTIN, so it is the sole source for the case the column exists to cover.
17
+ * 2. The GSTIN's first two digits, which authoritatively encode the state.
18
+ * 3. The city mapping, for payloads carrying neither.
19
+ *
20
+ * Returns null when nothing resolves, which is a legitimate state for the row to be in.
21
+ */
22
+ export declare const resolveGstState: (explicitState?: State | null, gstin?: string | null, cities?: GstStateCitySource[] | null) => State | null;
23
+ export {};
@@ -0,0 +1,32 @@
1
+ import { CityStateMapping, GstStatemapping } from '../../enums/src/index';
2
+ /**
3
+ * Resolves the state to store on a GST record.
4
+ *
5
+ * The state is captured on the billing form but was historically never persisted, leaving every
6
+ * consumer to re-derive it from either the GSTIN prefix or the city. Neither source exists for a
7
+ * GST-unregistered record saved without a city, so it is stored instead — and every write path
8
+ * that can change the GSTIN or the cities has to keep it current, or the stored value goes stale.
9
+ *
10
+ * Priority:
11
+ * 1. An explicit state. Only the billing form sends one, and it is also the only form that can
12
+ * omit a GSTIN, so it is the sole source for the case the column exists to cover.
13
+ * 2. The GSTIN's first two digits, which authoritatively encode the state.
14
+ * 3. The city mapping, for payloads carrying neither.
15
+ *
16
+ * Returns null when nothing resolves, which is a legitimate state for the row to be in.
17
+ */
18
+ export const resolveGstState = (explicitState, gstin, cities) => {
19
+ if (explicitState)
20
+ return explicitState;
21
+ const prefix = gstin?.trim()?.slice(0, 2);
22
+ const fromGstin = prefix ? GstStatemapping[prefix] : undefined;
23
+ if (fromGstin)
24
+ return fromGstin;
25
+ // The legacy cityName/Address columns mirror cities[0] positionally, but for the state any
26
+ // populated city will do — a blank first entry should not lose a state we can still resolve.
27
+ const cityName = (cities ?? [])
28
+ .map((c) => c?.cityName)
29
+ .find((name) => Boolean(name));
30
+ return cityName ? (CityStateMapping[cityName] ?? null) : null;
31
+ };
32
+ //# sourceMappingURL=resolve.gst.state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.gst.state.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/resolve.gst.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,gBAAgB,EAAE,eAAe,EAAS,MAAM,uBAAuB,CAAC;AAOvF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC9B,aAA4B,EAC5B,KAAqB,EACrB,MAAoC,EACrB,EAAE;IACjB,IAAI,aAAa;QAAE,OAAO,aAAa,CAAC;IAExC,MAAM,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/D,IAAI,SAAS;QAAE,OAAO,SAAS,CAAC;IAEhC,2FAA2F;IAC3F,6FAA6F;IAC7F,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;SAC7B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC;SACvB,IAAI,CAAC,CAAC,IAAI,EAAgB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9C,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/D,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { LoginType, OrganizationTypeConfig } from '@autologix/shared/enums';
1
+ import { LoginType, LtrAppFont, OrganizationTypeConfig } from '@autologix/shared/enums';
2
2
  import { ICarouselImage } from '../../models/src/white.label.config.model';
3
3
  import { ILanguage } from '../../models/src/language.model';
4
4
  export interface IPublicConfig {
@@ -39,4 +39,8 @@ export interface IPublicConfig {
39
39
  carouselImages?: ICarouselImage[];
40
40
  knowMoreUrl?: string;
41
41
  backgroundImage?: string;
42
+ otpLength?: number;
43
+ primaryFont?: LtrAppFont;
44
+ ltrOtpLength?: number;
45
+ ltrAppFont?: LtrAppFont;
42
46
  }
@@ -2,4 +2,21 @@ import { RequestProcessingStatus } from '../../enums/src/index';
2
2
  export interface SuccessfulResponse<Data> {
3
3
  data: Data;
4
4
  status: RequestProcessingStatus.Success;
5
+ /**
6
+ * Optional note about the success itself — not an error.
7
+ *
8
+ * `UnsuccessfulResponse` has always carried `message`; this member did not,
9
+ * so a caller that narrowed a `RequestResponse<T>` on
10
+ * `status === Success` had no field to read even when the server had
11
+ * something to say. That bit AD-3227: the draft save reports Success while
12
+ * deliberately keeping the stored `validRows` over an empty incoming set,
13
+ * and the rows-less success payload gives the caller no other way to notice
14
+ * the divergence.
15
+ *
16
+ * Optional and additive, so every existing producer and consumer is
17
+ * unaffected. Use it for "we did what you asked, but here is something you
18
+ * should know", never for a failure — those still go through
19
+ * `UnsuccessfulResponse`.
20
+ */
21
+ message?: string;
5
22
  }
@@ -1,5 +0,0 @@
1
- export declare class GetExtAvailableRatecardsDTO {
2
- contextId?: string;
3
- clientIds?: string[];
4
- constructor(obj?: Partial<GetExtAvailableRatecardsDTO>);
5
- }
@@ -1,19 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { IsArray, IsOptional, IsString, IsUUID, } from 'class-validator';
3
- export class GetExtAvailableRatecardsDTO {
4
- constructor(obj) {
5
- Object.assign(this, obj);
6
- }
7
- }
8
- __decorate([
9
- IsOptional(),
10
- IsUUID(),
11
- __metadata("design:type", String)
12
- ], GetExtAvailableRatecardsDTO.prototype, "contextId", void 0);
13
- __decorate([
14
- IsOptional(),
15
- IsArray(),
16
- IsString({ each: true }),
17
- __metadata("design:type", Array)
18
- ], GetExtAvailableRatecardsDTO.prototype, "clientIds", void 0);
19
- //# sourceMappingURL=get.ext.available.ratecards.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get.ext.available.ratecards.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.ext.available.ratecards.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EAEP,UAAU,EACV,QAAQ,EACR,MAAM,GACN,MAAM,iBAAiB,CAAC;AAGzB,MAAM,OAAO,2BAA2B;IAUvC,YAAY,GAA0C;QACrD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAVA;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;8DACU;AAKnB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;8DACJ"}