@feedmepos/mf-inventory-portal 1.7.13-dev.3 → 1.7.13-dev.6

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 (274) hide show
  1. package/dist/{App-OcI38sEw.js → App-JqoqVVdP.js} +471 -460
  2. package/dist/{ApprovalView-qTRrEvTp.js → ApprovalView-JiWbXkVU.js} +9 -9
  3. package/dist/{BindingsDialog-G8tFbm7v.js → BindingsDialog-BK4xofWu.js} +2 -2
  4. package/dist/{BindingsPicker-DB3mjjVh.js → BindingsPicker-CLMsAseG.js} +2 -2
  5. package/dist/{BindingsTable-DLf8XLyn.js → BindingsTable-DKrBQTxN.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-2AWitWXo.js → BulkReceiveRequestView-bttHw2ub.js} +19 -19
  7. package/dist/{ClosingDraftView-c25_GCaw.js → ClosingDraftView-Bhdwo-n8.js} +19 -19
  8. package/dist/ClosingHistoryView-DrQPWnr6.js +761 -0
  9. package/dist/{ClosingTemplateView-BzaVZ1Mf.js → ClosingTemplateView-UkwXCrz_.js} +16 -16
  10. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Dlh4ThV0.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DNtMdFVF.js} +1 -1
  11. package/dist/{DefaultView-e9RSHejw.js → DefaultView-sGrYeUGh.js} +2 -2
  12. package/dist/{DeliveryOrderPrintPreview-BSbiO2Vd.js → DeliveryOrderPrintPreview-CVnqC9Jy.js} +10 -10
  13. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-D_8msVau.js → EmailDialog.vue_vue_type_script_setup_true_lang-CYtHQ2Ru.js} +2250 -2250
  14. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DUjcebMR.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DXTdvT0C.js} +1 -1
  15. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BA6stZHF.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DtfiRgsD.js} +2 -2
  16. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-yBIbCJYy.js +243 -0
  17. package/dist/{FmMultiselectDialog-DEg8KNwS.js → FmMultiselectDialog-A9VIMLGn.js} +1 -1
  18. package/dist/{FmMultiselectDialog-DsA4X91e.js → FmMultiselectDialog-DL00XnUc.js} +2 -2
  19. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CPlywwpg.js → FmUnitInput.vue_vue_type_script_setup_true_lang-RJKOB-cm.js} +66 -63
  20. package/dist/{ImportView-D9QCHpOd.js → ImportView-DPrLnJO8.js} +6 -6
  21. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-C7iOvnZV.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-IAQyFPmi.js} +1 -1
  22. package/dist/{IngredientGroupView-BRH304Pf.js → IngredientGroupView-DyhC6lJ8.js} +5 -5
  23. package/dist/{IngredientsView-BUGYJ6cN.js → IngredientsView-P4AqPikD.js} +15 -15
  24. package/dist/{IntegrationExplorerView-Z3_x4C5I.js → IntegrationExplorerView-CujhjHHV.js} +4 -4
  25. package/dist/{IntegrationView-ClWTgLai.js → IntegrationView-CFqsZyzI.js} +3077 -2998
  26. package/dist/{InventoryBindingForm-B7tGISLQ.js → InventoryBindingForm-B0NJ8H51.js} +1 -1
  27. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DOWePtXq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-bbIpFo_4.js} +5 -5
  28. package/dist/{InventoryBindingSummary-j3YGRPOt.js → InventoryBindingSummary-CBgO_tCz.js} +1 -1
  29. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CPpO-iyC.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DuuXzyKH.js} +1 -1
  30. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BP8f4hlw.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C418f34P.js} +1 -1
  31. package/dist/ProductionRunDetailView-tSByC3nQ.js +5165 -0
  32. package/dist/ProductionRunPreparePrintView-zPAATL-n.js +31 -0
  33. package/dist/ProductionRunTabs.vue_vue_type_script_setup_true_lang-DgtZJgrs.js +3506 -0
  34. package/dist/ProductionRunView-BsP02jgC.js +815 -0
  35. package/dist/{PublishView-CL747KZU.js → PublishView-Cf0Tn7xt.js} +3 -3
  36. package/dist/{PurchaseOrderPrintPreview-C5AB03ht.js → PurchaseOrderPrintPreview-BTlSyQqZ.js} +6 -6
  37. package/dist/{ReceiveRequestView-BDy40tBg.js → ReceiveRequestView-9LFOl2hJ.js} +14 -14
  38. package/dist/{RecipeView-BbBZGBPb.js → RecipeView-C4KxMCpQ.js} +17 -17
  39. package/dist/{SettingsView-rcalnrlB.js → SettingsView-ShrefnTM.js} +4 -4
  40. package/dist/{StockView-BSLGMo1e.js → StockView-BVd6f7Fr.js} +21 -21
  41. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeEq2HQe.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B-rB7p9o.js} +1 -1
  42. package/dist/{SupplierView-DOq8oosU.js → SupplierView-DZSY6_eU.js} +12 -12
  43. package/dist/{SurchargeView-BK9Yakao.js → SurchargeView-UUYoT8MK.js} +6 -6
  44. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DQRfvdyo.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-BLMxzi1C.js} +2 -2
  45. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CjfzWy2p.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-z3qIVKP7.js} +1 -1
  46. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-6qKRU6v7.js → TransferDetails.vue_vue_type_script_setup_true_lang-DEO8CP-X.js} +20 -20
  47. package/dist/{TransferTemplateView-BmWxWDe8.js → TransferTemplateView-C21o2V_1.js} +20 -20
  48. package/dist/{UnitCostHistoryView-BCvCf-2e.js → UnitCostHistoryView-DPEGVLBP.js} +4 -4
  49. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DJu3u-cT.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BuGmmHBk.js} +4 -4
  50. package/dist/{UnitView-CW8GRw2n.js → UnitView-Bx03E4uc.js} +7 -7
  51. package/dist/{WarehouseView-ZWuCwzuM.js → WarehouseView-BehHQ9Ao.js} +6 -6
  52. package/dist/{WastageTemplateView-DkwVp2Bc.js → WastageTemplateView-gmr7doXL.js} +14 -14
  53. package/dist/api/netsuite.d.ts +13 -0
  54. package/dist/api/production-run-error.d.ts +36 -0
  55. package/dist/api/production-run-error.spec.d.ts +1 -0
  56. package/dist/api/production-run.d.ts +58 -0
  57. package/dist/api/stock.d.ts +0 -6
  58. package/dist/{app-BJsy0dhl.js → app-BT7hD4az.js} +16523 -12629
  59. package/dist/app.d.ts +3047 -71
  60. package/dist/app.js +1 -1
  61. package/dist/{closing-template-DdxIx-dq.js → closing-template-BNfr1RIX.js} +1 -1
  62. package/dist/components/FmInventoryBanner.vue.d.ts +39 -0
  63. package/dist/components/FmUnitInput.spec.d.ts +1 -0
  64. package/dist/components/FmUnitInputProps.d.ts +2 -0
  65. package/dist/composable/useModalA11y.d.ts +9 -0
  66. package/dist/composable/useModalA11y.spec.d.ts +1 -0
  67. package/dist/cypress/component/ChangelogPanel.cy.d.ts +1 -0
  68. package/dist/cypress/support/component.d.ts +1 -2
  69. package/dist/{date2-BySoG7zL.js → date2-CAh7rsAp.js} +1 -1
  70. package/dist/{dayjs.min-CEK_HLa5.js → dayjs.min-BJk-edO7.js} +7 -7
  71. package/dist/{decimal-CxH3h_oz.js → decimal-DYlKNkVX.js} +2 -2
  72. package/dist/{defineDeepModel-BiNh3hbS.js → defineDeepModel-BPHl7mTD.js} +1 -1
  73. package/dist/{duplicate-template-BqTirEVQ.js → duplicate-template-BWUUIdzG.js} +1 -1
  74. package/dist/{feature-CtiarMKO.js → feature-CSvVyBN2.js} +2 -2
  75. package/dist/{format-time-from-id-BZlQSqcg.js → format-time-from-id-Dh3lxXpc.js} +1 -1
  76. package/dist/{format-unit-display-Ckyw7NDq.js → format-unit-display-B1ft2wxm.js} +12 -12
  77. package/dist/{import-export.helper-93ZgMgfA.js → import-export.helper-txDvkMf0.js} +6 -6
  78. package/dist/{index-6U0mJTRK.js → index-AmTodx3_.js} +1 -1
  79. package/dist/{index-OMz6kBpd.js → index-B4wQijn6.js} +1 -1
  80. package/dist/{index-BDmWjw_1.js → index-TIX5DyQk.js} +3 -3
  81. package/dist/inventory-core-dart.default-BpMxAF-0.js +31060 -0
  82. package/dist/{lz-string-BgsMxnd4.js → lz-string-CFDYH-K6.js} +1 -1
  83. package/dist/{netsuite-DFRzj2t1.js → netsuite-CdW9v92G.js} +477 -462
  84. package/dist/{number-D-_PL2pH.js → number-DRRlTYv7.js} +6 -6
  85. package/dist/{predefined-templates-Ccsy5pq1.js → predefined-templates-C68U85pc.js} +1 -1
  86. package/dist/production-run-display-DmyfdjHR.js +239 -0
  87. package/dist/production-run-prepare-sheet-BvxMd19E.js +189 -0
  88. package/dist/{purchase-order-template-DhWqGEYn.js → purchase-order-template-BvED3CpO.js} +1 -1
  89. package/dist/{recalculationUtils-DBZx8AEF.js → recalculationUtils-9rFepwwr.js} +1 -1
  90. package/dist/router/name.d.ts +2 -0
  91. package/dist/{rules-14YnQFVP.js → rules-C8RmopTe.js} +2 -2
  92. package/dist/{stock-CqPXExNE.js → stock-BKkluaaM.js} +26 -36
  93. package/dist/{stock-NwBpU2GU.js → stock-CiCsT5JK.js} +3 -3
  94. package/dist/stores/integration/codemax.d.ts +1 -1
  95. package/dist/stores/integration/netsuite.d.ts +54 -0
  96. package/dist/style.css +1 -1
  97. package/dist/{supplier-BGh3ELiI.js → supplier--zZMQHPc.js} +2 -2
  98. package/dist/{surcharge-B2A5F8CG.js → surcharge-BLF3XV0G.js} +1 -1
  99. package/dist/tsconfig.app.tsbuildinfo +1 -1
  100. package/dist/{uom-rules-B9vLSzRQ.js → uom-rules-CjCCXiGL.js} +1 -1
  101. package/dist/{use-ingredient-select-dialog-vwF7iReq.js → use-ingredient-select-dialog-DnUiY-Ic.js} +2 -2
  102. package/dist/{use-inventory-binding-dialog-DBp_gbnj.js → use-inventory-binding-dialog-BAU-P8kV.js} +2 -2
  103. package/dist/{use-template-enabled-locations-DSvlNPYu.js → use-template-enabled-locations-DZMzYCi-.js} +2 -2
  104. package/dist/{use-transfer-locations-OMxT9ofA.js → use-transfer-locations-DomGLsT2.js} +2 -2
  105. package/dist/{useHrmPermission-BbjcDYMn.js → useHrmPermission-CrhsV_5z.js} +1 -1
  106. package/dist/{useNavigationMenu-CJw7QuVt.js → useNavigationMenu-1h-G_-el.js} +2 -2
  107. package/dist/{useSseClient-CT69SXDP.js → useSseClient-o_3wiqhX.js} +1 -1
  108. package/dist/views/changelog/components/ChangelogFloatingButton.spec.d.ts +1 -0
  109. package/dist/views/changelog/composables/fab-position.d.ts +21 -0
  110. package/dist/views/changelog/composables/use-inventory-record-commits.d.ts +1 -1
  111. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  112. package/dist/views/integration/components/ApplyProductDialogCodemax.vue.d.ts +2 -2
  113. package/dist/views/integration/components/CodemaxDialog.vue.d.ts +2 -2
  114. package/dist/views/integration/components/netsuite/business/vendor-publish.d.ts +7 -0
  115. package/dist/views/integration/components/netsuite/business/vendor-publish.spec.d.ts +1 -0
  116. package/dist/views/production-run/ProductionRunDetailView.spec.d.ts +1 -0
  117. package/dist/views/production-run/ProductionRunDetailView.vue.d.ts +15 -0
  118. package/dist/views/production-run/ProductionRunPreparePrintView.spec.d.ts +1 -0
  119. package/dist/views/production-run/ProductionRunPreparePrintView.vue.d.ts +2 -0
  120. package/dist/views/production-run/ProductionRunView.spec.d.ts +1 -0
  121. package/dist/views/production-run/ProductionRunView.vue.d.ts +2 -0
  122. package/dist/views/production-run/components/CancelRunDialog.spec.d.ts +1 -0
  123. package/dist/views/production-run/components/CancelRunDialog.vue.d.ts +918 -0
  124. package/dist/views/production-run/components/CancelRunDialogProps.d.ts +9 -0
  125. package/dist/views/production-run/components/CloseRunDialog.spec.d.ts +1 -0
  126. package/dist/views/production-run/components/CloseRunDialog.vue.d.ts +918 -0
  127. package/dist/views/production-run/components/CloseRunDialogProps.d.ts +29 -0
  128. package/dist/views/production-run/components/PrepareRunConfirmationDialog.spec.d.ts +1 -0
  129. package/dist/views/production-run/components/PrepareRunConfirmationDialog.vue.d.ts +29 -0
  130. package/dist/views/production-run/components/PrepareRunDialog.spec.d.ts +1 -0
  131. package/dist/views/production-run/components/PrepareRunDialog.vue.d.ts +18 -0
  132. package/dist/views/production-run/components/PrepareRunDialogProps.d.ts +29 -0
  133. package/dist/views/production-run/components/PrepareSheetDialog.spec.d.ts +1 -0
  134. package/dist/views/production-run/components/PrepareSheetDialog.vue.d.ts +26 -0
  135. package/dist/views/{stock/components/dialog/SnapshotRecalculationDialog.vue.d.ts → production-run/components/ProductionRunActionMenuItem.vue.d.ts} +7 -10
  136. package/dist/views/production-run/components/ProductionRunActionsCell.spec.d.ts +1 -0
  137. package/dist/views/production-run/components/ProductionRunActionsCell.vue.d.ts +20 -0
  138. package/dist/views/production-run/components/ProductionRunActivityTab.spec.d.ts +1 -0
  139. package/dist/views/production-run/components/ProductionRunActivityTab.vue.d.ts +15 -0
  140. package/dist/views/production-run/components/ProductionRunBanner.spec.d.ts +1 -0
  141. package/dist/views/production-run/components/ProductionRunBanner.vue.d.ts +42 -0
  142. package/dist/views/production-run/components/ProductionRunBatchCard.spec.d.ts +1 -0
  143. package/dist/views/production-run/components/ProductionRunBatchCard.vue.d.ts +69 -0
  144. package/dist/views/production-run/components/ProductionRunBatchWastageDetails.spec.d.ts +1 -0
  145. package/dist/views/production-run/components/ProductionRunBatchWastageDetails.vue.d.ts +33 -0
  146. package/dist/views/production-run/components/ProductionRunBindingsDisclosure.spec.d.ts +1 -0
  147. package/dist/views/production-run/components/ProductionRunBindingsDisclosure.vue.d.ts +25 -0
  148. package/dist/views/production-run/components/ProductionRunBindingsList.vue.d.ts +51 -0
  149. package/dist/views/production-run/components/ProductionRunCompactDisclosure.vue.d.ts +25 -0
  150. package/dist/views/production-run/components/ProductionRunContributorBranch.spec.d.ts +1 -0
  151. package/dist/views/production-run/components/ProductionRunContributorBranch.vue.d.ts +25 -0
  152. package/dist/views/production-run/components/ProductionRunCostRail.spec.d.ts +1 -0
  153. package/dist/views/production-run/components/ProductionRunCostRail.vue.d.ts +77 -0
  154. package/dist/views/production-run/components/ProductionRunDialog.spec.d.ts +1 -0
  155. package/dist/views/production-run/components/ProductionRunDialog.vue.d.ts +24 -0
  156. package/dist/views/production-run/components/ProductionRunDialogProps.d.ts +15 -0
  157. package/dist/views/production-run/components/ProductionRunDialogSurface.vue.d.ts +33 -0
  158. package/dist/views/production-run/components/ProductionRunDiscardDialog.spec.d.ts +1 -0
  159. package/dist/views/production-run/components/ProductionRunDiscardDialog.vue.d.ts +21 -0
  160. package/dist/views/production-run/components/ProductionRunDuplicateDialog.spec.d.ts +1 -0
  161. package/dist/views/production-run/components/ProductionRunDuplicateDialog.vue.d.ts +51 -0
  162. package/dist/views/production-run/components/ProductionRunFormDialog.spec.d.ts +1 -0
  163. package/dist/views/production-run/components/ProductionRunFormDialog.vue.d.ts +918 -0
  164. package/dist/views/production-run/components/ProductionRunFormDialogProps.d.ts +22 -0
  165. package/dist/views/production-run/components/ProductionRunHeader.spec.d.ts +1 -0
  166. package/dist/views/production-run/components/ProductionRunHeader.vue.d.ts +65 -0
  167. package/dist/views/production-run/components/ProductionRunHelpPopover.spec.d.ts +1 -0
  168. package/dist/views/production-run/components/ProductionRunHelpPopover.vue.d.ts +52 -0
  169. package/dist/views/production-run/components/ProductionRunIngredientTree.spec.d.ts +1 -0
  170. package/dist/views/production-run/components/ProductionRunIngredientTree.vue.d.ts +42 -0
  171. package/dist/views/production-run/components/ProductionRunIngredientsTab.spec.d.ts +1 -0
  172. package/dist/views/production-run/components/ProductionRunIngredientsTab.vue.d.ts +63 -0
  173. package/dist/views/production-run/components/ProductionRunInstructionsCard.spec.d.ts +1 -0
  174. package/dist/views/production-run/components/ProductionRunInstructionsCard.vue.d.ts +15 -0
  175. package/dist/views/production-run/components/ProductionRunItemPickerDialog.spec.d.ts +1 -0
  176. package/dist/views/production-run/components/ProductionRunItemPickerDialog.vue.d.ts +30 -0
  177. package/dist/views/production-run/components/ProductionRunItemsCell.spec.d.ts +1 -0
  178. package/dist/views/production-run/components/ProductionRunItemsCell.vue.d.ts +33 -0
  179. package/dist/views/production-run/components/ProductionRunItemsTable.spec.d.ts +1 -0
  180. package/dist/views/production-run/components/ProductionRunItemsTable.vue.d.ts +73 -0
  181. package/dist/views/production-run/components/ProductionRunLoadBannerContract.spec.d.ts +1 -0
  182. package/dist/views/production-run/components/ProductionRunNoBindingsHelp.spec.d.ts +1 -0
  183. package/dist/views/production-run/components/ProductionRunNoBindingsHelp.vue.d.ts +15 -0
  184. package/dist/views/production-run/components/ProductionRunOutputTab.spec.d.ts +1 -0
  185. package/dist/views/production-run/components/ProductionRunOutputTab.vue.d.ts +26 -0
  186. package/dist/views/production-run/components/ProductionRunOverviewTab.spec.d.ts +1 -0
  187. package/dist/views/production-run/components/ProductionRunOverviewTab.vue.d.ts +999 -0
  188. package/dist/views/production-run/components/ProductionRunPlanCard.spec.d.ts +1 -0
  189. package/dist/views/production-run/components/ProductionRunPlanCard.vue.d.ts +50 -0
  190. package/dist/views/production-run/components/ProductionRunPlanner.spec.d.ts +1 -0
  191. package/dist/views/production-run/components/ProductionRunPlanner.vue.d.ts +61 -0
  192. package/dist/views/production-run/components/ProductionRunPrepareSheet.vue.d.ts +16 -0
  193. package/dist/views/production-run/components/ProductionRunProjectionFeedback.spec.d.ts +1 -0
  194. package/dist/views/production-run/components/ProductionRunProjectionFeedback.vue.d.ts +41 -0
  195. package/dist/views/production-run/components/ProductionRunRecordOutputDetails.spec.d.ts +1 -0
  196. package/dist/views/production-run/components/ProductionRunRecordOutputDetails.vue.d.ts +43 -0
  197. package/dist/views/production-run/components/ProductionRunRecordOutputWastageStatus.spec.d.ts +1 -0
  198. package/dist/views/production-run/components/ProductionRunRecordOutputWastageStatus.vue.d.ts +31 -0
  199. package/dist/views/production-run/components/ProductionRunRequestedOverview.spec.d.ts +1 -0
  200. package/dist/views/production-run/components/ProductionRunRequestedOverview.vue.d.ts +48 -0
  201. package/dist/views/production-run/components/ProductionRunResultTable.spec.d.ts +1 -0
  202. package/dist/views/production-run/components/ProductionRunResultTable.vue.d.ts +31 -0
  203. package/dist/views/production-run/components/ProductionRunScrollHint.spec.d.ts +1 -0
  204. package/dist/views/production-run/components/ProductionRunScrollHint.vue.d.ts +31 -0
  205. package/dist/views/production-run/components/ProductionRunSelectionCheckbox.vue.d.ts +31 -0
  206. package/dist/views/production-run/components/ProductionRunSelectionControls.spec.d.ts +1 -0
  207. package/dist/views/production-run/components/ProductionRunSelectionRadio.spec.d.ts +1 -0
  208. package/dist/views/production-run/components/ProductionRunSelectionRadio.vue.d.ts +37 -0
  209. package/dist/views/production-run/components/ProductionRunSideSheet.spec.d.ts +1 -0
  210. package/dist/views/production-run/components/ProductionRunSideSheet.vue.d.ts +77 -0
  211. package/dist/views/production-run/components/ProductionRunSideSheetSurface.vue.d.ts +52 -0
  212. package/dist/views/production-run/components/ProductionRunSortHeader.spec.d.ts +1 -0
  213. package/dist/views/production-run/components/ProductionRunSortHeader.vue.d.ts +25 -0
  214. package/dist/views/production-run/components/ProductionRunStatusBadge.vue.d.ts +15 -0
  215. package/dist/views/production-run/components/ProductionRunTabs.spec.d.ts +1 -0
  216. package/dist/views/production-run/components/ProductionRunTabs.vue.d.ts +47 -0
  217. package/dist/views/production-run/components/ProductionRunTerminalNotice.spec.d.ts +1 -0
  218. package/dist/views/production-run/components/ProductionRunTerminalNotice.vue.d.ts +15 -0
  219. package/dist/views/production-run/components/ProductionRunTextarea.spec.d.ts +1 -0
  220. package/dist/views/production-run/components/ProductionRunTextarea.vue.d.ts +53 -0
  221. package/dist/views/production-run/components/ProductionRunUnitInput.spec.d.ts +1 -0
  222. package/dist/views/production-run/components/ProductionRunUnitInput.vue.d.ts +34 -0
  223. package/dist/views/production-run/components/ProductionRunWastageDisclosure.spec.d.ts +1 -0
  224. package/dist/views/production-run/components/ProductionRunWastageDisclosure.vue.d.ts +23 -0
  225. package/dist/views/production-run/components/RecordOutputDialog.spec.d.ts +1 -0
  226. package/dist/views/production-run/components/RecordOutputDialog.vue.d.ts +20 -0
  227. package/dist/views/production-run/components/RecordOutputDialogProps.d.ts +28 -0
  228. package/dist/views/production-run/components/TargetReachedDialog.spec.d.ts +1 -0
  229. package/dist/views/production-run/components/TargetReachedDialog.vue.d.ts +927 -0
  230. package/dist/views/production-run/components/production-run-deduction-parity.spec.d.ts +1 -0
  231. package/dist/views/production-run/components/production-run-prepare-sheet.d.ts +17 -0
  232. package/dist/views/production-run/components/production-run-typography-contract.spec.d.ts +1 -0
  233. package/dist/views/production-run/components/production-run-unit-snapshot.d.ts +39 -0
  234. package/dist/views/production-run/composables/production-run-display.d.ts +272 -0
  235. package/dist/views/production-run/composables/production-run-display.spec.d.ts +1 -0
  236. package/dist/views/production-run/composables/production-run-list.d.ts +46 -0
  237. package/dist/views/production-run/composables/production-run-list.spec.d.ts +1 -0
  238. package/dist/views/production-run/composables/production-run-request-confirmation.d.ts +20 -0
  239. package/dist/views/production-run/composables/use-production-run-actions.d.ts +37 -0
  240. package/dist/views/production-run/composables/use-production-run-actions.spec.d.ts +1 -0
  241. package/dist/views/production-run/composables/use-production-run-cost.d.ts +672 -0
  242. package/dist/views/production-run/composables/use-production-run-cost.spec.d.ts +1 -0
  243. package/dist/views/production-run/composables/use-production-run-detail.d.ts +1894 -0
  244. package/dist/views/production-run/composables/use-production-run-detail.spec.d.ts +1 -0
  245. package/dist/views/production-run/composables/use-production-run-disclosure.d.ts +15 -0
  246. package/dist/views/production-run/composables/use-production-run-disclosure.spec.d.ts +1 -0
  247. package/dist/views/production-run/composables/use-production-run-duplicate-sources.d.ts +19 -0
  248. package/dist/views/production-run/composables/use-production-run-duplicate-sources.spec.d.ts +1 -0
  249. package/dist/views/production-run/composables/use-production-run-economics.d.ts +92 -0
  250. package/dist/views/production-run/composables/use-production-run-economics.spec.d.ts +1 -0
  251. package/dist/views/production-run/composables/use-production-run-form.d.ts +277 -0
  252. package/dist/views/production-run/composables/use-production-run-form.spec.d.ts +1 -0
  253. package/dist/views/production-run/composables/use-production-run-record-output.d.ts +261 -0
  254. package/dist/views/production-run/composables/use-production-run-record-output.spec.d.ts +1 -0
  255. package/dist/views/production-run/composables/use-production-run-scroll-hint.d.ts +9 -0
  256. package/dist/views/production-run/composables/use-production-run-table.d.ts +19 -0
  257. package/dist/views/production-run/composables/use-production-run-table.spec.d.ts +1 -0
  258. package/dist/views/production-run/helpers/production-run-precision.helper.d.ts +31 -0
  259. package/dist/views/production-run/helpers/production-run-quantity.helper.d.ts +55 -0
  260. package/dist/views/production-run/helpers/production-run-quantity.helper.spec.d.ts +1 -0
  261. package/dist/views/production-run/production-run.fixture.d.ts +70 -0
  262. package/dist/views/production-run/production-run.fixture.spec.d.ts +1 -0
  263. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -3
  264. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +3 -3
  265. package/dist/views/stock/components/dialog/RecalculationDialog.vue.d.ts +2 -17
  266. package/dist/{vue-i18n--DyBLMYh.js → vue-i18n-hE8n67Ig.js} +358 -358
  267. package/dist/{xlsx.util-BthUZo9U.js → xlsx.util-Jv7EpwFc.js} +2 -2
  268. package/package.json +5 -5
  269. package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DpqPCG-m.js +0 -126
  270. package/dist/ClosingHistoryView-Cy2yMiEc.js +0 -1112
  271. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C28nZw_t.js +0 -120
  272. package/dist/ProductionView-DGB2sdwD.js +0 -1441
  273. package/dist/inventory-core-dart.default-BmR8gM8k.js +0 -25155
  274. package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +0 -9
@@ -1,17 +1,17 @@
1
- import { ref as $, onUnmounted as dt, computed as R, defineComponent as ce, watch as q, onMounted as Fe, resolveComponent as H, createElementBlock as c, openBlock as i, createBlock as pe, createCommentVNode as E, unref as L, createVNode as D, createElementVNode as g, toDisplayString as _, Fragment as z, renderList as ne, withKeys as Me, normalizeClass as se, withModifiers as ft, withCtx as te, createTextVNode as le, h as mt, onBeforeUnmount as pt, nextTick as vt, Teleport as gt, normalizeStyle as yt, withDirectives as ht, vModelText as _t } from "vue";
1
+ import { ref as S, onUnmounted as dt, computed as R, defineComponent as ce, watch as q, onMounted as Ee, resolveComponent as H, createElementBlock as c, openBlock as i, createBlock as pe, createCommentVNode as F, unref as $, createVNode as D, createElementVNode as g, toDisplayString as _, Fragment as z, renderList as ne, withKeys as Me, normalizeClass as se, withModifiers as ft, withCtx as te, createTextVNode as re, h as mt, onBeforeUnmount as pt, nextTick as vt, Teleport as gt, normalizeStyle as yt, withDirectives as ht, vModelText as _t } from "vue";
2
2
  import { _ as xt } from "./empty-placeholder-B0QU467o.js";
3
- import { u as Ke, a as He, R as ue, d as bt, S as wt, b as kt } from "./app-BJsy0dhl.js";
3
+ import { u as je, a as He, R as ue, d as bt, S as wt, b as kt } from "./app-BT7hD4az.js";
4
4
  import { useCoreStore as ge, useI18n as he } from "@feedmepos/mf-common";
5
- import { useRouter as Ee, useRoute as St } from "vue-router";
6
- import { u as $t, a as Lt, I as Ct } from "./feature-CtiarMKO.js";
7
- import { u as Rt } from "./netsuite-DFRzj2t1.js";
8
- import { u as Je } from "./useNavigationMenu-CJw7QuVt.js";
5
+ import { useRouter as Fe, useRoute as St } from "vue-router";
6
+ import { u as $t, a as Lt, I as Ct } from "./feature-CSvVyBN2.js";
7
+ import { u as Rt } from "./netsuite-CdW9v92G.js";
8
+ import { u as Je } from "./useNavigationMenu-1h-G_-el.js";
9
9
  import { useBreakpoints as Dt } from "@feedmepos/ui-library";
10
- import { F as Ne } from "./FmAdminBadge-DlplQOHb.js";
11
- import { i as It, _ as Ft } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DUjcebMR.js";
12
- import { F as Et } from "./decimal-CxH3h_oz.js";
13
- import { t as Nt, a as Pt } from "./date2-BySoG7zL.js";
14
- import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ import { F as Pe } from "./FmAdminBadge-DlplQOHb.js";
11
+ import { i as It, _ as Et } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DXTdvT0C.js";
12
+ import { F as Ft } from "./decimal-DYlKNkVX.js";
13
+ import { t as Pt, a as Tt } from "./date2-CAh7rsAp.js";
14
+ import { _ as Nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  import { u as Vt } from "./useTabStorage-BkIVScW_.js";
16
16
  import { u as Bt } from "./googlemap-D9vA7GsS.js";
17
17
  function Ut() {
@@ -20,14 +20,14 @@ function Ut() {
20
20
  isLoading: !1
21
21
  };
22
22
  }
23
- const me = $(Ut());
23
+ const me = S(Ut());
24
24
  function At() {
25
- const a = Ee();
25
+ const o = Fe();
26
26
  if (!me.value.loadingHookInstalled) {
27
27
  me.value.loadingHookInstalled = !0;
28
- const e = a.beforeEach(() => {
28
+ const e = o.beforeEach(() => {
29
29
  me.value.isLoading = !0;
30
- }), t = a.afterEach(() => {
30
+ }), t = o.afterEach(() => {
31
31
  me.value.isLoading = !1;
32
32
  });
33
33
  dt(() => {
@@ -41,8 +41,8 @@ function At() {
41
41
  };
42
42
  }
43
43
  function Mt() {
44
- const { firstAccessibleRouteName: a } = Je();
45
- return { hasAnyAccessibleInventoryRoute: R(() => a.value !== null) };
44
+ const { firstAccessibleRouteName: o } = Je();
45
+ return { hasAnyAccessibleInventoryRoute: R(() => o.value !== null) };
46
46
  }
47
47
  const Ot = {
48
48
  key: 0,
@@ -50,51 +50,51 @@ const Ot = {
50
50
  }, zt = {
51
51
  key: 1,
52
52
  class: "flex flex-col pt-[200px] gap-32 items-center"
53
- }, Gt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, jt = { class: "fm-typo-en-title-lg-600" }, Kt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Ht = {
53
+ }, Gt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Kt = { class: "fm-typo-en-title-lg-600" }, jt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Ht = {
54
54
  key: 2,
55
55
  class: "flex flex-col pt-[200px] gap-32 items-center"
56
- }, Jt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Yt = { class: "fm-typo-en-title-lg-600" }, Wt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Xt = { class: "flex gap-16" }, qt = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, Zt = { href: "https://feedme.ai/form" }, Qt = /* @__PURE__ */ ce({
56
+ }, Jt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Yt = { class: "fm-typo-en-title-lg-600" }, Xt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Wt = { class: "flex gap-16" }, qt = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, Zt = { href: "https://feedme.ai/form" }, Qt = /* @__PURE__ */ ce({
57
57
  __name: "InventoryView",
58
- setup(a) {
59
- const e = Ke(), t = He(), l = Rt(), s = ge(), o = Ee(), u = At(), r = $t(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: m } = Mt();
58
+ setup(o) {
59
+ const e = je(), t = He(), l = Rt(), s = ge(), a = Fe(), u = At(), r = $t(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: m } = Mt();
60
60
  q(
61
61
  [() => s.sessionUser.value, () => s.currentBusiness.value],
62
62
  ([O, I]) => {
63
63
  h(O, I);
64
64
  }
65
- ), Fe(async () => {
65
+ ), Ee(async () => {
66
66
  await r.init(), await s.readBusinesses();
67
67
  const O = s.sessionUser.value, I = s.currentBusiness.value;
68
68
  h(O, I);
69
69
  });
70
70
  function h(O, I) {
71
- !O || !I || k();
71
+ !O || !I || w();
72
72
  }
73
- async function k() {
73
+ async function w() {
74
74
  return await e.init(), await l.readSetting().catch((O) => {
75
75
  console.error("[all] error on reading netsuite store", O);
76
76
  }), await t.init();
77
77
  }
78
- const P = R(() => o.currentRoute.value.name === ue.TRANSFER_TEMPLATE ? r.enablePoTemplate : o.currentRoute.value.name === ue.INGREDIENT_GROUP ? r.enableIngredientGroup : !0), U = R(
79
- () => o.currentRoute.value.matched.some((O) => {
80
- var S;
78
+ const T = R(() => a.currentRoute.value.name === ue.TRANSFER_TEMPLATE ? r.enablePoTemplate : a.currentRoute.value.name === ue.INGREDIENT_GROUP ? r.enableIngredientGroup : !0), U = R(
79
+ () => a.currentRoute.value.matched.some((O) => {
80
+ var C;
81
81
  const I = O.meta, Y = I == null ? void 0 : I.validationManifest;
82
- return (((S = Y == null ? void 0 : Y.requiredCaslPermissions) == null ? void 0 : S.length) ?? 0) > 0;
82
+ return (((C = Y == null ? void 0 : Y.requiredCaslPermissions) == null ? void 0 : C.length) ?? 0) > 0;
83
83
  })
84
84
  ), oe = R(() => {
85
85
  if (!s.sessionUser.value) return !1;
86
86
  if (e._locations !== null && e.locations.length === 0) return !0;
87
87
  if (!r.isLoaded) return !1;
88
- const Y = o.currentRoute.value.name === ue.LOADING;
88
+ const Y = a.currentRoute.value.name === ue.LOADING;
89
89
  return !m.value && (Y || U.value);
90
90
  });
91
91
  return (O, I) => {
92
- const Y = H("FmSpacer"), S = H("FmCircularProgress"), T = H("FmButton"), G = H("RouterView");
92
+ const Y = H("FmSpacer"), C = H("FmCircularProgress"), N = H("FmButton"), G = H("RouterView");
93
93
  return i(), c("div", null, [
94
- L(u).isLoading ? (i(), c("div", Ot, [
94
+ $(u).isLoading ? (i(), c("div", Ot, [
95
95
  D(Y),
96
96
  g("div", null, [
97
- D(S, { size: "xl" })
97
+ D(C, { size: "xl" })
98
98
  ]),
99
99
  I[0] || (I[0] = g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
100
100
  D(Y)
@@ -105,24 +105,24 @@ const Ot = {
105
105
  class: "w-[200px] h-[200px]"
106
106
  }, null, -1)),
107
107
  g("div", Gt, [
108
- g("div", jt, _(L(v)("inventory.common.noPermission.title")), 1),
109
- g("div", Kt, _(L(v)("inventory.common.noPermission.description")), 1)
108
+ g("div", Kt, _($(v)("inventory.common.noPermission.title")), 1),
109
+ g("div", jt, _($(v)("inventory.common.noPermission.description")), 1)
110
110
  ])
111
- ])) : P.value ? L(s).sessionUser.value ? (i(), pe(G, { key: 3 })) : E("", !0) : (i(), c("div", Ht, [
111
+ ])) : T.value ? $(s).sessionUser.value ? (i(), pe(G, { key: 3 })) : F("", !0) : (i(), c("div", Ht, [
112
112
  g("div", Jt, [
113
- g("div", Yt, _(L(v)("inventory.common.proPlan.title")), 1),
114
- g("div", Wt, _(L(v)("inventory.common.proPlan.subtitle")), 1)
113
+ g("div", Yt, _($(v)("inventory.common.proPlan.title")), 1),
114
+ g("div", Xt, _($(v)("inventory.common.proPlan.subtitle")), 1)
115
115
  ]),
116
- g("div", Xt, [
116
+ g("div", Wt, [
117
117
  g("a", qt, [
118
- D(T, {
119
- label: L(v)("inventory.common.proPlan.comparePlans"),
118
+ D(N, {
119
+ label: $(v)("inventory.common.proPlan.comparePlans"),
120
120
  variant: "secondary"
121
121
  }, null, 8, ["label"])
122
122
  ]),
123
123
  g("a", Zt, [
124
- D(T, {
125
- label: L(v)("inventory.common.proPlan.callUs"),
124
+ D(N, {
125
+ label: $(v)("inventory.common.proPlan.callUs"),
126
126
  "prepend-icon": "call"
127
127
  }, null, 8, ["label"])
128
128
  ])
@@ -164,19 +164,27 @@ const Ot = {
164
164
  "customAttributes",
165
165
  "default",
166
166
  "defaultCost",
167
+ "defaultRemark",
168
+ "disabledMeasurements",
169
+ "groups",
167
170
  "inventoryBindings",
168
171
  "isInactive",
172
+ "items",
173
+ "locations",
169
174
  "low",
170
175
  "measurement",
171
176
  "measurements",
172
177
  "mid",
173
178
  "name",
174
179
  "operationalGroup",
180
+ "position",
175
181
  "precision",
176
182
  "priority",
177
183
  "recipe",
184
+ "ref",
178
185
  "rules",
179
186
  "sku",
187
+ "skuId",
180
188
  "thresholds",
181
189
  "trackingMeasurement",
182
190
  "type",
@@ -196,21 +204,21 @@ const Ot = {
196
204
  "contains.alternatives": "_id"
197
205
  }
198
206
  };
199
- function en(a) {
200
- return a instanceof wt && a.errorResponse.statusCode === 409;
207
+ function en(o) {
208
+ return o instanceof wt && o.errorResponse.statusCode === 409;
201
209
  }
202
- const _e = bt((a, e) => ({
210
+ const _e = bt((o, e) => ({
203
211
  /**
204
212
  * Commits for one record. recordId is the changelog docId, `${dbName}/${id}`.
205
213
  * The dbName scopes the (access-checked) backend route; only the bare id is
206
214
  * sent — the backend rebuilds the docId server-side.
207
215
  */
208
- async getRecordChangelog(t, l, s, o) {
216
+ async getRecordChangelog(t, l, s, a) {
209
217
  const u = t.indexOf("/");
210
218
  if (u < 0) return [];
211
219
  const r = t.slice(0, u), v = t.slice(u + 1), m = new URLSearchParams({ id: v });
212
- l != null && m.set("limit", String(l)), o && m.set("before", o), s && (m.set("explain", "1"), m.set("schema", JSON.stringify(s)));
213
- const h = `${a.inventoryBackendUrl}/${r}/changelog?${m.toString()}`;
220
+ l != null && m.set("limit", String(l)), a && m.set("before", a), s && (m.set("explain", "1"), m.set("schema", JSON.stringify(s)));
221
+ const h = `${o.inventoryBackendUrl}/${r}/changelog?${m.toString()}`;
214
222
  return await e.get(h);
215
223
  },
216
224
  /**
@@ -220,7 +228,7 @@ const _e = bt((a, e) => ({
220
228
  */
221
229
  async listPurchaseOrders(t, l, s) {
222
230
  if (!t) return [];
223
- const o = new URLSearchParams({ start: l, end: s }), u = `${a.inventoryBackendUrl}/${t}/changelog/purchase-order?${o}`;
231
+ const a = new URLSearchParams({ start: l, end: s }), u = `${o.inventoryBackendUrl}/${t}/changelog/purchase-order?${a}`;
224
232
  return await e.get(u);
225
233
  },
226
234
  /**
@@ -230,7 +238,7 @@ const _e = bt((a, e) => ({
230
238
  */
231
239
  async listClosingDrafts(t, l, s) {
232
240
  if (!t) return [];
233
- const o = new URLSearchParams({ start: l, end: s }), u = `${a.inventoryBackendUrl}/${t}/changelog/closing-draft?${o}`;
241
+ const a = new URLSearchParams({ start: l, end: s }), u = `${o.inventoryBackendUrl}/${t}/changelog/closing-draft?${a}`;
234
242
  return await e.get(u);
235
243
  },
236
244
  /**
@@ -240,9 +248,9 @@ const _e = bt((a, e) => ({
240
248
  * write path — the backend passthrough for kit httpapi's GET /api/state.
241
249
  */
242
250
  async getState(t, l, s) {
243
- const o = new URLSearchParams({ id: l });
244
- s && o.set("at", s);
245
- const u = `${a.inventoryBackendUrl}/${t}/changelog/state?${o.toString()}`;
251
+ const a = new URLSearchParams({ id: l });
252
+ s && a.set("at", s);
253
+ const u = `${o.inventoryBackendUrl}/${t}/changelog/state?${a.toString()}`;
246
254
  return await e.get(u);
247
255
  },
248
256
  /**
@@ -253,7 +261,7 @@ const _e = bt((a, e) => ({
253
261
  */
254
262
  async listDomains(t) {
255
263
  if (!t) return [];
256
- const l = `${a.inventoryBackendUrl}/business_${t}/changelog/domains`;
264
+ const l = `${o.inventoryBackendUrl}/business_${t}/changelog/domains`;
257
265
  return await e.get(l);
258
266
  },
259
267
  /**
@@ -263,7 +271,7 @@ const _e = bt((a, e) => ({
263
271
  */
264
272
  async listDomainRecords(t, l) {
265
273
  if (!t) return [];
266
- const s = `${a.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(l)}`;
274
+ const s = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(l)}`;
267
275
  return await e.get(s);
268
276
  },
269
277
  /**
@@ -273,55 +281,61 @@ const _e = bt((a, e) => ({
273
281
  */
274
282
  async listInventory(t, l) {
275
283
  if (!t) return [];
276
- const s = `${a.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${l}`;
284
+ const s = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${l}`;
277
285
  return await e.get(s);
278
286
  }
279
287
  })), Se = 50;
280
288
  function tn() {
281
- const a = _e(), e = $([]), t = $(!1), l = $(!1);
282
- let s = null, o = 0;
289
+ const o = _e(), e = S([]), t = S(!1), l = S(!1);
290
+ let s = null, a = 0;
283
291
  async function u(v, m, h) {
284
- const k = ++o;
292
+ const w = ++a;
285
293
  if (s = null, l.value = !1, !v) {
286
294
  e.value = [];
287
295
  return;
288
296
  }
289
297
  t.value = !0;
290
298
  try {
291
- const P = m ?? Se, U = await a.getRecordChangelog(v, P, h);
292
- if (k !== o) return;
293
- e.value = U, m == null && (s = { recordId: v, explain: h }, l.value = U.length === P);
294
- } catch (P) {
295
- throw k === o && (e.value = []), P;
299
+ const T = m ?? Se, U = await o.getRecordChangelog(v, T, h);
300
+ if (w !== a) return;
301
+ e.value = U, m == null && (s = { recordId: v, explain: h }, l.value = U.length === T);
302
+ } catch (T) {
303
+ throw w === a && (e.value = []), T;
296
304
  } finally {
297
- k === o && (t.value = !1);
305
+ w === a && (t.value = !1);
298
306
  }
299
307
  }
300
308
  async function r() {
301
309
  const v = e.value[e.value.length - 1];
302
310
  if (!s || !v || t.value || !l.value) return;
303
- const m = o;
311
+ const m = a;
304
312
  t.value = !0;
305
313
  try {
306
- const h = await a.getRecordChangelog(s.recordId, Se, s.explain, v.id);
307
- if (m !== o) return;
314
+ const h = await o.getRecordChangelog(s.recordId, Se, s.explain, v.id);
315
+ if (m !== a) return;
308
316
  e.value = [...e.value, ...h], l.value = h.length === Se;
309
317
  } finally {
310
- m === o && (t.value = !1);
318
+ m === a && (t.value = !1);
311
319
  }
312
320
  }
313
321
  return { commits: e, isLoading: t, hasMore: l, load: u, loadMore: r };
314
322
  }
315
323
  const Ye = 1e3;
316
- function nn(a, e) {
317
- return [...a, ...e].sort((t, l) => l.at.localeCompare(t.at));
324
+ function Oe(o) {
325
+ const e = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?/.exec(o);
326
+ return e ? `${e[1]}.${(e[2] ?? "").padEnd(9, "0").slice(0, 9)}` : o;
327
+ }
328
+ function nn(o, e) {
329
+ return [...o, ...e].sort(
330
+ (t, l) => Oe(l.at).localeCompare(Oe(t.at)) || l.id.localeCompare(t.id)
331
+ );
318
332
  }
319
333
  function on() {
320
- const a = _e(), e = $([]);
334
+ const o = _e(), e = S([]);
321
335
  async function t(l) {
322
336
  if (e.value = [], !!l)
323
337
  try {
324
- e.value = await a.getRecordChangelog(
338
+ e.value = await o.getRecordChangelog(
325
339
  l,
326
340
  Ye,
327
341
  Re
@@ -332,10 +346,10 @@ function on() {
332
346
  }
333
347
  return { commits: e, load: t };
334
348
  }
335
- function We(a) {
336
- if (!a) return null;
349
+ function Xe(o) {
350
+ if (!o) return null;
337
351
  try {
338
- const e = JSON.parse(a);
352
+ const e = JSON.parse(o);
339
353
  return typeof (e == null ? void 0 : e.changelogLabelKey) == "string" && typeof (e == null ? void 0 : e.verb) == "string" ? {
340
354
  labelKey: e.changelogLabelKey,
341
355
  verb: e.verb,
@@ -345,134 +359,134 @@ function We(a) {
345
359
  return null;
346
360
  }
347
361
  }
348
- function Xe(a) {
349
- return a.startsWith("inventory.changelog.");
362
+ function We(o) {
363
+ return o.startsWith("inventory.changelog.");
350
364
  }
351
365
  const qe = "";
352
- function De(a) {
353
- const e = a.indexOf(qe);
354
- return e === -1 ? { raw: a, human: a } : { raw: a.slice(0, e), human: a.slice(e + 1) };
366
+ function De(o) {
367
+ const e = o.indexOf(qe);
368
+ return e === -1 ? { raw: o, human: o } : { raw: o.slice(0, e), human: o.slice(e + 1) };
355
369
  }
356
370
  const an = [
357
371
  "inventory.changelog.label.recipe",
358
372
  "inventory.changelog.label.sku",
359
373
  "inventory.changelog.label.unit"
360
374
  ], sn = [...an, "Recipe", "Ingredient", "Unit"];
361
- function ln(a) {
362
- const { human: e } = De(a);
375
+ function ln(o) {
376
+ const { human: e } = De(o);
363
377
  if (!e) return { type: "Document", name: "", field: [] };
364
378
  const t = e.split(" › ");
365
379
  return t.length >= 2 && sn.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
366
380
  }
367
- const Oe = 800;
368
- function Ze(a, e, t = 2) {
369
- const l = ze(a), s = ze(e);
381
+ const ze = 800;
382
+ function Ze(o, e, t = 2) {
383
+ const l = Ge(o), s = Ge(e);
370
384
  if (!l || !s) return null;
371
- let o = 0;
372
- for (; o < l.length && o < s.length && l[o] === s[o]; ) o++;
385
+ let a = 0;
386
+ for (; a < l.length && a < s.length && l[a] === s[a]; ) a++;
373
387
  let u = 0;
374
- for (; u < l.length - o && u < s.length - o && l[l.length - 1 - u] === s[s.length - 1 - u]; )
388
+ for (; u < l.length - a && u < s.length - a && l[l.length - 1 - u] === s[s.length - 1 - u]; )
375
389
  u++;
376
- const r = l.slice(o, l.length - u), v = s.slice(o, s.length - u);
377
- if (r.length > Oe || v.length > Oe) return null;
390
+ const r = l.slice(a, l.length - u), v = s.slice(a, s.length - u);
391
+ if (r.length > ze || v.length > ze) return null;
378
392
  const m = (h) => ({ type: "same", text: h });
379
393
  return un(
380
- [...l.slice(0, o).map(m), ...rn(r, v), ...l.slice(l.length - u).map(m)],
394
+ [...l.slice(0, a).map(m), ...rn(r, v), ...l.slice(l.length - u).map(m)],
381
395
  t
382
396
  );
383
397
  }
384
- function ze(a) {
398
+ function Ge(o) {
385
399
  try {
386
- const e = JSON.parse(a);
400
+ const e = JSON.parse(o);
387
401
  return e === null || typeof e != "object" ? null : JSON.stringify(e, null, 2).split(`
388
402
  `);
389
403
  } catch {
390
404
  return null;
391
405
  }
392
406
  }
393
- function rn(a, e) {
394
- const t = a.length, l = e.length, s = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
407
+ function rn(o, e) {
408
+ const t = o.length, l = e.length, s = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
395
409
  for (let v = t - 1; v >= 0; v--)
396
410
  for (let m = l - 1; m >= 0; m--)
397
- s[v][m] = a[v] === e[m] ? s[v + 1][m + 1] + 1 : Math.max(s[v + 1][m], s[v][m + 1]);
398
- const o = [];
411
+ s[v][m] = o[v] === e[m] ? s[v + 1][m + 1] + 1 : Math.max(s[v + 1][m], s[v][m + 1]);
412
+ const a = [];
399
413
  let u = 0, r = 0;
400
414
  for (; u < t && r < l; )
401
- a[u] === e[r] ? (o.push({ type: "same", text: a[u] }), u++, r++) : s[u + 1][r] >= s[u][r + 1] ? (o.push({ type: "del", text: a[u] }), u++) : (o.push({ type: "add", text: e[r] }), r++);
402
- for (; u < t; ) o.push({ type: "del", text: a[u++] });
403
- for (; r < l; ) o.push({ type: "add", text: e[r++] });
404
- return o;
415
+ o[u] === e[r] ? (a.push({ type: "same", text: o[u] }), u++, r++) : s[u + 1][r] >= s[u][r + 1] ? (a.push({ type: "del", text: o[u] }), u++) : (a.push({ type: "add", text: e[r] }), r++);
416
+ for (; u < t; ) a.push({ type: "del", text: o[u++] });
417
+ for (; r < l; ) a.push({ type: "add", text: e[r++] });
418
+ return a;
405
419
  }
406
- function un(a, e) {
407
- const t = a.map(() => !1);
408
- a.forEach((o, u) => {
409
- if (o.type !== "same")
410
- for (let r = Math.max(0, u - e); r <= Math.min(a.length - 1, u + e); r++)
420
+ function un(o, e) {
421
+ const t = o.map(() => !1);
422
+ o.forEach((a, u) => {
423
+ if (a.type !== "same")
424
+ for (let r = Math.max(0, u - e); r <= Math.min(o.length - 1, u + e); r++)
411
425
  t[r] = !0;
412
426
  });
413
427
  const l = [];
414
428
  let s = !1;
415
- return a.forEach((o, u) => {
416
- t[u] ? (l.push(o), s = !1) : s || (l.push({ type: "skip", text: "⋯" }), s = !0);
429
+ return o.forEach((a, u) => {
430
+ t[u] ? (l.push(a), s = !1) : s || (l.push({ type: "skip", text: "⋯" }), s = !0);
417
431
  }), l;
418
432
  }
419
- function cn(a, e) {
433
+ function cn(o, e) {
420
434
  let t;
421
435
  try {
422
- t = JSON.parse(a);
436
+ t = JSON.parse(o);
423
437
  } catch {
424
- return a;
438
+ return o;
425
439
  }
426
440
  return t === null ? "—" : typeof t == "number" ? t.toLocaleString() : typeof t == "boolean" ? e(t ? "inventory.changelog.yes" : "inventory.changelog.no") : String(t);
427
441
  }
428
- function Ie(a, e, t = 0, l) {
442
+ function Ie(o, e, t = 0, l) {
429
443
  var m;
430
- const s = a.label == null ? void 0 : Xe(a.label) ? e(a.label) : a.label, o = s != null || a.value != null || a.display != null, u = !((m = a.kids) != null && m.length), r = [];
431
- o && r.push({
444
+ const s = o.label == null ? void 0 : We(o.label) ? e(o.label) : o.label, a = s != null || o.value != null || o.display != null, u = !((m = o.kids) != null && m.length), r = [];
445
+ a && r.push({
432
446
  depth: t,
433
447
  // A bare array index says nothing a reader needs — a leaf list entry
434
448
  // shows just its value. Branch nodes keep the index as their header.
435
449
  label: s != null && u && /^\d+$/.test(s) ? void 0 : s,
436
- text: u ? dn(a, e, l) : void 0,
437
- bookkeeping: !!a.bookkeeping
450
+ text: u ? dn(o, e, l) : void 0,
451
+ bookkeeping: !!o.bookkeeping
438
452
  });
439
- const v = o ? t + 1 : t;
440
- for (const h of a.kids ?? [])
453
+ const v = a ? t + 1 : t;
454
+ for (const h of o.kids ?? [])
441
455
  r.push(...Ie(h, e, v, l));
442
456
  return r;
443
457
  }
444
- function dn(a, e, t) {
445
- if (a.value == null) return a.display || void 0;
446
- const l = cn(a.value, e);
447
- return (t == null ? void 0 : t(l)) ?? a.display ?? l;
458
+ function dn(o, e, t) {
459
+ if (o.value == null) return o.display || void 0;
460
+ const l = cn(o.value, e);
461
+ return (t == null ? void 0 : t(l)) ?? o.display ?? l;
448
462
  }
449
- function $e(a, e) {
450
- return JSON.stringify(a, null, 2).split(`
463
+ function $e(o, e) {
464
+ return JSON.stringify(o, null, 2).split(`
451
465
  `).map((t) => ({ type: e, text: t }));
452
466
  }
453
467
  function fn() {
454
- const a = _e(), e = /* @__PURE__ */ new Map(), t = $(!1), l = $(null);
455
- async function s(o) {
456
- const u = e.get(o.id);
468
+ const o = _e(), e = /* @__PURE__ */ new Map(), t = S(!1), l = S(null);
469
+ async function s(a) {
470
+ const u = e.get(a.id);
457
471
  if (u) {
458
472
  l.value = u;
459
473
  return;
460
474
  }
461
475
  t.value = !0;
462
476
  try {
463
- const r = o.doc_id.indexOf("/"), v = o.doc_id.slice(0, r), m = o.doc_id.slice(r + 1), [h, k] = await Promise.all([
464
- o.parent ? a.getState(v, m, o.parent) : Promise.resolve({}),
465
- a.getState(v, m, o.id)
466
- ]), U = { diff: o.parent ? Ze(JSON.stringify(h), JSON.stringify(k)) ?? [
477
+ const r = a.doc_id.indexOf("/"), v = a.doc_id.slice(0, r), m = a.doc_id.slice(r + 1), [h, w] = await Promise.all([
478
+ a.parent ? o.getState(v, m, a.parent) : Promise.resolve({}),
479
+ o.getState(v, m, a.id)
480
+ ]), U = { diff: a.parent ? Ze(JSON.stringify(h), JSON.stringify(w)) ?? [
467
481
  ...$e(h, "del"),
468
- ...$e(k, "add")
469
- ] : $e(k, "add"), conflict: !1 };
470
- e.set(o.id, U), l.value = U;
482
+ ...$e(w, "add")
483
+ ] : $e(w, "add"), conflict: !1 };
484
+ e.set(a.id, U), l.value = U;
471
485
  } catch (r) {
472
486
  if (!en(r))
473
487
  throw l.value = null, r;
474
488
  const v = { diff: null, conflict: !0 };
475
- e.set(o.id, v), l.value = v;
489
+ e.set(a.id, v), l.value = v;
476
490
  } finally {
477
491
  t.value = !1;
478
492
  }
@@ -503,13 +517,13 @@ const mn = {
503
517
  }, In = {
504
518
  key: 2,
505
519
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
506
- }, Fn = {
520
+ }, En = {
507
521
  key: 0,
508
522
  class: "text-xs text-gray-400"
509
- }, En = { class: "fm-typo-en-body-md-600" }, Nn = { class: "flex flex-col gap-6" }, Pn = {
523
+ }, Fn = { class: "fm-typo-en-body-md-600" }, Pn = { class: "flex flex-col gap-6" }, Tn = {
510
524
  key: 0,
511
525
  class: "text-gray-700"
512
- }, Tn = { class: "min-w-[120px] shrink-0 text-gray-500" }, Vn = {
526
+ }, Nn = { class: "min-w-[120px] shrink-0 text-gray-500" }, Vn = {
513
527
  key: 0,
514
528
  class: "flex w-full flex-col gap-4"
515
529
  }, Bn = {
@@ -521,10 +535,10 @@ const mn = {
521
535
  }, On = { key: 0 }, zn = { key: 1 }, Gn = {
522
536
  key: 1,
523
537
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
524
- }, jn = {
538
+ }, Kn = {
525
539
  key: 2,
526
540
  class: "flex w-full flex-wrap items-baseline gap-4"
527
- }, Kn = {
541
+ }, jn = {
528
542
  key: 0,
529
543
  class: "rounded bg-red-50 px-4 text-red-700"
530
544
  }, Hn = {
@@ -536,24 +550,24 @@ const mn = {
536
550
  }, Yn = {
537
551
  key: 1,
538
552
  class: "text-sm text-gray-500"
539
- }, Wn = {
553
+ }, Xn = {
540
554
  key: 2,
541
555
  class: "mt-16 break-all border-t border-gray-200 pt-8 font-mono text-xs text-gray-400"
542
- }, Xn = { key: 0 }, qn = "capture baseline", Zn = /* @__PURE__ */ ce({
556
+ }, Wn = { key: 0 }, qn = "capture baseline", Zn = /* @__PURE__ */ ce({
543
557
  __name: "ChangelogPanel",
544
558
  props: {
545
559
  commits: {},
546
560
  isLoading: { type: Boolean },
547
561
  resolveName: { type: Function }
548
562
  },
549
- setup(a) {
550
- const e = a, { t } = he(), l = $(null), s = R(
563
+ setup(o) {
564
+ const e = o, { t } = he(), l = S(null), s = R(
551
565
  () => e.commits.find((p) => p.id === l.value)
552
- ), o = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), u = R(() => {
566
+ ), a = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), u = R(() => {
553
567
  var b;
554
568
  return (((b = s.value) == null ? void 0 : b.changes) ?? []).filter((B) => {
555
569
  const { raw: V } = De(B.path);
556
- return V === "@payload" || B.from == null && B.to == null ? !1 : !V.split(".").some((W) => o.has(W));
570
+ return V === "@payload" || B.from == null && B.to == null ? !1 : !V.split(".").some((X) => a.has(X));
557
571
  });
558
572
  });
559
573
  q(
@@ -564,16 +578,16 @@ const mn = {
564
578
  },
565
579
  { immediate: !0 }
566
580
  );
567
- const r = $(!1), { isLoading: v, result: m, load: h } = fn();
581
+ const r = S(!1), { isLoading: v, result: m, load: h } = fn();
568
582
  q([r, s], ([p, b]) => {
569
583
  m.value = null, !(!p || !b) && h(b).catch((B) => {
570
584
  console.error("changelog snapshot load failed", B), r.value = !1;
571
585
  });
572
586
  });
573
- function k(p) {
587
+ function w(p) {
574
588
  return p ? p.slice(0, 8) : "";
575
589
  }
576
- function P(p) {
590
+ function T(p) {
577
591
  return p ? new Date(p).toLocaleString() : "";
578
592
  }
579
593
  function U(p) {
@@ -591,19 +605,19 @@ const mn = {
591
605
  }
592
606
  function O(p) {
593
607
  if (p.message === qn) return t("inventory.changelog.captureBaseline");
594
- const b = We(p.message);
608
+ const b = Xe(p.message);
595
609
  if (!b) return p.message || t("inventory.changelog.noMessage");
596
610
  const B = I(b.labelKey);
597
611
  return b.name ? t(`inventory.changelog.message.${b.verb}`, { module: B, name: b.name }) : t(`inventory.changelog.message.${b.verb}NoName`, { module: B });
598
612
  }
599
613
  function I(p) {
600
- return Xe(p) ? t(p) : p;
614
+ return We(p) ? t(p) : p;
601
615
  }
602
616
  const Y = (p) => /[^a-zA-Z]/.test(p);
603
- function S(p, b) {
617
+ function C(p, b) {
604
618
  return p == null || b == null ? null : Ze(p, b);
605
619
  }
606
- function T(p) {
620
+ function N(p) {
607
621
  if (!(!p.to_value && !p.from_value))
608
622
  return {
609
623
  toTree: p.to_value ? Ie(p.to_value, t, 0, e.resolveName) : void 0,
@@ -613,36 +627,36 @@ const mn = {
613
627
  function G(p) {
614
628
  return p === "add" ? "bg-green-50 text-green-700" : p === "del" ? "bg-red-50 text-red-700" : p === "skip" ? "text-gray-400" : "text-gray-600";
615
629
  }
616
- function j(p) {
630
+ function K(p) {
617
631
  return p.type === "skip" ? p.text : (p.type === "add" ? "+ " : p.type === "del" ? "- " : " ") + p.text;
618
632
  }
619
633
  const Q = R(() => {
620
634
  const p = /* @__PURE__ */ new Map(), b = [], B = (y, f) => {
621
- let F = p.get(y);
622
- return F || (F = f(), p.set(y, F), b.push(F)), F;
623
- }, V = () => B("@doc", () => ({ header: "", lines: [] })), W = (y, f) => {
624
- var N;
635
+ let E = p.get(y);
636
+ return E || (E = f(), p.set(y, E), b.push(E)), E;
637
+ }, V = () => B("@doc", () => ({ header: "", lines: [] })), X = (y, f) => {
638
+ var P;
625
639
  if (y == null) return f;
626
- let F;
640
+ let E;
627
641
  try {
628
- F = JSON.parse(y);
642
+ E = JSON.parse(y);
629
643
  } catch {
630
- F = y;
644
+ E = y;
631
645
  }
632
- return (typeof F == "string" ? (N = e.resolveName) == null ? void 0 : N.call(e, F) : void 0) ?? f;
633
- }, K = (y, f, F) => {
634
- var N, J, Z, ee;
635
- const x = T(f);
636
- x ? y.lines.push({ label: F, ...x }) : f.from != null && f.to != null ? y.lines.push({
637
- label: F,
646
+ return (typeof E == "string" ? (P = e.resolveName) == null ? void 0 : P.call(e, E) : void 0) ?? f;
647
+ }, j = (y, f, E) => {
648
+ var P, J, Z, ee;
649
+ const x = N(f);
650
+ x ? y.lines.push({ label: E, ...x }) : f.from != null && f.to != null ? y.lines.push({
651
+ label: E,
638
652
  from: f.from,
639
653
  to: f.to,
640
- diff: S(f.from, f.to),
641
- fromDisplay: W(f.from, (N = f.display) == null ? void 0 : N.from),
642
- toDisplay: W(f.to, (J = f.display) == null ? void 0 : J.to)
643
- }) : f.to != null ? y.lines.push({ label: F, to: f.to, toDisplay: W(f.to, (Z = f.display) == null ? void 0 : Z.to) }) : y.lines.push({ label: F, from: f.from, fromDisplay: W(f.from, (ee = f.display) == null ? void 0 : ee.from) });
644
- }, C = (y) => {
645
- var F;
654
+ diff: C(f.from, f.to),
655
+ fromDisplay: X(f.from, (P = f.display) == null ? void 0 : P.from),
656
+ toDisplay: X(f.to, (J = f.display) == null ? void 0 : J.to)
657
+ }) : f.to != null ? y.lines.push({ label: E, to: f.to, toDisplay: X(f.to, (Z = f.display) == null ? void 0 : Z.to) }) : y.lines.push({ label: E, from: f.from, fromDisplay: X(f.from, (ee = f.display) == null ? void 0 : ee.from) });
658
+ }, L = (y) => {
659
+ var E;
646
660
  const f = y.element;
647
661
  if (f) {
648
662
  const x = B(`kit:${(f.trail ?? []).join(".")}:${f.id ?? ""}`, () => ({
@@ -650,129 +664,129 @@ const mn = {
650
664
  header: f.name || f.id || "",
651
665
  lines: []
652
666
  }));
653
- if ((F = y.field) != null && F.length)
654
- K(x, y, y.field.map(I).join(" › "));
667
+ if ((E = y.field) != null && E.length)
668
+ j(x, y, y.field.map(I).join(" › "));
655
669
  else {
656
670
  x.badge = y.to != null ? "added" : "removed";
657
- const N = T(y);
658
- N && x.lines.push(N);
671
+ const P = N(y);
672
+ P && x.lines.push(P);
659
673
  }
660
674
  return;
661
675
  }
662
- K(V(), y, (y.field ?? []).map(I).join(" › "));
676
+ j(V(), y, (y.field ?? []).map(I).join(" › "));
663
677
  };
664
678
  for (const y of u.value) {
665
- const { raw: f, human: F } = De(y.path);
679
+ const { raw: f, human: E } = De(y.path);
666
680
  if (y.kind === "create" && !f) {
667
- const Z = T(y);
681
+ const Z = N(y);
668
682
  V().lines.push(
669
683
  Z ? { label: t("inventory.changelog.kind.created"), ...Z } : { text: t("inventory.changelog.kind.created") }
670
684
  );
671
685
  continue;
672
686
  }
673
687
  if (!y.path.includes(qe) && (y.field || y.element)) {
674
- C(y);
688
+ L(y);
675
689
  continue;
676
690
  }
677
- const x = f ? f.split(".") : [], N = F ? F.split(" › ") : [], J = x.findIndex((Z, ee) => ee > 0 && Y(Z));
678
- if (J > 0 && N.length === x.length) {
679
- const Z = N[J], ee = B(x.slice(0, J + 1).join("."), () => ({
680
- kind: N.slice(0, J).map(I).join(" › "),
691
+ const x = f ? f.split(".") : [], P = E ? E.split(" › ") : [], J = x.findIndex((Z, ee) => ee > 0 && Y(Z));
692
+ if (J > 0 && P.length === x.length) {
693
+ const Z = P[J], ee = B(x.slice(0, J + 1).join("."), () => ({
694
+ kind: P.slice(0, J).map(I).join(" › "),
681
695
  header: Z,
682
696
  lines: []
683
- })), re = N.slice(J + 1).map(I).join(" › ");
684
- if (re) K(ee, y, re);
685
- else if (y.from != null && y.to != null) K(ee, y, Z);
697
+ })), ie = P.slice(J + 1).map(I).join(" › ");
698
+ if (ie) j(ee, y, ie);
699
+ else if (y.from != null && y.to != null) j(ee, y, Z);
686
700
  else {
687
701
  ee.badge = y.to != null ? "added" : "removed";
688
- const de = T(y);
702
+ const de = N(y);
689
703
  de && ee.lines.push(de);
690
704
  }
691
705
  continue;
692
706
  }
693
- K(V(), y, N.map(I).join(" › "));
707
+ j(V(), y, P.map(I).join(" › "));
694
708
  }
695
709
  return b;
696
710
  });
697
711
  return (p, b) => {
698
- var W, K;
712
+ var X, j;
699
713
  const B = H("FmCircularProgress"), V = H("FmSwitch");
700
714
  return p.isLoading ? (i(), c("div", mn, [
701
715
  D(B)
702
716
  ])) : p.commits.length ? (i(), c("div", vn, [
703
717
  g("ol", gn, [
704
- (i(!0), c(z, null, ne(p.commits, (C) => (i(), c("li", {
705
- key: C.id,
718
+ (i(!0), c(z, null, ne(p.commits, (L) => (i(), c("li", {
719
+ key: L.id,
706
720
  role: "button",
707
721
  tabindex: "0",
708
722
  class: se([
709
723
  "cursor-pointer border-l-2 py-8 pl-12",
710
- C.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
724
+ L.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
711
725
  ]),
712
- onClick: (y) => l.value = C.id,
726
+ onClick: (y) => l.value = L.id,
713
727
  onKeydown: [
714
- Me((y) => l.value = C.id, ["enter"]),
715
- Me(ft((y) => l.value = C.id, ["prevent"]), ["space"])
728
+ Me((y) => l.value = L.id, ["enter"]),
729
+ Me(ft((y) => l.value = L.id, ["prevent"]), ["space"])
716
730
  ]
717
731
  }, [
718
- g("div", hn, _(O(C)), 1),
719
- g("div", _n, _(oe(C)) + " · " + _(P(C.at)) + " · " + _(k(C.id)), 1)
732
+ g("div", hn, _(O(L)), 1),
733
+ g("div", _n, _(oe(L)) + " · " + _(T(L.at)) + " · " + _(w(L.id)), 1)
720
734
  ], 42, yn))), 128))
721
735
  ]),
722
736
  s.value ? (i(), c("div", xn, [
723
737
  g("div", bn, [
724
738
  g("div", wn, [
725
739
  g("div", kn, _(O(s.value)), 1),
726
- s.value.parent ? E("", !0) : (i(), c("span", Sn, _(L(t)("inventory.changelog.rootCommit")), 1))
740
+ s.value.parent ? F("", !0) : (i(), c("span", Sn, _($(t)("inventory.changelog.rootCommit")), 1))
727
741
  ]),
728
- g("div", $n, _(oe(s.value)) + " · " + _(P(s.value.at)), 1)
742
+ g("div", $n, _(oe(s.value)) + " · " + _(T(s.value.at)), 1)
729
743
  ]),
730
744
  g("div", Ln, [
731
- D(Ne, null, {
745
+ D(Pe, null, {
732
746
  default: te(() => [
733
- g("span", Cn, _(L(t)("inventory.changelog.dataDiff")), 1),
747
+ g("span", Cn, _($(t)("inventory.changelog.dataDiff")), 1),
734
748
  D(V, {
735
749
  modelValue: r.value,
736
- "onUpdate:modelValue": b[0] || (b[0] = (C) => r.value = C)
750
+ "onUpdate:modelValue": b[0] || (b[0] = (L) => r.value = L)
737
751
  }, null, 8, ["modelValue"])
738
752
  ]),
739
753
  _: 1
740
754
  })
741
755
  ]),
742
756
  r.value ? (i(), c("div", Rn, [
743
- L(v) ? (i(), pe(B, { key: 0 })) : (W = L(m)) != null && W.conflict ? (i(), c("div", Dn, _(L(t)("inventory.changelog.snapshotUnavailable")), 1)) : (K = L(m)) != null && K.diff ? (i(), c("div", In, [
744
- (i(!0), c(z, null, ne(L(m).diff, (C, y) => (i(), c("div", {
757
+ $(v) ? (i(), pe(B, { key: 0 })) : (X = $(m)) != null && X.conflict ? (i(), c("div", Dn, _($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (j = $(m)) != null && j.diff ? (i(), c("div", In, [
758
+ (i(!0), c(z, null, ne($(m).diff, (L, y) => (i(), c("div", {
745
759
  key: y,
746
- class: se(["whitespace-pre px-4", G(C.type)])
747
- }, _(j(C)), 3))), 128))
748
- ])) : E("", !0)
749
- ])) : E("", !0),
750
- (i(!0), c(z, null, ne(Q.value, (C, y) => (i(), c("div", {
760
+ class: se(["whitespace-pre px-4", G(L.type)])
761
+ }, _(K(L)), 3))), 128))
762
+ ])) : F("", !0)
763
+ ])) : F("", !0),
764
+ (i(!0), c(z, null, ne(Q.value, (L, y) => (i(), c("div", {
751
765
  key: y,
752
766
  class: "mb-12 rounded-lg border border-gray-200 p-12"
753
767
  }, [
754
- C.kind || C.header || C.badge ? (i(), c("div", {
768
+ L.kind || L.header || L.badge ? (i(), c("div", {
755
769
  key: 0,
756
- class: se(["flex flex-wrap items-baseline gap-8", C.lines.length ? "mb-8" : ""])
770
+ class: se(["flex flex-wrap items-baseline gap-8", L.lines.length ? "mb-8" : ""])
757
771
  }, [
758
- C.kind ? (i(), c("span", Fn, _(C.kind), 1)) : E("", !0),
759
- g("span", En, _(C.header), 1),
760
- C.badge ? (i(), c("span", {
772
+ L.kind ? (i(), c("span", En, _(L.kind), 1)) : F("", !0),
773
+ g("span", Fn, _(L.header), 1),
774
+ L.badge ? (i(), c("span", {
761
775
  key: 1,
762
- class: se(["rounded-full px-8 text-xs", C.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
763
- }, _(C.badge === "added" ? L(t)("inventory.changelog.added") : L(t)("inventory.changelog.kind.removed")), 3)) : E("", !0)
764
- ], 2)) : E("", !0),
765
- g("ul", Nn, [
766
- (i(!0), c(z, null, ne(C.lines, (f, F) => (i(), c("li", {
767
- key: F,
776
+ class: se(["rounded-full px-8 text-xs", L.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
777
+ }, _(L.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : F("", !0)
778
+ ], 2)) : F("", !0),
779
+ g("ul", Pn, [
780
+ (i(!0), c(z, null, ne(L.lines, (f, E) => (i(), c("li", {
781
+ key: E,
768
782
  class: "flex flex-wrap items-baseline gap-8 text-sm"
769
783
  }, [
770
- f.text ? (i(), c("span", Pn, _(f.text), 1)) : (i(), c(z, { key: 1 }, [
771
- g("span", Tn, _(f.label), 1),
784
+ f.text ? (i(), c("span", Tn, _(f.text), 1)) : (i(), c(z, { key: 1 }, [
785
+ g("span", Nn, _(f.label), 1),
772
786
  f.toTree || f.fromTree ? (i(), c("div", Vn, [
773
787
  f.fromTree ? (i(), c("div", Bn, [
774
- (i(!0), c(z, null, ne(f.fromTree, (x, N) => (i(), c("div", {
775
- key: N,
788
+ (i(!0), c(z, null, ne(f.fromTree, (x, P) => (i(), c("div", {
789
+ key: P,
776
790
  class: se(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-red-700"])
777
791
  }, [
778
792
  (i(!0), c(z, null, ne(x.depth, (J) => (i(), c("span", {
@@ -780,17 +794,17 @@ const mn = {
780
794
  class: "inline-block w-16"
781
795
  }))), 128)),
782
796
  x.label ? (i(), c("span", Un, [
783
- le(_(x.label), 1),
797
+ re(_(x.label), 1),
784
798
  x.text ? (i(), c(z, { key: 0 }, [
785
- le(":")
786
- ], 64)) : E("", !0)
787
- ])) : E("", !0),
788
- x.text ? (i(), c("span", An, _(x.text), 1)) : E("", !0)
799
+ re(":")
800
+ ], 64)) : F("", !0)
801
+ ])) : F("", !0),
802
+ x.text ? (i(), c("span", An, _(x.text), 1)) : F("", !0)
789
803
  ], 2))), 128))
790
- ])) : E("", !0),
804
+ ])) : F("", !0),
791
805
  f.toTree ? (i(), c("div", Mn, [
792
- (i(!0), c(z, null, ne(f.toTree, (x, N) => (i(), c("div", {
793
- key: N,
806
+ (i(!0), c(z, null, ne(f.toTree, (x, P) => (i(), c("div", {
807
+ key: P,
794
808
  class: se(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-green-700"])
795
809
  }, [
796
810
  (i(!0), c(z, null, ne(x.depth, (J) => (i(), c("span", {
@@ -798,35 +812,35 @@ const mn = {
798
812
  class: "inline-block w-16"
799
813
  }))), 128)),
800
814
  x.label ? (i(), c("span", On, [
801
- le(_(x.label), 1),
815
+ re(_(x.label), 1),
802
816
  x.text ? (i(), c(z, { key: 0 }, [
803
- le(":")
804
- ], 64)) : E("", !0)
805
- ])) : E("", !0),
806
- x.text ? (i(), c("span", zn, _(x.text), 1)) : E("", !0)
817
+ re(":")
818
+ ], 64)) : F("", !0)
819
+ ])) : F("", !0),
820
+ x.text ? (i(), c("span", zn, _(x.text), 1)) : F("", !0)
807
821
  ], 2))), 128))
808
- ])) : E("", !0)
822
+ ])) : F("", !0)
809
823
  ])) : f.diff ? (i(), c("div", Gn, [
810
- (i(!0), c(z, null, ne(f.diff, (x, N) => (i(), c("div", {
811
- key: N,
824
+ (i(!0), c(z, null, ne(f.diff, (x, P) => (i(), c("div", {
825
+ key: P,
812
826
  class: se(["whitespace-pre px-4", G(x.type)])
813
- }, _(j(x)), 3))), 128))
814
- ])) : (i(), c("span", jn, [
815
- f.from != null ? (i(), c("span", Kn, _(f.fromDisplay ?? U(f.from)), 1)) : E("", !0),
816
- f.from != null && f.to != null ? (i(), c("span", Hn, "→")) : E("", !0),
817
- f.to != null ? (i(), c("span", Jn, _(f.toDisplay ?? U(f.to)), 1)) : E("", !0)
827
+ }, _(K(x)), 3))), 128))
828
+ ])) : (i(), c("span", Kn, [
829
+ f.from != null ? (i(), c("span", jn, _(f.fromDisplay ?? U(f.from)), 1)) : F("", !0),
830
+ f.from != null && f.to != null ? (i(), c("span", Hn, "→")) : F("", !0),
831
+ f.to != null ? (i(), c("span", Jn, _(f.toDisplay ?? U(f.to)), 1)) : F("", !0)
818
832
  ]))
819
833
  ], 64))
820
834
  ]))), 128))
821
835
  ])
822
836
  ]))), 128)),
823
- Q.value.length ? E("", !0) : (i(), c("div", Yn, _(L(t)("inventory.changelog.empty")), 1)),
824
- r.value ? (i(), c("div", Wn, [
825
- le(_(s.value.id) + " ", 1),
826
- s.value.parent ? (i(), c("span", Xn, "← " + _(s.value.parent), 1)) : E("", !0)
827
- ])) : E("", !0)
828
- ])) : E("", !0)
829
- ])) : (i(), c("div", pn, _(L(t)("inventory.changelog.empty")), 1));
837
+ Q.value.length ? F("", !0) : (i(), c("div", Yn, _($(t)("inventory.changelog.empty")), 1)),
838
+ r.value ? (i(), c("div", Xn, [
839
+ re(_(s.value.id) + " ", 1),
840
+ s.value.parent ? (i(), c("span", Wn, "← " + _(s.value.parent), 1)) : F("", !0)
841
+ ])) : F("", !0)
842
+ ])) : F("", !0)
843
+ ])) : (i(), c("div", pn, _($(t)("inventory.changelog.empty")), 1));
830
844
  };
831
845
  }
832
846
  }), Qn = { class: "flex flex-col gap-8" }, eo = { class: "flex flex-wrap items-center gap-16" }, to = { class: "fm-typo-en-heading-lg-600" }, no = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, oo = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, ao = { class: "flex flex-wrap items-center gap-12" }, so = { class: "flex shrink-0 items-center gap-8" }, lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = { class: "flex flex-wrap items-center gap-12" }, io = {
@@ -841,131 +855,131 @@ const mn = {
841
855
  modelValue: { type: Boolean }
842
856
  },
843
857
  emits: ["update:modelValue"],
844
- setup(a, { emit: e }) {
845
- const t = a, l = e, s = R({
858
+ setup(o, { emit: e }) {
859
+ const t = o, l = e, s = R({
846
860
  get: () => t.modelValue,
847
861
  set: (n) => l("update:modelValue", n)
848
- }), { t: o } = he(), u = ge(), r = He(), v = Ke(), m = _e(), { breakpoints: h } = Dt(), k = R(() => h.value.xs || h.value.sm), P = R(() => k.value ? "98vw" : "72vw"), { commits: U, isLoading: oe, hasMore: O, load: I, loadMore: Y } = tn();
849
- function S() {
862
+ }), { t: a } = he(), u = ge(), r = He(), v = je(), m = _e(), { breakpoints: h } = Dt(), w = R(() => h.value.xs || h.value.sm), T = R(() => w.value ? "98vw" : "72vw"), { commits: U, isLoading: oe, hasMore: O, load: I, loadMore: Y } = tn();
863
+ function C() {
850
864
  Y().catch((n) => console.error("changelog load more failed", n));
851
865
  }
852
- function T(n) {
866
+ function N(n) {
853
867
  return n ? new Date(n).toLocaleString() : "—";
854
868
  }
855
869
  function G(n) {
856
- return [...n].sort((d, w) => (w.lastUpdate ?? "").localeCompare(d.lastUpdate ?? ""));
870
+ return [...n].sort((d, k) => (k.lastUpdate ?? "").localeCompare(d.lastUpdate ?? ""));
857
871
  }
858
- function j(n, d, w) {
859
- I(n, d, w).catch((A) => console.error("changelog load failed", A));
872
+ function K(n, d, k) {
873
+ I(n, d, k).catch((A) => console.error("changelog load failed", A));
860
874
  }
861
- const Q = $([]);
875
+ const Q = S([]);
862
876
  async function p() {
863
877
  var d;
864
878
  const n = (d = u.currentBusiness.value) == null ? void 0 : d._id;
865
879
  if (n)
866
880
  try {
867
881
  Q.value = await m.listDomains(n);
868
- } catch (w) {
869
- console.error("changelog domain list load failed", w), Q.value = [];
882
+ } catch (k) {
883
+ console.error("changelog domain list load failed", k), Q.value = [];
870
884
  }
871
885
  }
872
886
  const b = R(() => [
873
- { label: o("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
874
- { label: o("inventory.changelog.label.closingDraft"), value: "closingDraft" },
875
- { label: o("inventory.changelog.domainInventory"), value: "inventory" },
876
- ...Q.value.map((n) => ({ label: o(n.labelKey), value: n.domain }))
877
- ]), B = $(b.value[0]), V = R(() => {
887
+ { label: a("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
888
+ { label: a("inventory.changelog.label.closingDraft"), value: "closingDraft" },
889
+ { label: a("inventory.changelog.domainInventory"), value: "inventory" },
890
+ ...Q.value.map((n) => ({ label: a(n.labelKey), value: n.domain }))
891
+ ]), B = S(b.value[0]), V = R(() => {
878
892
  var n;
879
893
  return ((n = B.value) == null ? void 0 : n.value) ?? "purchaseOrder";
880
- }), W = R(
894
+ }), X = R(
881
895
  () => Q.value.some((n) => n.domain === V.value)
882
- ), K = $(!1), C = R(
896
+ ), j = S(!1), L = R(
883
897
  () => ["sku", "recipe", "unit"].map((n) => ({
884
- label: o(Le + n),
898
+ label: a(Le + n),
885
899
  value: n
886
900
  }))
887
- ), y = $(C.value[0]), f = R(() => {
901
+ ), y = S(L.value[0]), f = R(() => {
888
902
  var n;
889
903
  return ((n = y.value) == null ? void 0 : n.value) ?? "sku";
890
- }), F = $(""), x = $(null), N = $(!1), J = R(() => {
891
- var w;
892
- const n = (w = u.currentBusiness.value) == null ? void 0 : w._id, d = r.inventory._id;
904
+ }), E = S(""), x = S(null), P = S(!1), J = R(() => {
905
+ var k;
906
+ const n = (k = u.currentBusiness.value) == null ? void 0 : k._id, d = r.inventory._id;
893
907
  return n && d ? `business_${n}/${d}` : "";
894
908
  }), Z = R(() => {
895
909
  const n = /* @__PURE__ */ new Map(), d = r.inventory;
896
- for (const w of [d.sku, d.recipe, d.unit, d.skuGroup])
897
- for (const A of w ?? [])
910
+ for (const k of [d.sku, d.recipe, d.unit, d.skuGroup])
911
+ for (const A of k ?? [])
898
912
  A._id && A.name && n.set(A._id, A.name);
899
- for (const w of d.unit ?? [])
900
- for (const A of w.measurements ?? []) {
913
+ for (const k of d.unit ?? [])
914
+ for (const A of k.measurements ?? []) {
901
915
  if (!A.id) continue;
902
- const X = A.abbrev || A.name;
903
- if (!X) continue;
904
- const ae = Et.toDouble(A.conversion);
905
- n.set(A.id, ae ? `${X} (1 ${X} = ${ae} ${w.abbrev})` : X);
916
+ const W = A.abbrev || A.name;
917
+ if (!W) continue;
918
+ const ae = Ft.toDouble(A.conversion);
919
+ n.set(A.id, ae ? `${W} (1 ${W} = ${ae} ${k.abbrev})` : W);
906
920
  }
907
921
  return n;
908
- }), ee = (n) => Z.value.get(n), re = $([]), de = $(!1);
909
- async function Pe() {
922
+ }), ee = (n) => Z.value.get(n), ie = S([]), de = S(!1);
923
+ async function Te() {
910
924
  var d;
911
925
  const n = (d = u.currentBusiness.value) == null ? void 0 : d._id;
912
926
  if (n) {
913
927
  de.value = !0;
914
928
  try {
915
- re.value = G(
929
+ ie.value = G(
916
930
  await m.listInventory(n, f.value)
917
931
  );
918
- } catch (w) {
919
- console.error("changelog inventory list load failed", w), re.value = [];
932
+ } catch (k) {
933
+ console.error("changelog inventory list load failed", k), ie.value = [];
920
934
  } finally {
921
935
  de.value = !1;
922
936
  }
923
937
  }
924
938
  }
925
939
  const Qe = R(
926
- () => N.value ? re.value : re.value.filter((n) => !n.deleted)
940
+ () => P.value ? ie.value : ie.value.filter((n) => !n.deleted)
927
941
  ), et = R(() => [
928
- { accessorKey: "id", header: () => o("inventory.closing.draft.table.id"), size: 320 },
942
+ { accessorKey: "id", header: () => a("inventory.closing.draft.table.id"), size: 320 },
929
943
  {
930
944
  id: "name",
931
- header: () => o("inventory.common.name"),
945
+ header: () => a("inventory.common.name"),
932
946
  accessorFn: (n) => n.name,
933
947
  // Deleted records sit in the same list as live ones, so the row says which
934
948
  // it is; nothing else distinguishes them.
935
949
  cell: ({ row: n }) => n.original.deleted ? mt(
936
950
  "span",
937
951
  { "data-deleted": "" },
938
- `${n.original.name} (${o("inventory.changelog.deleted")})`
952
+ `${n.original.name} (${a("inventory.changelog.deleted")})`
939
953
  ) : n.original.name
940
954
  },
941
955
  {
942
956
  id: "lastUpdate",
943
- header: () => o("inventory.changelog.column.lastUpdate"),
957
+ header: () => a("inventory.changelog.column.lastUpdate"),
944
958
  size: 200,
945
959
  // Raw ISO is the sort key — clicking the header on formatted dates would
946
960
  // order them lexicographically by locale string. Formatted only to display.
947
961
  accessorFn: (n) => n.lastUpdate ?? "",
948
- cell: ({ getValue: n }) => T(n() || void 0)
962
+ cell: ({ getValue: n }) => N(n() || void 0)
949
963
  }
950
964
  ]), { commits: tt, load: nt } = on();
951
965
  function ot(n) {
952
- x.value = n, K.value = !0, j(J.value, Ye, Re), n.id && nt(`${J.value}/${f.value}/${n.id}`).catch(
966
+ x.value = n, j.value = !0, K(J.value, Ye, Re), n.id && nt(`${J.value}/${f.value}/${n.id}`).catch(
953
967
  (d) => console.error("changelog per-entity load failed", d)
954
968
  );
955
969
  }
956
970
  function at(n, d) {
957
- const w = We(n.message);
958
- return w && w.labelKey === Le + f.value && w.name === d.name ? !0 : (n.changes ?? []).some((A) => {
959
- const X = ln(A.path);
960
- return X.type === Le + f.value && X.name === d.name;
971
+ const k = Xe(n.message);
972
+ return k && k.labelKey === Le + f.value && k.name === d.name ? !0 : (n.changes ?? []).some((A) => {
973
+ const W = ln(A.path);
974
+ return W.type === Le + f.value && W.name === d.name;
961
975
  });
962
976
  }
963
977
  const st = R(() => {
964
978
  const n = x.value;
965
979
  if (!n) return [];
966
- const d = U.value.filter((w) => at(w, n));
980
+ const d = U.value.filter((k) => at(k, n));
967
981
  return nn(d, tt.value);
968
- }), xe = $([]), be = $(!1), we = $(null);
982
+ }), xe = S([]), be = S(!1), we = S(null);
969
983
  async function lt() {
970
984
  var d;
971
985
  const n = (d = u.currentBusiness.value) == null ? void 0 : d._id;
@@ -975,88 +989,88 @@ const mn = {
975
989
  xe.value = G(
976
990
  await m.listDomainRecords(n, V.value)
977
991
  );
978
- } catch (w) {
979
- console.error("changelog domain records load failed", w), xe.value = [];
992
+ } catch (k) {
993
+ console.error("changelog domain records load failed", k), xe.value = [];
980
994
  } finally {
981
995
  be.value = !1;
982
996
  }
983
997
  }
984
998
  }
985
999
  function rt(n) {
986
- var w;
987
- const d = (w = u.currentBusiness.value) == null ? void 0 : w._id;
988
- d && (we.value = n, K.value = !0, j(`business_${d}/${n.id}`, void 0, Ce));
1000
+ var k;
1001
+ const d = (k = u.currentBusiness.value) == null ? void 0 : k._id;
1002
+ d && (we.value = n, j.value = !0, K(`business_${d}/${n.id}`, void 0, Ce));
989
1003
  }
990
- const ve = $(It()), ye = $([]), ke = $(!1), fe = $(null), Te = R(() => {
1004
+ const ve = S(It()), ye = S([]), ke = S(!1), fe = S(null), Ne = R(() => {
991
1005
  const n = v._currentLocation;
992
1006
  return n ? `${n.name} (${n.doc.profile.code ?? "--"})` : "";
993
1007
  }), Ve = R(() => [
994
- { accessorKey: "id", header: () => o("inventory.closing.draft.table.id"), size: 320 },
1008
+ { accessorKey: "id", header: () => a("inventory.closing.draft.table.id"), size: 320 },
995
1009
  {
996
1010
  accessorKey: "name",
997
- header: () => V.value === "purchaseOrder" ? o("inventory.changelog.column.seq") : o("inventory.common.name"),
1011
+ header: () => V.value === "purchaseOrder" ? a("inventory.changelog.column.seq") : a("inventory.common.name"),
998
1012
  size: 240
999
1013
  },
1000
1014
  {
1001
1015
  id: "lastUpdate",
1002
- header: () => o("inventory.changelog.column.lastUpdate"),
1016
+ header: () => a("inventory.changelog.column.lastUpdate"),
1003
1017
  size: 200,
1004
1018
  // Raw ISO is the sort key; see the note on the inventory table.
1005
1019
  accessorFn: (n) => n.lastUpdate ?? "",
1006
- cell: ({ getValue: n }) => T(n() || void 0)
1020
+ cell: ({ getValue: n }) => N(n() || void 0)
1007
1021
  }
1008
1022
  ]);
1009
1023
  async function Be() {
1010
1024
  var A;
1011
1025
  const n = (A = v._currentLocation) == null ? void 0 : A.dbName;
1012
1026
  if (!n) return;
1013
- const d = Nt(new Date(ve.value.startDate)).toISOString(), w = Pt(new Date(ve.value.endDate)).toISOString();
1027
+ const d = Pt(new Date(ve.value.startDate)).toISOString(), k = Tt(new Date(ve.value.endDate)).toISOString();
1014
1028
  ke.value = !0;
1015
1029
  try {
1016
1030
  ye.value = G(
1017
- V.value === "purchaseOrder" ? await m.listPurchaseOrders(n, d, w) : await m.listClosingDrafts(n, d, w)
1031
+ V.value === "purchaseOrder" ? await m.listPurchaseOrders(n, d, k) : await m.listClosingDrafts(n, d, k)
1018
1032
  );
1019
- } catch (X) {
1020
- console.error("changelog location list load failed", X), ye.value = [];
1033
+ } catch (W) {
1034
+ console.error("changelog location list load failed", W), ye.value = [];
1021
1035
  } finally {
1022
1036
  ke.value = !1;
1023
1037
  }
1024
- fe.value && !ye.value.find((X) => {
1038
+ fe.value && !ye.value.find((W) => {
1025
1039
  var ae;
1026
- return X.id === ((ae = fe.value) == null ? void 0 : ae.id);
1027
- }) && (fe.value = null, j(""));
1040
+ return W.id === ((ae = fe.value) == null ? void 0 : ae.id);
1041
+ }) && (fe.value = null, K(""));
1028
1042
  }
1029
1043
  function it(n) {
1030
- fe.value = n, K.value = !0, j(`${v.currentLocationDBName}/${n.id}`, void 0, Ce);
1044
+ fe.value = n, j.value = !0, K(`${v.currentLocationDBName}/${n.id}`, void 0, Ce);
1031
1045
  }
1032
1046
  const ut = R(() => {
1033
- var n, d, w;
1034
- return V.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : W.value ? ((d = we.value) == null ? void 0 : d.name) ?? "" : ((w = fe.value) == null ? void 0 : w.name) ?? "";
1047
+ var n, d, k;
1048
+ return V.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : X.value ? ((d = we.value) == null ? void 0 : d.name) ?? "" : ((k = fe.value) == null ? void 0 : k.name) ?? "";
1035
1049
  });
1036
1050
  function Ue() {
1037
- K.value = !1, V.value === "inventory" ? (x.value = null, N.value = !1, j(""), Pe().catch(
1051
+ j.value = !1, V.value === "inventory" ? (x.value = null, P.value = !1, K(""), Te().catch(
1038
1052
  (n) => console.error("changelog inventory list failed", n)
1039
- )) : W.value ? (we.value = null, j(""), lt().catch(
1053
+ )) : X.value ? (we.value = null, K(""), lt().catch(
1040
1054
  (n) => console.error("changelog domain records failed", n)
1041
- )) : (fe.value = null, j(""), Be().catch((n) => console.error("changelog location list failed", n)));
1055
+ )) : (fe.value = null, K(""), Be().catch((n) => console.error("changelog location list failed", n)));
1042
1056
  }
1043
1057
  return q(s, (n) => {
1044
1058
  n && (p().catch((d) => console.error("changelog domain list failed", d)), Ue());
1045
1059
  }), q(V, () => {
1046
1060
  s.value && Ue();
1047
1061
  }), q(ve, () => {
1048
- s.value && V.value !== "inventory" && !W.value && Be().catch((n) => console.error("changelog location list failed", n));
1049
- }), q(N, (n) => {
1062
+ s.value && V.value !== "inventory" && !X.value && Be().catch((n) => console.error("changelog location list failed", n));
1063
+ }), q(P, (n) => {
1050
1064
  var d;
1051
- !n && ((d = x.value) != null && d.deleted) && (x.value = null, K.value = !1);
1065
+ !n && ((d = x.value) != null && d.deleted) && (x.value = null, j.value = !1);
1052
1066
  }), q(f, () => {
1053
- x.value = null, K.value = !1, s.value && V.value === "inventory" && Pe().catch(
1067
+ x.value = null, j.value = !1, s.value && V.value === "inventory" && Te().catch(
1054
1068
  (n) => console.error("changelog inventory list failed", n)
1055
1069
  );
1056
1070
  }), q(J, (n) => {
1057
- x.value = null, s.value && V.value === "inventory" && j(n, void 0, Re);
1071
+ x.value = null, s.value && V.value === "inventory" && K(n, void 0, Re);
1058
1072
  }), (n, d) => {
1059
- const w = H("FmButtonGroup"), A = H("FmSearch"), X = H("FmSwitch"), ae = H("FmTable"), Ae = H("FmDialog"), ct = H("FmButton");
1073
+ const k = H("FmButtonGroup"), A = H("FmSearch"), W = H("FmSwitch"), ae = H("FmTable"), Ae = H("FmDialog"), ct = H("FmButton");
1060
1074
  return i(), c(z, null, [
1061
1075
  D(Ae, {
1062
1076
  modelValue: s.value,
@@ -1071,36 +1085,36 @@ const mn = {
1071
1085
  "dialog-header": te(() => [
1072
1086
  g("div", Qn, [
1073
1087
  g("div", eo, [
1074
- g("div", to, _(L(o)("inventory.changelog.title")), 1),
1075
- D(w, {
1088
+ g("div", to, _($(a)("inventory.changelog.title")), 1),
1089
+ D(k, {
1076
1090
  modelValue: B.value,
1077
1091
  "onUpdate:modelValue": d[0] || (d[0] = (M) => B.value = M),
1078
1092
  items: b.value
1079
1093
  }, null, 8, ["modelValue", "items"])
1080
1094
  ]),
1081
- g("div", no, _(L(o)("inventory.changelog.scopeDescription")), 1)
1095
+ g("div", no, _($(a)("inventory.changelog.scopeDescription")), 1)
1082
1096
  ])
1083
1097
  ]),
1084
1098
  default: te(() => [
1085
1099
  g("div", oo, [
1086
1100
  V.value === "inventory" ? (i(), c(z, { key: 0 }, [
1087
1101
  g("div", ao, [
1088
- D(w, {
1102
+ D(k, {
1089
1103
  modelValue: y.value,
1090
1104
  "onUpdate:modelValue": d[1] || (d[1] = (M) => y.value = M),
1091
- items: C.value
1105
+ items: L.value
1092
1106
  }, null, 8, ["modelValue", "items"]),
1093
1107
  D(A, {
1094
- modelValue: F.value,
1095
- "onUpdate:modelValue": d[2] || (d[2] = (M) => F.value = M),
1108
+ modelValue: E.value,
1109
+ "onUpdate:modelValue": d[2] || (d[2] = (M) => E.value = M),
1096
1110
  class: "flex-1",
1097
- placeholder: L(o)("inventory.changelog.searchInventory")
1111
+ placeholder: $(a)("inventory.changelog.searchInventory")
1098
1112
  }, null, 8, ["modelValue", "placeholder"]),
1099
1113
  g("div", so, [
1100
- g("span", lo, _(L(o)("inventory.changelog.includeDeleted")), 1),
1101
- D(X, {
1102
- modelValue: N.value,
1103
- "onUpdate:modelValue": d[3] || (d[3] = (M) => N.value = M)
1114
+ g("span", lo, _($(a)("inventory.changelog.includeDeleted")), 1),
1115
+ D(W, {
1116
+ modelValue: P.value,
1117
+ "onUpdate:modelValue": d[3] || (d[3] = (M) => P.value = M)
1104
1118
  }, null, 8, ["modelValue"])
1105
1119
  ])
1106
1120
  ]),
@@ -1108,12 +1122,12 @@ const mn = {
1108
1122
  class: "min-h-0 flex-1",
1109
1123
  "row-data": Qe.value,
1110
1124
  "column-defs": et.value,
1111
- "search-value": F.value,
1125
+ "search-value": E.value,
1112
1126
  loading: de.value,
1113
1127
  "page-size": 20,
1114
1128
  onRowClick: d[4] || (d[4] = (M) => ot(M.original))
1115
1129
  }, null, 8, ["row-data", "column-defs", "search-value", "loading"])
1116
- ], 64)) : W.value ? (i(), pe(ae, {
1130
+ ], 64)) : X.value ? (i(), pe(ae, {
1117
1131
  key: 1,
1118
1132
  class: "min-h-0 flex-1",
1119
1133
  "row-data": xe.value,
@@ -1123,11 +1137,11 @@ const mn = {
1123
1137
  onRowClick: d[5] || (d[5] = (M) => rt(M.original))
1124
1138
  }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), c(z, { key: 2 }, [
1125
1139
  g("div", ro, [
1126
- D(Ft, {
1140
+ D(Et, {
1127
1141
  modelValue: ve.value,
1128
1142
  "onUpdate:modelValue": d[6] || (d[6] = (M) => ve.value = M)
1129
1143
  }, null, 8, ["modelValue"]),
1130
- Te.value ? (i(), c("span", io, _(Te.value), 1)) : E("", !0)
1144
+ Ne.value ? (i(), c("span", io, _(Ne.value), 1)) : F("", !0)
1131
1145
  ]),
1132
1146
  D(ae, {
1133
1147
  class: "min-h-0 flex-1",
@@ -1143,12 +1157,12 @@ const mn = {
1143
1157
  _: 1
1144
1158
  }, 8, ["modelValue"]),
1145
1159
  D(Ae, {
1146
- modelValue: K.value,
1147
- "onUpdate:modelValue": d[9] || (d[9] = (M) => K.value = M),
1160
+ modelValue: j.value,
1161
+ "onUpdate:modelValue": d[9] || (d[9] = (M) => j.value = M),
1148
1162
  "close-button": "",
1149
1163
  "dismiss-away": "",
1150
- "min-width": P.value,
1151
- "max-width": P.value,
1164
+ "min-width": T.value,
1165
+ "max-width": T.value,
1152
1166
  "max-height": "86vh"
1153
1167
  }, {
1154
1168
  "dialog-header": te(() => [
@@ -1156,103 +1170,100 @@ const mn = {
1156
1170
  ]),
1157
1171
  default: te(() => [
1158
1172
  D(Zn, {
1159
- commits: V.value === "inventory" ? st.value : L(U),
1160
- "is-loading": L(oe),
1173
+ commits: V.value === "inventory" ? st.value : $(U),
1174
+ "is-loading": $(oe),
1161
1175
  "resolve-name": ee
1162
1176
  }, null, 8, ["commits", "is-loading"]),
1163
- V.value !== "inventory" && L(O) ? (i(), c("div", co, [
1177
+ V.value !== "inventory" && $(O) ? (i(), c("div", co, [
1164
1178
  D(ct, {
1165
- label: L(o)("inventory.changelog.loadMore"),
1179
+ label: $(a)("inventory.changelog.loadMore"),
1166
1180
  variant: "secondary",
1167
- disabled: L(oe),
1168
- onClick: S
1181
+ disabled: $(oe),
1182
+ onClick: C
1169
1183
  }, null, 8, ["label", "disabled"])
1170
- ])) : E("", !0)
1184
+ ])) : F("", !0)
1171
1185
  ]),
1172
1186
  _: 1
1173
1187
  }, 8, ["modelValue", "min-width", "max-width"])
1174
1188
  ], 64);
1175
1189
  };
1176
1190
  }
1177
- }), mo = /* @__PURE__ */ Tt(fo, [["__scopeId", "data-v-ae9bd171"]]), po = ["title"], Ge = 48, ie = 8, je = 8, vo = /* @__PURE__ */ ce({
1191
+ }), mo = /* @__PURE__ */ Nt(fo, [["__scopeId", "data-v-ae9bd171"]]), le = 8;
1192
+ function po(o, e) {
1193
+ return { x: le, y: Math.max(le, e - o - le) };
1194
+ }
1195
+ const vo = ["title"], Ke = 48, go = 8, yo = /* @__PURE__ */ ce({
1178
1196
  __name: "ChangelogFloatingButton",
1179
- setup(a) {
1197
+ setup(o) {
1180
1198
  const { t: e } = he(), t = ge(), l = R(() => {
1181
- var S;
1182
- return !!((S = t.sessionUser.value) != null && S.role.isAdmin);
1183
- }), s = $(!1), o = $(null);
1199
+ var C;
1200
+ return !!((C = t.sessionUser.value) != null && C.role.isAdmin);
1201
+ }), s = S(!1), a = S(null);
1184
1202
  function u() {
1185
- var S, T;
1203
+ var C, N;
1186
1204
  return {
1187
- width: ((S = o.value) == null ? void 0 : S.offsetWidth) ?? Ge,
1188
- height: ((T = o.value) == null ? void 0 : T.offsetHeight) ?? Ge
1205
+ width: ((C = a.value) == null ? void 0 : C.offsetWidth) ?? Ke,
1206
+ height: ((N = a.value) == null ? void 0 : N.offsetHeight) ?? Ke
1189
1207
  };
1190
1208
  }
1191
- const r = $({ x: 0, y: 0 });
1192
- function v(S, T, G) {
1193
- return Math.min(Math.max(S, T), G);
1209
+ const r = S({ x: 0, y: 0 });
1210
+ function v(C, N, G) {
1211
+ return Math.min(Math.max(C, N), G);
1194
1212
  }
1195
1213
  function m() {
1196
- const { width: S, height: T } = u(), G = Math.max(ie, window.innerWidth - S - ie - je), j = Math.max(ie, window.innerHeight - T - ie), Q = r.value.x + S / 2;
1214
+ const { width: C, height: N } = u(), G = Math.max(le, window.innerWidth - C - le - go), K = Math.max(le, window.innerHeight - N - le), Q = r.value.x + C / 2;
1197
1215
  r.value = {
1198
- x: Q < window.innerWidth / 2 ? ie : G,
1199
- y: v(r.value.y, ie, j)
1216
+ x: Q < window.innerWidth / 2 ? le : G,
1217
+ y: v(r.value.y, le, K)
1200
1218
  };
1201
1219
  }
1202
1220
  function h() {
1203
- const { width: S } = u();
1204
- r.value = {
1205
- x: window.innerWidth - S - ie - je,
1206
- y: Math.round(window.innerHeight / 2)
1207
- };
1221
+ r.value = po(u().height, window.innerHeight);
1208
1222
  }
1209
- Fe(() => {
1223
+ Ee(() => {
1210
1224
  h(), window.addEventListener("resize", m), window.addEventListener("orientationchange", m);
1211
1225
  }), pt(() => {
1212
1226
  window.removeEventListener("resize", m), window.removeEventListener("orientationchange", m);
1213
- }), q(l, async (S) => {
1214
- S && (await vt(), h());
1227
+ }), q(l, async (C) => {
1228
+ C && (await vt(), h());
1215
1229
  });
1216
- const k = $(!1);
1217
- let P = null, U = !1;
1218
- function oe(S) {
1219
- P = { x: S.clientX, y: S.clientY, px: r.value.x, py: r.value.y }, k.value = !0, U = !1, S.currentTarget.setPointerCapture(S.pointerId);
1230
+ const w = S(!1);
1231
+ let T = null, U = !1;
1232
+ function oe(C) {
1233
+ T = { x: C.clientX, y: C.clientY, px: r.value.x, py: r.value.y }, w.value = !0, U = !1, C.currentTarget.setPointerCapture(C.pointerId);
1220
1234
  }
1221
- function O(S) {
1222
- if (!P) return;
1223
- const T = S.clientX - P.x, G = S.clientY - P.y;
1224
- Math.abs(T) + Math.abs(G) > 3 && (U = !0);
1225
- const { width: j, height: Q } = u();
1235
+ function O(C) {
1236
+ if (!T) return;
1237
+ const N = C.clientX - T.x, G = C.clientY - T.y;
1238
+ Math.abs(N) + Math.abs(G) > 3 && (U = !0);
1239
+ const { width: K, height: Q } = u();
1226
1240
  r.value = {
1227
- x: v(P.px + T, 0, window.innerWidth - j),
1228
- y: v(P.py + G, 0, window.innerHeight - Q)
1241
+ x: v(T.px + N, 0, window.innerWidth - K),
1242
+ y: v(T.py + G, 0, window.innerHeight - Q)
1229
1243
  };
1230
1244
  }
1231
1245
  function I() {
1232
- P = null, k.value = !1, m();
1246
+ T = null, w.value = !1, m();
1233
1247
  }
1234
1248
  function Y() {
1235
- P && (I(), U || (s.value = !0));
1249
+ T && (I(), U || (s.value = !0));
1236
1250
  }
1237
- return (S, T) => {
1251
+ return (C, N) => {
1238
1252
  const G = H("FmIcon");
1239
1253
  return i(), pe(gt, { to: "body" }, [
1240
1254
  l.value ? (i(), c(z, { key: 0 }, [
1241
1255
  g("div", {
1242
1256
  ref_key: "wrapperRef",
1243
- ref: o,
1244
- class: se([
1245
- "fixed z-50 touch-none",
1246
- k.value ? "cursor-grabbing" : "cursor-grab transition-[left,top] duration-200 ease-out"
1247
- ]),
1257
+ ref: a,
1258
+ class: se(["fixed z-50 cursor-grab touch-none", w.value ? "" : "transition-[left,top] duration-200 ease-out"]),
1248
1259
  style: yt({ left: `${r.value.x}px`, top: `${r.value.y}px` })
1249
1260
  }, [
1250
- D(Ne, null, {
1261
+ D(Pe, null, {
1251
1262
  default: te(() => [
1252
1263
  g("button", {
1253
1264
  type: "button",
1254
- title: L(e)("inventory.changelog.title"),
1255
- class: "fm-typo-en-body-sm-600 flex h-48 items-center gap-8 whitespace-nowrap rounded-full border border-gray-200 bg-white px-16 shadow-lg hover:bg-gray-50",
1265
+ title: $(e)("inventory.changelog.title"),
1266
+ class: se(["fm-typo-en-body-sm-600 flex h-48 items-center gap-8 whitespace-nowrap rounded-full border border-gray-200 bg-white px-16 shadow-lg hover:bg-gray-50", w.value ? "cursor-grabbing" : "cursor-grab"]),
1256
1267
  onPointerdown: oe,
1257
1268
  onPointermove: O,
1258
1269
  onPointerup: Y,
@@ -1263,36 +1274,36 @@ const mn = {
1263
1274
  size: "md",
1264
1275
  outline: ""
1265
1276
  }),
1266
- g("span", null, _(L(e)("inventory.changelog.fabLabel")), 1)
1267
- ], 40, po)
1277
+ g("span", null, _($(e)("inventory.changelog.fabLabel")), 1)
1278
+ ], 42, vo)
1268
1279
  ]),
1269
1280
  _: 1
1270
1281
  })
1271
1282
  ], 6),
1272
1283
  D(mo, {
1273
1284
  modelValue: s.value,
1274
- "onUpdate:modelValue": T[0] || (T[0] = (j) => s.value = j)
1285
+ "onUpdate:modelValue": N[0] || (N[0] = (K) => s.value = K)
1275
1286
  }, null, 8, ["modelValue"])
1276
- ], 64)) : E("", !0)
1287
+ ], 64)) : F("", !0)
1277
1288
  ]);
1278
1289
  };
1279
1290
  }
1280
- }), go = { class: "flex items-center gap-2" }, yo = { class: "text-xs text-gray-400 font-normal" }, ho = { class: "flex flex-col gap-3" }, _o = { class: "max-h-[480px] flex flex-col gap-1" }, xo = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, bo = {
1291
+ }), ho = { class: "flex items-center gap-2" }, _o = { class: "text-xs text-gray-400 font-normal" }, xo = { class: "flex flex-col gap-3" }, bo = { class: "max-h-[480px] flex flex-col gap-1" }, wo = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, ko = {
1281
1292
  key: 0,
1282
1293
  class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
1283
- }, wo = {
1294
+ }, So = {
1284
1295
  key: 1,
1285
1296
  class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
1286
- }, ko = {
1297
+ }, $o = {
1287
1298
  key: 2,
1288
1299
  class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
1289
- }, So = {
1300
+ }, Lo = {
1290
1301
  key: 0,
1291
1302
  class: "text-center text-sm text-gray-400 py-4"
1292
- }, $o = /* @__PURE__ */ ce({
1303
+ }, Co = /* @__PURE__ */ ce({
1293
1304
  __name: "FmFeatureFlagDialog",
1294
- setup(a) {
1295
- const e = $(!1), t = $(""), l = R(() => {
1305
+ setup(o) {
1306
+ const e = S(!1), t = S(""), l = R(() => {
1296
1307
  const { getFlagValue: u } = Lt();
1297
1308
  return Object.values(Ct).map((r) => {
1298
1309
  const v = u(r, (m) => m === "true");
@@ -1304,7 +1315,7 @@ const mn = {
1304
1315
  }), s = R(() => {
1305
1316
  const u = t.value.toLowerCase();
1306
1317
  return u ? l.value.filter((r) => r.name.toLowerCase().includes(u)) : l.value;
1307
- }), o = R(() => {
1318
+ }), a = R(() => {
1308
1319
  const u = l.value.filter((m) => m.enabled === !0).length, r = l.value.filter((m) => m.enabled === !1).length, v = l.value.filter((m) => m.enabled === null).length;
1309
1320
  return { enabled: u, disabled: r, unknown: v, total: l.value.length };
1310
1321
  });
@@ -1312,11 +1323,11 @@ const mn = {
1312
1323
  const v = H("FmButton"), m = H("FmSpacer"), h = H("FmDialog");
1313
1324
  return i(), pe(h, {
1314
1325
  modelValue: e.value,
1315
- "onUpdate:modelValue": r[2] || (r[2] = (k) => e.value = k),
1326
+ "onUpdate:modelValue": r[2] || (r[2] = (w) => e.value = w),
1316
1327
  overlay: !0
1317
1328
  }, {
1318
1329
  "dialog-button": te(() => [
1319
- D(Ne, null, {
1330
+ D(Pe, null, {
1320
1331
  default: te(() => [
1321
1332
  D(v, {
1322
1333
  variant: "secondary",
@@ -1327,9 +1338,9 @@ const mn = {
1327
1338
  })
1328
1339
  ]),
1329
1340
  "dialog-header": te(() => [
1330
- g("div", go, [
1341
+ g("div", ho, [
1331
1342
  r[3] || (r[3] = g("span", null, "Feature Flags", -1)),
1332
- g("span", yo, _(o.value.enabled) + " enabled · " + _(o.value.disabled) + " disabled · " + _(o.value.unknown) + " unknown ", 1)
1343
+ g("span", _o, _(a.value.enabled) + " enabled · " + _(a.value.disabled) + " disabled · " + _(a.value.unknown) + " unknown ", 1)
1333
1344
  ])
1334
1345
  ]),
1335
1346
  "dialog-footer": te(() => [
@@ -1339,37 +1350,37 @@ const mn = {
1339
1350
  label: "Close",
1340
1351
  size: "md",
1341
1352
  variant: "primary",
1342
- onClick: r[1] || (r[1] = (k) => e.value = !1)
1353
+ onClick: r[1] || (r[1] = (w) => e.value = !1)
1343
1354
  })
1344
1355
  ]),
1345
1356
  default: te(() => [
1346
- g("div", ho, [
1357
+ g("div", xo, [
1347
1358
  ht(g("input", {
1348
- "onUpdate:modelValue": r[0] || (r[0] = (k) => t.value = k),
1359
+ "onUpdate:modelValue": r[0] || (r[0] = (w) => t.value = w),
1349
1360
  type: "text",
1350
1361
  placeholder: "Search flags...",
1351
1362
  class: "w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500"
1352
1363
  }, null, 512), [
1353
1364
  [_t, t.value]
1354
1365
  ]),
1355
- g("div", _o, [
1356
- (i(!0), c(z, null, ne(s.value, (k) => (i(), c("div", {
1357
- key: k.name,
1366
+ g("div", bo, [
1367
+ (i(!0), c(z, null, ne(s.value, (w) => (i(), c("div", {
1368
+ key: w.name,
1358
1369
  class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
1359
1370
  }, [
1360
- g("span", xo, _(k.name), 1),
1361
- k.enabled === !0 ? (i(), c("span", bo, r[4] || (r[4] = [
1371
+ g("span", wo, _(w.name), 1),
1372
+ w.enabled === !0 ? (i(), c("span", ko, r[4] || (r[4] = [
1362
1373
  g("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
1363
- le(" Enabled ")
1364
- ]))) : k.enabled === !1 ? (i(), c("span", wo, r[5] || (r[5] = [
1374
+ re(" Enabled ")
1375
+ ]))) : w.enabled === !1 ? (i(), c("span", So, r[5] || (r[5] = [
1365
1376
  g("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
1366
- le(" Disabled ")
1367
- ]))) : (i(), c("span", ko, r[6] || (r[6] = [
1377
+ re(" Disabled ")
1378
+ ]))) : (i(), c("span", $o, r[6] || (r[6] = [
1368
1379
  g("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
1369
- le(" Unknown ")
1380
+ re(" Unknown ")
1370
1381
  ])))
1371
1382
  ]))), 128)),
1372
- s.value.length === 0 ? (i(), c("div", So, ' No flags matching "' + _(t.value) + '" ', 1)) : E("", !0)
1383
+ s.value.length === 0 ? (i(), c("div", Lo, ' No flags matching "' + _(t.value) + '" ', 1)) : F("", !0)
1373
1384
  ])
1374
1385
  ])
1375
1386
  ]),
@@ -1377,12 +1388,12 @@ const mn = {
1377
1388
  }, 8, ["modelValue"]);
1378
1389
  };
1379
1390
  }
1380
- }), Lo = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Co = /* @__PURE__ */ ce({
1391
+ }), Ro = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Do = /* @__PURE__ */ ce({
1381
1392
  __name: "NavigationTab",
1382
- setup(a) {
1383
- const e = St(), t = Ee(), l = ge(), s = Vt(), { menuItems: o } = Je();
1384
- q([() => l.currentBusiness.value, () => e.name], ([h, k]) => {
1385
- (h == null ? void 0 : h.menuVersion) === "v3" && (k === ue.INGREDIENTS || k === ue.RECIPE || k === ue.UNIT) && t.push({ name: ue.STOCK });
1393
+ setup(o) {
1394
+ const e = St(), t = Fe(), l = ge(), s = Vt(), { menuItems: a } = Je();
1395
+ q([() => l.currentBusiness.value, () => e.name], ([h, w]) => {
1396
+ (h == null ? void 0 : h.menuVersion) === "v3" && (w === ue.INGREDIENTS || w === ue.RECIPE || w === ue.UNIT) && t.push({ name: ue.STOCK });
1386
1397
  });
1387
1398
  const u = R({
1388
1399
  get() {
@@ -1397,7 +1408,7 @@ const mn = {
1397
1408
  var h;
1398
1409
  return `NavigationTab.${(h = l.currentBusiness.value) == null ? void 0 : h._id}`;
1399
1410
  }
1400
- ), v = $(!1), m = R({
1411
+ ), v = S(!1), m = R({
1401
1412
  get() {
1402
1413
  return v.value;
1403
1414
  },
@@ -1409,44 +1420,44 @@ const mn = {
1409
1420
  v.value = !1, setTimeout(() => {
1410
1421
  m.value = !s.getItem(r.value);
1411
1422
  }, 2e3);
1412
- }), (h, k) => {
1413
- const P = H("FmCollapsibleTabs");
1414
- return i(), c("div", Lo, [
1415
- D($o),
1416
- D(P, {
1423
+ }), (h, w) => {
1424
+ const T = H("FmCollapsibleTabs");
1425
+ return i(), c("div", Ro, [
1426
+ D(Co),
1427
+ D(T, {
1417
1428
  modelValue: u.value,
1418
- "onUpdate:modelValue": k[0] || (k[0] = (U) => u.value = U),
1419
- items: L(o)
1429
+ "onUpdate:modelValue": w[0] || (w[0] = (U) => u.value = U),
1430
+ items: $(a)
1420
1431
  }, null, 8, ["modelValue", "items"])
1421
1432
  ]);
1422
1433
  };
1423
1434
  }
1424
1435
  });
1425
1436
  typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
1426
- let a, e;
1437
+ let o, e;
1427
1438
  return { promise: new Promise((l, s) => {
1428
- a = l, e = s;
1429
- }), resolve: a, reject: e };
1439
+ o = l, e = s;
1440
+ }), resolve: o, reject: e };
1430
1441
  });
1431
- typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(a) {
1432
- return await new Promise((e) => setTimeout(e, a)), Promise.resolve(this);
1442
+ typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(o) {
1443
+ return await new Promise((e) => setTimeout(e, o)), Promise.resolve(this);
1433
1444
  });
1434
- const jo = /* @__PURE__ */ ce({
1445
+ const Ho = /* @__PURE__ */ ce({
1435
1446
  __name: "App",
1436
- setup(a) {
1447
+ setup(o) {
1437
1448
  const e = ge(), t = Bt(), l = kt(), s = window.location.href.includes("print-preview");
1438
- Fe(() => {
1449
+ Ee(() => {
1439
1450
  if (window.location.href.includes("print-preview")) {
1440
1451
  e.setEmbedded(!0), document.body.classList.add("print-mode");
1441
1452
  return;
1442
1453
  }
1443
- e.registerSidebarComponent(Co), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1454
+ e.registerSidebarComponent(Do), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1444
1455
  console.error("Google map cannot be loaded");
1445
1456
  });
1446
1457
  }), q([() => e.currentCountry.value], () => {
1447
- o();
1458
+ a();
1448
1459
  });
1449
- async function o() {
1460
+ async function a() {
1450
1461
  var u;
1451
1462
  try {
1452
1463
  await e.readBusinesses(), e.currentBusiness.value = (u = e.businesses.value) == null ? void 0 : u.find((r) => r);
@@ -1456,10 +1467,10 @@ const jo = /* @__PURE__ */ ce({
1456
1467
  }
1457
1468
  return (u, r) => (i(), c(z, null, [
1458
1469
  D(Qt),
1459
- L(s) ? E("", !0) : (i(), pe(vo, { key: 0 }))
1470
+ $(s) ? F("", !0) : (i(), pe(yo, { key: 0 }))
1460
1471
  ], 64));
1461
1472
  }
1462
1473
  });
1463
1474
  export {
1464
- jo as default
1475
+ Ho as default
1465
1476
  };