{"version":3,"file":"static/js/index.09b451b6.js","sources":["./src/App.tsx","./src/__mocks__/categoriesSidebars/adminMenu.tsx","./src/__mocks__/categoriesSidebars/agentMenu.tsx","./src/__mocks__/categoriesSidebars/index.tsx","./src/__mocks__/categoriesSidebars/moderatorMenu.tsx","./src/__mocks__/categoriesSidebars/superAdminMenu.tsx","./src/__mocks__/categoriesSidebars/supportMenu.tsx","./src/__mocks__/categoriesSidebars/technicalManagerMenu.tsx","./src/__mocks__/supportManagerAdditionalMenu.tsx","./src/api/axios.ts","./src/api/core/ApiError.ts","./src/api/core/AxiosHttpRequest.ts","./src/api/core/BaseHttpRequest.ts","./src/api/core/CancelablePromise.ts","./src/api/core/OpenAPI.ts","./src/api/core/request.ts","./src/api/services/AuthService.ts","./src/api/services/BitrixService.ts","./src/api/services/CategoryService.ts","./src/api/services/CurrencyService.ts","./src/api/services/DiscountService.ts","./src/api/services/ExhibitionService.ts","./src/api/services/ExhibitorService.ts","./src/api/services/GlobalSettingsService.ts","./src/api/services/IteCompanyService.ts","./src/api/services/OrderService.ts","./src/api/services/PriceListItemService.ts","./src/api/services/PriceListService.ts","./src/api/services/ProductService.ts","./src/api/services/SellingOfficeService.ts","./src/api/services/StandService.ts","./src/api/services/UserService.ts","./src/api/setup-openapi.ts","./src/api/typed-axios.ts","./src/components/AdminSearch/AdminSearch.tsx","./src/components/AmountCounter/index.tsx","./src/components/AmountCounter/styled.ts","./src/components/AsyncButton/AsyncButton.tsx","./src/components/BrandBox/BrandBox.tsx","./src/components/Breadcrumbs/Breadcrumbs.tsx","./src/components/Buttons/Button/Button.tsx","./src/components/Buttons/Link/index.tsx","./src/components/Card/Card.tsx","./src/components/Card/ExhibitionCard.tsx","./src/components/Card/ProductCard.tsx","./src/components/Card/TechnicalServiceCard.tsx","./src/components/Content/index.tsx","./src/components/DatePicker/DatePicker.tsx","./src/components/Debug.tsx","./src/components/DevelopmentCard/BuildingCardModal.tsx","./src/components/DevelopmentCard/DevelopmentCard.styled.tsx","./src/components/DevelopmentCard/DevelopmentCard.tsx","./src/components/DownloadFileLink.tsx","./src/components/Fields/Checkbox.tsx","./src/components/Fields/Input.tsx","./src/components/Fields/InputNumber.tsx","./src/components/Fields/Select.tsx","./src/components/FileUpload/FileUpload.tsx","./src/components/FormLabel/FormLabel.tsx","./src/components/Forms/Services/SelectBuilding/getSelectBuildingInfo.tsx","./src/components/Forms/Services/SelectBuilding/index.tsx","./src/components/Forms/Services/ServiceFactory.tsx","./src/components/Forms/Services/TemporaryStaff/Row.tsx","./src/components/Forms/Services/TemporaryStaff/config.ts","./src/components/Forms/Services/TemporaryStaff/index.tsx","./src/components/Forms/Services/common/ProductItemsCard.tsx","./src/components/Forms/Services/common/use-products-loader.ts","./src/components/Forms/Services/defaultConfig.ts","./src/components/Header/Header.tsx","./src/components/Header/headerMenuConfig.tsx","./src/components/Icons/Development.tsx","./src/components/Icons/DraggableHandlerIcon.tsx","./src/components/Icons/Orders.tsx","./src/components/Icons/Users.tsx","./src/components/ImageGalleries/BuildingGallery.tsx","./src/components/ImageGalleries/CommonProductGallery.styled.tsx","./src/components/ImageGalleries/CommonProductGallery.tsx","./src/components/LanguageSwitcher/LanguageSwitcher.tsx","./src/components/Loader/Loader.tsx","./src/components/Menu/Menu.tsx","./src/components/Menu/MenuItem.tsx","./src/components/Modal/Provider.tsx","./src/components/Modal/api.tsx","./src/components/MultiSelect/MultiSelect.tsx","./src/components/OrderBadge.tsx","./src/components/OrderTableRow/OrderTableRow.tsx","./src/components/OrderTableRow/styled.ts","./src/components/Profile/Profile.styled.tsx","./src/components/Profile/Profile.tsx","./src/components/Profile/ProfileMenu.tsx","./src/components/Search/Search.tsx","./src/components/Sidebar/CategoriesSidebar.tsx","./src/components/Sidebar/OrderList/Footer.tsx","./src/components/Sidebar/OrderList/Header.tsx","./src/components/Sidebar/OrderList/OrderItemDependencyWarning.styled.tsx","./src/components/Sidebar/OrderList/OrderItemDependencyWarning.tsx","./src/components/Sidebar/OrderList/OrderList.styled.tsx","./src/components/Sidebar/OrderList/Row.tsx","./src/components/Sidebar/OrderList/index.tsx","./src/components/Sidebar/Sidebar.tsx","./src/components/Table/DraggableTable.tsx","./src/components/Table/Pagination.tsx","./src/components/Table/Table.tsx","./src/components/Table/useTableLoader.ts","./src/components/TechnicalServicesGrid/index.tsx","./src/components/TextArea/TextArea.tsx","./src/components/Timer/Timer.tsx","./src/components/Typography/PageTitle.tsx","./src/constants/admin-pages.ts","./src/constants/categorie.ts","./src/constants/endpoints.ts","./src/constants/languages.ts","./src/constants/order.ts","./src/constants/router.ts","./src/constants/technical-services.ts","./src/features/Routing/RoutesConfig/authRoutesConfig.ts","./src/features/Routing/auth.tsx","./src/features/Routing/guard.ts","./src/features/Routing/protected.tsx","./src/features/Routing/protected/admin-exhibitions.tsx","./src/features/Routing/protected/agent-pages.ts","./src/features/Routing/protected/exhibitions-by-role.tsx","./src/features/Routing/protected/member-directory.tsx","./src/features/Routing/protected/service-dictionary.tsx","./src/features/Routing/protected/settings.tsx","./src/features/Routing/protected/users.tsx","./src/features/Routing/provider.tsx","./src/features/Routing/root.tsx","./src/features/Routing/userPaths.ts","./src/features/feautres/index.ts","./src/features/query/index.ts","./src/features/query/query-options/index.ts","./src/features/rbac/useRBAC.ts","./src/features/sentry.ts","./src/hooks/categoriesConverter/useCategoriesByData.ts","./src/hooks/categoriesConverter/useSubCategoriesByData.ts","./src/hooks/useExhibitionStateReset.ts","./src/hooks/useFormErrorsHandler.ts","./src/hooks/useProductCategory.ts","./src/hooks/useSearchCategoryForProduct.ts","./src/hooks/useStringName.ts","./src/i18n/index.ts","./src/i18n/lang/colors/index.ts","./src/i18n/validate-translations-match.ts","./src/index.tsx","./src/layout/AdminAdditionalPanel/ToExhibition.tsx","./src/layout/AdminPanel/index.tsx","./src/layout/Auth/index.tsx","./src/layout/ConnectedSidebar/ConnectedSidebar.tsx","./src/layout/ConnectedSidebar/SidebarsByPageType/ExhibitionSidebar.tsx","./src/layout/ConnectedSidebar/SidebarsByPageType/SidebarByRole.tsx","./src/layout/Default/Layout.styled.tsx","./src/layout/Default/index.tsx","./src/model/IBaseOrder.ts","./src/model/ICart.ts","./src/model/ICategory.ts","./src/model/IExhibition.ts","./src/model/IExhibition/shema.ts","./src/model/IExhibitionSummary.ts","./src/model/IOrder.ts","./src/model/IOrderItem.ts","./src/model/IProduct.ts","./src/model/IUser.ts","./src/model/Serializable.ts","./src/pages/AdminPanel/Accordion/use-categories-loader.ts","./src/pages/AdminPanel/Accordion/use-categories-order-update.ts","./src/pages/AdminPanel/Accordion/use-products-loader.ts","./src/pages/AdminPanel/Accordion/use-products-order-update.ts","./src/pages/AdminPanel/Accordion/use-sub-categories-order-update.ts","./src/pages/AdminPanel/Exhibitions/EditPriceListItemForm.tsx","./src/pages/AdminPanel/Exhibitions/ExhibitionDescription.tsx","./src/pages/AdminPanel/Exhibitions/Exhibitions.tsx","./src/pages/AdminPanel/Exhibitions/ExhibitionsTabsPage.tsx","./src/pages/AdminPanel/Exhibitions/ImportExhibitionForm.tsx","./src/pages/AdminPanel/Exhibitions/NewExhibition.tsx","./src/pages/AdminPanel/Exhibitions/PriceList.styled.ts","./src/pages/AdminPanel/Exhibitions/PriceLists.tsx","./src/pages/AdminPanel/Exhibitions/TableIncludedPriceListItemsBadge.tsx","./src/pages/AdminPanel/Exhibitions/hooks/use-import-exhibition.tsx","./src/pages/AdminPanel/Exhibitions/types.ts","./src/pages/AdminPanel/MembersDirectory/EditMemberForm.tsx","./src/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers/Actions.tsx","./src/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers/AddNewEmployeeForm.tsx","./src/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers/ManageExhibitorUsers.tsx","./src/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers/hooks/use-save-employee.tsx","./src/pages/AdminPanel/MembersDirectory/MembersDirectory.tsx","./src/pages/AdminPanel/PersonalAccounts/MainInfo.tsx","./src/pages/AdminPanel/PersonalAccounts/MainInfoTab/hooks/use-company-save.ts","./src/pages/AdminPanel/PersonalAccounts/MainInfoTab/hooks/use-search-company-by-employee.ts","./src/pages/AdminPanel/PersonalAccounts/MainInfoTab/styled.ts","./src/pages/AdminPanel/PersonalAccounts/MainInfoTab/types.ts","./src/pages/AdminPanel/PersonalAccounts/Modals/EditManagerModal.tsx","./src/pages/AdminPanel/PersonalAccounts/NewAccount.tsx","./src/pages/AdminPanel/PersonalAccounts/PersonalAccounts.tsx","./src/pages/AdminPanel/PersonalAccounts/PersonalAccountsTabs.tsx","./src/pages/AdminPanel/PersonalAccounts/ProductsTab/ProductsTab.tsx","./src/pages/AdminPanel/PersonalAccounts/StandsTab.tsx","./src/pages/AdminPanel/PersonalAccounts/StandsTab/StandFieldSet.tsx","./src/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/ProjectChangeForm.tsx","./src/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/ProjectImageUploader.tsx","./src/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/StandProjectForm.tsx","./src/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/api.ts","./src/pages/AdminPanel/PersonalAccounts/StandsTab/contsants.ts","./src/pages/AdminPanel/PersonalAccounts/StandsTab/use-save-stand.ts","./src/pages/AdminPanel/PersonalAccounts/SubexponentsTab/SubexponentsTab.tsx","./src/pages/AdminPanel/PersonalAccounts/UsersTab/AddNewEmployeeForm.tsx","./src/pages/AdminPanel/PersonalAccounts/UsersTab/UsersTab.tsx","./src/pages/AdminPanel/PersonalAccounts/UsersTab/UsersTableActions.tsx","./src/pages/AdminPanel/PersonalAccounts/UsersTab/hooks/use-employee-create.tsx","./src/pages/AdminPanel/PersonalAccounts/UsersTab/hooks/use-employee-search.ts","./src/pages/AdminPanel/PersonalAccounts/UsersTab/types.ts","./src/pages/AdminPanel/PersonalAccounts/hooks/use-edit-technical-managers.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/AddItemToOrderModal.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/AddedToOrderItemsTable.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/CreateOrder.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/CreateOrderButton.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/CreateOrderContext.ts","./src/pages/AdminPanel/PlacedOrders/CreateOrder/NoPriceListsLink.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/NoStandsLink.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/OrderControls.tsx","./src/pages/AdminPanel/PlacedOrders/CreateOrder/types.ts","./src/pages/AdminPanel/PlacedOrders/EditOrder/EditOrder.tsx","./src/pages/AdminPanel/PlacedOrders/EditOrder/EditOrderForm.tsx","./src/pages/AdminPanel/PlacedOrders/EditOrder/MarkupManagement/MarkupForm.tsx","./src/pages/AdminPanel/PlacedOrders/EditOrder/MarkupManagement/MarkupManagement.tsx","./src/pages/AdminPanel/PlacedOrders/EditOrder/MarkupManagement/use-order-extra-charge-management.tsx","./src/pages/AdminPanel/PlacedOrders/EditOrder/PersonalDiscount/PersonalDiscount.tsx","./src/pages/AdminPanel/PlacedOrders/EditOrder/PersonalDiscount/PersonalDiscountForm.tsx","./src/pages/AdminPanel/PlacedOrders/EditOrder/hooks/use-send-order-email.tsx","./src/pages/AdminPanel/PlacedOrders/EditStatus.tsx","./src/pages/AdminPanel/PlacedOrders/PlacedOrders.tsx","./src/pages/AdminPanel/PlacedOrders/exportOrderForm.tsx","./src/pages/AdminPanel/PlacedOrders/hooks/use-export-order.tsx","./src/pages/AdminPanel/PlacedOrders/shared/NumberColumnComponent.tsx","./src/pages/AdminPanel/ServiceDirectory/EditCategoryForm/EditCategoryForm.tsx","./src/pages/AdminPanel/ServiceDirectory/EditCategoryForm/use-parent-categories-loader.ts","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/AbstractEditProductDrawerForm.tsx","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditBuildingTypeProduct.tsx","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditDefaultProduct.tsx","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditProductDrawer.tsx","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditTemporaryStaffProduct.tsx","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useCommonProductSave.ts","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm.tsx","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/utils.ts","./src/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/validation-schemas.ts","./src/pages/AdminPanel/ServiceDirectory/EditProductForm/useCommonProductEditLoader.ts","./src/pages/AdminPanel/ServiceDirectory/ImportCSVForm.tsx","./src/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion.tsx","./src/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/CategoryControls.tsx","./src/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/CategoryItem.tsx","./src/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/EditCategoryModalForm.tsx","./src/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/ProductsList.tsx","./src/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/SubCategoriesList.tsx","./src/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/edit-category-api.ts","./src/pages/AdminPanel/ServiceDirectory/types.ts","./src/pages/AdminPanel/Settings/BitrixPassport/BitrixIntegrationPassportTab.tsx","./src/pages/AdminPanel/Settings/BitrixPassport/TableData.ts","./src/pages/AdminPanel/Settings/ChangePassword.tsx","./src/pages/AdminPanel/Settings/Disounts/DiscountsTab.tsx","./src/pages/AdminPanel/Settings/Disounts/EditDiscountModal.tsx","./src/pages/AdminPanel/Settings/LogoTab.tsx","./src/pages/AdminPanel/Settings/ManualUploaderTab.tsx","./src/pages/AdminPanel/Settings/Settings.tsx","./src/pages/AdminPanel/Settings/SettingsPage.tsx","./src/pages/AdminPanel/UsersTable/NewUsers/NewUser.tsx","./src/pages/AdminPanel/UsersTable/NewUsers/NewUsersForm.tsx","./src/pages/AdminPanel/UsersTable/UsersTable.tsx","./src/pages/AgentHome/AgentHome.tsx","./src/pages/Cart/CartTotal.tsx","./src/pages/Cart/OrderComments/ExtendedStandOrderCommentsForm.tsx","./src/pages/Cart/OrderComments/SpaceOnlyStandOrderCommentsForm.tsx","./src/pages/Cart/index.tsx","./src/pages/Cart/styled.tsx","./src/pages/ConfirmModal.tsx","./src/pages/Exhibition/DeleteModal.tsx","./src/pages/Exhibition/Exhibition.styled.tsx","./src/pages/Exhibition/FilesStorage/FilesStorage.tsx","./src/pages/Exhibition/FilesStorage/filesStorageApi.ts","./src/pages/Exhibition/index.tsx","./src/pages/Exhibition/orderTranscriptTableColumns.tsx","./src/pages/Exhibition/shared/StandDescription.tsx","./src/pages/Exhibition/useEditOrderLoader.ts","./src/pages/Exhibition/useGetOrderItems.ts","./src/pages/LoginPage/index.tsx","./src/pages/Order/Categories.tsx","./src/pages/Order/Service.tsx","./src/pages/Profile/ExhibitionsList.tsx","./src/pages/Profile/ExhibitionsTabs.tsx","./src/pages/Profile/Profile.tsx","./src/pages/Profile/hooks/use-exhibition-detailed-preload.ts","./src/pages/Profile/hooks/use-exhibition-loader.ts","./src/pages/StandProject/StandProject.tsx","./src/pages/StandProject/StandProjectDescription/AttachmentUploader.tsx","./src/pages/StandProject/StandProjectDescription/CommentForm.tsx","./src/pages/StandProject/StandProjectDescription/CommentsHistory.tsx","./src/pages/StandProject/StandProjectDescription/HistoryItem.tsx","./src/pages/StandProject/StandProjectDescription/ProjectDescription.tsx","./src/pages/StandProject/StandProjectDescription/StandProjectDescription.tsx","./src/pages/StandProject/StandProjectImage/StandProjectImage.styled.tsx","./src/pages/StandProject/StandProjectImage/StandProjectImage.tsx","./src/pages/VerifyEmailPage/index.tsx","./src/pages/common/Auth.styled.tsx","./src/store/effector/auth.ts","./src/store/effector/catalog-gate.tsx","./src/store/effector/catalog.ts","./src/store/effector/cleanup.ts","./src/store/effector/common.ts","./src/store/effector/exhibition.ts","./src/store/effector/init.ts","./src/store/effector/loading.ts","./src/store/effector/logger.ts","./src/store/effector/order-completeness.ts","./src/store/effector/order.ts","./src/store/effector/stand.ts","./src/store/effector/vat-settings.ts","./src/theme/css/styles.tsx","./src/theme/default/Globals.tsx","./src/theme/default/index.ts","./src/utils/amountTransformation.ts","./src/utils/attempt.ts","./src/utils/breadcrumbs.ts","./src/utils/constants.ts","./src/utils/date-utils.ts","./src/utils/draggable-utils.ts","./src/utils/exhibition-utils.ts","./src/utils/fetchAPI.ts","./src/utils/file-utils.ts","./src/utils/form-options-as-values.ts","./src/utils/is-nil.ts","./src/utils/is-option.ts","./src/utils/math-utils.ts","./src/utils/product-utils.ts","./src/utils/route.ts","./src/utils/typed-object-keys.ts","./src/utils/url-utils.ts","./src/utils/url.ts"],"sourcesContent":["import { ChakraProvider } from '@chakra-ui/react';\nimport 'simplebar-react/dist/simplebar.min.css';\nimport { RouterProvider } from '@/features/Routing/provider';\nimport DEFAULT_THEME from './theme/default/index';\nimport 'react-toastify/dist/ReactToastify.css';\nimport { ToastContainer } from 'react-toastify';\nimport { ModalFactoryProvider } from './components/Modal/Provider';\nimport { GlobalStyles } from '@/theme/default/Globals';\n\nfunction App(): JSX.Element {\n  return (\n    <ChakraProvider theme={DEFAULT_THEME}>\n      <GlobalStyles />\n      <RouterProvider />\n      <ToastContainer />\n      <ModalFactoryProvider />\n    </ChakraProvider>\n  );\n}\n\nexport default App;\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport DevelopmentIcon from '@/components/Icons/Development';\nimport { Category } from '@/model/ICategory';\nimport { CREATE_USER, SETTINGS } from '@/constants/technical-services';\nimport i18n from '@/i18n';\n\nconst adminMenu = () => {\n  const settings = new Category({\n    id: SETTINGS,\n    name: SETTINGS,\n    displayName: i18n.t(SETTINGS),\n  });\n  const createUser = new Category({\n    id: CREATE_USER,\n    name: CREATE_USER,\n    displayName: i18n.t(CREATE_USER),\n  });\n\n  return [\n    {\n      category: createUser,\n      image: <DevelopmentIcon />,\n    },\n    {\n      category: settings,\n      image: <DevelopmentIcon />,\n    },\n  ] as ITechnicalService[];\n};\n\nexport default adminMenu;\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport DevelopmentIcon from '@/components/Icons/Development';\nimport { Category } from '@/model/ICategory';\nimport { EXHIBITIONS } from '@/constants/technical-services';\nimport i18n from '@/i18n';\n\nexport const agentMenu = () => {\n  const exhibitions = new Category({\n    id: EXHIBITIONS,\n    name: EXHIBITIONS,\n    displayName: i18n.t(EXHIBITIONS),\n  });\n\n  return [\n    {\n      category: exhibitions,\n      image: <DevelopmentIcon />,\n    },\n  ] as ITechnicalService[];\n};\n","import superAdminMenu from '@/__mocks__/categoriesSidebars/superAdminMenu';\nimport adminMenu from '@/__mocks__/categoriesSidebars/adminMenu';\nimport supportMenu from '@/__mocks__/categoriesSidebars/supportMenu';\nimport technicalManagerMenu from '@/__mocks__/categoriesSidebars/technicalManagerMenu';\nimport moderatorMenu from '@/__mocks__/categoriesSidebars/moderatorMenu';\nimport { User } from '@/model/IUser';\nimport { agentMenu } from '@/__mocks__/categoriesSidebars/agentMenu';\n\nexport const getCategoriesByRole = (user: User) => {\n  switch (true) {\n    case user.isAgent:\n      return agentMenu();\n    case user.isSuperAdmin:\n      return superAdminMenu();\n    case user.isAdmin:\n      return adminMenu();\n    case user.isSupportManager:\n      return supportMenu();\n    case user.isTechnicalManager:\n      return technicalManagerMenu();\n    case user.isModerator:\n      return moderatorMenu();\n    default:\n      return [];\n  }\n};\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport DevelopmentIcon from '@/components/Icons/Development';\nimport { Category } from '@/model/ICategory';\nimport { EXHIBITIONS } from '@/constants/technical-services';\nimport i18n from '@/i18n';\n\nconst moderatorMenu = () => {\n  const exhibitions = new Category({\n    id: EXHIBITIONS,\n    name: EXHIBITIONS,\n    displayName: i18n.t(EXHIBITIONS),\n  });\n\n  return [\n    {\n      category: exhibitions,\n      image: <DevelopmentIcon />,\n    },\n  ] as ITechnicalService[];\n};\n\nexport default moderatorMenu;\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport DevelopmentIcon from '@/components/Icons/Development';\nimport { Category } from '@/model/ICategory';\nimport {\n  CREATE_USER,\n  EXHIBITIONS,\n  MEMBER_DIRECTORY,\n  SERVICE_DICTIONARY,\n  SETTINGS,\n} from '@/constants/technical-services';\nimport i18n from '@/i18n';\n\nconst superAdminMenu = () => {\n  const exhibitions = new Category({\n    id: EXHIBITIONS,\n    name: EXHIBITIONS,\n    displayName: i18n.t(EXHIBITIONS),\n  });\n  const serviceDirectory = new Category({\n    id: SERVICE_DICTIONARY,\n    name: SERVICE_DICTIONARY,\n    displayName: i18n.t(SERVICE_DICTIONARY),\n  });\n  const memberDirectory = new Category({\n    id: MEMBER_DIRECTORY,\n    name: MEMBER_DIRECTORY,\n    displayName: i18n.t(MEMBER_DIRECTORY),\n  });\n  const settings = new Category({\n    id: SETTINGS,\n    name: SETTINGS,\n    displayName: i18n.t(SETTINGS),\n  });\n  const createUser = new Category({\n    id: CREATE_USER,\n    name: CREATE_USER,\n    displayName: i18n.t(CREATE_USER),\n  });\n\n  return [\n    {\n      category: exhibitions,\n      image: <DevelopmentIcon />,\n    },\n    {\n      category: serviceDirectory,\n      image: <DevelopmentIcon />,\n    },\n    {\n      category: memberDirectory,\n      image: <DevelopmentIcon />,\n    },\n    {\n      category: settings,\n      image: <DevelopmentIcon />,\n    },\n    {\n      category: createUser,\n      image: <DevelopmentIcon />,\n    },\n  ] as ITechnicalService[];\n};\n\nexport default superAdminMenu;\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport DevelopmentIcon from '@/components/Icons/Development';\nimport { Category } from '@/model/ICategory';\nimport {\n  EXHIBITIONS,\n  MEMBER_DIRECTORY,\n  SERVICE_DICTIONARY,\n} from '@/constants/technical-services';\nimport i18n from '@/i18n';\n\nconst supportMenu = () => {\n  const exhibitions = new Category({\n    id: EXHIBITIONS,\n    name: EXHIBITIONS,\n    displayName: i18n.t(EXHIBITIONS),\n  });\n  const serviceDirectory = new Category({\n    id: SERVICE_DICTIONARY,\n    name: SERVICE_DICTIONARY,\n    displayName: i18n.t(SERVICE_DICTIONARY),\n  });\n  const memberDirectory = new Category({\n    id: MEMBER_DIRECTORY,\n    name: MEMBER_DIRECTORY,\n    displayName: i18n.t(MEMBER_DIRECTORY),\n  });\n\n  return [\n    {\n      category: exhibitions,\n      image: <DevelopmentIcon />,\n    },\n    {\n      category: serviceDirectory,\n      image: <DevelopmentIcon />,\n    },\n    {\n      category: memberDirectory,\n      image: <DevelopmentIcon />,\n    },\n  ] as ITechnicalService[];\n};\n\nexport default supportMenu;\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport DevelopmentIcon from '@/components/Icons/Development';\nimport { Category } from '@/model/ICategory';\nimport { EXHIBITIONS } from '@/constants/technical-services';\nimport i18n from '@/i18n';\n\nconst technicalManagerMenu = () => {\n  const exhibitions = new Category({\n    id: EXHIBITIONS,\n    name: EXHIBITIONS,\n    displayName: i18n.t(EXHIBITIONS),\n  });\n\n  return [\n    {\n      category: exhibitions,\n      image: <DevelopmentIcon />,\n    },\n  ] as ITechnicalService[];\n};\n\nexport default technicalManagerMenu;\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport DevelopmentIcon from '@/components/Icons/Development';\nimport { Category } from '@/model/ICategory';\nimport {\n  PERSONAL_ACCOUNTS,\n  PLACED_ORDERS,\n} from '@/constants/technical-services';\nimport { IdType } from '@/model/common';\nimport { checkRBACRule } from '@/features/rbac/useRBAC';\nimport { $auth } from '@/store/effector/auth';\n\nconst supportManagerAdditionalMenu = (exhibitionId: IdType, t: any) => {\n  const canManagePersonalAccounts = checkRBACRule($auth.getState().user)(\n    'canAccessExhibitionPersonalAccounts'\n  );\n\n  const menuItems: ITechnicalService[] = [];\n\n  if (canManagePersonalAccounts) {\n    menuItems.push({\n      category: new Category({\n        id: PERSONAL_ACCOUNTS,\n        name: PERSONAL_ACCOUNTS,\n        displayName: t(PERSONAL_ACCOUNTS),\n\n        resolveUrl: () => {\n          return `/admin/exhibitions/${exhibitionId}/view/personal-accounts`;\n        },\n      }),\n      image: <DevelopmentIcon />,\n    });\n  }\n\n  menuItems.push({\n    category: new Category({\n      id: PLACED_ORDERS,\n      name: PLACED_ORDERS,\n      displayName: t(PLACED_ORDERS),\n\n      resolveUrl: () => {\n        return `/admin/exhibitions/${exhibitionId}/view/placed-orders`;\n      },\n    }),\n    image: <DevelopmentIcon />,\n  });\n\n  return menuItems;\n};\n\nexport default supportManagerAdditionalMenu;\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { BaseHttpRequest } from './core/BaseHttpRequest';\nimport type { OpenAPIConfig } from './core/OpenAPI';\nimport { AxiosHttpRequest } from './core/AxiosHttpRequest';\n\nimport { AuthService } from './services/AuthService';\nimport { BitrixService } from './services/BitrixService';\nimport { CategoryService } from './services/CategoryService';\nimport { CurrencyService } from './services/CurrencyService';\nimport { DiscountService } from './services/DiscountService';\nimport { ExhibitionService } from './services/ExhibitionService';\nimport { ExhibitorService } from './services/ExhibitorService';\nimport { GlobalSettingsService } from './services/GlobalSettingsService';\nimport { IteCompanyService } from './services/IteCompanyService';\nimport { OrderService } from './services/OrderService';\nimport { PriceListService } from './services/PriceListService';\nimport { PriceListItemService } from './services/PriceListItemService';\nimport { ProductService } from './services/ProductService';\nimport { SellingOfficeService } from './services/SellingOfficeService';\nimport { StandService } from './services/StandService';\nimport { UserService } from './services/UserService';\n\ntype HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;\n\nexport class axios {\n\n    public readonly auth: AuthService;\n    public readonly bitrix: BitrixService;\n    public readonly category: CategoryService;\n    public readonly currency: CurrencyService;\n    public readonly discount: DiscountService;\n    public readonly exhibition: ExhibitionService;\n    public readonly exhibitor: ExhibitorService;\n    public readonly globalSettings: GlobalSettingsService;\n    public readonly iteCompany: IteCompanyService;\n    public readonly order: OrderService;\n    public readonly priceList: PriceListService;\n    public readonly priceListItem: PriceListItemService;\n    public readonly product: ProductService;\n    public readonly sellingOffice: SellingOfficeService;\n    public readonly stand: StandService;\n    public readonly user: UserService;\n\n    public readonly request: BaseHttpRequest;\n\n    constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = AxiosHttpRequest) {\n        this.request = new HttpRequest({\n            BASE: config?.BASE ?? '',\n            VERSION: config?.VERSION ?? '1',\n            WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,\n            CREDENTIALS: config?.CREDENTIALS ?? 'include',\n            TOKEN: config?.TOKEN,\n            USERNAME: config?.USERNAME,\n            PASSWORD: config?.PASSWORD,\n            HEADERS: config?.HEADERS,\n            ENCODE_PATH: config?.ENCODE_PATH,\n        });\n\n        this.auth = new AuthService(this.request);\n        this.bitrix = new BitrixService(this.request);\n        this.category = new CategoryService(this.request);\n        this.currency = new CurrencyService(this.request);\n        this.discount = new DiscountService(this.request);\n        this.exhibition = new ExhibitionService(this.request);\n        this.exhibitor = new ExhibitorService(this.request);\n        this.globalSettings = new GlobalSettingsService(this.request);\n        this.iteCompany = new IteCompanyService(this.request);\n        this.order = new OrderService(this.request);\n        this.priceList = new PriceListService(this.request);\n        this.priceListItem = new PriceListItemService(this.request);\n        this.product = new ProductService(this.request);\n        this.sellingOffice = new SellingOfficeService(this.request);\n        this.stand = new StandService(this.request);\n        this.user = new UserService(this.request);\n    }\n}\n\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n    public readonly url: string;\n    public readonly status: number;\n    public readonly statusText: string;\n    public readonly body: any;\n    public readonly request: ApiRequestOptions;\n\n    constructor(request: ApiRequestOptions, response: ApiResult, message: string) {\n        super(message);\n\n        this.name = 'ApiError';\n        this.url = response.url;\n        this.status = response.status;\n        this.statusText = response.statusText;\n        this.body = response.body;\n        this.request = request;\n    }\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport { BaseHttpRequest } from './BaseHttpRequest';\nimport type { CancelablePromise } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\nimport { request as __request } from './request';\n\nexport class AxiosHttpRequest extends BaseHttpRequest {\n\n    constructor(config: OpenAPIConfig) {\n        super(config);\n    }\n\n    /**\n     * Request method\n     * @param options The request options from the service\n     * @returns CancelablePromise<T>\n     * @throws ApiError\n     */\n    public override request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n        return __request(this.config, options);\n    }\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { CancelablePromise } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\nexport abstract class BaseHttpRequest {\n\n    constructor(public readonly config: OpenAPIConfig) {}\n\n    public abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport class CancelError extends Error {\n\n    constructor(message: string) {\n        super(message);\n        this.name = 'CancelError';\n    }\n\n    public get isCancelled(): boolean {\n        return true;\n    }\n}\n\nexport interface OnCancel {\n    readonly isResolved: boolean;\n    readonly isRejected: boolean;\n    readonly isCancelled: boolean;\n\n    (cancelHandler: () => void): void;\n}\n\nexport class CancelablePromise<T> implements Promise<T> {\n    #isResolved: boolean;\n    #isRejected: boolean;\n    #isCancelled: boolean;\n    readonly #cancelHandlers: (() => void)[];\n    readonly #promise: Promise<T>;\n    #resolve?: (value: T | PromiseLike<T>) => void;\n    #reject?: (reason?: any) => void;\n\n    constructor(\n        executor: (\n            resolve: (value: T | PromiseLike<T>) => void,\n            reject: (reason?: any) => void,\n            onCancel: OnCancel\n        ) => void\n    ) {\n        this.#isResolved = false;\n        this.#isRejected = false;\n        this.#isCancelled = false;\n        this.#cancelHandlers = [];\n        this.#promise = new Promise<T>((resolve, reject) => {\n            this.#resolve = resolve;\n            this.#reject = reject;\n\n            const onResolve = (value: T | PromiseLike<T>): void => {\n                if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n                    return;\n                }\n                this.#isResolved = true;\n                this.#resolve?.(value);\n            };\n\n            const onReject = (reason?: any): void => {\n                if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n                    return;\n                }\n                this.#isRejected = true;\n                this.#reject?.(reason);\n            };\n\n            const onCancel = (cancelHandler: () => void): void => {\n                if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n                    return;\n                }\n                this.#cancelHandlers.push(cancelHandler);\n            };\n\n            Object.defineProperty(onCancel, 'isResolved', {\n                get: (): boolean => this.#isResolved,\n            });\n\n            Object.defineProperty(onCancel, 'isRejected', {\n                get: (): boolean => this.#isRejected,\n            });\n\n            Object.defineProperty(onCancel, 'isCancelled', {\n                get: (): boolean => this.#isCancelled,\n            });\n\n            return executor(onResolve, onReject, onCancel as OnCancel);\n        });\n    }\n\n     get [Symbol.toStringTag]() {\n            return \"Cancellable Promise\";\n     }\n\n    public then<TResult1 = T, TResult2 = never>(\n        onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n        onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null\n    ): Promise<TResult1 | TResult2> {\n        return this.#promise.then(onFulfilled, onRejected);\n    }\n\n    public catch<TResult = never>(\n        onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null\n    ): Promise<T | TResult> {\n        return this.#promise.catch(onRejected);\n    }\n\n    public finally(onFinally?: (() => void) | null): Promise<T> {\n        return this.#promise.finally(onFinally);\n    }\n\n    public cancel(): void {\n        if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n            return;\n        }\n        this.#isCancelled = true;\n        if (this.#cancelHandlers.length) {\n            try {\n                for (const cancelHandler of this.#cancelHandlers) {\n                    cancelHandler();\n                }\n            } catch (error) {\n                console.warn('Cancellation threw an error', error);\n                return;\n            }\n        }\n        this.#cancelHandlers.length = 0;\n        this.#reject?.(new CancelError('Request aborted'));\n    }\n\n    public get isCancelled(): boolean {\n        return this.#isCancelled;\n    }\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\nexport type OpenAPIConfig = {\n    BASE: string;\n    VERSION: string;\n    WITH_CREDENTIALS: boolean;\n    CREDENTIALS: 'include' | 'omit' | 'same-origin';\n    TOKEN?: string | Resolver<string> | undefined;\n    USERNAME?: string | Resolver<string> | undefined;\n    PASSWORD?: string | Resolver<string> | undefined;\n    HEADERS?: Headers | Resolver<Headers> | undefined;\n    ENCODE_PATH?: ((path: string) => string) | undefined;\n};\n\nexport const OpenAPI: OpenAPIConfig = {\n    BASE: '',\n    VERSION: '1',\n    WITH_CREDENTIALS: false,\n    CREDENTIALS: 'include',\n    TOKEN: undefined,\n    USERNAME: undefined,\n    PASSWORD: undefined,\n    HEADERS: undefined,\n    ENCODE_PATH: undefined,\n};\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport axios from 'axios';\nimport type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';\nimport FormData from 'form-data';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\nexport const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {\n    return value !== undefined && value !== null;\n};\n\nexport const isString = (value: any): value is string => {\n    return typeof value === 'string';\n};\n\nexport const isStringWithValue = (value: any): value is string => {\n    return isString(value) && value !== '';\n};\n\nexport const isBlob = (value: any): value is Blob => {\n    return (\n        typeof value === 'object' &&\n        typeof value.type === 'string' &&\n        typeof value.stream === 'function' &&\n        typeof value.arrayBuffer === 'function' &&\n        typeof value.constructor === 'function' &&\n        typeof value.constructor.name === 'string' &&\n        /^(Blob|File)$/.test(value.constructor.name) &&\n        /^(Blob|File)$/.test(value[Symbol.toStringTag])\n    );\n};\n\nexport const isFormData = (value: any): value is FormData => {\n    return value instanceof FormData;\n};\n\nexport const isSuccess = (status: number): boolean => {\n    return status >= 200 && status < 300;\n};\n\nexport const base64 = (str: string): string => {\n    try {\n        return btoa(str);\n    } catch (err) {\n        // @ts-ignore\n        return Buffer.from(str).toString('base64');\n    }\n};\n\nexport const getQueryString = (params: Record<string, any>): string => {\n    const qs: string[] = [];\n\n    const append = (key: string, value: any) => {\n        qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n    };\n\n    const process = (key: string, value: any) => {\n        if (isDefined(value)) {\n            if (Array.isArray(value)) {\n                value.forEach(v => {\n                    process(key, v);\n                });\n            } else if (typeof value === 'object') {\n                Object.entries(value).forEach(([k, v]) => {\n                    process(`${key}[${k}]`, v);\n                });\n            } else {\n                append(key, value);\n            }\n        }\n    };\n\n    Object.entries(params).forEach(([key, value]) => {\n        process(key, value);\n    });\n\n    if (qs.length > 0) {\n        return `?${qs.join('&')}`;\n    }\n\n    return '';\n};\n\nconst getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {\n    const encoder = config.ENCODE_PATH || encodeURI;\n\n    const path = options.url\n        .replace('{api-version}', config.VERSION)\n        .replace(/{(.*?)}/g, (substring: string, group: string) => {\n            if (options.path?.hasOwnProperty(group)) {\n                return encoder(String(options.path[group]));\n            }\n            return substring;\n        });\n\n    const url = `${config.BASE}${path}`;\n    if (options.query) {\n        return `${url}${getQueryString(options.query)}`;\n    }\n    return url;\n};\n\nexport const getFormData = (options: ApiRequestOptions): FormData | undefined => {\n    if (options.formData) {\n        const formData = new FormData();\n\n        const process = (key: string, value: any) => {\n            if (isString(value) || isBlob(value)) {\n                formData.append(key, value);\n            } else {\n                formData.append(key, JSON.stringify(value));\n            }\n        };\n\n        Object.entries(options.formData)\n            .filter(([_, value]) => isDefined(value))\n            .forEach(([key, value]) => {\n                if (Array.isArray(value)) {\n                    value.forEach(v => process(key, v));\n                } else {\n                    process(key, value);\n                }\n            });\n\n        return formData;\n    }\n    return undefined;\n};\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nexport const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {\n    if (typeof resolver === 'function') {\n        return (resolver as Resolver<T>)(options);\n    }\n    return resolver;\n};\n\nexport const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData): Promise<Record<string, string>> => {\n    const token = await resolve(options, config.TOKEN);\n    const username = await resolve(options, config.USERNAME);\n    const password = await resolve(options, config.PASSWORD);\n    const additionalHeaders = await resolve(options, config.HEADERS);\n    const formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {}\n\n    const headers = Object.entries({\n        Accept: 'application/json',\n        ...additionalHeaders,\n        ...options.headers,\n        ...formHeaders,\n    })\n    .filter(([_, value]) => isDefined(value))\n    .reduce((headers, [key, value]) => ({\n        ...headers,\n        [key]: String(value),\n    }), {} as Record<string, string>);\n\n    if (isStringWithValue(token)) {\n        headers['Authorization'] = `Bearer ${token}`;\n    }\n\n    if (isStringWithValue(username) && isStringWithValue(password)) {\n        const credentials = base64(`${username}:${password}`);\n        headers['Authorization'] = `Basic ${credentials}`;\n    }\n\n    if (options.body) {\n        if (options.mediaType) {\n            headers['Content-Type'] = options.mediaType;\n        } else if (isBlob(options.body)) {\n            headers['Content-Type'] = options.body.type || 'application/octet-stream';\n        } else if (isString(options.body)) {\n            headers['Content-Type'] = 'text/plain';\n        } else if (!isFormData(options.body)) {\n            headers['Content-Type'] = 'application/json';\n        }\n    }\n\n    return headers;\n};\n\nexport const getRequestBody = (options: ApiRequestOptions): any => {\n    if (options.body) {\n        return options.body;\n    }\n    return undefined;\n};\n\nexport const sendRequest = async <T>(\n    config: OpenAPIConfig,\n    options: ApiRequestOptions,\n    url: string,\n    body: any,\n    formData: FormData | undefined,\n    headers: Record<string, string>,\n    onCancel: OnCancel,\n    axiosClient: AxiosInstance\n): Promise<AxiosResponse<T>> => {\n    const source = axios.CancelToken.source();\n\n    const requestConfig: AxiosRequestConfig = {\n        url,\n        headers,\n        data: body ?? formData,\n        method: options.method,\n        withCredentials: config.WITH_CREDENTIALS,\n        cancelToken: source.token,\n    };\n\n    onCancel(() => source.cancel('The user aborted a request.'));\n\n    try {\n        return await axiosClient.request(requestConfig);\n    } catch (error) {\n        const axiosError = error as AxiosError<T>;\n        if (axiosError.response) {\n            return axiosError.response;\n        }\n        throw error;\n    }\n};\n\nexport const getResponseHeader = (response: AxiosResponse<any>, responseHeader?: string): string | undefined => {\n    if (responseHeader) {\n        const content = response.headers[responseHeader];\n        if (isString(content)) {\n            return content;\n        }\n    }\n    return undefined;\n};\n\nexport const getResponseBody = (response: AxiosResponse<any>): any => {\n    if (response.status !== 204) {\n        return response.data;\n    }\n    return undefined;\n};\n\nexport const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {\n    const errors: Record<number, string> = {\n        400: 'Bad Request',\n        401: 'Unauthorized',\n        403: 'Forbidden',\n        404: 'Not Found',\n        500: 'Internal Server Error',\n        502: 'Bad Gateway',\n        503: 'Service Unavailable',\n        ...options.errors,\n    }\n\n    const error = errors[result.status];\n    if (error) {\n        throw new ApiError(options, result, error);\n    }\n\n    if (!result.ok) {\n        const errorStatus = result.status ?? 'unknown';\n        const errorStatusText = result.statusText ?? 'unknown';\n        const errorBody = (() => {\n            try {\n                return JSON.stringify(result.body, null, 2);\n            } catch (e) {\n                return undefined;\n            }\n        })();\n\n        throw new ApiError(options, result,\n            `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`\n        );\n    }\n};\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @param axiosClient The axios client instance to use\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions, axiosClient: AxiosInstance = axios): CancelablePromise<T> => {\n    return new CancelablePromise(async (resolve, reject, onCancel) => {\n        try {\n            const url = getUrl(config, options);\n            const formData = getFormData(options);\n            const body = getRequestBody(options);\n            const headers = await getHeaders(config, options, formData);\n\n            if (!onCancel.isCancelled) {\n                const response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel, axiosClient);\n                const responseBody = getResponseBody(response);\n                const responseHeader = getResponseHeader(response, options.responseHeader);\n\n                const result: ApiResult = {\n                    url,\n                    ok: isSuccess(response.status),\n                    status: response.status,\n                    statusText: response.statusText,\n                    body: responseHeader ?? responseBody,\n                };\n\n                catchErrorCodes(options, result);\n\n                resolve(result.body);\n            }\n        } catch (error) {\n            reject(error);\n        }\n    });\n};\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { WebApi_ViewModels_Auth_Login } from '../models/WebApi_ViewModels_Auth_Login';\nimport type { WebApi_ViewModels_Login_AuthCodeRequest } from '../models/WebApi_ViewModels_Login_AuthCodeRequest';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class AuthService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns any Created\n     * @throws ApiError\n     */\n    public postAuthEmail({\n        requestBody,\n    }: {\n        requestBody?: WebApi_ViewModels_Auth_Login,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/auth/email',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postAuthToken({\n        requestBody,\n    }: {\n        requestBody?: WebApi_ViewModels_Login_AuthCodeRequest,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/auth/token',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public getAuthRefreshToken(): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/auth/refresh-token',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto } from '../models/ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto';\nimport type { ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto } from '../models/ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto';\nimport type { ITEPortal_Domain_Dto_Bitrix_Update_BitrixUpdateDto } from '../models/ITEPortal_Domain_Dto_Bitrix_Update_BitrixUpdateDto';\nimport type { ITEPortal_Domain_Dto_Order_ExportOrderDto } from '../models/ITEPortal_Domain_Dto_Order_ExportOrderDto';\nimport type { ITEPortal_Domain_Dto_PriceListDto } from '../models/ITEPortal_Domain_Dto_PriceListDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class BitrixService {\n  constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n  /**\n   * @returns ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto Success\n   * @throws ApiError\n   */\n  public getBitrixEventMasters(): CancelablePromise<\n    Array<ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto>\n  > {\n    return this.httpRequest.request({\n      method: 'GET',\n      url: '/bitrix/event-masters',\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto Success\n   * @throws ApiError\n   */\n  public getBitrixEventEditions({\n    eventMasterId,\n  }: {\n    eventMasterId?: number;\n  }): CancelablePromise<\n    Array<ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto>\n  > {\n    return this.httpRequest.request({\n      method: 'GET',\n      url: '/bitrix/event-editions/{eventMasterId}',\n      path: {\n        eventMasterId: eventMasterId,\n      },\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns number Success\n   * @throws ApiError\n   */\n  public postBitrixExhibition({\n    eventEditionId,\n    culture = 'ru',\n    requestBody,\n  }: {\n    eventEditionId: number;\n    culture?: string;\n    requestBody?: Array<number>;\n  }): CancelablePromise<number> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/exhibition/{eventEditionId}',\n      path: {\n        eventEditionId: eventEditionId,\n      },\n      query: {\n        culture: culture,\n      },\n      body: requestBody,\n      mediaType: 'application/json-patch+json',\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns binary Success\n   * @throws ApiError\n   */\n  public postBitrixExhibitionExhibitors({\n    exhibitionId,\n  }: {\n    exhibitionId: number;\n  }): CancelablePromise<Blob> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/exhibition/{exhibitionId}/exhibitors',\n      path: {\n        exhibitionId: exhibitionId,\n      },\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns ITEPortal_Domain_Dto_PriceListDto Success\n   * @throws ApiError\n   */\n  public postBitrixPriceList({\n    exhibitionId,\n  }: {\n    exhibitionId: number;\n  }): CancelablePromise<Array<ITEPortal_Domain_Dto_PriceListDto>> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/price-list/{exhibitionId}',\n      path: {\n        exhibitionId: exhibitionId,\n      },\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns any Success\n   * @throws ApiError\n   */\n  public postBitrixSalesOffices(): CancelablePromise<any> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/sales-offices',\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns any Success\n   * @throws ApiError\n   */\n  public postBitrixResponsible(): CancelablePromise<any> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/responsible',\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns any Success\n   * @throws ApiError\n   */\n  public postBitrixOrders({\n    orderId,\n    requestBody,\n  }: {\n    orderId: number;\n    requestBody?: ITEPortal_Domain_Dto_Order_ExportOrderDto;\n  }): CancelablePromise<any> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/orders/{orderId}',\n      path: {\n        orderId: orderId,\n      },\n      body: requestBody,\n      mediaType: 'application/json-patch+json',\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns boolean Success\n   * @throws ApiError\n   */\n  public postBitrixUpdateFromBitrix({\n    requestBody,\n  }: {\n    requestBody?: ITEPortal_Domain_Dto_Bitrix_Update_BitrixUpdateDto;\n  }): CancelablePromise<Record<string, boolean>> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/update-from-bitrix',\n      body: requestBody,\n      mediaType: 'application/json-patch+json',\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n\n  /**\n   * @returns any Success\n   * @throws ApiError\n   */\n  public postBitrixUpdateContactId({\n    userId,\n    contactId,\n  }: {\n    userId: number;\n    contactId: number;\n  }): CancelablePromise<any> {\n    return this.httpRequest.request({\n      method: 'POST',\n      url: '/bitrix/update-contact-id/{userId}/{contactId}',\n      path: {\n        userId: userId,\n        contactId: contactId,\n      },\n      errors: {\n        400: `Bad Request`,\n      },\n    });\n  }\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Contracts_Enums_BuildingType } from '../models/ITEPortal_Contracts_Enums_BuildingType';\nimport type { ITEPortal_Domain_Dto_AddCategoryDto } from '../models/ITEPortal_Domain_Dto_AddCategoryDto';\nimport type { ITEPortal_Domain_Dto_AdminCategoryResourcesSummary } from '../models/ITEPortal_Domain_Dto_AdminCategoryResourcesSummary';\nimport type { ITEPortal_Domain_Dto_Category_CategoryOrderIndexDto } from '../models/ITEPortal_Domain_Dto_Category_CategoryOrderIndexDto';\nimport type { ITEPortal_Domain_Dto_CategoryDropdownDto } from '../models/ITEPortal_Domain_Dto_CategoryDropdownDto';\nimport type { ITEPortal_Domain_Dto_CategoryDto } from '../models/ITEPortal_Domain_Dto_CategoryDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class CategoryService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_CategoryDropdownDto Success\n     * @throws ApiError\n     */\n    public getCategoriesAdminSummaries(): CancelablePromise<Array<ITEPortal_Domain_Dto_CategoryDropdownDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/categories/admin-summaries',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_CategoryDto Success\n     * @throws ApiError\n     */\n    public getCategories({\n        pageNumber,\n        pageSize,\n        buildingType,\n        parentCategoryId,\n        search,\n        product,\n    }: {\n        pageNumber?: number,\n        pageSize?: number,\n        buildingType?: ITEPortal_Contracts_Enums_BuildingType,\n        parentCategoryId?: number,\n        search?: string,\n        product?: string,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_CategoryDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/categories',\n            query: {\n                'PageNumber': pageNumber,\n                'PageSize': pageSize,\n                'buildingType': buildingType,\n                'parentCategoryId': parentCategoryId,\n                'search': search,\n                'product': product,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postCategories({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_AddCategoryDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/categories',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putCategories({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_AddCategoryDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/categories',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_CategoryDto Success\n     * @throws ApiError\n     */\n    public getCategoriesPriceList({\n        exhibitionId,\n        currency,\n        buildingType,\n    }: {\n        exhibitionId?: number,\n        currency?: string,\n        buildingType?: ITEPortal_Contracts_Enums_BuildingType,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_CategoryDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/categories/price-list',\n            query: {\n                'ExhibitionId': exhibitionId,\n                'Currency': currency,\n                'BuildingType': buildingType,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_AdminCategoryResourcesSummary Success\n     * @throws ApiError\n     */\n    public getCategoriesResources({\n        name,\n    }: {\n        name: string,\n    }): CancelablePromise<Record<string, ITEPortal_Domain_Dto_AdminCategoryResourcesSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/categories/{name}/resources',\n            path: {\n                'name': name,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_CategoryDto Success\n     * @throws ApiError\n     */\n    public getCategoriesParentCategories(): CancelablePromise<Array<ITEPortal_Domain_Dto_CategoryDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/categories/parent-categories',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postCategoriesImage({\n        name,\n        formData,\n    }: {\n        name: string,\n        formData?: {\n            image?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/categories/{name}/image',\n            path: {\n                'name': name,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postCategoriesResourcesBatch({\n        formData,\n    }: {\n        formData?: {\n            importCategoryResourcesFile?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/categories/resources/batch',\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postCategoriesOrderIndex({\n        requestBody,\n    }: {\n        requestBody?: Array<ITEPortal_Domain_Dto_Category_CategoryOrderIndexDto>,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/categories/order-index',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_CurrencyDto } from '../models/ITEPortal_Domain_Dto_CurrencyDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class CurrencyService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_CurrencyDto Success\n     * @throws ApiError\n     */\n    public getCurrency(): CancelablePromise<Array<ITEPortal_Domain_Dto_CurrencyDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/currency',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto } from '../models/ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class DiscountService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto Success\n     * @throws ApiError\n     */\n    public getDiscountsCleaning(): CancelablePromise<Array<ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/discounts/cleaning',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns number Success\n     * @throws ApiError\n     */\n    public postDiscountsCleaning({\n        areaFrom,\n        areaTo,\n        discountPercentage,\n    }: {\n        areaFrom?: number,\n        areaTo?: number,\n        discountPercentage?: number,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/discounts/cleaning',\n            query: {\n                'AreaFrom': areaFrom,\n                'AreaTo': areaTo,\n                'DiscountPercentage': discountPercentage,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public putDiscountsCleaning({\n        discountId,\n        areaFrom,\n        areaTo,\n        discountPercentage,\n    }: {\n        discountId: number,\n        areaFrom?: number,\n        areaTo?: number,\n        discountPercentage?: number,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/discounts/cleaning/{discountId}',\n            path: {\n                'discountId': discountId,\n            },\n            query: {\n                'AreaFrom': areaFrom,\n                'AreaTo': areaTo,\n                'DiscountPercentage': discountPercentage,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public deleteDiscountsCleaning({\n        discountId,\n    }: {\n        discountId: number,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/discounts/cleaning/{discountId}',\n            path: {\n                'discountId': discountId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_AdminExhibitionSummary } from '../models/ITEPortal_Domain_Dto_AdminExhibitionSummary';\nimport type { ITEPortal_Domain_Dto_Exhibition_ExhibitionStatisticsWithSummary } from '../models/ITEPortal_Domain_Dto_Exhibition_ExhibitionStatisticsWithSummary';\nimport type { ITEPortal_Domain_Dto_ExhibitionDto } from '../models/ITEPortal_Domain_Dto_ExhibitionDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class ExhibitionService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_Exhibition_ExhibitionStatisticsWithSummary Created\n     * @throws ApiError\n     */\n    public getExhibitionsExhibitorStatistics(): CancelablePromise<Array<ITEPortal_Domain_Dto_Exhibition_ExhibitionStatisticsWithSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/exhibitor-statistics',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_AdminExhibitionSummary Success\n     * @throws ApiError\n     */\n    public getExhibitionsAdminSummaries({\n        search,\n        type,\n        pageNumber,\n        pageSize,\n    }: {\n        search?: string,\n        type?: string,\n        pageNumber?: number,\n        pageSize?: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_AdminExhibitionSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/admin-summaries',\n            query: {\n                'Search': search,\n                'Type': type,\n                'PageNumber': pageNumber,\n                'PageSize': pageSize,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_ExhibitionDto Success\n     * @throws ApiError\n     */\n    public getExhibitions({\n        id,\n    }: {\n        id: number,\n    }): CancelablePromise<ITEPortal_Domain_Dto_ExhibitionDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/{id}',\n            path: {\n                'id': id,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postExhibitionsLogo({\n        id,\n        formData,\n    }: {\n        id: number,\n        formData?: {\n            logo?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitions/{id}/logo',\n            path: {\n                'id': id,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postExhibitions({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_ExhibitionDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitions',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putExhibitions({\n        exhibitionId,\n        requestBody,\n    }: {\n        exhibitionId: number,\n        requestBody?: ITEPortal_Domain_Dto_ExhibitionDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitions/{exhibitionId}',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_AdminExhibitorSummary } from '../models/ITEPortal_Domain_Dto_AdminExhibitorSummary';\nimport type { ITEPortal_Domain_Dto_AssignManagerToExhibitorsDto } from '../models/ITEPortal_Domain_Dto_AssignManagerToExhibitorsDto';\nimport type { ITEPortal_Domain_Dto_CatalogExhibitorSummary } from '../models/ITEPortal_Domain_Dto_CatalogExhibitorSummary';\nimport type { ITEPortal_Domain_Dto_CreateExhibitorDto } from '../models/ITEPortal_Domain_Dto_CreateExhibitorDto';\nimport type { ITEPortal_Domain_Dto_Exhibitor_ExhibitorEmployeeDto } from '../models/ITEPortal_Domain_Dto_Exhibitor_ExhibitorEmployeeDto';\nimport type { ITEPortal_Domain_Dto_ExhibitorDto } from '../models/ITEPortal_Domain_Dto_ExhibitorDto';\nimport type { ITEPortal_Domain_Dto_UpdateExhibitorDto } from '../models/ITEPortal_Domain_Dto_UpdateExhibitorDto';\nimport type { ITEPortal_Domain_Dto_UpdateExhibitorUserDataDto } from '../models/ITEPortal_Domain_Dto_UpdateExhibitorUserDataDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class ExhibitorService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_CatalogExhibitorSummary Success\n     * @throws ApiError\n     */\n    public getAdminSummaries({\n        search,\n        pageNumber,\n        pageSize,\n    }: {\n        search?: string,\n        pageNumber?: number,\n        pageSize?: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_CatalogExhibitorSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/admin-summaries',\n            query: {\n                'Search': search,\n                'PageNumber': pageNumber,\n                'PageSize': pageSize,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_ExhibitorDto Success\n     * @throws ApiError\n     */\n    public getExhibitors({\n        id,\n        exhibitionId,\n    }: {\n        id: number,\n        exhibitionId?: number,\n    }): CancelablePromise<ITEPortal_Domain_Dto_ExhibitorDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitors/{id}',\n            path: {\n                'id': id,\n            },\n            query: {\n                'exhibitionId': exhibitionId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putExhibitors({\n        id,\n        requestBody,\n    }: {\n        id: number,\n        requestBody?: ITEPortal_Domain_Dto_UpdateExhibitorDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitors/{id}',\n            path: {\n                'id': id,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_ExhibitorDto Success\n     * @throws ApiError\n     */\n    public getExhibitors1({\n        email,\n    }: {\n        email?: string,\n    }): CancelablePromise<ITEPortal_Domain_Dto_ExhibitorDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitors',\n            query: {\n                'email': email,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postExhibitors({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_CreateExhibitorDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitors',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_AdminExhibitorSummary Success\n     * @throws ApiError\n     */\n    public getExhibitorsExhibition({\n        exhibitionId,\n        search,\n        hasTechnicalManager = true,\n    }: {\n        exhibitionId?: number,\n        search?: string,\n        hasTechnicalManager?: boolean,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_AdminExhibitorSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitors/exhibition',\n            query: {\n                'exhibitionId': exhibitionId,\n                'search': search,\n                'hasTechnicalManager': hasTechnicalManager,\n            },\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postExhibitionExhibitorsBatch({\n        exhibitionId,\n        formData,\n    }: {\n        exhibitionId: number,\n        formData?: {\n            importFile?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibition/{exhibitionId}/exhibitors/batch',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putAdminSummaries({\n        id,\n        requestBody,\n    }: {\n        id: number,\n        requestBody?: ITEPortal_Domain_Dto_UpdateExhibitorUserDataDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/admin-summaries/{id}',\n            path: {\n                'id': id,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteExhibitionsExhibitors({\n        exhibitionId,\n        exhibitorId,\n    }: {\n        exhibitionId: number,\n        exhibitorId: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/exhibitions/{exhibitionId}/exhibitors/{exhibitorId}',\n            path: {\n                'exhibitionId': exhibitionId,\n                'exhibitorId': exhibitorId,\n            },\n        });\n    }\n\n    /**\n     * @returns number Success\n     * @throws ApiError\n     */\n    public postExhibitorsExhibitionEmployees({\n        exhibitorId,\n        exhibitionId,\n        requestBody,\n    }: {\n        exhibitorId: number,\n        exhibitionId: number,\n        requestBody?: ITEPortal_Domain_Dto_Exhibitor_ExhibitorEmployeeDto,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitors/{exhibitorId}/exhibition/{exhibitionId}/employees',\n            path: {\n                'exhibitorId': exhibitorId,\n                'exhibitionId': exhibitionId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns number Success\n     * @throws ApiError\n     */\n    public postExhibitorsEmployees({\n        exhibitorId,\n        requestBody,\n    }: {\n        exhibitorId: number,\n        requestBody?: ITEPortal_Domain_Dto_Exhibitor_ExhibitorEmployeeDto,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitors/{exhibitorId}/employees',\n            path: {\n                'exhibitorId': exhibitorId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public putExhibitorsEmployees({\n        employeeId,\n        requestBody,\n    }: {\n        employeeId: number,\n        requestBody?: ITEPortal_Domain_Dto_Exhibitor_ExhibitorEmployeeDto,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitors/employees/{employeeId}',\n            path: {\n                'employeeId': employeeId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns number Success\n     * @throws ApiError\n     */\n    public deleteExhibitorsEmployees({\n        employeeId,\n    }: {\n        employeeId: number,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/exhibitors/employees/{employeeId}',\n            path: {\n                'employeeId': employeeId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public deleteExhibitorsEmployeesExhibitions({\n        employeeId,\n        exhibitionId,\n    }: {\n        employeeId: number,\n        exhibitionId: number,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/exhibitors/employees/{employeeId}/exhibitions/{exhibitionId}',\n            path: {\n                'employeeId': employeeId,\n                'exhibitionId': exhibitionId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_AdminExhibitorSummary Success\n     * @throws ApiError\n     */\n    public getExhibitorsExhibitionsAgents({\n        exhibitionId,\n    }: {\n        exhibitionId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_AdminExhibitorSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitors/exhibitions/{exhibitionId}/agents',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public putExhibitorsExhibitionsTechnicalManagers({\n        exhibitorId,\n        exhibitionId,\n        id,\n    }: {\n        exhibitorId: number,\n        exhibitionId: number,\n        id: number,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitors/{exhibitorId}/exhibitions/{exhibitionId}/technical-managers/{id}',\n            path: {\n                'exhibitorId': exhibitorId,\n                'exhibitionId': exhibitionId,\n                'id': id,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putExhibitorsExhibition({\n        exhibitionId,\n        requestBody,\n    }: {\n        exhibitionId: number,\n        requestBody?: ITEPortal_Domain_Dto_AssignManagerToExhibitorsDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitors/exhibition/{exhibitionId}',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_ChangePasswordSettingsDto } from '../models/ITEPortal_Domain_Dto_ChangePasswordSettingsDto';\nimport type { ITEPortal_Domain_Dto_GlobalSettingsDto } from '../models/ITEPortal_Domain_Dto_GlobalSettingsDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class GlobalSettingsService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_GlobalSettingsDto Success\n     * @throws ApiError\n     */\n    public getGlobalSettings(): CancelablePromise<ITEPortal_Domain_Dto_GlobalSettingsDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/global-settings',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditFromEmail({\n        fromEmail,\n    }: {\n        fromEmail?: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-fromEmail',\n            query: {\n                'fromEmail': fromEmail,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditUsername({\n        username,\n    }: {\n        username?: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-username',\n            query: {\n                'username': username,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditPassword({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_ChangePasswordSettingsDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-password',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditHost({\n        host,\n    }: {\n        host?: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-host',\n            query: {\n                'host': host,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditPort({\n        port,\n    }: {\n        port?: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-port',\n            query: {\n                'port': port,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditLogo({\n        formData,\n    }: {\n        formData?: {\n            logo?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-logo',\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Created\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditExhibitorManualFile({\n        culture,\n        formData,\n    }: {\n        culture: string,\n        formData?: {\n            manual?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-exhibitor-manual-file/{culture}',\n            path: {\n                'culture': culture,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Created\n     * @throws ApiError\n     */\n    public postGlobalSettingsEditExhibitorManualUrl({\n        culture,\n        url,\n    }: {\n        culture: string,\n        url?: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/global-settings/edit-exhibitor-manual-url/{culture}',\n            path: {\n                'culture': culture,\n            },\n            query: {\n                'url': url,\n            },\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns string Created\n     * @throws ApiError\n     */\n    public getGlobalSettingsExhibitorManual(): CancelablePromise<string> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/global-settings/exhibitor-manual',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_BankAccount_BankAccountDto } from '../models/ITEPortal_Domain_Dto_BankAccount_BankAccountDto';\nimport type { ITEPortal_Domain_Dto_BankAccount_GetBankAccountDto } from '../models/ITEPortal_Domain_Dto_BankAccount_GetBankAccountDto';\nimport type { ITEPortal_Domain_Dto_IteCompany_GetIteCompanyDto } from '../models/ITEPortal_Domain_Dto_IteCompany_GetIteCompanyDto';\nimport type { ITEPortal_Domain_Dto_IteCompany_IteCompanyDto } from '../models/ITEPortal_Domain_Dto_IteCompany_IteCompanyDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class IteCompanyService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_IteCompany_GetIteCompanyDto Success\n     * @throws ApiError\n     */\n    public getCompanies(): CancelablePromise<Array<ITEPortal_Domain_Dto_IteCompany_GetIteCompanyDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/companies',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Created\n     * @throws ApiError\n     */\n    public postCompany({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_IteCompany_IteCompanyDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/company',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Created\n     * @throws ApiError\n     */\n    public putCompany({\n        companyId,\n        requestBody,\n    }: {\n        companyId: number,\n        requestBody?: ITEPortal_Domain_Dto_IteCompany_IteCompanyDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/company/{companyId}',\n            path: {\n                'companyId': companyId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postCompaniesBatch({\n        formData,\n    }: {\n        formData?: {\n            companiesFile?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/companies/batch',\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_BankAccount_GetBankAccountDto Success\n     * @throws ApiError\n     */\n    public getCompaniesBankAccounts({\n        companyId,\n    }: {\n        companyId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_BankAccount_GetBankAccountDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/companies/{companyId}/bank-accounts',\n            path: {\n                'companyId': companyId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postCompaniesBankAccountsBatch({\n        formData,\n    }: {\n        formData?: {\n            bankAccountsFile?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/companies/bank-accounts/batch',\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postCompaniesBankAccount({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_BankAccount_BankAccountDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/companies/bank-account',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putCompaniesBankAccount({\n        bankAccountId,\n        requestBody,\n    }: {\n        bankAccountId: number,\n        requestBody?: ITEPortal_Domain_Dto_BankAccount_BankAccountDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/companies/bank-account/{bankAccountId}',\n            path: {\n                'bankAccountId': bankAccountId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Contracts_Enums_OrderStatus } from '../models/ITEPortal_Contracts_Enums_OrderStatus';\nimport type { ITEPortal_Domain_Dto_AdminOrderSummary } from '../models/ITEPortal_Domain_Dto_AdminOrderSummary';\nimport type { ITEPortal_Domain_Dto_Order_CreateOrderDto } from '../models/ITEPortal_Domain_Dto_Order_CreateOrderDto';\nimport type { ITEPortal_Domain_Dto_Order_CreateOrderFromAdminDto } from '../models/ITEPortal_Domain_Dto_Order_CreateOrderFromAdminDto';\nimport type { ITEPortal_Domain_Dto_Order_ExtraChargeRemovingDto } from '../models/ITEPortal_Domain_Dto_Order_ExtraChargeRemovingDto';\nimport type { ITEPortal_Domain_Dto_Order_PersonalDiscountDto } from '../models/ITEPortal_Domain_Dto_Order_PersonalDiscountDto';\nimport type { ITEPortal_Domain_Dto_Order_PersonalExtraChargeDto } from '../models/ITEPortal_Domain_Dto_Order_PersonalExtraChargeDto';\nimport type { ITEPortal_Domain_Dto_Order_UpdateOrderDto } from '../models/ITEPortal_Domain_Dto_Order_UpdateOrderDto';\nimport type { ITEPortal_Domain_Dto_OrderDto } from '../models/ITEPortal_Domain_Dto_OrderDto';\nimport type { ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto } from '../models/ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class OrderService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_AdminOrderSummary Success\n     * @throws ApiError\n     */\n    public getOrders({\n        exhibitionId,\n        orderStatus,\n        exhibitorId,\n        search,\n    }: {\n        exhibitionId?: number,\n        orderStatus?: ITEPortal_Contracts_Enums_OrderStatus,\n        exhibitorId?: number,\n        search?: string,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_AdminOrderSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/orders',\n            query: {\n                'exhibitionId': exhibitionId,\n                'orderStatus': orderStatus,\n                'exhibitorId': exhibitorId,\n                'search': search,\n            },\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postOrders({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_Order_CreateOrderDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/orders',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putOrders({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_Order_UpdateOrderDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/orders',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postOrdersExhibitors({\n        exhibitorId,\n        requestBody,\n    }: {\n        exhibitorId: number,\n        requestBody?: ITEPortal_Domain_Dto_Order_CreateOrderFromAdminDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/orders/exhibitors/{exhibitorId}',\n            path: {\n                'exhibitorId': exhibitorId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_OrderDto Created\n     * @throws ApiError\n     */\n    public getOrders1({\n        orderId,\n    }: {\n        orderId: number,\n    }): CancelablePromise<ITEPortal_Domain_Dto_OrderDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/orders/{orderId}',\n            path: {\n                'orderId': orderId,\n            },\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteOrders({\n        orderId,\n    }: {\n        orderId: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/orders/{orderId}',\n            path: {\n                'orderId': orderId,\n            },\n        });\n    }\n\n    /**\n     * @returns binary Success\n     * @throws ApiError\n     */\n    public getOrdersPdf({\n        orderId,\n    }: {\n        orderId: number,\n    }): CancelablePromise<Blob> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/orders/{orderId}/pdf',\n            path: {\n                'orderId': orderId,\n            },\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postExhibitionsOrders({\n        exhibitionId,\n        orderId,\n        requestBody,\n    }: {\n        exhibitionId: number,\n        orderId: number,\n        requestBody?: ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitions/{exhibitionId}/orders/{orderId}',\n            path: {\n                'exhibitionId': exhibitionId,\n                'orderId': orderId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putExhibitionsOrders({\n        exhibitionId,\n        orderId,\n        orderItemId,\n        requestBody,\n    }: {\n        exhibitionId: number,\n        orderId: number,\n        orderItemId?: number,\n        requestBody?: ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitions/{exhibitionId}/orders/{orderId}',\n            path: {\n                'exhibitionId': exhibitionId,\n                'orderId': orderId,\n            },\n            query: {\n                'orderItemId': orderItemId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteExhibitionsOrders({\n        exhibitionId,\n        orderId,\n        orderItemId,\n    }: {\n        exhibitionId: number,\n        orderId: number,\n        orderItemId?: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/exhibitions/{exhibitionId}/orders/{orderId}',\n            path: {\n                'exhibitionId': exhibitionId,\n                'orderId': orderId,\n            },\n            query: {\n                'orderItemId': orderItemId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteOrdersDraft({\n        orderId,\n    }: {\n        orderId: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/orders/{orderId}/draft',\n            path: {\n                'orderId': orderId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putOrdersStatus({\n        orderId,\n        orderStatus,\n    }: {\n        orderId: number,\n        orderStatus?: ITEPortal_Contracts_Enums_OrderStatus,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/orders/{orderId}/status',\n            path: {\n                'orderId': orderId,\n            },\n            query: {\n                'orderStatus': orderStatus,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public postOrdersSendOrderChangedConfirmation({\n        orderId,\n        requestBody,\n    }: {\n        orderId: number,\n        requestBody?: string,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/orders/{orderId}/send-order-changed-confirmation',\n            path: {\n                'orderId': orderId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postOrdersPersonalDiscount({\n        orderId,\n        requestBody,\n    }: {\n        orderId: number,\n        requestBody?: ITEPortal_Domain_Dto_Order_PersonalDiscountDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/orders/{orderId}/personal-discount',\n            path: {\n                'orderId': orderId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putOrdersPersonalDiscount({\n        orderId,\n        requestBody,\n    }: {\n        orderId: number,\n        requestBody?: ITEPortal_Domain_Dto_Order_PersonalDiscountDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/orders/{orderId}/personal-discount',\n            path: {\n                'orderId': orderId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteOrdersPersonalDiscount({\n        orderId,\n    }: {\n        orderId: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/orders/{orderId}/personal-discount',\n            path: {\n                'orderId': orderId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putOrdersRemoveExtraCharge({\n        orderId,\n        requestBody,\n    }: {\n        orderId: number,\n        requestBody?: ITEPortal_Domain_Dto_Order_ExtraChargeRemovingDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/orders/{orderId}/remove-extra-charge',\n            path: {\n                'orderId': orderId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putOrdersPersonalExtraCharge({\n        orderId,\n        requestBody,\n    }: {\n        orderId: number,\n        requestBody?: ITEPortal_Domain_Dto_Order_PersonalExtraChargeDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/orders/{orderId}/personal-extra-charge',\n            path: {\n                'orderId': orderId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Contracts_Enums_BuildingType } from '../models/ITEPortal_Contracts_Enums_BuildingType';\nimport type { ITEPortal_Domain_Dto_AddPriceListItemDto } from '../models/ITEPortal_Domain_Dto_AddPriceListItemDto';\nimport type { ITEPortal_Domain_Dto_AdminPriceListItem } from '../models/ITEPortal_Domain_Dto_AdminPriceListItem';\nimport type { ITEPortal_Domain_Dto_PriceListItemSummary } from '../models/ITEPortal_Domain_Dto_PriceListItemSummary';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class PriceListItemService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_PriceListItemSummary Success\n     * @throws ApiError\n     */\n    public getPricelistItems({\n        exhibitionId,\n        currency,\n        categoryIds,\n        productId,\n        buildingType,\n    }: {\n        exhibitionId?: number,\n        currency?: string,\n        categoryIds?: string,\n        productId?: number,\n        buildingType?: ITEPortal_Contracts_Enums_BuildingType,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_PriceListItemSummary>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/pricelist-items',\n            query: {\n                'ExhibitionId': exhibitionId,\n                'Currency': currency,\n                'CategoryIds': categoryIds,\n                'ProductId': productId,\n                'BuildingType': buildingType,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_AdminPriceListItem Success\n     * @throws ApiError\n     */\n    public getExhibitionsPriceListsItems({\n        exhibitionId,\n        priceListId,\n    }: {\n        exhibitionId: number,\n        priceListId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_AdminPriceListItem>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/{exhibitionId}/price-lists/{priceListId}/items',\n            path: {\n                'exhibitionId': exhibitionId,\n                'priceListId': priceListId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns number Created\n     * @throws ApiError\n     */\n    public postExhibitionsPriceListsItems({\n        exhibitionId,\n        priceListId,\n        requestBody,\n    }: {\n        exhibitionId: number,\n        priceListId: number,\n        requestBody?: ITEPortal_Domain_Dto_AddPriceListItemDto,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitions/{exhibitionId}/price-lists/{priceListId}/items',\n            path: {\n                'exhibitionId': exhibitionId,\n                'priceListId': priceListId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postExhibitionsPriceListsItemsBatch({\n        exhibitionId,\n        priceListId,\n        formData,\n    }: {\n        exhibitionId: number,\n        priceListId: number,\n        formData?: {\n            importPriceListItems?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitions/{exhibitionId}/price-lists/{priceListId}/items/batch',\n            path: {\n                'exhibitionId': exhibitionId,\n                'priceListId': priceListId,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postPricelistItemsBatch({\n        formData,\n    }: {\n        formData?: {\n            importPriceListsFile?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/pricelist-items/batch',\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public putExhibitionsPriceListsItems({\n        exhibitionId,\n        priceListId,\n        priceListItemId,\n        requestBody,\n    }: {\n        exhibitionId: number,\n        priceListId: number,\n        priceListItemId: number,\n        requestBody?: ITEPortal_Domain_Dto_AddPriceListItemDto,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitions/{exhibitionId}/price-lists/{priceListId}/items/{priceListItemId}',\n            path: {\n                'exhibitionId': exhibitionId,\n                'priceListId': priceListId,\n                'priceListItemId': priceListItemId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns number Success\n     * @throws ApiError\n     */\n    public deleteExhibitionsPriceListsItems({\n        exhibitionId,\n        priceListId,\n        priceListItemId,\n    }: {\n        exhibitionId: number,\n        priceListId: number,\n        priceListItemId: number,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/exhibitions/{exhibitionId}/price-lists/{priceListId}/items/{priceListItemId}',\n            path: {\n                'exhibitionId': exhibitionId,\n                'priceListId': priceListId,\n                'priceListItemId': priceListItemId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_PriceListDto } from '../models/ITEPortal_Domain_Dto_PriceListDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class PriceListService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_PriceListDto Success\n     * @throws ApiError\n     */\n    public getExhibitionsPriceLists({\n        exhibitionId,\n    }: {\n        exhibitionId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_PriceListDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/{exhibitionId}/price-lists',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteExhibitionsPriceLists({\n        priceListId,\n        exhibitionId,\n    }: {\n        priceListId: number,\n        exhibitionId: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/exhibitions/{exhibitionId}/price-lists/{priceListId}',\n            path: {\n                'priceListId': priceListId,\n                'exhibitionId': exhibitionId,\n            },\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Contracts_Enums_BuildingType } from '../models/ITEPortal_Contracts_Enums_BuildingType';\nimport type { ITEPortal_Domain_Dto_AddProductDto } from '../models/ITEPortal_Domain_Dto_AddProductDto';\nimport type { ITEPortal_Domain_Dto_Product_ProductOrderIndexDto } from '../models/ITEPortal_Domain_Dto_Product_ProductOrderIndexDto';\nimport type { ITEPortal_Domain_Dto_ProductDto } from '../models/ITEPortal_Domain_Dto_ProductDto';\nimport type { ITEPortal_Domain_Dto_ShortenedProductDto } from '../models/ITEPortal_Domain_Dto_ShortenedProductDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class ProductService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_ProductDto Success\n     * @throws ApiError\n     */\n    public getProducts({\n        pageNumber,\n        pageSize,\n        categoryId,\n        buildingType,\n        search,\n    }: {\n        pageNumber?: number,\n        pageSize?: number,\n        categoryId?: number,\n        buildingType?: ITEPortal_Contracts_Enums_BuildingType,\n        search?: string,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_ProductDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/products',\n            query: {\n                'PageNumber': pageNumber,\n                'PageSize': pageSize,\n                'categoryId': categoryId,\n                'buildingType': buildingType,\n                'search': search,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postProducts({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_AddProductDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/products',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putProducts({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_AddProductDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/products',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteProducts({\n        name,\n    }: {\n        name?: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/products',\n            query: {\n                'name': name,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public getProductsResources({\n        name,\n    }: {\n        name: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/products/{name}/resources',\n            path: {\n                'name': name,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_ShortenedProductDto Success\n     * @throws ApiError\n     */\n    public getProductsShort({\n        exceptPriceListId,\n    }: {\n        exceptPriceListId?: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_ShortenedProductDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/products/short',\n            query: {\n                'exceptPriceListId': exceptPriceListId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postProductsBatch({\n        formData,\n    }: {\n        formData?: {\n            importProductsFile?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/products/batch',\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postProductsResourcesBatch({\n        formData,\n    }: {\n        formData?: {\n            importProductsResourcesFile?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/products/resources/batch',\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postProductsImages({\n        name,\n        formData,\n    }: {\n        name: string,\n        formData?: {\n            images?: Array<Blob>;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/products/{name}/images',\n            path: {\n                'name': name,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postProductsOrderIndex({\n        requestBody,\n    }: {\n        requestBody?: Array<ITEPortal_Domain_Dto_Product_ProductOrderIndexDto>,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/products/order-index',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_SellingOfficeDto } from '../models/ITEPortal_Domain_Dto_SellingOfficeDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class SellingOfficeService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_SellingOfficeDto Success\n     * @throws ApiError\n     */\n    public getSellingOffices(): CancelablePromise<Array<ITEPortal_Domain_Dto_SellingOfficeDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/selling-offices',\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_Bitrix_Deal_StandSharerDto } from '../models/ITEPortal_Domain_Dto_Bitrix_Deal_StandSharerDto';\nimport type { ITEPortal_Domain_Dto_ExhibitorStandDto } from '../models/ITEPortal_Domain_Dto_ExhibitorStandDto';\nimport type { ITEPortal_Domain_Dto_Stand_GetStandFileDto } from '../models/ITEPortal_Domain_Dto_Stand_GetStandFileDto';\nimport type { ITEPortal_Domain_Dto_Stand_GetStandProductDto } from '../models/ITEPortal_Domain_Dto_Stand_GetStandProductDto';\nimport type { ITEPortal_Domain_Dto_Stand_GetStandProjectDto } from '../models/ITEPortal_Domain_Dto_Stand_GetStandProjectDto';\nimport type { ITEPortal_Domain_Dto_Stand_StandProjectChangesDto } from '../models/ITEPortal_Domain_Dto_Stand_StandProjectChangesDto';\nimport type { ITEPortal_Domain_Dto_Stand_StandProjectDto } from '../models/ITEPortal_Domain_Dto_Stand_StandProjectDto';\nimport type { ITEPortal_Domain_Dto_Stand_StandStatusUpdateDto } from '../models/ITEPortal_Domain_Dto_Stand_StandStatusUpdateDto';\nimport type { ITEPortal_Domain_Dto_StandDto } from '../models/ITEPortal_Domain_Dto_StandDto';\nimport type { ITEPortal_Domain_Dto_StandSummariesDto } from '../models/ITEPortal_Domain_Dto_StandSummariesDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class StandService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns ITEPortal_Domain_Dto_StandSummariesDto Success\n     * @throws ApiError\n     */\n    public getExhibitionsExhibitorStands({\n        exhibitionId,\n    }: {\n        exhibitionId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_StandSummariesDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/{exhibitionId}/exhibitor-stands',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_StandSummariesDto Success\n     * @throws ApiError\n     */\n    public getExhibitorStands({\n        standId,\n    }: {\n        standId: number,\n    }): CancelablePromise<ITEPortal_Domain_Dto_StandSummariesDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitor-stands/{standId}',\n            path: {\n                'standId': standId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_StandDto Success\n     * @throws ApiError\n     */\n    public getExhibitionsStands({\n        id,\n        exhibitionId,\n    }: {\n        id: number,\n        exhibitionId: string,\n    }): CancelablePromise<ITEPortal_Domain_Dto_StandDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/{exhibitionId}/stands/{id}',\n            path: {\n                'id': id,\n                'exhibitionId': exhibitionId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putExhibitionsStands({\n        id,\n        exhibitionId,\n        requestBody,\n    }: {\n        id: number,\n        exhibitionId: string,\n        requestBody?: ITEPortal_Domain_Dto_StandDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/exhibitions/{exhibitionId}/stands/{id}',\n            path: {\n                'id': id,\n                'exhibitionId': exhibitionId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_ExhibitorStandDto Success\n     * @throws ApiError\n     */\n    public getExhibitionsExhibitorsStands({\n        exhibitionId,\n        exhibitorId,\n    }: {\n        exhibitionId: number,\n        exhibitorId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_ExhibitorStandDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/exhibitions/{exhibitionId}/exhibitors/{exhibitorId}/stands',\n            path: {\n                'exhibitionId': exhibitionId,\n                'exhibitorId': exhibitorId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public postExhibitionsStands({\n        exhibitionId,\n        requestBody,\n    }: {\n        exhibitionId: number,\n        requestBody?: ITEPortal_Domain_Dto_StandDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/exhibitions/{exhibitionId}/stands',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_Stand_GetStandProjectDto Success\n     * @throws ApiError\n     */\n    public getStandsProject({\n        standId,\n    }: {\n        standId: number,\n    }): CancelablePromise<ITEPortal_Domain_Dto_Stand_GetStandProjectDto> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/stands/{standId}/project',\n            path: {\n                'standId': standId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns number Success\n     * @throws ApiError\n     */\n    public postStandsProject({\n        standId,\n        requestBody,\n    }: {\n        standId: number,\n        requestBody?: ITEPortal_Domain_Dto_Stand_StandProjectDto,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/stands/{standId}/project',\n            path: {\n                'standId': standId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public postStandsUpdateProjectStatus({\n        standId,\n        projectId,\n        requestBody,\n    }: {\n        standId: number,\n        projectId: number,\n        requestBody?: ITEPortal_Domain_Dto_Stand_StandStatusUpdateDto,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/stands/{standId}/update-project-status/{projectId}',\n            path: {\n                'standId': standId,\n                'projectId': projectId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns boolean Success\n     * @throws ApiError\n     */\n    public putStandsProject({\n        standId,\n        projectId,\n        requestBody,\n    }: {\n        standId: number,\n        projectId: number,\n        requestBody?: ITEPortal_Domain_Dto_Stand_StandProjectDto,\n    }): CancelablePromise<boolean> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/stands/{standId}/project/{projectId}',\n            path: {\n                'standId': standId,\n                'projectId': projectId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putStandsProjectImage({\n        standId,\n        projectId,\n        formData,\n    }: {\n        standId: number,\n        projectId: number,\n        formData?: {\n            image?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/stands/{standId}/project/{projectId}/image',\n            path: {\n                'standId': standId,\n                'projectId': projectId,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns number Success\n     * @throws ApiError\n     */\n    public postStandsProjectChanges({\n        standId,\n        projectId,\n        requestBody,\n    }: {\n        standId: number,\n        projectId: number,\n        requestBody?: ITEPortal_Domain_Dto_Stand_StandProjectChangesDto,\n    }): CancelablePromise<number> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/stands/{standId}/project/{projectId}/changes',\n            path: {\n                'standId': standId,\n                'projectId': projectId,\n            },\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putStandsProjectChanges({\n        standId,\n        projectId,\n        changesId,\n        formData,\n    }: {\n        standId: number,\n        projectId: number,\n        changesId: number,\n        formData?: {\n            file?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/stands/{standId}/project/{projectId}/changes/{changesId}',\n            path: {\n                'standId': standId,\n                'projectId': projectId,\n                'changesId': changesId,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_Stand_GetStandFileDto Success\n     * @throws ApiError\n     */\n    public getStandsFiles({\n        standId,\n    }: {\n        standId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_Stand_GetStandFileDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/stands/{standId}/files',\n            path: {\n                'standId': standId,\n            },\n            errors: {\n                400: `Bad Request`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public putStandsFiles({\n        standId,\n        formData,\n    }: {\n        standId: number,\n        formData?: {\n            file?: Blob;\n        },\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/stands/{standId}/files',\n            path: {\n                'standId': standId,\n            },\n            formData: formData,\n            mediaType: 'multipart/form-data',\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteStandsFiles({\n        standId,\n        fileId,\n    }: {\n        standId: number,\n        fileId: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/stands/{standId}/files/{fileId}',\n            path: {\n                'standId': standId,\n                'fileId': fileId,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public getStandsZip({\n        standId,\n    }: {\n        standId: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/stands/{standId}/zip',\n            path: {\n                'standId': standId,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_Bitrix_Deal_StandSharerDto Success\n     * @throws ApiError\n     */\n    public getStandsSharers({\n        standId,\n    }: {\n        standId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_Bitrix_Deal_StandSharerDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/stands/{standId}/sharers',\n            path: {\n                'standId': standId,\n            },\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_Stand_GetStandProductDto Success\n     * @throws ApiError\n     */\n    public getStandsProducts({\n        standId,\n    }: {\n        standId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_Stand_GetStandProductDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/stands/{standId}/products',\n            path: {\n                'standId': standId,\n            },\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n}\n","/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ITEPortal_Domain_Dto_TechnicalManagerDto } from '../models/ITEPortal_Domain_Dto_TechnicalManagerDto';\nimport type { ITEPortal_Domain_Dto_UserDto } from '../models/ITEPortal_Domain_Dto_UserDto';\n\nimport type { CancelablePromise } from '../core/CancelablePromise';\nimport type { BaseHttpRequest } from '../core/BaseHttpRequest';\n\nexport class UserService {\n\n    constructor(public readonly httpRequest: BaseHttpRequest) {}\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public getUsers({\n        search,\n        roles,\n    }: {\n        search?: string,\n        roles?: Array<number>,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/users',\n            query: {\n                'search': search,\n                'roles': roles,\n            },\n            errors: {\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public getUsers1({\n        userId,\n    }: {\n        userId: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/users/{userId}',\n            path: {\n                'userId': userId,\n            },\n            errors: {\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public getUsersEmail({\n        email,\n    }: {\n        email?: string,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/users/email',\n            query: {\n                'email': email,\n            },\n        });\n    }\n\n    /**\n     * @returns any Created\n     * @throws ApiError\n     */\n    public postUsersAdd({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_UserDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'POST',\n            url: '/users/add',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Success\n     * @throws ApiError\n     */\n    public deleteUsersDelete({\n        id,\n    }: {\n        id: number,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'DELETE',\n            url: '/users/delete/{id}',\n            path: {\n                'id': id,\n            },\n            errors: {\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns any Created\n     * @throws ApiError\n     */\n    public putUsersUpdate({\n        requestBody,\n    }: {\n        requestBody?: ITEPortal_Domain_Dto_UserDto,\n    }): CancelablePromise<any> {\n        return this.httpRequest.request({\n            method: 'PUT',\n            url: '/users/update',\n            body: requestBody,\n            mediaType: 'application/json-patch+json',\n            errors: {\n                400: `Bad Request`,\n                500: `Server Error`,\n            },\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_TechnicalManagerDto Success\n     * @throws ApiError\n     */\n    public getUsersTechnicalManagers(): CancelablePromise<Array<ITEPortal_Domain_Dto_TechnicalManagerDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/users/technical-managers',\n        });\n    }\n\n    /**\n     * @returns ITEPortal_Domain_Dto_TechnicalManagerDto Success\n     * @throws ApiError\n     */\n    public getUsersTechnicalManagers1({\n        exhibitionId,\n    }: {\n        exhibitionId: number,\n    }): CancelablePromise<Array<ITEPortal_Domain_Dto_TechnicalManagerDto>> {\n        return this.httpRequest.request({\n            method: 'GET',\n            url: '/users/technical-managers/{exhibitionId}',\n            path: {\n                'exhibitionId': exhibitionId,\n            },\n        });\n    }\n\n}\n","import { OpenAPI } from './core/OpenAPI';\nimport { removeTrailingSlash } from '../utils/url';\n\nOpenAPI.BASE = removeTrailingSlash(process.env.PUBLIC_API_URL as string);\n\nOpenAPI.WITH_CREDENTIALS = true;\n\nOpenAPI.HEADERS = {\n  'Accept': 'application/json',\n  'Content-Type': 'application/json',\n  'Authorization': `Bearer ${localStorage.getItem('token')}`,\n};\n","import { axios } from './axios';\nimport baseAxios from 'axios';\nimport { removeTrailingSlash } from '../utils/url';\nimport { AxiosHttpRequest } from './core/AxiosHttpRequest';\nimport type { ApiRequestOptions } from './core/ApiRequestOptions';\nimport type { CancelablePromise } from './core/CancelablePromise';\nimport { request as __request } from './core/request';\nimport { OpenAPIConfig } from '@/api/core/OpenAPI';\n\nclass TypedAxiosHttpRequest extends AxiosHttpRequest {\n  axiosInstance = baseAxios.create();\n\n  constructor(config: OpenAPIConfig) {\n    super(config);\n    this.axiosInstance.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      (error) => {\n        if (error.response?.status === 401) {\n          localStorage.clear();\n          window.location.href = '/login';\n        }\n\n        throw error;\n      }\n    );\n  }\n\n  public override request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n    return __request(\n      this.config,\n      {\n        ...options,\n        query: {\n          ...options.query,\n          culture: localStorage.getItem('lang'),\n        },\n        headers: {\n          ...options.headers,\n          Authorization: `Bearer ${localStorage.getItem('token')}`,\n        },\n      },\n      this.axiosInstance\n    );\n  }\n}\n\nexport const typedAxios = new axios(\n  {\n    BASE: removeTrailingSlash(process.env.PUBLIC_API_URL as string),\n    WITH_CREDENTIALS: true,\n    HEADERS: {\n      Authorization: `Bearer ${localStorage.getItem('token')}`,\n    },\n  },\n  TypedAxiosHttpRequest\n);\n","import { SearchIcon } from '@chakra-ui/icons';\nimport {\n  InputGroup,\n  InputLeftElement,\n  Input,\n  Box,\n  Flex,\n} from '@chakra-ui/react';\nimport { useMatches, useNavigate, useSearch } from '@tanstack/react-router';\nimport { SearchBoxOptionsType } from './types';\nimport { useTranslation } from 'react-i18next';\nimport { useDebouncedCallback } from 'use-debounce';\n\nexport const AdminSearch = () => {\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n  const currentSearch = useSearch({ strict: false });\n  const context = (useMatches().at(-1)?.context || {\n    searchOptions: null,\n  }) as {\n    searchOptions: SearchBoxOptionsType[];\n  };\n\n  const doSearch = (parameterName: string, value: string | undefined) => {\n    const params = {\n      ...currentSearch,\n      [parameterName]: value || undefined,\n    };\n\n    if (params.p) {\n      params.p = undefined;\n    }\n\n    navigate({\n      search: params,\n    });\n  };\n\n  const doDebouncedSearch = useDebouncedCallback(\n    (parameterName: string, value: string) => {\n      doSearch(parameterName, value);\n    },\n    1000\n  );\n\n  const clearSearch = (parameterName: string) => {\n    doSearch(parameterName, undefined);\n  };\n\n  if (!context.searchOptions || !Array.isArray(context.searchOptions)) {\n    return null;\n  }\n\n  return (\n    <Flex flexDirection=\"row\">\n      {context.searchOptions.map((searchDescriptor, index) => {\n        const { placeholder = t('search'), queryParameterName = 'search' } =\n          searchDescriptor;\n\n        return (\n          <Box mr=\"32px\" key={index}>\n            <InputGroup maxWidth=\"300px\">\n              <InputLeftElement pointerEvents=\"none\">\n                <SearchIcon color=\"gray.300\" />\n              </InputLeftElement>\n              <Input\n                type=\"search\"\n                defaultValue={currentSearch?.[queryParameterName]}\n                placeholder={placeholder}\n                onKeyUp={(e) => {\n                  const target = e.target as HTMLInputElement;\n\n                  if (!target.value) {\n                    clearSearch(queryParameterName);\n\n                    return;\n                  }\n\n                  if (e.key === 'Enter') {\n                    doSearch(queryParameterName, target.value);\n\n                    return;\n                  }\n\n                  doDebouncedSearch(queryParameterName, target.value);\n                }}\n                onChangeCapture={(e) => {\n                  const target = e.target as HTMLInputElement;\n\n                  if (!target.value) {\n                    e.stopPropagation();\n                    e.preventDefault();\n\n                    clearSearch(queryParameterName);\n\n                    doDebouncedSearch.cancel();\n\n                    return;\n                  }\n                }}\n              />\n            </InputGroup>\n          </Box>\n        );\n      })}\n    </Flex>\n  );\n};\n","import { HStack, Input, InputProps, Text, useCounter } from '@chakra-ui/react';\nimport { AddIcon, MinusIcon } from '@chakra-ui/icons';\nimport { AmountWrapper, CounterButtonDec, CounterButtonInc } from './styled';\nimport { MathUtils } from '../../utils/math-utils';\nimport { ButtonHTMLAttributes, DetailedHTMLProps } from 'react';\nconst minValue = 0;\nconst maxValue = 9999;\n\ninterface AmountCounterProps {\n  amountCounterValue: string | number | undefined;\n  onChange?: (counterValue: number) => void;\n  suffix?: string;\n  disabled?: boolean;\n  precision?: number;\n  step?: number;\n}\n\nexport const AmountCounter = ({\n  amountCounterValue,\n  onChange,\n  disabled = false,\n  suffix,\n  step = 1,\n  precision = 0,\n}: AmountCounterProps) => {\n  useCounter({});\n  const {\n    increment,\n    decrement,\n    update,\n    value: controlledValue,\n  } = useCounter({\n    step,\n    defaultValue: amountCounterValue,\n    min: minValue,\n    max: maxValue,\n    precision,\n    keepWithinRange: true,\n    onChange(_: string, valueAsNumber: number) {\n      if (valueAsNumber > 0) {\n        if (step === 0.25 && valueAsNumber % step !== 0) {\n          onChange?.(MathUtils.roundToNearestQuarter(valueAsNumber));\n        } else {\n          onChange?.(valueAsNumber);\n        }\n      }\n    },\n  });\n\n  const inc = {\n    onClick: () => {\n      increment(step);\n    },\n  } satisfies DetailedHTMLProps<\n    ButtonHTMLAttributes<HTMLButtonElement>,\n    HTMLButtonElement\n  >;\n\n  const dec = {\n    onClick: () => {\n      decrement(step);\n    },\n  } satisfies DetailedHTMLProps<\n    ButtonHTMLAttributes<HTMLButtonElement>,\n    HTMLButtonElement\n  >;\n\n  const input = {\n    onChange: (e) => {\n      if (step < 1) {\n        update((e.target.value || '').replace(/[^0-9.,]/g, ''));\n      } else {\n        if (\n          typeof e.target.value === 'string' &&\n          e.target.value.match(/\\.|,/)\n        ) {\n          return;\n        }\n\n        if (\n          typeof e.target.value === 'string' &&\n          e.target.value.startsWith('0')\n        ) {\n          update((e.target.value || '').slice(1));\n\n          return;\n        }\n\n        update((e.target.value || '').replace(/[^0-9]/g, ''));\n      }\n    },\n    onBlur: (event) => {\n      if (step !== 0.25) {\n        return;\n      }\n\n      const value = event.target.value;\n\n      const valueAsNumber = parseFloat(value);\n\n      if (\n        typeof valueAsNumber === 'number' &&\n        !Number.isNaN(valueAsNumber) &&\n        valueAsNumber % 0.25 !== 0\n      ) {\n        update(MathUtils.roundToNearestQuarter(valueAsNumber));\n      }\n    },\n    value: controlledValue,\n  } satisfies InputProps;\n\n  return (\n    <AmountWrapper lang=\"ar-EG\" suffix={suffix} disabled={disabled}>\n      <HStack maxW=\"320px\">\n        <CounterButtonDec\n          {...dec}\n          type=\"button\"\n          suffix={suffix}\n          disabled={disabled}\n          aria-label=\"decrement\"\n        >\n          <MinusIcon boxSize={3} />\n        </CounterButtonDec>\n        <Input\n          {...input}\n          textAlign=\"center\"\n          min={minValue}\n          // maxLength={4}\n          height=\"28px\"\n          maxWidth={!suffix ? '35px' : '60px'}\n          variant=\"unstyled\"\n          disabled={disabled}\n          role=\"textbox\"\n        />\n        {suffix && <Text>{suffix}</Text>}\n        <CounterButtonInc\n          {...inc}\n          type=\"button\"\n          suffix={suffix}\n          disabled={disabled}\n          aria-label=\"increment\"\n        >\n          <AddIcon boxSize={3} />\n        </CounterButtonInc>\n      </HStack>\n    </AmountWrapper>\n  );\n};\n","import styled, { css } from 'styled-components';\nimport { ifProp } from 'styled-tools';\n\nconst Button = styled.button`\n  opacity: 0.5;\n\n  transition: all ease-in-out 0.15s;\n\n  &:hover {\n    opacity: 1;\n  }\n`;\n\nexport const CounterButtonDec = styled(Button)<{\n  suffix: string | undefined;\n}>`\n  //padding-left: ${({ suffix }) => (suffix ? '0' : '20px')};\n\n  ${ifProp(\n    'disabled',\n    css`\n      cursor: not-allowed;\n    `\n  )}\n`;\n\nexport const AmountWrapper = styled.div<{\n  suffix: string | undefined;\n  disabled: boolean | undefined;\n}>`\n  width: ${({ suffix }) => (suffix ? '170px' : '120px')};\n  text-align: center;\n  padding: 0 20px;\n  ${ifProp(\n    'suffix',\n    css`\n      padding: 0 10px;\n    `\n  )}\n  border: 1px solid silver;\n  border-radius: 5px;\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n\n  ${ifProp(\n    'disabled',\n    css`\n      cursor: not-allowed;\n      color: #999999;\n      background-color: #f7f7f7;\n    `\n  )}\n\n  :focus {\n    text-align: center;\n    border: none;\n    outline: none;\n  }\n`;\n\nexport const CounterButtonInc = styled(Button)<{\n  suffix: string | undefined;\n}>`\n  //padding-right: ${({ suffix }) => (suffix ? '0' : '20px')};\n\n  ${ifProp(\n    'disabled',\n    css`\n      cursor: not-allowed;\n    `\n  )}\n`;\n","import { Button, ButtonProps } from '@chakra-ui/react';\nimport { useState } from 'react';\n\nexport const AsyncButton = (props: ButtonProps) => {\n  const { onClick, ...rest } = props;\n  const [isLoading, toggleLoading] = useState(false);\n\n  const handleAsyncClick = async (e: any) => {\n    try {\n      const promise = onClick?.(e);\n\n      if (\n        promise &&\n        // @ts-expect-error expecting that void could not be promise\n        promise instanceof Promise\n      ) {\n        toggleLoading(true);\n        await promise;\n      }\n    } finally {\n      toggleLoading(false);\n    }\n  };\n\n  return (\n    <Button\n      {...rest}\n      onClick={handleAsyncClick}\n      isDisabled={isLoading}\n      isLoading={isLoading}\n    />\n  );\n};\n","import styled from 'styled-components';\nimport { Link } from '@tanstack/react-router';\nimport { DEFAULT_LOGO_PATH } from '@/utils/constants';\n\nconst Wrapper = styled.div`\n  width: 100%;\n  max-width: var(--chakra-sizes-header-brand-width);\n`;\n\nconst StyledLink = styled(Link)`\n  display: block;\n`;\n\nconst Image = styled.img`\n  width: 100%;\n  height: auto;\n  max-height: 70px;\n  min-height: 60px;\n  max-width: 60px;\n  min-width: 60px;\n  margin-top: -10px;\n`;\n\nconst BrandBox = () => {\n  return (\n    <Wrapper>\n      <StyledLink to=\"/\">\n        <Image src={DEFAULT_LOGO_PATH} alt=\"Logo\" />\n      </StyledLink>\n    </Wrapper>\n  );\n};\n\nexport default BrandBox;\n","import { Breadcrumb, BreadcrumbItem, BreadcrumbLink } from '@chakra-ui/react';\nimport styled, { css } from 'styled-components';\nimport { BreadcrumbOptions } from '@chakra-ui/breadcrumb/dist/breadcrumb-types';\nimport { ChevronRightIcon } from '@chakra-ui/icons';\nimport { Link } from '@tanstack/react-router';\nimport { ifProp } from 'styled-tools';\nimport { IBreadcrumbItem } from '@/model/common';\n\ninterface BreadcrumbsProps {\n  id?: string;\n  options?: BreadcrumbOptions;\n  items?: IBreadcrumbItem[];\n}\n\nconst BreadcrumbsWrapper = styled.div`\n  font-weight: 400;\n  font-size: 14px;\n  line-height: 20px;\n`;\n\nconst BreadcrumbsLinkContainer = styled(BreadcrumbLink)`\n  ${ifProp(\n    'disabled',\n    css`\n      cursor: default;\n    `\n  )}\n`;\n\nconst Breadcrumbs: React.FC<BreadcrumbsProps> = ({\n  items,\n  id,\n  options = {\n    spacing: '8px',\n    separator: <ChevronRightIcon />,\n  },\n}) => {\n  return (\n    <BreadcrumbsWrapper>\n      <Breadcrumb id={id} {...options}>\n        {items &&\n          items.map((breadcrumbItem, index) => {\n            const { label, link } = breadcrumbItem;\n            const isDisabled = index !== 0 && items.length === index + 1;\n\n            return (\n              <BreadcrumbItem key={index}>\n                <BreadcrumbsLinkContainer\n                  as={Link}\n                  to={link}\n                  disabled={isDisabled}\n                >\n                  {label}\n                </BreadcrumbsLinkContainer>\n              </BreadcrumbItem>\n            );\n          })}\n      </Breadcrumb>\n    </BreadcrumbsWrapper>\n  );\n};\n\nexport default Breadcrumbs;\n","import { Box, Spinner } from '@chakra-ui/react';\n\ninterface ButtonProps {\n  type?: 'strict' | 'rounded';\n  colorScheme?:\n    | 'primary'\n    | 'secondary'\n    | 'disabled'\n    | 'disabledSecondary'\n    | 'black'\n    | 'transparent'\n    | 'red';\n  children?: React.ReactNode;\n  height?: string;\n  width?: string;\n  fontWeight?: string;\n  onClick?: () => void;\n  disabled?: boolean;\n  buttonType?: 'submit' | 'button' | 'reset' | undefined;\n  defaultColor?: string;\n  isLoading?: boolean;\n}\n\nconst schemeConfig = {\n  primary: {\n    backgroundImage: 'linear-gradient(120deg, #F18F18 0%, #E8431A 100%)',\n    color: 'white',\n  },\n  secondary: {\n    backgroundImage: '#fcfcfc',\n    border: '1px',\n    color: '#E8431A',\n  },\n  disabled: {\n    backgroundImage: 'linear-gradient(120deg, #F18F18 0%, #E8431A 100%)',\n    opacity: '0.5',\n    color: 'white',\n  },\n  disabledSecondary: {\n    border: '1px',\n    opacity: '0.5',\n    color: '#E8431A',\n  },\n  black: {\n    color: '#1A202C',\n    border: '1px solid silver',\n  },\n  transparent: {\n    color: '#1A202C',\n    border: 'none',\n  },\n  red: {\n    backgroundColor: '#E8431A',\n    color: 'white',\n  },\n};\n\nconst hoverConfig = {\n  primary: {\n    backgroundImage: 'linear-gradient(120deg, #e2820e 0%, #d33b15 100%)',\n    color: '#e6e6e6',\n  },\n  secondary: {\n    backgroundImage: '#fcfcfc',\n    border: '1px',\n    color: '#E8431A',\n    opacity: '0.7',\n  },\n  disabled: {\n    backgroundImage: 'linear-gradient(120deg, #e2820e 0%, #d33b15 100%)',\n    opacity: '0.5',\n    color: '#e6e6e6',\n  },\n  disabledSecondary: {\n    border: '1px',\n    opacity: '0.5',\n    color: '#E8431A',\n  },\n  black: {\n    color: '#1A202C',\n    border: '1px solid silver',\n    opacity: '0.5',\n  },\n  transparent: {\n    color: '#E8431A',\n    border: 'none',\n    opacity: '0.5',\n  },\n  red: {\n    backgroundColor: '#E8431A',\n    color: 'white',\n    opacity: '0.5',\n  },\n};\n\nconst focusConfig = {\n  transparent: {\n    color: '#E8431A',\n  },\n};\n\nexport const Button = ({\n  type = 'rounded',\n  colorScheme = 'primary',\n  children = 'Test button',\n  height = '40px',\n  width = '120px',\n  fontWeight = 'bold',\n  onClick,\n  disabled = false,\n  buttonType,\n  defaultColor,\n  isLoading,\n}: ButtonProps): JSX.Element => {\n  const rounded = type === 'strict' ? '0px' : '6px';\n\n  const defaultColorConfig = defaultColor\n    ? {\n        color: defaultColor,\n      }\n    : {};\n\n  return (\n    <Box\n      as=\"button\"\n      minWidth=\"max-content\"\n      transition=\"all 0.2s cubic-bezier(.08,.52,.52,1)\"\n      px=\"8px\"\n      fontSize=\"14px\"\n      height={height}\n      borderRadius={rounded}\n      fontWeight={fontWeight}\n      width={width}\n      onClick={onClick}\n      _hover={\n        hoverConfig?.[\n          disabled && colorScheme !== 'transparent' ? 'disabled' : colorScheme\n        ]\n      }\n      _focus={colorScheme === 'transparent' ? focusConfig?.['transparent'] : {}}\n      {...schemeConfig?.[\n        disabled && colorScheme !== 'transparent' ? 'disabled' : colorScheme\n      ]}\n      disabled={disabled}\n      type={buttonType}\n      {...defaultColorConfig}\n    >\n      {isLoading ? <Spinner /> : children}\n    </Box>\n  );\n};\n","import styled from 'styled-components';\nimport { Link } from '@tanstack/react-router';\n\nexport const StyledLink = styled(Link)`\n  text-decoration: none;\n  color: rgba(0, 0, 0, 0.5);\n  font-weight: 500;\n`;\n","import {\n  Card as ChakraCard,\n  CardBody,\n  CardFooter,\n  CardHeader,\n} from '@chakra-ui/react';\nimport { ReactNode } from 'react';\nimport styled from 'styled-components';\n\nexport interface CardProps {\n  className?: string;\n  header?: ReactNode;\n  children: ReactNode;\n  footer?: ReactNode;\n  width?: string | number;\n}\n\nconst ChakraCardWrapper = styled.div<{\n  width: number | string;\n}>`\n  width: ${({ width }) => width};\n`;\n\nconst ChakraCardContainer = styled(ChakraCard)`\n  border-radius: 12px;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);\n\n  &.animated-card {\n    transition: all ease-in-out 0.3s;\n    transform: translateY(0);\n  }\n\n  &.animated-card:hover {\n    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n      0 2px 4px -1px rgba(0, 0, 0, 0.06);\n  }\n`;\n\nconst ChakraCardTitle = styled(CardHeader)`\n  font-size: 20px;\n  font-weight: 600;\n  padding-left: 24px;\n  padding-top: 26px;\n`;\n\nconst ChakraCardFooter = styled(CardFooter)`\n  display: flex;\n  justify-content: end;\n`;\n\nexport const Card = ({\n  className,\n  header,\n  children,\n  footer,\n  width = 'auto',\n}: CardProps): JSX.Element => {\n  return (\n    <ChakraCardWrapper width={width}>\n      <ChakraCardContainer className={className}>\n        {header && <ChakraCardTitle>{header}</ChakraCardTitle>}\n        <CardBody>{children}</CardBody>\n        {footer && <ChakraCardFooter>{footer}</ChakraCardFooter>}\n      </ChakraCardContainer>\n    </ChakraCardWrapper>\n  );\n};\n","import {\n  Box,\n  Card,\n  CardBody,\n  CardFooter,\n  Divider,\n  Heading,\n  Image,\n  Stack,\n  Text,\n} from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Nullable } from '../../types/support-types';\n\ninterface ExhibitionCardProps {\n  image: string;\n  name: string;\n  subtitles?: Array<Nullable<string>>;\n  description?: string | ReactNode;\n  stands?: number;\n  orders?: number;\n}\n\ninterface SubtitleProps {\n  subtitles: Array<Nullable<string>>;\n}\n\ninterface FooterSectionProps {\n  stands: number | undefined;\n  orders: number | undefined;\n}\n\nconst SubtitlesWrapper = styled.div`\n  display: flex;\n  flex-direction: row;\n  gap: 10px;\n  color: #718096;\n  padding-top: 10px;\n`;\n\nconst DescriptionWrapper = styled(Text)`\n  color: #718096;\n  font-size: 12px;\n  padding-top: 20px;\n`;\n\nconst ImageContainer = styled(Image)`\n  height: max-content;\n  max-width: 200px;\n`;\n\nconst ImageWrapper = styled.div`\n  border-right: 1px solid #e2e8f0;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  padding: 25px;\n`;\n\nconst DotsContainer = styled(Box)`\n  margin: 0 2px;\n  border-radius: 50%;\n  display: inline-block;\n`;\n\nconst FooterTextWrapper = styled.div`\n  font-size: 14px;\n  color: #718096;\n  display: flex;\n  flex-direction: row;\n  gap: 10px;\n  align-items: center;\n  justify-content: center;\n`;\n\nconst SubtitleRowWrapper = styled.div`\n  display: flex;\n  flex-direction: row;\n  gap: 10px;\n`;\n\nconst Subtitle = ({ subtitles }: SubtitleProps): JSX.Element => {\n  return (\n    <SubtitlesWrapper>\n      {subtitles.map((subtitle, index) => {\n        return (\n          <SubtitleRowWrapper key={index}>\n            <Text>{subtitle}</Text>\n            {index !== subtitles.length - 1 && (\n              <Divider orientation=\"vertical\" height=\"25px\" />\n            )}\n          </SubtitleRowWrapper>\n        );\n      })}\n      <Divider orientation=\"vertical\" />\n    </SubtitlesWrapper>\n  );\n};\n\nconst FooterSection = ({ stands, orders }: FooterSectionProps): JSX.Element => {\n  const { t } = useTranslation();\n\n  return (\n    <FooterTextWrapper>\n      {`${t('stands')} ${stands}`}\n      <DotsContainer boxSize={['7px', null, '8px']} bg=\"blackAlpha.400\" />\n      {`${t('orders')} ${orders}`}\n    </FooterTextWrapper>\n  );\n};\n\nexport const ExhibitionCard = ({\n  image,\n  name,\n  subtitles,\n  description,\n  stands,\n  orders,\n}: ExhibitionCardProps): JSX.Element => {\n  return (\n    <Card\n      direction={{ base: 'column', sm: 'row' }}\n      overflow=\"hidden\"\n      variant=\"elevated\"\n      h=\"100%\"\n      w=\"100%\"\n    >\n      <ImageWrapper>\n        {image && <ImageContainer src={image} alt=\"Caffe Latte\" />}\n      </ImageWrapper>\n\n      <Stack w=\"100%\">\n        <CardBody textAlign=\"left\">\n          <Heading size=\"md\" textAlign=\"left\">\n            {name}\n          </Heading>\n          {subtitles && <Subtitle subtitles={subtitles} />}\n          {description && (\n            <DescriptionWrapper>{description}</DescriptionWrapper>\n          )}\n        </CardBody>\n\n        <CardFooter>\n          <FooterSection stands={stands} orders={orders} />\n        </CardFooter>\n      </Stack>\n    </Card>\n  );\n};\n","import { Card, CardProps } from './Card';\nimport styled from 'styled-components';\n\nconst StyledCard = styled(Card)`\n  .chakra-card__body {\n    padding-top: 0;\n    padding-bottom: 0;\n  }\n`;\n\nconst ProductCard = ({ children, className, ...props }: CardProps) => {\n  return (\n    <StyledCard {...props} className={className}>\n      {children}\n    </StyledCard>\n  );\n};\n\nexport default ProductCard;\n","import { ITechnicalService } from '@/model/ITechnicalService';\nimport styled from 'styled-components';\nimport { Card } from './Card';\nimport { StyledLink } from '../Buttons/Link';\nimport { replacePaths } from '@/utils/route';\nimport { CREATE_EXHIBITION_ORDER_TAB_PATH } from '@/constants/router';\nimport { Flex, Image } from '@chakra-ui/react';\nimport { viewExhibitionCart } from '@/features/Routing/protected/exhibitions-by-role';\n\ninterface TechnicalServiceProps {\n  service: ITechnicalService;\n}\n\nconst Wrapper = styled(StyledLink)`\n  max-width: 240px;\n  width: 100%;\n  text-align: center;\n\n  svg {\n    transition: all ease-in-out 0.15s;\n    max-width: 96px;\n    width: 100%;\n    display: block;\n    margin-left: auto;\n    margin-right: auto;\n\n    fill: #a0aec0;\n  }\n\n  .service-name {\n    font-weight: 500;\n    font-size: 14px;\n    line-height: 20px;\n    word-wrap: normal;\n\n    color: #4a5568;\n  }\n\n  &:hover {\n    svg {\n      fill: var(--chakra-colors-brandColor);\n    }\n  }\n`;\n\nconst ServiceName = styled.div`\n  margin-top: 0.5rem;\n  height: 2.3rem;\n\n  font-weight: 500;\n  font-size: 14px;\n  line-height: 20px;\n\n  color: inherit;\n`;\n\nconst TechnicalCardWrapper = styled(Flex)`\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n`;\n\nconst TechnicalServiceCard: React.FC<TechnicalServiceProps> = ({ service }) => {\n  const { exhibitionId, stand } = viewExhibitionCart.useParams();\n  const category = service.category;\n\n  const pathName = replacePaths(CREATE_EXHIBITION_ORDER_TAB_PATH, {\n    ':exhibitionId': exhibitionId,\n    ':stand': stand,\n    ':service': category.name,\n  });\n\n  return (\n    <Wrapper to={pathName}>\n      <Card className=\"animated-card\">\n        <TechnicalCardWrapper>\n          {service.image && typeof service.image === 'string' ? (\n            <Image boxSize=\"100px\" src={service.image} alt={service.image} />\n          ) : (\n            service.image\n          )}\n          <ServiceName className=\"service-name\">\n            {category.displayName || category.name || category.id}\n          </ServiceName>\n        </TechnicalCardWrapper>\n      </Card>\n    </Wrapper>\n  );\n};\n\nexport default TechnicalServiceCard;\n","import styled from 'styled-components';\nimport SimpleBar from 'simplebar-react';\n\ninterface ContentProps {\n  className?: string;\n}\n\nexport const Content = styled.div<ContentProps>`\n  max-width: 100%;\n  width: 100%;\n\n  overflow: hidden;\n`;\n\nexport const ContentInner = styled(SimpleBar)`\n  height: 100%;\n\n  overflow-y: auto;\n\n  max-height: calc(100vh - var(--chakra-sizes-nav-bar-height) - 0px);\n  padding-bottom: 20px;\n`;\n\nexport const ContentWithSidebars = styled(Content)`\n  max-width: calc(\n    100% - var(--chakra-sizes-side-bar-width) -\n      var(--chakra-sizes-order-list-width)\n  );\n\n  margin-left: var(--chakra-sizes-side-bar-width);\n  margin-right: var(--chakra-sizes-side-bar-width);\n`;\n\nexport const AdminPanelContent = styled(Content)`\n  max-width: calc(100% - var(--chakra-sizes-side-bar-width));\n\n  margin-left: var(--chakra-sizes-side-bar-width);\n`;\n","import { SingleDatepicker } from 'chakra-dayzed-datepicker';\nimport { DatePickerDays, DatePickerMonths } from '@/utils/constants';\nimport { FieldProps } from '@/components/Fields/interfaces';\nimport { FormErrorMessage, Box, FormControl } from '@chakra-ui/react';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport {\n  Controller,\n  FieldValues,\n  useController,\n  useFormContext,\n} from 'react-hook-form';\nimport dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\n\ninterface DatePickerProps<T extends FieldValues> extends FieldProps<T> {\n  defaultValue?: Date;\n  dateFormat?: string;\n  width?: string | number;\n  errors?: any;\n}\n\nexport const DatePicker = <T extends FieldValues = FieldValues>({\n  dateFormat = 'dd.MM.yyyy',\n  // @ts-expect-error as default string doesn't found in generic T\n  name = 'date-picker',\n  label,\n  isRequired,\n  control,\n  defaultValue,\n}: DatePickerProps<T>) => {\n  const formContext = useFormContext();\n\n  if (!formContext) {\n    throw new Error(\n      `This field (${name}) should be used only within FormContext`\n    );\n  }\n\n  const { fieldState } = useController({\n    name: name,\n  });\n\n  if (!fieldState) {\n    throw new Error(\n      'fieldState not found. Is this field used within FormContext?'\n    );\n  }\n\n  dayjs.extend(utc);\n  dayjs.extend(timezone);\n\n  const defaultDate = defaultValue\n    ? new Date(dayjs(defaultValue).toString())\n    : undefined;\n\n  return (\n    <Box width=\"100%\">\n      <FormControl\n        isInvalid={fieldState.invalid}\n        isRequired={isRequired}\n        display=\"felx\"\n        flexDirection=\"column\"\n      >\n        {label && <FormLabel>{label}</FormLabel>}\n        <Controller\n          control={control}\n          name={name}\n          render={({ field }) => {\n            let fieldValue = field.value;\n\n            if (typeof field.value === 'string') {\n              // @ts-expect-error desc\n              fieldValue = new Date(dayjs(field.value).toString());\n            }\n\n            return (\n              <SingleDatepicker\n                date={fieldValue || defaultDate}\n                onDateChange={(date: Date) => {\n                  field.onChange(date);\n                }}\n                configs={{\n                  dateFormat: dateFormat,\n                  dayNames: DatePickerDays,\n                  monthNames: DatePickerMonths,\n                }}\n              />\n            );\n          }}\n        />\n        {fieldState.error?.message && (\n          <FormErrorMessage>{fieldState.error?.message}</FormErrorMessage>\n        )}\n      </FormControl>\n    </Box>\n  );\n};\n","import { PropsWithChildren } from 'react';\n\nconst isDebugEnabled = sessionStorage.getItem('debug-enabled') === '1';\n\nexport const Debug = ({ children }: PropsWithChildren) => {\n  if (!isDebugEnabled) {\n    return null;\n  }\n\n  return <>{children}</>;\n};\n","import {\n  BuildingDescriptionBodyRow,\n  BuildingDescriptionLabelContainer,\n  BuildingDescriptionWrapper,\n  BuildingTableRow,\n  BuildingTableTitle,\n  ImageDescription,\n  ImageWrapper,\n  NoteSectionContainer,\n  PriceLabel,\n  PriceNumber,\n  PriceRowContainer,\n  PricesWrapper,\n  TableContainerWrapper,\n} from '@/components/DevelopmentCard/DevelopmentCard.styled';\nimport { Table, Tbody, Thead, Tr } from '@chakra-ui/react';\nimport React, { ReactNode } from 'react';\nimport {\n  CardPricesType,\n  TableDataType,\n} from '@/components/DevelopmentCard/DevelopmentCard';\nimport { useTranslation } from 'react-i18next';\nimport parse from 'html-react-parser';\nimport { Nullable } from '../../types/support-types';\nimport { useExhibition } from '@/store/effector/exhibition';\n\ninterface ModalPricesProps {\n  prices?: CardPricesType;\n  header?: ReactNode;\n}\n\ninterface ImageSectionProps {\n  description?: Nullable<string>;\n  children?: ReactNode;\n}\n\ninterface BuildingDescriptionSectionProps {\n  buildingLabel?: Nullable<string>;\n  buildingDescription?: Nullable<string>;\n}\n\ninterface TableSectionProps {\n  tableData?: TableDataType;\n}\n\ninterface NoteSectionProps {\n  note?: string;\n}\n\nexport const ModalPrices = ({ prices, header }: ModalPricesProps) => {\n  const { t } = useTranslation();\n  const { currency } = useExhibition();\n\n  return (\n    <PricesWrapper>\n      {prices?.current && (\n        <PriceRowContainer>\n          <PriceLabel>{header}</PriceLabel>\n          <PriceNumber>\n            {t('building-info-price', { price: prices?.current, currency })}\n          </PriceNumber>\n        </PriceRowContainer>\n      )}\n      {prices?.transition &&\n        prices?.transition?.map((transition, index) => {\n          return (\n            <PriceRowContainer key={index}>\n              <PriceLabel>{transition?.label}</PriceLabel>\n              <PriceNumber>\n                {t('building-info-price', {\n                  price: transition?.price,\n                  currency,\n                })}\n              </PriceNumber>\n            </PriceRowContainer>\n          );\n        })}\n    </PricesWrapper>\n  );\n};\n\nexport const ImageSection = ({\n  description,\n  children,\n}: ImageSectionProps): JSX.Element => {\n  return (\n    <ImageWrapper>\n      {children}\n      <ImageDescription>{description}</ImageDescription>\n    </ImageWrapper>\n  );\n};\n\nexport const BuildingDescriptionSection = ({\n  buildingLabel,\n  buildingDescription,\n}: BuildingDescriptionSectionProps): JSX.Element => {\n  return (\n    <BuildingDescriptionWrapper>\n      <BuildingDescriptionLabelContainer>\n        {buildingLabel}\n      </BuildingDescriptionLabelContainer>\n      {buildingDescription && (\n        <BuildingDescriptionBodyRow>\n          {parse(buildingDescription)}\n        </BuildingDescriptionBodyRow>\n      )}\n    </BuildingDescriptionWrapper>\n  );\n};\n\nexport const TableSection = ({ tableData }: TableSectionProps): JSX.Element => {\n  return (\n    <TableContainerWrapper>\n      <Table variant=\"simple\" size=\"sm\">\n        <Thead>\n          <Tr>\n            {tableData?.titles?.map((columnTitle, index) => (\n              <BuildingTableTitle key={index}>{columnTitle}</BuildingTableTitle>\n            ))}\n          </Tr>\n        </Thead>\n        <Tbody width=\"100%\">\n          {tableData?.rows?.map((row, index) => {\n            return (\n              <Tr key={index}>\n                {row?.map((value, key) => (\n                  <BuildingTableRow key={key}>{value}</BuildingTableRow>\n                ))}\n              </Tr>\n            );\n          })}\n        </Tbody>\n      </Table>\n    </TableContainerWrapper>\n  );\n};\n\nexport const NoteSection = ({ note }: NoteSectionProps): JSX.Element => {\n  return <NoteSectionContainer>{note}</NoteSectionContainer>;\n};\n","import styled from 'styled-components';\nimport { Box, TableContainer, Td, Text, Th } from '@chakra-ui/react';\n\nexport const PricesWrapper = styled(Box)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n  padding-bottom: 10px;\n`;\n\nexport const PriceRowContainer = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n  background-color: #edf2f7;\n  border-radius: 5px;\n  height: 40px;\n  padding: 10px 0 10px 10px;\n  width: 100%;\n`;\n\nexport const PriceNumber = styled(Box)`\n  background-color: #a0aec0;\n  color: #ffffff;\n  width: 30%;\n  height: 40px;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  border-top-right-radius: 5px;\n  border-bottom-right-radius: 5px;\n`;\n\nexport const PriceLabel = styled(Box)`\n  width: 70%;\n  font-size: 14px;\n  line-height: 1;\n`;\n\nexport const ImageDescription = styled(Box)`\n  display: flex;\n  justify-content: center;\n  font-size: 12px;\n  padding-top: 5px;\n`;\n\nexport const ImageWrapper = styled(Box)`\n  padding-bottom: 10px;\n`;\n\nexport const BuildingDescriptionWrapper = styled(Box)`\n  padding-bottom: 5px;\n`;\n\nexport const BuildingDescriptionLabelContainer = styled(Box)`\n  font-size: 16px;\n  font-weight: 600;\n  padding-bottom: 5px;\n`;\n\nexport const BuildingDescriptionBodyRow = styled(Text)`\n  font-size: 14px;\n`;\n\nexport const BuildingTableTitle = styled(Th)`\n  font-size: 14px;\n  font-weight: 600;\n  padding-left: 0 !important;\n`;\n\nexport const BuildingTableRow = styled(Td)`\n  font-size: 14px;\n  padding-left: 0 !important;\n`;\n\nexport const TableContainerWrapper = styled(TableContainer)`\n  white-space: unset !important;\n  padding: 15px 0;\n`;\n\nexport const NoteSectionContainer = styled(Box)`\n  background-color: #edf2f7;\n  border-radius: 5px;\n  padding: 10px;\n  font-size: 12px;\n`;\n\nexport const BuildingCardWrapper = styled.form``;\n","import React, {\n  PropsWithChildren,\n  ReactNode,\n  useCallback,\n  useState,\n} from 'react';\nimport { Card } from '@/components/Card/Card';\nimport { useTranslation } from 'react-i18next';\nimport {\n  ButtonGroup,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  useDisclosure,\n} from '@chakra-ui/react';\nimport { Button } from '../Buttons/Button/Button';\nimport {\n  BuildingDescriptionSection,\n  ImageSection,\n  ModalPrices,\n  NoteSection,\n  TableSection,\n} from '@/components/DevelopmentCard/BuildingCardModal';\nimport { AmountCounter } from '@/components/AmountCounter';\nimport { useForm } from 'react-hook-form';\nimport { BuildingCardWrapper } from '@/components/DevelopmentCard/DevelopmentCard.styled';\nimport styled from 'styled-components';\nimport { OrderItem } from '@/model/IOrderItem';\nimport { Product } from '@/model/IProduct';\nimport { useStand } from '@/store/effector/stand';\nimport { orderApi } from '@/store/effector/order';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { ITEPortal_Contracts_Enums_BuildingType } from '@/api';\n\nexport type CardPricesType = {\n  current?: number;\n  transition?: TransitionType[];\n};\n\ntype TransitionType = {\n  label: string;\n  price: number;\n};\n\ntype TableRowType = string[];\n\nexport type TableDataType = {\n  titles: string[];\n  rows: TableRowType[];\n};\n\nexport type CardInfoType = {\n  prices?: CardPricesType;\n  imageDescription?: string | null;\n  buildingLabel?: string | null;\n  buildingDescription?: string | null;\n  tableData?: TableDataType;\n  note?: string | null;\n  images?: string[] | null;\n};\n\ninterface DevelopmentCardProps {\n  header?: ReactNode;\n  cardName: string;\n  cardInfo?: CardInfoType;\n  product: Product;\n  isSelected: boolean;\n}\n\nconst StyledCard = styled(Card)`\n  .chakra-card__header {\n    padding-bottom: 0;\n  }\n\n  .chakra-card__body {\n    padding-top: 1rem;\n    padding-bottom: 0;\n  }\n`;\n\nexport const DevelopmentCard = ({\n  header,\n  children,\n  cardInfo,\n  product,\n  isSelected,\n  ...props\n}: PropsWithChildren<DevelopmentCardProps>) => {\n  const { standForOrder } = useStand();\n  const { exhibitionId } = useExhibition();\n  const { isOpen, onOpen, onClose } = useDisclosure();\n  const [openConfirm, setOpenConfirm] = useState(false);\n  const { handleSubmit } = useForm();\n  const { t } = useTranslation();\n  const suffix = t('sqm');\n\n  const onSubmit = handleSubmit(() => {\n    setOpenConfirm(!openConfirm);\n  });\n\n  const selectBuilding = useCallback(async () => {\n    if (product) {\n      try {\n        const buildingType = Math.max(...(product.buildingTypes || []));\n\n        const priceListItemsBasedOnBuildingType =\n          await typedAxios.priceListItem.getPricelistItems({\n            exhibitionId: +exhibitionId,\n            currency: standForOrder?.currency || undefined,\n            buildingType:\n              +buildingType as ITEPortal_Contracts_Enums_BuildingType,\n            categoryIds: product.categoryId?.toString(),\n            productId: product.productId,\n          });\n\n        const building = priceListItemsBasedOnBuildingType.find(\n          (pi) => pi.productName === product.productName\n        );\n\n        if (building && building.includedPriceListItems) {\n          product.setLinkedItems(building.includedPriceListItems);\n        }\n      } catch {}\n\n      orderApi.clearProducts();\n      orderApi.addItem(\n        OrderItem.fromJSON({\n          id: product.getProductId(),\n          product,\n          amount: standForOrder?.area,\n        })\n      );\n    }\n  }, []);\n\n  const setBuilding = async () => {\n    await selectBuilding();\n  };\n\n  const ModalConfirm = () => {\n    const closeModal = () => setOpenConfirm(false);\n    const confirmTransition = () => setBuilding();\n\n    return (\n      <Modal isOpen={openConfirm} onClose={closeModal} size=\"lg\" isCentered>\n        <ModalOverlay />\n        <ModalContent>\n          <ModalHeader>{t('building-selection-confirmation')}</ModalHeader>\n          <ModalCloseButton />\n          <ModalBody>\n            {t('building-confirm', { buildingName: header })}\n          </ModalBody>\n          <ModalFooter onClick={closeModal}>\n            <ButtonGroup gap=\"1\">\n              <Button colorScheme=\"secondary\" onClick={confirmTransition}>\n                {t('yes')}\n              </Button>\n              <Button colorScheme=\"black\" onClick={closeModal}>\n                {t('cancel')}\n              </Button>\n            </ButtonGroup>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    );\n  };\n\n  const ModalInfoComponent = (): JSX.Element => {\n    return (\n      <Modal isOpen={isOpen} onClose={onClose} size=\"2xl\">\n        <ModalOverlay />\n        <ModalContent>\n          <ModalHeader>{header}</ModalHeader>\n          <ModalCloseButton />\n          <ModalBody>\n            <ModalPrices prices={cardInfo?.prices} header={header} />\n            <ImageSection description={cardInfo?.imageDescription}>\n              {children}\n            </ImageSection>\n            <BuildingDescriptionSection\n              buildingLabel={cardInfo?.buildingLabel}\n              buildingDescription={cardInfo?.buildingDescription}\n            />\n            {cardInfo?.tableData && (\n              <TableSection tableData={cardInfo?.tableData} />\n            )}\n            {cardInfo?.note && <NoteSection note={cardInfo?.note} />}\n          </ModalBody>\n        </ModalContent>\n      </Modal>\n    );\n  };\n\n  const SelectionButton = () => {\n    const changeHandler = (value: number) => {\n      if (product && product instanceof Product) {\n        orderApi.changeItem({\n          id: product.getProductId(),\n          product,\n          amount: value,\n        });\n      }\n    };\n\n    return isSelected ? (\n      <AmountCounter\n        amountCounterValue={standForOrder?.area}\n        onChange={(counterValue: number) => changeHandler(counterValue)}\n        disabled={true}\n        suffix={suffix}\n        precision={2}\n        step={0.25}\n      />\n    ) : (\n      <Button colorScheme=\"secondary\" width=\"90px\">\n        {t('choose')}\n      </Button>\n    );\n  };\n\n  const BuildingInfoButton = (): JSX.Element => {\n    return (\n      <>\n        <Button colorScheme=\"black\" width=\"110px\" onClick={onOpen}>\n          {t('moreDetails')}\n        </Button>\n        <ModalInfoComponent />\n        <ModalConfirm />\n      </>\n    );\n  };\n\n  return (\n    <StyledCard\n      header={header}\n      footer={\n        <BuildingCardWrapper onSubmit={onSubmit}>\n          <ButtonGroup spacing=\"2\">\n            <BuildingInfoButton />\n            <SelectionButton />\n          </ButtonGroup>\n        </BuildingCardWrapper>\n      }\n      {...props}\n    >\n      {children}\n    </StyledCard>\n  );\n};\n","import { Text, TextProps } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { AttachmentIcon, DeleteIcon } from '@chakra-ui/icons';\nimport { FileUtils } from '@/utils/file-utils';\nimport styled from 'styled-components';\nimport { ModalFactory } from '@/components/Modal/api';\nimport React, { MouseEvent, useState } from 'react';\nimport Download from 'yet-another-react-lightbox/plugins/download';\nimport Lightbox from 'yet-another-react-lightbox';\n\ntype DownloadFileLinkPropsType = {\n  attachmentUrl?: string | null;\n  fileName?: string | null;\n  onDelete?: () => Promise<void>;\n  withIcon?: boolean;\n} & TextProps;\n\nconst imageExtensions = ['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp'];\n\nconst isImage = (fileName: string) => {\n  return imageExtensions.some((ext) => fileName.endsWith(`.${ext}`));\n};\n\nconst FileLink = styled(Text)`\n  .delete-handler {\n    visibility: hidden;\n    margin-top: -5px;\n    margin-left: 1em;\n  }\n  &:hover {\n    .delete-handler {\n      visibility: visible;\n    }\n  }\n`;\n\nexport const DownloadFileLink = (props: DownloadFileLinkPropsType) => {\n  const {\n    attachmentUrl,\n    fileName: fileNameFromProps,\n    onDelete,\n    withIcon = true,\n    ...textProps\n  } = props;\n  const { t } = useTranslation();\n  const canBeDeleted = typeof onDelete === 'function';\n  const couldBeOpenedInPopup = attachmentUrl && isImage(attachmentUrl);\n  const [open, setOpen] = useState(false);\n\n  if (!attachmentUrl) {\n    return null;\n  }\n\n  const handleDeleteFile = (e: MouseEvent<SVGElement>) => {\n    e.preventDefault();\n    e.stopPropagation();\n\n    if (typeof onDelete !== 'function') {\n      return;\n    }\n\n    ModalFactory.confirm({\n      id: 'file-delete-confirmation',\n      Component: () => <>{t('delete-file-confirmation')}</>,\n      okLabel: t('confirm-delete'),\n      onOk: async () => {\n        await onDelete();\n\n        ModalFactory.closeById('file-delete-confirmation');\n      },\n    });\n  };\n\n  const downloadAttachment = () => {\n    if (attachmentUrl) {\n      if (couldBeOpenedInPopup) {\n        setOpen(true);\n\n        return;\n      }\n\n      FileUtils.saveUrlToBlob(attachmentUrl);\n    }\n  };\n\n  return (\n    <FileLink\n      cursor=\"pointer\"\n      fontSize={12}\n      color=\"red\"\n      mt={2}\n      onClick={downloadAttachment}\n      {...textProps}\n    >\n      {withIcon && <AttachmentIcon />} {fileNameFromProps || t('download-file')}\n      {canBeDeleted && (\n        <DeleteIcon className=\"delete-handler\" onClick={handleDeleteFile} />\n      )}\n      {couldBeOpenedInPopup && (\n        <Lightbox\n          open={open}\n          close={() => setOpen(false)}\n          index={0}\n          slides={[\n            {\n              src: attachmentUrl,\n            },\n          ]}\n          animation={{ fade: 0 }}\n          controller={{ closeOnPullDown: true, closeOnBackdropClick: true }}\n          styles={{ root: { '--yarl__color_backdrop': 'rgba(0, 0, 0, .7)' } }}\n          plugins={[Download]}\n          download={{\n            download: ({ slide }) => {\n              FileUtils.saveUrlToBlob(slide.src);\n            },\n          }}\n        />\n      )}\n    </FileLink>\n  );\n};\n","import {\n  FieldValues,\n  Path,\n  useController,\n  useFormContext,\n} from 'react-hook-form';\nimport {\n  Checkbox as BaseCheckbox,\n  CheckboxProps as BaseCheckboxProps,\n} from '@chakra-ui/react';\n\ninterface CheckboxProps<T extends FieldValues = FieldValues>\n  extends Omit<BaseCheckboxProps, 'name'> {\n  name: Path<T>;\n}\n\nexport const Checkbox = <T extends FieldValues = FieldValues>(\n  props: CheckboxProps<T>\n) => {\n  const { onChange, name } = props;\n  const formContext = useFormContext();\n\n  if (!formContext) {\n    throw new Error(\n      `This field (${name}) should be used only within FormContext`\n    );\n  }\n\n  const { fieldState, field } = useController({\n    name: name,\n  });\n\n  if (!fieldState) {\n    throw new Error(\n      'fieldState not found. Is this field used within FormContext?'\n    );\n  }\n\n  const registeredFieldProps = formContext.register(name as Path<T>, {\n    onChange: (event) => {\n      if (typeof onChange === 'function') {\n        onChange(event);\n      }\n\n      formContext.clearErrors(name);\n    },\n  });\n\n  return (\n    <>\n      <BaseCheckbox\n        colorScheme=\"red\"\n        id={name}\n        {...props}\n        {...registeredFieldProps}\n        isChecked={field.value}\n        isInvalid={!!fieldState.error}\n      />\n      {/*  todo add error handling */}\n    </>\n  );\n};\n","import { FieldProps } from './interfaces';\nimport {\n  FormErrorMessage,\n  Input as ChakraInput,\n  Box,\n  FormControl,\n  InputGroup,\n  InputLeftAddon,\n  InputRightAddon,\n  InputProps as ChakraInputProps,\n  Tooltip,\n  Flex,\n} from '@chakra-ui/react';\nimport React, { ReactNode } from 'react';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport styled from 'styled-components';\nimport {\n  FieldValues,\n  Path,\n  useController,\n  useFormContext,\n} from 'react-hook-form';\nimport { InfoIcon } from '@chakra-ui/icons';\n\ninterface InputProps<T extends FieldValues> extends FieldProps<T> {\n  maxWidth?: number | string | null;\n  defaultValue?: string;\n  disabled?: boolean;\n  value?: string;\n  onChange?: any;\n  addonLeft?: ReactNode;\n  addonRight?: ReactNode;\n  tooltip?: string;\n}\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n`;\n\nexport const ParticipantCheckContainer = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  gap: 10px;\n  width: 100%;\n`;\n\nconst Input = <T extends FieldValues = FieldValues>({\n  // @ts-expect-error as default string doesn't found in generic T\n  name = 'input',\n  label,\n  placeholder,\n  settings,\n  maxWidth = '170px',\n  defaultValue,\n  isRequired,\n  disabled,\n  value,\n  onChange,\n  addonLeft,\n  addonRight,\n  tooltip,\n  children,\n  ...rest\n}: InputProps<T> & ChakraInputProps) => {\n  const formContext = useFormContext();\n\n  if (!formContext) {\n    throw new Error(\n      `This field (${name}) should be used only within FormContext`\n    );\n  }\n\n  const { fieldState } = useController({\n    name: name,\n  });\n\n  if (!fieldState) {\n    throw new Error(\n      'fieldState not found. Is this field used within FormContext?'\n    );\n  }\n\n  const registerFieldName = formContext.register(name as Path<T>, {\n    onChange: (event) => {\n      if (typeof onChange === 'function') {\n        onChange(event);\n      }\n\n      formContext.clearErrors(name);\n    },\n    ...settings,\n  });\n\n  return (\n    <Box width=\"100%\" maxWidth={maxWidth !== null ? maxWidth : undefined}>\n      <FormControlWrapper\n        isInvalid={fieldState.invalid}\n        isRequired={isRequired}\n      >\n        <Flex flexDirection=\"row\">\n          {label && <FormLabel htmlFor={name}>{label}</FormLabel>}\n          {tooltip && (\n            <Tooltip label={tooltip} hasArrow placement=\"top\">\n              <InfoIcon\n                color=\"lightgray\"\n                boxSize={4}\n                style={{ marginTop: 4 }}\n              />\n            </Tooltip>\n          )}\n        </Flex>\n        <InputGroup>\n          {addonLeft && <InputLeftAddon>{addonLeft}</InputLeftAddon>}\n          <ParticipantCheckContainer>\n            <ChakraInput\n              placeholder={placeholder}\n              maxWidth={maxWidth !== null ? maxWidth : undefined}\n              defaultValue={defaultValue}\n              disabled={disabled}\n              value={value}\n              id={name}\n              {...rest}\n              {...registerFieldName}\n            />\n            {children}\n          </ParticipantCheckContainer>\n          {addonRight && <InputRightAddon>{addonRight}</InputRightAddon>}\n        </InputGroup>\n        {fieldState.error?.message && (\n          <FormErrorMessage>{fieldState.error?.message}</FormErrorMessage>\n        )}\n      </FormControlWrapper>\n    </Box>\n  );\n};\n\nexport default Input;\n","import React, { CSSProperties, ReactNode } from 'react';\nimport {\n  NumberDecrementStepper,\n  NumberIncrementStepper,\n  NumberInput,\n  NumberInputField,\n  NumberInputStepper,\n  NumberInputProps,\n  FormControl,\n  FormErrorMessage,\n  InputGroup,\n  InputLeftAddon,\n} from '@chakra-ui/react';\nimport { FieldProps } from './interfaces';\nimport {\n  FieldValues,\n  Path,\n  useController,\n  useFormContext,\n} from 'react-hook-form';\nimport { FormLabel } from '../FormLabel/FormLabel';\n\ntype InputNumberProps<T extends FieldValues = FieldValues> = NumberInputProps &\n  FieldProps<T> & {\n    defaultValue?: number;\n    addon?: ReactNode;\n  };\n\nconst StyledForCaseWithAddon: CSSProperties = {\n  borderTopLeftRadius: 0,\n  borderBottomLeftRadius: 0,\n};\n\nconst InputNumber = <T extends FieldValues = FieldValues>({\n  name,\n  placeholder,\n  settings,\n  min,\n  max,\n  defaultValue,\n  label,\n  addon,\n  ...rest\n}: InputNumberProps<T>) => {\n  const formContext = useFormContext();\n\n  if (!formContext) {\n    throw new Error(\n      `This field (${name}) should be used only within FormContext`\n    );\n  }\n\n  const { fieldState, field } = useController({\n    name: name,\n  });\n\n  if (!fieldState) {\n    throw new Error(\n      'fieldState not found. Is this field used within FormContext?'\n    );\n  }\n\n  const { onChange, ...registerFieldName } = formContext.register(\n    name as Path<FieldValues>,\n    {\n      onChange: () => {\n        formContext.clearErrors(name);\n      },\n      ...settings,\n    }\n  );\n\n  return (\n    <FormControl isInvalid={fieldState.invalid}>\n      {label && <FormLabel htmlFor={name}>{label}</FormLabel>}\n\n      <NumberInput\n        step={1}\n        precision={0}\n        min={min}\n        max={max}\n        defaultValue={defaultValue}\n        {...rest}\n        onChange={(valueAsString, valueAsNumber) => {\n          onChange({ target: { value: valueAsNumber, name } });\n        }}\n      >\n        <InputGroup>\n          {addon && <InputLeftAddon>{addon}</InputLeftAddon>}\n          <NumberInputField\n            id={name}\n            placeholder={placeholder}\n            {...registerFieldName}\n            value={field.value}\n            style={addon ? StyledForCaseWithAddon : {}}\n          />\n        </InputGroup>\n        <NumberInputStepper>\n          <NumberIncrementStepper />\n          <NumberDecrementStepper />\n        </NumberInputStepper>\n      </NumberInput>\n\n      {fieldState.error?.message && (\n        <FormErrorMessage>{fieldState.error?.message}</FormErrorMessage>\n      )}\n    </FormControl>\n  );\n};\n\nexport default InputNumber;\n","import styled from 'styled-components';\nimport { Select } from '@chakra-ui/react';\nimport { BadgeItem } from '@/components/OrderTableRow/OrderTableRow';\nimport { FieldProps } from './interfaces';\nimport {\n  FieldValues,\n  Path,\n  useController,\n  useFormContext,\n} from 'react-hook-form';\n\nconst OrderTableRowContainerBadgeComponent = styled(Select)`\n  //padding: 5px 0;\n  width: 170px !important;\n`;\n\ninterface BadgeDataProp extends FieldProps {\n  options?: BadgeItem[];\n}\n\nconst SelectComponent: React.FC<BadgeDataProp> = ({\n  options,\n  placeholder,\n  settings,\n  name = 'select',\n}) => {\n  const formContext = useFormContext();\n\n  if (!formContext) {\n    throw new Error(\n      `This field (${name}) should be used only within FormContext`\n    );\n  }\n\n  const { fieldState } = useController({\n    name: name,\n  });\n\n  if (!fieldState) {\n    throw new Error(\n      'fieldState not found. Is this field used within FormContext?'\n    );\n  }\n\n  const registerFieldName = formContext.register(name as Path<FieldValues>, {\n    onChange: () => {\n      formContext.clearErrors(name);\n    },\n    ...settings,\n  });\n\n  return (\n    <OrderTableRowContainerBadgeComponent\n      rootProps={{ width: '170px' }}\n      defaultValue=\"\"\n      {...registerFieldName}\n    >\n      <option value=\"\" disabled>\n        {placeholder}\n      </option>\n      {options?.map(({ key, value }) => {\n        return (\n          <option value={key} key={key}>\n            {value}\n          </option>\n        );\n      })}\n    </OrderTableRowContainerBadgeComponent>\n  );\n};\n\nexport default SelectComponent;\n","import React, { useCallback } from 'react';\nimport { FileWithPath, useDropzone, Accept } from 'react-dropzone';\nimport { Box, FormControl, FormErrorMessage, Text } from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { FieldProps } from '@/components/Fields/interfaces';\nimport { useTranslation } from 'react-i18next';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport { FieldValues, useController, useFormContext } from 'react-hook-form';\n\nconst Container = styled.div`\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 5px;\n  border-width: 2px;\n  border-radius: 5px;\n  border-color: silver;\n  border-style: dashed;\n  color: grey;\n  outline: none;\n  transition: border 0.24s ease-in-out;\n  cursor: pointer;\n`;\n\ninterface UploadFileDropzoneProps<T extends FieldValues = FieldValues>\n  extends FieldProps<T> {\n  multiple?: boolean;\n  defaultValue?: string;\n  accept?: Accept;\n  defaultLabel?: React.ReactNode;\n}\n\nexport const UploadFileDropzone = <T extends FieldValues = FieldValues>({\n  label,\n  multiple = false,\n  // @ts-expect-error as default string doesn't found in generic T\n  name = 'download-file',\n  isRequired,\n  defaultValue,\n  accept,\n  // accept = { 'image/*': [] },\n  defaultLabel: defaultLabelFromProps,\n}: UploadFileDropzoneProps<T>) => {\n  const { t } = useTranslation();\n\n  const { setValue } = useFormContext<T>();\n  const onDrop = useCallback(\n    (droppedFiles: File[]) => {\n      setValue(\n        name,\n        // @ts-expect-error as generic T doesn't know that value is File\n        droppedFiles,\n        { shouldValidate: true }\n      );\n    },\n    [setValue, name]\n  );\n  const { getRootProps, getInputProps, acceptedFiles } = useDropzone({\n    accept,\n    multiple: multiple,\n    onDrop,\n  });\n\n  const { fieldState } = useController({\n    name: name,\n  });\n\n  const filesLength = acceptedFiles.length;\n  const defaultLabel = defaultLabelFromProps || t('upload-file-default-label');\n\n  const files = acceptedFiles.map((file: FileWithPath) => (\n    <li key={file.path}>\n      {file.path} - {file.size} bytes\n    </li>\n  ));\n\n  const uploadFileLabel = filesLength\n    ? acceptedFiles.length > 1\n      ? t('multiple-files-selected', { filesCount: acceptedFiles.length })\n      : files\n    : defaultValue || defaultLabel;\n\n  return (\n    <Box>\n      <FormControl isRequired={isRequired} isInvalid={fieldState.invalid}>\n        {label && <FormLabel>{label}</FormLabel>}\n        <Box className=\"container\">\n          <Container {...getRootProps()}>\n            <input {...getInputProps()} />\n            <Text>{uploadFileLabel}</Text>\n          </Container>\n        </Box>\n        {fieldState.error?.message && (\n          <FormErrorMessage>{fieldState.error.message}</FormErrorMessage>\n        )}\n      </FormControl>\n    </Box>\n  );\n};\n","import { FormLabel as ChakraFormLabel, FormLabelProps } from '@chakra-ui/react';\nimport { PropsWithChildren } from 'react';\n\nconst formLabelStyle = {\n  color: 'grey',\n  fontWeight: 500,\n  fontSize: '16px',\n};\n\nexport const FormLabel = (\n  props: PropsWithChildren<FormLabelProps>\n): JSX.Element => {\n  return <ChakraFormLabel style={formLabelStyle} {...props} />;\n};\n","import { Product } from '@/model/IProduct';\nimport { DomainRecord } from '@/model/common';\nimport { CardInfoType } from '@/components/DevelopmentCard';\nimport { ITEPortal_Domain_Dto_PriceListItemSummary } from '../../../../api';\n\nexport function getSelectBuildingInfo(\n  products: Product[],\n  data: ITEPortal_Domain_Dto_PriceListItemSummary[]\n): DomainRecord[] {\n  return products.map((product) => {\n    const cardInfo: CardInfoType = {};\n\n    const selectBuildingData = data?.find(\n      (productData) => productData?.productName === product?.productName\n    );\n\n    const buildingType = selectBuildingData?.buildingTypes?.find(\n      (type) => type !== 0\n    );\n\n    cardInfo['prices'] = {\n      current: product?.price,\n    };\n    cardInfo['imageDescription'] = selectBuildingData?.imageDescription;\n    cardInfo['buildingLabel'] = selectBuildingData?.productDisplayName;\n    cardInfo['buildingDescription'] = selectBuildingData?.description;\n    cardInfo['note'] = selectBuildingData?.additionalNotes;\n    cardInfo['images'] = selectBuildingData?.imageUrls;\n\n    return {\n      key: product.getProductId(),\n      text:\n        product.productDisplayName ||\n        product.productName ||\n        product.getProductId(),\n      product: product,\n      buildingType,\n      cardInfo,\n    } satisfies DomainRecord;\n  });\n}\n","import React, { useEffect } from 'react';\nimport { DevelopmentCard } from '@/components/DevelopmentCard';\nimport styled from 'styled-components';\nimport { t } from 'i18next';\nimport { LoaderWrapper } from '@/theme/css/styles';\nimport { Loader } from '@/components/Loader/Loader';\nimport { getSelectBuildingInfo } from '@/components/Forms/Services/SelectBuilding/getSelectBuildingInfo';\nimport { ShowMoreText } from '@/components/Forms/Services/TemporaryStaff';\nimport { createExhibitionOrderServiceRoute } from '../../../../features/Routing/protected/exhibitions-by-role';\nimport { CATEGORY_TYPES } from '../../../../constants/categorie';\nimport { typedAxios } from '../../../../api/typed-axios';\nimport { ProductUtils } from '@/utils/product-utils';\nimport { useStand } from '@/store/effector/stand';\nimport { useOrder } from '@/store/effector/order';\nimport { loadingApi, useAppLoading } from '@/store/effector/loading';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '../../../../api';\nimport { Box, Text } from '@chakra-ui/react';\nimport { useVatSettings } from '@/store/effector/vat-settings';\nimport { BuildingGallery } from '@/components/ImageGalleries/BuildingGallery';\nimport { useQuery } from '@tanstack/react-query';\n\nconst BuildingTypesWrapper = styled.div`\n  display: flex;\n  flex-wrap: wrap;\n  flex-direction: row;\n  gap: 20px;\n\n  & > div {\n    flex-basis: 50%;\n    max-width: calc(50% - 10px);\n  }\n`;\n\ninterface SelectBuildingCardProps {\n  description?: ITEPortal_Domain_Dto_CategoryDto['description'];\n}\n\nconst useBuildingsLoader = () => {\n  const { exhibitionId } = createExhibitionOrderServiceRoute.useParams();\n  const { standForOrder, originalBuildingType } = useStand();\n\n  return useQuery({\n    queryKey: [\n      'buildings',\n      exhibitionId,\n      standForOrder,\n      standForOrder?.currency,\n    ],\n    queryFn: async () => {\n      const data = await typedAxios.priceListItem.getPricelistItems({\n        exhibitionId: +exhibitionId,\n        currency: standForOrder?.currency || undefined,\n        buildingType: standForOrder.buildingType || originalBuildingType,\n      });\n\n      const productItemCardData = data.filter(\n        (item) => item.categoryName === CATEGORY_TYPES.SELECT_BUILDING\n      );\n\n      const productItemCardObjects = productItemCardData?.map((product) => {\n        return ProductUtils.createProductFromPriceListItem(product);\n      });\n\n      const productItemsObjects = getSelectBuildingInfo(\n        productItemCardObjects,\n        productItemCardData\n      );\n\n      return productItemsObjects;\n    },\n  });\n};\n\nexport const SelectBuilding = ({\n  description,\n}: SelectBuildingCardProps): JSX.Element => {\n  const { items } = useOrder();\n  const isLoader = useAppLoading();\n  const { vatMessage } = useVatSettings();\n\n  const { data: cardItems = [], isFetching } = useBuildingsLoader();\n\n  useEffect(\n    function toggleLoading() {\n      if (isFetching) {\n        loadingApi.on();\n      } else {\n        loadingApi.off();\n      }\n    },\n    [isFetching]\n  );\n\n  return (\n    <>\n      {vatMessage && (\n        <Box marginY={4}>\n          <Text color=\"gray.500\">{vatMessage}</Text>\n        </Box>\n      )}\n      {description && !isLoader && (\n        <ShowMoreText\n          lines={2}\n          keepNewLines={false}\n          more={t('showMore')}\n          less={t('showLess')}\n          anchorClass=\"show-more-less-clickable\"\n        >\n          {description}\n        </ShowMoreText>\n      )}\n      {isLoader ? (\n        <LoaderWrapper>\n          <Loader />\n        </LoaderWrapper>\n      ) : (\n        <>\n          {cardItems.length > 0 && (\n            <BuildingTypesWrapper>\n              {cardItems.map(({ key, text, cardInfo, product }) => {\n                const isSelected = items?.some(\n                  (oi) => oi.id === product.getProductId()\n                );\n\n                return (\n                  <DevelopmentCard\n                    header={text}\n                    key={key}\n                    cardName={key}\n                    cardInfo={cardInfo}\n                    product={product}\n                    isSelected={isSelected}\n                  >\n                    {cardInfo?.images && (\n                      <BuildingGallery images={cardInfo?.images} />\n                    )}\n                  </DevelopmentCard>\n                );\n              })}\n            </BuildingTypesWrapper>\n          )}\n        </>\n      )}\n    </>\n  );\n};\n","import {\n  SELECT_BUILDING,\n  TEMPORARY_STAFF,\n} from '@/constants/technical-services';\nimport { SelectBuilding } from './SelectBuilding';\nimport ProductItemsCard from './common/ProductItemsCard';\nimport TemporaryStaff from './TemporaryStaff';\nimport { Category } from '@/model/ICategory';\n\ninterface ServiceFactoryProps {\n  category: Category;\n  description: string;\n}\n\nconst ServiceFactory = ({ category }: ServiceFactoryProps) => {\n  switch (category.name) {\n    case SELECT_BUILDING:\n      return <SelectBuilding description={category.description} />;\n    case TEMPORARY_STAFF:\n      return <TemporaryStaff description={category.description} />;\n    default:\n      return <ProductItemsCard serviceCategory={category} />;\n  }\n};\n\nexport default ServiceFactory;\n","import { Product } from '@/model/IProduct';\nimport { FieldValues, FormProvider, useForm } from 'react-hook-form';\nimport styled from 'styled-components';\nimport { Button, Flex, Tooltip } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport Select from '@/components/Fields/Select';\nimport { WarningIcon } from '@chakra-ui/icons';\nimport {\n  BadgeItem,\n  RowDataStructure,\n} from '@/components/OrderTableRow/OrderTableRow';\nimport InputNumber from '@/components/Fields/InputNumber';\nimport Input from '@/components/Fields/Input';\n\ninterface RowProps {\n  label: string;\n  submitHandler: (product: Product, values: FieldValues) => void;\n  product: Product;\n  params: RowDataStructure[];\n}\n\nconst Form = styled.form`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n\n  padding: 20px 0;\n\n  &:not(:last-child) {\n    border-bottom: 1px solid #e2e8f0;\n  }\n`;\n\nconst Wrapper = styled.div`\n  display: flex;\n  flex-direction: row;\n  margin-left: auto;\n  align-items: center;\n`;\n\nconst Price = styled.div`\n  font-weight: 600;\n  font-size: 14px;\n  line-height: 20px;\n  text-align: right;\n  margin-right: 1rem;\n`;\n\nconst Label = styled.div`\n  font-weight: 400;\n  font-size: 14px;\n  line-height: 20px;\n  margin-bottom: 0.75rem;\n`;\n\nexport const TooltipWrapper = styled.span`\n  margin-left: 0.25rem;\n  color: #cbd5e0;\n  font-size: 16px;\n`;\n\nconst rowDataComponentsConfig = {\n  inputNumber: InputNumber,\n  input: Input,\n  badge: Select,\n};\n\nconst Row: React.FC<RowProps> = ({ label, product, submitHandler, params }) => {\n  const { t } = useTranslation();\n  const instance = useForm();\n  const {\n    handleSubmit,\n    formState: { isValid },\n  } = instance;\n  const description = product?.description;\n\n  const onSubmit = handleSubmit((data) => {\n    submitHandler(product, data);\n  });\n\n  return (\n    <FormProvider {...instance}>\n      <Form onSubmit={onSubmit}>\n        <div>\n          <Label>\n            {label}\n            {description && (\n              <TooltipWrapper>\n                <Tooltip hasArrow label={description}>\n                  <WarningIcon color=\"var(--chakra-colors-brandColor)\" />\n                </Tooltip>\n              </TooltipWrapper>\n            )}\n          </Label>\n\n          <Flex gap=\"12px\" alignItems=\"center\">\n            {params?.map((tableElement, key) => {\n              const Component =\n                rowDataComponentsConfig?.[\n                  tableElement?.type as 'badge' | 'input' | 'inputNumber'\n                ];\n\n              return (\n                <Component\n                  key={key}\n                  // @ts-expect-error as Component is generic\n                  text={tableElement?.text as string}\n                  options={tableElement?.options as BadgeItem[]}\n                  name={tableElement.name as string}\n                  placeholder={tableElement.placeholder}\n                  settings={tableElement.settings}\n                  min={0}\n                />\n              );\n            })}\n          </Flex>\n        </div>\n        <Wrapper>\n          <Price>{product.formattedPrice}</Price>\n          <Button type=\"submit\" variant=\"brandSecondary\" isDisabled={!isValid}>\n            {t('choose')}\n          </Button>\n        </Wrapper>\n      </Form>\n    </FormProvider>\n  );\n};\n\nexport default Row;\n","import { DomainRecord } from '@/model/common';\nimport { RowDataStructure } from '@/components/OrderTableRow/OrderTableRow';\nimport { LANGUAGES_OPTIONS } from '@/constants/languages';\nimport { t } from 'i18next';\nimport { Product } from '@/model/IProduct';\n\nfunction getTemporaryStaffConfig(products: Product[]): DomainRecord[] {\n  return products.map((product) => {\n    const params: RowDataStructure[] = [];\n\n    switch (product?.fieldType) {\n      case 'select':\n        params.push({\n          type: 'badge',\n          name: 'language',\n          text: product.formattedPrice,\n          options: LANGUAGES_OPTIONS,\n          settings: { required: true },\n          placeholder: t('chooseLanguage') as string,\n        });\n        break;\n      case 'input':\n        params.push({\n          type: 'input',\n          name: 'language',\n          text: product.formattedPrice,\n          placeholder: t('enterLanguage') as string,\n          settings: { required: true },\n        });\n        break;\n    }\n\n    params.push(\n      {\n        type: 'inputNumber',\n        name: 'staff_amount',\n        placeholder: t('personAmountPlaceholder') as string,\n        settings: { required: true, min: 1 },\n      },\n      {\n        type: 'inputNumber',\n        name: 'day_amount',\n        placeholder: t('dayAmountPlaceholder') as string,\n        settings: { required: true, min: 1 },\n      }\n    );\n\n    return {\n      key: product.getProductId(),\n      text:\n        product.productDisplayName ||\n        product.productName ||\n        product.getProductId() + '',\n      product: product,\n      params,\n    };\n  });\n}\n\nexport default getTemporaryStaffConfig;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport getTemporaryStaffConfig from './config';\nimport { Product } from '@/model/IProduct';\nimport { FieldValues } from 'react-hook-form';\nimport ProductCard from '@/components/Card/ProductCard';\nimport ReactShowMoreText from 'react-show-more-text';\nimport styled from 'styled-components';\nimport Row from './Row';\nimport { TemporaryStaffOrderItem } from '@/model/IOrderItem';\nimport fetchApi from '@/utils/fetchAPI';\nimport { GET_PRICELIST_PRODUCTS } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { DomainRecord } from '@/model/common';\nimport { Loader } from '@/components/Loader/Loader';\nimport { t } from 'i18next';\nimport { LoaderWrapper } from '@/theme/css/styles';\nimport { createExhibitionOrderServiceRoute } from '@/features/Routing/protected/exhibitions-by-role';\nimport { CATEGORY_TYPES } from '@/constants/categorie';\nimport { ITEPortal_Domain_Dto_PriceListItemSummary } from '@/api';\nimport { ProductUtils } from '@/utils/product-utils';\nimport { useStand } from '@/store/effector/stand';\nimport { orderApi } from '@/store/effector/order';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '../../../../api';\nimport { useVatSettings } from '@/store/effector/vat-settings';\nimport { Box, Text } from '@chakra-ui/react';\n\ninterface TemporaryStaffProps {\n  description: ITEPortal_Domain_Dto_CategoryDto['description'];\n}\n\nexport const ShowMoreText = styled(ReactShowMoreText)`\n  position: relative;\n  font-size: 14px;\n  font-weight: 400;\n  line-height: 20px;\n  margin-bottom: 24px;\n  padding-bottom: 20px;\n\n  .show-more-less-clickable {\n    position: absolute;\n    right: 0;\n    cursor: pointer;\n    color: var(--chakra-colors-brandColor);\n    text-decoration: none;\n    transform: translateY(100%);\n  }\n`;\n\nconst TemporaryStaff: React.FC<TemporaryStaffProps> = ({ description }) => {\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [productItems, setProductItems] = useState<DomainRecord[]>([]);\n  const { standForOrder } = useStand();\n  const { vatMessage } = useVatSettings();\n  const { exhibitionId } = createExhibitionOrderServiceRoute.useParams();\n\n  const clickHandler = useCallback((product: Product, values: FieldValues) => {\n    const language = values?.language as string | undefined;\n    const personAmount = parseInt(values?.staff_amount);\n    const dayAmount = parseInt(values?.day_amount);\n\n    orderApi.addItem(\n      new TemporaryStaffOrderItem({\n        id: product.getProductId(),\n        product: product,\n        language: language,\n        peopleAmount: personAmount,\n        dayAmount: dayAmount,\n      })\n    );\n  }, []);\n\n  useEffect(() => {\n    const fetchData = async () => {\n      const culture = localStorage.getItem('lang');\n\n      setIsSubmitting(true);\n      try {\n        const { data } = await fetchApi<\n          Array<ITEPortal_Domain_Dto_PriceListItemSummary>\n        >(GET_PRICELIST_PRODUCTS, {\n          method: FetchMethods.Get,\n          params: {\n            exhibitionId,\n            currency: standForOrder?.currency || undefined,\n            buildingType: standForOrder?.buildingType,\n            culture,\n          },\n        });\n\n        const productItemCardData = data.filter(\n          (item: any) => item.categoryName === CATEGORY_TYPES.TEMPORARY_STAFF\n        );\n\n        const productItemCardObjects = productItemCardData?.map((product) => {\n          return ProductUtils.createProductFromPriceListItem(product);\n        });\n\n        const productItemsObjects = getTemporaryStaffConfig(\n          productItemCardObjects\n        );\n\n        setProductItems(productItemsObjects);\n      } finally {\n        setIsSubmitting(false);\n      }\n    };\n\n    fetchData();\n  }, []);\n\n  return (\n    <>\n      {vatMessage && (\n        <Box marginY={4}>\n          <Text color=\"gray.500\">{vatMessage}</Text>\n        </Box>\n      )}\n      {description && !isSubmitting && (\n        <ShowMoreText\n          lines={2}\n          keepNewLines={false}\n          more={t('showMore')}\n          less={t('showLess')}\n          anchorClass=\"show-more-less-clickable\"\n        >\n          {description}\n        </ShowMoreText>\n      )}\n      {isSubmitting ? (\n        <LoaderWrapper>\n          <Loader />\n        </LoaderWrapper>\n      ) : (\n        productItems?.length > 0 && (\n          <ProductCard>\n            {productItems.map(({ key, text, product, params }) => (\n              <Row\n                key={key}\n                submitHandler={clickHandler}\n                label={text}\n                product={product}\n                params={params || []}\n              />\n            ))}\n          </ProductCard>\n        )\n      )}\n    </>\n  );\n};\n\nexport default TemporaryStaff;\n","import { OrderTableRow } from '@/components/OrderTableRow/OrderTableRow';\nimport ProductCard from '@/components/Card/ProductCard';\nimport { ShowMoreText } from '@/components/Forms/Services/TemporaryStaff';\nimport { useTranslation } from 'react-i18next';\nimport { Loader } from '@/components/Loader/Loader';\nimport { LoaderWrapper } from '@/theme/css/styles';\nimport { Category } from '@/model/ICategory';\nimport TechnicalServicesGrid from '@/components/TechnicalServicesGrid';\nimport { useProductsLoader } from './use-products-loader';\nimport { Box, Text } from '@chakra-ui/react';\nimport { useVatSettings } from '@/store/effector/vat-settings';\n\ninterface ProductItemsCardProps {\n  serviceCategory: Category;\n}\n\nconst ProductItemsCard = ({ serviceCategory }: ProductItemsCardProps) => {\n  const serviceSpecification = serviceCategory.id;\n  const { t } = useTranslation();\n  const { vatMessage } = useVatSettings();\n\n  const { productItems, isLoading } = useProductsLoader({\n    categoryId: serviceSpecification,\n  });\n\n  if (isLoading) {\n    return (\n      <LoaderWrapper>\n        <Loader />\n      </LoaderWrapper>\n    );\n  }\n\n  return (\n    <>\n      {vatMessage && (\n        <Box marginY={4}>\n          <Text color=\"gray.500\">{vatMessage}</Text>\n        </Box>\n      )}\n      {serviceCategory.description && (\n        <ShowMoreText\n          lines={2}\n          keepNewLines\n          more={t('showMore')}\n          less={t('showLess')}\n          anchorClass=\"show-more-less-clickable\"\n        >\n          {serviceCategory.description}\n        </ShowMoreText>\n      )}\n\n      {serviceCategory.tree.length > 0 && (\n        <Box mb={4}>\n          <TechnicalServicesGrid category={serviceCategory} />\n        </Box>\n      )}\n\n      <ProductCard>\n        {productItems.map(({ key, text, params, product }, index) => {\n          //Temporary solution\n\n          return (\n            <OrderTableRow\n              key={key}\n              rowData={{\n                text,\n                params: params || [],\n              }}\n              product={product}\n              withDivider={index !== productItems?.length - 1}\n            />\n          );\n        })}\n      </ProductCard>\n    </>\n  );\n};\n\nexport default ProductItemsCard;\n","import { useEffect, useState } from 'react';\nimport { typedAxios } from '@/api/typed-axios';\nimport getConfig from '../defaultConfig';\nimport { createExhibitionOrderServiceRoute } from '@/features/Routing/protected/exhibitions-by-role';\nimport { IdType, DomainRecord } from '@/model/common';\nimport { ProductUtils } from '@/utils/product-utils';\nimport { useStand } from '@/store/effector/stand';\nimport { useCatalog } from '@/store/effector/catalog';\n\nexport const useProductsLoader = (opts: { categoryId: IdType }) => {\n  const { categoryId } = opts;\n\n  const { flatMap } = useCatalog();\n  const [isLoading, setLoading] = useState(false);\n  const [productItems, setProductItems] = useState<DomainRecord[]>([]);\n  const { standForOrder } = useStand();\n  const { exhibitionId } = createExhibitionOrderServiceRoute.useParams();\n  const categoriesSource = [...flatMap.values()];\n\n  useEffect(() => {\n    const fetchData = async () => {\n      setLoading(true);\n      try {\n        const data = await typedAxios.priceListItem.getPricelistItems({\n          exhibitionId: +exhibitionId,\n          currency: standForOrder?.currency || undefined,\n          buildingType: standForOrder?.buildingType,\n          categoryIds: categoryId + '' || undefined,\n        });\n\n        const productItemCardObjects = data?.map((product) => {\n          const category = categoriesSource.find((cat) => {\n            return cat.id === product.categoryId;\n          });\n\n          return ProductUtils.createProductFromPriceListItem(product, {\n            category,\n          });\n        });\n\n        const productItemsObjects = getConfig(productItemCardObjects);\n\n        setProductItems(productItemsObjects);\n      } finally {\n        setLoading(false);\n      }\n    };\n\n    fetchData();\n  }, [categoryId]);\n\n  return {\n    isLoading,\n    productItems,\n  };\n};\n","import { DomainRecord } from '@/model/common';\nimport { Product } from '@/model/IProduct';\n\nexport default function getConfig(products: Product[]): DomainRecord[] {\n  return products.map((product) => ({\n    key: product.getProductId(),\n    text:\n      product.productDisplayName ||\n      product.productName ||\n      product.getProductId(),\n    product: product,\n    params: [\n      {\n        type: 'price',\n        text: product.formattedPrice,\n      },\n    ],\n  }));\n}\n","import styled from 'styled-components';\nimport BrandBox from '@/components/BrandBox';\nimport ProfileMenu from '@/components/Profile/ProfileMenu';\nimport Menu from '@/components/Menu';\nimport { headerMenuConfig } from '@/components/Header/headerMenuConfig';\nimport Search from '@/components/Search';\nimport { useMatches, useParams } from '@tanstack/react-router';\nimport { LanguageSwitcher } from '@/components/LanguageSwitcher/LanguageSwitcher';\nimport { Flex } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { AdminSearch } from '../AdminSearch';\nimport { useAuth } from '@/store/effector/auth';\n\nconst NavBar = styled.header`\n  display: flex;\n  flex-direction: row;\n\n  padding: 16px 20px;\n  height: var(--chakra-sizes-nav-bar-height);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n\n  background: #fff;\n`;\n\nconst Wrapper = styled.div`\n  display: flex;\n  flex-direction: row;\n  flex-grow: 1;\n\n  justify-content: end;\n`;\n\nconst StyleMenu = styled(Menu)`\n  margin-left: 32px;\n`;\n\nconst StyledSearch = styled(Search)`\n  max-width: 222px;\n  margin-right: 32px;\n`;\n\nconst RightBlockWrapper = styled(Flex)`\n  flex-direction: column;\n  align-items: end;\n  justify-content: center;\n  padding-bottom: 10px;\n`;\n\nconst Header: React.FC = () => {\n  const { user } = useAuth();\n\n  const matchContext = useMatches().at(-1)?.context || {\n    key: 'default',\n  };\n\n  const { exhibitionId, stand } = useParams({ strict: false }) || {};\n  const { t } = useTranslation();\n  const shouldRenderExhibitionSearchForExhibitor =\n    Boolean(user?.isExhibitor) && Boolean(exhibitionId) && Boolean(stand);\n\n  const shouldRenderPageSpecificSearch = !user?.isExhibitor;\n\n  return (\n    <NavBar>\n      <BrandBox />\n      {user?.isExhibitor && (\n        <StyleMenu direction=\"row\" config={headerMenuConfig(t)} />\n      )}\n      <Wrapper>\n        {shouldRenderExhibitionSearchForExhibitor && (\n          <StyledSearch exhibitionId={exhibitionId} stand={stand} />\n        )}\n        {shouldRenderPageSpecificSearch && (\n          <AdminSearch key={JSON.stringify(matchContext)} />\n        )}\n        <RightBlockWrapper>\n          <LanguageSwitcher />\n          <ProfileMenu />\n        </RightBlockWrapper>\n      </Wrapper>\n    </NavBar>\n  );\n};\n\nexport default Header;\n","import { IMenuConfig } from '@/components/Menu/config';\nimport { WarningIcon } from '@chakra-ui/icons';\nimport { typedAxios } from '../../api/typed-axios';\nimport { UrlUtils } from '../../utils/url-utils';\n\nconst saveManual = async () => {\n  typedAxios.request\n    .request({\n      url: '/global-settings/exhibitor-manual',\n      method: 'GET',\n      query: {\n        culture: localStorage.getItem('lang'),\n      },\n    })\n    .then((manualUrl) => {\n      if (manualUrl && typeof manualUrl === 'string') {\n        window.open(UrlUtils.appendTimestampToUrl(manualUrl), '_blank');\n      }\n    });\n};\n\nexport const headerMenuConfig = (t: any) => {\n  return {\n    items: [\n      {\n        key: 'manual',\n        name: t('participantManual'),\n        to: saveManual,\n        icon: <WarningIcon fontSize=\"11px\" />,\n      },\n    ],\n  } as IMenuConfig;\n};\n","const DevelopmentIcon = () => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    id=\"Layer_1\"\n    data-name=\"Layer 1\"\n    viewBox=\"0 0 85.04 85.04\"\n  >\n    <path\n      d=\"M41.65 65.39H30.36c-.58 0-1.04-.47-1.04-1.04V33.97c0-.58.47-1.04 1.04-1.04h11.29c.58 0 1.04.47 1.04 1.04v30.38c0 .58-.47 1.04-1.04 1.04ZM31.4 63.31h9.2V35.02h-9.2v28.29Z\"\n      className=\"cls-1\"\n    />\n    <path\n      d=\"M45.38 35.02H26.63c-.58 0-1.04-.47-1.04-1.04V23.72c0-.58.47-1.04 1.04-1.04h18.76c.58 0 1.04.47 1.04 1.04v10.26c0 .58-.47 1.04-1.04 1.04Zm-17.71-2.08h16.67v-8.17H27.67v8.17Z\"\n      className=\"cls-1\"\n    />\n    <path\n      d=\"M26.63 32.12h-5.12c-.58 0-1.04-.47-1.04-1.04v-4.46c0-.58.47-1.04 1.04-1.04h5.12a1.04 1.04 0 1 1 0 2.08h-4.08v2.38h4.08a1.04 1.04 0 1 1 0 2.08Zm35.3 0H45.39a1.04 1.04 0 1 1 0-2.08h15.5v-2.38h-15.5a1.04 1.04 0 1 1 0-2.08h16.54c.58 0 1.04.47 1.04 1.04v4.46c0 .58-.47 1.04-1.04 1.04Zm1.6 27.89H52.42c-.58 0-1.04-.47-1.04-1.04v-5.48c0-.58.47-1.04 1.04-1.04h11.11c.58 0 1.04.47 1.04 1.04v5.48c0 .58-.47 1.04-1.04 1.04Zm-10.07-2.08h9.03v-3.39h-9.03v3.39Z\"\n      className=\"cls-1\"\n    />\n    <path\n      d=\"M57.97 48.9c-.58 0-1.04-.47-1.04-1.04v-16.7a1.04 1.04 0 1 1 2.08 0v16.7c0 .58-.47 1.04-1.04 1.04Z\"\n      className=\"cls-1\"\n    />\n    <path\n      d=\"M52.42 54.54c-.28 0-.56-.11-.77-.33-.39-.42-.36-1.08.06-1.47l5.78-5.34c.41-.38 1.05-.37 1.44.03l5.34 5.34c.41.41.41 1.07 0 1.47-.41.41-1.07.41-1.47 0l-4.63-4.63-5.04 4.66c-.2.19-.45.28-.71.28ZM41.65 65.39c-.22 0-.45-.07-.64-.22L29.72 56.4c-.28-.21-.43-.55-.4-.9.03-.35.22-.66.53-.83l9.88-5.54-9.99-7.38c-.28-.21-.44-.54-.42-.88.01-.35.2-.66.5-.84l11.29-6.93a1.039 1.039 0 1 1 1.09 1.77L32.23 41l10.05 7.42c.28.21.44.55.42.9-.02.35-.22.67-.53.84l-9.92 5.57 10.05 7.81c.45.35.54 1.01.18 1.46-.21.26-.51.4-.82.4Z\"\n      className=\"cls-1\"\n    />\n  </svg>\n);\n\nexport default DevelopmentIcon;\n","import { forwardRef, Icon, IconProps } from '@chakra-ui/react';\n\nexport const DraggableHandlerIcon = forwardRef((props: IconProps, ref) => {\n  return (\n    <Icon\n      width={5}\n      height={5}\n      {...props}\n      ref={ref}\n      viewBox=\"0 0 25 25\"\n      fill=\"gray.800\"\n    >\n      <path\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n        d=\"M9.5 8C10.3284 8 11 7.32843 11 6.5C11 5.67157 10.3284 5 9.5 5C8.67157 5 8 5.67157 8 6.5C8 7.32843 8.67157 8 9.5 8ZM9.5 14C10.3284 14 11 13.3284 11 12.5C11 11.6716 10.3284 11 9.5 11C8.67157 11 8 11.6716 8 12.5C8 13.3284 8.67157 14 9.5 14ZM11 18.5C11 19.3284 10.3284 20 9.5 20C8.67157 20 8 19.3284 8 18.5C8 17.6716 8.67157 17 9.5 17C10.3284 17 11 17.6716 11 18.5ZM15.5 8C16.3284 8 17 7.32843 17 6.5C17 5.67157 16.3284 5 15.5 5C14.6716 5 14 5.67157 14 6.5C14 7.32843 14.6716 8 15.5 8ZM17 12.5C17 13.3284 16.3284 14 15.5 14C14.6716 14 14 13.3284 14 12.5C14 11.6716 14.6716 11 15.5 11C16.3284 11 17 11.6716 17 12.5ZM15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z\"\n        fill=\"currentColor\"\n      />\n    </Icon>\n  );\n});\n","import { Icon, IconProps } from '@chakra-ui/react';\n\nexport const OrdersIcon = (props: IconProps) => {\n  return (\n    <Icon\n      {...props}\n      style={{ width: 23, height: 23 }}\n      viewBox=\"0 0 1024 1024\"\n      fill=\"gray.800\"\n    >\n      <path d=\"M733.280244 645.89143c-54.359049 0-98.429777 44.246737-98.429777 98.812493 0 54.606689 44.069705 98.841146 98.429777 98.841146s98.429777-44.234457 98.429777-98.841146C831.710021 690.138166 787.639293 645.89143 733.280244 645.89143zM798.258141 718.952422c0 0-70.821999 69.891813-71.161736 70.244854-8.068769 7.971555-12.287861 6.702656-15.875572 3.081175l-42.341341-42.518373c-3.597945-3.598968-3.388167-9.66615 0.457418-13.522991s9.865695-4.068665 13.462616-0.447185l34.643008 34.781154 67.068512-65.75868c3.8814-3.810792 10.113335-3.727904 13.922081 0.163729C802.221406 708.886159 802.149774 715.142653 798.258141 718.952422zM406.700257 248.419859l150.802588 0c15.897062 0 29.290093-15.004739 29.290093-33.512255 0-18.49626-13.368472-33.441647-30.137391-33.441647l-149.95529 0c-16.743336 0-30.125111 14.944364-30.125111 33.441647C376.576169 233.416144 389.992737 248.419859 406.700257 248.419859zM721.910289 615.155405c17.553795 0 34.264385 3.656273 49.408293 10.252505l0-331.22375c0-45.398979-24.387433-76.853365-75.464739-76.853365l-67.963904 0c0.681522 3.63376 1.081635 7.349385 1.081635 11.100826 0.035816 28.137851-20.306488 55.82954-44.493354 55.82954l-208.795397 0c-25.451672 0-45.811372-27.691689-45.811372-55.82954 0.035816-3.751441 0.417509-7.467065 1.116427-11.100826l-68.792782 0c-55.282071 0-68.858274 31.454386-68.858274 76.853365l0 449.64893c0 48.773843 19.442818 76.077699 73.043596 76.077699l360.027773 0c-18.014282-21.659299-28.856211-49.526997-28.856211-79.933517C597.55198 671.042249 653.240303 615.155405 721.910289 615.155405zM338.448804 388.063293l294.685579 0c10.886955 0 20.10592 10.17064 20.917402 21.929452 0 10.958586-11.464099 22.717398-22.340821 22.717398L336.19753 432.710143c-10.906397 0-17.832134-11.757788-17.832134-22.717398C318.365396 399.021879 327.566966 388.063293 338.448804 388.063293zM471.149105 684.799578 336.19753 684.799578c-10.906397 0-17.832134-11.746532-17.832134-22.717398 0-10.946306 9.201569-21.905916 20.083407-21.905916l134.122697 0c10.900258 0 20.106943 10.148128 20.918425 21.905916C493.489926 673.053046 482.038106 684.799578 471.149105 684.799578zM334.985936 560.713468c-10.894118 0-21.753443-13.415544-21.753443-24.375154 0-10.912537 9.18929-20.259416 20.095687-20.259416l294.677393 0c10.889001 0 20.084431 8.501628 20.919449 20.259416 0 10.959609-7.515161 24.375154-18.413372 24.375154L334.985936 560.713468z\" />\n    </Icon>\n  );\n};\n","import { Icon, IconProps } from '@chakra-ui/react';\n\nexport const UsersIcon = (props: IconProps) => {\n  return (\n    <Icon {...props} viewBox=\"0 0 80.13 80.13\" fill=\"gray.800\">\n      <path\n        d=\"M48.355,17.922c3.705,2.323,6.303,6.254,6.776,10.817c1.511,0.706,3.188,1.112,4.966,1.112\n\t\tc6.491,0,11.752-5.261,11.752-11.751c0-6.491-5.261-11.752-11.752-11.752C53.668,6.35,48.453,11.517,48.355,17.922z M40.656,41.984\n\t\tc6.491,0,11.752-5.262,11.752-11.752s-5.262-11.751-11.752-11.751c-6.49,0-11.754,5.262-11.754,11.752S34.166,41.984,40.656,41.984\n\t\tz M45.641,42.785h-9.972c-8.297,0-15.047,6.751-15.047,15.048v12.195l0.031,0.191l0.84,0.263\n\t\tc7.918,2.474,14.797,3.299,20.459,3.299c11.059,0,17.469-3.153,17.864-3.354l0.785-0.397h0.084V57.833\n\t\tC60.688,49.536,53.938,42.785,45.641,42.785z M65.084,30.653h-9.895c-0.107,3.959-1.797,7.524-4.47,10.088\n\t\tc7.375,2.193,12.771,9.032,12.771,17.11v3.758c9.77-0.358,15.4-3.127,15.771-3.313l0.785-0.398h0.084V45.699\n\t\tC80.13,37.403,73.38,30.653,65.084,30.653z M20.035,29.853c2.299,0,4.438-0.671,6.25-1.814c0.576-3.757,2.59-7.04,5.467-9.276\n\t\tc0.012-0.22,0.033-0.438,0.033-0.66c0-6.491-5.262-11.752-11.75-11.752c-6.492,0-11.752,5.261-11.752,11.752\n\t\tC8.283,24.591,13.543,29.853,20.035,29.853z M30.589,40.741c-2.66-2.551-4.344-6.097-4.467-10.032\n\t\tc-0.367-0.027-0.73-0.056-1.104-0.056h-9.971C6.75,30.653,0,37.403,0,45.699v12.197l0.031,0.188l0.84,0.265\n\t\tc6.352,1.983,12.021,2.897,16.945,3.185v-3.683C17.818,49.773,23.212,42.936,30.589,40.741z\"\n      />\n    </Icon>\n  );\n};\n","import Lightbox, { SlideImage } from 'yet-another-react-lightbox';\nimport Inline from 'yet-another-react-lightbox/plugins/inline';\nimport 'yet-another-react-lightbox/styles.css';\nimport 'yet-another-react-lightbox/plugins/thumbnails.css';\n\nimport { useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { Box, HStack } from '@chakra-ui/react';\n\ninterface BuildingStandardBodyProps {\n  images: string[];\n}\n\nconst DotsWrapper = styled(HStack)`\n  justify-content: center;\n  position: absolute;\n  bottom: 8px;\n  width: 100%;\n`;\n\nconst DotsContainer = styled(Box)`\n  cursor: pointer;\n  margin: 0 2px;\n  border-radius: 50%;\n  display: inline-block;\n  transition: background-color 0.6s ease;\n\n  &:hover {\n    background: black;\n  }\n`;\n\nexport const BuildingGallery = ({\n  images,\n}: BuildingStandardBodyProps): JSX.Element => {\n  const [open, setOpen] = useState(false);\n  const [index, setIndex] = useState(0);\n\n  const slides = useMemo<Array<SlideImage>>(() => {\n    return images.map((image) => {\n      return {\n        id: image,\n        src: image,\n      };\n    });\n  }, [images]);\n\n  const toggleOpen = (state: boolean) => () => setOpen(state);\n\n  const updateIndex = ({ index: current }: { index: number }) =>\n    setIndex(current);\n\n  const singleImage = slides.length <= 1;\n\n  return (\n    <Box position=\"relative\">\n      <Lightbox\n        index={index}\n        slides={slides}\n        plugins={[Inline]}\n        on={{\n          view: updateIndex,\n          click: toggleOpen(true),\n        }}\n        carousel={{\n          padding: 0,\n          spacing: 0,\n          imageFit: 'cover',\n          finite: singleImage,\n        }}\n        render={{\n          iconPrev: singleImage ? () => null : undefined,\n          iconNext: singleImage ? () => null : undefined,\n        }}\n        inline={{\n          style: {\n            width: '100%',\n            maxWidth: '430px',\n            aspectRatio: '3 / 2',\n            margin: '0 auto',\n          },\n        }}\n      />\n      {!singleImage && (\n        <DotsWrapper>\n          {Array.from({ length: slides.length }).map((_, slide) => (\n            <DotsContainer\n              key={`dots-${slide}`}\n              boxSize={['7px', null, '10px']}\n              bg={index === slide ? '#ffffff' : 'blackAlpha.200'}\n              onClick={() => updateIndex({ index: slide })}\n            />\n          ))}\n        </DotsWrapper>\n      )}\n\n      <Lightbox\n        open={open}\n        close={toggleOpen(false)}\n        index={index}\n        slides={slides}\n        carousel={{\n          finite: singleImage,\n        }}\n        on={{ view: updateIndex }}\n        animation={{ fade: 0 }}\n        render={{\n          iconPrev: singleImage ? () => null : undefined,\n          iconNext: singleImage ? () => null : undefined,\n        }}\n        controller={{ closeOnPullDown: true, closeOnBackdropClick: true }}\n        styles={{ root: { '--yarl__color_backdrop': 'rgba(0, 0, 0, .7)' } }}\n      />\n    </Box>\n  );\n};\n","import styled from 'styled-components';\n\nexport const Thumbnail = styled.img`\n  height: 40px;\n  border-radius: 5px;\n  width: auto;\n  margin-right: 0.5rem;\n  cursor: pointer;\n  opacity: 0.9;\n\n  &:hover {\n    opacity: 1;\n  }\n`;\n","import Lightbox, { SlideImage } from 'yet-another-react-lightbox';\nimport 'yet-another-react-lightbox/styles.css';\nimport 'yet-another-react-lightbox/plugins/thumbnails.css';\n\nimport { useMemo, useState } from 'react';\nimport { Flex, Text } from '@chakra-ui/react';\nimport { Thumbnail } from '@/components/ImageGalleries/CommonProductGallery.styled';\nimport { useFeatureValue } from '@/features/feautres';\n\ninterface BuildingStandardBodyProps {\n  images: string[];\n}\n\nexport const CommonProductGallery = ({ images }: BuildingStandardBodyProps) => {\n  const [open, setOpen] = useState(false);\n  const [index, setIndex] = useState(0);\n  const thumbnailsCount = useFeatureValue(\n    'PRODUCT_GALLERY_PREVIEW_IMAGES_COUNT',\n    3\n  );\n\n  const slides = useMemo<Array<SlideImage>>(() => {\n    return images.map((image) => {\n      return {\n        id: image,\n        src: image,\n      };\n    });\n  }, [images]);\n\n  const visibleSlides = slides.slice(0, thumbnailsCount);\n  const hiddenSlidesCount = slides.length - thumbnailsCount;\n\n  const toggleOpen = (state: boolean) => () => setOpen(state);\n\n  const updateIndex = ({ index: current }: { index: number }) =>\n    setIndex(current);\n\n  if (!visibleSlides.length) {\n    return null;\n  }\n\n  return (\n    <>\n      <Flex flexDirection=\"row\" alignItems=\"center\">\n        {visibleSlides.map((slide, i) => (\n          <Thumbnail\n            key={slide.src}\n            src={slide.src}\n            onClick={() => {\n              updateIndex({ index: i });\n              toggleOpen(true)();\n            }}\n          />\n        ))}\n        {hiddenSlidesCount > 0 && (\n          <Text color=\"gray.400\" whiteSpace=\"nowrap\">\n            + {hiddenSlidesCount}\n          </Text>\n        )}\n      </Flex>\n\n      <Lightbox\n        open={open}\n        close={toggleOpen(false)}\n        index={index}\n        slides={slides}\n        on={{ view: updateIndex }}\n        animation={{ fade: 0 }}\n        controller={{ closeOnPullDown: true, closeOnBackdropClick: true }}\n        styles={{ root: { '--yarl__color_backdrop': 'rgba(0, 0, 0, .7)' } }}\n      />\n    </>\n  );\n};\n","import { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport { Box, Divider } from '@chakra-ui/react';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { useTranslation } from 'react-i18next';\nimport { SystemLangType } from '../../model/common';\nimport { commonApi, useCommonStore } from '@/store/effector/common';\n\nconst ButtonsWrapper = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n`;\n\nexport const LanguageSwitcher = (): JSX.Element => {\n  const { i18n } = useTranslation();\n  const { lang: language } = useCommonStore();\n  const [lngValue, setLngValue] = useState(language);\n\n  useEffect(() => {\n    setLngValue(language);\n    setLanguageValue(language);\n  }, [language]);\n\n  const setLanguageValue = (languageValue: SystemLangType) => {\n    commonApi.setLanguage(languageValue);\n\n    if (localStorage.getItem('lang') !== languageValue) {\n      localStorage.setItem('lang', languageValue);\n      i18n.changeLanguage(languageValue);\n      location.reload();\n    }\n  };\n\n  return (\n    <ButtonsWrapper>\n      <OrderButton\n        colorScheme=\"transparent\"\n        width=\"70px\"\n        defaultColor={lngValue === 'ru' ? '#E8431A' : ''}\n        onClick={() => setLanguageValue('ru')}\n      >\n        Русский\n      </OrderButton>\n      <Divider orientation=\"vertical\" height=\"20px\" colorScheme=\"red\" />\n      <OrderButton\n        colorScheme=\"transparent\"\n        width=\"70px\"\n        defaultColor={lngValue === 'en' ? '#E8431A' : ''}\n        onClick={() => setLanguageValue('en')}\n      >\n        English\n      </OrderButton>\n    </ButtonsWrapper>\n  );\n};\n","import React, { PropsWithChildren } from 'react';\nimport { Box, BoxProps, Spinner, SpinnerProps } from '@chakra-ui/react';\n\nexport const Loader = ({\n  centralized,\n  ...rest\n}: {\n  centralized?: boolean;\n} & SpinnerProps): JSX.Element => {\n  return (\n    <Spinner\n      thickness=\"4px\"\n      speed=\"0.65s\"\n      emptyColor=\"gray.200\"\n      color=\"red.500\"\n      size=\"xl\"\n      {...(centralized\n        ? ({\n            style: {\n              position: 'fixed',\n              top: '50%',\n              left: '50%',\n            },\n          } satisfies SpinnerProps)\n        : {})}\n      {...rest}\n    />\n  );\n};\n\nconst LoaderWrapperLoadingStyles: BoxProps = {\n  opacity: 0.6,\n  pointerEvents: 'none',\n  userSelect: 'none',\n};\n\nexport const LoaderWrapper = (\n  props: PropsWithChildren<{ loading: boolean } & BoxProps>\n) => {\n  const { loading, children, ...boxProps } = props;\n\n  return (\n    <Box {...(loading ? LoaderWrapperLoadingStyles : {})} {...boxProps}>\n      {props.loading && (\n        <Loader\n          style={{\n            position: 'absolute',\n            left: '50%',\n            top: '50%',\n            zIndex: 1,\n          }}\n        />\n      )}\n      {children}\n    </Box>\n  );\n};\n","import React, { useCallback } from 'react';\nimport styled from 'styled-components';\nimport MenuItem from './MenuItem';\nimport { IMenuConfig } from './config';\nimport { Button } from '@chakra-ui/react';\nimport { useNavigate } from '@tanstack/react-router';\n\ninterface ListProps {\n  direction?: 'row' | 'column';\n}\n\nconst List = styled.ul<ListProps>`\n  display: flex;\n  flex-direction: ${(props) => props.direction};\n  align-items: center;\n\n  padding-left: 0;\n  margin-left: 0;\n\n  list-style: none;\n`;\n\ninterface MenuProps extends ListProps {\n  config: IMenuConfig;\n  className?: string;\n}\n\nconst Menu: React.FC<MenuProps> = ({\n  config,\n  className,\n  direction = 'row',\n}) => {\n  const navigate = useNavigate();\n\n  const redirectTo = useCallback(\n    (path: string) => navigate({ to: path, replace: true }),\n    []\n  );\n\n  return (\n    <List direction={direction} className={className}>\n      {config.items.map(({ key, name, icon, to }) => {\n        const onClick = () => {\n          if (to) {\n            if (typeof to === 'function') {\n              return to();\n            }\n\n            return redirectTo(to);\n          }\n        };\n\n        return (\n          <MenuItem key={key}>\n            {to ? (\n              <Button\n                rightIcon={icon}\n                height=\"auto\"\n                variant=\"brandSecondary\"\n                onClick={onClick}\n              >\n                {name}\n              </Button>\n            ) : (\n              name\n            )}\n          </MenuItem>\n        );\n      })}\n    </List>\n  );\n};\n\nexport default Menu;\n","import styled from 'styled-components';\n\nconst Item = styled.li<{ active: boolean }>`\n  margin: 0;\n\n  color: ${({ active }) =>\n    active ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0.5)'};\n\n  transition: color ease-in-out 15ms;\n  cursor: pointer;\n\n  &:hover {\n    color: rgba(0, 0, 0, 0.7);\n  }\n\n  > * {\n    padding: 0.5rem 1rem;\n  }\n`;\n\ninterface MenuItem {\n  children?: React.ReactNode;\n  active?: boolean;\n}\n\nconst MenuItem: React.FC<MenuItem> = ({ children, active = false }) => {\n  return <Item active={active}>{children}</Item>;\n};\n\nexport default MenuItem;\n","import {\n  Button,\n  ButtonGroup,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n} from '@chakra-ui/react';\nimport { $modalContext, $modalStack, ModalFactory } from './api';\nimport { useUnit } from 'effector-react';\nimport { useTranslation } from 'react-i18next';\nimport { AsyncButton } from '@/components/AsyncButton';\n\nexport const ModalFactoryProvider = () => {\n  const { t } = useTranslation();\n  const modals = useUnit($modalStack);\n\n  if (modals.length === 0) {\n    return null;\n  }\n\n  return (\n    <>\n      {modals.map((modal, index) => {\n        const shouldUseOverlay = index === 0;\n\n        return (\n          <Modal\n            key={modal.id || index}\n            isOpen={!!modal.isOpened}\n            onClose={ModalFactory.close}\n            size=\"xl\"\n            scrollBehavior=\"inside\"\n            isCentered\n          >\n            {shouldUseOverlay && <ModalOverlay />}\n            <ModalContent>\n              <ModalHeader>{modal.title}</ModalHeader>\n              <ModalCloseButton />\n              <ModalBody>\n                <modal.Component />\n              </ModalBody>\n\n              <ModalFooter justifyContent=\"center\" alignItems=\"center\">\n                <ButtonGroup gap=\"1\" justifyContent=\"center\">\n                  <Button\n                    variant=\"outline\"\n                    colorScheme=\"red\"\n                    minW={120}\n                    onClick={() => ModalFactory.close(modal.id)}\n                  >\n                    {modal.cancelLabel || t('cancel')}\n                  </Button>\n                  {modal.okLabel && (\n                    <AsyncButton\n                      minW={120}\n                      colorScheme=\"red\"\n                      onClick={async () => {\n                        return modal.onOk?.($modalContext.getState());\n                      }}\n                    >\n                      {modal.okLabel}\n                    </AsyncButton>\n                  )}\n                </ButtonGroup>\n              </ModalFooter>\n            </ModalContent>\n          </Modal>\n        );\n      })}\n    </>\n  );\n};\n","import { createDomain, createApi } from 'effector';\nimport { ComponentType, ReactNode, useEffect } from 'react';\nimport { attempt } from '../../utils/attempt';\nimport i18n from '../../i18n';\n\nexport type ModalDescriptor = {\n  id?: string;\n  isOpened?: boolean;\n  okLabel?: ReactNode;\n  cancelLabel?: ReactNode;\n  onOk?: (modalContext?: any) => Promise<void>;\n  onCancel?: () => Promise<void>;\n  Component: ComponentType;\n  title?: ReactNode;\n};\n\nconst domain = createDomain('modal-factory');\n\ntype StackType = ModalDescriptor[];\nexport const $modalStack = domain.createStore<StackType>([]);\n\nconst defaultModalProps: Partial<ModalDescriptor> = {\n  isOpened: true,\n};\n\nconst infoModalDefaultProps: Partial<ModalDescriptor> = {\n  title: 'Success',\n  okLabel: '',\n  cancelLabel: 'Close',\n  ...defaultModalProps,\n};\n\nconst confirmModalDefaultProps: Partial<ModalDescriptor> = {\n  title: i18n.t('attention'),\n  okLabel: i18n.t('yes'),\n  cancelLabel: i18n.t('cancel'),\n  onCancel: async () => {\n    ModalFactory.close();\n  },\n  ...defaultModalProps,\n};\n\nexport const $modalContext = domain.createStore<unknown>(null);\n\nexport const ModalFactory = {\n  ...createApi($modalStack, {\n    show: (_, newModal: ModalDescriptor) => [\n      ..._,\n      { ...defaultModalProps, ...newModal, isOpened: true },\n    ],\n    info: (_, newModal: ModalDescriptor) => [\n      ..._,\n      { ...infoModalDefaultProps, ...newModal, isOpened: true },\n    ],\n    confirm: (_, newModal: ModalDescriptor) => [\n      ..._,\n      { ...confirmModalDefaultProps, ...newModal, isOpened: true },\n    ],\n    closeAll: () => [],\n    closeById: (_, id: ModalDescriptor['id']) => {\n      if (!id) {\n        return _;\n      }\n\n      return _.filter((d) => d.id !== id);\n    },\n    close: (_, id: string | undefined) => {\n      let descriptorById: ModalDescriptor | null = null;\n\n      if (typeof id === 'string') {\n        const indexOfDescriptor = _.findIndex((d) => d.id === id);\n\n        if (indexOfDescriptor === -1) {\n          return _;\n        }\n\n        descriptorById = _.splice(indexOfDescriptor, 1)[0];\n      }\n\n      const lastModalDescriptor = descriptorById ? descriptorById : _.pop();\n\n      if (!lastModalDescriptor) {\n        return [];\n      }\n\n      setTimeout(() => {\n        // todo this breaks a purity of reducer, needs to be refined\n        if (typeof lastModalDescriptor?.onCancel === 'function') {\n          attempt(() => lastModalDescriptor.onCancel?.());\n        }\n      }, 0);\n\n      return [..._];\n    },\n  }),\n  isOpened: $modalStack.map((stack) => {\n    return stack.length > 0;\n  }),\n\n  isOpenedById: (id: string) => {\n    return $modalStack.getState().some((d) => d.id === id);\n  },\n  ...createApi($modalContext, {\n    updateContext: <S, T>(_: S, payload: T) => payload,\n  }),\n};\n\nexport const useModalFactoryContextProvider = <T,>(context: T) => {\n  useEffect(() => {\n    ModalFactory.updateContext(context);\n  }, [context]);\n};\n","import Select, { StylesConfig } from 'react-select';\nimport CreatableSelect from 'react-select/creatable';\nimport { FieldProps } from '@/components/Fields/interfaces';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport { Box, FormControl, FormErrorMessage } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport styled from 'styled-components';\nimport { FieldValues, useController, useFormContext } from 'react-hook-form';\nimport { useMemo } from 'react';\nimport { OptionType } from '../../model/common';\nimport { isArrayOfOptions, isOption } from '../../utils/is-option';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n`;\n\ninterface SelectComponentProps<T extends FieldValues = FieldValues>\n  extends Omit<FieldProps<T>, 'settings'> {\n  options?: OptionType[];\n  isMulti?: boolean;\n  closeMenuOnSelect?: boolean;\n  blurInputOnSelect?: boolean;\n  defaultValue?: OptionType | OptionType[];\n  maxWidth?: string;\n  minWidth?: string;\n  onChange?: (value: any) => void;\n  disabled?: boolean;\n  allowCreate?: boolean;\n  onClear?: () => void;\n}\n\nexport const SelectComponent = <T extends FieldValues = FieldValues>({\n  label,\n  options,\n  isRequired,\n  isMulti = false,\n  closeMenuOnSelect = true,\n  blurInputOnSelect = true,\n  maxWidth,\n  minWidth,\n  onChange,\n  disabled,\n  name,\n  allowCreate,\n  onClear,\n  ...props\n}: SelectComponentProps<T>): JSX.Element => {\n  const formContext = useFormContext();\n\n  if (!formContext) {\n    throw new Error(\n      `This field (${name}) should be used only within FormContext`\n    );\n  }\n\n  const { fieldState, field } = useController({\n    name: name,\n    control: formContext.control,\n  });\n\n  const value = useMemo(() => {\n    if (Array.isArray(field.value)) {\n      if (field.value.every(isOption)) {\n        return field.value;\n      }\n    }\n\n    if (isOption(field.value)) {\n      return field.value;\n    }\n\n    if (Array.isArray(options) && !Array.isArray(field.value)) {\n      const option = options?.find((opt) => opt.value === field.value);\n\n      if (option) {\n        return option;\n      }\n    }\n\n    if (Array.isArray(options) && isArrayOfOptions(field.value)) {\n      const possibleValues = field.value\n        // @ts-expect-error todo fix types\n        .map((option) => option.value);\n\n      return options.filter((opt) => possibleValues.includes(opt.value));\n    }\n\n    return null;\n  }, [field, options]);\n\n  if (!fieldState) {\n    throw new Error(\n      'fieldState not found. Is this field used within FormContext?'\n    );\n  }\n\n  const { t } = useTranslation();\n\n  const selectStylesOverride: StylesConfig = {\n    control: (styles, { isDisabled }) => ({\n      ...styles,\n      backgroundColor: isDisabled ? '#f7f7f7' : 'inherit',\n      borderColor: fieldState.invalid ? 'red' : 'inherit',\n      cursor: isDisabled ? 'not-allowed' : 'pointer',\n    }),\n    option: (styles) => ({ ...styles, minHeight: '40px' }),\n    menuPortal: (styles) => ({ ...styles, zIndex: 10000 }),\n  };\n\n  const BaseComponent = allowCreate ? CreatableSelect : Select;\n\n  return (\n    <Box maxWidth={maxWidth} minWidth={minWidth}>\n      <FormControlWrapper\n        isInvalid={fieldState.invalid}\n        isRequired={isRequired}\n      >\n        {label && <FormLabel htmlFor={name}>{label}</FormLabel>}\n        <BaseComponent\n          id={name}\n          options={options}\n          styles={selectStylesOverride}\n          closeMenuOnSelect={closeMenuOnSelect}\n          blurInputOnSelect={blurInputOnSelect}\n          placeholder={t('select')}\n          isMulti={isMulti}\n          defaultValue={formContext.getValues(name)}\n          isDisabled={disabled}\n          isClearable\n          menuPlacement=\"auto\"\n          // menuIsOpen={true}\n          {...props}\n          {...field}\n          value={value}\n          menuPortalTarget={document.body}\n          onChange={(event) => {\n            if (event) {\n              field.onChange(event);\n\n              if (typeof onChange === 'function') {\n                onChange(event);\n              }\n            } else if (event === null && typeof onClear === 'function') {\n              // reset field state and propagate clearing select\n              onClear();\n              formContext.resetField(name);\n            }\n          }}\n        />\n        {fieldState.error?.message && (\n          <FormErrorMessage>{fieldState.error?.message}</FormErrorMessage>\n        )}\n      </FormControlWrapper>\n    </Box>\n  );\n};\n","import { Badge, BadgeProps } from '@chakra-ui/react';\nimport { ITEPortal_Domain_Dto_AdminOrderSummary } from '@/api';\nimport { ORDER_STATUSES } from '@/constants/order';\nimport { isNil } from '@/utils/is-nil';\nimport i18n from '@/i18n';\n\ntype BadgeConfigType = {\n  [key: string]: { color: BadgeProps['colorScheme']; label: string };\n};\n\nconst badgeConfig: BadgeConfigType = {\n  [ORDER_STATUSES.Draft]: {\n    color: 'gray',\n    label: i18n.t('order-status-draft'),\n  },\n  [ORDER_STATUSES.Submitted]: {\n    color: 'orange',\n    label: i18n.t('order-status-submitted'),\n  },\n  [ORDER_STATUSES.Processing]: {\n    color: 'yellow',\n    label: i18n.t('order-status-processing'),\n  },\n  [ORDER_STATUSES.Invoiced]: {\n    color: 'blue',\n    label: i18n.t('order-status-invoiced'),\n  },\n  [ORDER_STATUSES.Paid]: {\n    color: 'green',\n    label: i18n.t('order-status-paid'),\n  },\n  [ORDER_STATUSES.Cancelled]: {\n    color: 'red',\n    label: i18n.t('order-status-cancelled'),\n  },\n};\n\nexport const OrderBadge = ({\n  status,\n}: {\n  status: ITEPortal_Domain_Dto_AdminOrderSummary['orderStatus'];\n}) => {\n  if (isNil(status)) {\n    return null;\n  }\n\n  const badgeType = badgeConfig[status];\n\n  return <Badge colorScheme={badgeType?.color}>{badgeType?.label}</Badge>;\n};\n","import React, { useCallback } from 'react';\nimport { Divider, Flex, Tooltip } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../Buttons/Button/Button';\nimport { FieldValues, RegisterOptions, UseFormRegister } from 'react-hook-form';\nimport { Product } from '@/model/IProduct';\nimport InputNumber from '../Fields/InputNumber';\nimport { IdType } from '@/model/common';\nimport { WarningIcon } from '@chakra-ui/icons';\nimport { TooltipWrapper } from '@/components/Forms/Services/TemporaryStaff/Row';\nimport {\n  ButtonContainer,\n  InfoSectionContainer,\n  OrderTableRowContainer,\n  OrderTableRowContainerBadgeComponent,\n  OrderTableRowContainerInputComponent,\n  OrderTableRowContainerInputWrapper,\n  OrderTableRowContainerNameComponent,\n  OrderTableRowContainerPriceComponent,\n  OrderTableRowWrapper,\n  ParamsSectionContainer,\n} from './styled';\nimport { AmountCounter } from '@/components/AmountCounter';\nimport { Nullable } from '../../types/support-types';\nimport { OrderItem } from '../../model/IOrderItem';\nimport { orderApi, useOrder } from '@/store/effector/order';\nimport { ITEPortal_Domain_Dto_PriceListItemSummary } from '@/api';\nimport { CommonProductGallery } from '@/components/ImageGalleries/CommonProductGallery';\n\ntype RowDataType = 'price' | 'input' | 'badge' | 'inputNumber';\n\nexport interface RowDataStructure {\n  type: RowDataType;\n  text?: string | null;\n  name?: string | null;\n  options?: BadgeItem[];\n  placeholder?: string;\n  settings?: RegisterOptions<FieldValues, string>;\n}\n\ninterface RowDataProps {\n  rowData: {\n    text: string;\n    params: RowDataStructure[];\n  };\n  // submitHandler: (product: Product, values: FieldValues) => void;\n  product: Product;\n  withDivider?: boolean;\n}\n\ntype TextDataProp = {\n  text?: string;\n  id?: IdType;\n  description?: Nullable<string>;\n} & Pick<ITEPortal_Domain_Dto_PriceListItemSummary, 'imageUrls'>;\n\nexport interface BadgeItem {\n  key?: string | number;\n  value: string | number;\n}\n\ninterface BadgeDataProp {\n  register?: UseFormRegister<FieldValues>;\n  options?: BadgeItem[];\n  name?: string;\n  placeholder?: string;\n  settings?: RegisterOptions<FieldValues, string>;\n}\n\ninterface InputFieldProps {\n  register?: UseFormRegister<FieldValues>;\n  name?: string;\n  placeholder?: string;\n  settings?: RegisterOptions<FieldValues, string>;\n}\n\nconst NameComponent = ({\n  text,\n  description,\n  imageUrls,\n}: TextDataProp): JSX.Element => {\n  return (\n    <OrderTableRowContainerNameComponent>\n      <Flex direction=\"row\" justifyContent=\"space-between\">\n        {text}\n        {description && (\n          <TooltipWrapper>\n            <Tooltip hasArrow label={description}>\n              <WarningIcon\n                color=\"var(--chakra-colors-brandColor)\"\n                verticalAlign=\"initial\"\n              />\n            </Tooltip>\n          </TooltipWrapper>\n        )}\n      </Flex>\n      {imageUrls && <CommonProductGallery images={imageUrls} />}\n    </OrderTableRowContainerNameComponent>\n  );\n};\n\nconst PriceComponent = ({ text }: TextDataProp): JSX.Element => {\n  return (\n    <OrderTableRowContainerPriceComponent>\n      {text}\n    </OrderTableRowContainerPriceComponent>\n  );\n};\n\nconst InputComponent: React.FC<InputFieldProps> = ({\n  register,\n  placeholder,\n  settings,\n  name = 'field',\n}) => {\n  const registerFieldName = register ? { ...register(name, settings) } : {};\n\n  return (\n    <OrderTableRowContainerInputWrapper>\n      <OrderTableRowContainerInputComponent\n        placeholder={placeholder}\n        size=\"xs\"\n        colorScheme=\"red\"\n        type=\"number\"\n        {...registerFieldName}\n      />\n    </OrderTableRowContainerInputWrapper>\n  );\n};\n\nconst SelectComponent: React.FC<BadgeDataProp> = ({\n  register,\n  options,\n  placeholder,\n  settings,\n  name = 'select',\n}) => {\n  const registerFieldName = register ? { ...register(name, settings) } : {};\n\n  return (\n    <OrderTableRowContainerBadgeComponent\n      size=\"xs\"\n      bg=\"twitter\"\n      name={name}\n      rootProps={{ width: '150px' }}\n      defaultValue=\"\"\n      {...registerFieldName}\n    >\n      <option value=\"\" disabled>\n        {placeholder}\n      </option>\n      {options?.map(({ key, value }) => {\n        return (\n          <option value={key} key={key}>\n            {value}\n          </option>\n        );\n      })}\n    </OrderTableRowContainerBadgeComponent>\n  );\n};\n\nconst rowDataComponentsConfig = {\n  price: PriceComponent,\n  inputNumber: InputNumber,\n  input: InputComponent,\n  badge: SelectComponent,\n};\n\nconst RowControl = ({ orderItem }: { orderItem: OrderItem }) => {\n  const product = orderItem.product;\n\n  const changeHandler = (value: number) => {\n    orderApi.changeItem({\n      id: product.getProductId(),\n      product,\n      amount: value,\n    });\n  };\n\n  const isProductSupportsDecimals = product.category.isDecimal;\n\n  return (\n    <AmountCounter\n      amountCounterValue={orderItem.getAmount()}\n      onChange={(counterValue: number) => changeHandler(counterValue)}\n      suffix={product instanceof Product ? product.unit : undefined}\n      precision={isProductSupportsDecimals ? 2 : 0}\n      step={product instanceof Product ? product.amountStep : 1}\n    />\n  );\n};\n\nconst AddItemToOrderButton = ({ product }: { product: Product }) => {\n  const { t } = useTranslation();\n\n  const addItem = useCallback((productToAdd: Product) => {\n    const item = new OrderItem({\n      id: productToAdd.getProductId(),\n      product: productToAdd,\n    });\n\n    item.setAmount(1);\n\n    orderApi.addItem(item);\n  }, []);\n\n  return (\n    <Button\n      buttonType=\"button\"\n      height=\"100%\"\n      colorScheme=\"secondary\"\n      onClick={() => addItem(product)}\n    >\n      {t('choose')}\n    </Button>\n  );\n};\n\nexport const OrderTableRow = ({\n  rowData,\n  product,\n  withDivider,\n}: RowDataProps): JSX.Element => {\n  const { items } = useOrder();\n  const { params, text } = rowData;\n  const orderItem = items?.find((item) => item?.id === product?.productName);\n\n  return (\n    <OrderTableRowWrapper>\n      <OrderTableRowContainer>\n        <InfoSectionContainer>\n          {text && (\n            <NameComponent\n              text={text}\n              description={product?.description}\n              imageUrls={product.imageUrls}\n            />\n          )}\n          <ParamsSectionContainer>\n            {params?.map((tableElement, key) => {\n              const rowDataText = tableElement?.text as string;\n              const rowDataOptions = tableElement?.options as BadgeItem[];\n\n              const Component = rowDataComponentsConfig[tableElement?.type];\n\n              if (!Component) {\n                console.warn(`there is no Component for ${tableElement?.type}`);\n\n                return null;\n              }\n\n              return (\n                <Component\n                  key={key}\n                  text={rowDataText}\n                  options={rowDataOptions}\n                  name={tableElement.name || 'input'}\n                  placeholder={tableElement.placeholder}\n                  settings={tableElement.settings}\n                />\n              );\n            })}\n          </ParamsSectionContainer>\n        </InfoSectionContainer>\n        <ButtonContainer>\n          {orderItem && !orderItem.included ? (\n            <RowControl orderItem={orderItem} />\n          ) : (\n            <AddItemToOrderButton product={product} />\n          )}\n        </ButtonContainer>\n      </OrderTableRowContainer>\n      {withDivider && <Divider orientation=\"horizontal\" />}\n    </OrderTableRowWrapper>\n  );\n};\n","import styled from 'styled-components';\nimport { Input, Select } from '@chakra-ui/react';\n\nexport const OrderTableRowWrapper = styled.div`\n  width: 100%;\n`;\n\nexport const OrderTableRowContainer = styled.form`\n  display: flex;\n  flex-direction: row;\n  margin-left: auto;\n  justify-content: space-between;\n  align-items: center;\n  max-width: 100%;\n  padding-top: 1.3rem;\n  padding-bottom: 1.3rem;\n`;\n\nexport const ButtonContainer = styled.div`\n  display: flex;\n  justify-content: end;\n  height: 30px;\n`;\n\nexport const OrderTableRowContainerNameComponent = styled.div`\n  font-size: 14px;\n  line-height: 1.2;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: flex-start;\n  gap: 1rem;\n\n  @media all and (max-width: 1300px) {\n    flex-direction: column;\n    align-items: flex-start;\n  }\n`;\n\nexport const OrderTableRowContainerPriceComponent = styled.div`\n  font-size: 14px;\n  min-width: 100px;\n  text-align: center;\n  font-weight: 600;\n`;\n\nexport const OrderTableRowContainerInputComponent = styled(Input)`\n  padding: 0 5px;\n  max-width: 50px;\n  text-align: center;\n\n  ::placeholder {\n    text-align: center;\n  }\n\n  :focus {\n    text-align: center;\n  }\n`;\n\nexport const InfoSectionContainer = styled.div`\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding-right: 20px;\n  gap: 20px;\n`;\n\nexport const ParamsSectionContainer = styled.div`\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  align-items: center;\n  gap: 20px;\n`;\n\nexport const OrderTableRowContainerInputWrapper = styled.div`\n  padding: 5px 0;\n  min-width: 50px;\n`;\n\nexport const OrderTableRowContainerBadgeComponent = styled(Select)`\n  padding: 5px 0;\n  width: 150px;\n`;\n","import styled from 'styled-components';\nimport { Text, Avatar as ChakraAvatar } from '@chakra-ui/react';\n\nexport const Row = styled.div`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n`;\n\nexport const Avatar = styled(ChakraAvatar)`\n  max-width: 40px;\n  max-height: 40px;\n\n  border-radius: 50%;\n  margin-left: 12px;\n`;\n\nexport const UserInfo = styled(Text)`\n  font-weight: 500;\n  font-size: 14px;\n  line-height: 20px;\n`;\n","import { User } from '@/model/IUser';\nimport { Row, UserInfo } from './Profile.styled';\nimport { ChevronDownIcon } from '@chakra-ui/icons';\nimport styled from 'styled-components';\n\ninterface ProfileProps {\n  user: User;\n}\n\nconst StyledChevronDownIcon = styled(ChevronDownIcon)`\n  margin-left: 8.7px;\n`;\n\nconst Profile: React.FC<ProfileProps> = ({ user }) => {\n  return (\n    <Row>\n      <UserInfo>{user.fullName}</UserInfo>\n      <StyledChevronDownIcon />\n    </Row>\n  );\n};\n\nexport default Profile;\n","import {\n  Menu,\n  MenuButton,\n  MenuDivider,\n  MenuItem,\n  MenuList,\n} from '@chakra-ui/react';\nimport Profile from './Profile';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport styled from 'styled-components';\nimport { useNavigate } from '@tanstack/react-router';\nimport { authApi, useAuth } from '@/store/effector/auth';\nimport { exhibitorPathRootPath } from '@/features/Routing/userPaths';\nimport { useRBAC } from '@/features/rbac/useRBAC';\n\nconst StyledMenuList = styled(MenuList)`\n  font-size: 0.8125rem;\n`;\n\nconst StyledMenuItem = styled(MenuItem)`\n  padding: 0.35rem 1.2rem;\n`;\n\nconst ProfileMenu: React.FC = () => {\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n  const { can } = useRBAC();\n\n  const logOutHandler = useCallback(() => {\n    authApi.logout();\n  }, []);\n\n  const toExhibitions = () => {\n    navigate({\n      to: exhibitorPathRootPath,\n    });\n  };\n\n  const { user } = useAuth();\n\n  if (!user) {\n    return null;\n  }\n\n  return (\n    <>\n      <Menu>\n        <MenuButton>\n          <Profile user={user} />\n        </MenuButton>\n        <StyledMenuList marginY={0.5} borderRadius={0}>\n          {can('canViewPublicExhibitions') && (\n            <>\n              <StyledMenuItem onClick={toExhibitions}>\n                {t('myExhibitions')}\n              </StyledMenuItem>\n\n              <MenuDivider />\n            </>\n          )}\n          <StyledMenuItem onClick={logOutHandler}>{t('logout')}</StyledMenuItem>\n        </StyledMenuList>\n      </Menu>\n    </>\n  );\n};\n\nexport default ProfileMenu;\n","import React, { useCallback, useRef } from 'react';\nimport styled from 'styled-components';\nimport { useTranslation } from 'react-i18next';\nimport {\n  AutoComplete,\n  AutoCompleteInput,\n  AutoCompleteItem,\n  AutoCompleteList,\n} from '@choc-ui/chakra-autocomplete';\nimport { Box, InputGroup, InputLeftElement } from '@chakra-ui/react';\nimport { Search2Icon } from '@chakra-ui/icons';\nimport { Item } from '@choc-ui/chakra-autocomplete/dist/types';\nimport { useNavigate } from '@tanstack/react-router';\nimport { getPathByProduct } from '@/utils/route';\nimport { useCategoriesByData } from '@/hooks/categoriesConverter/useCategoriesByData';\nimport { queryOptions, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { ProductUtils } from '@/utils/product-utils';\nimport { useStand } from '@/store/effector/stand';\nimport { useCatalog } from '@/store/effector/catalog';\nimport { typedAxios } from '@/api/typed-axios';\n\nconst Wrapper = styled.div`\n  font-weight: 400;\n  font-size: 16px;\n  line-height: 24px;\n`;\n\nconst StyledInputGroup = styled(InputGroup)`\n  color: #a0aec0;\n`;\n\ninterface SearchProps {\n  className?: string;\n  exhibitionId: string;\n  stand: string;\n}\n\nconst filter = (query: string, optionValue: string, optionLabel: string) => {\n  if (query.length > 0) {\n    return optionLabel\n      .trim()\n      .toLowerCase()\n      .includes(query.toLowerCase().trim());\n  }\n\n  return false;\n};\n\nconst Search: React.FC<SearchProps> = ({ className, exhibitionId, stand }) => {\n  const queryClient = useQueryClient();\n  const { flatMap } = useCatalog();\n\n  const { standForOrder } = useStand();\n  const source = useCategoriesByData([...flatMap.values()]);\n\n  const categoryIds = source?.map((category) => category?.['id'])?.toString();\n\n  const ref = useRef();\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n\n  const onSelectHandler = useCallback(({ item }: { item: Item }) => {\n    navigate({\n      to: getPathByProduct(exhibitionId, stand, item.originalValue),\n      replace: true,\n    });\n\n    return false;\n  }, []);\n\n  const autoCompleteQueryOptions = queryOptions({\n    queryKey: [\n      'products-search',\n      standForOrder?.buildingType,\n      exhibitionId,\n      categoryIds,\n      standForOrder?.currency,\n    ],\n    enabled: false,\n    queryFn: async () => {\n      const response = await typedAxios.priceListItem.getPricelistItems({\n        exhibitionId: +exhibitionId,\n        currency: standForOrder?.currency || undefined,\n        categoryIds,\n        buildingType: standForOrder?.buildingType,\n      });\n      // const { data: response } = await fetchApi<\n      //   Array<ITEPortal_Domain_Dto_PriceListItemSummary>\n      // >(GET_PRICELIST_PRODUCTS, {\n      //   method: FetchMethods.Get,\n      //   params: {\n      //     exhibitionId,\n      //     sellingOfficeId,\n      //     categoryIds,\n      //     buildingType: standForOrder?.buildingType,\n      //   },\n      // });\n\n      return response.map((product) => {\n        return ProductUtils.createProductFromPriceListItem(product);\n      });\n    },\n  });\n\n  const { data = [], isFetching } = useQuery(autoCompleteQueryOptions);\n\n  return (\n    <Wrapper className={className}>\n      <AutoComplete\n        ref={ref}\n        filter={filter}\n        onSelectOption={onSelectHandler}\n        freeSolo\n        emptyState={\n          <Box textAlign=\"center\">{t('notFoundOption') as string}</Box>\n        }\n        openOnFocus\n        isLoading={isFetching}\n      >\n        <StyledInputGroup>\n          <InputLeftElement pointerEvents=\"none\">\n            <Search2Icon />\n          </InputLeftElement>\n          <AutoCompleteInput\n            placeholder={t('searchService') as string}\n            onFocus={() => {\n              queryClient.ensureQueryData(autoCompleteQueryOptions);\n            }}\n          />\n        </StyledInputGroup>\n        <AutoCompleteList>\n          {data.map((product) => (\n            <AutoCompleteItem\n              key={`option-${product.id}`}\n              value={product}\n              label={product.productDisplayName || product.getProductId()}\n            >\n              {product.productDisplayName || product.getProductId()}\n            </AutoCompleteItem>\n          ))}\n        </AutoCompleteList>\n      </AutoComplete>\n    </Wrapper>\n  );\n};\n\nexport default Search;\n","import React, { useEffect, useRef } from 'react';\nimport { Link, useParams } from '@tanstack/react-router';\nimport Sidebar from './Sidebar';\nimport styled from 'styled-components';\nimport { replacePaths } from '@/utils/route';\nimport {\n  CREATE_EXHIBITION_ORDER_TAB_PATH,\n  SHOW_SUPPORT_MANAGER_ADDITIONAL_PATH,\n  SHOW_SUPPORT_MANAGER_PATH,\n} from '@/constants/router';\nimport SimpleBarCore from 'simplebar-core';\nimport classNames from 'classnames';\nimport { ITechnicalService } from '@/model/ITechnicalService';\nimport { Box, Image } from '@chakra-ui/react';\nimport { useProductCategory } from '@/hooks/useProductCategory';\nimport { Nullable } from '../../types/support-types';\n\nconst StyledLink = styled(Link)`\n  background: transparent;\n  text-decoration: none;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n\n  padding: 12px 0;\n\n  &:first-child {\n    margin-top: 12px;\n  }\n\n  &:last-child {\n    margin-bottom: 12px;\n  }\n\n  transition: all ease-in-out 0.15s;\n\n  text-align: center;\n  color: #718096;\n\n  &:hover,\n  &.active {\n    color: var(--chakra-colors-brandColor);\n\n    > svg {\n      fill: var(--chakra-colors-brandColor);\n    }\n  }\n\n  > * {\n    z-index: -1;\n  }\n\n  > svg {\n    max-width: 57px;\n    max-height: 57px;\n\n    margin-left: auto;\n    margin-right: auto;\n\n    fill: #a0aec0;\n    transition: all ease-in-out 0.15s;\n\n    position: relative;\n    z-index: -1;\n  }\n`;\nconst ServiceName = styled.div`\n  font-weight: 600;\n  font-size: 12px;\n  line-height: 16px;\n\n  position: relative;\n  z-index: -1;\n`;\n\nconst Wrapper = styled.div`\n  padding: 0 24px;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n`;\n\nconst BarTitleWrapper = styled(Box)`\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  height: 80px;\n  font-size: 16px;\n  font-weight: 600;\n  color: #718096;\n  text-align: center;\n  border-bottom: 1px solid silver;\n  border-top: 1px solid silver;\n  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);\n`;\n\ninterface CategoriesSidebarProps {\n  categories: ITechnicalService[];\n  type?: 'adminPanel' | 'order' | 'additionalPanel';\n  barTitle?: Nullable<string>;\n}\n\nconst CategoriesSidebar = ({\n  categories,\n  type = 'order',\n  barTitle,\n}: CategoriesSidebarProps) => {\n  const { exhibitionId, service, stand } = useParams({ strict: false }) || {};\n\n  const ref = useRef<null | SimpleBarCore>(null);\n  const itemRefs = useRef<Record<string, HTMLAnchorElement | null>>({});\n  const categoryInfo = useProductCategory(categories, service);\n  const category = categoryInfo?.category;\n\n  useEffect(() => {\n    setTimeout(() => {\n      const target =\n        itemRefs.current[(category?.parent?.id || category?.id) as string];\n\n      if (target) {\n        const top = target.offsetTop;\n\n        ref.current?.getScrollElement()?.scrollTo({\n          top: top > 0 ? top : 0,\n          behavior: 'smooth',\n        });\n      }\n    }, 300);\n  }, [itemRefs, ref, category]);\n\n  return (\n    <Sidebar scrollRef={ref} fixed>\n      {barTitle && <BarTitleWrapper>{barTitle}</BarTitleWrapper>}\n      <Wrapper>\n        {categories.map(({ category: serviceObject, image }) => {\n          const serviceCategory = serviceObject.parent || serviceObject;\n\n          const resolvedUlr = serviceCategory.resolveUrl?.();\n\n          const pageUrl =\n            type === 'adminPanel'\n              ? SHOW_SUPPORT_MANAGER_PATH\n              : SHOW_SUPPORT_MANAGER_ADDITIONAL_PATH;\n\n          const link =\n            type === 'order'\n              ? replacePaths(CREATE_EXHIBITION_ORDER_TAB_PATH, {\n                  ':exhibitionId': exhibitionId,\n                  ':stand': stand,\n                  ':service': serviceCategory.name,\n                })\n              : replacePaths(pageUrl, {\n                  ':page': serviceCategory.name,\n                });\n\n          // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n          // @ts-ignore\n          return (\n            <StyledLink\n              // _ref={(el) => {\n              //   itemRefs.current[serviceCategory.id] = el;\n              // }}\n              id={`sidebar-${serviceCategory.id.toString()}`}\n              key={serviceCategory.name}\n              to={resolvedUlr || link}\n              className={classNames({\n                active: category?.parent?.name === serviceCategory.name,\n              })}\n            >\n              {image && typeof image === 'string' ? (\n                <Image boxSize=\"50px\" src={image} alt={image} />\n              ) : (\n                image\n              )}\n              <ServiceName>\n                {serviceCategory.displayName ||\n                  serviceCategory.name ||\n                  serviceCategory.id}\n              </ServiceName>\n            </StyledLink>\n          );\n        })}\n      </Wrapper>\n    </Sidebar>\n  );\n};\n\nexport default CategoriesSidebar;\n","import {\n  Footer as StyledFooter,\n  StyledButton,\n  StyledText,\n} from './OrderList.styled';\nimport { useTranslation } from 'react-i18next';\nimport { useNavigate } from '@tanstack/react-router';\nimport { replacePaths } from '@/utils/route';\nimport { CREATE_EXHIBITION_CART_PATH } from '@/constants/router';\nimport { createExhibitionOrderServiceRoute } from '@/features/Routing/protected/exhibitions-by-role';\nimport { useOrder, useOrderTotal } from '@/store/effector/order';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { useOrderCompleteness } from '@/store/effector/order-completeness';\n\nconst Footer = () => {\n  const { t } = useTranslation();\n  const { items } = useOrder();\n  const total = useOrderTotal();\n  const { currency } = useExhibition();\n  const { isOrderCompleted } = useOrderCompleteness();\n  const isDisabled = !items?.length || !isOrderCompleted;\n  const navigate = useNavigate();\n  const { exhibitionId, stand } = createExhibitionOrderServiceRoute.useParams();\n\n  const addToCart = () => {\n    const cartPath = replacePaths(CREATE_EXHIBITION_CART_PATH, {\n      ':exhibitionId': exhibitionId,\n      ':stand': stand,\n    });\n\n    navigate({\n      to: cartPath,\n    });\n  };\n\n  return (\n    <StyledFooter>\n      <StyledText>\n        {t('summary', {\n          cost: t('result-price', {\n            cost: (total || 0).toLocaleString(),\n            currency,\n          }),\n        })}\n      </StyledText>\n      <StyledButton onClick={addToCart} isDisabled={isDisabled}>\n        {t('checkout')}\n      </StyledButton>\n    </StyledFooter>\n  );\n};\n\nexport default Footer;\n","import { useTranslation } from 'react-i18next';\nimport {\n  ExhibitionBox,\n  ExhibitionTitle,\n  HeaderTitle,\n  StyledHeader,\n} from './OrderList.styled';\n\nimport { StandDescription } from '@/pages/Exhibition/shared/StandDescription';\nimport { Box } from '@chakra-ui/react';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { useStand } from '@/store/effector/stand';\n\nconst Header = () => {\n  const { t } = useTranslation();\n  const { exhibitionName } = useExhibition();\n  const { standForOrder, originalBuildingType } = useStand();\n\n  return (\n    <StyledHeader>\n      <ExhibitionBox>\n        <ExhibitionTitle>{exhibitionName}</ExhibitionTitle>\n      </ExhibitionBox>\n      {standForOrder && (\n        <Box mt=\"20px\">\n          <StandDescription\n            stand={standForOrder}\n            originalBuildingType={originalBuildingType}\n            includeStandNumber\n            inline\n          />\n        </Box>\n      )}\n      <HeaderTitle>{t('orderedServices')}</HeaderTitle>\n    </StyledHeader>\n  );\n};\n\nexport default Header;\n","import styled from 'styled-components';\nimport { Link as RRLink } from '@tanstack/react-router';\n\nexport const Link = styled(RRLink)`\n  &:hover {\n    text-decoration: underline;\n    color: var(--chakra-colors-brandColor);\n  }\n`;\n","import { OrderItem } from '@/model/IOrderItem';\nimport { useOrderCompleteness } from '@/store/effector/order-completeness';\nimport {\n  Alert,\n  AlertDescription,\n  AlertProps,\n  AlertTitle,\n} from '@chakra-ui/react';\nimport { useParams } from '@tanstack/react-router';\nimport { Link } from '@/components/Sidebar/OrderList/OrderItemDependencyWarning.styled';\nimport { useTranslation } from 'react-i18next';\nimport { ArrowUpIcon } from '@chakra-ui/icons';\nimport { ReactNode } from 'react';\n\nexport const OrderItemDependencyWarning = (\n  props: {\n    orderItem: OrderItem;\n    renderProps?: (node: ReactNode) => JSX.Element;\n  } & AlertProps\n) => {\n  const { orderItem, renderProps, ...alertProps } = props;\n  const { incompleteItemsDueToDependency, isOrderCompleted } =\n    useOrderCompleteness();\n  const { t } = useTranslation();\n  const { exhibitionId, stand } = useParams({ strict: false });\n\n  if (isOrderCompleted) {\n    return null;\n  }\n\n  const inTheListOfIncomplete = incompleteItemsDueToDependency.find(\n    (incomplete) => incomplete.productId === orderItem.id\n  );\n\n  if (!inTheListOfIncomplete) {\n    return null;\n  }\n\n  const wrapInto =\n    typeof renderProps === 'function' ? renderProps : (el: JSX.Element) => el;\n\n  return wrapInto(\n    <Alert\n      status=\"warning\"\n      flexDirection=\"column\"\n      alignItems=\"flex-start\"\n      justifyContent=\"flex-start\"\n      {...alertProps}\n    >\n      <AlertTitle fontSize={12}>\n        <ArrowUpIcon mt=\"-2px\" ml=\"-15px\" /> {t('service-require-dependency')}\n      </AlertTitle>\n      <AlertDescription fontSize={12}>\n        <ul style={{ listStyle: 'none' }}>\n          {inTheListOfIncomplete.outstandingDeps?.map((pr) => {\n            return (\n              <Link\n                key={pr.getProductId()}\n                to={`/exhibitions/${exhibitionId}/${stand}/create/${pr.categoryName}`}\n              >\n                <li>{pr.productDisplayName}</li>\n              </Link>\n            );\n          })}\n        </ul>\n      </AlertDescription>\n    </Alert>\n  );\n};\n","import styled from 'styled-components';\nimport Sidebar from '../Sidebar';\nimport { Button, Text } from '@chakra-ui/react';\n\nexport const StyledSidebar = styled(Sidebar)`\n  display: flex;\n  flex-direction: column;\n\n  max-height: calc(100% - var(--chakra-sizes-nav-bar-height));\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n`;\n\nexport const Footer = styled.div`\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: center;\n`;\n\nexport const StyledText = styled(Text)`\n  font-weight: 600;\n  font-size: 16px;\n  line-height: 24px;\n`;\n\nexport const StyledButton = styled(Button)`\n  margin-top: 20px;\n  width: 100%;\n  font-weight: 600;\n  font-size: 16px;\n  line-height: 24px;\n\n  :hover {\n    background-color: var(--chakra-colors-brandColor) !important;\n  }\n`;\n\nexport const HeaderTitle = styled.h3`\n  font-weight: 600;\n  font-size: 18px;\n  line-height: 28px;\n\n  margin: 20px 0;\n`;\n\nexport const StyledHeader = styled.div`\n  margin-top: 10px;\n`;\n\nexport const ExhibitionBox = styled.div`\n  background: #e2e8f0;\n  border-radius: 6px;\n  text-align: left;\n  padding: 8px 12px;\n`;\n\nexport const ExhibitionTitle = styled.h4`\n  font-weight: 600;\n  font-size: 16px;\n  line-height: 24px;\n\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n`;\n\nexport const BoothNumber = styled.h6`\n  font-weight: 500;\n  font-size: 12px;\n  line-height: 16px;\n  margin-top: 4px;\n`;\n","import React, { useCallback, useState } from 'react';\nimport { CloseIcon, InfoIcon } from '@chakra-ui/icons';\nimport styled from 'styled-components';\nimport { OrderItem, TemporaryStaffOrderItem } from '@/model/IOrderItem';\nimport { Link, useNavigate } from '@tanstack/react-router';\nimport { useTranslation } from 'react-i18next';\nimport { getPathByProduct } from '@/utils/route';\nimport classNames from 'classnames';\nimport { viewExhibitionCart } from '@/features/Routing/protected/exhibitions-by-role';\nimport { CATEGORY_TYPES } from '@/constants/categorie';\nimport { TKey } from '@/i18n/types';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { orderApi } from '@/store/effector/order';\nimport { OrderItemDependencyWarning } from '@/components/Sidebar/OrderList/OrderItemDependencyWarning';\nimport { Tooltip } from '@chakra-ui/react';\n\ninterface RowProps {\n  className?: string;\n  item: OrderItem | TemporaryStaffOrderItem;\n}\n\nconst Wrapper = styled.div`\n  overflow-x: hidden;\n  transition: all ease-in-out 0.3s;\n\n  transform: translateX(0);\n\n  &.showActions {\n    transform: translateX(-2rem);\n\n    .actions {\n      width: 1rem;\n    }\n  }\n\n  &:not(:last-child) .wrapper-inner {\n    border-bottom: 1px solid #e2e8f0;\n  }\n`;\n\nconst WrapperInner = styled.div`\n  display: flex;\n  flex-direction: row;\n  flex-wrap: nowrap;\n  align-items: center;\n  gap: 20px;\n\n  padding: 12px 0;\n\n  font-size: 12px;\n  line-height: 16px;\n`;\n\nconst Name = styled(Link)`\n  padding-left: 20px;\n  width: 50%;\n  font-weight: 400;\n\n  &:hover {\n    text-decoration: underline;\n    color: var(--chakra-colors-brandColor);\n  }\n`;\n\nconst Count = styled.div`\n  text-align: center;\n  width: 20%;\n  font-weight: 400;\n  white-space: nowrap;\n`;\n\nconst Price = styled.div`\n  text-align: right;\n  width: 30%;\n\n  font-weight: 600;\n  white-space: nowrap;\n`;\n\nconst Actions = styled.div`\n  text-align: right;\n  transition: width ease-in-out 0.3s;\n  width: 0;\n`;\n\nconst Button = styled.button`\n  transition: all ease-in-out 0.15s;\n\n  color: #718096;\n\n  &:hover {\n    color: var(--chakra-colors-brandColor);\n  }\n`;\n\nconst Row: React.FC<RowProps> = ({ item, className }) => {\n  const { currency } = useExhibition();\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n  const productPrice = item.total;\n\n  const itemName = item.displayName;\n\n  const [visible, setVisible] = useState(false);\n\n  const { exhibitionId, stand } = viewExhibitionCart.useParams();\n  const isBuilding = item.product.category.isBuilding;\n\n  const deleteHandler = useCallback(async () => {\n    if (isBuilding) {\n      await navigate({\n        to: `/exhibitions/${exhibitionId}/${stand}/create/${CATEGORY_TYPES.SELECT_BUILDING}`,\n        replace: true,\n      });\n    }\n\n    orderApi.removeItem(item);\n  }, []);\n\n  const unitOfMeasurement = isBuilding\n    ? 'sqm'\n    : item.product.category.unitOfMeasure;\n\n  return (\n    <>\n      <Wrapper\n        className={classNames({\n          [className || '']: true,\n          showActions: visible,\n        })}\n        onMouseLeave={() => !item.included && setVisible(false)}\n      >\n        <WrapperInner className=\"wrapper-inner\">\n          <Name to={getPathByProduct(exhibitionId, stand, item.product)}>\n            {itemName}{' '}\n            {item.included && (\n              <Tooltip\n                label={t('included-into-price-of')}\n                placement=\"top\"\n                hasArrow\n              >\n                <InfoIcon color=\"brandColor\" />\n              </Tooltip>\n            )}\n          </Name>\n          <Count onMouseEnter={() => !item.included && setVisible(true)}>\n            {item.getAmount()}{' '}\n            {unitOfMeasurement ? `(${t(unitOfMeasurement as TKey)})` : null}\n          </Count>\n          <Price onMouseEnter={() => !item.included && setVisible(true)}>\n            {t('result-price', {\n              cost: productPrice.toLocaleString(),\n              currency,\n            })}\n          </Price>\n\n          <Actions className=\"actions\">\n            {!item.included && (\n              <Button onClick={deleteHandler}>\n                <CloseIcon />\n              </Button>\n            )}\n          </Actions>\n        </WrapperInner>\n      </Wrapper>\n      <OrderItemDependencyWarning\n        orderItem={item}\n        pl={5}\n        pr={5}\n        pt={2}\n        pb={2}\n      />\n    </>\n  );\n};\n\nexport default Row;\n","import Row from '@/components/Sidebar/OrderList/Row';\nimport { StyledSidebar } from './OrderList.styled';\nimport Footer from './Footer';\nimport Header from './Header';\nimport { useOrder } from '@/store/effector/order';\n\nconst OrderListSidebar = () => {\n  const { items } = useOrder();\n\n  return (\n    <StyledSidebar\n      position=\"right\"\n      fixed\n      header={<Header />}\n      footer={<Footer />}\n      maxWidth=\"var(--chakra-sizes-order-list-width)\"\n    >\n      {items.map((item, index) => (\n        <Row key={`${item.id}-${index}`} item={item} className=\"order-row\" />\n      ))}\n    </StyledSidebar>\n  );\n};\n\nexport default OrderListSidebar;\n","import styled from 'styled-components';\nimport SimpleBar from 'simplebar-react';\nimport SimpleBarCore from 'simplebar-core';\n\nconst SidebarWrapper = styled.div<{\n  fixed: number;\n  maxWidth: number | string;\n  position: 'left' | 'right';\n}>`\n  height: 100%;\n  width: 100%;\n  max-width: ${({ maxWidth }) => maxWidth};\n\n  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);\n  background: #fff;\n\n  ${({ fixed, position }) =>\n    fixed &&\n    `\n    bottom: 0;\n    ${position === 'left' ? 'left: 0;' : 'right: 0;'}\n    position: fixed !important;\n    top: 0;\n    margin-top: var(--chakra-sizes-nav-bar-height);\n    max-height: calc(100% - var(--chakra-sizes-nav-bar-height));\n  `}\n`;\n\nconst SidebarHeader = styled.div`\n  text-align: center;\n  padding: 10px 20px;\n  font-size: 1.5rem;\n`;\n\nconst SidebarFooter = styled.div`\n  padding: 20px;\n  border-top: 1px solid #e2e8f0;\n`;\n\nconst SidebarInner = styled(SimpleBar)`\n  overflow-y: auto;\n\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  height: 100%;\n`;\n\ninterface SidebarProps {\n  header?: React.ReactNode;\n  footer?: React.ReactNode;\n  children?: React.ReactNode | React.ReactNode[];\n  fixed?: boolean;\n  scrollRef?: React.RefObject<SimpleBarCore>;\n  position?: 'left' | 'right';\n  maxWidth?: string | number;\n  className?: string;\n}\n\nexport const Sidebar: React.FC<SidebarProps> = ({\n  header,\n  footer,\n  children,\n  fixed,\n  scrollRef,\n  position = 'left',\n  maxWidth = 'var(--chakra-sizes-side-bar-width)',\n  className,\n}) => {\n  return (\n    <SidebarWrapper\n      className={className}\n      fixed={fixed ? 1 : 0}\n      position={position}\n      maxWidth={maxWidth}\n    >\n      {header && <SidebarHeader>{header}</SidebarHeader>}\n      <SidebarInner ref={scrollRef}>{children}</SidebarInner>\n      {footer && <SidebarFooter>{footer}</SidebarFooter>}\n    </SidebarWrapper>\n  );\n};\n\nexport default Sidebar;\n","import { useTable, Column } from 'react-table';\nimport {\n  Table as ChakraTable,\n  Thead,\n  Tbody,\n  Tr,\n  Th,\n  Td,\n  Flex,\n  Box,\n  Text,\n} from '@chakra-ui/react';\nimport i18n from '@/i18n';\nimport {\n  DragDropContext,\n  Draggable,\n  Droppable,\n  OnDragEndResponder,\n} from 'react-beautiful-dnd';\nimport { DraggableUtils } from '@/utils/draggable-utils';\n\ninterface TableProps<T extends object = object> {\n  columns: Array<Column<T>>;\n  data: Array<T>;\n  onDragEnd: OnDragEndResponder;\n}\n\nexport const DraggableTable = <T extends object = object>({\n  columns,\n  data,\n  onDragEnd,\n}: TableProps<T>) => {\n  const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } =\n    useTable<T>({\n      columns,\n      data,\n      initialState: {\n        hiddenColumns: columns.map((column: any) => {\n          if (column.show === false) {\n            return column.accessor || column.id;\n          }\n        }),\n      },\n    });\n\n  const isEmpty = rows.length === 0;\n\n  return (\n    <>\n      <DragDropContext onDragEnd={onDragEnd}>\n        <ChakraTable\n          {...getTableProps({\n            style: {\n              backgroundColor: 'white',\n            },\n          })}\n        >\n          <Thead>\n            {headerGroups.map((headerGroup, index) => (\n              <Tr {...headerGroup.getHeaderGroupProps()} key={index}>\n                {headerGroup.headers.map((column: any, headerIndex) => (\n                  // Add the sorting props to control sorting. For this example\n                  // we can add them into the header props\n                  <Th\n                    userSelect=\"none\"\n                    {...column.getHeaderProps({\n                      width: column?.width,\n                      ...(column.id === 'drag-handler'\n                        ? { paddingLeft: 0, paddingRight: 0 }\n                        : {}),\n                      minWidth: column.minWidth,\n                    })}\n                    padding={3}\n                    key={headerIndex}\n                  >\n                    <Flex alignItems=\"center\">{column.render('Header')}</Flex>\n                  </Th>\n                ))}\n              </Tr>\n            ))}\n          </Thead>\n          <Droppable droppableId=\"draggable-table\" type=\"draggable-table\">\n            {(provided) => {\n              return (\n                <Tbody\n                  {...getTableBodyProps({\n                    style: {\n                      backgroundColor: 'white',\n                    },\n                  })}\n                  ref={provided.innerRef}\n                  {...provided.droppableProps}\n                >\n                  {rows.map((row, index) => {\n                    prepareRow(row);\n\n                    return (\n                      <Draggable\n                        key={row.id}\n                        draggableId={row.id}\n                        index={index}\n                      >\n                        {(providedRow, rowSnapshot) => {\n                          return (\n                            <Tr\n                              ref={providedRow.innerRef}\n                              {...providedRow.draggableProps}\n                              {...row.getRowProps({\n                                style: {\n                                  backgroundColor: rowSnapshot.isDragging\n                                    ? 'var(--chakra-colors-orange-100)'\n                                    : 'white',\n                                  ...DraggableUtils.getItemStyle(\n                                    rowSnapshot.isDragging,\n                                    providedRow.draggableProps.style\n                                  ),\n                                  display: rowSnapshot.isDragging\n                                    ? 'table'\n                                    : undefined,\n                                  cursor: 'initial',\n                                },\n                              })}\n                            >\n                              {row.cells.map((cell, cellIndex) => {\n                                return (\n                                  <Td\n                                    {...(cell.column.id === 'drag-handler'\n                                      ? providedRow.dragHandleProps\n                                      : {})}\n                                    {...cell.getCellProps({\n                                      style: {\n                                        ...(cell.column.id === 'drag-handler'\n                                          ? {\n                                              paddingLeft: 0,\n                                              paddingRight: 0,\n                                              cursor: 'grab',\n                                            }\n                                          : {}),\n                                      },\n                                    })}\n                                    key={cellIndex}\n                                    verticalAlign=\"top\"\n                                    fontSize=\"0.9em\"\n                                    padding={3}\n                                  >\n                                    {cell.render('Cell')}\n                                  </Td>\n                                );\n                              })}\n                            </Tr>\n                          );\n                        }}\n                      </Draggable>\n                    );\n                  })}\n                  {provided.placeholder}\n                </Tbody>\n              );\n            }}\n          </Droppable>\n        </ChakraTable>\n      </DragDropContext>\n      {isEmpty && (\n        <Box m={4} mt={6} display=\"flex\" justifyContent=\"center\" w=\"100%\">\n          <Text color=\"gray.400\">{i18n.t('no-data')}</Text>\n        </Box>\n      )}\n    </>\n  );\n};\n","import React, { useMemo } from 'react';\nimport { Flex, IconButton, Select, Tooltip, Text } from '@chakra-ui/react';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@chakra-ui/icons';\nimport styled from 'styled-components';\nimport { useTranslation } from 'react-i18next';\nimport * as v from 'zod';\n\ninterface PaginationProps {\n  setPageNumber: (pageIndex: number) => void;\n  setPageSize: (pageSize: number) => void;\n  paginationInfo: PaginationSchemaType;\n}\n\nconst PaginationContainer = styled(Flex)`\n  justify-content: space-between;\n  margin: 4px 4px 4px auto;\n  align-items: center;\n  //min-width: 250px;\n  padding-top: 20px;\n  width: fit-content;\n`;\n\nconst PaginationSchema = v.object({\n  CurrentPage: v.number(),\n  TotalPages: v.number(),\n  PageSize: v.number(),\n  TotalCount: v.number(),\n});\n\ntype PaginationSchemaType = v.infer<typeof PaginationSchema>;\n\nconst Pagination = ({\n  setPageNumber,\n  setPageSize,\n  paginationInfo,\n}: PaginationProps) => {\n  const { CurrentPage, TotalPages, PageSize, TotalCount } =\n    useMemo<PaginationSchemaType>(() => {\n      const parsedSchema = PaginationSchema.safeParse(paginationInfo);\n\n      if (parsedSchema.success) {\n        return parsedSchema.data;\n      }\n\n      return {\n        PageSize: 0,\n        TotalPages: 0,\n        TotalCount: 0,\n        CurrentPage: 1,\n      };\n    }, [paginationInfo]);\n\n  const isActiveLast = CurrentPage === TotalPages || TotalCount === 0;\n  const { t } = useTranslation();\n\n  return (\n    <PaginationContainer>\n      <Flex>\n        <Tooltip label=\"Previous Page\">\n          <IconButton\n            onClick={() => setPageNumber(CurrentPage - 1)}\n            isDisabled={CurrentPage === 1}\n            icon={<ChevronLeftIcon h={6} w={6} />}\n            aria-label=\"Previous Page\"\n          />\n        </Tooltip>\n      </Flex>\n\n      <Text fontWeight=\"bold\" as=\"span\" minW=\"40px\" textAlign=\"center\">\n        {CurrentPage}\n      </Text>\n\n      <Flex>\n        <Tooltip label=\"Next Page\">\n          <IconButton\n            onClick={() => setPageNumber(CurrentPage + 1)}\n            isDisabled={isActiveLast}\n            icon={<ChevronRightIcon h={6} w={6} />}\n            aria-label=\"Next Page\"\n          />\n        </Tooltip>\n      </Flex>\n\n      <Flex alignItems=\"center\" ml=\"20px\">\n        <Select\n          w={36}\n          value={PageSize}\n          onChange={(e) => {\n            setPageSize(Number(e.target.value));\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSizeNumber) => (\n            <option key={pageSizeNumber} value={pageSizeNumber}>\n              {t('show')} {pageSizeNumber}\n            </option>\n          ))}\n        </Select>\n      </Flex>\n    </PaginationContainer>\n  );\n};\n\nexport default Pagination;\n","import { useEffect } from 'react';\nimport { useTable, useSortBy, useRowSelect, Column } from 'react-table';\nimport {\n  Table as ChakraTable,\n  Thead,\n  Tbody,\n  Tr,\n  Th,\n  Td,\n  Flex,\n  Box,\n  Text,\n  Checkbox,\n} from '@chakra-ui/react';\nimport { ChevronUpIcon, ChevronDownIcon } from '@chakra-ui/icons';\nimport i18n from '@/i18n';\n\ninterface TableProps<T extends object = object> {\n  columns: Array<Column<T>>;\n  data: Array<T>;\n  onBulkAction?: (selectedRows: Array<T>) => void;\n  showBulkAction?: boolean;\n}\n\nexport const Table = <T extends object = object>({\n  columns,\n  data,\n  onBulkAction,\n  showBulkAction = false,\n}: TableProps<T>) => {\n  const {\n    getTableProps,\n    getTableBodyProps,\n    headerGroups,\n    rows,\n    prepareRow,\n    selectedFlatRows,\n    toggleAllRowsSelected,\n  } = useTable<T>(\n    {\n      columns,\n      data,\n      initialState: {\n        hiddenColumns: columns.map((column: any) => {\n          if (column.show === false) {\n            return column.accessor || column.id;\n          }\n        }),\n      },\n    },\n    useSortBy,\n    useRowSelect,\n    (hooks) => {\n      if (showBulkAction) {\n        hooks.visibleColumns.push((columnsData) => [\n          {\n            id: 'selection',\n            width: '3%',\n            Header: ({ getToggleAllRowsSelectedProps }) => {\n              const isSelected = getToggleAllRowsSelectedProps()?.checked;\n\n              return (\n                <Checkbox\n                  {...getToggleAllRowsSelectedProps()}\n                  isChecked={isSelected}\n                />\n              );\n            },\n            Cell: ({ row }: { row: any }) => {\n              const isSelected = row.isSelected;\n\n              return (\n                <Checkbox\n                  {...row.getToggleRowSelectedProps()}\n                  isChecked={isSelected}\n                />\n              );\n            },\n          },\n          ...columnsData,\n        ]);\n      }\n    }\n  );\n\n  useEffect(\n    function setSelectedRowIds() {\n      const rowIds = selectedFlatRows.map((d) => d.original);\n\n      if (onBulkAction) {\n        onBulkAction(rowIds);\n      }\n    },\n    [selectedFlatRows]\n  );\n\n  useEffect(\n    function resetPivotIds() {\n      if (!showBulkAction) {\n        toggleAllRowsSelected(false);\n      }\n    },\n    [showBulkAction]\n  );\n\n  const isEmpty = rows.length === 0;\n\n  return (\n    <>\n      <ChakraTable {...getTableProps()}>\n        <Thead>\n          {headerGroups.map((headerGroup, index) => (\n            <Tr {...headerGroup.getHeaderGroupProps()} key={index}>\n              {headerGroup.headers.map((column: any, headerIndex) => (\n                <Th\n                  userSelect=\"none\"\n                  {...column.getHeaderProps({\n                    ...column.getSortByToggleProps(),\n                    width: column?.width,\n                  })}\n                  key={headerIndex}\n                >\n                  <Flex alignItems=\"center\">\n                    {column.render('Header')}\n                    {column.isSorted ? (\n                      column.isSortedDesc ? (\n                        <ChevronDownIcon ml={1} w={4} h={4} />\n                      ) : (\n                        <ChevronUpIcon ml={1} w={4} h={4} />\n                      )\n                    ) : (\n                      ''\n                    )}\n                  </Flex>\n                </Th>\n              ))}\n            </Tr>\n          ))}\n        </Thead>\n        <Tbody {...getTableBodyProps()}>\n          {rows.map((row, index) => {\n            prepareRow(row);\n\n            return (\n              <Tr {...row.getRowProps()} key={index}>\n                {row.cells.map((cell, cellIndex) => {\n                  return (\n                    <Td\n                      {...cell.getCellProps()}\n                      key={cellIndex}\n                      verticalAlign=\"top\"\n                    >\n                      {cell.render('Cell')}\n                    </Td>\n                  );\n                })}\n              </Tr>\n            );\n          })}\n        </Tbody>\n      </ChakraTable>\n      {isEmpty && (\n        <Box m={4} mt={6} display=\"flex\" justifyContent=\"center\" w=\"100%\">\n          <Text color=\"gray.400\">{i18n.t('no-data')}</Text>\n        </Box>\n      )}\n    </>\n  );\n};\n","import { useCallback, useEffect, useState } from 'react';\nimport fetchApi, { XhrOptions } from '../../utils/fetchAPI';\nimport { FetchMethods } from '../../utils/constants';\nimport { useNavigate, useSearch } from '@tanstack/react-router';\nimport { PaginationInfoType } from '../../model/common';\nimport { AxiosHeaders } from 'axios';\n\nexport type UseTableLoaderOptionsType<T = object> = {\n  resource: string;\n  additionalPrams?: Record<string, unknown>;\n  map?: (data: T[]) => unknown[];\n  onError?: (error: any) => void;\n  ignorePagination?: boolean;\n  xhrOptions?: Partial<XhrOptions>;\n};\n\nconst DEFAULT_PAGE_INDEX = 1;\nconst DEFAULT_PAGE_SIZE = 10;\n\ntype QueryType = {\n  s?: number;\n  p?: number;\n  search?: string;\n};\n\nexport const useTableLoader = <T = object>({\n  resource,\n  onError,\n  map,\n  ignorePagination,\n  additionalPrams = {},\n  xhrOptions,\n}: UseTableLoaderOptionsType<T>) => {\n  const search = useSearch<any, unknown, false, QueryType>({ strict: false });\n  const [isLoading, setIsLoading] = useState(false);\n  const [data, setData] = useState<T[]>([]);\n  const navigate = useNavigate();\n  const [paginationInfo, setPaginationInfo] = useState<PaginationInfoType>({\n    TotalCount: 0,\n    TotalPages: 1,\n    PageSize: DEFAULT_PAGE_SIZE,\n    CurrentPage: DEFAULT_PAGE_INDEX,\n  });\n\n  const fetchData = async () => {\n    setIsLoading(true);\n    try {\n      const { data: responseData, headers } = await fetchApi(resource, {\n        method: FetchMethods.Get,\n        params: {\n          ...(ignorePagination === true\n            ? {}\n            : {\n                pageNumber: search?.p || DEFAULT_PAGE_INDEX,\n                pageSize: search?.s || DEFAULT_PAGE_SIZE,\n              }),\n\n          search: search?.search || undefined,\n          ...additionalPrams,\n        },\n        ...xhrOptions,\n      });\n\n      let responseArray = responseData;\n\n      if (\n        Object.hasOwn(responseData, 'data') &&\n        Array.isArray(responseData.data)\n      ) {\n        responseArray = responseData.data;\n      }\n\n      try {\n        if (headers instanceof AxiosHeaders) {\n          const paginationInfoHeader = headers?.get?.('pagination', (value) => {\n            if (typeof value === 'string') {\n              return JSON.parse(value);\n            }\n\n            return value;\n          });\n\n          if (\n            paginationInfoHeader &&\n            typeof paginationInfoHeader === 'object' &&\n            // if header contains CurrentPage let's assume that this is pagination object\n            Object.hasOwn(paginationInfoHeader, 'CurrentPage')\n          ) {\n            setPaginationInfo(\n              paginationInfoHeader as unknown as PaginationInfoType\n            );\n          }\n        }\n      } catch {\n        setPaginationInfo({\n          CurrentPage: search?.p || DEFAULT_PAGE_INDEX,\n          PageSize: search?.s || DEFAULT_PAGE_SIZE,\n          TotalPages: search?.p || DEFAULT_PAGE_INDEX,\n          TotalCount: responseArray.length,\n        });\n      }\n\n      setData(typeof map === 'function' ? map(responseArray) : responseArray);\n    } catch (error) {\n      console.log(error);\n\n      if (typeof onError === 'function') {\n        onError(error);\n      }\n    } finally {\n      setIsLoading(false);\n    }\n  };\n\n  useEffect(() => {\n    fetchData();\n  }, [search]);\n\n  const refresh = () => fetchData();\n\n  const onPageSizeChange = useCallback(\n    (size: number) => {\n      navigate({\n        to: './',\n        search: {\n          ...search,\n          s: size,\n          p: DEFAULT_PAGE_INDEX,\n        },\n      });\n    },\n    [search]\n  );\n  const onPageChange = useCallback(\n    (page: number) => {\n      navigate({\n        to: './',\n        search: {\n          ...search,\n          p: page,\n        },\n      });\n    },\n    [search]\n  );\n\n  return {\n    data,\n    isLoading,\n    onPageSizeChange,\n    onPageChange,\n    currentPage: search?.p || DEFAULT_PAGE_INDEX,\n    currentSize: search?.s || DEFAULT_PAGE_SIZE,\n    refresh,\n    paginationInfo,\n  };\n};\n","import styled from 'styled-components';\nimport TechnicalServiceCard from '@/components/Card/TechnicalServiceCard';\nimport { useTranslation } from 'react-i18next';\nimport { PageTitle } from '@/components/Typography/PageTitle';\nimport { ITechnicalService } from '@/model/ITechnicalService';\nimport { SimpleGrid } from '@chakra-ui/react';\nimport { IdType } from '@/model/common';\n\nimport { Loader } from '@/components/Loader/Loader';\nimport { LoaderWrapper } from '@/theme/css/styles';\nimport { useCategoriesByData } from '@/hooks/categoriesConverter/useCategoriesByData';\nimport { useSubCategoriesByData } from '@/hooks/categoriesConverter/useSubCategoriesByData';\nimport { TKey } from '../../i18n/types';\nimport { useCatalog } from '@/store/effector/catalog';\nimport { useAppLoading } from '@/store/effector/loading';\nimport { Category } from '@/model/ICategory';\n\nexport const Grid = styled(SimpleGrid)`\n  margin-left: auto;\n  margin-right: auto;\n`;\n\nconst CenteredTitle = styled(PageTitle)`\n  margin-top: 40px;\n  margin-bottom: 32px;\n  padding-bottom: 0;\n  text-align: center;\n`;\n\ninterface CategoriesProps {\n  config?: ITechnicalService[];\n  title?: TKey;\n  category?: Category;\n}\n\nexport type CategoryType = {\n  description: string;\n  displayName: string;\n  id: IdType;\n  imageUrl: string;\n  name: string;\n  parentCategory: string;\n  parentCategoryId: IdType;\n};\n\nconst TechnicalServicesGrid: React.FC<CategoriesProps> = ({\n  title,\n  category,\n}) => {\n  const isLoader = useAppLoading();\n  const { rootCategories } = useCatalog();\n  const categoryConfig = useCategoriesByData(rootCategories);\n  const subcategoriesByCategory = useSubCategoriesByData(category?.tree || []);\n  const { t } = useTranslation();\n\n  const categoriesToRender =\n    subcategoriesByCategory.length > 0\n      ? subcategoriesByCategory\n      : categoryConfig;\n\n  return (\n    <>\n      {title && <CenteredTitle>{t(title)}</CenteredTitle>}\n      {isLoader ? (\n        <LoaderWrapper>\n          <Loader />\n        </LoaderWrapper>\n      ) : (\n        <Grid\n          maxWidth=\"1600px\"\n          gap=\"32px\"\n          rowGap=\"32px\"\n          columns={{\n            sm: 2,\n            md: 3,\n            xl: 4,\n          }}\n        >\n          {categoriesToRender.map((service) => {\n            return (\n              <TechnicalServiceCard\n                key={service?.['category']?.['id']}\n                service={service}\n              />\n            );\n          })}\n        </Grid>\n      )}\n    </>\n  );\n};\n\nexport default TechnicalServicesGrid;\n","import {\n  Box,\n  FormControl,\n  FormErrorMessage,\n  Textarea as ChakraTextArea,\n  TextareaProps as ChakraTextareaProps,\n} from '@chakra-ui/react';\n\nimport { FieldProps } from '@/components/Fields/interfaces';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport {\n  FieldValues,\n  Path,\n  useController,\n  useFormContext,\n} from 'react-hook-form';\n\ninterface TextAreaProps<T extends FieldValues = FieldValues>\n  extends FieldProps<T>,\n    Omit<ChakraTextareaProps, 'name'> {\n  defaultValue?: string;\n}\n\nexport const TextArea = <T extends FieldValues = FieldValues>({\n  label,\n  placeholder,\n  // @ts-expect-error as default string doesn't found in generic T\n  name = 'text-area',\n  defaultValue,\n  isRequired,\n  ...rest\n}: TextAreaProps<T>): JSX.Element => {\n  const formContext = useFormContext();\n\n  if (!formContext) {\n    throw new Error(\n      `This field (${name}) should be used only within FormContext`\n    );\n  }\n\n  const { fieldState } = useController({\n    name: name,\n  });\n\n  if (!fieldState) {\n    throw new Error(\n      'fieldState not found. Is this field used within FormContext?'\n    );\n  }\n\n  const registerFieldName = formContext.register(name as Path<T>, {\n    onChange: () => {\n      formContext.clearErrors(name);\n    },\n  });\n\n  return (\n    <Box>\n      <FormControl isRequired={isRequired} isInvalid={fieldState.invalid}>\n        {label && <FormLabel htmlFor={name}>{label}</FormLabel>}\n        <ChakraTextArea\n          id={name}\n          placeholder={placeholder}\n          defaultValue={defaultValue}\n          {...rest}\n          {...registerFieldName}\n        />\n        {fieldState.error?.message && (\n          <FormErrorMessage>{fieldState.error.message}</FormErrorMessage>\n        )}\n      </FormControl>\n    </Box>\n  );\n};\n","import React, { useEffect, useState } from 'react';\nimport { Box, Link, Text } from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { useTranslation } from 'react-i18next';\nimport fetchApi from '@/utils/fetchAPI';\nimport { LOGIN } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { useAuth } from '@/store/effector/auth';\n\nconst CodeWrapper = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  gap: 10px;\n`;\n\nconst CodeLabel = styled(Text)`\n  color: grey;\n`;\n\nconst CodeTimer = styled(Text)`\n  font-weight: 600;\n  color: grey;\n  font-size: 16px;\n`;\n\ninterface TimerProps {\n  sec: number;\n}\n\nexport const Timer = ({ sec }: TimerProps) => {\n  const culture = localStorage.getItem('lang');\n  const authInfo = useAuth();\n  const userEmail = authInfo.userEmail;\n  const [over, setOver] = useState(false);\n  const [time, setTime] = useState(sec);\n  const { t } = useTranslation();\n\n  const tick = () => {\n    if (over) {\n      return;\n    }\n\n    if (time === 0) {\n      setOver(true);\n    } else {\n      setTime(time - 1);\n    }\n  };\n\n  const resendCode = async () => {\n    await fetchApi(LOGIN, {\n      method: FetchMethods.Post,\n      data: {\n        email: userEmail,\n      },\n      params: {\n        culture,\n      },\n    });\n\n    setTime(sec);\n    setOver(false);\n  };\n\n  useEffect(() => {\n    const timerID = setInterval(() => tick(), 1000);\n\n    return () => clearInterval(timerID);\n  });\n\n  return (\n    <CodeWrapper>\n      {time === 0 ? (\n        <Link onClick={resendCode}>{t('resend')}</Link>\n      ) : (\n        <>\n          <CodeTimer>{`00:${time.toString().padStart(2, '0')}`}</CodeTimer>\n          <CodeLabel>{t('resend')}</CodeLabel>\n        </>\n      )}\n    </CodeWrapper>\n  );\n};\n","import styled from 'styled-components';\nimport { Heading } from '@chakra-ui/react';\n\nexport const PageTitle = styled(Heading)`\n  font-size: 1.8rem !important;\n  margin-bottom: 24px;\n  margin-top: 26px;\n`;\n\nexport const FlexedPageTitle = styled(PageTitle)`\n  display: flex;\n  flex-direction: row;\n`;\n\nexport const CenteredPageTitle = styled(PageTitle)`\n  margin-top: 40px;\n  margin-bottom: 32px;\n  text-align: center;\n`;\n","import { t } from 'i18next';\nimport { ORDER_STATUSES } from '@/constants/order';\nimport { User } from '@/model/IUser';\n\nexport const ROLES = [\n  { value: User.Role.SuperAdmin, label: t('super-admin') },\n  { value: User.Role.Admin, label: t('admin') },\n  { value: User.Role.SupportManager, label: t('support') },\n  { value: User.Role.TechnicalManager, label: t('technical-manager') },\n  { value: User.Role.Moderator, label: t('moderator') },\n];\n\nexport const BUILDING_TYPES = [\n  { value: 0, label: 'All' },\n  { value: 1, label: 'SpaceOnly' },\n  { value: 2, label: 'Standard' },\n  { value: 3, label: 'StandardPlus' },\n  { value: 4, label: 'PremiumFerrara' },\n  { value: 5, label: 'PremiumVerona' },\n  { value: 6, label: 'PremiumRavenna' },\n  { value: 7, label: 'PremiumKremona' },\n  { value: 8, label: 'PremiumAncona' },\n  { value: 9, label: 'PremiumFabriano' },\n  { value: 10, label: 'PremiumLivorno' },\n  { value: 11, label: 'Optima' },\n];\n\nexport const STATUS_CONFIG = [\n  { value: 0, label: 'Undefined' },\n  { value: ORDER_STATUSES.Draft, label: t('order-status-draft') },\n  { value: ORDER_STATUSES.Submitted, label: t('order-status-submitted') },\n  { value: ORDER_STATUSES.Processing, label: t('order-status-processing') },\n  { value: ORDER_STATUSES.Invoiced, label: t('order-status-invoiced') },\n  { value: ORDER_STATUSES.Paid, label: t('order-status-paid') },\n  { value: ORDER_STATUSES.Cancelled, label: t('order-status-cancelled') },\n];\n","export const CATEGORY_TYPES = {\n  SELECT_BUILDING: 'select-building',\n  TEMPORARY_STAFF: 'temporary-staff',\n  CLEANING: 'cleaning',\n};\n\nexport const PRODUCT_TYPES = {\n  TEMPORARY_STAFF: 'temporary-staff',\n  BUILDING: 'select-building',\n  COMMON: 'common',\n} as const;\n\nexport type ProductTypesType =\n  (typeof PRODUCT_TYPES)[keyof typeof PRODUCT_TYPES];\n","import { IdType } from '@/model/common';\nimport { ITEPortal_Domain_Dto_OrderDto } from '../api';\n\nexport const LOGIN = 'auth/email';\nexport const CODE_VERIFY = 'auth/token';\nexport const SESSION_EXTEND = 'auth/refresh-token';\nexport const EXHIBITIONS = 'exhibitions/exhibitor-statistics';\nexport const STANDS = (exhibitionId: IdType) =>\n  `exhibitions/${exhibitionId}/exhibitor-stands`;\nexport const CATEGORIES = 'categories';\nexport const EXHIBITOR_CATEGORIES = 'categories/price-list';\nexport const SAVE_ORDER = 'orders';\nexport const SAVE_DRAFT_ORDER = 'orders/draft';\nexport const DELETE_ORDER = (orderId: IdType) => `orders/${orderId}`;\nexport const GET_ORDER = (orderId: IdType) => `orders/${orderId}`;\nexport const GET_PDF_BY_ORDER = (\n  orderId: ITEPortal_Domain_Dto_OrderDto['orderId']\n) => `orders/${orderId}/pdf`;\nexport const EXHIBITIONS_TABLE = 'exhibitions/admin-summaries';\nexport const EXHIBITORS_FROM_EXHIBITOR = 'exhibitors/exhibition';\nexport const CREATE_EXHIBITION = 'exhibitions';\nexport const EDIT_EXHIBITION = (exhibitionId: IdType) =>\n  `exhibitions/${exhibitionId}`;\nexport const EXHIBITION_DATA = (exhibitionId: IdType) =>\n  `exhibitions/${exhibitionId}`;\nexport const SELLING_OFFICES = 'selling-offices';\nexport const USERS = 'users';\nexport const EDIT_USER_INFO = (userId: IdType) => `users/${userId}`;\nexport const ADD_USER = `users/add`;\nexport const EDIT_USER = `users/update`;\nexport const DELETE_USER = (userId: IdType) => `users/delete/${userId}`;\nexport const TECHNICAL_MANAGERS = 'users/technical-managers';\nexport const ADD_EXHIBITOR = 'exhibitors';\nexport const EDIT_EXHIBITOR = (exhibitorId: IdType) =>\n  `exhibitors/${exhibitorId}`;\nexport const USER_CHECK = 'users/email';\nexport const PLACED_ORDERS = 'orders';\nexport const CHANGE_ORDER_STATUS = (orderId: IdType) =>\n  `orders/${orderId}/status`;\nexport const SAVE_STAND = (exhibitionId: IdType) =>\n  `exhibitions/${exhibitionId}/stands`;\nexport const EDIT_STAND = (exhibitionId: IdType, standId: IdType) =>\n  `exhibitions/${exhibitionId}/stands/${standId}`;\nexport const EDIT_MAIN_INFO = (exhibitorId: IdType) =>\n  `exhibitors/${exhibitorId}`;\nexport const GET_STAND = (exhibitionId: IdType, exhibitorId: IdType) =>\n  `exhibitions/${exhibitionId}/exhibitors/${exhibitorId}/stands`;\nexport const SAVE_EXHIBITION_IMG = (exhibitionId: IdType) =>\n  `exhibitions/${exhibitionId}/logo`;\nexport const GET_PRICELISTS = (exhibitionId: IdType) =>\n  `exhibitions/${exhibitionId}/price-lists`;\nexport const GET_PRICELIST_ITEMS = (\n  exhibitionId: IdType,\n  priceListId: IdType\n) => `exhibitions/${exhibitionId}/price-lists/${priceListId}/items`;\nexport const GET_PRICELIST_ITEM_IDS = 'products';\nexport const GET_PRICELIST_ITEM_IDS_SHORT = 'products/short';\nexport const DOWNLOAD_EXHIBITOR_CSV = (exhibitionId: IdType) =>\n  `exhibition/${exhibitionId}/exhibitors/batch`;\nexport const ADD_PRICELIST_ITEM = (exhibitionId: IdType, priceListId: IdType) =>\n  `exhibitions/${exhibitionId}/price-lists/${priceListId}/items`;\nexport const EDIT_PRICELIST_ITEM = (\n  exhibitionId: IdType,\n  priceListId: IdType,\n  priceListItemId: IdType\n) =>\n  `exhibitions/${exhibitionId}/price-lists/${priceListId}/items/${priceListItemId}`;\nexport const IMPORT_PRICELIST_ITEMS = (\n  exhibitionId: IdType,\n  priceListId: IdType\n) => `exhibitions/${exhibitionId}/price-lists/${priceListId}/items/batch`;\nexport const GET_PRICELIST_PRODUCTS = 'pricelist-items';\nexport const GET_PRODUCTS = 'products';\nexport const SAVE_PRODUCT_IMAGES = (name: string) => `products/${name}/images`;\nexport const SAVE_CATEGORIES = 'categories';\nexport const SAVE_CATEGORY_IMAGES = (name: string) =>\n  `categories/${name}/image`;\nexport const MEMBERS = 'admin-summaries';\nexport const EDIT_MEMBERS = (memberId: IdType) => `admin-summaries/${memberId}`;\nexport const DELETE_EXHIBITOR = (exhibitionId: IdType, exhibitorId: IdType) =>\n  `exhibitions/${exhibitionId}/exhibitors/${exhibitorId}`;\nexport const EDIT_PRODUCT_RESOURCES = (name: string) =>\n  `products/${name}/resources`;\nexport const EDIT_CATEGORY_RESOURCES = (name: string) =>\n  `categories/${name}/resources`;\nexport const PARENT_CATEGORIES = 'categories/parent-categories';\nexport const GLOBAL_SETTINGS = 'global-settings';\nexport const SAVE_FROM_EMAIL = 'global-settings/edit-fromEmail';\nexport const SAVE_USER_NAME = 'global-settings/edit-username';\nexport const SAVE_HOST = 'global-settings/edit-host';\nexport const SAVE_PORT = 'global-settings/edit-port';\nexport const EDIT_PASSWORD = 'global-settings/edit-password';\nexport const DELETE_PRICE_LIST = (exhibitionId: IdType, priceListId: IdType) =>\n  `exhibitions/${exhibitionId}/price-lists/${priceListId}`;\nexport const CHANGE_ORDER_PRODUCT = (exhibitionId: IdType, orderId: IdType) =>\n  `exhibitions/${exhibitionId}/orders/${orderId}`;\nexport const CHANGE_MAIN_LOGO = 'global-settings/edit-logo';\nexport const SEND_EMAIL = (orderId: IdType) =>\n  `orders/${orderId}/send-order-changed-confirmation`;\nexport const DELETE_ORDER_ITEM = (exhibitionId: IdType, orderId: IdType) =>\n  `exhibitions/${exhibitionId}/orders/${orderId}`;\nexport const DELETE_SERVICE = 'products';\n","import { t } from 'i18next';\nimport { BadgeItem } from '@/components/OrderTableRow/OrderTableRow';\n\nexport const EN_LANGUAGE = 'en';\nexport const DC_LANGUAGE = 'dc';\nexport const FR_LANGUAGE = 'fr';\nexport const IT_LANGUAGE = 'it';\nexport const SP_LANGUAGE = 'sp';\n\nexport const LANGUAGES_OPTIONS: BadgeItem[] = [\n  {\n    key: EN_LANGUAGE,\n    value: t(EN_LANGUAGE) as string,\n  },\n  {\n    key: DC_LANGUAGE,\n    value: t(DC_LANGUAGE) as string,\n  },\n  {\n    key: FR_LANGUAGE,\n    value: t(FR_LANGUAGE) as string,\n  },\n  {\n    key: IT_LANGUAGE,\n    value: t(IT_LANGUAGE) as string,\n  },\n  {\n    key: SP_LANGUAGE,\n    value: t(SP_LANGUAGE) as string,\n  },\n];\n","import {\n  ITEPortal_Contracts_Enums_BuildingType,\n  ITEPortal_Contracts_Enums_OrderStatus,\n} from '../api';\n\nexport const ORDER_STATUSES = {\n  Undefined: 0,\n  Submitted: 1,\n  Draft: 2,\n  Invoiced: 3,\n  Paid: 4,\n  Cancelled: 5,\n  Processing: 6,\n} satisfies Record<\n  | 'Undefined'\n  | 'Submitted'\n  | 'Draft'\n  | 'Invoiced'\n  | 'Paid'\n  | 'Cancelled'\n  | 'Processing',\n  ITEPortal_Contracts_Enums_OrderStatus\n>;\n\nexport const PERSONAL_DISCOUNT_TYPE = {\n  PERCENT: 0,\n  AMOUNT: 1,\n} as const;\n\nexport const SPACE_ONLY_BUILDING_TYPE: ITEPortal_Contracts_Enums_BuildingType = 1;\n","export const USERS_PATH = '/users';\nexport const SHOW_EXHIBITION_PATH = '/exhibitions/:exhibitionId';\nexport const SHOW_SUPPORT_MANAGER_PATH = '/admin/:page';\nexport const SHOW_SUPPORT_MANAGER_ACTION_PATH = '/admin/:page/:type';\nexport const SHOW_SUPPORT_MANAGER_ADDITIONAL_PATH = '/additionalPage/:page';\nexport const SHOW_SUPPORT_MANAGER_ADDITIONAL_ACTION_PATH =\n  '/additionalPage/:page/:type';\nexport const CREATE_EXHIBITION_ORDER_PATH =\n  '/exhibitions/:exhibitionId/:stand/create';\nexport const CREATE_EXHIBITION_ORDER_TAB_PATH =\n  '/exhibitions/:exhibitionId/:stand/create/:service';\nexport const CREATE_EXHIBITION_CART_PATH =\n  '/exhibitions/:exhibitionId/:stand/cart';\n\nexport const MANUAL_PATH = '/manual';\n","export const SELECT_BUILDING = 'select-building';\nexport const CLEANING = 'cleaning';\nexport const CAR_PASSES = 'auto-card';\nexport const WATER_SUPPLY = 'water';\nexport const TELECOMMUNICATIONS = 'telecommunication';\nexport const GRAPHIC_WORKS = 'graphic-works';\nexport const COMPRESSED_AIR = 'air';\nexport const TV_RENT = 'tv-rent';\nexport const STAND_DESIGN = 'stand-design';\nexport const CARPET_COVERING = 'carpet-covering';\nexport const WALL_PANELS = 'wall-panels';\nexport const TEMPORARY_STAFF = 'temporary-staff';\nexport const POWER = 'power';\nexport const DOORS_FENCES = 'doors-fences';\nexport const OTHER_CONSTRUCTIVE = 'other-constructive';\nexport const SOCKETS_LIGHTING = 'sockets-lights';\nexport const SOCKETS = 'sockets';\nexport const LIGHTING = 'lighting';\nexport const CART_TABLE = [\n  'name',\n  'price',\n  'amount',\n  'total',\n  'delete',\n] as const;\nexport const FURNITURE = 'furniture';\nexport const CHAIR = 'chair';\nexport const TABLE = 'table';\nexport const RACK = 'rack';\nexport const RACKS_CABINETS_SHELVES = 'racks-cabinets-shelves';\nexport const SHOWCASE = 'showcase';\nexport const PODIUM = 'podium';\nexport const OTHER_FURNITURE = 'other-furniture';\nexport const KITCHEN_EQUIPMENT = 'kitchen-equipment';\n\nexport const USERS = 'users';\nexport const SETTINGS = 'settings';\nexport const EXHIBITIONS = 'exhibitions';\nexport const SERVICE_DICTIONARY = 'service-dictionary';\nexport const MEMBER_DIRECTORY = 'member-directory';\nexport const OTHER_REFERENCE = 'other-reference';\nexport const PERSONAL_ACCOUNTS = 'personal-accounts';\nexport const PLACED_ORDERS = 'placed-orders';\nexport const CREATE_USER = 'users';\nexport const CREATE_USER_ADD_PAGE = 'users/add';\nexport const CREATE_USER_EDIT_PAGE = 'users/edit';\n","export const LOGIN_PATH = '/login';\nexport const VERIFY_EMAIL_PATH = '/verify-email';\n","import VerifyEmailPage from '@/pages/VerifyEmailPage';\nimport LoginPage from '@/pages/LoginPage';\nimport Layout from '@/layout/Auth';\n\nimport { Outlet, redirect, Route } from '@tanstack/react-router';\nimport { LOGIN_PATH, VERIFY_EMAIL_PATH } from './RoutesConfig/authRoutesConfig';\nimport { rootRoute } from './root';\nimport { indexRouteFactory } from './userPaths';\nimport { UserRoleType } from '../../types/open-api/domain-types';\nimport { $auth } from '@/store/effector/auth';\n\nexport const rootAuthRoute = new Route({\n  id: 'auth-root',\n  getParentRoute: () => rootRoute,\n  beforeLoad: () => {\n    const { isLoggedIn, user } = $auth.getState();\n\n    if (isLoggedIn && user?.role) {\n      throw redirect({\n        to: indexRouteFactory(user.role as UserRoleType),\n        replace: true,\n      });\n    }\n  },\n  component: () => {\n    return (\n      <Layout>\n        <Outlet />\n      </Layout>\n    );\n  },\n});\n\nexport const loginRoute = new Route({\n  path: LOGIN_PATH,\n  component: () => <LoginPage />,\n  getParentRoute: () => rootAuthRoute,\n  validateSearch: (\n    searchObj: Record<string, unknown>\n  ): { redirect: string } => {\n    return {\n      redirect:\n        typeof searchObj.redirect === 'string' ? searchObj.redirect : '',\n    };\n  },\n});\n\nexport const verifyEmailRoute = new Route({\n  path: VERIFY_EMAIL_PATH,\n  component: () => <VerifyEmailPage />,\n  getParentRoute: () => rootAuthRoute,\n  validateSearch: (\n    searchObj: Record<string, unknown>\n  ): { redirect: string } => {\n    return {\n      redirect:\n        typeof searchObj.redirect === 'string' ? searchObj.redirect : '',\n    };\n  },\n});\n\nexport const authRouteTree = rootAuthRoute.addChildren([\n  loginRoute,\n  verifyEmailRoute,\n]);\n","import { User } from '@/model/IUser';\nimport { checkRBACRule, RBACRulesType } from '@/features/rbac/useRBAC';\nimport { redirect } from '@tanstack/react-router';\nimport { indexRouteFactory } from '@/features/Routing/userPaths';\nimport { RoleType } from '@/model/common';\n\nexport const routerRBACGuard = async (\n  user: User | null,\n  rule: RBACRulesType\n) => {\n  if (!user) {\n    return;\n  }\n\n  if (!checkRBACRule(user)(rule)) {\n    throw redirect({\n      to: indexRouteFactory(user.role as RoleType),\n      replace: true,\n    });\n  }\n};\n","import { Outlet, redirect, Route } from '@tanstack/react-router';\nimport { rootRoute } from './root';\nimport { Profile } from '@/pages/Profile/Profile';\nimport { AdminPanelPage } from '@/layout/AdminPanel';\nimport { exhibitionsRoutesTree } from './protected/admin-exhibitions';\nimport { serviceDictionaryRoutesRootTree } from './protected/service-dictionary';\nimport { memberDirectoryRoutesTree } from './protected/member-directory';\nimport { settingsRoutesRootTree } from './protected/settings';\nimport { usersRoutesRootTree } from './protected/users';\nimport {\n  createExhibitionOrderCategoryRoute,\n  createExhibitionOrderServiceRoute,\n  exhibitionRootRoute,\n  exhibitionViewRoute,\n  standProjectRoute,\n  viewExhibitionCart,\n} from './protected/exhibitions-by-role';\nimport { ADMIN_AREA_PREFIX, indexRouteFactory } from './userPaths';\nimport { RoleType } from '@/model/common';\nimport { $auth } from '@/store/effector/auth';\nimport { agentRoutesRoot } from '@/features/Routing/protected/agent-pages';\n\nexport const protectedRoute = new Route({\n  id: 'protected',\n  getParentRoute: () => rootRoute,\n  beforeLoad: (opts) => {\n    const { isLoggedIn, user } = $auth.getState();\n\n    if (!isLoggedIn) {\n      throw redirect({\n        to: '/login',\n        search: {\n          redirect: opts.location.href,\n        },\n      });\n    }\n\n    return {\n      role: user?.role,\n      user,\n    };\n  },\n  component: () => {\n    return <Outlet />;\n  },\n});\n\nexport const indexRoute = new Route({\n  path: '/',\n  beforeLoad: async (opts) => {\n    const { role } = opts.context;\n\n    if (role) {\n      throw redirect({\n        to: indexRouteFactory(role as RoleType),\n        replace: true,\n      });\n    }\n  },\n  getParentRoute: () => protectedRoute,\n});\n\nexport const profileRoute = new Route({\n  path: '/profile',\n  getParentRoute: () => protectedRoute,\n  component: () => <Profile />,\n});\n\nexport const cabinetRoute = new Route({\n  path: ADMIN_AREA_PREFIX,\n  getParentRoute: () => protectedRoute,\n  component: () => <AdminPanelPage />,\n});\n\nexport const flatRouteTree = new Route({\n  id: 'routes-by-role',\n  getParentRoute: () => protectedRoute,\n});\n\nexport const protectedTree = protectedRoute.addChildren([\n  cabinetRoute.addChildren([\n    exhibitionsRoutesTree,\n    serviceDictionaryRoutesRootTree,\n    memberDirectoryRoutesTree,\n    settingsRoutesRootTree,\n    usersRoutesRootTree,\n  ]),\n\n  flatRouteTree.addChildren([\n    indexRoute,\n    agentRoutesRoot,\n    profileRoute,\n    exhibitionRootRoute.addChildren([\n      exhibitionViewRoute,\n      viewExhibitionCart,\n      createExhibitionOrderCategoryRoute,\n      createExhibitionOrderServiceRoute,\n      standProjectRoute,\n    ]),\n  ]),\n]);\n","import { Route } from '@tanstack/react-router';\nimport { cabinetRoute } from '../protected';\nimport { NewExhibition } from '@/pages/AdminPanel/Exhibitions/NewExhibition';\nimport { PlacedOrders } from '@/pages/AdminPanel/PlacedOrders/PlacedOrders';\nimport { EditOrder } from '@/pages/AdminPanel/PlacedOrders/EditOrder/EditOrder';\nimport { NewAccount } from '@/pages/AdminPanel/PersonalAccounts/NewAccount';\nimport * as v from 'zod';\nimport { ManagerType, SellingOfficeType } from '@/types/open-api/domain-types';\nimport { typedAxios } from '@/api/typed-axios';\nimport { CreateOrder } from '@/pages/AdminPanel/PlacedOrders/CreateOrder';\nimport { Loader } from '@/components/Loader/Loader';\nimport { OptionType } from '@/model/common';\nimport {\n  type ITEPortal_Domain_Dto_AdminExhibitorSummary,\n  type ITEPortal_Domain_Dto_CatalogExhibitorSummary,\n  ITEPortal_Domain_Dto_CurrencyDto,\n} from '@/api';\nimport { IBaseOrder } from '@/model/IBaseOrder';\nimport { SearchBoxOptionsType } from '@/components/AdminSearch/types';\nimport i18n from '@/i18n';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { ExhibitionsTabsPage } from '@/pages/AdminPanel/Exhibitions/ExhibitionsTabsPage';\nimport { routerRBACGuard } from '@/features/Routing/guard';\nimport { PersonalAccountsTab } from '@/pages/AdminPanel/PersonalAccounts/PersonalAccountsTabs';\n\nexport const adminExhibitionRoutesRoot = new Route({\n  path: '/exhibitions',\n  getParentRoute: () => cabinetRoute,\n  beforeLoad: async ({ context: { user } }) => {\n    await routerRBACGuard(user, 'canAccessAdminExhibitions');\n\n    return { page: 'exhibitions' };\n  },\n});\n\nexport const exhibitionsTabs = ['current', 'past'] as const;\nexport const ExhibitionAccountsTabs = ['posted', 'process'] as const;\n\nconst ExhibitionListRouteSearchSchema = v.object({\n  tab: v.enum(exhibitionsTabs).catch('current'),\n});\n\nconst ExhibitionAccountsListRouteSearchSchema = v.object({\n  tab: v.enum(ExhibitionAccountsTabs).catch('posted'),\n});\n\nexport type ExhibitionListRouteSearchSchemaType = v.infer<\n  typeof ExhibitionListRouteSearchSchema\n>;\n\nexport const exhibitionListRoute = new Route({\n  path: '/',\n  getParentRoute: () => adminExhibitionRoutesRoot,\n  component: () => <ExhibitionsTabsPage />,\n  beforeLoad: () => ({\n    searchOptions: [\n      {\n        placeholder: i18n.t('search-exhibition'),\n      } satisfies SearchBoxOptionsType,\n    ],\n  }),\n\n  validateSearch: (searchObj) => {\n    return ExhibitionListRouteSearchSchema.parse(searchObj);\n  },\n});\n\nexport const createExhibitionRoute = new Route({\n  path: 'add',\n  getParentRoute: () => adminExhibitionRoutesRoot,\n  component: () => <NewExhibition type=\"add\" />,\n  beforeLoad: () => ({ type: 'add' }),\n  loader: async () => {\n    const technicalManagers = await typedAxios.user\n      .getUsersTechnicalManagers()\n      .catch(() => []);\n\n    const technicalManagersOptions = technicalManagers.map((manager) => {\n      return {\n        label: manager.email || manager.id,\n        value: manager?.email || manager.id,\n      };\n    });\n\n    return {\n      technicalManagers: technicalManagersOptions,\n    };\n  },\n});\n\nexport const editExhibitionRoute = new Route({\n  path: '/$exhibitionId/edit',\n  getParentRoute: () => adminExhibitionRoutesRoot,\n  component: () => <NewExhibition type=\"edit\" />,\n  beforeLoad: () => ({ type: 'edit' }),\n  loader: async () => {\n    const technicalManagers = await typedAxios.user\n      .getUsersTechnicalManagers()\n      .catch(() => []);\n\n    const technicalManagersOptions = technicalManagers.map((manager) => {\n      return {\n        label: manager.email || manager.id,\n        value: manager?.email || manager.id,\n      };\n    });\n\n    return {\n      technicalManagers: technicalManagersOptions,\n    };\n  },\n});\n\nexport const viewExhibitionRoute = new Route({\n  path: '/$exhibitionId/view',\n  getParentRoute: () => adminExhibitionRoutesRoot,\n  loader: async () => {\n    // const { exhibitionId } = store.getState().common;\n    //\n    // if (+exhibitionId !== +opts.params.exhibitionId) {\n    //   const exhibition = await typedAxios.exhibition.getExhibitions({\n    //     id: +opts.params.exhibitionId,\n    //   });\n    //\n    //   store.dispatch(setExhibitionId(opts.params.exhibitionId));\n    //   store.dispatch(setExhibitionName(exhibition.name));\n    // }\n  },\n});\n\nexport const viewExhibitionAccountsRoute = new Route({\n  path: 'personal-accounts',\n  getParentRoute: () => viewExhibitionRoute,\n  component: () => <PersonalAccountsTab />,\n  validateSearch: (searchObj) => {\n    return ExhibitionAccountsListRouteSearchSchema.parse(searchObj);\n  },\n  beforeLoad: async (opts) => {\n    await routerRBACGuard(\n      opts.context.user,\n      'canAccessExhibitionPersonalAccounts'\n    );\n\n    return {\n      page: 'personal-accounts',\n      searchOptions: [\n        {\n          placeholder: i18n.t('search-exhibitors'),\n        } satisfies SearchBoxOptionsType,\n      ],\n    };\n  },\n});\n\nexport const settingsTabs = [\n  'main',\n  'stands',\n  'users',\n  'products',\n  'subexponents',\n] as const;\n\nconst EditPersonalAccountsPageSearchSchema = v.object({\n  tab: v.enum(settingsTabs).catch('main'),\n});\n\nexport type EditPersonalAccountsPageSearchSchemaType = v.infer<\n  typeof EditPersonalAccountsPageSearchSchema\n>;\n\nexport const editExhibitionAccountRoute = new Route({\n  path: 'personal-accounts/$accountId/edit',\n  getParentRoute: () => viewExhibitionRoute,\n  component: () => <NewAccount type=\"edit\" />,\n  pendingComponent: () => <Loader centralized />,\n  validateSearch: (searchObj) => {\n    return EditPersonalAccountsPageSearchSchema.parse(searchObj);\n  },\n  shouldReload: (match) => {\n    return match.cause === 'enter';\n  },\n  beforeLoad: async (opts) => {\n    await routerRBACGuard(\n      opts.context.user,\n      'canAccessExhibitionPersonalAccounts'\n    );\n\n    return {\n      page: 'personal-accounts',\n      type: 'edit',\n      backPath: `/admin/exhibitions/${opts.params.exhibitionId}/view/personal-accounts`,\n    };\n  },\n  loader: async (match) => {\n    const {\n      context: { queryClient },\n      params: { exhibitionId, accountId },\n    } = match;\n    const accountData = await queryClient.ensureQueryData(\n      QueryOptions.exhibitorQueryOptions({\n        exhibitorId: +accountId,\n        exhibitionId: +exhibitionId,\n      })\n    );\n\n    const technicalManagers = await typedAxios.user.getUsersTechnicalManagers1({\n      exhibitionId: +exhibitionId,\n    });\n    const sellingOffices = await typedAxios.sellingOffice.getSellingOffices();\n\n    const currencyData = await typedAxios.currency\n      .getCurrency()\n      .catch(() => []);\n\n    const officesOptions = sellingOffices.map((office) => {\n      return { label: office.name || office.id, value: office.id || office.id };\n    });\n    const technicalManagersOptions = technicalManagers.map((manager) => {\n      return {\n        label: manager?.email || manager.id,\n        value: manager?.email || manager.id,\n      };\n    });\n\n    const currencyOptions = currencyData?.map(\n      (option: ITEPortal_Domain_Dto_CurrencyDto) => {\n        return {\n          label: option?.name,\n          value: option?.id,\n        };\n      }\n    );\n\n    const agents = await (async () => {\n      if (accountData.isAgent) {\n        return [] as Array<OptionType>;\n      }\n\n      return await typedAxios.exhibitor\n        .getExhibitorsExhibitionsAgents({\n          exhibitionId: +exhibitionId,\n        })\n        .then((agentsModels) => {\n          return agentsModels.map(\n            (ag) =>\n              ({\n                value: ag.id,\n                label: ag.name,\n              } satisfies OptionType)\n          );\n        })\n        .catch(() => [] as Array<OptionType>);\n    })();\n\n    return {\n      technicalManagers: technicalManagersOptions,\n      currencyOptions,\n      data: accountData,\n      offices: officesOptions,\n      agents,\n      companies: [] as Array<\n        OptionType<ITEPortal_Domain_Dto_CatalogExhibitorSummary>\n      >,\n    };\n  },\n});\n\nexport const addExhibitionAccountRoute = new Route({\n  path: 'personal-accounts/add',\n  getParentRoute: () => viewExhibitionRoute,\n  component: () => <NewAccount type=\"add\" />,\n  pendingComponent: () => <Loader centralized />,\n  validateSearch: (searchObj) => {\n    return EditPersonalAccountsPageSearchSchema.parse(searchObj);\n  },\n  beforeLoad: async (opts) => {\n    await routerRBACGuard(\n      opts.context.user,\n      'canAccessExhibitionPersonalAccounts'\n    );\n\n    return {\n      page: 'personal-accounts',\n      type: 'add',\n      backPath: `/admin/exhibitions/${opts.params.exhibitionId}/view/personal-accounts`,\n    };\n  },\n  loader: async (match) => {\n    const {\n      params: { exhibitionId },\n    } = match;\n\n    const technicalManagers = await typedAxios.user.getUsersTechnicalManagers1({\n      exhibitionId: +exhibitionId,\n    });\n\n    const companies = await (async () => {\n      try {\n        return await typedAxios.exhibitor.getAdminSummaries({\n          pageSize: -1,\n        });\n      } catch {\n        return [];\n      }\n    })();\n\n    const sellingOffices = await typedAxios.sellingOffice.getSellingOffices();\n\n    const currencyData = await typedAxios.currency\n      .getCurrency()\n      .catch(() => []);\n\n    const technicalManagersOptions = technicalManagers.map(\n      (manager: ManagerType) => {\n        return {\n          label: manager.email || manager.id,\n          value: manager.email || manager.id,\n        };\n      }\n    );\n\n    const agents = await typedAxios.exhibitor\n      .getExhibitorsExhibitionsAgents({\n        exhibitionId: +exhibitionId,\n      })\n      .then((agentsModels) => {\n        return agentsModels.map(\n          (ag) =>\n            ({\n              value: ag.id,\n              label: ag.name,\n            } satisfies OptionType)\n        );\n      })\n      .catch(() => [] as Array<ITEPortal_Domain_Dto_AdminExhibitorSummary>);\n\n    const officesOptions = sellingOffices.map((office: SellingOfficeType) => {\n      return {\n        label: office.name || office.id,\n        value: office.id || office.id,\n      };\n    });\n\n    const currencyOptions = currencyData?.map(\n      (option: ITEPortal_Domain_Dto_CurrencyDto) => {\n        return {\n          label: option?.name,\n          value: option?.id,\n        };\n      }\n    );\n\n    return {\n      technicalManagers: technicalManagersOptions,\n      currencyOptions,\n      offices: officesOptions,\n      data: {},\n      agents,\n      companies: companies.map((c) => ({\n        value: c.id,\n        label: c.name,\n        meta: c,\n      })) satisfies Array<\n        OptionType<ITEPortal_Domain_Dto_CatalogExhibitorSummary>\n      >,\n    };\n  },\n});\n\nconst PlacedOrdersRouteSearchSchema = v.object({\n  exhibitorId: v.coerce.number().optional(),\n  orderStatus: v.coerce.number().optional(),\n});\n\nexport const viewExhibitionPlacedOrdersRoute = new Route({\n  path: 'placed-orders',\n  getParentRoute: () => viewExhibitionRoute,\n  component: PlacedOrders,\n  beforeLoad: () => ({\n    page: 'placed-orders',\n    searchOptions: [\n      {\n        placeholder: i18n.t('search-orders'),\n      } satisfies SearchBoxOptionsType,\n    ],\n  }),\n\n  validateSearch: (searchObj) => {\n    return PlacedOrdersRouteSearchSchema.parse(searchObj);\n  },\n});\n\nexport const editOrderRoute = new Route({\n  path: 'placed-orders/$orderId/edit',\n  getParentRoute: () => viewExhibitionRoute,\n  component: EditOrder,\n  beforeLoad: (opts) => {\n    const { exhibitionId } = opts.params;\n\n    return {\n      page: 'placed-orders',\n      type: 'edit',\n      backPath: `/admin/exhibitions/${exhibitionId}/view/placed-orders/`,\n    };\n  },\n  pendingComponent: () => <Loader centralized />,\n  loader: async (opts) => {\n    const {\n      params: { exhibitionId, orderId },\n      context: { user },\n    } = opts;\n\n    const isAgent = user?.isAgent || null;\n\n    const order = await typedAxios.order.getOrders1({\n      orderId: +orderId,\n    });\n\n    const alreadyAddedItemIds =\n      order.products?.filter((p) => !p.included).map((p) => p.id) || [];\n\n    const exhibitors = await typedAxios.exhibitor.getExhibitorsExhibition({\n      exhibitionId: +exhibitionId,\n    });\n\n    const exhibitor = exhibitors.find((e) => e.id === order.exhibitorId);\n\n    const items = await typedAxios.priceListItem.getExhibitionsPriceListsItems({\n      exhibitionId: +exhibitionId,\n      priceListId: exhibitor?.priceListId || 0,\n    });\n\n    const sellingOffices = isAgent\n      ? null\n      : await typedAxios.sellingOffice.getSellingOffices();\n\n    return {\n      order: new IBaseOrder(order),\n      exhibitor,\n      sellingOffices,\n      currency: isAgent ? null : order?.currency,\n      items: items.filter(\n        (i) => i.name && !alreadyAddedItemIds.includes(i.name)\n      ),\n    };\n  },\n});\n\nexport const createOrderRoute = new Route({\n  path: 'placed-orders/create',\n  getParentRoute: () => viewExhibitionRoute,\n  component: CreateOrder,\n  validateSearch: (searchObj) => {\n    return PlacedOrdersRouteSearchSchema.parse(searchObj);\n  },\n  pendingComponent: () => <Loader centralized />,\n  loader: async (opts) => {\n    const {\n      params: { exhibitionId },\n    } = opts;\n\n    const exhibitors = await typedAxios.exhibitor.getExhibitorsExhibition({\n      exhibitionId: +exhibitionId,\n    });\n\n    return {\n      exhibitors: exhibitors.map((exhibitor) => {\n        return {\n          label: exhibitor.name,\n          value: exhibitor.id,\n          meta: exhibitor,\n        };\n      }) satisfies Array<\n        OptionType<ITEPortal_Domain_Dto_AdminExhibitorSummary>\n      >,\n    };\n  },\n  beforeLoad: (opts) => {\n    const { exhibitionId } = opts.params;\n\n    return {\n      page: 'placed-orders',\n      type: 'create',\n      backPath: `/admin/exhibitions/${exhibitionId}/view/placed-orders/`,\n    };\n  },\n});\n\nexport const exhibitionsRoutesTree = adminExhibitionRoutesRoot.addChildren([\n  exhibitionListRoute,\n  createExhibitionRoute,\n  editExhibitionRoute,\n  viewExhibitionRoute.addChildren([\n    viewExhibitionAccountsRoute,\n    editExhibitionAccountRoute,\n    addExhibitionAccountRoute,\n    viewExhibitionPlacedOrdersRoute,\n    editOrderRoute,\n    createOrderRoute,\n  ]),\n]);\n","import { redirect, Route } from '@tanstack/react-router';\nimport { flatRouteTree } from '@/features/Routing/protected';\nimport { AgentHome } from '@/pages/AgentHome';\nimport { User } from '@/model/IUser';\nimport { indexRouteFactory } from '@/features/Routing/userPaths';\nimport { RoleType } from '@/model/common';\n\nexport const agentRoutesRoot = new Route({\n  path: '/agent-home',\n  getParentRoute: () => flatRouteTree,\n  component: AgentHome,\n  beforeLoad: async ({ context: { role } }) => {\n    if (role !== User.Role.Agent) {\n      throw redirect({\n        to: indexRouteFactory(role as RoleType),\n        replace: true,\n      });\n    }\n  },\n});\n","import { redirect, Route } from '@tanstack/react-router';\nimport { flatRouteTree } from '../protected';\nimport Exhibition from '../../../pages/Exhibition';\nimport Cart from '../../../pages/Cart';\nimport Categories from '../../../pages/Order/Categories';\nimport Service from '../../../pages/Order/Service';\nimport { Loader } from '@/components/Loader/Loader';\n\nimport { typedAxios } from '@/api/typed-axios';\nimport { ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto } from '@/api';\n\nimport { leaveExhibitionOrderEvent } from '@/store/effector/cleanup';\nimport { $exhibition, exhibitionApi } from '@/store/effector/exhibition';\n\nimport { CatalogGateHOC } from '@/store/effector/catalog-gate';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { QueryClient } from '@tanstack/react-query';\nimport { IExhibition } from '@/model/IExhibition';\nimport { $stand, standApi } from '@/store/effector/stand';\nimport { StandProject } from '@/pages/StandProject';\nimport { routerRBACGuard } from '@/features/Routing/guard';\n\nexport const exhibitionRootRoute = new Route({\n  path: '/exhibitions',\n  getParentRoute: () => flatRouteTree,\n  onLeave: () => {\n    leaveExhibitionOrderEvent();\n  },\n  pendingComponent: () => <Loader centralized />,\n  beforeLoad: async (opts) => {\n    // @ts-expect-error for root route there is no such param, but for child routes it will be\n    const { exhibitionId } = opts.params;\n    const {\n      context: { user },\n    } = opts;\n\n    await routerRBACGuard(user, 'canAccessExhibitionProfile');\n\n    if (!exhibitionId) {\n      return { exhibition: null };\n    }\n\n    const exhibitionInstance = $exhibition.getState().exhibition;\n\n    if (exhibitionInstance instanceof IExhibition) {\n      if (exhibitionInstance.id == exhibitionId) {\n        return {\n          exhibition: exhibitionInstance,\n        };\n      }\n    }\n\n    const exhibition = await typedAxios.exhibition.getExhibitions({\n      id: +exhibitionId,\n    });\n\n    const exhibitionNewInstance = new IExhibition({\n      id: +exhibitionId,\n      ...exhibition,\n    });\n\n    exhibitionApi.setInstance(exhibitionNewInstance);\n\n    return { exhibition: exhibitionNewInstance };\n  },\n});\n\nexport const exhibitionViewRoute = new Route({\n  path: '$exhibitionId',\n  getParentRoute: () => exhibitionRootRoute,\n  loader: async (opts) => {\n    const { exhibitionId } = opts.params;\n    const data = await typedAxios.stand.getExhibitionsExhibitorStands({\n      exhibitionId: +exhibitionId,\n    });\n\n    return { standsData: data };\n  },\n  pendingComponent: () => <Loader centralized />,\n  component: () => <Exhibition />,\n});\n\nexport const viewExhibitionCart = new Route({\n  path: '$exhibitionId/$stand/cart',\n  getParentRoute: () => exhibitionRootRoute,\n  component: () => <Cart />,\n  loader: async ({ params, context: { queryClient } }) => {\n    const cleaningDiscount = await typedAxios.discount\n      .getDiscountsCleaning()\n      .then((response) => response)\n      .catch(() => {\n        return [] as ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto[];\n      });\n\n    await invalidateStand({\n      standId: +params.stand,\n      queryClient,\n    });\n\n    return {\n      cleaningDiscount,\n    };\n  },\n});\n\nconst invalidateStand = async (opts: {\n  standId: number;\n  queryClient: QueryClient;\n}) => {\n  try {\n    const { queryClient, standId } = opts;\n    const stand = await queryClient.ensureQueryData(\n      QueryOptions.loadExhibitorStand({\n        standId,\n      })\n    );\n\n    const exhibition = $exhibition.getState();\n\n    if (\n      exhibition.sellingOfficeId !== stand.sellingOfficeId ||\n      exhibition.exhibitionId !== stand.exhibitionId ||\n      exhibition.currency !== stand.currency\n    ) {\n      exhibitionApi.update({\n        sellingOfficeId: stand.sellingOfficeId,\n        exhibitionId: stand.exhibitionId,\n        currency: stand.currency,\n      });\n    }\n\n    if ($stand.getState().standForOrder?.standId !== stand.standId) {\n      standApi.setStandForOrder(stand);\n    }\n  } catch {}\n};\n\nexport const createExhibitionOrderCategoryRoute = new Route({\n  path: '$exhibitionId/$stand/create',\n  getParentRoute: () => exhibitionRootRoute,\n  component: () => {\n    return (\n      <CatalogGateHOC>\n        <Categories title={'technicalServices'} />\n      </CatalogGateHOC>\n    );\n  },\n  beforeLoad: async ({ params, context: { exhibition, queryClient } }) => {\n    if (exhibition && exhibition.isPast) {\n      throw redirect({\n        to: exhibition.id ? `/exhibitions/${exhibition.id}` : '/',\n      });\n    }\n\n    await invalidateStand({\n      queryClient,\n      standId: +params.stand,\n    });\n  },\n});\n\nexport const createExhibitionOrderServiceRoute = new Route({\n  path: '$exhibitionId/$stand/create/$service',\n  getParentRoute: () => exhibitionRootRoute,\n  component: () => {\n    return (\n      <CatalogGateHOC>\n        <Service />\n      </CatalogGateHOC>\n    );\n  },\n  beforeLoad: async ({ params, context: { queryClient } }) => {\n    await invalidateStand({\n      queryClient,\n      standId: +params.stand,\n    });\n  },\n});\n\nexport const standProjectRoute = new Route({\n  path: '$exhibitionId/$stand/project/$projectId',\n  getParentRoute: () => exhibitionRootRoute,\n  component: StandProject,\n  loader: async ({\n    context: { queryClient },\n    params: { stand: standId, exhibitionId },\n  }) => {\n    const { exhibitionName } = $exhibition.getState();\n\n    if (!exhibitionName) {\n      const exhibition = await typedAxios.exhibition.getExhibitions({\n        id: +exhibitionId,\n      });\n\n      exhibitionApi.update({\n        exhibitionName: exhibition.name,\n      });\n    }\n\n    const project = await queryClient.fetchQuery(\n      QueryOptions.loadStandProject({\n        standId: +standId,\n      })\n    );\n\n    return {\n      project,\n    };\n  },\n});\n","import { Route } from '@tanstack/react-router';\nimport { cabinetRoute } from '../protected';\n\nimport { MembersDirectory } from '../../../pages/AdminPanel/MembersDirectory/MembersDirectory';\nimport { SearchBoxOptionsType } from '../../../components/AdminSearch/types';\nimport i18n from '../../../i18n';\nimport { ManageExhibitorUsers } from '@/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers';\nimport { typedAxios } from '@/api/typed-axios';\nimport { Loader } from '@/components/Loader/Loader';\nimport { routerRBACGuard } from '@/features/Routing/guard';\n\nexport const memberDirectoryRoutesRoot = new Route({\n  path: '/member-directory',\n  getParentRoute: () => cabinetRoute,\n  beforeLoad: async ({ context: { user } }) => {\n    await routerRBACGuard(user, 'canAccessAdminCompanies');\n\n    return { page: 'member-directory' };\n  },\n});\n\nexport const memberDictionaryRoute = new Route({\n  path: '/',\n  getParentRoute: () => memberDirectoryRoutesRoot,\n  component: () => <MembersDirectory />,\n  beforeLoad: () => {\n    return {\n      searchOptions: [\n        {\n          placeholder: i18n.t('search-exhibitors'),\n        } satisfies SearchBoxOptionsType,\n      ],\n    };\n  },\n});\n\nexport const viewExhibitorRoute = new Route({\n  path: '/$exhibitorId',\n  getParentRoute: () => memberDirectoryRoutesRoot,\n  component: () => <ManageExhibitorUsers />,\n  pendingComponent: () => <Loader centralized />,\n  beforeLoad: async (opts) => {\n    const {\n      params: { exhibitorId },\n    } = opts;\n\n    const exhibitor = await typedAxios.exhibitor.getExhibitors({\n      id: +exhibitorId,\n    });\n\n    return {\n      pageTitle: i18n.t('company-employees-title', {\n        companyName: exhibitor.name,\n      }),\n      exhibitor,\n    };\n  },\n  loader: async ({ context: { exhibitor } }) => {\n    return {\n      exhibitor,\n    };\n  },\n});\n\nexport const memberDirectoryRoutesTree = memberDirectoryRoutesRoot.addChildren([\n  memberDictionaryRoute,\n  viewExhibitorRoute,\n]);\n","import { Route } from '@tanstack/react-router';\nimport { cabinetRoute } from '../protected';\nimport { ServiceDirectory } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion';\n\nimport { TKey } from '@/i18n/types';\nimport { SearchBoxOptionsType } from '@/components/AdminSearch/types';\nimport i18n from '@/i18n';\nimport { Button, Flex } from '@chakra-ui/react';\nimport { editCategoryApi } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/edit-category-api';\nimport { routerRBACGuard } from '@/features/Routing/guard';\nimport { editProductApi } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\nimport { queryClient } from '@/features/query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { ApiError } from '@/api';\nimport { toast } from 'react-toastify';\nimport { UseFormReturn } from 'react-hook-form';\nimport {\n  ImportCSVForm,\n  ImportCSVFormValues,\n} from '@/pages/AdminPanel/ServiceDirectory/ImportCSVForm';\nimport { typedAxios } from '@/api/typed-axios';\n\nexport const serviceDictionaryRoutesRoot = new Route({\n  path: '/service-dictionary',\n  getParentRoute: () => cabinetRoute,\n  beforeLoad: async ({ context: { user } }) => {\n    await routerRBACGuard(user, 'canAccessAdminServiceDirectory');\n\n    return { page: 'service-dictionary' satisfies TKey } as const;\n  },\n});\n\nexport const serviceDictionaryRoute = new Route({\n  path: '/',\n  getParentRoute: () => serviceDictionaryRoutesRoot,\n  component: () => <ServiceDirectory />,\n  beforeLoad: async (opts) => {\n    queryClient.ensureQueryData(QueryOptions.loadCategoryOptions());\n\n    const saveCSV = async (values: ImportCSVFormValues) => {\n      try {\n        const response = await typedAxios.product.postProductsBatch({\n          formData: {\n            importProductsFile: values?.file?.[0],\n          },\n        });\n\n        if (response) {\n          const url = window.URL.createObjectURL(new Blob([response]));\n\n          const link = document.createElement('a');\n\n          link.href = url;\n          link.setAttribute('download', 'ErrorRows.csv');\n          document.body.appendChild(link);\n          link.click();\n\n          toast.error(i18n.t('error-rows-file'));\n        } else {\n          toast.success(i18n.t('rows-downloaded-successfully'));\n        }\n      } catch (e) {\n        if (e instanceof ApiError) {\n          const message = e.body;\n\n          if (message && typeof message === 'string') {\n            toast.error(message);\n          } else {\n            toast.error(i18n.t('error-occurred'));\n          }\n        }\n      } finally {\n        ModalFactory.close();\n      }\n    };\n\n    const openImportModal = () => {\n      ModalFactory.show({\n        title: i18n.t('importCSV'),\n        Component: ImportCSVForm,\n        okLabel: i18n.t('importButton'),\n        onOk: async (ctx: UseFormReturn<ImportCSVFormValues>) => {\n          return ctx.handleSubmit(saveCSV)();\n        },\n      });\n    };\n\n    if (!opts.search.tab || opts.search.tab === 'categories') {\n      return {\n        key: 'categories',\n        searchOptions: [\n          {\n            placeholder: i18n.t('search-categories'),\n          } satisfies SearchBoxOptionsType,\n          {\n            placeholder: i18n.t('search-services'),\n            queryParameterName: 'searchProduct',\n          } satisfies SearchBoxOptionsType,\n        ],\n        subHeader: (\n          <Flex flexDirection=\"row\" ml=\"auto\" gap={4}>\n            <Button\n              ml=\"auto\"\n              onClick={() => {\n                editCategoryApi.open({\n                  category: null,\n                  parentCategoryName: undefined,\n                });\n              }}\n            >\n              {i18n.t('add-category')}\n            </Button>\n            <Button\n              ml=\"auto\"\n              onClick={() => {\n                editProductApi.open({\n                  product: null,\n                });\n              }}\n            >\n              {i18n.t('add-service')}\n            </Button>\n            <Button ml=\"auto\" onClick={openImportModal}>\n              {i18n.t('importCSV')}\n            </Button>\n          </Flex>\n        ),\n      };\n    }\n\n    if (opts.search.tab && opts.search.tab === 'services') {\n      return {\n        key: 'services',\n        searchOptions: [\n          {\n            placeholder: i18n.t('search-services'),\n          } satisfies SearchBoxOptionsType,\n        ],\n      };\n    }\n  },\n  validateSearch: (\n    searchObj: Record<string, unknown>\n  ): {\n    tab: 'categories' | 'services' | undefined;\n    action: 'create-category' | undefined;\n  } => {\n    return {\n      tab: ['categories', 'services'].includes(searchObj.tab as string)\n        ? (searchObj.tab as 'categories' | 'services')\n        : undefined,\n\n      action: ['create-category'].includes(searchObj.action as string)\n        ? (searchObj.action as 'create-category')\n        : undefined,\n    };\n  },\n});\n\nexport const serviceDictionaryRoutesRootTree =\n  serviceDictionaryRoutesRoot.addChildren([serviceDictionaryRoute]);\n","import { Route } from '@tanstack/react-router';\nimport { cabinetRoute } from '../protected';\n\nimport { SettingsPage } from '../../../pages/AdminPanel/Settings/SettingsPage';\nimport { typedAxios } from '../../../api/typed-axios';\nimport * as v from 'zod';\nimport { routerRBACGuard } from '@/features/Routing/guard';\n\nexport const settingsRoutesRoot = new Route({\n  path: '/settings',\n  getParentRoute: () => cabinetRoute,\n  beforeLoad: async ({ context: { user } }) => {\n    await routerRBACGuard(user, 'canAccessAdminSettings');\n\n    return { page: 'settings' };\n  },\n});\n\nexport const settingsTabs = [\n  'global',\n  'smtp',\n  'logo',\n  'manual',\n  'discount',\n  'bitrix',\n] as const;\n\nconst SettingsPageSearchSchema = v.object({\n  tab: v.enum(settingsTabs).catch('global'),\n});\n\nexport type SettingsPageSearchSchemaType = v.infer<\n  typeof SettingsPageSearchSchema\n>;\n\nexport const settingsRoute = new Route({\n  path: '/',\n  getParentRoute: () => settingsRoutesRoot,\n  component: () => <SettingsPage />,\n\n  loader: async () => {\n    const settings = await typedAxios.globalSettings.getGlobalSettings();\n    const discounts = await typedAxios.discount.getDiscountsCleaning();\n\n    return { settings, discounts };\n  },\n  validateSearch: (searchObj) => {\n    return SettingsPageSearchSchema.parse(searchObj);\n  },\n});\n\nexport const settingsRoutesRootTree = settingsRoutesRoot.addChildren([\n  settingsRoute,\n]);\n","import { Route } from '@tanstack/react-router';\nimport { cabinetRoute } from '../protected';\n\nimport { UsersTable } from '@/pages/AdminPanel/UsersTable/UsersTable';\nimport { NewUser } from '@/pages/AdminPanel/UsersTable/NewUsers/NewUser';\nimport i18n from '@/i18n';\nimport { SearchBoxOptionsType } from '@/components/AdminSearch/types';\nimport { routerRBACGuard } from '@/features/Routing/guard';\n\nexport const usersRoutesRoot = new Route({\n  getParentRoute: () => cabinetRoute,\n  path: '/users',\n  beforeLoad: async ({ context: { user } }) => {\n    await routerRBACGuard(user, 'canAccessAdminUsers');\n\n    return {\n      page: 'users',\n      searchOptions: [\n        {\n          placeholder: i18n.t('search-users'),\n        } satisfies SearchBoxOptionsType,\n      ],\n    };\n  },\n});\n\nexport const usersListRoute = new Route({\n  getParentRoute: () => usersRoutesRoot,\n  path: '/',\n  component: () => <UsersTable />,\n});\n\nexport const addNewUserRoute = new Route({\n  getParentRoute: () => usersRoutesRoot,\n  path: '/add',\n  component: () => <NewUser type=\"add\" />,\n  beforeLoad: () => ({ page: 'create-user-add' }),\n});\nexport const editUserRoute = new Route({\n  getParentRoute: () => usersRoutesRoot,\n  path: '/$userId/edit',\n  component: () => <NewUser type=\"edit\" />,\n  beforeLoad: () => ({ page: 'create-user-edit' }),\n});\n\nexport const usersRoutesRootTree = usersRoutesRoot.addChildren([\n  usersListRoute,\n  addNewUserRoute,\n  editUserRoute,\n]);\n","import {\n  Route,\n  Router,\n  RouterProvider as TanstackRouterProvider,\n} from '@tanstack/react-router';\nimport { authRouteTree } from './auth';\nimport { protectedTree } from './protected';\nimport { rootRoute } from './root';\nimport { queryClient } from '../query';\n\nconst indexRoute = new Route({\n  getParentRoute: () => rootRoute,\n  path: '/index',\n  component: () => 'index',\n});\n\nconst routeTree = rootRoute.addChildren([\n  protectedTree,\n  authRouteTree,\n  indexRoute,\n]);\n\nexport const router = new Router({\n  routeTree,\n  context: {\n    queryClient,\n  },\n});\n\nexport const RouterProvider = () => {\n  return <TanstackRouterProvider router={router} />;\n};\n","import { Outlet, rootRouteWithContext } from '@tanstack/react-router';\nimport { TanStackRouterDevtools } from '@tanstack/router-devtools';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { queryClient } from '../query';\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools';\n\nexport const rootRoute = rootRouteWithContext<{\n  page?: string;\n  type?: string;\n  queryClient: QueryClient;\n}>()({\n  component: () => {\n    return (\n      <QueryClientProvider client={queryClient}>\n        <Outlet />\n        {process.env.NODE_ENV === 'development' && <TanStackRouterDevtools />}\n        {process.env.NODE_ENV === 'development' && <ReactQueryDevtools />}\n      </QueryClientProvider>\n    );\n  },\n});\n","import { UserRoleType } from '@/types/open-api/domain-types';\nimport { User } from '@/model/IUser';\n\nexport const ADMIN_AREA_PREFIX = '/admin' as const;\nexport const PROFILE_PATH = '/profile' as const;\n\nexport const superAdminPathRootPath =\n  `${ADMIN_AREA_PREFIX}/exhibitions` as const;\n\nexport const exhibitorPathRootPath = PROFILE_PATH;\nexport const agentPathRootPath = '/agent-home' as const;\n\nexport const adminPathRootPath = `${ADMIN_AREA_PREFIX}/users` as const;\n\nexport const supportPathRootPath = superAdminPathRootPath;\n\nexport const technicalManagerPathRootPath = superAdminPathRootPath;\n\nexport const moderatorPathRootPath = superAdminPathRootPath;\n\nexport const indexRouteFactory = (role: UserRoleType) => {\n  switch (role) {\n    case User.Role.Agent:\n      return agentPathRootPath;\n    case User.Role.SuperAdmin:\n      return superAdminPathRootPath;\n    case User.Role.Admin:\n      return adminPathRootPath;\n    case User.Role.SupportManager:\n      return supportPathRootPath;\n    case User.Role.TechnicalManager:\n      return technicalManagerPathRootPath;\n    case User.Role.Moderator:\n      return moderatorPathRootPath;\n    case User.Role.Exhibitor:\n      return exhibitorPathRootPath;\n    default:\n      return '/';\n  }\n};\n","import { isNil } from '@/utils/is-nil';\n\nexport const FEATURES = {\n  VAT_DESCRIPTION: 'VAT_DESCRIPTION',\n  LINKED_ZERO_PRICE_PRODUCTS: 'LINKED_ZERO_PRICE_PRODUCTS',\n  PRODUCT_GALLERY_PREVIEW_IMAGES_COUNT:\n    'PUBLIC_PRODUCT_GALLERY_PREVIEW_IMAGES_COUNT',\n} as const;\n\ntype FeatureKeys = keyof typeof FEATURES;\n\nconst getFeaturesMap = () => {\n  return {\n    VAT_DESCRIPTION: process.env.PUBLIC_VAT_DESCRIPTION,\n    PRODUCT_GALLERY_PREVIEW_IMAGES_COUNT:\n      process.env.PUBLIC_PRODUCT_GALLERY_PREVIEW_IMAGES_COUNT || 3,\n    LINKED_ZERO_PRICE_PRODUCTS: true,\n  };\n};\n\nexport const useFeature = (feature: FeatureKeys) => {\n  const flag = getFeaturesMap()[feature];\n\n  if (isNil(flag)) {\n    return false;\n  }\n\n  return (\n    flag &&\n    flag !== '0' &&\n    flag !== 0 &&\n    flag !== 'false' &&\n    flag !== 'undefined'\n  );\n};\n\nexport const useFeatureValue = <T>(\n  feature: FeatureKeys,\n  defaultValue: T\n): T => {\n  const hasFeature = useFeature(feature);\n\n  if (!hasFeature) {\n    return defaultValue;\n  }\n\n  return getFeaturesMap()[feature] as T;\n};\n","import { QueryClient } from '@tanstack/react-query';\n\nexport const queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      refetchOnWindowFocus: false,\n      refetchIntervalInBackground: false,\n    },\n  },\n});\n","import {\n  ITEPortal_Domain_Dto_AdminExhibitionSummary,\n  ITEPortal_Domain_Dto_CategoryDropdownDto,\n  ITEPortal_Domain_Dto_ExhibitorDto,\n} from '@/api';\nimport { queryOptions } from '@tanstack/react-query';\nimport { typedAxios } from '@/api/typed-axios';\nimport { isNil } from '@/utils/is-nil';\nimport { CategoryQueryOptionsType } from '@/features/query/query-options/types';\nimport { IdType, OptionType } from '@/model/common';\nimport { ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto } from '@/api/models/ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto';\n\nexport const QueryOptions = {\n  standsQueryOptions: (opts: {\n    exhibitorId: ITEPortal_Domain_Dto_ExhibitorDto['id'];\n    exhibitionId: ITEPortal_Domain_Dto_AdminExhibitionSummary['id'];\n  }) =>\n    queryOptions({\n      queryKey: ['exhibitor-stands', opts],\n      queryFn: () =>\n        typedAxios.stand.getExhibitionsExhibitorsStands({\n          exhibitorId: opts.exhibitorId,\n          exhibitionId: opts.exhibitionId,\n        }),\n    }),\n  exhibitorQueryOptions: (opts: {\n    exhibitionId: ITEPortal_Domain_Dto_AdminExhibitionSummary['id'];\n    exhibitorId?: ITEPortal_Domain_Dto_ExhibitorDto['id'];\n  }) =>\n    queryOptions({\n      queryKey: ['exhibitor', opts],\n      queryFn: async () => {\n        if (isNil(opts.exhibitorId)) {\n          return {} as ITEPortal_Domain_Dto_ExhibitorDto;\n        }\n\n        return typedAxios.exhibitor.getExhibitors({\n          exhibitionId: opts.exhibitionId,\n          id: opts.exhibitorId,\n        });\n      },\n    }),\n\n  loadExhibitorStand: (opts: { standId: number }) => {\n    return queryOptions({\n      queryKey: ['stands', opts.standId],\n      queryFn: async () =>\n        await typedAxios.stand.getExhibitorStands({\n          standId: opts.standId,\n        }),\n    });\n  },\n\n  loadCategoriesQueryOptions: (opts: CategoryQueryOptionsType) => {\n    return queryOptions({\n      queryKey: [\n        'load-catalog-categories',\n        opts.buildingType,\n        opts.exhibitionId,\n        opts.currency,\n      ],\n      queryFn: async () => {\n        const { buildingType, exhibitionId, currency } = opts;\n\n        if (isNil(buildingType) || isNil(exhibitionId) || isNil(currency)) {\n          return [];\n        }\n\n        const data = await typedAxios.category.getCategoriesPriceList({\n          buildingType: buildingType,\n          exhibitionId: +exhibitionId,\n          currency: currency ? currency : undefined,\n        });\n\n        return data;\n      },\n    });\n  },\n\n  loadPriceListItemsShort: (exceptPriceListId?: IdType) => {\n    return queryOptions({\n      queryKey: ['price-list-items', exceptPriceListId],\n      initialData: [],\n      queryFn: async () => {\n        const data = await typedAxios.product.getProductsShort({\n          exceptPriceListId: exceptPriceListId ? +exceptPriceListId : undefined,\n        });\n\n        return data.map((priceListItemOption) => {\n          return {\n            value: priceListItemOption?.id,\n            label: priceListItemOption?.key,\n          } satisfies OptionType;\n        });\n      },\n    });\n  },\n\n  loadStandProject: (opts: { standId: number | null }) => {\n    return queryOptions({\n      queryKey: ['stand-project', opts],\n      retry: 1,\n      queryFn: async () => {\n        if (!opts.standId) {\n          return null;\n        }\n\n        return typedAxios.stand.getStandsProject({\n          standId: opts.standId,\n        });\n      },\n    });\n  },\n\n  loadCategoryOptions: () => {\n    return queryOptions({\n      queryKey: ['category-formatted-options'],\n      retry: 1,\n      queryFn: async () => {\n        const categories =\n          await typedAxios.category.getCategoriesAdminSummaries();\n\n        return categories.map((ct) => ({\n          value: ct.key as string,\n          label: ct.value,\n          meta: ct,\n        })) satisfies Array<\n          OptionType<ITEPortal_Domain_Dto_CategoryDropdownDto>\n        >;\n      },\n    });\n  },\n\n  loadEventMasterOptions: () => {\n    return queryOptions({\n      queryKey: ['event-master-formatted-options'],\n      retry: 1,\n      queryFn: async () => {\n        const eventMasters = await typedAxios.bitrix.getBitrixEventMasters();\n\n        return eventMasters.map((em) => ({\n          value: em.id,\n          label: em.title,\n          meta: em,\n        })) satisfies Array<\n          OptionType<ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto>\n        >;\n      },\n    });\n  },\n  loadCompanyOptions: () => {\n    return queryOptions({\n      queryKey: ['company-options'],\n      retry: 1,\n      queryFn: async () => {\n        const eventMasters = await typedAxios.iteCompany.getCompanies();\n\n        return eventMasters.map((em) => ({\n          value: em.id,\n          label: em.title,\n          meta: em,\n        })) satisfies Array<\n          OptionType<ITEPortal_Domain_Dto_Bitrix_EventMaster_EventMasterDto>\n        >;\n      },\n    });\n  },\n  subexponentsQueryOptions: (opts: { standId: number }) =>\n    queryOptions({\n      queryKey: ['stand-subexponents', opts],\n      queryFn: () =>\n        typedAxios.stand.getStandsSharers({\n          standId: opts.standId,\n        }),\n    }),\n\n  productsQueryOptions: (opts: { standId: number }) =>\n    queryOptions({\n      queryKey: ['stand-products', opts],\n      queryFn: () =>\n        typedAxios.stand.getStandsProducts({\n          standId: opts.standId,\n        }),\n    }),\n};\n","import { User } from '@/model/IUser';\nimport { useAuth } from '@/store/effector/auth';\n\nexport const rules = {\n  canManageSuperAdmins: (user) => {\n    return user.isSuperAdmin;\n  },\n  canDeleteOrder: (user) => {\n    return user.isSuperAdmin || user.isTechnicalManager;\n  },\n  canCreateOrder: (user) => {\n    return user.isSuperAdmin || user.isTechnicalManager || user.isAgent;\n  },\n  canEditOrders: (user) => {\n    return !user.isModerator && !user.isExhibitor;\n  },\n  canViewPublicExhibitions: (user) => {\n    return user.isExhibitor || user.isAgent;\n  },\n  canAccessAdminUsers: (user) => {\n    return user.isSuperAdmin || user.isAdmin;\n  },\n  canAccessAdminSettings: (user) => {\n    return user.isSuperAdmin || user.isAdmin;\n  },\n  canAccessAdminServiceDirectory: (user) => {\n    return user.isSuperAdmin || user.isSupportManager;\n  },\n  canAccessAdminCompanies: (user) => {\n    return user.isSuperAdmin || user.isSupportManager;\n  },\n  canAccessAdminExhibitions: (user) => {\n    return (\n      user.isSuperAdmin ||\n      user.isAgent ||\n      user.isModerator ||\n      user.isTechnicalManager ||\n      user.isSupportManager\n    );\n  },\n  canAccessExhibitionProfile: (user) => {\n    return user.isAgent || user.isExhibitor;\n  },\n  canAccessExhibitionPersonalAccounts: (user) => {\n    return !user.isExhibitor && !user.isAgent && !user.isSupportManager;\n  },\n  canAccessExhibitionOrders: (user) => {\n    return (\n      user.isSuperAdmin ||\n      user.isAgent ||\n      user.isTechnicalManager ||\n      user.isModerator\n    );\n  },\n  canAddExhibition: (user) => {\n    return !user.isExhibitor && !user.isAgent && !user.isTechnicalManager;\n  },\n  canEditExhibition: (user) => {\n    return !user.isAgent && !user.isModerator && !user.isTechnicalManager;\n  },\n  canManageExhibition: (user) => {\n    return (\n      user.isSuperAdmin ||\n      user.isTechnicalManager ||\n      user.isAgent ||\n      user.isModerator\n    );\n  },\n  canAddExhibitionExhibitor: (user) => {\n    return user.isSuperAdmin || user.isTechnicalManager;\n  },\n  canAddStand: (user) => {\n    return user.isSuperAdmin || user.isTechnicalManager;\n  },\n  canAddOrderPersonalDiscount: (user) => {\n    return !user.isModerator && !user.isExhibitor && !user.isAgent;\n  },\n  canRemoveSurchargeFromOrder: (user) => {\n    return !user.isModerator && !user.isExhibitor && !user.isAgent;\n  },\n  canChangeOrderStatus: (user) => {\n    return !user.isModerator && !user.isExhibitor && !user.isAgent;\n  },\n} satisfies Record<string, (user: User) => boolean>;\n\nexport type RBACRulesType = keyof typeof rules;\n\nexport const checkRBACRule = (user: User | null) => (rule: RBACRulesType) => {\n  if (!user) {\n    return null;\n  }\n\n  return rules[rule]?.(user) || false;\n};\n\nexport const useRBAC = () => {\n  const { user } = useAuth();\n\n  const guard = checkRBACRule(user);\n\n  return {\n    user,\n    can: (rule: RBACRulesType) => {\n      return guard(rule);\n    },\n  };\n};\n","import * as Sentry from '@sentry/react';\n\nexport const bootstrapSentry = () => {\n  if (process.env.NODE_ENV === 'development') {\n    return;\n  }\n\n  try {\n    Sentry.init({\n      dsn: 'https://0131d4d8a994bb3eee122cac062f6017@o308535.ingest.sentry.io/4506558801379328',\n      // Set tracesSampleRate to 1.0 to capture 100%\n      // of transactions for performance monitoring.\n      tracesSampleRate: 1.0,\n\n      // Capture Replay for 10% of all sessions,\n      // plus for 100% of sessions with an error\n      replaysSessionSampleRate: 0.1,\n      replaysOnErrorSampleRate: 1.0,\n      release: process.env.PUBLIC_API_URL,\n    });\n  } catch {\n    console.warn(`sentry initialisation failed`);\n  }\n};\n","import { Category } from '@/model/ICategory';\n\nexport const useCategoriesByData = (categoriesData: Category[]) => {\n  return categoriesData.map((category) => {\n    return {\n      category: category,\n      image: category.imageUrl,\n      id: category.id,\n      description: category.description,\n    };\n  });\n};\n","import { Category } from '@/model/ICategory';\n\nexport const useSubCategoriesByData = (subCategoriesData: Category[]) => {\n  return subCategoriesData.map((subCategory) => {\n    return {\n      category: subCategory,\n      image: subCategory.imageUrl,\n      id: subCategory.id,\n      description: subCategory.description,\n    };\n  });\n};\n","import { useEffect } from 'react';\nimport { orderApi } from '@/store/effector/order';\n\n/**\n * @description this hook should be used on exhibition screen to reset all the data from the previously edited order\n */\nexport const useExhibitionStateReset = () => {\n  useEffect(() => {\n    orderApi.cleanUpOrderState();\n  }, []);\n};\n","import { FieldValues, Path, UseFormReturn } from 'react-hook-form';\nimport i18n from '../i18n';\nimport { typedObjectKeys } from '../utils/typed-object-keys';\n\ntype HandlingOptions = {\n  ignoreFields?: string[];\n  fieldPrefix?: string;\n};\n\nconst errorsOverride = {\n  'Error converting value {null}': i18n.t('required-field'),\n};\n\nconst getOverride = (m: string) =>\n  typedObjectKeys(errorsOverride).find((o) => m.includes(o));\n\nconst overrideMessage = (messages: string[]) => {\n  return messages.map((m) => {\n    const override = getOverride(m);\n\n    if (typeof override === 'string') {\n      return errorsOverride[override];\n    }\n\n    return m;\n  });\n};\n\nexport const useFormErrorsHandler = <FV extends FieldValues = FieldValues>(\n  formContext: UseFormReturn<FV>\n) => {\n  const processErrorsArray = (handledError: any, options?: HandlingOptions) => {\n    const { ignoreFields = [] } = options || {};\n\n    try {\n      const errorsData = handledError?.response?.data as Array<{\n        propertyName: string;\n        errorMessage: string;\n      }>;\n\n      errorsData?.forEach((error) => {\n        const messageErrorKey = error.propertyName?.split('.').at(-1) as string;\n        const errorKey = (messageErrorKey?.charAt(0).toLowerCase() +\n          messageErrorKey?.slice(1)) as Path<FV>;\n\n        if (ignoreFields.includes(errorKey)) {\n          return;\n        }\n\n        if (formContext.getFieldState(errorKey)) {\n          formContext.setError(errorKey, {\n            message: error?.errorMessage,\n            type: 'custom',\n          });\n        }\n      });\n    } catch (e) {\n      console.warn('Unable to process errors');\n      console.warn(e);\n\n      console.dir(handledError);\n    }\n  };\n\n  const processErrorsObject = (\n    handledError: any,\n    options?: HandlingOptions\n  ) => {\n    const { ignoreFields = [], fieldPrefix = '' } = options || {};\n\n    try {\n      const errorsData = handledError?.body?.errors as Record<string, string[]>;\n\n      Object.entries(errorsData)?.forEach(([key, error]) => {\n        const errorKey = (fieldPrefix +\n          (key?.charAt(0).toLowerCase() + key?.slice(1))) as Path<FV>;\n\n        if (formContext.getFieldState(errorKey)) {\n          if (ignoreFields.includes(errorKey)) {\n            return;\n          }\n\n          formContext.setError(errorKey, {\n            message: overrideMessage(error).join(' '),\n            type: 'custom',\n          });\n        }\n      });\n    } catch (e) {\n      console.warn('Unable to process errors');\n      console.warn(e);\n\n      console.dir(handledError);\n    }\n  };\n\n  return { processErrorsArray, processErrorsObject };\n};\n","import { Category } from '@/model/ICategory';\nimport { ITechnicalService } from '@/model/ITechnicalService';\nimport { Nullable } from '../types/support-types';\n\ntype CategoryInfo = {\n  category: undefined | Category;\n  description: Nullable<string>;\n};\n\nexport const useProductCategory = (\n  categories: ITechnicalService[],\n  id: number | string\n): undefined | CategoryInfo => {\n  const category = categories.find(\n    (exhibitionCategory: ITechnicalService) =>\n      exhibitionCategory?.category?.name === id\n  );\n\n  return {\n    category: category?.['category'],\n    description: category?.['description'],\n  };\n};\n","import { IdType } from '../model/common';\nimport { Nullable } from '../types/support-types';\nimport { useCatalog } from '@/store/effector/catalog';\n\nexport const useSearchCategoryForProduct = () => {\n  const { flatMap } = useCatalog();\n  const source = [...flatMap.values()];\n\n  return {\n    findCategoryForProduct: (categoryId: Nullable<IdType>) => {\n      return source.find(\n        (cat) => cat.id === categoryId || cat.name === categoryId\n      );\n    },\n  };\n};\n","import { useTranslation } from 'react-i18next';\nimport { TKey } from '../i18n/types';\n\nexport const useNameTranslate = (name: TKey) => {\n  const { t } = useTranslation();\n\n  return t(name) || '';\n};\n","import i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport ReactPostprocessor from 'i18next-react-postprocessor';\n\nimport ruTranslation from './lang/ru.json';\nimport enTranslation from './lang/en.json';\nimport ruSearch from '@/i18n/lang/search/ru.json';\nimport enSearch from '@/i18n/lang/search/en.json';\nimport ruUnitOfMeasurement from './lang/unit-of-measurement/ru.json';\nimport enUnitOfMeasurement from './lang/unit-of-measurement/en.json';\nimport enStands from './lang/stands/en.json';\nimport ruStands from './lang/stands/ru.json';\nimport enColors from './lang/colors/en.json';\nimport ruColors from './lang/colors/ru.json';\nimport enOrder from './lang/order/en.json';\nimport ruOrder from './lang/order/ru.json';\nimport Backend from 'i18next-http-backend';\nimport { validateTranslationsMatch } from './validate-translations-match';\n\nconst ru = {\n  ...ruTranslation,\n  ...ruUnitOfMeasurement,\n  ...ruStands,\n  ...ruSearch,\n  ...ruColors,\n  ...ruOrder,\n};\nconst en = {\n  ...enTranslation,\n  ...enUnitOfMeasurement,\n  ...enStands,\n  ...enSearch,\n  ...enColors,\n  ...enOrder,\n};\n\nvalidateTranslationsMatch([ru, en]);\n\ndeclare module 'i18next' {\n  // Extend CustomTypeOptions\n  interface CustomTypeOptions {\n    // custom namespace type, if you changed it\n    defaultNS: 'ruTranslation';\n    // custom resources type\n    resources: {\n      ruTranslation: typeof ru;\n      enTranslation: typeof en;\n    };\n    // other\n  }\n}\n\nconst lang = localStorage.getItem('lang') as string;\n\ni18n\n  .use(Backend)\n  .use(initReactI18next)\n  .use(new ReactPostprocessor())\n  .init({\n    resources: {\n      ru: {\n        translation: ru,\n      },\n      en: {\n        translation: en,\n      },\n    },\n    fallbackLng: lang || 'ru',\n    interpolation: {\n      escapeValue: false,\n    },\n  });\n\nexport default i18n;\n","import en from './en.json';\nimport { OptionType } from '@/model/common';\nimport i18n from '@/i18n';\nimport { typedObjectKeys } from '@/utils/typed-object-keys';\n\ntype GetColorCode<\n  Scope extends string,\n  Path extends string\n> = Path extends `${Scope}.${infer R}` ? (R extends string ? R : never) : never;\n\nexport const FASCIA_INSCRIPTION_COLORS = typedObjectKeys(en)\n  .filter((key) => key.startsWith('fascia-inscription-colors'))\n  .map((colorCode) => {\n    const [scope, code] = colorCode.split('.') as [\n      'fascia-inscription-colors',\n      GetColorCode<'fascia-inscription-colors', typeof colorCode>\n    ];\n\n    return {\n      value: code,\n      label: i18n.t(`${scope}.${code}`),\n    } satisfies OptionType;\n  })\n  .filter(Boolean);\n\nexport const CARPET_COLORS = typedObjectKeys(en)\n  .filter((key) => key.startsWith('carpet-colors'))\n  .map((colorCode) => {\n    const [scope, code] = colorCode.split('.') as [\n      'carpet-colors',\n      GetColorCode<'carpet-colors', typeof colorCode>\n    ];\n\n    return {\n      value: code,\n      label: i18n.t(`${scope}.${code}`),\n    } satisfies OptionType;\n  })\n  .filter(Boolean);\n","const arraysDiff = (arr1: string[], arr2: string[]): string[] => {\n  const missingKeys = [];\n\n  for (const element of arr1) {\n    if (!arr2.includes(element)) {\n      missingKeys.push(element);\n    }\n  }\n\n  return missingKeys;\n};\n\nexport const validateTranslationsMatch = (\n  translations: Array<Record<string, string | Record<string, string>>>\n) => {\n  if (process.env.NODE_ENV !== 'development') {\n    return;\n  }\n\n  if (translations.length === 0) {\n    // If the array is empty, there is nothing to validate\n    return true;\n  }\n\n  const referenceKeys = Object.keys(translations[0]);\n\n  for (const translation of translations) {\n    const currentKeys = Object.keys(translation);\n\n    const diff = arraysDiff(referenceKeys, currentKeys);\n    // Check if the current object has the same keys as the reference\n\n    if (diff.length > 0) {\n      throw new Error(`Missing translation key ${diff.join(',')}`);\n    }\n  }\n\n  return true;\n};\n","// @ts-expect-error this looks odd, but https://github.com/facebook/create-react-app/issues/13118#issuecomment-1540018089\nexport * from 'core-js/actual';\n\nimport './i18n';\nimport './store/effector/init';\nimport './api/setup-openapi';\nimport ReactDOM from 'react-dom/client';\nimport './index.css';\nimport App from './App';\nimport axios from 'axios';\nimport { bootstrapSentry } from './features/sentry';\n// import { router } from '@/features/Routing/provider';\n\nconst root = ReactDOM.createRoot(\n  document.getElementById('root') as HTMLElement\n);\n\nconsole.info(`App version: ${process.env.PUBLIC_VERSION}`);\n\nbootstrapSentry();\n\n// declare module '@tanstack/react-router' {\n//   interface Register {\n//     router: typeof router;\n//   }\n// }\n\naxios.interceptors.response.use(\n  (response) => {\n    return response;\n  },\n  (error) => {\n    if (error?.code === 'ERR_NETWORK') {\n      // localStorage.clear();\n      // localStorage.setItem('lang', 'ru');\n      // window.location.href = '/';\n    } else {\n      return Promise.reject(error);\n    }\n  }\n);\n\nasync function enableMocking() {\n  if (process.env.NODE_ENV !== 'development') {\n    return;\n  }\n\n  // const { worker } = await import('./features/msw/browser');\n  //\n  // return worker.start({\n  //   quiet: true,\n  //   onUnhandledRequest: 'bypass',\n  // });\n}\n\nenableMocking().finally(() => {\n  root.render(<App />);\n});\n","import { IBreadcrumbItem } from '@/model/common';\n\nimport styled from 'styled-components';\nimport { Box } from '@chakra-ui/react';\nimport { ArrowBackIcon } from '@chakra-ui/icons';\nimport Breadcrumbs from '@/components/Breadcrumbs';\nimport { useTranslation } from 'react-i18next';\nimport { useParams } from '@tanstack/react-router';\n\nconst BackButtonWrapper = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  font-size: 16px;\n  gap: 10px;\n`;\n\nexport const ToExhibition = () => {\n  const { t } = useTranslation();\n\n  const { exhibitionId } = useParams({ strict: false });\n\n  if (!exhibitionId) {\n    return null;\n  }\n\n  const BackButton = () => {\n    return (\n      <BackButtonWrapper>\n        <ArrowBackIcon w={5} h={5} color=\"grey.300\" />\n        {t('to-exhibitions')}\n      </BackButtonWrapper>\n    );\n  };\n\n  const getBack: IBreadcrumbItem[] = [\n    {\n      label: <BackButton />,\n      link: '/admin/exhibitions',\n    },\n  ];\n\n  return <Breadcrumbs items={getBack} />;\n};\n","import { AdminPanelContent, ContentInner } from '@/components/Content';\nimport Layout from '@/layout/Default';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { FlexedPageTitle } from '@/components/Typography/PageTitle';\nimport { IBreadcrumbItem } from '@/model/common';\nimport { replacePaths } from '@/utils/route';\nimport {\n  SHOW_SUPPORT_MANAGER_ACTION_PATH,\n  SHOW_SUPPORT_MANAGER_PATH,\n} from '@/constants/router';\nimport { useTranslation } from 'react-i18next';\nimport Breadcrumbs from '@/components/Breadcrumbs';\n\nimport { Category } from '@/model/ICategory';\nimport { Outlet, useMatches } from '@tanstack/react-router';\nimport { ConnectedSidebar } from '../ConnectedSidebar/ConnectedSidebar';\n\nconst StyledContentInner = styled(ContentInner)<{\n  $withToolbar?: boolean;\n}>`\n  padding: ${({ $withToolbar }) => ($withToolbar ? '26px 24px' : '0 24px')};\n  padding-bottom: 10px;\n`;\n\nexport const AdminPanelPage = (): JSX.Element => {\n  // todo ad refactoring\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-ignore\n  const { context = {} } = useMatches().at(-1);\n  const { page, type, backPath, pageTitle, subHeader } = context;\n\n  const { t } = useTranslation();\n  const category = new Category({\n    id: page,\n    name: page,\n    displayName: t(page),\n  });\n\n  if (!category) {\n    return <>not found</>;\n  }\n\n  const pageName = (() => {\n    if (pageTitle) {\n      return pageTitle;\n    }\n\n    return type\n      ? // @ts-expect-error this should be resolved on react router level\n        t(`${page}-${type}`)\n      : category.displayName;\n  })();\n\n  const breadcrumbsItems = useMemo<IBreadcrumbItem[]>(() => {\n    const items: IBreadcrumbItem[] = [\n      {\n        label: t(page),\n        link:\n          backPath ||\n          replacePaths(SHOW_SUPPORT_MANAGER_PATH, {\n            ':page': page,\n          }),\n      },\n    ];\n\n    if (type) {\n      items.push({\n        label:\n          // @ts-expect-error this should be resolved on react router level\n          t(`${page}-${type}`),\n        link: replacePaths(SHOW_SUPPORT_MANAGER_ACTION_PATH, {\n          ':page': page,\n          ':type': type,\n        }),\n      });\n    }\n\n    return [...items];\n  }, [page, type]);\n\n  return (\n    <Layout>\n      <ConnectedSidebar />\n      <AdminPanelContent>\n        <StyledContentInner $withToolbar={!!type}>\n          {type && <Breadcrumbs items={breadcrumbsItems} id=\"breadcrumbsId\" />}\n          <FlexedPageTitle>\n            {pageName}\n            {subHeader}\n          </FlexedPageTitle>\n          <Outlet />\n        </StyledContentInner>\n      </AdminPanelContent>\n    </Layout>\n  );\n};\n","import styled from 'styled-components';\nimport { Flex } from '@chakra-ui/react';\n\ninterface LayoutProps {\n  children?: React.ReactNode | React.ReactNode[];\n}\n\nconst Grid = styled(Flex)`\n  min-height: 100vh;\n`;\n\nconst Layout: React.FC<LayoutProps> = ({ children }) => {\n  return (\n    <Grid alignItems=\"center\" justifyContent=\"center\" direction=\"column\">\n      {children}\n    </Grid>\n  );\n};\n\nexport default Layout;\n","import { useMatches } from '@tanstack/react-router';\nimport { SidebarByRole } from './SidebarsByPageType/SidebarByRole';\nimport { ExhibitionSidebar } from './SidebarsByPageType/ExhibitionSidebar';\n\nexport const ConnectedSidebar = () => {\n  // todo ad refactoring\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-ignore\n  const { context = {} } = useMatches().at(-1);\n\n  switch (context.page) {\n    case 'personal-accounts':\n    case 'placed-orders': {\n      return <ExhibitionSidebar />;\n    }\n\n    default:\n      return <SidebarByRole />;\n  }\n};\n","import supportManagerAdditionalMenu from '../../../__mocks__/supportManagerAdditionalMenu';\nimport CategoriesSidebar from '../../../components/Sidebar/CategoriesSidebar';\n\nimport { useTranslation } from 'react-i18next';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { useParams } from '@tanstack/react-router';\n\nexport const ExhibitionSidebar = () => {\n  const { exhibitionId } = useParams({ strict: false });\n  const { exhibitionName } = useExhibition();\n  const { t } = useTranslation();\n\n  if (!exhibitionId) {\n    return null;\n  }\n\n  return (\n    <CategoriesSidebar\n      categories={supportManagerAdditionalMenu(exhibitionId, t)}\n      type=\"additionalPanel\"\n      barTitle={exhibitionName}\n    />\n  );\n};\n","import CategoriesSidebar from '../../../components/Sidebar/CategoriesSidebar';\nimport { getCategoriesByRole } from '@/__mocks__/categoriesSidebars';\nimport { useAuth } from '@/store/effector/auth';\n\nexport const SidebarByRole = () => {\n  const { user } = useAuth();\n\n  if (!user) {\n    return null;\n  }\n\n  return (\n    <CategoriesSidebar\n      categories={getCategoriesByRole(user)}\n      type=\"adminPanel\"\n    />\n  );\n};\n","import styled from 'styled-components';\n\nexport const Main = styled.div`\n  min-height: 100vh;\n\n  display: flex;\n  flex-direction: column;\n`;\n","import { ReactNode } from 'react';\nimport { Main } from './Layout.styled';\nimport Header from '@/components/Header';\n\nexport interface AuthLayoutProps {\n  children?: ReactNode | ReactNode[];\n}\n\nconst Layout = ({ children }: AuthLayoutProps): JSX.Element => {\n  return (\n    <Main>\n      <Header />\n      {children}\n    </Main>\n  );\n};\n\nexport default Layout;\n","import { Serializable } from './Serializable';\nimport {\n  type ITEPortal_Contracts_Enums_OrderStatus,\n  type ITEPortal_Domain_Dto_OrderDto,\n  type ITEPortal_Domain_Dto_OrderItemDto,\n} from '../api';\nimport { isNil } from '../utils/is-nil';\nimport { ORDER_STATUSES } from '../constants/order';\n\n// prettier-ignore\nexport class IBaseOrder\n  extends Serializable\n  implements ITEPortal_Domain_Dto_OrderDto {\n  exhibitionId?: number;\n  exhibitorId?: number;\n  standId?: number;\n  orderId?: number | null;\n  products?: Array<ITEPortal_Domain_Dto_OrderItemDto> | null;\n  personalDiscount?: number;\n  orderStatus?: ITEPortal_Contracts_Enums_OrderStatus;\n  orderSummary?: number;\n  currency?: string | null;\n  typeOfDiscount?: ITEPortal_Domain_Dto_OrderDto['typeOfDiscount'] = 0;\n  markup?: number;\n  removeExtraCharge?: boolean | null;\n  personalExtraChargePercentage?: number | null;\n  \n  constructor(order: ITEPortal_Domain_Dto_OrderDto) {\n    super();\n\n    Object.assign(this, order);\n\n    // this.personalDiscount = 15.1\n    // this.typeOfDiscount = 1\n  }\n\n  public get hasDiscount() {\n    return !isNil(this.personalDiscount) && this.personalDiscount > 0\n  }\n\n  public get hasPersonalExtraCharge() {\n    return !isNil(this.personalExtraChargePercentage) && this.personalExtraChargePercentage > 0\n  }\n\n  public get commonExtraChargeDisabled() {\n    return this.removeExtraCharge === true\n  }\n\n  public setDiscount(discount: number) {\n    if (typeof discount === 'number' && Number.isFinite(discount)) {\n      this.personalDiscount = discount\n    } else {\n      this.personalDiscount = discount\n    }\n\n    return this;\n  }\n\n  public setDiscountType(type: ITEPortal_Domain_Dto_OrderDto['typeOfDiscount']) {\n    this.typeOfDiscount = type\n\n    return this;\n  }\n\n  public get isDraft() {\n    return this.orderStatus === ORDER_STATUSES.Draft\n  }\n\n  toJSON(): unknown {\n    return {};\n  }\n}\n","import { IBaseOrder } from './IBaseOrder';\nimport { BuildingTypeInfo, MarginType } from './common';\nimport { OrderItem } from './IOrderItem';\nimport dayjs from 'dayjs';\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter';\nimport {\n  PERSONAL_DISCOUNT_TYPE,\n  SPACE_ONLY_BUILDING_TYPE,\n} from '../constants/order';\nimport { isNil } from '../utils/is-nil';\nimport { ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto } from '../api';\nimport { CATEGORY_TYPES } from '../constants/categorie';\n\ndayjs.extend(isSameOrAfter);\n\nexport class Cart {\n  public currency?: string;\n\n  private cleaningDiscounts?: ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto[] =\n    [];\n\n  private order?: IBaseOrder;\n  private margin?: MarginType;\n  private items: Array<OrderItem> = [];\n  private standInfo: BuildingTypeInfo | null = null;\n\n  setOrder(order: IBaseOrder) {\n    this.order = order;\n\n    return this;\n  }\n\n  setMargin(margin: MarginType) {\n    this.margin = margin;\n\n    return this;\n  }\n\n  setItems(items: Array<OrderItem>) {\n    this.items = items;\n\n    return this;\n  }\n\n  setCurrency(currency: string) {\n    this.currency = currency;\n\n    return this;\n  }\n\n  setCleaningDiscounts(\n    discounts: ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto[]\n  ) {\n    this.cleaningDiscounts = discounts;\n\n    return this;\n  }\n\n  setStandInfo(stand: BuildingTypeInfo) {\n    this.standInfo = stand;\n\n    return this;\n  }\n\n  get isSpaceOnlyStand() {\n    if (!this.standInfo) {\n      return true;\n    }\n\n    return this.standInfo.type === SPACE_ONLY_BUILDING_TYPE;\n  }\n\n  get cleaningItems() {\n    if (!this.items) {\n      return [];\n    }\n\n    return this.items.filter(\n      (i) => i.product?.category?.name === CATEGORY_TYPES.CLEANING\n    );\n  }\n\n  get cleaningArea() {\n    const cleaningItems = this.cleaningItems;\n\n    if (\n      !cleaningItems ||\n      !Array.isArray(cleaningItems) ||\n      cleaningItems.length === 0\n    ) {\n      return 0;\n    }\n\n    return this.cleaningItems.reduce((totalArea, item) => {\n      return totalArea + (item.getAmount() || 0);\n    }, 0);\n  }\n\n  get cleaningTotal() {\n    const cleaningItems = this.cleaningItems;\n\n    if (\n      !cleaningItems ||\n      !Array.isArray(cleaningItems) ||\n      cleaningItems.length === 0\n    ) {\n      return 0;\n    }\n\n    return this.cleaningItems.reduce((cleaningTotal, item) => {\n      return cleaningTotal + item.total;\n    }, 0);\n  }\n\n  get cleaningDiscountMultiplier(): number {\n    if (!Array.isArray(this.cleaningDiscounts)) {\n      return 0;\n    }\n\n    const cleaningArea = this.cleaningArea;\n\n    const discount = this.cleaningDiscounts.find((d) => {\n      return (\n        typeof d.areaFrom === 'number' &&\n        typeof d.areaTo === 'number' &&\n        cleaningArea >= d.areaFrom &&\n        cleaningArea <= d.areaTo\n      );\n    });\n\n    if (typeof discount?.discountPercentage === 'number') {\n      return discount.discountPercentage / 100;\n    }\n\n    return 0;\n  }\n\n  get cleaningDiscount() {\n    if (!this.cleaningTotal || !this.cleaningDiscountMultiplier) {\n      return 0;\n    }\n\n    return this.cleaningTotal * this.cleaningDiscountMultiplier;\n  }\n\n  get markup() {\n    if (!this.margin) {\n      return 0;\n    }\n\n    if (this.order && this.order.removeExtraCharge === true) {\n      return 0;\n    }\n\n    let markupPercentage = 0;\n\n    const currentDate = dayjs();\n    const firstMarkup = dayjs(this.margin.firstMarginDate);\n    const secondMarkup = dayjs(this.margin.secondMarginDate);\n    const thirdMarkup = dayjs(this.margin.thirdMarginDate);\n\n    switch (true) {\n      case this.order &&\n        this.order.hasPersonalExtraCharge &&\n        typeof this.order.personalExtraChargePercentage === 'number': {\n        markupPercentage = this.order?.personalExtraChargePercentage;\n        break;\n      }\n\n      case currentDate.isSameOrAfter(thirdMarkup): {\n        markupPercentage = this.margin.thirdMargin\n          ? parseInt(this.margin.thirdMargin + '')\n          : 0;\n        break;\n      }\n\n      case currentDate.isSameOrAfter(secondMarkup): {\n        markupPercentage = this.margin.secondMargin\n          ? parseInt(this.margin.secondMargin + '')\n          : 0;\n\n        break;\n      }\n\n      case currentDate.isSameOrAfter(firstMarkup): {\n        markupPercentage = this.margin.firstMargin\n          ? parseInt(this.margin.firstMargin + '')\n          : 0;\n\n        break;\n      }\n\n      default:\n        markupPercentage = 0;\n    }\n\n    if (markupPercentage === 0) {\n      return 0;\n    }\n\n    if (markupPercentage > 1) {\n      markupPercentage = markupPercentage / 100;\n    }\n\n    return this.subTotal * markupPercentage;\n  }\n\n  get personalDiscount() {\n    if (!this.order) {\n      return 0;\n    }\n\n    if (!this.hasPersonalDiscount) {\n      return 0;\n    }\n\n    if (\n      !this.order.personalDiscount ||\n      typeof this.order.personalDiscount !== 'number'\n    ) {\n      return 0;\n    }\n\n    if (this.order.typeOfDiscount === PERSONAL_DISCOUNT_TYPE.AMOUNT) {\n      return this.order.personalDiscount;\n    }\n\n    let discountPercentage = this.order.personalDiscount;\n\n    if (discountPercentage > 1) {\n      discountPercentage = discountPercentage / 100;\n    }\n\n    return this.itemsTotal * discountPercentage;\n  }\n\n  get itemsTotal() {\n    if (this.items.length === 0) {\n      return 0;\n    }\n\n    return this.items.reduce((total, item) => {\n      return total + item.total;\n    }, 0);\n  }\n\n  get vatPercent() {\n    if (!this.hasVat) {\n      return 0;\n    }\n\n    return 0.2;\n  }\n\n  get hasPersonalDiscount() {\n    return (\n      !isNil(this.order?.typeOfDiscount) &&\n      [PERSONAL_DISCOUNT_TYPE.PERCENT, PERSONAL_DISCOUNT_TYPE.AMOUNT].includes(\n        this.order?.typeOfDiscount\n      ) &&\n      !isNil(this.order?.personalDiscount) &&\n      this.order?.personalDiscount > 0\n    );\n  }\n\n  get hasVat() {\n    if (!this.currency) {\n      return false;\n    }\n\n    return this.currency.toLowerCase() === 'rub';\n  }\n\n  get hasCleaningDiscount() {\n    return this.cleaningDiscount > 0;\n  }\n\n  get vat() {\n    return this.subTotalWithMarkup * this.vatPercent;\n  }\n\n  get subTotal() {\n    return this.itemsTotal - this.personalDiscount - this.cleaningDiscount;\n  }\n\n  get subTotalWithMarkup() {\n    return this.subTotal + this.markup;\n  }\n\n  get subTotalWithVat() {\n    return this.subTotalWithMarkup + this.vat;\n  }\n\n  get total() {\n    return this.subTotalWithVat;\n  }\n}\n","import { IdType, WithIdType, WithPrivateProps } from './common';\nimport { Serializable } from './Serializable';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '../api';\nimport { Nullable } from '../types/support-types';\nimport { isNil } from '../utils/is-nil';\nimport { CATEGORY_TYPES } from '@/constants/categorie';\n\ntype ConstructionOptionsType = WithIdType<ITEPortal_Domain_Dto_CategoryDto> & {\n  parent?: Nullable<Category | ConstructionOptionsType>;\n  parentCategoryName?: Nullable<string>;\n  resolveUrl?: () => string | null;\n};\n\n// prettier-ignore\nexport class Category\n  extends Serializable\n  implements WithPrivateProps<WithIdType<ITEPortal_Domain_Dto_CategoryDto>> {\n  private readonly _urlResolver?: () => string | null;\n\n  id: IdType = 0;\n  name: string = '';\n  displayName?: string | null | undefined;\n  imageUrl?: string | null | undefined;\n  description?: string | null | undefined;\n  parentCategory?: string | null | undefined;\n  parentCategoryId?: string | null | undefined;\n  isDecimal?: boolean | null | undefined;\n  unitOfMeasure?: string | null | undefined;\n  parentCategoryName?: Nullable<string>;\n\n  tree: Array<Category> = []\n\n  parent?: Category | null = null;\n\n  constructor(data: ConstructionOptionsType) {\n    super();\n\n    const { parent, resolveUrl, ...rest } = data;\n\n    Object.assign(this, rest);\n\n    this.parent =\n      parent && !(parent instanceof Category) ? new Category(parent) : parent;\n\n    if (!this.parentCategoryName && this.parent) {\n      this.parentCategoryName = parent?.displayName\n    }\n\n    this._urlResolver = resolveUrl;\n  }\n\n  get isBuilding() {\n    return this.id === CATEGORY_TYPES.SELECT_BUILDING ||\n    this.name === CATEGORY_TYPES.SELECT_BUILDING\n  }\n\n  resolveUrl() {\n    if (typeof this._urlResolver === 'function') {\n      return this._urlResolver();\n    }\n\n    return null;\n  }\n\n  toJSON(): ConstructionOptionsType {\n    return {\n      id: this.id,\n      name: this.name,\n      parent: this.parent?.toJSON(),\n      isDecimal: this.isDecimal,\n      unitOfMeasure: this.unitOfMeasure,\n      parentCategoryId: this.parentCategoryId,\n      description: this.description,\n      displayName: this.displayName,\n      imageUrl: this.imageUrl,\n    };\n  }\n\n  static fromJSON(json: ConstructionOptionsType): Category {\n    const parent = !isNil(json.parent) ? Category.fromJSON(json.parent) : undefined;\n\n    return new Category({\n      ...json,\n      id: json.id,\n      name: json.name,\n      parent: parent,\n      isDecimal: json.isDecimal,\n      unitOfMeasure: json.unitOfMeasure,\n    });\n  }\n\n  static empty() {\n    return new Category({\n      id: 'empty',\n      name: 'empty',\n    });\n  }\n}\n","import { ITEPortal_Domain_Dto_ExhibitionDto } from '../api';\nimport dayjs from 'dayjs';\nimport { isValidExhibition } from '@/model/IExhibition/shema';\n\n// prettier-ignore\nexport class IExhibition implements ITEPortal_Domain_Dto_ExhibitionDto {\n  id: number | null = null;\n  description?: string | null;\n  endDate?: string;\n  firstMargin?: number | null;\n  firstMarginDate?: string | null;\n  logoUrl?: string | null;\n  name?: string | null;\n  place?: string | null;\n  secondMargin?: number;\n  secondMarginDate?: string;\n  startDate?: string;\n  orderCreationLastDate?: string;\n  technicalManagers?: Array<string> | null;\n  thirdMargin?: number;\n  thirdMarginDate?: string;\n\n  constructor(\n    json: ITEPortal_Domain_Dto_ExhibitionDto & {id?: number}\n  ) {\n    Object.assign(this, json);\n  }\n\n  get isPast() {\n    if (!this.endDate) {\n      return true;\n    }\n\n    const currentDate = dayjs();\n    const endDate = dayjs(this.endDate);\n\n    return endDate.isBefore(currentDate);\n  }\n\n  get canEditOrders() {\n    if (!this.orderCreationLastDate) {\n      return !this.isPast\n    }\n\n    const currentDate = dayjs();\n    const endDate = dayjs(this.orderCreationLastDate);\n\n    return currentDate.isBefore(endDate);\n  }\n\n  get formattedStartDate() {\n    if (!this.startDate) {\n      return 'n/a';\n    }\n\n    return dayjs(this.startDate).format('DD.MM.YYYY');\n  }\n\n  get formattedEndDate() {\n    if (!this.endDate) {\n      return 'n/a';\n    }\n\n    return dayjs(this.endDate).format('DD.MM.YYYY');\n  }\n\n  static fromJSON(json: ITEPortal_Domain_Dto_ExhibitionDto) {\n    if (isValidExhibition(json)) {\n      return new  IExhibition(json)\n    }\n\n    return null\n  }\n}\n","import * as v from 'zod';\nimport { ITEPortal_Domain_Dto_ExhibitionDto } from '@/api';\nimport { Expect, MatchTypesKeys } from '@/types/support-types';\n\nexport const IExhibition = v.object({\n  id: v.number(),\n  description: v.string().nullish(),\n  endDate: v.string(),\n  firstMargin: v.number(),\n  firstMarginDate: v.string(),\n  logoUrl: v.string().nullish(),\n  name: v.string(),\n  place: v.string(),\n  secondMargin: v.number(),\n  secondMarginDate: v.string(),\n  startDate: v.string(),\n  technicalManagers: v.array(v.string()),\n  thirdMargin: v.number(),\n  orderCreationLastDate: v.string().nullish(),\n  thirdMarginDate: v.string(),\n  eventEditionId: v.number(),\n});\n\nexport const isValidExhibition = (json: ITEPortal_Domain_Dto_ExhibitionDto) => {\n  return IExhibition.safeParse(json).success;\n};\n\ntype IExhibitionSchemaType = v.infer<typeof IExhibition>;\n\ntype Matched = MatchTypesKeys<\n  ITEPortal_Domain_Dto_ExhibitionDto,\n  IExhibitionSchemaType\n>;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype test = Expect<Matched>;\n","import { IdType } from './common';\nimport { ReactNode } from 'react';\nimport {\n  ITEPortal_Domain_Dto_Exhibition_ExhibitionStatisticsWithSummary,\n  ITEPortal_Domain_Dto_ExhibitionSummary,\n} from '../api';\nimport dayjs from 'dayjs';\n\nexport type ExhibitionSummaryType = {\n  id: IdType;\n  name: string;\n  logoUrl: string;\n  description?: string | ReactNode;\n  startDate: string;\n  endDate: string;\n  place: string;\n};\n\n// prettier-ignore\nexport class IExhibitionSummary\n  implements ITEPortal_Domain_Dto_Exhibition_ExhibitionStatisticsWithSummary {\n  currency?: string | null = null;\n  exhibitionSummary?: ITEPortal_Domain_Dto_ExhibitionSummary;\n  orders?: number;\n  sellingOfficeId?: number;\n  stands?: number;\n\n  constructor(\n    json: ITEPortal_Domain_Dto_Exhibition_ExhibitionStatisticsWithSummary\n  ) {\n    Object.assign(this, json);\n  }\n\n  get isPast() {\n    if (!this.exhibitionSummary || !this.exhibitionSummary.endDate) {\n      return true;\n    }\n\n    const currentDate = dayjs();\n    const endDate = dayjs(this.exhibitionSummary.endDate);\n\n    return endDate.isBefore(currentDate);\n  }\n\n  get formattedStartDate() {\n    if (!this.exhibitionSummary?.startDate) {\n      return 'n/a';\n    }\n\n    return dayjs(this.exhibitionSummary.startDate).format('DD.MM.YYYY');\n  }\n\n  get formattedEndDate() {\n    if (!this.exhibitionSummary?.endDate) {\n      return 'n/a';\n    }\n\n    return dayjs(this.exhibitionSummary.endDate).format('DD.MM.YYYY');\n  }\n}\n","import { Serializable } from './Serializable';\nimport { OrderItem, TemporaryStaffOrderItem } from './IOrderItem';\nimport { Category } from './ICategory';\nimport { Product } from './IProduct';\nimport { InitialState } from '@/store/effector/order';\nimport type { ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto } from '@/api';\nimport { ProductId } from '@/types/support-types';\n\nexport class Order extends Serializable {\n  private items: Array<OrderItem | TemporaryStaffOrderItem> = [];\n  constructor({\n    items,\n  }: {\n    items: Array<OrderItem | TemporaryStaffOrderItem>;\n  }) {\n    super();\n\n    this.items = items;\n  }\n\n  getItems() {\n    return this.items;\n  }\n\n  toJSON(): unknown {\n    return undefined;\n  }\n\n  static fromJSON(state: InitialState): InitialState {\n    if (!Array.isArray(state.items)) {\n      state.items = [];\n    }\n\n    state.items = state.items.filter(Boolean);\n\n    state.items.forEach((item, i) => {\n      try {\n        const category = item.product.category;\n\n        const product = item.product;\n        const categoryObj = new Category(category);\n\n        item.product = new Product({\n          ...product,\n          category: categoryObj,\n        });\n\n        item.id = item.product.getProductId();\n\n        state.items[i] = OrderItem.fromJSON(\n          // @ts-expect-error improve types\n          item\n        );\n      } catch (e) {\n        console.log(e);\n      }\n    });\n\n    return state;\n  }\n\n  static prepareItemsForPlace(\n    items: Array<OrderItem | TemporaryStaffOrderItem>\n  ): Array<ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto> {\n    return items.map((item) => {\n      let originalProductId = item.product.getProductId();\n\n      if (item.included) {\n        originalProductId = originalProductId.replace(\n          '-included',\n          ''\n        ) as ProductId;\n      }\n\n      if (item instanceof TemporaryStaffOrderItem) {\n        return {\n          id: originalProductId,\n          amount: item.getAmount(),\n          peopleAmount: item.peopleAmount,\n          dayAmount: item.dayAmount,\n          language: item.language,\n        };\n      }\n\n      return {\n        id: originalProductId,\n        amount: item.getAmount(),\n        included: item.included,\n      };\n    });\n  }\n}\n","import { Product } from './IProduct';\nimport {\n  ITEPortal_Contracts_Enums_BuildingType,\n  ITEPortal_Domain_Dto_OrderItemDto,\n} from '@/api';\nimport { ISerialisable, Serializable } from './Serializable';\nimport { ProductId } from '@/types/support-types';\n\ninterface OrderItemConstructorDetails {\n  id: ProductId;\n  product: Product;\n  amount?: number;\n  buildingTypes?: Array<ITEPortal_Contracts_Enums_BuildingType>;\n  included?: boolean;\n  includedReason?: string;\n}\n\ninterface TemporaryServiceOrderItemConstructorDetails {\n  id: ProductId;\n  product: Product;\n  language?: string | null;\n  peopleAmount?: number;\n  dayAmount?: number;\n  buildingTypes?: Array<ITEPortal_Contracts_Enums_BuildingType>;\n}\n\nexport interface IOrderItem extends ISerialisable {\n  id: ProductId;\n  product: Product;\n  buildingTypes?: Array<ITEPortal_Contracts_Enums_BuildingType>;\n\n  get total(): number;\n  get displayName(): string | null;\n  getAmount(): number;\n\n  // new (orderItemDetails: OrderItemConstructorDetails): OrderItem;\n}\n\nexport interface ITemporaryStaffOrderItem extends IOrderItem {\n  // new (orderItemDetails: OrderItemConstructorDetails): TemporaryStaffOrderItem;\n}\n\nexport class OrderItem extends Serializable implements IOrderItem {\n  id: ProductId;\n  product: Product;\n  included: boolean = false;\n  includedReason: string | null = null;\n\n  private amount: number = 0;\n\n  buildingTypes: Array<ITEPortal_Contracts_Enums_BuildingType> = [0];\n\n  constructor(item: OrderItemConstructorDetails) {\n    super();\n\n    this.id = item.id;\n    this.product = item.product;\n    if (item.amount) {\n      this.amount = item.amount;\n    } else {\n      this.amount = 0;\n    }\n\n    if (item.buildingTypes) {\n      this.buildingTypes = item.buildingTypes;\n    }\n\n    if (item.included) {\n      this.included = true;\n      if (item.includedReason) {\n        this.includedReason = item.includedReason;\n      }\n    }\n  }\n\n  get total() {\n    if (this.included) {\n      return 0;\n    }\n\n    return Number((this.amount * this.product.price).toFixed(2));\n  }\n\n  setAmount(amount: number) {\n    this.amount = amount;\n  }\n\n  getAmount(): number {\n    return this.amount;\n  }\n\n  get displayName() {\n    return this.product.productDisplayName || this.product.productName;\n  }\n\n  get uniqueKey() {\n    return this.id.toString();\n  }\n\n  static fromJSON(\n    json: Omit<ITEPortal_Domain_Dto_OrderItemDto, 'id'> & {\n      product: Product;\n      included?: boolean;\n      includedReason?: string;\n      id: ProductId;\n    }\n  ) {\n    if (TemporaryStaffOrderItem.is(json)) {\n      return TemporaryStaffOrderItem.fromJSON(json);\n    }\n\n    const item = new OrderItem({\n      id: json.product.getProductId(),\n      product: json.product,\n      buildingTypes: json.buildingTypes?.length ? json.buildingTypes : [0],\n      amount: json.amount,\n      included: json.included,\n      includedReason: json.includedReason,\n    });\n\n    if (json.amount) {\n      item.setAmount(json.amount);\n    }\n\n    return item;\n  }\n\n  toJSON() {\n    return {\n      id: this.product.getProductId(),\n      amount: this.amount,\n      product: this.product,\n      buildingTypes: this.buildingTypes,\n      included: this.included,\n      includedReason: this.includedReason,\n    };\n  }\n}\n\n// prettier-ignore\nexport class TemporaryStaffOrderItem\n  extends OrderItem\n  implements ITemporaryStaffOrderItem {\n  public peopleAmount: number;\n  public dayAmount: number;\n  public language: string | undefined;\n\n  constructor(itemDetails: TemporaryServiceOrderItemConstructorDetails) {\n    super({\n      id: itemDetails.product.getProductId(),\n      product: itemDetails.product,\n      buildingTypes: itemDetails.buildingTypes,\n    });\n\n    this.language = itemDetails.language || undefined;\n    this.peopleAmount = itemDetails.peopleAmount || 0;\n    this.dayAmount = itemDetails.dayAmount || 0;\n  }\n\n  getAmount() {\n    return this.peopleAmount;\n  }\n\n  get total() {\n    return this.product.price * (this.peopleAmount * this.dayAmount);\n  }\n\n  get displayName() {\n    if (!this.language) {\n      return super.displayName;\n    }\n\n    return `${super.displayName} (${this.language})`;\n  }\n\n  get uniqueKey() {\n    return `${super.uniqueKey}-${this.language}`;\n  }\n\n  toJSON() {\n    return {\n      ...super.toJSON(),\n      peopleAmount: this.peopleAmount,\n      dayAmount: this.peopleAmount,\n      language: this.language,\n    };\n  }\n\n  static fromJSON(\n    json: ITEPortal_Domain_Dto_OrderItemDto & { product: Product }\n  ) {\n    return new TemporaryStaffOrderItem({\n      id: json.product.getProductId(),\n      product: json.product,\n      dayAmount: json.dayAmount,\n      peopleAmount: json.peopleAmount,\n      language: json.language,\n    });\n  }\n\n  static is(json: ITEPortal_Domain_Dto_OrderItemDto) {\n    return json.peopleAmount && json.dayAmount;\n  }\n}\n","import { IdType } from './common';\nimport { Category } from './ICategory';\nimport { ISerialisable, Serializable } from './Serializable';\nimport i18n from '../i18n';\nimport { Nullable, ProductId } from '@/types/support-types';\nimport {\n  ITEPortal_Contracts_Enums_BuildingType,\n  type ITEPortal_Domain_Dto_PriceList_IncludedPriceListItemDto,\n  ITEPortal_Domain_Dto_PriceListItemSummary,\n} from '@/api';\nimport { ProductUtils } from '@/utils/product-utils';\n\nexport interface IProduct extends ISerialisable {\n  id: IdType;\n  name: string;\n  price: number;\n  formattedPrice: string;\n  category: Category;\n  displayName?: Nullable<string>;\n  categoryId?: IdType;\n  description?: Nullable<string>;\n  imageUrls?: string[];\n  imageDescription?: Nullable<string>;\n  buildingTypes?: ITEPortal_Contracts_Enums_BuildingType[] | null;\n  fieldType?: Nullable<string>;\n  linkedProducts?: Array<IProduct> | null;\n  linkedZeroPriceProducts?: Array<IProduct> | null;\n}\n\n// prettier-ignore\nexport class Product\n  extends Serializable\n  implements ITEPortal_Domain_Dto_PriceListItemSummary {\n  id: number = 0;\n  additionalNotes: string | null = null;\n  buildingTypes: Array<ITEPortal_Contracts_Enums_BuildingType> | null = null;\n  categoryDisplayName: string | null = null;\n  categoryId: number = 0;\n  categoryName: string | null = null;\n  description: string | null = null;\n  fieldType: string | null = null;\n  formattedPrice: string | null = null;\n  imageDescription: string | null = null;\n  imageUrls: Array<string> | null = null;\n  linkedProducts: Array<Product> | null = null;\n  includedPriceListItems: Array<Product> | null = null;\n  price: number = 0;\n  productDisplayName: string | null = null;\n  productId: number = 0;\n  productName: string | null = null;\n  quantity: number = 0;\n\n  category: Category = Category.empty();\n\n  constructor(\n    opts: ITEPortal_Domain_Dto_PriceListItemSummary & { category?: Category, quantity?: number }\n  ) {\n    super();\n    const { category, linkedProducts, includedPriceListItems } = opts;\n\n    Object.assign(this, opts);\n\n    if (category instanceof Category) {\n      this.category = category;\n    } else {\n      this.category = Category.empty();\n    }\n\n    if (Array.isArray(linkedProducts)) {\n      this.linkedProducts = linkedProducts.map((json) =>\n        Product.fromJSON(json)\n      );\n    }\n\n    if (Array.isArray(includedPriceListItems)) {\n      this.includedPriceListItems = includedPriceListItems.map((json) =>\n        Product.linkedFromJSON(json)\n      );\n    }\n  }\n\n  getProductId(): ProductId {\n    return this.productName as ProductId;\n  }\n\n  get unit() {\n    if (!this.category.unitOfMeasure) {\n      return undefined;\n    }\n\n    // @ts-expect-error todo uncomment\n    return i18n.t(this.category.unitOfMeasure) || undefined;\n  }\n\n  get amountStep() {\n    if (!this.category.isDecimal) {\n      return 1;\n    }\n\n    return this.category.unitOfMeasure === 'sqm' ? 0.25 : 0.1;\n  }\n\n  get hasLinkedProducts() {\n    return Array.isArray(this.linkedProducts) && this.linkedProducts.length > 0;\n  }\n\n  toJSON() {\n    return this;\n  }\n\n  static fromJSON(\n    json: ITEPortal_Domain_Dto_PriceListItemSummary & { category?: Category }\n  ) {\n    const { category, ...rest } = json;\n\n    return ProductUtils.createProductFromPriceListItem(rest, { category });\n  }\n\n  static linkedFromJSON(\n    json: ITEPortal_Domain_Dto_PriceList_IncludedPriceListItemDto & { category?: Category }\n  ) {\n    const { category, productName, ...rest } = json;\n\n    let includedProductName = productName;\n\n    if (includedProductName && !includedProductName.includes('-included')) {\n      includedProductName = `${includedProductName}-included`\n    }\n\n    return ProductUtils.createProductFromPriceListItem({ ...rest, productName: includedProductName }, { category });\n  }\n\n  setLinkedItems(includedPriceListItems: Array<ITEPortal_Domain_Dto_PriceList_IncludedPriceListItemDto>) {\n    this.includedPriceListItems = includedPriceListItems.map((json) =>\n      Product.linkedFromJSON(json)\n    );\n  }\n}\n","import { IdType, AdminRoleType, SelectItem, RoleType } from './common';\nimport { UserRoleNameType, UserRoleType } from '@/types/open-api/domain-types';\n\nexport interface IUser {\n  fullName: string;\n  name?: string;\n  id?: IdType;\n  email?: string;\n  image?: string;\n  jobTitle?: SelectItem;\n  role?: AdminRoleType | RoleType;\n  subdivision?: SelectItem;\n  get firstName(): string;\n  get isSuperAdmin(): boolean;\n  get isAdmin(): boolean;\n  get isSupportManager(): boolean;\n  get isTechnicalManager(): boolean;\n  get isModerator(): boolean;\n  get isExhibitor(): boolean;\n}\n\ntype UserInstanceOptions = {\n  fullName: string;\n  id?: IdType;\n  email?: string;\n  image?: string;\n  jobTitle?: SelectItem;\n  role?: UserRoleType;\n  subdivision?: SelectItem;\n};\n\nexport class User implements IUser {\n  private readonly _fullName: string;\n  private readonly _id?: IdType;\n  private readonly _email?: string;\n  private readonly _image?: string;\n  private readonly _jobTitle?: SelectItem;\n  private readonly _role?: UserRoleType;\n  private readonly _subdivision?: SelectItem;\n\n  static Role: Record<UserRoleNameType, UserRoleType> = {\n    SuperAdmin: 1,\n    Admin: 2,\n    SupportManager: 3,\n    TechnicalManager: 4,\n    Moderator: 5,\n    Exhibitor: 6,\n    Agent: 7,\n  };\n\n  constructor(options: UserInstanceOptions) {\n    const { fullName, id, email, image, jobTitle, role, subdivision } = options;\n\n    this._fullName = fullName;\n    this._id = id;\n    this._email = email;\n    this._image = image;\n    this._jobTitle = jobTitle;\n    this._role = role;\n    this._subdivision = subdivision;\n  }\n\n  get id() {\n    return this._id;\n  }\n\n  get email() {\n    return this._email;\n  }\n\n  get image() {\n    return this._image;\n  }\n\n  get fullName() {\n    return this._fullName;\n  }\n\n  get jobTitle() {\n    return this._jobTitle;\n  }\n\n  get role() {\n    return this._role;\n  }\n\n  get subdivision() {\n    return this._subdivision;\n  }\n\n  get firstName(): string {\n    return this._fullName.split(' ')[0];\n  }\n\n  get isSuperAdmin() {\n    return this._role === User.Role.SuperAdmin;\n  }\n\n  get isAdmin() {\n    return this._role === User.Role.Admin;\n  }\n\n  get isSupportManager() {\n    return this._role === User.Role.SupportManager;\n  }\n\n  get isTechnicalManager() {\n    return this._role === User.Role.TechnicalManager;\n  }\n\n  get isModerator() {\n    return this._role === User.Role.Moderator;\n  }\n\n  get isExhibitor() {\n    return this._role === User.Role.Exhibitor;\n  }\n\n  get isAgent() {\n    return this._role === User.Role.Agent;\n  }\n\n  toJSON() {\n    return {\n      id: this.id,\n      fullName: this.fullName,\n      email: this.email,\n      image: this.image,\n      jobTitle: this.jobTitle,\n      role: this.role,\n      subdivision: this.subdivision,\n    };\n  }\n}\n","export interface ISerialisable {\n  toString(): string;\n  toJSON(): unknown;\n}\n\nexport abstract class Serializable implements ISerialisable {\n  public toString(): string {\n    return JSON.stringify(this.toJSON());\n  }\n\n  public abstract toJSON(): unknown;\n}\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useSearch } from '@tanstack/react-router';\nimport { isNil } from '@/utils/is-nil';\n\nexport const useHasCategorySearchCriteria = () => {\n  const { search, searchProduct } = useSearch({\n    strict: false,\n  });\n\n  return !isNil(search) || !isNil(searchProduct);\n};\n\nexport const useHasProductSearchCriteria = () => {\n  const { searchProduct } = useSearch({\n    strict: false,\n  });\n\n  return !isNil(searchProduct);\n};\n\nexport const useCategoriesLoaderQueryOptions = () => {\n  const { search, searchProduct } = useSearch({\n    strict: false,\n  });\n\n  return queryOptions({\n    queryKey: ['service-directory-categories', { search, searchProduct }],\n    queryFn: async () =>\n      await typedAxios.category.getCategories({\n        pageSize: -1,\n        search,\n        product: searchProduct,\n      }),\n\n    structuralSharing: true,\n  });\n};\n\nexport const useSubCategoriesLoaderQueryOptions = (\n  parentCategoryId: number\n) => {\n  const { searchProduct } = useSearch({\n    strict: false,\n  });\n\n  return queryOptions({\n    queryKey: [\n      'service-directory-sub-categories',\n      { searchProduct, parentCategoryId },\n    ],\n    queryFn: async () =>\n      await typedAxios.category.getCategories({\n        pageSize: -1,\n        // product: searchProduct,\n        parentCategoryId: parentCategoryId,\n      }),\n\n    structuralSharing: true,\n  });\n};\n\nexport const useCategoriesLoader = () => {\n  return useQuery(useCategoriesLoaderQueryOptions());\n};\n\nexport const useSubCategoriesLoader = (parentCategoryId: number) => {\n  return useQuery(useSubCategoriesLoaderQueryOptions(parentCategoryId));\n};\n","import {\n  ITEPortal_Domain_Dto_Category_CategoryOrderIndexDto,\n  ITEPortal_Domain_Dto_CategoryDto,\n} from '@/api';\nimport { DraggableUtils } from '@/utils/draggable-utils';\nimport { useMutation } from '@tanstack/react-query';\nimport { queryClient } from '@/features/query';\nimport { useCategoriesLoaderQueryOptions } from '@/pages/AdminPanel/Accordion/use-categories-loader';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\nimport i18n from '@/i18n';\n\nexport const useCategoriesOrderUpdate = () => {\n  const { queryKey } = useCategoriesLoaderQueryOptions();\n\n  return useMutation({\n    mutationKey: ['reorder-categories-mutation', queryKey],\n    mutationFn: async (opts: {\n      categoriesSource: ITEPortal_Domain_Dto_CategoryDto[];\n      startIndex: number;\n      endIndex: number;\n      preSaveFn: (ordered: ITEPortal_Domain_Dto_CategoryDto[]) => void;\n    }) => {\n      const { categoriesSource, startIndex, endIndex, preSaveFn } = opts;\n\n      const initialTableData = queryClient.getQueryData(queryKey);\n\n      if (startIndex === endIndex) {\n        return Promise.resolve(initialTableData);\n      }\n\n      const localOrdered = DraggableUtils.reorder(\n        categoriesSource,\n        startIndex,\n        endIndex,\n        true\n      );\n\n      preSaveFn(localOrdered);\n\n      queryClient.setQueryData(queryKey, localOrdered);\n\n      try {\n        await typedAxios.category.postCategoriesOrderIndex({\n          requestBody: localOrdered.map((ct) => {\n            return {\n              categoryId: ct.id,\n              orderIndex: ct.orderIndex || 0,\n            } satisfies ITEPortal_Domain_Dto_Category_CategoryOrderIndexDto;\n          }),\n        });\n\n        return localOrdered;\n      } catch {\n        toast.error(i18n.t('unable-to-apply-reorder'));\n\n        queryClient.setQueryData(queryKey, initialTableData);\n\n        return initialTableData;\n      }\n    },\n  });\n};\n","import { useSearch } from '@tanstack/react-router';\nimport {\n  keepPreviousData,\n  queryOptions,\n  useQuery,\n} from '@tanstack/react-query';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '@/api';\nimport { typedAxios } from '@/api/typed-axios';\n\nexport const useProductsLoaderOptions = () => {\n  const { searchProduct } = useSearch({ strict: false });\n\n  return {\n    getProductsLoaderOptions: (\n      categoryId: ITEPortal_Domain_Dto_CategoryDto['id']\n    ) =>\n      queryOptions({\n        queryKey: ['category-products', categoryId, searchProduct],\n        queryFn: async () => {\n          return typedAxios.product.getProducts({\n            categoryId: categoryId,\n            search: searchProduct,\n            pageSize: -1,\n          });\n        },\n        refetchOnMount: false,\n        structuralSharing: true,\n        retryOnMount: false,\n        placeholderData: keepPreviousData,\n      }),\n  };\n};\n\nexport const useProductsLoader = (\n  categoryId: ITEPortal_Domain_Dto_CategoryDto['id']\n) => {\n  const { getProductsLoaderOptions } = useProductsLoaderOptions();\n\n  return useQuery(getProductsLoaderOptions(categoryId));\n};\n","import {\n  ITEPortal_Domain_Dto_CategoryDto,\n  ITEPortal_Domain_Dto_ProductDto,\n} from '@/api';\nimport { DraggableUtils } from '@/utils/draggable-utils';\nimport { useMutation } from '@tanstack/react-query';\nimport { queryClient } from '@/features/query';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\nimport i18n from '@/i18n';\nimport { useProductsLoaderOptions } from '@/pages/AdminPanel/Accordion/use-products-loader';\nimport { isNil } from '@/utils/is-nil';\n\nexport const useProductsOrderUpdate = (\n  categoryId: ITEPortal_Domain_Dto_CategoryDto['id']\n) => {\n  const { getProductsLoaderOptions } = useProductsLoaderOptions();\n\n  return useMutation({\n    mutationKey: ['reorder-products-mutation', categoryId],\n    mutationFn: async (opts: {\n      productsSource: ITEPortal_Domain_Dto_ProductDto[];\n      startIndex: number;\n      endIndex: number;\n    }) => {\n      const { productsSource, startIndex, endIndex } = opts;\n\n      const initialTableData = queryClient.getQueryData(\n        getProductsLoaderOptions(categoryId).queryKey\n      );\n\n      if (startIndex === endIndex) {\n        return Promise.resolve();\n      }\n\n      const localOrdered = DraggableUtils.reorder(\n        productsSource,\n        startIndex,\n        endIndex\n      );\n\n      queryClient.setQueryData(\n        getProductsLoaderOptions(categoryId).queryKey,\n        localOrdered\n      );\n\n      try {\n        await typedAxios.product.postProductsOrderIndex({\n          requestBody: localOrdered\n            .filter((pr) => !isNil(pr.id))\n            .map((pr) => ({\n              // \"as\" allowed here as we filter products above using isNil(pr.id)\n              productId: pr.id as number,\n              orderIndex: pr.orderIndex || 0,\n            })),\n        });\n      } catch {\n        toast.error(i18n.t('unable-to-apply-reorder'));\n\n        queryClient.setQueryData(\n          getProductsLoaderOptions(categoryId).queryKey,\n          initialTableData\n        );\n      }\n    },\n  });\n};\n","import { ITEPortal_Domain_Dto_CategoryDto } from '@/api';\nimport { DraggableUtils } from '@/utils/draggable-utils';\nimport { useMutation } from '@tanstack/react-query';\nimport { queryClient } from '@/features/query';\nimport { useSubCategoriesLoaderQueryOptions } from '@/pages/AdminPanel/Accordion/use-categories-loader';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\nimport i18n from '@/i18n';\n\nexport const useSubCategoriesOrderUpdate = (parentCategoryId: number) => {\n  const { queryKey } = useSubCategoriesLoaderQueryOptions(parentCategoryId);\n\n  return useMutation({\n    mutationKey: ['reorder-sub-categories-mutation', queryKey],\n    mutationFn: async (opts: {\n      categoriesSource: ITEPortal_Domain_Dto_CategoryDto[];\n      startIndex: number;\n      endIndex: number;\n      preSaveFn: (ordered: ITEPortal_Domain_Dto_CategoryDto[]) => void;\n    }) => {\n      const { categoriesSource, startIndex, endIndex, preSaveFn } = opts;\n\n      const initialTableData = queryClient.getQueryData(queryKey);\n\n      if (startIndex === endIndex) {\n        return Promise.resolve(initialTableData);\n      }\n\n      const localOrdered = DraggableUtils.reorder(\n        categoriesSource,\n        startIndex,\n        endIndex\n      );\n\n      if (Array.isArray(initialTableData)) {\n        preSaveFn(localOrdered);\n\n        queryClient.setQueryData(queryKey, () => {\n          return localOrdered;\n          // initialTableData.forEach((ct) => {\n          //   if (ct.id === parentCategoryId) {\n          //     ct.subCategories = localOrdered;\n          //   }\n          //\n          //   return ct;\n          // });\n          //\n          // return initialTableData;\n        });\n      }\n\n      try {\n        await typedAxios.category.postCategoriesOrderIndex({\n          requestBody: localOrdered.map((ct) => ({\n            categoryId: ct.id,\n            orderIndex: ct.orderIndex || 0,\n          })),\n        });\n\n        return localOrdered;\n      } catch {\n        toast.error(i18n.t('unable-to-apply-reorder'));\n\n        queryClient.setQueryData(queryKey, initialTableData);\n\n        return initialTableData;\n      }\n    },\n  });\n};\n","import { FormProvider, useFieldArray, useForm } from 'react-hook-form';\nimport {\n  Box,\n  Button,\n  ButtonGroup,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerOverlay,\n  Flex,\n  FormControl,\n  Stack,\n} from '@chakra-ui/react';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport Input from '@/components/Fields/Input';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { useTranslation } from 'react-i18next';\nimport { IdType, OptionType } from '@/model/common';\nimport { viewExhibitionRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { ITEPortal_Domain_Dto_AdminPriceListItem } from '@/api';\nimport * as vali from 'zod';\nimport i18n from '@/i18n';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { TKey } from '@/i18n/types';\nimport { FEATURES, useFeature } from '@/features/feautres';\nimport { DeleteIcon } from '@chakra-ui/icons';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\nconst OptionSchema = vali.object(\n  {\n    value: vali.coerce.number(),\n    label: vali.string(),\n  },\n  {\n    required_error: i18n.t('required-field'),\n  }\n);\n\nconst ValidationSchema = vali.object({\n  name: OptionSchema,\n  price: vali.coerce.number(),\n  linked: vali\n    .array(\n      vali.object({\n        product: OptionSchema,\n        amount: vali.coerce.number().min(1, {\n          message: i18n.t('should-be-gte', { n: 1 }),\n        }),\n      })\n    )\n    .optional()\n    .nullable(),\n});\n\ntype ValidationSchemaType = vali.infer<typeof ValidationSchema>;\n\ninterface EditPriceListItemFormProps {\n  openConfirm: boolean;\n  closeModal: () => void;\n  editTableData: ITEPortal_Domain_Dto_AdminPriceListItem | null;\n  priceListId?: IdType;\n  currency: OptionType;\n  reloadPriceList: (currency: OptionType) => void;\n  existingPriceListItems: Array<\n    OptionType<ITEPortal_Domain_Dto_AdminPriceListItem>\n  >;\n}\n\nexport const EditPriceListItemForm = ({\n  openConfirm,\n  closeModal,\n  editTableData,\n  priceListId,\n  currency,\n  reloadPriceList,\n  existingPriceListItems,\n}: EditPriceListItemFormProps) => {\n  const zeroPriceProductsEnabled = useFeature(\n    FEATURES.LINKED_ZERO_PRICE_PRODUCTS\n  );\n  const [entityId, setEntityId] = useState<number | null>(null);\n  const { exhibitionId } = viewExhibitionRoute.useParams();\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const { t } = useTranslation();\n\n  const { data: priceListItemOptions } = useQuery(\n    QueryOptions.loadPriceListItemsShort(priceListId)\n  );\n\n  const filteredPricelistItemOptions = useMemo(() => {\n    const existingIds = existingPriceListItems.map((pi) => pi.value);\n\n    return (\n      priceListItemOptions?.filter(\n        (pi) => existingIds.indexOf(pi.value) === -1\n      ) || []\n    );\n  }, [priceListItemOptions, existingPriceListItems]);\n\n  const formInstance = useForm<ValidationSchemaType>({\n    // mode: 'onBlur',\n    resolver: zodResolver(ValidationSchema),\n  });\n  const {\n    fields: linkedFieldset,\n    append,\n    remove,\n  } = useFieldArray({\n    name: 'linked',\n    control: formInstance.control,\n  });\n\n  useEffect(\n    function setInitialDataToForm() {\n      if (editTableData?.id) {\n        setEntityId(editTableData.id);\n      }\n\n      formInstance.reset({\n        ...editTableData,\n        name: {\n          value: editTableData?.productId || undefined,\n          label: editTableData?.name || undefined,\n        },\n        // @ts-expect-error desc\n        linked: editTableData?.includedPriceListItems?.map((linked) => {\n          return {\n            product: existingPriceListItems?.find(\n              (it) => it.value === linked.includedPricelistItemId\n            ),\n            amount: linked.quantity,\n          };\n        }),\n      });\n    },\n    [editTableData, existingPriceListItems]\n  );\n\n  const filteredLinkedProducts = useMemo(() => {\n    return existingPriceListItems;\n  }, [existingPriceListItems, formInstance.getValues('name')]);\n\n  const submitHandler = async (\n    values: ValidationSchemaType,\n    addAnother: boolean\n  ) => {\n    if (priceListId) {\n      try {\n        setIsSubmitting(true);\n        if (entityId) {\n          await typedAxios.priceListItem.putExhibitionsPriceListsItems({\n            priceListId: +priceListId,\n            priceListItemId: entityId,\n            exhibitionId: +exhibitionId,\n            requestBody: {\n              productId: values.name.value,\n              price: values.price,\n              includedPriceListItems: values.linked?.map((linked) => {\n                return {\n                  includedPriceListItemId: linked.product.value,\n                  quantity: linked.amount,\n                };\n              }),\n            },\n          });\n        } else {\n          await typedAxios.priceListItem.postExhibitionsPriceListsItems({\n            priceListId: +priceListId,\n            exhibitionId: +exhibitionId,\n            requestBody: {\n              productId: values.name.value,\n              price: values.price,\n              includedPriceListItems: values.linked?.map((linked) => {\n                return {\n                  includedPriceListItemId: linked.product.value,\n                  quantity: linked.amount,\n                };\n              }),\n            },\n          });\n        }\n\n        if (!addAnother) {\n          closeModal();\n        } else {\n          setEntityId(null);\n          formInstance.reset({});\n        }\n\n        reloadPriceList(currency);\n      } catch (error) {\n        console.log(error);\n      } finally {\n        setIsSubmitting(false);\n      }\n    }\n  };\n\n  const headerMessage: TKey = editTableData\n    ? 'edit-pricelist-item'\n    : 'add-pricelist-item';\n\n  return (\n    <Drawer isOpen={openConfirm} onClose={closeModal} size=\"lg\">\n      <DrawerOverlay />\n      <DrawerContent>\n        <DrawerHeader>{t(headerMessage)}</DrawerHeader>\n        <DrawerCloseButton />\n        <DrawerBody>\n          <FormProvider {...formInstance}>\n            <form>\n              <Stack spacing=\"5\">\n                <FormControlWrapper>\n                  <SelectComponent<ValidationSchemaType>\n                    label={t('service-id')}\n                    options={filteredPricelistItemOptions}\n                    isRequired\n                    name=\"name\"\n                  />\n                  <Input<ValidationSchemaType>\n                    label={t('price')}\n                    maxWidth=\"100%\"\n                    name=\"price\"\n                    isRequired\n                  />\n                  {zeroPriceProductsEnabled && (\n                    <>\n                      {t('linked-services')}\n                      {linkedFieldset.map((field, index) => (\n                        <Flex\n                          key={field.id}\n                          flexDirection=\"column\"\n                          width=\"100%\"\n                        >\n                          <Flex flexDirection=\"row\" gap={4}>\n                            <Box flexBasis=\"50%\">\n                              <SelectComponent<ValidationSchemaType>\n                                label={t('service')}\n                                options={filteredLinkedProducts}\n                                isRequired\n                                name={`linked.${index}.product`}\n                              />\n                            </Box>\n                            <Box flexBasis=\"30%\">\n                              <Input<ValidationSchemaType>\n                                label={t('amount')}\n                                isRequired\n                                name={`linked.${index}.amount`}\n                                maxWidth=\"unset\"\n                              />\n                            </Box>\n                            <Box flexBasis=\"20%\" pt=\"37px\">\n                              <DeleteIcon onClick={() => remove(index)} />\n                            </Box>\n                          </Flex>\n                        </Flex>\n                      ))}\n                      <Button\n                        variant=\"ghost\"\n                        colorScheme=\"red\"\n                        onClick={() =>\n                          append(\n                            // @ts-expect-error desc\n                            {}\n                          )\n                        }\n                      >\n                        {t('add-service')}\n                      </Button>\n                    </>\n                  )}\n                </FormControlWrapper>\n              </Stack>\n            </form>\n          </FormProvider>\n        </DrawerBody>\n        <DrawerFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <OrderButton\n              colorScheme=\"red\"\n              onClick={formInstance.handleSubmit((values) =>\n                submitHandler(values, false)\n              )}\n              disabled={isSubmitting}\n            >\n              {t('save')}\n            </OrderButton>\n            {/*<OrderButton*/}\n            {/*  colorScheme=\"red\"*/}\n            {/*  onClick={formInstance.handleSubmit((values) =>*/}\n            {/*    submitHandler(values, true)*/}\n            {/*  )}*/}\n            {/*  disabled={isSubmitting}*/}\n            {/*>*/}\n            {/*  {t('save-and-add-another')}*/}\n            {/*</OrderButton>*/}\n            <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n              {t('cancel')}\n            </OrderButton>\n          </ButtonGroup>\n        </DrawerFooter>\n      </DrawerContent>\n    </Drawer>\n  );\n};\n","import { useNameTranslate } from '@/hooks/useStringName';\nimport {\n  Box,\n  Button as ChakraButton,\n  ButtonGroup,\n  FormControl,\n  Stack,\n} from '@chakra-ui/react';\nimport React, { useEffect, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { Button } from '@/components/Buttons/Button/Button';\nimport Input from '@/components/Fields/Input';\nimport { useNavigate, useParams } from '@tanstack/react-router';\nimport { DatePicker } from '@/components/DatePicker/DatePicker';\nimport styled from 'styled-components';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport fetchApi from '@/utils/fetchAPI';\nimport {\n  CREATE_EXHIBITION,\n  EDIT_EXHIBITION,\n  SAVE_EXHIBITION_IMG,\n} from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport dayjs from 'dayjs';\nimport {\n  createExhibitionRoute,\n  editExhibitionRoute,\n} from '../../../features/Routing/protected/admin-exhibitions';\nimport { toast } from 'react-toastify';\nimport { useFormErrorsHandler } from '../../../hooks/useFormErrorsHandler';\nimport { typedAxios } from '../../../api/typed-axios';\nimport { typedObjectKeys } from '../../../utils/typed-object-keys';\nimport { isOption } from '../../../utils/is-option';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { FormValues, ValidationSchema } from './types';\nimport { DateUtils } from '../../../utils/date-utils';\nimport { useTranslation } from 'react-i18next';\n\nconst MarginContainer = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  gap: 10px;\n  width: 100%;\n`;\n\nconst MarginWrapper = styled(FormControl)`\n  min-width: 100%;\n`;\n\ninterface ExhibitionDescriptionProps {\n  type: 'add' | 'edit';\n}\n\nconst dateFields = [\n  'startDate',\n  'endDate',\n  'orderCreationLastDate',\n  'firstMarginDate',\n  'secondMarginDate',\n  'thirdMarginDate',\n] as const;\n\nconst isDateField = (name: string): name is (typeof dateFields)[number] => {\n  // @ts-expect-error as we are asserting acceptable names\n  return dateFields.includes(name);\n};\n\nexport const ExhibitionDescription = ({\n  type,\n}: ExhibitionDescriptionProps): JSX.Element => {\n  const { t } = useTranslation();\n  const { exhibitionId } = useParams({ strict: false });\n  const editForm = type === 'edit';\n  const { technicalManagers: managers } = (\n    editForm ? editExhibitionRoute : createExhibitionRoute\n  ).useLoaderData();\n\n  const [isSubmitting, setIsSubmitting] = useState(false);\n\n  const navigate = useNavigate();\n\n  const methods = useForm<FormValues>({\n    mode: 'onBlur',\n    resolver: zodResolver(ValidationSchema),\n  });\n\n  const { processErrorsArray } = useFormErrorsHandler(methods);\n\n  const toExhibitions = () => {\n    navigate({\n      to: '/admin/exhibitions',\n      replace: true,\n    });\n  };\n\n  useEffect(() => {\n    if (type === 'edit') {\n      const fetchData = async () => {\n        setIsSubmitting(true);\n        try {\n          const data = await typedAxios.exhibition.getExhibitions({\n            id: +exhibitionId,\n          });\n\n          if (Array.isArray(data.technicalManagers)) {\n            // @ts-expect-error desc\n            data.technicalManagers = data.technicalManagers\n              .map((managerValue) => {\n                return managers.find(\n                  (managerOption) => managerOption?.value === managerValue\n                );\n              })\n              .filter(Boolean);\n          }\n\n          typedObjectKeys(data).forEach((field) => {\n            // @ts-expect-error desc\n            methods.setValue(field, data[field]);\n          });\n        } catch (error: any) {\n          toast.error('Could not load exhibition');\n        } finally {\n          setIsSubmitting(false);\n        }\n      };\n\n      fetchData();\n    }\n  }, []);\n\n  const submitHandler = async (values: FormValues) => {\n    typedObjectKeys(values).forEach((field) => {\n      const value = values[field];\n\n      if (isDateField(field) && DateUtils.isDate(value)) {\n        values[field] = dayjs\n          .tz(dayjs(value).format('YYYY-MM-DD'), 'Etc/GMT+0')\n          .toDate();\n      }\n    });\n\n    const method = editForm ? FetchMethods.Put : FetchMethods.Post;\n    const link = editForm ? EDIT_EXHIBITION(exhibitionId) : CREATE_EXHIBITION;\n    const technicalManagers = values.technicalManagers?.map((manager) =>\n      typeof manager !== 'string' && isOption(manager) ? manager.value : manager\n    );\n\n    const data = {\n      ...values,\n      technicalManagers,\n    };\n\n    setIsSubmitting(true);\n    try {\n      const response = await fetchApi(link, {\n        method: method,\n        data,\n      });\n\n      const id = editForm ? exhibitionId : response?.data;\n\n      if (data['upload-image']) {\n        await fetchApi(\n          SAVE_EXHIBITION_IMG(id),\n          {\n            method: FetchMethods.Post,\n\n            data: { logo: data['upload-image'][0] },\n          },\n          { 'Content-Type': 'multipart/form-data' }\n        );\n      }\n\n      toast.success(t('exhibition-import-saved'));\n      toExhibitions();\n    } catch (e: any) {\n      processErrorsArray(e);\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <FormProvider {...methods}>\n      <form onSubmit={methods.handleSubmit(submitHandler)}>\n        <Stack spacing=\"5\">\n          <Input<FormValues>\n            label={useNameTranslate('exhibition-name')}\n            maxWidth=\"100%\"\n            name=\"name\"\n            isRequired\n          />\n          <UploadFileDropzone\n            label={useNameTranslate('upload-image')}\n            defaultValue={methods.getValues('logoUrl') || undefined}\n            name=\"upload-image\"\n          />\n          <DatePicker<FormValues>\n            name=\"startDate\"\n            label={useNameTranslate('startDate')}\n            isRequired\n          />\n          <DatePicker<FormValues>\n            name=\"endDate\"\n            label={useNameTranslate('finDate')}\n            isRequired\n          />\n          <DatePicker<FormValues>\n            name=\"orderCreationLastDate\"\n            label={useNameTranslate('order-creation-last-date')}\n          />\n          <Input<FormValues>\n            label={useNameTranslate('location')}\n            maxWidth=\"100%\"\n            name=\"place\"\n            isRequired\n          />\n          <TextArea<FormValues>\n            label={useNameTranslate('exhibition-description')}\n            name=\"description\"\n          />\n          <SelectComponent<FormValues>\n            label={useNameTranslate('technical-managers')}\n            options={managers}\n            closeMenuOnSelect={false}\n            name=\"technicalManagers\"\n            isMulti\n            isRequired\n          />\n          <MarginWrapper isRequired>\n            <FormLabel>{useNameTranslate('margin1')}</FormLabel>\n            <MarginContainer>\n              <Input<FormValues>\n                maxWidth=\"100%\"\n                name=\"firstMargin\"\n                addonRight=\"%\"\n              />\n              <DatePicker<FormValues> name=\"firstMarginDate\" />\n            </MarginContainer>\n          </MarginWrapper>\n          <MarginWrapper isRequired>\n            <FormLabel>{`${useNameTranslate('margin2')}`}</FormLabel>\n            <MarginContainer>\n              <Input<FormValues>\n                maxWidth=\"100%\"\n                name=\"secondMargin\"\n                isRequired\n                addonRight=\"%\"\n              />\n              <DatePicker<FormValues> name=\"secondMarginDate\" isRequired />\n            </MarginContainer>\n          </MarginWrapper>\n          <MarginWrapper isRequired>\n            <FormLabel>{`${useNameTranslate('margin3')}`}</FormLabel>\n            <MarginContainer>\n              <Input<FormValues>\n                maxWidth=\"100%\"\n                name=\"thirdMargin\"\n                isRequired\n                addonRight=\"%\"\n              />\n              <DatePicker<FormValues> name=\"thirdMarginDate\" isRequired />\n            </MarginContainer>\n          </MarginWrapper>\n\n          <ButtonGroup gap=\"1\">\n            <ChakraButton\n              colorScheme=\"red\"\n              isLoading={isSubmitting}\n              onClick={methods.handleSubmit(submitHandler)}\n            >\n              {useNameTranslate('save')}\n            </ChakraButton>\n            <Button\n              colorScheme=\"secondary\"\n              buttonType=\"reset\"\n              onClick={toExhibitions}\n            >\n              {useNameTranslate('cancel')}\n            </Button>\n          </ButtonGroup>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import { Table } from '@/components/Table/Table';\nimport { useTranslation } from 'react-i18next';\nimport { Card } from '@/components/Card/Card';\nimport { EditIcon, ExternalLinkIcon } from '@chakra-ui/icons';\nimport { Box, Flex } from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { Button } from '@/components/Buttons/Button/Button';\nimport { Link, useNavigate } from '@tanstack/react-router';\nimport { Column, Row } from 'react-table';\nimport { EXHIBITIONS_TABLE } from '@/constants/endpoints';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport dayjs from 'dayjs';\nimport Pagination from '@/components/Table/Pagination';\nimport { useTableLoader } from '@/components/Table/useTableLoader';\nimport { useMemo } from 'react';\nimport { exhibitionApi } from '@/store/effector/exhibition';\nimport { ITEPortal_Domain_Dto_AdminExhibitionSummary } from '@/api';\nimport { exhibitionListRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { useRBAC } from '@/features/rbac/useRBAC';\nimport { ButtonGroup } from '@chakra-ui/react';\nimport { useExportExhibition } from '@/pages/AdminPanel/Exhibitions/hooks/use-import-exhibition';\n\nconst OptionWrapper = styled(Flex)`\n  flex-direction: row;\n  gap: 20px;\n`;\n\nconst ButtonContainer = styled(Box)`\n  padding-top: 20px;\n`;\n\nconst FooterContainer = styled(Flex)`\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n`;\n\ninterface ExhibitionOptionsType {\n  row: Row<ITEPortal_Domain_Dto_AdminExhibitionSummary>;\n}\n\nexport const Exhibitions = (): JSX.Element => {\n  const { tab } = exhibitionListRoute.useSearch();\n  const { t } = useTranslation();\n  const { can, user } = useRBAC();\n  const { isLoading, data, onPageChange, onPageSizeChange, paginationInfo } =\n    useTableLoader<ITEPortal_Domain_Dto_AdminExhibitionSummary>({\n      resource: EXHIBITIONS_TABLE,\n      additionalPrams: {\n        type: tab,\n      },\n    });\n  const navigate = useNavigate();\n\n  const { openImportModal } = useExportExhibition();\n\n  // const { user } = useAuth();\n  // const role = user?.role as AdminRoleType;\n\n  const ExhibitionOptions = ({ row }: ExhibitionOptionsType) => {\n    // const editAvailable = !(role == 4 || role == 5);\n    // const showAvailable = role !== 3;\n\n    return (\n      <OptionWrapper>\n        {can('canManageExhibition') && (\n          <Link\n            to={`/admin/exhibitions/$exhibitionId/view/${\n              user?.isAgent ? 'placed-orders' : 'personal-accounts'\n            }`}\n            params={{\n              exhibitionId: row.original.id,\n            }}\n            onClick={() => {\n              exhibitionApi.setEventEditionId(\n                row.original.eventEditionId || null\n              );\n\n              if (row.original.name) {\n                exhibitionApi.setName(row.original.name);\n              }\n            }}\n          >\n            <ExternalLinkIcon />\n          </Link>\n        )}\n        {can('canEditExhibition') && (\n          <Link\n            to=\"/admin/exhibitions/$exhibitionId/edit\"\n            params={{\n              exhibitionId: row.original.id,\n            }}\n          >\n            <EditIcon />\n          </Link>\n        )}\n      </OptionWrapper>\n    );\n  };\n\n  const exhibitionColumns = useMemo<\n    Array<Column<ITEPortal_Domain_Dto_AdminExhibitionSummary>>\n  >(() => {\n    return [\n      {\n        Header: `${t('exhibitionId')}`,\n        accessor: 'id',\n        width: '10%',\n      },\n      {\n        accessor: 'eventEditionId',\n        show: false,\n      },\n      {\n        Header: `${t('exhibitionName')}`,\n        accessor: 'name',\n      },\n      {\n        Header: `${t('startDate')}`,\n        accessor: 'startDate',\n        Cell: ({ row: { values } }) => (\n          <>\n            {values?.startDate\n              ? dayjs(values?.startDate).format('DD.MM.YYYY')\n              : ''}\n          </>\n        ),\n      },\n      {\n        Header: `${t('finDate')}`,\n        accessor: 'endDate',\n        Cell: ({ row: { values } }) => (\n          <>\n            {values?.endDate ? dayjs(values?.endDate).format('DD.MM.YYYY') : ''}\n          </>\n        ),\n      },\n      {\n        Header: `${t('location')}`,\n        accessor: 'place',\n      },\n      {\n        Header: '',\n        id: 'options',\n        width: '5%',\n        Cell: ({ row }) => <ExhibitionOptions row={row} />,\n      },\n    ];\n  }, []);\n\n  const addExhibition = () => {\n    navigate({ to: '/admin/exhibitions/add' });\n  };\n\n  return (\n    <LoaderWrapper loading={isLoading}>\n      <Card>\n        <Table columns={exhibitionColumns} data={data} />\n        <FooterContainer>\n          <ButtonGroup gap=\"4\" justifyContent=\"flex-end\">\n            {can('canAddExhibition') && (\n              <ButtonContainer>\n                <Button colorScheme=\"red\" onClick={addExhibition}>\n                  {t('addExhibition')}\n                </Button>\n              </ButtonContainer>\n            )}\n            {can('canAddExhibition') && (\n              <ButtonContainer>\n                <Button colorScheme=\"red\" onClick={openImportModal}>\n                  + {t('bitrixImport')}\n                </Button>\n              </ButtonContainer>\n            )}\n          </ButtonGroup>\n          <Pagination\n            setPageNumber={onPageChange}\n            setPageSize={onPageSizeChange}\n            paginationInfo={paginationInfo}\n          />\n        </FooterContainer>\n      </Card>\n    </LoaderWrapper>\n  );\n};\n","import {\n  SystemStyleObject,\n  Tab,\n  TabList,\n  TabPanel,\n  TabPanelProps,\n  TabPanels,\n  TabProps,\n  Tabs,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { Exhibitions } from './Exhibitions';\nimport {\n  exhibitionListRoute,\n  exhibitionsTabs,\n} from '../../../features/Routing/protected/admin-exhibitions';\nimport { useNavigate } from '@tanstack/react-router';\n\nconst selectedTabStyles: SystemStyleObject = {\n  background: 'blackAlpha.300',\n};\n\nconst tabStyles: TabProps = {\n  background: 'blackAlpha.100',\n  minW: '100px',\n};\n\nconst tabPanelsStyle: TabPanelProps = {\n  width: '100%',\n};\n\nexport const ExhibitionsTabsPage = () => {\n  const { t } = useTranslation();\n  const { tab } = exhibitionListRoute.useSearch();\n  const indexFromUrl = exhibitionsTabs.indexOf(tab);\n  const navigate = useNavigate();\n\n  const handleTabChange = (index: number) => {\n    navigate({\n      search: { tab: exhibitionsTabs[index] || 'current' },\n    });\n  };\n\n  return (\n    <Tabs\n      variant=\"unstyled\"\n      align=\"center\"\n      w=\"100%\"\n      index={indexFromUrl}\n      onChange={handleTabChange}\n    >\n      <TabList>\n        <Tab\n          _selected={selectedTabStyles}\n          {...tabStyles}\n          borderTopLeftRadius=\"md\"\n          borderBottomLeftRadius=\"md\"\n        >\n          {t('current-exhibitions')}\n        </Tab>\n        <Tab\n          _selected={selectedTabStyles}\n          {...tabStyles}\n          borderTopRightRadius=\"md\"\n          borderBottomRightRadius=\"md\"\n        >\n          {t('past-exhibitions')}\n        </Tab>\n      </TabList>\n      <TabPanels>\n        <TabPanel {...tabPanelsStyle}>\n          {tab === 'current' && <Exhibitions />}\n        </TabPanel>\n        <TabPanel {...tabPanelsStyle}>\n          {tab === 'past' && <Exhibitions />}\n        </TabPanel>\n      </TabPanels>\n    </Tabs>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport React, { useEffect, useState } from 'react';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { Stack } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport * as vali from 'zod';\nimport i18n from '@/i18n';\nimport { OptionType } from '@/model/common';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto } from '@/api/models/ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto';\n\nconst OptionSchema = vali.object(\n  {\n    value: vali.coerce.number(),\n    label: vali.string(),\n  },\n  {\n    required_error: i18n.t('required-field'),\n  }\n);\n\nconst ValidationSchema = vali.object({\n  eventMaster: OptionSchema,\n  exhibition: OptionSchema,\n  technicalManagers: vali.array(OptionSchema),\n});\n\nexport type ValidationSchemaType = vali.infer<typeof ValidationSchema>;\n\nexport const ImportExhibitionForm = () => {\n  const { t } = useTranslation();\n  const [eventMasterId, setEventMasterId] = useState<number>();\n  const [exhibition, setExhibition] =\n    useState<\n      Array<\n        OptionType<ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto>\n      >\n    >();\n  const [technicalManagers, setTechnicalManagers] = useState<OptionType[]>();\n  const instance = useForm<ValidationSchemaType>({\n    resolver: zodResolver(ValidationSchema),\n    mode: 'onChange',\n  });\n  const { data: eventMasterOptions = [] } = useQuery(\n    QueryOptions.loadEventMasterOptions()\n  );\n\n  useEffect(() => {\n    const fetchExhibition = async () => {\n      const exhibitionsData = await typedAxios.bitrix.getBitrixEventEditions({\n        eventMasterId,\n      });\n\n      const exhibitionOptions = exhibitionsData.map((ex) => ({\n        value: ex.id,\n        label: ex.title,\n        meta: ex,\n      })) satisfies Array<\n        OptionType<ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto>\n      >;\n\n      setExhibition(exhibitionOptions);\n    };\n\n    if (eventMasterId) {\n      instance.resetField('exhibition');\n      fetchExhibition();\n    }\n  }, [eventMasterId]);\n\n  useEffect(() => {\n    const fetchTechnicalManagers = async () => {\n      const technicalManagersData = await typedAxios.user\n        .getUsersTechnicalManagers()\n        .catch(() => []);\n\n      const technicalManagersOptions = technicalManagersData.map((manager) => {\n        return {\n          label: manager.email || manager.name,\n          value: manager.id,\n          meta: { contactId: manager.contactId },\n        };\n      });\n\n      setTechnicalManagers(technicalManagersOptions);\n    };\n\n    fetchTechnicalManagers();\n    ModalFactory.updateContext(instance);\n  }, [instance]);\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing={4}>\n        <SelectComponent<ValidationSchemaType>\n          label={t('event-master')}\n          options={eventMasterOptions}\n          isRequired\n          name=\"eventMaster\"\n          onChange={({ value }) => setEventMasterId(value)}\n        />\n        {eventMasterId && (\n          <>\n            <SelectComponent<ValidationSchemaType>\n              label={t('exhibitions')}\n              options={exhibition}\n              isRequired\n              name=\"exhibition\"\n            />\n            <SelectComponent<ValidationSchemaType>\n              label={t('technical-manager')}\n              options={technicalManagers}\n              isRequired\n              name=\"technicalManagers\"\n              isMulti\n            />\n          </>\n        )}\n      </Stack>\n    </FormProvider>\n  );\n};\n","import {\n  Tabs,\n  TabList,\n  TabPanels,\n  Tab,\n  TabPanel,\n  CardBody,\n  Card,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { ExhibitionDescription } from '@/pages/AdminPanel/Exhibitions/ExhibitionDescription';\nimport styled from 'styled-components';\nimport { PriceLists } from '@/pages/AdminPanel/Exhibitions/PriceLists';\nimport { useEffect } from 'react';\n\nconst tabStyles = {\n  borderColor: 'blackAlpha.200',\n  borderBottomColor: '#F7FAFC',\n  color: 'red',\n};\n\nconst TabWrapper = styled(TabPanel)`\n  padding-top: 50px;\n  max-width: 600px;\n`;\n\ninterface NewExhibitionProps {\n  type: 'add' | 'edit';\n}\n\nexport const NewExhibition = ({ type }: NewExhibitionProps): JSX.Element => {\n  const { t } = useTranslation();\n  const disabled = type === 'add';\n\n  useEffect(() => {\n    const element = document.getElementById('breadcrumbsId');\n\n    if (element) {\n      element.scrollIntoView({ behavior: 'smooth' });\n    }\n  }, []);\n\n  return (\n    <Card>\n      <CardBody>\n        <Tabs isManual variant=\"enclosed\">\n          <TabList>\n            <Tab _selected={tabStyles}>{t('exhibition-description')}</Tab>\n            <Tab _selected={tabStyles} isDisabled={disabled}>\n              {t('priceLists')}\n            </Tab>\n          </TabList>\n          <TabPanels>\n            <TabWrapper>\n              <ExhibitionDescription type={type} />\n            </TabWrapper>\n            <TabPanel>{!disabled && <PriceLists />}</TabPanel>\n          </TabPanels>\n        </Tabs>\n      </CardBody>\n    </Card>\n  );\n};\n","import styled from 'styled-components';\nimport { Box, Flex, Text } from '@chakra-ui/react';\n\nexport const SelectedPriceWrapper = styled(Box)`\n  display: flex;\n  flex-direction: column;\n  padding-top: 40px;\n  padding-bottom: 30px;\n`;\n\nexport const LoaderWrapper = styled(Flex)`\n  justify-content: center;\n  padding-top: 10%;\n`;\n\nexport const SelectedPriceContainer = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  padding-bottom: 5px;\n`;\n\nexport const OptionWrapper = styled(Flex)`\n  flex-direction: row;\n  gap: 20px;\n  max-width: 100px;\n`;\n\nexport const ToolBarWrapper = styled(Box)`\n  padding-bottom: 10px;\n  display: flex;\n  flex-direction: row;\n  justify-content: end;\n  gap: 20px;\n`;\n\nexport const ButtonContentContainer = styled(Flex)`\n  flex-direction: row;\n  align-items: center;\n  gap: 5px;\n`;\n\nexport const TransparentButtonsTextContainer = styled(Text)`\n  font-size: 16px;\n  color: var(--chakra-colors-gray-600);\n`;\n","import { useNameTranslate } from '@/hooks/useStringName';\nimport React, { SetStateAction, useEffect, useMemo, useState } from 'react';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport {\n  Box,\n  ButtonGroup,\n  Divider,\n  FormControl,\n  Link,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Flex,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { DeleteIcon, EditIcon } from '@chakra-ui/icons';\nimport { Table } from '@/components/Table/Table';\nimport { Card } from '@/components/Card/Card';\nimport {\n  Button as OrderButton,\n  Button,\n} from '@/components/Buttons/Button/Button';\nimport { CiImport } from 'react-icons/ci';\nimport fetchApi from '@/utils/fetchAPI';\nimport {\n  DELETE_PRICE_LIST,\n  EDIT_PRICELIST_ITEM,\n  GET_PRICELISTS,\n  IMPORT_PRICELIST_ITEMS,\n} from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { Loader } from '@/components/Loader/Loader';\nimport { FieldValues, FormProvider, useForm } from 'react-hook-form';\nimport { IdType, OptionType } from '@/model/common';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport { toast } from 'react-toastify';\nimport { DeleteModal } from '@/pages/Exhibition/DeleteModal';\nimport { EditPriceListItemForm } from '@/pages/AdminPanel/Exhibitions/EditPriceListItemForm';\nimport { typedAxios } from '@/api/typed-axios';\nimport type { ITEPortal_Domain_Dto_AdminPriceListItem } from '@/api';\nimport { editExhibitionRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport {\n  ButtonContentContainer,\n  LoaderWrapper,\n  OptionWrapper,\n  SelectedPriceContainer,\n  SelectedPriceWrapper,\n  ToolBarWrapper,\n  TransparentButtonsTextContainer,\n} from '@/pages/AdminPanel/Exhibitions/PriceList.styled';\nimport { Column, Row } from 'react-table';\nimport { TableIncludedPriceListItemsBadge } from '@/pages/AdminPanel/Exhibitions/TableIncludedPriceListItemsBadge';\nimport { ITEPortal_Domain_Dto_CurrencyDto } from '@/api';\nimport { ButtonContainer } from '@/components/OrderTableRow/styled';\nimport { ModalFactory } from '@/components/Modal/api';\n\ninterface PriceListsOptionsType {\n  row: Row<ITEPortal_Domain_Dto_AdminPriceListItem>;\n}\n\ntype PriceListType = {\n  exhibitionId: number;\n  priceListId: number;\n  currencyId: number;\n};\n\nexport const PriceLists = (): JSX.Element => {\n  const { exhibitionId } = editExhibitionRoute.useParams();\n  const [currency, setCurrency] = useState<any>();\n  const [currencyOptions, setCurrencyOptions] = useState([]);\n  const [isLoading, setIsLoading] = useState(false);\n  const [priceListsData, setPriceListsData] = useState<\n    ITEPortal_Domain_Dto_AdminPriceListItem[]\n  >([]);\n  const [openConfirm, setOpenConfirm] = useState(false);\n  const [openImportModal, setOpenImportModal] = useState(false);\n  const defaultValues = { name: null, price: null };\n  const [editData, setEditData] = useState<any>(defaultValues);\n  const [editTableData, setEditTableData] =\n    useState<ITEPortal_Domain_Dto_AdminPriceListItem | null>(null);\n  const [priceLists, setPriceLists] = useState<any>();\n  const [selectedPriceId, setSelectedPriceId] = useState<IdType>('');\n  const [openDeletePriceListItem, setOpenDeletePriceListItem] = useState(false);\n  const [deleteAll, setDeleteAll] = useState(false);\n  const [priceListItemId, setPriceListItemId] = useState();\n  const { t } = useTranslation();\n  const [eventEditionId, setEventEditionId] = useState<number | null>();\n\n  useEffect(() => {\n    const fetchEventEditionId = async () => {\n      if (exhibitionId) {\n        const data = await typedAxios.exhibition.getExhibitions({\n          id: +exhibitionId,\n        });\n\n        setEventEditionId(data.eventEditionId);\n      }\n    };\n\n    fetchEventEditionId();\n  }, []);\n\n  const closeDeletePriceListItemModal = () => setOpenDeletePriceListItem(false);\n\n  const deletePriceListItemModalShow = (id: any) => {\n    setPriceListItemId(id);\n    setDeleteAll(false);\n    setOpenDeletePriceListItem(!openDeletePriceListItem);\n  };\n\n  const deletePriceModalShow = () => {\n    setDeleteAll(true);\n    setOpenDeletePriceListItem(!openDeletePriceListItem);\n  };\n\n  const methods = useForm({\n    mode: 'onBlur',\n  });\n\n  useEffect(() => {\n    Object.keys(editData).forEach((field) => {\n      methods.setValue(field, editData[field]);\n    });\n  }, [editData]);\n\n  useEffect(() => {\n    const fetchData = async () => {\n      setIsLoading(true);\n      try {\n        const currencyData = await typedAxios.currency.getCurrency();\n\n        const options = currencyData?.map(\n          (option: ITEPortal_Domain_Dto_CurrencyDto) => {\n            return {\n              label: option?.name,\n              value: option?.id,\n            };\n          }\n        ) as SetStateAction<never[]>;\n\n        setCurrencyOptions(options);\n\n        const response = await fetchApi(GET_PRICELISTS(exhibitionId));\n\n        setPriceLists(response?.data);\n      } catch (error) {\n        console.log(error);\n      } finally {\n        setIsLoading(false);\n      }\n    };\n\n    fetchData();\n  }, []);\n\n  const PriceListsOptions = ({ row }: PriceListsOptionsType) => {\n    const rowValues = row.original;\n\n    return (\n      <OptionWrapper>\n        <Link onClick={() => editRow(rowValues)}>\n          <EditIcon />\n        </Link>\n        <Link onClick={() => deletePriceListItemModalShow(rowValues.id)}>\n          <DeleteIcon />\n        </Link>\n      </OptionWrapper>\n    );\n  };\n\n  const PriceListsToolbar = () => {\n    return (\n      <ToolBarWrapper>\n        <Button colorScheme=\"transparent\" onClick={importCSV}>\n          <ButtonContentContainer>\n            <CiImport size=\"20px\" />\n            <TransparentButtonsTextContainer>\n              {t('importCSV')}\n            </TransparentButtonsTextContainer>\n          </ButtonContentContainer>\n        </Button>\n        <Button colorScheme=\"red\" onClick={addRow}>\n          {t('add-price')}\n        </Button>\n      </ToolBarWrapper>\n    );\n  };\n\n  const importCSV = () => {\n    setOpenImportModal(!openImportModal);\n  };\n\n  const closeImportModal = () => setOpenImportModal(false);\n\n  const importItems = async (values: FieldValues) => {\n    setIsLoading(true);\n    try {\n      const response = await fetchApi(\n        IMPORT_PRICELIST_ITEMS(exhibitionId, selectedPriceId),\n        {\n          method: FetchMethods.Post,\n          data: { importPriceListItems: values?.['upload-csv'][0] },\n        },\n        { 'Content-Type': 'multipart/form-data' }\n      );\n\n      if (response?.data?.errors) {\n        const message = `${t('import-errors')} ${response?.data?.errors.join(\n          ','\n        )}`;\n\n        toast.error(message);\n      }\n\n      await showPriceList(currency);\n    } finally {\n      setIsLoading(false);\n      closeImportModal();\n    }\n  };\n\n  const ImportCSVModal = () => {\n    return (\n      <Modal\n        isOpen={openImportModal}\n        onClose={closeImportModal}\n        size=\"lg\"\n        isCentered\n      >\n        <ModalOverlay />\n        <ModalContent>\n          <ModalHeader>{t('set-file')}</ModalHeader>\n          <ModalCloseButton />\n          <ModalBody>\n            <FormProvider {...methods}>\n              <form>\n                <FormControl>\n                  <UploadFileDropzone\n                    label={useNameTranslate('upload-csv')}\n                    name=\"upload-csv\"\n                    accept={{ 'text/csv': ['.csv'] }}\n                  />\n                </FormControl>\n              </form>\n            </FormProvider>\n          </ModalBody>\n          <ModalFooter justifyContent=\"center\">\n            <ButtonGroup gap=\"1\" justifyContent=\"center\">\n              <OrderButton\n                colorScheme=\"red\"\n                onClick={methods.handleSubmit(importItems)}\n              >\n                {t('choose')}\n              </OrderButton>\n              <OrderButton colorScheme=\"secondary\" onClick={closeImportModal}>\n                {t('cancel')}\n              </OrderButton>\n            </ButtonGroup>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    );\n  };\n\n  const addRow = () => {\n    setEditData(defaultValues);\n    setEditTableData(null);\n    setOpenConfirm(!openConfirm);\n  };\n\n  const closeModal = () => setOpenConfirm(false);\n\n  const editRow = (values: ITEPortal_Domain_Dto_AdminPriceListItem) => {\n    setEditData(values);\n    setEditTableData(values);\n    setOpenConfirm(!openConfirm);\n  };\n\n  const deleteRow = async () => {\n    if (priceListItemId) {\n      try {\n        setIsLoading(true);\n        await fetchApi(\n          EDIT_PRICELIST_ITEM(exhibitionId, selectedPriceId, priceListItemId),\n          {\n            method: FetchMethods.Delete,\n          }\n        );\n\n        closeModal();\n        setEditData(defaultValues);\n        setEditTableData(null);\n        await showPriceList(currency);\n      } catch (error) {\n        console.log(error);\n      } finally {\n        setIsLoading(false);\n      }\n    }\n  };\n\n  const priceListsColumns = React.useMemo<\n    Array<Column<ITEPortal_Domain_Dto_AdminPriceListItem>>\n  >(\n    () => [\n      {\n        Header: ``,\n        accessor: 'id',\n        show: false,\n      },\n      {\n        Header: ``,\n        accessor: 'productId',\n        show: false,\n      },\n      {\n        Header: `${t('service-name')}`,\n        accessor: 'displayName',\n        width: '30%',\n      },\n      {\n        Header: `${t('service-id')}`,\n        accessor: 'name',\n        width: '20%',\n      },\n      {\n        Header: `${t('price')}`,\n        accessor: 'price',\n        width: '10%',\n      },\n      {\n        Header: `${t('linked-services')}`,\n        accessor: 'includedPriceListItems',\n        Cell: ({ value }) => {\n          return (\n            <TableIncludedPriceListItemsBadge\n              includedPriceListItems={value}\n              source={priceListsData}\n            />\n          );\n        },\n      },\n      {\n        Header: '',\n        id: 'options',\n        width: '10%',\n        Cell: ({ row }: PriceListsOptionsType) => (\n          <PriceListsOptions row={row} />\n        ),\n      },\n    ],\n    [priceListsData]\n  );\n\n  const existingPriceListItems = useMemo<\n    Array<OptionType<ITEPortal_Domain_Dto_AdminPriceListItem>>\n  >(() => {\n    return priceListsData.map((pi) => ({\n      value: pi.id,\n      label: pi.name,\n      meta: pi,\n    }));\n  }, [priceListsData]);\n\n  const showPriceList = async (value: OptionType) => {\n    setCurrency(value);\n\n    const priceListId = priceLists.find(\n      (priceList: PriceListType) => priceList?.currencyId === value?.value\n    )?.priceListId;\n\n    setSelectedPriceId(priceListId);\n\n    if (priceListId) {\n      setIsLoading(true);\n      try {\n        const data =\n          await typedAxios.priceListItem.getExhibitionsPriceListsItems({\n            exhibitionId: +exhibitionId,\n            priceListId,\n          });\n\n        setPriceListsData(data);\n      } catch (error) {\n        console.log(error);\n      } finally {\n        setIsLoading(false);\n      }\n    }\n\n    if (!priceListId) {\n      setPriceListsData([]);\n    }\n  };\n\n  const deletePriceList = async () => {\n    try {\n      setIsLoading(true);\n      await fetchApi(DELETE_PRICE_LIST(exhibitionId, selectedPriceId), {\n        method: FetchMethods.Delete,\n      });\n\n      closeModal();\n      setEditData(defaultValues);\n      setEditTableData(null);\n      await showPriceList(currency);\n    } finally {\n      setIsLoading(false);\n    }\n  };\n\n  const showImportModal = () => {\n    ModalFactory.show({\n      title: t('bitrixImport'),\n      Component: () => <Box>{t('import-from-bitrix-message')}</Box>,\n      okLabel: t('importButton'),\n      onOk: async () => {\n        try {\n          setIsLoading(true);\n          const pricelists = await typedAxios.bitrix.postBitrixPriceList({\n            exhibitionId: +exhibitionId,\n          });\n\n          ModalFactory.close();\n\n          if (pricelists?.length === 0) {\n            toast.success(t('pricelist-is-empty'));\n          } else {\n            setPriceLists(pricelists);\n            toast.success(t('pricelist-import-success'));\n          }\n        } catch {\n          toast.error(t('error-occurred'));\n        } finally {\n          setIsLoading(false);\n        }\n      },\n    });\n  };\n\n  const deletePriceListFunc = deleteAll ? deletePriceList : deleteRow;\n\n  return (\n    <Box minH=\"300px\">\n      <FormProvider {...useForm()}>\n        <Flex\n          flexDirection=\"row\"\n          justifyContent=\"space-between\"\n          alignItems=\"center\"\n        >\n          <SelectComponent\n            label={useNameTranslate('select-currency')}\n            options={[{ label: 'Выбрать...', value: '' }, ...currencyOptions]}\n            name=\"currency\"\n            maxWidth=\"360px\"\n            minWidth=\"360px\"\n            onClear={() => setPriceListsData([])}\n            onChange={(value) => {\n              showPriceList(value);\n            }}\n          />\n          {!currency?.['value'] && eventEditionId && (\n            <ButtonContainer>\n              <Button colorScheme=\"red\" onClick={showImportModal}>\n                + {t('bitrixImport')}\n              </Button>\n            </ButtonContainer>\n          )}\n        </Flex>\n      </FormProvider>\n      {currency?.['value'] && (\n        <>\n          <SelectedPriceWrapper>\n            <SelectedPriceContainer>\n              {`${t('price-list')} ${currency?.['label']}`}\n              <Link onClick={deletePriceModalShow}>\n                <DeleteIcon paddingRight=\"5px\" boxSize={5} />\n                {t('delete-price')}\n              </Link>\n            </SelectedPriceContainer>\n            <Divider />\n          </SelectedPriceWrapper>\n          <PriceListsToolbar />\n          {isLoading ? (\n            <LoaderWrapper>\n              <Loader />\n            </LoaderWrapper>\n          ) : (\n            <Card>\n              <DeleteModal\n                onSubmit={deletePriceListFunc}\n                isOpen={openDeletePriceListItem}\n                onClose={closeDeletePriceListItemModal}\n              />\n              <Table columns={priceListsColumns} data={priceListsData} />\n              {openConfirm && (\n                <EditPriceListItemForm\n                  openConfirm={openConfirm}\n                  closeModal={closeModal}\n                  editTableData={editTableData}\n                  priceListId={selectedPriceId}\n                  currency={currency}\n                  reloadPriceList={showPriceList}\n                  existingPriceListItems={existingPriceListItems}\n                />\n              )}\n              <ImportCSVModal />\n            </Card>\n          )}\n        </>\n      )}\n    </Box>\n  );\n};\n","import { ITEPortal_Domain_Dto_AdminPriceListItem } from '@/api';\nimport React, { Fragment, useMemo } from 'react';\nimport { Badge, Flex, Tooltip, Text, TooltipProps } from '@chakra-ui/react';\n\ntype TableIncludedPriceListItemsBadge = {\n  includedPriceListItems: ITEPortal_Domain_Dto_AdminPriceListItem['includedPriceListItems'];\n  source: ITEPortal_Domain_Dto_AdminPriceListItem[];\n};\n\nexport const TableIncludedPriceListItemsBadge = (\n  props: TableIncludedPriceListItemsBadge\n) => {\n  const threshold = 5;\n  const { includedPriceListItems, source } = props;\n\n  const itemsWithDisplayName = useMemo(() => {\n    if (!includedPriceListItems || includedPriceListItems.length === 0) {\n      return [];\n    }\n\n    return (\n      includedPriceListItems?.map((ipi) => {\n        return {\n          ...ipi,\n          displayName:\n            source.find((pi) => pi.id === ipi.includedPricelistItemId)?.name ||\n            ipi.includedPricelistItemId,\n        };\n      }) || []\n    );\n  }, [includedPriceListItems, source]);\n\n  if (!itemsWithDisplayName || !itemsWithDisplayName.length) {\n    return <>-</>;\n  }\n\n  const total = itemsWithDisplayName.length;\n  const tailLength = total - threshold;\n  const TooltipWrapper = total >= threshold ? Tooltip : Fragment;\n  let tooltipProps: Omit<TooltipProps, 'children'> = {};\n\n  if (TooltipWrapper === Tooltip) {\n    tooltipProps = {\n      label: itemsWithDisplayName\n        .map((pi) => `${pi.displayName} (${pi.quantity})`)\n        .join(', '),\n      placement: 'top',\n      hasArrow: true,\n      openDelay: 500,\n      width: 'fit-content',\n    };\n  }\n\n  return (\n    <TooltipWrapper {...tooltipProps}>\n      <Flex\n        flexDirection=\"row\"\n        flexWrap=\"wrap\"\n        gap={1}\n        alignItems=\"center\"\n        cursor={tailLength > 0 ? 'help' : undefined}\n        width=\"fit-content\"\n      >\n        {itemsWithDisplayName.slice(0, threshold).map((bt, i) => (\n          <Badge fontSize=\"0.7em\" key={i}>\n            {bt.displayName || bt.includedPricelistItemId} ({bt.quantity})\n          </Badge>\n        ))}{' '}\n        {tailLength > 0 && <Text fontSize=\"0.7em\">+{tailLength} </Text>}\n      </Flex>\n    </TooltipWrapper>\n  );\n};\n","import React, { useCallback } from 'react';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { useTranslation } from 'react-i18next';\nimport { UseFormReturn } from 'react-hook-form';\nimport { ApiError } from '@/api';\nimport { toast } from 'react-toastify';\nimport {\n  ImportExhibitionForm,\n  ValidationSchemaType,\n} from '@/pages/AdminPanel/Exhibitions/ImportExhibitionForm';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useNavigate } from '@tanstack/react-router';\nimport { OptionType } from '@/model/common';\n\ntype TechnicalManagersType = OptionType & {\n  label: string;\n  meta?: {\n    contactId: string | null;\n  };\n};\n\nexport const useExportExhibition = () => {\n  const { t } = useTranslation();\n  const queryClient = new QueryClient();\n  const navigate = useNavigate();\n\n  const saveExhibition = async (values: ValidationSchemaType) => {\n    const withoutContactIdManagers: string[] = [];\n\n    if (values?.technicalManagers?.length > 0) {\n      values?.technicalManagers?.forEach((value: TechnicalManagersType) => {\n        if (value?.meta?.contactId === null && value.label) {\n          withoutContactIdManagers.push(value.label);\n        }\n      });\n    }\n\n    if (withoutContactIdManagers.length > 0) {\n      toast.error(\n        `${t('managers-without-contact-id')} ${withoutContactIdManagers.join(\n          '\\n'\n        )}`\n      );\n\n      return;\n    }\n\n    const technicalManagers = values?.technicalManagers?.map(\n      (manager) => manager?.value\n    );\n\n    try {\n      const exhibitionId = await typedAxios.bitrix.postBitrixExhibition({\n        eventEditionId: values?.exhibition?.value,\n        requestBody: technicalManagers,\n      });\n\n      ModalFactory.close();\n      toast.success(t('exhibition-import-success'));\n\n      navigate({\n        to: `/admin/exhibitions/${exhibitionId}/edit`,\n      });\n    } catch (e) {\n      if (e instanceof ApiError) {\n        const message = e.body;\n\n        if (message && typeof message === 'string') {\n          toast.error(message);\n        } else {\n          toast.error(t('error-occurred'));\n        }\n      }\n    }\n  };\n\n  const openImportModal = useCallback(() => {\n    ModalFactory.show({\n      title: t('importExhibition'),\n      Component: () => (\n        <QueryClientProvider client={queryClient}>\n          <ImportExhibitionForm />\n        </QueryClientProvider>\n      ),\n      okLabel: t('importButton'),\n      onOk: async (ctx: UseFormReturn<ValidationSchemaType>) => {\n        return ctx.handleSubmit(() => saveExhibition(ctx.getValues()))();\n      },\n    });\n  }, []);\n\n  return {\n    openImportModal,\n  };\n};\n","import * as v from 'zod';\nimport dayjs from 'dayjs';\nimport i18n from '../../../i18n';\n\nexport const ValidationSchema = v\n  .object({\n    'name': v.string().min(1, { message: 'Name field is required' }),\n    'description': v.string().nullable(),\n    'logoUrl': v.string().optional().nullable(),\n    'startDate': v.coerce.date(),\n    'endDate': v.coerce.date(),\n    'place': v.string().min(1, { message: 'Place field is required' }),\n    'technicalManagers': v\n      .array(\n        v.object({\n          value: v.string(),\n          label: v.string(),\n        })\n      )\n      .min(1, { message: 'At least one manager is required' }),\n    'firstMargin': v.coerce.number(),\n    'firstMarginDate': v.coerce.date(),\n    'secondMargin': v.coerce.number().gt(0),\n    'secondMarginDate': v.coerce.date(),\n    'thirdMargin': v.coerce.number().gt(0),\n    'thirdMarginDate': v.coerce.date(),\n    'orderCreationLastDate': v.coerce.date().optional().nullable(),\n    'upload-image': v.array(v.instanceof(File)).optional(),\n  })\n  .refine(\n    (data) => {\n      if (!data.firstMarginDate || !data.secondMarginDate) {\n        return true;\n      }\n\n      const firstMargin = dayjs(data.firstMarginDate);\n      const secondMarginDate = dayjs(data.secondMarginDate);\n\n      return firstMargin.isBefore(secondMarginDate);\n    },\n    {\n      path: ['secondMarginDate'],\n      message: i18n.t('first-margin-before second-margin'),\n    }\n  )\n  .refine(\n    (data) => {\n      if (!data.secondMarginDate || !data.thirdMarginDate) {\n        return true;\n      }\n\n      const secondMarginDate = dayjs(data.secondMarginDate);\n      const thirdMarginDate = dayjs(data.thirdMarginDate);\n\n      return secondMarginDate.isBefore(thirdMarginDate);\n    },\n    {\n      path: ['thirdMarginDate'],\n      message: i18n.t('second-margin-before third-margin'),\n    }\n  )\n  .refine(\n    (data) => {\n      if (!data.startDate || !data.endDate) {\n        return true;\n      }\n\n      const startDate = dayjs(data.startDate);\n      const endDate = dayjs(data.endDate);\n\n      return startDate.isBefore(endDate);\n    },\n    {\n      path: ['startDate'],\n      message: i18n.t('exhibition-start-date-error'),\n    }\n  )\n  .refine(\n    (data) => {\n      if (!data.orderCreationLastDate) {\n        return true;\n      }\n\n      const startDate = dayjs(data.startDate);\n      const endDate = dayjs(data.endDate);\n      const orderCreationLastDate = dayjs(data.orderCreationLastDate);\n\n      // Validate if orderCreationLastDate is after endDate\n      if (orderCreationLastDate.isAfter(endDate)) {\n        return false;\n      }\n\n      // Validate if orderCreationLastDate is before startDate\n      if (orderCreationLastDate.isBefore(startDate)) {\n        return false;\n      }\n\n      return true;\n    },\n    {\n      path: ['orderCreationLastDate'],\n      message: i18n.t('order-creation-last-date-error'),\n    }\n  )\n  .transform((data) => ({\n    ...data,\n    startDate: new Date(data.startDate),\n    endDate: new Date(data.endDate),\n    firstMarginDate: new Date(data.firstMarginDate),\n    secondMarginDate: new Date(data.secondMarginDate),\n    thirdMarginDate: new Date(data.thirdMarginDate),\n    orderCreationLastDate: data.orderCreationLastDate\n      ? new Date(data.orderCreationLastDate)\n      : null,\n  }));\n\nexport type FormValues = v.infer<typeof ValidationSchema>;\n","import { FieldValues, useForm, FormProvider } from 'react-hook-form';\nimport {\n  ButtonGroup,\n  FormControl,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Stack,\n} from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport Input from '@/components/Fields/Input';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { t } from 'i18next';\nimport fetchApi from '@/utils/fetchAPI';\nimport { EDIT_MEMBERS } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { toast } from 'react-toastify';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ninterface AddBuildingTypeProductProps {\n  openConfirm: boolean;\n  closeModal: () => void;\n  refresh: () => void;\n  editData: any;\n}\n\nexport const EditMemberForm = ({\n  openConfirm,\n  closeModal,\n  refresh,\n  editData,\n}: AddBuildingTypeProductProps) => {\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const methods = useForm({\n    mode: 'onBlur',\n  });\n\n  useEffect(() => {\n    Object.keys(editData).forEach((field) => {\n      methods.setValue(field, editData[field]);\n    });\n  }, [editData]);\n\n  const submitHandler = async (values: FieldValues) => {\n    const formData = {\n      name: values?.name,\n    };\n\n    try {\n      setIsSubmitting(true);\n      await fetchApi(EDIT_MEMBERS(values?.id), {\n        method: FetchMethods.Put,\n        data: formData,\n      });\n\n      closeModal();\n      refresh();\n    } catch (error: any) {\n      const fieldErrors = error?.response?.data?.errors;\n\n      if (fieldErrors) {\n        toast.error(fieldErrors);\n      }\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <Modal isOpen={openConfirm} onClose={closeModal} size=\"xl\" isCentered>\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{useNameTranslate('edit-company')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>\n          <FormProvider {...methods}>\n            <form>\n              <Stack spacing=\"5\">\n                <FormControlWrapper>\n                  <Input\n                    label={useNameTranslate('username')}\n                    maxWidth=\"100%\"\n                    defaultValue={editData?.['name']}\n                    name=\"name\"\n                    isRequired\n                  />\n                </FormControlWrapper>\n              </Stack>\n            </form>\n          </FormProvider>\n        </ModalBody>\n        <ModalFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <OrderButton\n              colorScheme=\"red\"\n              onClick={methods.handleSubmit(submitHandler)}\n              disabled={isSubmitting}\n            >\n              {t('save')}\n            </OrderButton>\n            <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n              {t('cancel')}\n            </OrderButton>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import { ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto } from '@/api';\nimport { Row } from 'react-table';\nimport { Flex } from '@chakra-ui/react';\nimport { DeleteIcon, EditIcon } from '@chakra-ui/icons';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { typedAxios } from '@/api/typed-axios';\nimport i18n from '@/i18n';\nimport { toast } from 'react-toastify';\nimport { useRouter } from '@tanstack/react-router';\nimport { useSaveEmployee } from '@/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers/hooks/use-save-employee';\n\nexport const UsersTableActions = (props: {\n  row: Row<ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto>;\n}) => {\n  const { row } = props;\n  const router = useRouter();\n  const { openForm } = useSaveEmployee();\n  const confirmRemoveUserFromExhibition = () => {\n    ModalFactory.confirm({\n      Component: () => <>{i18n.t('remove-employee')}</>,\n      onOk: async () => {\n        if (row.original.employeeId) {\n          try {\n            await typedAxios.exhibitor.deleteExhibitorsEmployees({\n              employeeId: row.original.employeeId,\n            });\n\n            router.invalidate();\n\n            ModalFactory.close();\n\n            toast.success(i18n.t('employee-removed'));\n          } catch {\n            toast.error(i18n.t('error-occurred'));\n          }\n        }\n      },\n    });\n  };\n\n  return (\n    <Flex\n      flexDir=\"row\"\n      gap=\"10px\"\n      alignItems=\"center\"\n      justifyContent=\"flex-end\"\n    >\n      <EditIcon onClick={() => openForm(row.original)} />\n      <DeleteIcon onClick={confirmRemoveUserFromExhibition} />\n    </Flex>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useEffect } from 'react';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { Stack } from '@chakra-ui/react';\nimport Input from '@/components/Fields/Input';\nimport { useTranslation } from 'react-i18next';\nimport { type ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto } from '@/api';\nimport {\n  EmployeeFormValues,\n  EmployeeFormSchema,\n} from '@/pages/AdminPanel/PersonalAccounts/UsersTab/types';\n\nexport const AddNewEmployeeForm = (props: {\n  model?: ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto;\n}) => {\n  const { model } = props;\n  const { t } = useTranslation();\n  const instance = useForm<EmployeeFormValues>({\n    resolver: zodResolver(EmployeeFormSchema),\n    mode: 'onChange',\n  });\n\n  useEffect(() => {\n    ModalFactory.updateContext(instance);\n  }, [instance]);\n\n  useEffect(() => {\n    if (model && model.email && model.name) {\n      instance.reset({\n        id: model.employeeId,\n        email: model.email,\n        name: model.name,\n        phoneNumber: model.phoneNumber,\n      });\n    } else {\n      instance.reset({\n        name: '',\n      });\n    }\n  }, [model]);\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing={4}>\n        <Input<EmployeeFormValues>\n          name=\"email\"\n          placeholder={t('employee-email')}\n          maxWidth=\"unset\"\n        />\n        <Input<EmployeeFormValues>\n          name=\"name\"\n          label={t('employee-name')}\n          maxWidth=\"unset\"\n        />\n        <Input<EmployeeFormValues>\n          name=\"phoneNumber\"\n          type=\"tel\"\n          label={t('phone')}\n          maxWidth=\"unset\"\n        />\n      </Stack>\n    </FormProvider>\n  );\n};\n","import { UsersTableActions } from './Actions';\nimport { Column } from 'react-table';\nimport { ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto } from '@/api';\nimport { viewExhibitorRoute } from '@/features/Routing/protected/member-directory';\nimport { Table } from '@/components/Table/Table';\nimport { Card } from '@/components/Card/Card';\nimport { Button, Flex } from '@chakra-ui/react';\nimport i18n from '@/i18n';\nimport { useSaveEmployee } from '@/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers/hooks/use-save-employee';\nimport dayjs from 'dayjs';\n\nconst columns = [\n  {\n    Header: i18n.t('employee-name'),\n    accessor: 'name',\n  },\n  {\n    Header: 'Email',\n    accessor: 'email',\n  },\n  {\n    Header: i18n.t('phone-number'),\n    accessor: 'phoneNumber',\n  },\n  {\n    Header: i18n.t('creation-date'),\n    accessor: 'createdDate',\n    Cell: ({ value }) => {\n      if (value && dayjs(value).isValid()) {\n        return <>{dayjs(value).format('DD.MM.YYYY')}</>;\n      }\n\n      return <>-</>;\n    },\n  },\n  {\n    Header: i18n.t('last-visit-date'),\n    accessor: 'lastVisitDate',\n    Cell: ({ value }) => {\n      console.log(dayjs(value).isValid(), value);\n      if (value && dayjs(value).isValid()) {\n        return <>{dayjs(value).format('DD.MM.YYYY')}</>;\n      }\n\n      return <>-</>;\n    },\n  },\n  {\n    id: 'actions',\n    width: 90,\n    Cell: ({ row }) => {\n      return <UsersTableActions row={row} />;\n    },\n  },\n] satisfies Array<\n  Column<ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto>\n>;\n\nexport const ManageExhibitorUsers = () => {\n  const { exhibitor } = viewExhibitorRoute.useLoaderData();\n  const { openForm } = useSaveEmployee();\n\n  return (\n    <Flex direction=\"column\" gap={4}>\n      <Button ml=\"auto\" onClick={() => openForm()}>\n        + {i18n.t('add-employee')}\n      </Button>\n      <Card>\n        <Table columns={columns} data={exhibitor.exhibitorEmployees || []} />\n      </Card>\n    </Flex>\n  );\n};\n","import { ModalFactory } from '@/components/Modal/api';\nimport i18n from '@/i18n';\nimport { AddNewEmployeeForm } from '@/pages/AdminPanel/MembersDirectory/ManageExhibitorUsers/AddNewEmployeeForm';\nimport { UseFormReturn } from 'react-hook-form';\nimport { EmployeeFormValues } from '@/pages/AdminPanel/PersonalAccounts/UsersTab/types';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\nimport { ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto } from '@/api';\nimport { useRouter } from '@tanstack/react-router';\nimport { viewExhibitorRoute } from '@/features/Routing/protected/member-directory';\n\nexport const useSaveEmployee = () => {\n  const router = useRouter();\n  const { exhibitorId } = viewExhibitorRoute.useParams();\n\n  const openForm = (\n    model?: ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto\n  ) => {\n    ModalFactory.show({\n      title: model ? i18n.t('edit-employee') : i18n.t('add-employee'),\n      Component: () => <AddNewEmployeeForm model={model} />,\n      okLabel: i18n.t('save'),\n      onOk: async (ctx: UseFormReturn<EmployeeFormValues>) => {\n        const isValid = await ctx.trigger();\n\n        if (!isValid) {\n          return;\n        }\n\n        const values = ctx.getValues();\n\n        try {\n          if (model && model.employeeId) {\n            await typedAxios.exhibitor.putExhibitorsEmployees({\n              employeeId: model.employeeId,\n              requestBody: values,\n            });\n          } else {\n            await typedAxios.exhibitor.postExhibitorsEmployees({\n              exhibitorId: +exhibitorId,\n              requestBody: values,\n            });\n          }\n\n          router.invalidate();\n\n          ModalFactory.close();\n        } catch {\n          toast.error(i18n.t('error-occurred'));\n        }\n      },\n    });\n  };\n\n  return { openForm };\n};\n","import React, { useState } from 'react';\nimport { Table } from '@/components/Table/Table';\nimport { useTranslation } from 'react-i18next';\nimport { Card } from '@/components/Card/Card';\nimport { EditIcon } from '@chakra-ui/icons';\nimport { Flex } from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { Column, Row } from 'react-table';\nimport { MEMBERS } from '@/constants/endpoints';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport Pagination from '@/components/Table/Pagination';\nimport { EditMemberForm } from '@/pages/AdminPanel/MembersDirectory/EditMemberForm';\nimport { FieldValues } from 'react-hook-form';\nimport dayjs from 'dayjs';\nimport { useTableLoader } from '@/components/Table/useTableLoader';\nimport { UsersIcon } from '@/components/Icons/Users';\nimport { type ITEPortal_Domain_Dto_CatalogExhibitorSummary } from '@/api';\nimport { Link } from '@tanstack/react-router';\n\nconst OptionWrapper = styled(Flex)`\n  flex-direction: row;\n  align-items: center;\n  gap: 20px;\n`;\n\ninterface ExhibitionOptionsType {\n  row: Row<ITEPortal_Domain_Dto_CatalogExhibitorSummary>;\n}\n\nconst defaultValues = {\n  id: null,\n  name: null,\n  email: null,\n};\n\nexport const MembersDirectory = (): JSX.Element => {\n  const { t } = useTranslation();\n  const [openConfirmEditMember, setOpenConfirmEditMember] = useState(false);\n  const [editData, setEditData] = useState<FieldValues>(defaultValues);\n\n  const {\n    data,\n    isLoading,\n    onPageSizeChange,\n    onPageChange,\n    paginationInfo,\n    refresh,\n  } = useTableLoader<ITEPortal_Domain_Dto_CatalogExhibitorSummary>({\n    resource: MEMBERS,\n  });\n\n  const closeModalEditMember = () => setOpenConfirmEditMember(false);\n\n  const ExhibitionOptions = ({ row }: ExhibitionOptionsType) => {\n    return (\n      <OptionWrapper>\n        <Link to={`/admin/member-directory/${row.original.id}`}>\n          <UsersIcon />\n        </Link>\n\n        <EditIcon onClick={() => editUser(row)} />\n      </OptionWrapper>\n    );\n  };\n\n  const editUser = (values: FieldValues) => {\n    const editValues = values?.values;\n\n    setEditData(editValues);\n    setOpenConfirmEditMember(!openConfirmEditMember);\n  };\n\n  const exhibitionColumns = React.useMemo<\n    Array<Column<ITEPortal_Domain_Dto_CatalogExhibitorSummary>>\n  >(\n    () => [\n      {\n        Header: `ID`,\n        accessor: 'id',\n        width: '10%',\n      },\n      {\n        Header: `${t('participant-name')}`,\n        accessor: 'name',\n        width: '30%',\n      },\n      {\n        Header: `${t('create-date')}`,\n        accessor: 'createdDate',\n        Cell: ({ row: { values } }) => (\n          <>\n            {values?.createdDate\n              ? dayjs(values?.createdDate).format('DD.MM.YYYY')\n              : ''}\n          </>\n        ),\n      },\n      {\n        Header: `${t('last-modified-date')}`,\n        accessor: 'lastModifiedDate',\n        Cell: ({ row: { values } }) => (\n          <>\n            {values?.lastModifiedDate\n              ? dayjs(values?.lastModifiedDate).format('DD.MM.YYYY')\n              : ''}\n          </>\n        ),\n      },\n      {\n        Header: `${t('phone-number')}`,\n        accessor: 'phoneNumber',\n      },\n      {\n        Header: '',\n        id: 'options',\n        width: '3%',\n        Cell: ({ row }) => <ExhibitionOptions row={row} />,\n      },\n    ],\n    []\n  );\n\n  return (\n    <LoaderWrapper loading={isLoading}>\n      <Card>\n        <Table columns={exhibitionColumns} data={data} />\n        <EditMemberForm\n          openConfirm={openConfirmEditMember}\n          closeModal={closeModalEditMember}\n          refresh={refresh}\n          editData={editData}\n        />\n        <Pagination\n          setPageNumber={onPageChange}\n          setPageSize={onPageSizeChange}\n          paginationInfo={paginationInfo}\n        />\n      </Card>\n    </LoaderWrapper>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { Button, ButtonGroup, Stack, useBoolean } from '@chakra-ui/react';\nimport Input from '@/components/Fields/Input';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { useNavigate, useParams } from '@tanstack/react-router';\nimport {\n  addExhibitionAccountRoute,\n  editExhibitionAccountRoute,\n} from '@/features/Routing/protected/admin-exhibitions';\nimport {\n  CompanyFormSchemaType,\n  NewCompanyFormSchema,\n  UpdateCompanyFormSchema,\n} from '@/pages/AdminPanel/PersonalAccounts/MainInfoTab/types';\nimport {\n  FormControlWrapper,\n  ParticipantCheckContainer,\n  ParticipantCheckWrapper,\n} from '@/pages/AdminPanel/PersonalAccounts/MainInfoTab/styled';\nimport { useSearchCompanyByEmployee } from '@/pages/AdminPanel/PersonalAccounts/MainInfoTab/hooks/use-search-company-by-employee';\nimport { useCompanySave } from '@/pages/AdminPanel/PersonalAccounts/MainInfoTab/hooks/use-company-save';\nimport { useTranslation } from 'react-i18next';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useSuspenseQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { Checkbox } from '@/components/Fields/Checkbox';\nimport { isNil } from '@/utils/is-nil';\nimport { AsyncButton } from '@/components/AsyncButton';\nimport { OptionType } from '@/model/common';\nimport { ITEPortal_Domain_Dto_CatalogExhibitorSummary } from '@/api';\n\ninterface MainInfoProps {\n  type: string;\n}\n\nexport const MainInfo = ({ type }: MainInfoProps): JSX.Element => {\n  const editForm = type === 'edit';\n  const { t } = useTranslation();\n  const { exhibitionId, accountId } = useParams({ strict: false });\n  const formInstance = useForm<CompanyFormSchemaType>({\n    resolver: zodResolver(\n      editForm ? UpdateCompanyFormSchema : NewCompanyFormSchema\n    ),\n  });\n  const isAgentSelectedForExhibitor = formInstance.watch('agent');\n  const navigate = useNavigate();\n  const [selectedCompanyOption, setSelectedCompany] =\n    useState<OptionType<ITEPortal_Domain_Dto_CatalogExhibitorSummary> | null>(\n      null\n    );\n  const { technicalManagers, offices, companies, agents, currencyOptions } = (\n    editForm ? editExhibitionAccountRoute : addExhibitionAccountRoute\n  ).useLoaderData();\n\n  const { data: accountData } = useSuspenseQuery(\n    QueryOptions.exhibitorQueryOptions({\n      exhibitionId: +exhibitionId,\n      exhibitorId: accountId ? +accountId : undefined,\n    })\n  );\n\n  const [isAgentCreating, isAgentCreatingApi] = useBoolean(\n    isNil(accountData.isAgent) ? false : accountData.isAgent\n  );\n\n  useEffect(\n    function watchFormToToggleUXFlags() {\n      formInstance.watch((value, { name }) => {\n        if (name === 'isAgent') {\n          isAgentCreatingApi[value.isAgent ? 'on' : 'off']();\n        }\n\n        if (name === 'companyName') {\n          setSelectedCompany(\n            // @ts-expect-error update types\n            value.companyName || null\n          );\n        }\n      });\n    },\n    [formInstance]\n  );\n\n  const { findCompanyByEmployee, isCompanyFoundByEmployee } =\n    useSearchCompanyByEmployee(formInstance);\n  const { saveCompany } = useCompanySave(formInstance);\n\n  useEffect(\n    function setValuesFromLoadedModel() {\n      formInstance.reset({\n        id: accountData.id,\n        phoneNumber: accountData.phoneNumber || undefined,\n        // @ts-expect-error desc\n        sellingOfficeId: offices.find(\n          (officeOption) => officeOption?.value === accountData.sellingOfficeId\n        ),\n        // @ts-expect-error desc\n        technicalManagerEmail: technicalManagers.find(\n          (managerOption) =>\n            managerOption?.value === accountData.technicalManagerEmail\n        ),\n        currencyId: currencyOptions.find(\n          (currencyOption) => currencyOption?.value === accountData.currencyId\n        ),\n        isAgent: accountData.isAgent,\n        agent: accountData.agent\n          ? {\n              value: accountData.agent.id,\n              label: accountData.agent.name,\n              // @ts-expect-error update types\n              meta: accountData,\n            }\n          : undefined,\n      });\n    },\n    [accountData]\n  );\n\n  const toAccounts = () => {\n    navigate({\n      to: '/admin/exhibitions/$exhibitionId/view/personal-accounts',\n      replace: true,\n      params: {\n        exhibitionId,\n      },\n    });\n  };\n\n  useEffect(\n    function toggleFormIsAgentCheckboxBasedOnSelectedCompany() {\n      if (editForm) {\n        return;\n      }\n\n      if (selectedCompanyOption?.meta) {\n        formInstance.setValue('isAgent', selectedCompanyOption.meta.isAgent);\n      } else if (!selectedCompanyOption) {\n        formInstance.setValue('isAgent', false);\n      }\n    },\n    [selectedCompanyOption]\n  );\n\n  const isAgentCheckboxDisabled = useMemo(() => {\n    if (editForm) {\n      return true;\n    }\n\n    if (isCompanyFoundByEmployee) {\n      return true;\n    }\n\n    if (selectedCompanyOption) {\n      return !selectedCompanyOption.__isNew__;\n    }\n\n    if (isAgentSelectedForExhibitor && isAgentSelectedForExhibitor.value) {\n      return true;\n    }\n\n    return false;\n  }, [\n    editForm,\n    isCompanyFoundByEmployee,\n    selectedCompanyOption,\n    isAgentSelectedForExhibitor,\n  ]);\n\n  const filteredCompanies = useMemo(() => {\n    if (isAgentCreating) {\n      return companies.filter((opt) => opt.meta?.isAgent);\n    }\n\n    if (isAgentSelectedForExhibitor) {\n      return companies.filter((opt) => !opt.meta?.isAgent);\n    }\n\n    return companies;\n  }, [companies, isAgentCreating, isAgentSelectedForExhibitor]);\n\n  return (\n    <FormProvider {...formInstance}>\n      <form onSubmit={formInstance.handleSubmit(saveCompany)}>\n        <Stack spacing=\"5\">\n          <FormControlWrapper>\n            {!editForm && (\n              <ParticipantCheckWrapper isRequired>\n                <FormLabel>{t('participant-email')}</FormLabel>\n                <ParticipantCheckContainer>\n                  <Input<CompanyFormSchemaType>\n                    maxWidth=\"100%\"\n                    name=\"employeeEmail\"\n                    disabled={editForm}\n                    isRequired\n                  >\n                    <AsyncButton\n                      colorScheme=\"red\"\n                      type=\"button\"\n                      onClick={findCompanyByEmployee}\n                      disabled={editForm}\n                      minW=\"fit-content\"\n                    >\n                      {t('find-company-by-employee')}\n                    </AsyncButton>\n                  </Input>\n                </ParticipantCheckContainer>\n              </ParticipantCheckWrapper>\n            )}\n\n            {!editForm && (\n              <Input<CompanyFormSchemaType>\n                label={t('employee-name')}\n                maxWidth=\"unset\"\n                name=\"employeeName\"\n                isRequired\n              />\n            )}\n\n            {editForm ? (\n              <>\n                <Input<CompanyFormSchemaType>\n                  label={t('company')}\n                  name=\"companyName\"\n                  maxWidth=\"unset\"\n                  value={accountData.name || undefined}\n                  disabled\n                />\n              </>\n            ) : (\n              <SelectComponent<CompanyFormSchemaType>\n                name=\"companyName\"\n                allowCreate\n                isRequired\n                disabled={isCompanyFoundByEmployee}\n                label={t('company')}\n                options={filteredCompanies}\n              />\n            )}\n            <Checkbox<CompanyFormSchemaType>\n              name=\"isAgent\"\n              isDisabled={isAgentCheckboxDisabled}\n            >\n              {t('agent')}\n            </Checkbox>\n            <SelectComponent<CompanyFormSchemaType>\n              label={t('sales-office')}\n              options={offices}\n              name=\"sellingOfficeId\"\n            />\n            <SelectComponent<CompanyFormSchemaType>\n              label={t('technical-managers')}\n              options={technicalManagers}\n              isRequired\n              name=\"technicalManagerEmail\"\n            />\n            <SelectComponent<CompanyFormSchemaType>\n              label={t('currency')}\n              options={currencyOptions}\n              isRequired\n              name=\"currencyId\"\n            />\n            <Input<CompanyFormSchemaType>\n              label={t('phone')}\n              maxWidth=\"unset\"\n              name=\"phoneNumber\"\n            />\n            <SelectComponent<CompanyFormSchemaType>\n              label={t('choose-agent')}\n              options={agents}\n              disabled={isAgentCreating}\n              name=\"agent\"\n            />\n          </FormControlWrapper>\n          <ButtonGroup gap=\"1\">\n            <Button\n              colorScheme=\"red\"\n              type=\"submit\"\n              isDisabled={formInstance.formState.isSubmitting}\n              isLoading={formInstance.formState.isSubmitting}\n            >\n              {t('save')}\n            </Button>\n            <Button\n              colorScheme=\"secondary\"\n              type=\"reset\"\n              onClick={toAccounts}\n              isDisabled={formInstance.formState.isSubmitting}\n            >\n              {t('cancel')}\n            </Button>\n          </ButtonGroup>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import { CompanyFormSchemaType } from '@/pages/AdminPanel/PersonalAccounts/MainInfoTab/types';\nimport { useFormErrorsHandler } from '@/hooks/useFormErrorsHandler';\nimport { useNavigate, useParams } from '@tanstack/react-router';\nimport { UseFormReturn } from 'react-hook-form';\nimport { typedAxios } from '@/api/typed-axios';\nimport { ApiError, ITEPortal_Domain_Dto_CreateExhibitorDto } from '@/api';\nimport { isNil } from '@/utils/is-nil';\nimport { toast } from 'react-toastify';\nimport i18n from '@/i18n';\nimport { queryClient } from '@/features/query';\nimport { QueryOptions } from '@/features/query/query-options';\n\nexport const useCompanySave = (\n  formInstance: UseFormReturn<CompanyFormSchemaType>\n) => {\n  const { processErrorsArray } = useFormErrorsHandler(formInstance);\n  const { exhibitionId } = useParams({ strict: false });\n  const navigate = useNavigate();\n\n  const saveCompany = async (values: CompanyFormSchemaType) => {\n    const id = values.id;\n    const isEdit = !isNil(id);\n\n    try {\n      if (isEdit && !isNil(id)) {\n        await typedAxios.exhibitor.putExhibitors({\n          id: id,\n          requestBody: {\n            phoneNumber: values.phoneNumber,\n            sellingOfficeId: +values.sellingOfficeId.value,\n            agentId: values.agent?.value || null,\n            exhibitionId: +exhibitionId,\n            technicalManagerEmail: values.technicalManagerEmail?.value,\n            currencyId: +values.currencyId.value,\n          },\n        });\n\n        await queryClient.refetchQueries({\n          queryKey: QueryOptions.exhibitorQueryOptions({\n            exhibitionId: +exhibitionId,\n            exhibitorId: id,\n          }).queryKey,\n        });\n      } else {\n        const body: ITEPortal_Domain_Dto_CreateExhibitorDto = {\n          exhibitionId: +exhibitionId,\n          currencyId: +values.currencyId.value,\n          sellingOfficeId: +values.sellingOfficeId.value,\n          technicalManagerEmail: values.technicalManagerEmail.value,\n          exhibitorEmployees: [\n            {\n              exhibitionId: +exhibitionId,\n              name: values.employeeName,\n              email: values.employeeEmail,\n            },\n          ],\n          phoneNumber: values.phoneNumber,\n          isAgent: !isNil(values.isAgent) ? values.isAgent : undefined,\n          agentId: values.agent?.value || null,\n        };\n\n        if (values.companyName.__isNew__) {\n          body.name = values.companyName.value;\n        } else {\n          body.exhibitorId = +values.companyName.value;\n          body.name = values.companyName.label;\n        }\n\n        const savedId = await typedAxios.exhibitor.postExhibitors({\n          requestBody: body,\n        });\n\n        navigate({\n          to: `/admin/exhibitions/${exhibitionId}/view/personal-accounts/${savedId}/edit`,\n          replace: true,\n        });\n      }\n\n      toast.success(i18n.t('saved'));\n    } catch (error: any) {\n      processErrorsArray(error);\n      console.dir(error);\n\n      if (error instanceof ApiError && typeof error.body === 'string') {\n        toast.error(error.body);\n      }\n    }\n  };\n\n  return {\n    saveCompany,\n  };\n};\n","import { useCallback, useState } from 'react';\nimport { toast } from 'react-toastify';\nimport { UseFormReturn } from 'react-hook-form';\nimport { CompanyFormSchemaType } from '@/pages/AdminPanel/PersonalAccounts/MainInfoTab/types';\nimport { useBoolean } from '@chakra-ui/react';\nimport { typedAxios } from '@/api/typed-axios';\nimport { ITEPortal_Domain_Dto_ExhibitorDto } from '@/api';\n\nexport const useSearchCompanyByEmployee = (\n  formInstance: UseFormReturn<CompanyFormSchemaType>\n) => {\n  const [foundCompany, setFoundCompany] =\n    useState<ITEPortal_Domain_Dto_ExhibitorDto | null>(null);\n  const [\n    isEmployeeEmailFieldVisible,\n    { toggle: toggleIsEmployeeEmailFieldVisible },\n  ] = useBoolean(false);\n\n  const [\n    isCompanySelectionAllowed,\n    { toggle: toggleIsCompanySelectionAllowed },\n  ] = useBoolean(false);\n\n  const [\n    isCompanyFoundByEmployee,\n    { on: markIsCompanyFoundByEmployee, off: markCompanyNotFoundByEmployee },\n  ] = useBoolean(false);\n\n  const findCompanyByEmployee = useCallback(async () => {\n    const isValid = await formInstance.trigger('employeeEmail');\n\n    if (!isValid) {\n      return;\n    }\n\n    try {\n      const employeeEmail = formInstance.getValues('employeeEmail');\n      const company = await typedAxios.exhibitor.getExhibitors1({\n        email: employeeEmail,\n      });\n\n      if (!company || !company.exhibitorEmployees) {\n        markCompanyNotFoundByEmployee();\n        setFoundCompany(null);\n\n        return null;\n      }\n\n      setFoundCompany(company);\n\n      const existingEmployee = company.exhibitorEmployees.find(\n        (e) => e.email === employeeEmail\n      );\n\n      if (!existingEmployee) {\n        return;\n      }\n\n      if (existingEmployee.name) {\n        formInstance.setValue('employeeName', existingEmployee.name);\n      }\n\n      if (company.id) {\n        formInstance.setValue('companyName', {\n          value: company.id + '',\n          label: company.name || company.id + '',\n          // @ts-expect-error update types\n          meta: company,\n          __isNew__: false,\n        });\n      }\n\n      if (company.phoneNumber) {\n        formInstance.setValue('phoneNumber', company.phoneNumber);\n      }\n\n      toggleIsCompanySelectionAllowed();\n      markIsCompanyFoundByEmployee();\n    } catch {\n      toast.error('Участник не найден');\n    } finally {\n      toggleIsEmployeeEmailFieldVisible();\n    }\n  }, []);\n\n  return {\n    isCompanyFoundByEmployee,\n    isCompanySelectionAllowed,\n    isEmployeeEmailFieldVisible,\n    foundCompany,\n    findCompanyByEmployee,\n  };\n};\n","import styled from 'styled-components';\nimport { Box, FormControl } from '@chakra-ui/react';\n\nexport const FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n`;\n\nexport const ParticipantCheckContainer = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  gap: 10px;\n  width: 100%;\n`;\n\nexport const ParticipantCheckWrapper = styled(FormControl)`\n  min-width: 100%;\n`;\n","import * as v from 'zod';\nimport { z } from 'zod';\nimport i18n from '@/i18n';\n\nconst OptionSchema = v.object({\n  value: v.coerce.string(),\n  label: v.string(),\n  __isNew__: v.boolean().optional(),\n});\n\nexport const NewCompanyFormSchema = z.object({\n  id: v.number().optional(),\n  companyName: OptionSchema,\n  technicalManagerEmail: OptionSchema,\n  sellingOfficeId: OptionSchema,\n  currencyId: v.object({\n    value: v.coerce.number(),\n    label: v.string().nullable(),\n  }),\n  phoneNumber: v.string(),\n  employeeName: v.string(),\n  employeeEmail: v.string().email({\n    message: i18n.t('invalid-email'),\n  }),\n  isAgent: v.boolean().optional().nullable(),\n  agent: v\n    .object({\n      value: v.coerce.number(),\n      label: v.string().nullable(),\n    })\n    .optional()\n    .nullable(),\n});\n\nexport const UpdateCompanyFormSchema = z.object({\n  id: v.number().optional(),\n  sellingOfficeId: OptionSchema,\n  technicalManagerEmail: OptionSchema,\n  currencyId: v.object({\n    value: v.coerce.number(),\n    label: v.string().nullable(),\n  }),\n  phoneNumber: v.string(),\n  agent: v\n    .object({\n      value: v.coerce.number(),\n      label: v.string().nullable(),\n    })\n    .optional()\n    .nullable(),\n});\n\nexport type CompanyFormSchemaType = v.infer<typeof NewCompanyFormSchema>;\n","import { Stack } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport React, { useEffect, useState } from 'react';\nimport { IdType, OptionType } from '@/model/common';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { typedAxios } from '@/api/typed-axios';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport * as vali from 'zod';\nimport i18n from '@/i18n';\n\nconst OptionSchema = vali.object(\n  {\n    value: vali.coerce.number(),\n    label: vali.string(),\n  },\n  {\n    required_error: i18n.t('required-field'),\n  }\n);\n\nconst ValidationSchema = vali.object({\n  technicalManager: OptionSchema,\n});\n\nexport type ValidationSchemaType = vali.infer<typeof ValidationSchema>;\n\nexport const EditManagerModal = ({\n  exhibitionId,\n}: {\n  exhibitionId: IdType;\n}) => {\n  const { t } = useTranslation();\n  const [technicalManagers, setTechnicalManagers] = useState<OptionType[]>();\n  const instance = useForm<ValidationSchemaType>({\n    resolver: zodResolver(ValidationSchema),\n    mode: 'onChange',\n  });\n\n  useEffect(() => {\n    const fetchTechnicalManagers = async () => {\n      const technicalManagersData = await typedAxios.user\n        .getUsersTechnicalManagers1({\n          exhibitionId: +exhibitionId,\n        })\n        .catch(() => []);\n\n      const technicalManagersOptions = technicalManagersData.map((manager) => {\n        return {\n          label: manager.email || manager.name,\n          value: manager.id,\n          meta: { contactId: manager.contactId },\n        };\n      });\n\n      setTechnicalManagers(technicalManagersOptions);\n    };\n\n    fetchTechnicalManagers();\n    ModalFactory.updateContext(instance);\n  }, [instance]);\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing={4}>\n        <SelectComponent<ValidationSchemaType>\n          label={t('technical-manager')}\n          options={technicalManagers}\n          isRequired\n          name=\"technicalManager\"\n        />\n      </Stack>\n    </FormProvider>\n  );\n};\n","import { useTranslation } from 'react-i18next';\nimport {\n  ButtonGroup,\n  Card,\n  CardBody,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Tab,\n  TabList,\n  TabPanel,\n  TabPanels,\n  Tabs,\n  Flex,\n} from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { MainInfo } from '@/pages/AdminPanel/PersonalAccounts/MainInfo';\nimport { StandsTab } from '@/pages/AdminPanel/PersonalAccounts/StandsTab';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport React, { useState } from 'react';\nimport {\n  addExhibitionAccountRoute,\n  editExhibitionAccountRoute,\n  EditPersonalAccountsPageSearchSchemaType,\n} from '../../../features/Routing/protected/admin-exhibitions';\nimport { useNavigate } from '@tanstack/react-router';\nimport { UsersTab } from '@/pages/AdminPanel/PersonalAccounts/UsersTab';\nimport {\n  ExhibitionBox,\n  ExhibitionTitle,\n} from '@/components/Sidebar/OrderList/OrderList.styled';\nimport { Nullable } from 'vitest';\nimport { ProductsTab } from '@/pages/AdminPanel/PersonalAccounts/ProductsTab/ProductsTab';\nimport { SubexponentsTab } from '@/pages/AdminPanel/PersonalAccounts/SubexponentsTab/SubexponentsTab';\n\nconst tabStyles = {\n  borderColor: 'blackAlpha.200',\n  borderBottomColor: '#F7FAFC',\n  color: 'red',\n};\n\nconst TabWrapper = styled(TabPanel)`\n  && {\n    padding-top: 50px;\n    padding-left: 0;\n  }\n`;\n\ninterface NewAccountProps {\n  type: 'edit' | 'add';\n}\n\ninterface ShowExhibitionInfoProps {\n  label?: Nullable<string>;\n}\n\nconst TabsMap: Record<EditPersonalAccountsPageSearchSchemaType['tab'], number> =\n  {\n    main: 0,\n    stands: 1,\n    users: 2,\n    products: 3,\n    subexponents: 4,\n  };\n\nconst ExhibitionInfoWrapper = styled(Flex)`\n  flex-direction: row;\n  justify-content: flex-end;\n  position: absolute;\n  right: 20px;\n  top: 10px;\n`;\n\nconst ShowExhibitionInfo = ({ label }: ShowExhibitionInfoProps) => {\n  if (!label) {\n    return null;\n  }\n\n  return (\n    <ExhibitionInfoWrapper>\n      <ExhibitionBox>\n        <ExhibitionTitle>{label}</ExhibitionTitle>\n      </ExhibitionBox>\n    </ExhibitionInfoWrapper>\n  );\n};\n\nexport const NewAccount = ({ type }: NewAccountProps): JSX.Element => {\n  const [openConfirm, setOpenConfirm] = useState(false);\n  const navigate = useNavigate();\n  const isEdit = type === 'edit';\n  const { t } = useTranslation();\n\n  const { tab } = (\n    isEdit ? editExhibitionAccountRoute : addExhibitionAccountRoute\n  ).useSearch();\n\n  const { data } = (\n    isEdit ? editExhibitionAccountRoute : addExhibitionAccountRoute\n  ).useLoaderData();\n\n  const selectedTabFromUrl = isEdit ? TabsMap[tab] || 0 : 0;\n\n  const WarningModal = () => {\n    const closeModal = () => setOpenConfirm(false);\n\n    return (\n      <Modal isOpen={openConfirm} onClose={closeModal} size=\"lg\" isCentered>\n        <ModalOverlay />\n        <ModalContent>\n          <ModalHeader>{t('warning')}</ModalHeader>\n          <ModalCloseButton />\n          <ModalBody>{t('new-account-modal-text')}</ModalBody>\n          <ModalFooter onClick={closeModal} justifyContent=\"center\">\n            <ButtonGroup gap=\"1\" justifyContent=\"center\">\n              <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n                {t('cancel')}\n              </OrderButton>\n            </ButtonGroup>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    );\n  };\n\n  const handleTabsChange = (index: number) => {\n    if (isEdit) {\n      navigate({\n        to: './',\n        search: {\n          tab: Object.keys(TabsMap)[index],\n        },\n      });\n    }\n  };\n\n  return (\n    <Card>\n      <CardBody>\n        <ShowExhibitionInfo label={data?.name} />\n        <Tabs\n          isManual\n          isLazy\n          variant=\"enclosed\"\n          index={selectedTabFromUrl}\n          onChange={handleTabsChange}\n        >\n          <TabList>\n            <Tab _selected={tabStyles}>{t('main-info')}</Tab>\n            <Tab isDisabled={!isEdit} _selected={tabStyles}>\n              {t('stands-tab')}\n            </Tab>\n            <Tab isDisabled={!isEdit} _selected={tabStyles}>\n              {t('employees')}\n            </Tab>\n            <Tab isDisabled={!isEdit} _selected={tabStyles}>\n              {t('products')}\n            </Tab>\n            <Tab isDisabled={!isEdit} _selected={tabStyles}>\n              {t('subexponents')}\n            </Tab>\n          </TabList>\n          <TabPanels>\n            <TabWrapper maxWidth={600}>\n              <MainInfo type={type} />\n            </TabWrapper>\n            <TabWrapper>{isEdit && <StandsTab />}</TabWrapper>\n            <TabWrapper>{isEdit && <UsersTab />}</TabWrapper>\n            <TabWrapper>{isEdit && <ProductsTab />}</TabWrapper>\n            <TabWrapper>{isEdit && <SubexponentsTab />}</TabWrapper>\n          </TabPanels>\n        </Tabs>\n        <WarningModal />\n      </CardBody>\n    </Card>\n  );\n};\n","import React, { useState } from 'react';\nimport { Table } from '@/components/Table/Table';\nimport { useTranslation } from 'react-i18next';\nimport { Card } from '@/components/Card/Card';\nimport { DeleteIcon, EditIcon } from '@chakra-ui/icons';\nimport {\n  Box,\n  ButtonGroup,\n  Flex,\n  FormControl,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Text,\n  Button as ChakraButton,\n} from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { useNavigate, useParams, Link } from '@tanstack/react-router';\nimport { Column, Row } from 'react-table';\nimport fetchApi from '@/utils/fetchAPI';\nimport {\n  DOWNLOAD_EXHIBITOR_CSV,\n  EXHIBITORS_FROM_EXHIBITOR,\n} from '@/constants/endpoints';\nimport { Loader } from '@/components/Loader/Loader';\nimport { FetchMethods } from '@/utils/constants';\nimport {\n  Button as OrderButton,\n  Button,\n} from '@/components/Buttons/Button/Button';\nimport { CiImport } from 'react-icons/ci';\nimport { ToExhibition } from '@/layout/AdminAdditionalPanel/ToExhibition';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport { FieldValues, FormProvider, useForm } from 'react-hook-form';\nimport { IdType } from '@/model/common';\nimport { toast } from 'react-toastify';\nimport { ModalFactory } from '../../../components/Modal/api';\nimport { typedAxios } from '../../../api/typed-axios';\nimport { useTableLoader } from '../../../components/Table/useTableLoader';\nimport {\n  ITEPortal_Domain_Dto_AdminExhibitorSummary,\n  ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto,\n} from '@/api';\nimport { OrdersIcon } from '@/components/Icons/Orders';\nimport { DateUtils } from '@/utils/date-utils';\nimport { ConfirmModal } from '@/pages/ConfirmModal';\nimport { viewExhibitionAccountsRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { useEditTechnicalManagers } from '@/pages/AdminPanel/PersonalAccounts/hooks/use-edit-technical-managers';\n\nconst OptionWrapper = styled(Flex)`\n  flex-direction: row;\n  justify-content: flex-end;\n`;\n\nconst LoaderWrapper = styled(Flex)`\n  justify-content: center;\n  padding-top: 10%;\n`;\n\nconst ToolBarWrapper = styled(Box)`\n  padding-bottom: 10px;\n  display: flex;\n  flex-direction: row;\n  justify-content: end;\n  gap: 20px;\n`;\n\nconst ButtonContentContainer = styled(Flex)`\n  flex-direction: row;\n  align-items: center;\n  gap: 5px;\n`;\n\nconst TransparentButtonsTextContainer = styled(Text)`\n  font-size: 16px;\n  color: var(--chakra-colors-gray-600);\n`;\n\ntype Extended_ITEPortal_Domain_Dto_AdminExhibitorSummary =\n  ITEPortal_Domain_Dto_AdminExhibitorSummary & {\n    lastVisitDate: ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto['lastVisitDate'];\n  };\n\ninterface ExhibitionOptionsType {\n  row: Row<Extended_ITEPortal_Domain_Dto_AdminExhibitorSummary>;\n}\n\nexport const PersonalAccounts = (): JSX.Element => {\n  const { t } = useTranslation();\n\n  const { tab } = viewExhibitionAccountsRoute.useSearch();\n  const exhibition = useExhibition();\n  const { openEditTechnicalManagersModal } = useEditTechnicalManagers();\n  const processedAccounts = tab === 'process';\n  const navigate = useNavigate();\n  const { exhibitionId } = useParams({ strict: false });\n  const [loader, setLoader] = useState(false);\n  const [showBulkAction, setShowBulkAction] = useState(false);\n  const [selectedRows, setSelectedRows] = useState<\n    Extended_ITEPortal_Domain_Dto_AdminExhibitorSummary[]\n  >([]);\n\n  const {\n    data: personalAccountsData,\n    isLoading,\n    refresh,\n  } = useTableLoader<Extended_ITEPortal_Domain_Dto_AdminExhibitorSummary>({\n    ignorePagination: true,\n    resource: `${EXHIBITORS_FROM_EXHIBITOR}?exhibitionId=${exhibitionId}`,\n    additionalPrams: {\n      hasTechnicalManager: !processedAccounts,\n    },\n    map: (data) => {\n      return data.map((ac) => {\n        if (ac.exhibitorEmployees && ac.exhibitorEmployees.length > 0) {\n          ac.lastVisitDate = DateUtils.findLatestDate(\n            ac.exhibitorEmployees.map((empl) => empl.lastVisitDate)\n          );\n        }\n\n        return ac;\n      });\n    },\n  });\n  const [openConfirm, setOpenConfirm] = useState(false);\n  const [showBitrixModal, setShowBitrixModal] = useState<boolean>(false);\n\n  const methods = useForm({\n    mode: 'onBlur',\n  });\n\n  const PersonalAccountsOptions = ({ row }: ExhibitionOptionsType) => {\n    const rowValues = row.values;\n\n    return (\n      <OptionWrapper>\n        <Link\n          title=\"Placed orders\"\n          to=\"/admin/exhibitions/$exhibitionId/view/placed-orders\"\n          params={{ exhibitionId }}\n          style={{ paddingRight: 20 }}\n          search={{\n            exhibitorId: rowValues.id,\n          }}\n        >\n          <OrdersIcon />\n        </Link>\n        <Link\n          to=\"/admin/exhibitions/$exhibitionId/view/personal-accounts/$accountId/edit\"\n          params={{ accountId: rowValues.id, exhibitionId }}\n          style={{ paddingRight: 10 }}\n        >\n          <EditIcon />\n        </Link>\n        <ChakraButton\n          colorScheme=\"black\"\n          variant=\"link\"\n          onClick={() => showDeleteModal(rowValues?.id)}\n        >\n          <DeleteIcon />\n        </ChakraButton>\n      </OptionWrapper>\n    );\n  };\n\n  const showDeleteModal = (id: IdType) => {\n    ModalFactory.confirm({\n      Component: () => <>{t('delete-exhibitor-message')}</>,\n      onOk: async () => {\n        try {\n          await typedAxios.exhibitor.deleteExhibitionsExhibitors({\n            exhibitionId: +exhibitionId,\n            exhibitorId: +id,\n          });\n\n          toast.success(t('exhibitor-deleted'));\n\n          ModalFactory.close();\n          refresh();\n        } catch {\n          toast.error(t('unable-to-delete', { entity: t('exhibitor_') }));\n        }\n      },\n    });\n  };\n\n  const PersonalAccountsToolbar = () => {\n    return (\n      <ToolBarWrapper>\n        <Button colorScheme=\"transparent\" onClick={importCSV}>\n          <ButtonContentContainer>\n            <CiImport size=\"20px\" />\n            <TransparentButtonsTextContainer>\n              {t('importCSV')}\n            </TransparentButtonsTextContainer>\n          </ButtonContentContainer>\n        </Button>\n        <Button colorScheme=\"red\" onClick={addPersonalAccount}>\n          {t('addPerson')}\n        </Button>\n        {exhibition?.eventEditionId && (\n          <Button colorScheme=\"red\" onClick={() => setShowBitrixModal(true)}>\n            + {t('bitrixImport')}\n          </Button>\n        )}\n        {processedAccounts && (\n          <Button\n            colorScheme={showBulkAction ? 'secondary' : 'red'}\n            onClick={() => setDistributeMode(!showBulkAction)}\n          >\n            {showBulkAction ? `X ${t('closeSelection')}` : t('choose')}\n          </Button>\n        )}\n        {selectedRows?.length > 0 && (\n          <Button\n            colorScheme=\"red\"\n            onClick={() =>\n              openEditTechnicalManagersModal(\n                selectedRows,\n                refresh,\n                setShowBulkAction\n              )\n            }\n          >\n            {t('edit')}\n          </Button>\n        )}\n      </ToolBarWrapper>\n    );\n  };\n\n  const importCSV = () => {\n    setOpenConfirm(!openConfirm);\n  };\n\n  const closeModal = () => setOpenConfirm(false);\n\n  const submitHandler = async (values: FieldValues) => {\n    try {\n      const { data } = await fetchApi(\n        DOWNLOAD_EXHIBITOR_CSV(exhibitionId),\n        {\n          method: FetchMethods.Post,\n          responseType: 'blob',\n          data: { importFile: values?.['upload-csv'][0] },\n        },\n        { 'Content-Type': 'multipart/form-data' }\n      );\n\n      if (data) {\n        const url = window.URL.createObjectURL(new Blob([data]));\n\n        const link = document.createElement('a');\n\n        link.href = url;\n        link.setAttribute('download', 'ErrorRows.csv');\n        document.body.appendChild(link);\n        link.click();\n      }\n    } finally {\n      refresh();\n    }\n\n    closeModal();\n  };\n\n  const ImportCSVModal = () => {\n    return (\n      <Modal isOpen={openConfirm} onClose={closeModal} size=\"lg\" isCentered>\n        <ModalOverlay />\n        <ModalContent>\n          <ModalHeader>{t('set-file')}</ModalHeader>\n          <ModalCloseButton />\n          <ModalBody>\n            <FormProvider {...methods}>\n              <form>\n                <FormControl>\n                  <UploadFileDropzone\n                    label={useNameTranslate('upload-csv')}\n                    name=\"upload-csv\"\n                    accept={{ 'text/csv': ['.csv'] }}\n                  />\n                </FormControl>\n              </form>\n            </FormProvider>\n          </ModalBody>\n          <ModalFooter justifyContent=\"center\">\n            <ButtonGroup gap=\"1\" justifyContent=\"center\">\n              <OrderButton\n                colorScheme=\"red\"\n                onClick={methods.handleSubmit(submitHandler)}\n              >\n                {t('choose')}\n              </OrderButton>\n              <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n                {t('cancel')}\n              </OrderButton>\n            </ButtonGroup>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    );\n  };\n\n  const personalAccountsColumns = React.useMemo<\n    Array<Column<Extended_ITEPortal_Domain_Dto_AdminExhibitorSummary>>\n  >(\n    () => [\n      {\n        accessor: 'id',\n        show: false,\n      },\n      {\n        Header: `${t('participant-name')}`,\n        accessor: 'name',\n      },\n      {\n        Header: `${t('sales-office')}`,\n        accessor: 'sellingOffice',\n      },\n      {\n        Header: `${t('last-visit-date')}`,\n        accessor: 'lastVisitDate',\n      },\n      {\n        Header: `${t('technical-manager')}`,\n        accessor: 'technicalManagerEmail',\n      },\n      {\n        Header: t('agent'),\n        accessor: 'agent',\n        Cell: ({ value }) => {\n          if (value && value.name) {\n            return <>{value.name}</>;\n          }\n\n          return <>-</>;\n        },\n      },\n      {\n        Header: '',\n        id: 'options',\n        width: '10%',\n        Cell: ({ row }) => <PersonalAccountsOptions row={row} />,\n      },\n    ],\n    [showBulkAction]\n  );\n\n  const addPersonalAccount = () => {\n    navigate({\n      to: '/admin/exhibitions/$exhibitionId/view/personal-accounts/add',\n      params: {\n        exhibitionId: exhibitionId,\n      },\n    });\n  };\n\n  const importPersonalAccountsFromBitrix = async () => {\n    try {\n      setLoader(true);\n\n      const response = await typedAxios.bitrix.postBitrixExhibitionExhibitors({\n        exhibitionId: +exhibitionId,\n      });\n\n      if (response) {\n        const url = window.URL.createObjectURL(new Blob([response]));\n\n        const link = document.createElement('a');\n\n        link.href = url;\n        link.setAttribute('download', 'ErrorRows.csv');\n        document.body.appendChild(link);\n        link.click();\n        toast.error(t('error-rows-file'));\n      } else {\n        toast.success(t('personal-accounts-import-success'));\n      }\n    } catch {\n      toast.error(t('error-occurred'));\n    } finally {\n      setLoader(false);\n      refresh();\n    }\n  };\n\n  const setDistributeMode = (value: boolean) => {\n    setShowBulkAction(value);\n\n    if (value) {\n      setSelectedRows([]);\n    }\n  };\n\n  const handleBulkAction = (\n    rows: Extended_ITEPortal_Domain_Dto_AdminExhibitorSummary[]\n  ) => {\n    setSelectedRows(rows);\n  };\n\n  return (\n    <>\n      {isLoading || loader ? (\n        <LoaderWrapper>\n          <Loader />\n        </LoaderWrapper>\n      ) : (\n        <>\n          <ToExhibition />\n          <PersonalAccountsToolbar />\n\n          <Card>\n            <Table\n              columns={personalAccountsColumns}\n              data={personalAccountsData}\n              showBulkAction={showBulkAction}\n              onBulkAction={handleBulkAction}\n            />\n            <ImportCSVModal />\n            <ConfirmModal\n              modalMessage={t('import-from-bitrix-message')}\n              isOpen={showBitrixModal}\n              closeModal={() => setShowBitrixModal(false)}\n              confirm={importPersonalAccountsFromBitrix}\n            />\n          </Card>\n        </>\n      )}\n    </>\n  );\n};\n","import {\n  SystemStyleObject,\n  Tab,\n  TabList,\n  TabPanel,\n  TabPanelProps,\n  TabPanels,\n  TabProps,\n  Tabs,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport {\n  ExhibitionAccountsTabs,\n  viewExhibitionAccountsRoute,\n} from '@/features/Routing/protected/admin-exhibitions';\nimport { useNavigate } from '@tanstack/react-router';\nimport { PersonalAccounts } from '@/pages/AdminPanel/PersonalAccounts/PersonalAccounts';\n\nconst selectedTabStyles: SystemStyleObject = {\n  background: 'blackAlpha.300',\n};\n\nconst tabStyles: TabProps = {\n  background: 'blackAlpha.100',\n  minW: '100px',\n};\n\nconst tabPanelsStyle: TabPanelProps = {\n  width: '100%',\n};\n\nexport const PersonalAccountsTab = () => {\n  const { t } = useTranslation();\n  const { tab } = viewExhibitionAccountsRoute.useSearch();\n  const indexFromUrl = ExhibitionAccountsTabs.indexOf(tab);\n  const navigate = useNavigate();\n\n  const handleTabChange = (index: number) => {\n    navigate({\n      search: { tab: ExhibitionAccountsTabs[index] || 'posted' },\n    });\n  };\n\n  return (\n    <Tabs\n      variant=\"unstyled\"\n      align=\"center\"\n      w=\"100%\"\n      index={indexFromUrl}\n      onChange={handleTabChange}\n    >\n      <TabList>\n        <Tab\n          _selected={selectedTabStyles}\n          {...tabStyles}\n          borderTopLeftRadius=\"md\"\n          borderBottomLeftRadius=\"md\"\n        >\n          {t('distributed-accounts')}\n        </Tab>\n        <Tab\n          _selected={selectedTabStyles}\n          {...tabStyles}\n          borderTopRightRadius=\"md\"\n          borderBottomRightRadius=\"md\"\n        >\n          {t('unassigned-accounts')}\n        </Tab>\n      </TabList>\n      <TabPanels>\n        <TabPanel {...tabPanelsStyle}>\n          {tab === 'posted' && <PersonalAccounts />}\n        </TabPanel>\n        <TabPanel {...tabPanelsStyle}>\n          {tab === 'process' && <PersonalAccounts />}\n        </TabPanel>\n      </TabPanels>\n    </Tabs>\n  );\n};\n","import { Column } from 'react-table';\nimport { Table } from '@/components/Table/Table';\nimport { Flex } from '@chakra-ui/react';\nimport i18n from '@/i18n';\nimport { editExhibitionAccountRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { useSuspenseQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { ITEPortal_Domain_Dto_Stand_GetStandProductDto } from '@/api';\nimport { Loader } from '@/components/Loader/Loader';\n\nconst columns = [\n  {\n    Header: i18n.t('product-name'),\n    accessor: 'displayName',\n    width: '30%',\n  },\n  {\n    Header: i18n.t('product-id'),\n    accessor: 'productId',\n  },\n  {\n    Header: i18n.t('price'),\n    accessor: 'price',\n  },\n  {\n    Header: i18n.t('amount'),\n    accessor: 'quantity',\n  },\n  {\n    Header: i18n.t('discount'),\n    accessor: 'discount',\n  },\n  {\n    Header: i18n.t('tax'),\n    accessor: 'vat',\n  },\n  //Need formula\n  // {\n  //   Header: i18n.t('taxIncluded'),\n  //   accessor: 'vatIncluded',\n  // },\n  {\n    Header: i18n.t('currency'),\n    accessor: 'currency',\n  },\n] satisfies Array<Column<ITEPortal_Domain_Dto_Stand_GetStandProductDto>>;\n\nexport const ProductsTab = () => {\n  const { accountId, exhibitionId } = editExhibitionAccountRoute.useParams();\n\n  const { data: stands = [] } = useSuspenseQuery(\n    QueryOptions.standsQueryOptions({\n      exhibitionId: +exhibitionId,\n      exhibitorId: +accountId,\n    })\n  );\n\n  const { data = [], isLoading } = useSuspenseQuery(\n    QueryOptions.productsQueryOptions({\n      standId: stands?.[0]?.id,\n    })\n  );\n\n  return (\n    <Flex flexDir=\"column\">\n      {isLoading ? <Loader /> : <Table columns={columns} data={data} />}\n    </Flex>\n  );\n};\n","import { FormProvider, useFieldArray, useForm } from 'react-hook-form';\nimport React, { useEffect, useMemo } from 'react';\nimport { ButtonGroup, Button, Box, Flex } from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport { useNavigate, useParams } from '@tanstack/react-router';\nimport { StandFieldSet } from './StandsTab/StandFieldSet';\nimport { StandFormValues } from './StandsTab/types';\nimport { useSuspenseQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { StandProjectForm } from '@/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm';\nimport { FilesStorage } from '@/pages/Exhibition/FilesStorage/FilesStorage';\n\nconst defaultValues = {\n  id: 0,\n  area: undefined,\n  buildingType: undefined,\n  secondFloorArea: undefined,\n  standConfiguration: undefined,\n  standNumber: undefined,\n};\n\nexport const StandsTab = (): JSX.Element => {\n  const { exhibitionId, accountId: exhibitorId } = useParams({ strict: false });\n\n  const { data: stands = [], isLoading } = useSuspenseQuery(\n    QueryOptions.standsQueryOptions({\n      exhibitionId: +exhibitionId,\n      exhibitorId: +exhibitorId,\n    })\n  );\n\n  const sortedStands = useMemo(() => {\n    return stands.sort((a, b) => a.id - b.id);\n  }, [stands]);\n\n  const navigate = useNavigate();\n\n  const methods = useForm<StandFormValues>({\n    mode: 'onSubmit',\n    reValidateMode: 'onSubmit',\n  });\n\n  const { fields, append, remove } = useFieldArray({\n    name: 'stands',\n    control: methods.control,\n  });\n\n  useEffect(() => {\n    methods.reset({\n      stands: sortedStands,\n    });\n\n    if (Array.isArray(sortedStands) && sortedStands.length === 0) {\n      append(defaultValues);\n    }\n  }, [sortedStands]);\n\n  const toAccounts = () => {\n    navigate({\n      to: '/admin/exhibitions/$exhibitionId/view/personal-accounts',\n      replace: true,\n      params: {\n        exhibitionId,\n      },\n    });\n  };\n\n  return (\n    <>\n      <FormProvider {...methods}>\n        <Flex gap=\"20px\" direction=\"row\" flexWrap=\"wrap\">\n          {fields.map((field, index) => {\n            const projectId = sortedStands[index]?.projectId;\n\n            return (\n              <StandFieldSet\n                key={field.id}\n                index={index}\n                isNew={!Boolean(sortedStands[index])}\n                onRemove={remove}\n                standId={sortedStands[index]?.id}\n                projectId={projectId}\n              />\n            );\n          })}\n        </Flex>\n        <Box mt={4}>\n          {!isLoading && (\n            <ButtonGroup gap=\"1\">\n              <Button\n                colorScheme=\"red\"\n                variant=\"outline\"\n                type=\"reset\"\n                onClick={toAccounts}\n              >\n                {useNameTranslate('cancel')}\n              </Button>\n              <Button\n                type=\"button\"\n                variant=\"ghost\"\n                colorScheme=\"red\"\n                onClick={() => {\n                  append(defaultValues, {\n                    focusName: '',\n                  });\n                }}\n              >\n                + {useNameTranslate('add-stand')}\n              </Button>\n            </ButtonGroup>\n          )}\n        </Box>\n        <FilesStorage canUploadNewFiles={false} />\n      </FormProvider>\n      <StandProjectForm />\n    </>\n  );\n};\n","import { UseFieldArrayRemove } from 'react-hook-form/dist/types/fieldArray';\nimport { useTranslation } from 'react-i18next';\nimport { useFormContext } from 'react-hook-form';\nimport {\n  Button,\n  ButtonGroup,\n  Card,\n  CardBody,\n  CardFooter,\n  CardHeader,\n  FormControl,\n  Stack,\n} from '@chakra-ui/react';\nimport Input from '@/components/Fields/Input';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { AreaTypeConfig, StandConfiguration } from '@/utils/constants';\n\nimport styled from 'styled-components';\nimport { useStandSave } from './use-save-stand';\nimport { StandFormValues } from './types';\nimport InputNumber from '@/components/Fields/InputNumber';\nimport { standProjectApi } from '@/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/api';\nimport { AsyncButton } from '@/components/AsyncButton';\nimport { PavilionOptions } from '@/pages/AdminPanel/PersonalAccounts/StandsTab/contsants';\nimport { filesStorageApi } from '@/pages/Exhibition/FilesStorage/filesStorageApi';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n`;\n\nexport const StandFieldSet = (props: {\n  index: number;\n  isNew: boolean;\n  standId: number | null;\n  projectId?: number | null;\n  onRemove: UseFieldArrayRemove;\n}) => {\n  const { t } = useTranslation();\n\n  const { index, isNew, onRemove, standId, projectId } = props;\n  const { isSaving, saveStand } = useStandSave();\n  const { getValues } = useFormContext<StandFormValues>();\n  const openEditStandProjectForm = () => {\n    if (standId) {\n      standProjectApi.setStandId({\n        standId,\n        projectId,\n      });\n    }\n  };\n\n  const openStandFileStorage = () => {\n    if (standId) {\n      filesStorageApi.setStand({\n        standId: standId,\n        standNumber: getValues(`stands.${index}.standNumber`),\n      });\n    }\n  };\n\n  return (\n    <>\n      <Card\n        style={{ boxShadow: 'none' }}\n        variant=\"outline\"\n        flexBasis={{\n          base: '100%',\n          lg: 'calc(50% - 20px)',\n        }}\n      >\n        <CardHeader>\n          {t('stand')} #{index + 1}\n        </CardHeader>\n        <CardBody>\n          <Stack spacing=\"5\">\n            <FormControlWrapper>\n              <InputNumber<StandFormValues>\n                addon={t('sqm')}\n                label={t('stand-footage')}\n                maxWidth=\"100%\"\n                name={`stands.${index}.area`}\n                step={0.25}\n                precision={2}\n              />\n              <SelectComponent<StandFormValues>\n                label={t('area-type')}\n                options={AreaTypeConfig}\n                name={`stands.${index}.buildingType`}\n              />\n              <SelectComponent<StandFormValues>\n                label={t('stand-configuration')}\n                options={StandConfiguration}\n                name={`stands.${index}.standConfiguration`}\n              />\n              <InputNumber<StandFormValues>\n                addon={t('sqm')}\n                label={t('second-floor-area')}\n                maxWidth=\"100%\"\n                name={`stands.${index}.secondFloorArea`}\n                step={0.25}\n                precision={2}\n              />\n              <Input<StandFormValues>\n                label={t('stand-number')}\n                maxWidth=\"100%\"\n                name={`stands.${index}.standNumber`}\n              />\n              <SelectComponent<StandFormValues>\n                label={t('pavilion')}\n                maxWidth=\"100%\"\n                options={PavilionOptions}\n                name={`stands.${index}.pavilionHall`}\n              />\n            </FormControlWrapper>\n          </Stack>\n\n          <CardFooter justifyContent=\"flex-end\" paddingX={0}>\n            <ButtonGroup>\n              {isNew && (\n                <Button size=\"sm\" onClick={() => onRemove(index)}>\n                  {t('delete')}\n                </Button>\n              )}\n              {!isNew && (\n                <Button size=\"sm\" onClick={() => openStandFileStorage()}>\n                  {t('file-storage')}\n                </Button>\n              )}\n              {!isNew && (\n                <Button size=\"sm\" onClick={() => openEditStandProjectForm()}>\n                  {t('stand-project')}\n                </Button>\n              )}\n              <AsyncButton\n                colorScheme=\"red\"\n                type=\"button\"\n                size=\"sm\"\n                disabled={isSaving}\n                isLoading={isSaving}\n                onClick={async () => {\n                  return saveStand(getValues('stands')[index], index);\n                }}\n              >\n                {t('save')}\n              </AsyncButton>\n            </ButtonGroup>\n          </CardFooter>\n        </CardBody>\n      </Card>\n    </>\n  );\n};\n","import { CommentsHistory } from '@/pages/StandProject/StandProjectDescription/CommentsHistory';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport { Flex } from '@chakra-ui/react';\nimport { AttachmentUploader } from '@/pages/StandProject/StandProjectDescription/AttachmentUploader';\nimport { ITEPortal_Domain_Dto_Stand_GetStandProjectDto } from '@/api';\nimport { editExhibitionAccountRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport * as vali from 'zod';\nimport i18n from '@/i18n';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { AsyncButton } from '@/components/AsyncButton';\nimport { toast } from 'react-toastify';\nimport { queryClient } from '@/features/query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useStandProject } from '@/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/api';\n\nconst ValidationSchema = vali.object({\n  changeDescription: vali\n    .string({\n      required_error: i18n.t('required-field'),\n      invalid_type_error: i18n.t('required-field'),\n    })\n    .min(1, {\n      message: i18n.t('required-field'),\n    }),\n  file: vali.instanceof(File).optional().nullish(),\n});\n\ntype FormValues = vali.infer<typeof ValidationSchema>;\n\nexport const ProjectChangeForm = ({\n  project,\n}: {\n  project: ITEPortal_Domain_Dto_Stand_GetStandProjectDto;\n}) => {\n  const editable = project.approved !== true;\n  const { t } = useTranslation();\n  const { data: exhibitor } = editExhibitionAccountRoute.useLoaderData();\n  const { standId } = useStandProject();\n  const [uploaderKey, setUploaderKey] = useState<number | null>(null);\n\n  const employeesIds = useMemo(() => {\n    return exhibitor.exhibitorEmployees?.map((empl) => empl.userId) || [];\n  }, [exhibitor]);\n\n  const formInstance = useForm<FormValues>({\n    resolver: zodResolver(ValidationSchema),\n  });\n\n  const handleSubmit = async (values: FormValues) => {\n    try {\n      if (!standId || !project.projectId) {\n        return;\n      }\n\n      const changeId = await typedAxios.stand.postStandsProjectChanges({\n        standId: standId,\n        projectId: project.projectId,\n        requestBody: {\n          comment: values.changeDescription,\n        },\n      });\n\n      if (values.file instanceof File) {\n        await typedAxios.stand.putStandsProjectChanges({\n          changesId: +changeId,\n          projectId: +project.projectId,\n          standId: +standId,\n          formData: {\n            file: values.file,\n          },\n        });\n      }\n\n      await queryClient.refetchQueries({\n        queryKey: QueryOptions.loadStandProject({\n          standId: standId,\n        }).queryKey,\n      });\n\n      setUploaderKey(changeId);\n\n      formInstance.reset({\n        changeDescription: '',\n      });\n    } catch {\n      toast.error(t('error-occurred'));\n    }\n  };\n\n  if (!project || !project?.projectChangesHistory) {\n    return null;\n  }\n\n  return (\n    <FormProvider {...formInstance}>\n      <CommentsHistory\n        comments={project.projectChangesHistory}\n        ownershipResolver={(historyItem) =>\n          historyItem.createdBy\n            ? employeesIds.includes(historyItem.createdBy)\n            : false\n        }\n      />\n      {editable && (\n        <>\n          <TextArea<FormValues>\n            label={t('stand-change-description')}\n            name=\"changeDescription\"\n          />\n          <Flex direction=\"row\" gap={4} mb={6} justifyContent=\"flex-end\">\n            <AttachmentUploader\n              key={uploaderKey}\n              onFileChange={(file) => {\n                formInstance.setValue('file', file);\n              }}\n            />\n            <AsyncButton\n              size=\"sm\"\n              variant=\"solid\"\n              colorScheme=\"red\"\n              onClick={formInstance.handleSubmit(handleSubmit)}\n            >\n              {t('publish-stand-project-change')}\n            </AsyncButton>\n          </Flex>\n        </>\n      )}\n    </FormProvider>\n  );\n};\n","import { Flex } from '@chakra-ui/react';\nimport { ProjectImage } from '@/pages/StandProject/StandProjectImage/StandProjectImage.styled';\nimport Lightbox from 'yet-another-react-lightbox';\nimport Download from 'yet-another-react-lightbox/plugins/download';\nimport React, { useState } from 'react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport { ITEPortal_Domain_Dto_Stand_GetStandProjectDto } from '@/api';\nimport { FileUtils } from '@/utils/file-utils';\n\ntype StandProjectImagePropsType = Pick<\n  ITEPortal_Domain_Dto_Stand_GetStandProjectDto,\n  'projectImageUrl'\n> & {\n  editable: boolean;\n};\n\nexport const ProjectImageUploader = (props: StandProjectImagePropsType) => {\n  const { projectImageUrl, editable } = props;\n  const [open, setOpen] = useState(false);\n\n  return (\n    <Flex flexDirection=\"column\" maxW=\"100%\" gap={6}>\n      {editable && (\n        <UploadFileDropzone\n          label={useNameTranslate('upload-image')}\n          defaultValue={projectImageUrl || ''}\n          multiple={false}\n          name=\"file\"\n        />\n      )}\n\n      {projectImageUrl && (\n        <>\n          {props.projectImageUrl && (\n            <ProjectImage\n              key={projectImageUrl}\n              style={{ width: 100, height: 'auto' }}\n              src={projectImageUrl}\n              onClick={() => setOpen(true)}\n            />\n          )}\n\n          <Lightbox\n            open={open}\n            close={() => setOpen(false)}\n            index={0}\n            slides={[\n              {\n                src: projectImageUrl,\n              },\n            ]}\n            animation={{ fade: 0 }}\n            controller={{ closeOnPullDown: true, closeOnBackdropClick: true }}\n            styles={{ root: { '--yarl__color_backdrop': 'rgba(0, 0, 0, .7)' } }}\n            plugins={[Download]}\n            download={{\n              download: ({ slide }) => {\n                FileUtils.saveUrlToBlob(slide.src);\n              },\n            }}\n          />\n        </>\n      )}\n    </Flex>\n  );\n};\n","import {\n  Button,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerHeader,\n  DrawerOverlay,\n  Flex,\n} from '@chakra-ui/react';\nimport { useParams, useSearch } from '@tanstack/react-router';\nimport { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n  standProjectApi,\n  useStandProject,\n} from '@/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/api';\nimport { queryClient } from '@/features/query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { ProjectImageUploader } from '@/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/ProjectImageUploader';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport { ProjectChangeForm } from '@/pages/AdminPanel/PersonalAccounts/StandsTab/StandProjectForm/ProjectChangeForm';\nimport * as vali from 'zod';\nimport i18n from '@/i18n';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { toast } from 'react-toastify';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useQuery } from '@tanstack/react-query';\nimport { AsyncButton } from '@/components/AsyncButton';\n\nconst ValidationSchema = vali.object({\n  projectDescription: vali\n    .string({\n      required_error: i18n.t('required-field'),\n      invalid_type_error: i18n.t('required-field'),\n    })\n    .nullish(),\n  file: vali.array(vali.instanceof(File)).optional().nullish(),\n});\n\ntype FormValues = vali.infer<typeof ValidationSchema>;\n\nexport const StandProjectForm = () => {\n  const { t } = useTranslation();\n  const { exhibitionId, accountId: exhibitorId } = useParams({ strict: false });\n  const { standId: standIdFromUrl } = useSearch({ strict: false });\n  const { standId, projectId } = useStandProject();\n  const [isOpened, toggleOpened] = useState(false);\n  const formInstance = useForm<FormValues>({\n    resolver: zodResolver(ValidationSchema),\n  });\n  const [isDescriptionEditable, setDescriptionEditable] =\n    useState<boolean>(true);\n\n  const { data: project, dataUpdatedAt } = useQuery({\n    ...QueryOptions.loadStandProject({\n      standId: standId,\n    }),\n    enabled: Boolean(standId) && Boolean(projectId),\n  });\n\n  const isExistingProject = Boolean(project);\n\n  useEffect(\n    function openDrawerIdStandIdFromUrlExists() {\n      toggleOpened(Boolean(standId));\n    },\n    [standId]\n  );\n\n  useEffect(\n    function setStandIdToStoreViaApi() {\n      if (typeof +standIdFromUrl === 'number') {\n        standProjectApi.setStandId(standIdFromUrl);\n      }\n    },\n    [standIdFromUrl]\n  );\n\n  useEffect(\n    function setFormValues() {\n      if (project) {\n        formInstance.reset({\n          projectDescription: project.projectDescription || '',\n        });\n\n        setDescriptionEditable(false);\n      }\n    },\n    [project]\n  );\n\n  const handleClose = () => {\n    standProjectApi.reset();\n    formInstance.reset({\n      projectDescription: '',\n    });\n  };\n\n  const reopenProject = async () => {\n    if (!project?.projectId || !standId) {\n      return;\n    }\n\n    try {\n      await typedAxios.stand.postStandsUpdateProjectStatus({\n        projectId: +project.projectId,\n        standId: +standId,\n        requestBody: {\n          standStatus: false,\n        },\n      });\n\n      await queryClient.refetchQueries({\n        queryKey: QueryOptions.loadStandProject({\n          standId,\n        }).queryKey,\n      });\n\n      toast.success(t('saved'));\n    } catch {\n      toast.error(t('error-occurred'));\n    }\n  };\n\n  const handleSubmit = async (values: FormValues) => {\n    if (!standId) {\n      return;\n    }\n\n    try {\n      if (project?.projectId) {\n        await typedAxios.stand.putStandsProject({\n          projectId: project.projectId,\n          standId,\n          requestBody: {\n            projectDescription: values.projectDescription,\n          },\n        });\n\n        if (values.file?.[0] instanceof File) {\n          await typedAxios.stand.putStandsProjectImage({\n            standId,\n            projectId: project.projectId,\n            formData: {\n              image: values.file?.[0],\n            },\n          });\n        }\n      } else {\n        const saveProjectId = await typedAxios.stand.postStandsProject({\n          standId,\n          requestBody: {\n            projectDescription: values.projectDescription,\n          },\n        });\n\n        standProjectApi.setStandId({\n          projectId: saveProjectId,\n          standId: standId,\n        });\n\n        if (values.file?.[0] instanceof File) {\n          await typedAxios.stand.putStandsProjectImage({\n            standId,\n            projectId: saveProjectId,\n            formData: {\n              image: values.file?.[0],\n            },\n          });\n        }\n      }\n\n      await queryClient.refetchQueries({\n        queryKey: QueryOptions.loadStandProject({\n          standId,\n        }).queryKey,\n      });\n\n      if (!projectId) {\n        await queryClient.refetchQueries(\n          QueryOptions.standsQueryOptions({\n            exhibitionId: +exhibitionId,\n            exhibitorId: +exhibitorId,\n          })\n        );\n      }\n\n      toast.success(t('saved'));\n    } catch {\n      toast.error(t('error-occurred'));\n    }\n  };\n\n  if (!isOpened) {\n    return null;\n  }\n\n  const editable = project?.approved !== true;\n  const canEditHistory = Boolean(project?.projectChangesHistory?.length);\n  const canAmendInitialDescription = true; // !canEditHistory;\n\n  return (\n    <Drawer isOpen={isOpened} placement=\"right\" size=\"xl\" onClose={handleClose}>\n      <DrawerOverlay />\n      <DrawerContent>\n        <DrawerCloseButton />\n        <DrawerHeader>{t('stand-project')}</DrawerHeader>\n\n        <DrawerBody>\n          <Flex direction=\"column\" gap={8}>\n            <FormProvider {...formInstance}>\n              <ProjectImageUploader\n                key={dataUpdatedAt}\n                editable={editable}\n                projectImageUrl={project?.projectImageUrl}\n              />\n              <TextArea<FormValues>\n                label={t('project-description')}\n                name=\"projectDescription\"\n                size=\"md\"\n                isDisabled={\n                  !canAmendInitialDescription ||\n                  !editable ||\n                  !isDescriptionEditable\n                }\n              />\n            </FormProvider>\n            {canAmendInitialDescription && (\n              <Flex direction=\"row\" gap={2} justifyContent=\"flex-end\">\n                <Button variant=\"outline\" size=\"sm\" onClick={handleClose}>\n                  {t('cancel')}\n                </Button>\n                {isExistingProject && (\n                  <AsyncButton\n                    size=\"sm\"\n                    colorScheme=\"brandColor\"\n                    onClick={() => {\n                      if (isDescriptionEditable) {\n                        formInstance.setValue(\n                          'projectDescription',\n                          project?.projectDescription\n                        );\n                      }\n\n                      setDescriptionEditable(!isDescriptionEditable);\n                    }}\n                  >\n                    {isDescriptionEditable\n                      ? t('cancel-edit-description')\n                      : t('edit-description')}\n                  </AsyncButton>\n                )}\n                {editable && (\n                  <AsyncButton\n                    size=\"sm\"\n                    colorScheme=\"brandColor\"\n                    onClick={formInstance.handleSubmit(handleSubmit)}\n                  >\n                    {t('save')}\n                  </AsyncButton>\n                )}\n                {!editable && (\n                  <AsyncButton\n                    onClick={reopenProject}\n                    size=\"sm\"\n                    colorScheme=\"brandColor\"\n                  >\n                    {t('reopen-project')}\n                  </AsyncButton>\n                )}\n              </Flex>\n            )}\n            {canEditHistory && project?.projectChangesHistory && (\n              <ProjectChangeForm project={project} />\n            )}\n          </Flex>\n        </DrawerBody>\n      </DrawerContent>\n    </Drawer>\n  );\n};\n","import { createApi, createStore } from 'effector';\nimport { useUnit } from 'effector-react';\n\ntype StandProjectStateType = {\n  standId: number | null;\n  projectId?: number | null;\n};\n\nconst $standProject = createStore<StandProjectStateType>({\n  standId: null,\n  projectId: null,\n});\n\nexport const standProjectApi = createApi($standProject, {\n  setStandId: (state, payload: StandProjectStateType) => {\n    return {\n      ...state,\n      ...payload,\n    };\n  },\n  reset: () => {\n    return {\n      standId: null,\n      projectId: null,\n    };\n  },\n});\n\nexport const useStandProject = () => useUnit($standProject);\n","import { OptionType } from '@/model/common';\nimport i18n from '@/i18n';\nimport { ITEPortal_Contracts_Enums_PavilionHall } from '@/api';\n\nexport const PavilionOptions: Array<OptionType> = [\n  { value: 1, label: i18n.t('Pav1Hall1') },\n  { value: 2, label: i18n.t('Pav1Hall2') },\n  { value: 3, label: i18n.t('Pav1Hall3') },\n  { value: 4, label: i18n.t('Pav1Hall4') },\n  { value: 5, label: i18n.t('Pav2Hall5') },\n  { value: 6, label: i18n.t('Pav2Hall6') },\n  { value: 7, label: i18n.t('Pav2Hall7') },\n  { value: 8, label: i18n.t('Pav2Hall8') },\n  { value: 9, label: i18n.t('Pav2Hall9') },\n  { value: 10, label: i18n.t('Pav2Hall10') },\n  { value: 11, label: i18n.t('Pav2Hall11') },\n  { value: 12, label: i18n.t('Pav3Hall12') },\n  { value: 13, label: i18n.t('Pav3Hall13') },\n  { value: 14, label: i18n.t('Pav3Hall14') },\n  { value: 15, label: i18n.t('Pav3Hall15') },\n  { value: 16, label: i18n.t('Pav3Hall16') },\n  { value: 17, label: i18n.t('Pav3Hall17') },\n  { value: 18, label: i18n.t('Pav3Hall18') },\n  { value: 19, label: i18n.t('Pav3Hall19') },\n];\n\nexport const getPavilionLabelByCode = (\n  code: ITEPortal_Contracts_Enums_PavilionHall\n) => {\n  return PavilionOptions.find((p) => p.value === code)?.label;\n};\n","import { useTranslation } from 'react-i18next';\nimport { useBoolean } from '@chakra-ui/react';\nimport { useFormContext } from 'react-hook-form';\nimport { useParams } from '@tanstack/react-router';\nimport { useFormErrorsHandler } from '@/hooks/useFormErrorsHandler';\nimport { typedAxios } from '@/api/typed-axios';\nimport { formOptionsAsValues } from '@/utils/form-options-as-values';\nimport { toast } from 'react-toastify';\nimport { isNil } from '@/utils/is-nil';\nimport { StandFormValues } from './types';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\n\nexport const useStandSave = () => {\n  const { t } = useTranslation();\n  const client = useQueryClient();\n\n  const [isSaving, { toggle }] = useBoolean(false);\n  const instance = useFormContext<StandFormValues>();\n  const { accountId: exhibitorId, exhibitionId } = useParams({ strict: false });\n\n  const { processErrorsObject } = useFormErrorsHandler(instance);\n\n  const saveStand = async (\n    stand: StandFormValues['stands'][number],\n    index: number\n  ) => {\n    if (!isNil(stand.area) && stand.area % 0.25 !== 0) {\n      instance.setError(`stands.${index}.area`, {\n        message: t('divisible-by-quarter', {\n          unit: t('sqm'),\n        }),\n      });\n\n      return;\n    }\n\n    if (!isNil(stand.secondFloorArea) && stand.secondFloorArea % 0.25 !== 0) {\n      instance.setError(`stands.${index}.secondFloorArea`, {\n        message: t('divisible-by-quarter', {\n          unit: t('sqm'),\n        }),\n      });\n\n      return;\n    }\n\n    try {\n      toggle();\n\n      if (stand.id) {\n        await typedAxios.stand.putExhibitionsStands({\n          id: stand.id,\n          exhibitionId: exhibitionId,\n          requestBody: {\n            ...formOptionsAsValues(stand),\n            exhibitorId: exhibitorId,\n          },\n        });\n        toast.success(t('stand-saved'));\n      } else {\n        const rawValues = formOptionsAsValues(stand);\n\n        if (!isNil(stand.id)) {\n          // @ts-expect-error desc\n          delete rawValues.id;\n        }\n\n        await typedAxios.stand.postExhibitionsStands({\n          exhibitionId: exhibitionId,\n          requestBody: { ...rawValues, exhibitorId },\n        });\n\n        toast.success(t('stand-created'));\n      }\n\n      await client.refetchQueries({\n        queryKey: QueryOptions.standsQueryOptions({\n          exhibitionId: +exhibitionId,\n          exhibitorId: +exhibitorId,\n        }).queryKey,\n      });\n    } catch (e) {\n      processErrorsObject(e, {\n        fieldPrefix: `stands.${index}.`,\n        ignoreFields: [`stands.${index}.stand`],\n      });\n    } finally {\n      toggle();\n    }\n  };\n\n  return { isSaving, saveStand };\n};\n","import { Column } from 'react-table';\nimport { Table } from '@/components/Table/Table';\nimport { Flex } from '@chakra-ui/react';\nimport i18n from '@/i18n';\nimport { useSuspenseQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { editExhibitionAccountRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { ITEPortal_Domain_Dto_Bitrix_Deal_StandSharerDto } from '@/api';\nimport { Loader } from '@/components/Loader/Loader';\n\nconst columns = [\n  {\n    Header: i18n.t('company'),\n    accessor: 'companyId',\n  },\n  {\n    Header: i18n.t('area'),\n    accessor: 'area',\n  },\n  {\n    Header: i18n.t('stand-number'),\n    accessor: 'standNumber',\n  },\n  {\n    Header: i18n.t('stand-type'),\n    accessor: 'standConfiguration',\n  },\n] satisfies Array<Column<ITEPortal_Domain_Dto_Bitrix_Deal_StandSharerDto>>;\n\nexport const SubexponentsTab = () => {\n  const { accountId, exhibitionId } = editExhibitionAccountRoute.useParams();\n\n  const { data: stands = [] } = useSuspenseQuery(\n    QueryOptions.standsQueryOptions({\n      exhibitionId: +exhibitionId,\n      exhibitorId: +accountId,\n    })\n  );\n\n  const { data, isLoading } = useSuspenseQuery(\n    QueryOptions.subexponentsQueryOptions({\n      standId: stands?.[0]?.id,\n    })\n  );\n\n  return (\n    <Flex flexDir=\"column\">\n      {isLoading ? <Loader /> : <Table columns={columns} data={data} />}\n    </Flex>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useEffect, useState } from 'react';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { Button, Flex, Stack } from '@chakra-ui/react';\nimport Input from '@/components/Fields/Input';\nimport { useEmployeeSearch } from '@/pages/AdminPanel/PersonalAccounts/UsersTab/hooks/use-employee-search';\nimport { useTranslation } from 'react-i18next';\nimport { type ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto } from '@/api';\nimport {\n  EmployeeFormValues,\n  EmployeeFormSchema,\n} from '@/pages/AdminPanel/PersonalAccounts/UsersTab/types';\nimport { toast } from 'react-toastify';\n\nexport const AddNewEmployeeForm = () => {\n  const { t } = useTranslation();\n  const instance = useForm<EmployeeFormValues>({\n    resolver: zodResolver(EmployeeFormSchema),\n    mode: 'onChange',\n  });\n\n  const [foundModel, setFoundModel] = useState<\n    ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto | null | undefined\n  >(null);\n\n  const { findUser, isSearching } = useEmployeeSearch();\n\n  useEffect(() => {\n    ModalFactory.updateContext(instance);\n  }, [instance]);\n\n  useEffect(() => {\n    if (foundModel && foundModel.email && foundModel.name) {\n      instance.reset({\n        id: foundModel.employeeId,\n        email: foundModel.email,\n        name: foundModel.name,\n        phoneNumber: foundModel.phoneNumber,\n      });\n    } else {\n      instance.reset({\n        name: '',\n      });\n    }\n  }, [foundModel]);\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing={4}>\n        <Flex flexDir=\"row\" gap={4}>\n          <Input<EmployeeFormValues>\n            name=\"email\"\n            placeholder={t('employee-email')}\n            maxWidth=\"unset\"\n          />\n          <Button\n            minW=\"fit-content\"\n            isLoading={isSearching}\n            isDisabled={isSearching}\n            onClick={async () => {\n              const foundEmployee = await findUser(instance);\n\n              if (!foundEmployee) {\n                toast.warning(t('employee-not-found'));\n              }\n\n              setFoundModel(foundEmployee);\n            }}\n          >\n            {t('find-employee')}\n          </Button>\n        </Flex>\n        <Input<EmployeeFormValues>\n          name=\"name\"\n          disabled={Boolean(foundModel)}\n          label={t('employee-name')}\n          maxWidth=\"unset\"\n        />\n        <Input<EmployeeFormValues>\n          name=\"phoneNumber\"\n          disabled={Boolean(foundModel)}\n          label={t('phone')}\n          type=\"tel\"\n          maxWidth=\"unset\"\n        />\n      </Stack>\n    </FormProvider>\n  );\n};\n","import { ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto } from '@/api';\nimport { Column } from 'react-table';\nimport { Table } from '@/components/Table/Table';\nimport { UsersTableActions } from '@/pages/AdminPanel/PersonalAccounts/UsersTab/UsersTableActions';\nimport { Button, ButtonGroup, Flex } from '@chakra-ui/react';\nimport i18n from '@/i18n';\nimport { useEmployeeCreate } from '@/pages/AdminPanel/PersonalAccounts/UsersTab/hooks/use-employee-create';\nimport { editExhibitionAccountRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { useSuspenseQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport dayjs from 'dayjs';\n\nconst columns = [\n  {\n    Header: i18n.t('employee-name'),\n    accessor: 'name',\n  },\n  {\n    Header: 'Email',\n    accessor: 'email',\n  },\n  {\n    Header: i18n.t('phone'),\n    accessor: 'phoneNumber',\n  },\n  {\n    Header: i18n.t('creation-date'),\n    accessor: 'createdDate',\n    Cell: ({ value }) => {\n      if (value && dayjs(value).isValid()) {\n        return <>{dayjs(value).format('DD.MM.YYYY')}</>;\n      }\n\n      return <>-</>;\n    },\n  },\n  {\n    Header: i18n.t('last-visit-date'),\n    accessor: 'lastVisitDate',\n    Cell: ({ value }) => {\n      if (value && dayjs(value).isValid()) {\n        return <>{dayjs(value).format('DD.MM.YYYY')}</>;\n      }\n\n      return <>-</>;\n    },\n  },\n  {\n    id: 'actions',\n    width: 90,\n    Cell: ({ row }) => {\n      return <UsersTableActions row={row} />;\n    },\n  },\n] satisfies Array<\n  Column<ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto>\n>;\n\nexport const UsersTab = () => {\n  const { accountId, exhibitionId } = editExhibitionAccountRoute.useParams();\n\n  const { data } = useSuspenseQuery(\n    QueryOptions.exhibitorQueryOptions({\n      exhibitionId: +exhibitionId,\n      exhibitorId: +accountId,\n    })\n  );\n\n  const exhibitorEmployees = data?.exhibitorEmployees || [];\n\n  const opts = {\n    exhibitionId: +exhibitionId,\n    exhibitorId: +accountId,\n  };\n\n  const { openCreateModal } = useEmployeeCreate(opts);\n\n  return (\n    <Flex flexDir=\"column\">\n      <ButtonGroup gap=\"4\" justifyContent=\"flex-end\">\n        <Button onClick={openCreateModal}>+ {i18n.t('add-employee')}</Button>\n      </ButtonGroup>\n      <Table columns={columns} data={exhibitorEmployees} />\n    </Flex>\n  );\n};\n","import { ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto } from '@/api';\nimport { Row } from 'react-table';\nimport { Flex } from '@chakra-ui/react';\nimport { DeleteIcon } from '@chakra-ui/icons';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { typedAxios } from '@/api/typed-axios';\nimport { editExhibitionAccountRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport i18n from '@/i18n';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { toast } from 'react-toastify';\n\nexport const UsersTableActions = (props: {\n  row: Row<ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto>;\n}) => {\n  const { row } = props;\n  const queryClient = useQueryClient();\n  const { exhibitionId, accountId: exhibitorId } =\n    editExhibitionAccountRoute.useParams();\n\n  const confirmRemoveUserFromExhibition = () => {\n    ModalFactory.confirm({\n      Component: () => <>{i18n.t('remove-employee-from-exhibition')}</>,\n      onOk: async () => {\n        if (row.original.employeeId) {\n          try {\n            await typedAxios.exhibitor.deleteExhibitorsEmployeesExhibitions({\n              exhibitionId: +exhibitionId,\n              employeeId: row.original.employeeId,\n            });\n\n            await queryClient.invalidateQueries(\n              QueryOptions.exhibitorQueryOptions({\n                exhibitionId: +exhibitionId,\n                exhibitorId: +exhibitorId,\n              })\n            );\n\n            ModalFactory.close();\n\n            toast.success(i18n.t('employee-removed-from-exhibition'));\n          } catch {\n            toast.error(i18n.t('error-occurred'));\n          }\n        }\n      },\n    });\n  };\n\n  return (\n    <Flex flexDir=\"row\" gap=\"10px\" justifyContent=\"flex-end\">\n      <DeleteIcon onClick={confirmRemoveUserFromExhibition} />\n    </Flex>\n  );\n};\n","import { useCallback } from 'react';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { useTranslation } from 'react-i18next';\nimport { EmployeeFormValues } from '@/pages/AdminPanel/PersonalAccounts/UsersTab/types';\nimport { UseFormReturn } from 'react-hook-form';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { AddNewEmployeeForm } from '@/pages/AdminPanel/PersonalAccounts/UsersTab/AddNewEmployeeForm';\nimport { typedAxios } from '@/api/typed-axios';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { ApiError } from '@/api';\nimport { toast } from 'react-toastify';\n\nexport const useEmployeeCreate = (opts: {\n  exhibitionId: number;\n  exhibitorId: number;\n}) => {\n  const queryClient = useQueryClient();\n  const { t } = useTranslation();\n\n  const saveEmployee = async (values: EmployeeFormValues) => {\n    try {\n      await typedAxios.exhibitor.postExhibitorsExhibitionEmployees({\n        exhibitorId: opts.exhibitorId,\n        exhibitionId: opts.exhibitionId,\n        requestBody: {\n          email: values.email,\n          name: values.name,\n          phoneNumber: values.phoneNumber,\n        },\n      });\n\n      await queryClient.invalidateQueries(\n        QueryOptions.exhibitorQueryOptions(opts)\n      );\n\n      ModalFactory.close();\n    } catch (e) {\n      if (e instanceof ApiError) {\n        const message = e.body;\n\n        if (message && typeof message === 'string') {\n          toast.error(message);\n        } else {\n          toast.error(t('error-occurred'));\n        }\n      }\n    }\n  };\n\n  const openCreateModal = useCallback(() => {\n    ModalFactory.show({\n      title: t('add-employee'),\n      Component: AddNewEmployeeForm,\n      okLabel: t('add-employee'),\n      onOk: async (ctx: UseFormReturn<EmployeeFormValues>) => {\n        return ctx.handleSubmit(saveEmployee)();\n      },\n    });\n  }, []);\n\n  return {\n    openCreateModal,\n  };\n};\n","import { UseFormReturn } from 'react-hook-form';\nimport { EmployeeFormValues } from '@/pages/AdminPanel/PersonalAccounts/UsersTab/types';\nimport { useBoolean } from '@chakra-ui/react';\nimport { typedAxios } from '@/api/typed-axios';\n\nexport const useEmployeeSearch = () => {\n  const [isSearching, { on, off }] = useBoolean();\n\n  return {\n    isSearching,\n    findUser: async (formInstance: UseFormReturn<EmployeeFormValues>) => {\n      const isValid = await formInstance.trigger('email');\n\n      if (!isValid) {\n        return;\n      }\n\n      const employeeEmail = formInstance.getValues('email');\n\n      try {\n        on();\n\n        const company = await typedAxios.exhibitor.getExhibitors1({\n          email: employeeEmail,\n        });\n\n        if (!company || !company.exhibitorEmployees) {\n          return null;\n        }\n\n        const existingEmployee = company.exhibitorEmployees.find(\n          (e) => e.email === employeeEmail\n        );\n\n        if (!existingEmployee) {\n          return null;\n        }\n\n        return existingEmployee;\n      } catch {\n        return null;\n      } finally {\n        off();\n      }\n    },\n  };\n};\n","import * as v from 'zod';\nimport i18n from '@/i18n';\n\nexport const EmployeeFormSchema = v.object({\n  id: v.number().optional(),\n  email: v.string().email({\n    message: i18n.t('invalid-email'),\n  }),\n  name: v.string().min(1, {\n    message: i18n.t('required-field'),\n  }),\n  phoneNumber: v.string().optional().nullish(),\n});\n\nexport type EmployeeFormValues = v.infer<typeof EmployeeFormSchema>;\n","import { useTranslation } from 'react-i18next';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\n\nimport { ModalFactory } from '@/components/Modal/api';\nimport React, { useCallback } from 'react';\nimport { UseFormReturn } from 'react-hook-form';\nimport {\n  EditManagerModal,\n  ValidationSchemaType,\n} from '@/pages/AdminPanel/PersonalAccounts/Modals/EditManagerModal';\nimport { ApiError, ITEPortal_Domain_Dto_AdminExhibitorSummary } from '@/api';\nimport { useParams } from '@tanstack/react-router';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\n\nexport type SaveTechnicalManagers = ValidationSchemaType & {\n  selectedRows: ITEPortal_Domain_Dto_AdminExhibitorSummary[];\n};\n\nexport const useEditTechnicalManagers = () => {\n  const { t } = useTranslation();\n  const queryClient = new QueryClient();\n  const { exhibitionId } = useParams({ strict: false });\n\n  const saveTechnicalManagers = async (\n    values: SaveTechnicalManagers,\n    refresh: () => void,\n    setShowBulkAction: (value: boolean) => void\n  ) => {\n    const rowIds = values?.selectedRows.map((row) => row?.id);\n\n    try {\n      await typedAxios.exhibitor.putExhibitorsExhibition({\n        exhibitionId: +exhibitionId,\n        requestBody: {\n          technicalManagerEmail: values?.technicalManager?.label,\n          exhibitorIds: rowIds,\n        },\n      });\n\n      ModalFactory.close();\n      refresh();\n      setShowBulkAction(false);\n      toast.success(t('exhibitorsUpdated'));\n    } catch (e) {\n      if (e instanceof ApiError) {\n        const message = e.body;\n\n        if (message && typeof message === 'string') {\n          toast.error(message);\n        } else {\n          toast.error(t('error-occurred'));\n        }\n      }\n    }\n  };\n\n  const openEditTechnicalManagersModal = useCallback(\n    (\n      selectedRows: ITEPortal_Domain_Dto_AdminExhibitorSummary[],\n      refresh: () => void,\n      setShowBulkAction: (value: boolean) => void\n    ) => {\n      ModalFactory.show({\n        title: t('personal-accounts-edit'),\n        Component: () => (\n          <QueryClientProvider client={queryClient}>\n            <EditManagerModal exhibitionId={exhibitionId} />\n          </QueryClientProvider>\n        ),\n        okLabel: t('save'),\n        onOk: async (ctx: UseFormReturn<ValidationSchemaType>) => {\n          return ctx.handleSubmit(() =>\n            saveTechnicalManagers(\n              { ...ctx.getValues(), selectedRows },\n              refresh,\n              setShowBulkAction\n            )\n          )();\n        },\n      });\n    },\n    []\n  );\n\n  return {\n    openEditTechnicalManagersModal,\n  };\n};\n","import { useForm, FormProvider } from 'react-hook-form';\nimport {\n  ButtonGroup,\n  FormControl,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Stack,\n} from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport Input from '@/components/Fields/Input';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { t } from 'i18next';\nimport { OptionType } from '@/model/common';\n\nimport { ITEPortal_Domain_Dto_AdminPriceListItem } from '../../../../api';\nimport { useCreateOrderContext } from './CreateOrderContext';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ninterface AddBuildingTypeProductProps {\n  openConfirm: boolean;\n  closeModal: () => void;\n  items: ITEPortal_Domain_Dto_AdminPriceListItem[];\n}\n\ntype FormValues = {\n  id: OptionType<{\n    item: ITEPortal_Domain_Dto_AdminPriceListItem;\n  }>;\n  amount: number;\n  dayAmount: number;\n  peopleAmount: number;\n  language: string;\n};\n\nexport const AddItemToOrderModal = ({\n  openConfirm,\n  closeModal,\n}: AddBuildingTypeProductProps) => {\n  const { items, addItem } = useCreateOrderContext();\n\n  const formInstance = useForm<FormValues>({\n    mode: 'onBlur',\n  });\n\n  const submitHandler = async (values: FormValues) => {\n    const id = values?.id;\n    const dayAmount = values?.dayAmount || 0;\n    const peopleAmount = values?.peopleAmount || 0;\n    const amount = values?.amount || 0;\n    const language = values?.language || '';\n\n    const data = { dayAmount, peopleAmount, language, amount, id };\n\n    const item = values.id?.meta?.item;\n\n    if (!item || !item.name) {\n      formInstance.setError('id', {\n        message: 'todo error message',\n      });\n\n      return;\n    }\n\n    addItem?.({\n      ...data,\n      id: item.name,\n      productName: item.displayName,\n    });\n\n    if (item.includedPriceListItems?.length) {\n      item.includedPriceListItems.forEach((it) => {\n        const originalPriceListItem = items.find(\n          (oit) => oit.id === it.includedPricelistItemId\n        );\n\n        if (originalPriceListItem && originalPriceListItem.name) {\n          addItem?.({\n            id: originalPriceListItem.name,\n            amount: it.quantity,\n            productName: originalPriceListItem.displayName,\n            included: true,\n          });\n        }\n      });\n    }\n\n    closeModal();\n  };\n\n  const itemsOptions = useMemo(() => {\n    return items.map((i) => {\n      return {\n        value: i.id,\n        label: `${i.name} (${i.displayName})`,\n        meta: {\n          item: i,\n        },\n      };\n    }) satisfies Array<\n      OptionType<{\n        item: ITEPortal_Domain_Dto_AdminPriceListItem;\n      }>\n    >;\n  }, [items]);\n\n  return (\n    <Modal\n      isOpen={openConfirm}\n      onClose={closeModal}\n      size=\"xl\"\n      scrollBehavior=\"inside\"\n      isCentered\n    >\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{useNameTranslate('add-product')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>\n          <FormProvider {...formInstance}>\n            <form>\n              <Stack spacing=\"5\">\n                <FormControlWrapper>\n                  <SelectComponent<FormValues>\n                    label={useNameTranslate('service-name')}\n                    maxWidth=\"100%\"\n                    name=\"id\"\n                    options={itemsOptions}\n                    isRequired\n                  />\n                  <Input<FormValues>\n                    label={`${useNameTranslate('amount')} / ${useNameTranslate(\n                      'sqm'\n                    )}`}\n                    maxWidth=\"100%\"\n                    name=\"amount\"\n                  />\n                  <Input<FormValues>\n                    label={useNameTranslate('dayAmountPlaceholder')}\n                    maxWidth=\"100%\"\n                    name=\"dayAmount\"\n                  />\n                  <Input<FormValues>\n                    label={useNameTranslate('personAmountPlaceholder')}\n                    maxWidth=\"100%\"\n                    name=\"peopleAmount\"\n                  />\n                  <Input<FormValues>\n                    label={useNameTranslate('language')}\n                    maxWidth=\"100%\"\n                    name=\"language\"\n                  />\n                </FormControlWrapper>\n              </Stack>\n            </form>\n          </FormProvider>\n        </ModalBody>\n        <ModalFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <OrderButton\n              colorScheme=\"red\"\n              onClick={formInstance.handleSubmit(submitHandler)}\n            >\n              {t('save')}\n            </OrderButton>\n            <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n              {t('cancel')}\n            </OrderButton>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import { Table } from '../../../../components/Table/Table';\nimport React, { useMemo } from 'react';\nimport { NumberColumnComponent } from '../shared/NumberColumnComponent';\nimport { useTranslation } from 'react-i18next';\nimport { OrderControls } from './OrderControls';\nimport { Box } from '@chakra-ui/react';\nimport { useCreateOrderContext } from './CreateOrderContext';\nimport { CreateOrderButton } from './CreateOrderButton';\nimport { DeleteIcon } from '@chakra-ui/icons';\nimport { Column, Row } from 'react-table';\nimport { ITEPortal_Domain_Dto_OrderItemDto } from '../../../../api';\n\nexport const AddedToOrderItemsTable = () => {\n  const { t } = useTranslation();\n  const { selectedItems, removeItem } = useCreateOrderContext();\n\n  const columns = useMemo<\n    Array<Column<ITEPortal_Domain_Dto_OrderItemDto>>\n  >(() => {\n    return [\n      {\n        Header: t('service-id'),\n        accessor: 'id',\n        width: '15%',\n      },\n      {\n        Header: t('service-name'),\n        accessor: 'productName',\n        width: '30%',\n      },\n      {\n        accessor: 'orderItemId',\n        show: false,\n      },\n      {\n        Header: `${t('amount')}`,\n        accessor: 'amount',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.amount} />\n        ),\n      },\n      {\n        Header: `${t('dayAmountPlaceholder')}`,\n        accessor: 'dayAmount',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.dayAmount} />\n        ),\n      },\n      {\n        Header: `${t('personAmountPlaceholder')}`,\n        accessor: 'peopleAmount',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.peopleAmount} />\n        ),\n      },\n      {\n        Header: `${t('language')}`,\n        accessor: 'language',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.language} />\n        ),\n      },\n      {\n        Header: '',\n        id: 'options',\n        width: '5%',\n        Cell: ({ row }: { row: Row<ITEPortal_Domain_Dto_OrderItemDto> }) => {\n          return (\n            <>\n              <DeleteIcon onClick={() => removeItem?.(row.original)} />\n            </>\n          );\n        },\n      },\n    ];\n  }, []);\n\n  return (\n    <Box marginTop=\"20px\">\n      <OrderControls />\n      <Table columns={columns} data={selectedItems} />\n      <CreateOrderButton />\n    </Box>\n  );\n};\n","import { createOrderRoute } from '../../../../features/Routing/protected/admin-exhibitions';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { SelectComponent } from '../../../../components/MultiSelect/MultiSelect';\nimport { useTranslation } from 'react-i18next';\nimport { useEffect, useMemo, useReducer } from 'react';\nimport { typedAxios } from '../../../../api/typed-axios';\nimport {\n  ITEPortal_Domain_Dto_AdminPriceListItem,\n  type ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto,\n  ITEPortal_Domain_Dto_ExhibitorStandDto,\n  ITEPortal_Domain_Dto_OrderItemDto,\n} from '../../../../api';\nimport { AddedToOrderItemsTable } from './AddedToOrderItemsTable';\nimport {\n  CreateOrderContextProvider,\n  CreateOrderContextType,\n} from './CreateOrderContext';\nimport { Box, Stack } from '@chakra-ui/react';\nimport { ORDER_STATUSES } from '../../../../constants/order';\nimport { useNavigate } from '@tanstack/react-router';\n// import { useQueryClient } from '@tanstack/react-query';\n// import { QueryOptions } from '@/features/query/query-options';\nimport { OptionType } from '@/model/common';\nimport {\n  CreateOrderFormSchema,\n  CreateOrderFormSchemaType,\n} from '@/pages/AdminPanel/PlacedOrders/CreateOrder/types';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { NoStandsLink } from '@/pages/AdminPanel/PlacedOrders/CreateOrder/NoStandsLink';\nimport { NoPriceListsLink } from '@/pages/AdminPanel/PlacedOrders/CreateOrder/NoPriceListsLink';\nimport { toast } from 'react-toastify';\n\ntype CreateOrderPageStateType = {\n  itemsSource: ITEPortal_Domain_Dto_AdminPriceListItem[];\n  availableItems: ITEPortal_Domain_Dto_AdminPriceListItem[];\n  stands: ITEPortal_Domain_Dto_ExhibitorStandDto[];\n  selectedItems: ITEPortal_Domain_Dto_OrderItemDto[];\n  employees: Array<ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto>;\n  exhibitorId?: number;\n  hasPriceList: boolean;\n};\n\ntype ActionsType =\n  | {\n      type: 'ADD_ITEM';\n      payload: ITEPortal_Domain_Dto_OrderItemDto;\n    }\n  | {\n      type: 'REMOVE_ITEM';\n      payload: ITEPortal_Domain_Dto_OrderItemDto;\n    }\n  | {\n      type: 'PREPARE';\n      payload: {\n        stands: ITEPortal_Domain_Dto_ExhibitorStandDto[];\n        sourceItems: ITEPortal_Domain_Dto_AdminPriceListItem[];\n        employees: ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto[];\n        exhibitorId?: number;\n        hasPriceList: boolean;\n      };\n    };\n\nconst reducer = (\n  state: CreateOrderPageStateType,\n  action: ActionsType\n): CreateOrderPageStateType => {\n  switch (action.type) {\n    case 'PREPARE': {\n      return {\n        ...state,\n        selectedItems: [],\n        stands: action.payload.stands,\n        itemsSource: action.payload.sourceItems,\n        availableItems: action.payload.sourceItems,\n        employees: action.payload.employees,\n        exhibitorId: action.payload.exhibitorId,\n        hasPriceList: action.payload.hasPriceList,\n      };\n    }\n\n    case 'ADD_ITEM': {\n      return {\n        ...state,\n        selectedItems: [...state.selectedItems, action.payload],\n        availableItems: state.availableItems.filter(\n          (i) => i.name !== action.payload.id\n        ),\n      };\n    }\n\n    case 'REMOVE_ITEM': {\n      const selectedItems = state.selectedItems.filter(\n        (s) => s.id !== action.payload.id\n      );\n\n      return {\n        ...state,\n        selectedItems,\n        availableItems: state.itemsSource.filter(\n          (s) => !selectedItems.find((selected) => selected.id !== s.name)\n        ),\n      };\n    }\n\n    default:\n      action satisfies never;\n  }\n\n  return state;\n};\n\nexport const CreateOrder = () => {\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n  // const queryClient = useQueryClient();\n  const { exhibitorId: exhibitorIdFromQuery } = createOrderRoute.useSearch();\n  const [state, dispatch] = useReducer<typeof reducer>(reducer, {\n    availableItems: [],\n    itemsSource: [],\n    stands: [],\n    selectedItems: [],\n    employees: [],\n    hasPriceList: false,\n  });\n\n  const {\n    exhibitorId,\n    employees,\n    availableItems,\n    selectedItems,\n    itemsSource,\n    stands,\n    hasPriceList,\n  } = state;\n\n  const hasStands = stands.length > 0;\n\n  const couldAddItems = itemsSource.length > 0 && hasStands;\n\n  const { exhibitors } = createOrderRoute.useLoaderData();\n  const { exhibitionId } = createOrderRoute.useParams();\n\n  const formInstance = useForm<CreateOrderFormSchemaType>({\n    resolver: zodResolver(CreateOrderFormSchema),\n  });\n\n  useEffect(() => {\n    if (exhibitorIdFromQuery) {\n      const exhibitor = exhibitors.find(\n        (ex) => ex.value === exhibitorIdFromQuery\n      );\n\n      if (exhibitor) {\n        formInstance.setValue(\n          'exhibitorId',\n          // @ts-expect-error desc\n          exhibitor,\n          {\n            shouldDirty: true,\n            shouldTouch: true,\n          }\n        );\n      }\n    }\n  }, [exhibitorIdFromQuery]);\n\n  const ex = formInstance.watch('exhibitorId');\n\n  const employeesOptions = useMemo<\n    Array<OptionType<ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto>>\n  >(() => {\n    return employees.map((e) => {\n      return {\n        value: e.userId ? `${e.userId}` : '',\n        label: `${e.name} (${e.email})`,\n        meta: e,\n      };\n    });\n  }, [employees]);\n\n  const standsOptions = useMemo<\n    Array<OptionType<ITEPortal_Domain_Dto_ExhibitorStandDto>>\n  >(() => {\n    return stands.map((s) => {\n      return {\n        value: s.id,\n        label: s.standNumber,\n        meta: s,\n      };\n    });\n  }, [stands]);\n\n  useEffect(\n    function updateDueToExhibitorChange() {\n      const updateDueToExChange = async () => {\n        if (!ex) {\n          return;\n        }\n\n        const exhibitor = ex?.meta;\n\n        if (!exhibitor?.id || !exhibitor?.priceListId) {\n          dispatch({\n            type: 'PREPARE',\n            payload: {\n              stands: [],\n              sourceItems: [],\n              employees: [],\n              exhibitorId: exhibitor?.id,\n              hasPriceList: false,\n            },\n          });\n\n          return;\n        }\n\n        formInstance.resetField('employeeId');\n\n        const exhibitorEmployees = Array.isArray(exhibitor.exhibitorEmployees)\n          ? (exhibitor.exhibitorEmployees as Array<ITEPortal_Domain_Dto_Exhibitor_GetExhibitorEmployeeDto>)\n          : [];\n\n        console.log(\n          exhibitorEmployees,\n          !Array.isArray(employees),\n          employees.length,\n          employees.length === 0\n        );\n\n        // if (!Array.isArray(employees) || employees.length === 0) {\n        //   const exhibitorModel = await queryClient.fetchQuery(\n        //     QueryOptions.exhibitorQueryOptions({\n        //       exhibitionId: +exhibitionId,\n        //       exhibitorId: +exhibitor.id,\n        //     })\n        //   );\n        //\n        //   if (Array.isArray(exhibitorModel.exhibitorEmployees)) {\n        //     exhibitorEmployees = exhibitorModel.exhibitorEmployees;\n        //   }\n        // }\n\n        const loadedItems =\n          await typedAxios.priceListItem.getExhibitionsPriceListsItems({\n            exhibitionId: +exhibitionId,\n            priceListId: exhibitor.priceListId,\n          });\n\n        let loadedStands: ITEPortal_Domain_Dto_ExhibitorStandDto[] = [];\n\n        if (exhibitor.id) {\n          const exhibitorStands =\n            await typedAxios.stand.getExhibitionsExhibitorsStands({\n              exhibitionId: +exhibitionId,\n              exhibitorId: exhibitor.id,\n            });\n\n          loadedStands = exhibitorStands;\n        }\n\n        dispatch({\n          type: 'PREPARE',\n          payload: {\n            stands: loadedStands,\n            sourceItems: loadedItems,\n            employees: exhibitorEmployees,\n            exhibitorId: exhibitor.id,\n            hasPriceList: true,\n          },\n        });\n      };\n\n      updateDueToExChange();\n    },\n    [ex]\n  );\n\n  const addItem: CreateOrderContextType['addItem'] = (item) => {\n    dispatch({\n      type: 'ADD_ITEM',\n      payload: item,\n    });\n  };\n\n  const removeItem: CreateOrderContextType['removeItem'] = (item) => {\n    dispatch({\n      type: 'REMOVE_ITEM',\n      payload: item,\n    });\n  };\n\n  const createOrder = async () => {\n    const isValid = await formInstance.trigger();\n\n    if (!isValid) {\n      return;\n    }\n\n    try {\n      const selectedExhibitorId = formInstance.getValues('exhibitorId.value');\n      const employeeId = formInstance.getValues('employeeId.value');\n      const standId = formInstance.getValues('standId.value');\n\n      const createdOrderId = await typedAxios.order.postOrdersExhibitors({\n        exhibitorId: +selectedExhibitorId,\n        requestBody: {\n          exhibitionId: +exhibitionId,\n          orderStatus: ORDER_STATUSES.Submitted,\n          standId: +standId,\n          products: selectedItems,\n          employeeUserId: +employeeId,\n        },\n      });\n\n      navigate({\n        to: `/admin/exhibitions/${exhibitionId}/view/placed-orders/${createdOrderId}/edit`,\n      });\n    } catch (e) {\n      toast.error(t('order-save-error'));\n\n      console.dir(e);\n    }\n  };\n\n  return (\n    <CreateOrderContextProvider\n      value={{\n        addItem,\n        removeItem,\n        items: availableItems,\n        selectedItems,\n        createOrder,\n      }}\n    >\n      <FormProvider {...formInstance}>\n        {/* this looks odd, but, ensures that dropdown of the select doesn't overlapped and visible */}\n        <Box paddingBottom={270}>\n          <Stack spacing={4}>\n            <SelectComponent\n              label={t('exhibitor')}\n              name=\"exhibitorId\"\n              isRequired\n              options={exhibitors}\n            />\n            {employeesOptions.length > 0 && (\n              <SelectComponent\n                label={t('employee')}\n                name=\"employeeId\"\n                isRequired\n                options={employeesOptions}\n              />\n            )}\n            {hasStands && (\n              <SelectComponent\n                name=\"standId\"\n                isRequired\n                label={t('stand')}\n                options={standsOptions}\n              />\n            )}\n          </Stack>\n          {!hasPriceList && exhibitorId && (\n            <NoPriceListsLink\n              exhibitorId={+exhibitorId}\n              exhibitionId={+exhibitionId}\n            />\n          )}\n          {hasPriceList && !hasStands && exhibitorId && (\n            <NoStandsLink\n              exhibitionId={+exhibitionId}\n              exhibitorId={exhibitorId}\n            />\n          )}\n\n          {couldAddItems && <AddedToOrderItemsTable />}\n        </Box>\n      </FormProvider>\n    </CreateOrderContextProvider>\n  );\n};\n","import { Button } from '../../../../components/Buttons/Button/Button';\nimport { Box } from '@chakra-ui/react';\nimport React, { useState } from 'react';\nimport { useCreateOrderContext } from './CreateOrderContext';\nimport { useTranslation } from 'react-i18next';\n\nexport const CreateOrderButton = () => {\n  const { t } = useTranslation();\n  const { selectedItems, createOrder } = useCreateOrderContext();\n  const [isLoading, toggleLoading] = useState(false);\n\n  const hasItems = selectedItems.length > 0;\n\n  const onClick = async () => {\n    try {\n      toggleLoading(true);\n\n      await createOrder?.();\n    } finally {\n      toggleLoading(false);\n    }\n  };\n\n  if (!hasItems) {\n    return null;\n  }\n\n  return (\n    <Box paddingTop=\"20px\" justifyContent=\"flex-end\" display=\"flex\">\n      <Button\n        colorScheme=\"primary\"\n        isLoading={isLoading}\n        disabled={isLoading}\n        onClick={onClick}\n      >\n        {t('save')}\n      </Button>\n    </Box>\n  );\n};\n","import { createContext, useContext } from 'react';\nimport {\n  ITEPortal_Domain_Dto_AdminPriceListItem,\n  ITEPortal_Domain_Dto_OrderItemDto,\n} from '../../../../api';\n\nexport type CreateOrderContextType = {\n  addItem?: (item: ITEPortal_Domain_Dto_OrderItemDto) => void;\n  removeItem?: (item: ITEPortal_Domain_Dto_OrderItemDto) => void;\n  items: ITEPortal_Domain_Dto_AdminPriceListItem[];\n  selectedItems: ITEPortal_Domain_Dto_OrderItemDto[];\n  createOrder?: () => Promise<void>;\n};\n\nconst CreateOrderContext = createContext<CreateOrderContextType>({\n  items: [],\n  selectedItems: [],\n});\n\nexport const useCreateOrderContext = () => useContext(CreateOrderContext);\n\nexport const CreateOrderContextProvider = CreateOrderContext.Provider;\n","import { Alert, AlertIcon, Link } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\n\ntype NoStandsLinkPropsType = {\n  exhibitionId: number;\n  exhibitorId: number;\n};\n\nexport const NoPriceListsLink = (props: NoStandsLinkPropsType) => {\n  const { t } = useTranslation();\n\n  return (\n    <Alert status=\"warning\" mt={4} mb={4} whiteSpace=\"break-spaces\">\n      <AlertIcon />\n      {t('no-price-lists-warning', {\n        here: (\n          <Link\n            fontWeight=\"bolder\"\n            textDecoration=\"underline\"\n            target=\"_blank\"\n            href={`/admin/exhibitions/${props.exhibitionId}/edit`}\n          >\n            {t('here')}\n          </Link>\n        ),\n        postProcess: 'reactPostprocessor',\n      })}\n    </Alert>\n  );\n};\n","import { useRBAC } from '@/features/rbac/useRBAC';\nimport { Alert, AlertIcon, Link } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\n\ntype NoStandsLinkPropsType = {\n  exhibitionId: number;\n  exhibitorId: number;\n};\n\nexport const NoStandsLink = (props: NoStandsLinkPropsType) => {\n  const { t } = useTranslation();\n  const { can } = useRBAC();\n\n  return (\n    <Alert status=\"warning\" mt={4} mb={4} whiteSpace=\"break-spaces\">\n      <AlertIcon />\n      {can('canAddStand')\n        ? t('no-stands-warning', {\n            here: (\n              <Link\n                fontWeight=\"bolder\"\n                textDecoration=\"underline\"\n                target=\"_blank\"\n                href={`/admin/exhibitions/${props.exhibitionId}/view/personal-accounts/${props.exhibitorId}/edit/?tab=stands`}\n              >\n                {t('here')}\n              </Link>\n            ),\n            postProcess: 'reactPostprocessor',\n          })\n        : t('no-stands-warning-without-link')}\n    </Alert>\n  );\n};\n","import { Box, Button } from '@chakra-ui/react';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { useTranslation } from 'react-i18next';\nimport { AddItemToOrderModal } from './AddItemToOrderModal';\n\nconst AddButtonWrapper = styled(Box)`\n  padding-bottom: 10px;\n  display: flex;\n  flex-direction: row;\n  justify-content: end;\n  gap: 20px;\n`;\n\nexport const OrderControls = () => {\n  const { t } = useTranslation();\n  const [isOpened, setIsOpened] = useState(false);\n\n  return (\n    <AddButtonWrapper>\n      <Button colorScheme=\"red\" onClick={() => setIsOpened(true)}>\n        {t('add-service')}\n      </Button>\n      {isOpened && (\n        <AddItemToOrderModal\n          items={[]}\n          openConfirm={isOpened}\n          closeModal={() => setIsOpened(false)}\n        />\n      )}\n    </AddButtonWrapper>\n  );\n};\n","import * as v from 'zod';\nimport type { ITEPortal_Domain_Dto_AdminExhibitorSummary } from '@/api';\n\nexport const CreateOrderFormSchema = v.object({\n  exhibitorId: v.object({\n    value: v.coerce.string(),\n    label: v.string(),\n    meta: v.custom<ITEPortal_Domain_Dto_AdminExhibitorSummary>(\n      (data): data is ITEPortal_Domain_Dto_AdminExhibitorSummary => {\n        return (\n          typeof (data as ITEPortal_Domain_Dto_AdminExhibitorSummary)?.[\n            'id'\n          ] === 'number'\n        );\n      }\n    ),\n  }),\n  employeeId: v.object({\n    value: v.coerce.string(),\n    label: v.string(),\n  }),\n  standId: v.object({\n    value: v.coerce.string(),\n    label: v.string(),\n  }),\n});\n\nexport type CreateOrderFormSchemaType = v.infer<typeof CreateOrderFormSchema>;\n","import React, { useState } from 'react';\nimport { Flex, Link, Button, Box, Text, Tooltip } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport {\n  DeleteIcon,\n  EditIcon,\n  DownloadIcon,\n  EmailIcon,\n  InfoIcon,\n  ArrowUpIcon,\n} from '@chakra-ui/icons';\nimport styled from 'styled-components';\n\nimport { Card } from '@/components/Card/Card';\nimport { Table } from '@/components/Table/Table';\nimport fetchApi from '@/utils/fetchAPI';\nimport { DELETE_ORDER_ITEM, GET_PDF_BY_ORDER } from '@/constants/endpoints';\nimport { EditOrderForm } from '@/pages/AdminPanel/PlacedOrders/EditOrder/EditOrderForm';\nimport { toast } from 'react-toastify';\nimport { IdType } from '@/model/common';\nimport { ConfirmModal } from '@/pages/ConfirmModal';\nimport { FetchMethods } from '@/utils/constants';\nimport { NumberColumnComponent } from '../shared/NumberColumnComponent';\nimport { editOrderRoute } from '../../../../features/Routing/protected/admin-exhibitions';\nimport { useRouter } from '@tanstack/react-router';\nimport { PersonalDiscount } from './PersonalDiscount';\nimport { MarkupManagement } from './MarkupManagement';\nimport { numberWithSpaces } from '../../../../utils/amountTransformation';\nimport { AsyncButton } from '../../../../components/AsyncButton';\nimport { FileUtils } from '../../../../utils/file-utils';\nimport { useSendOrderEmail } from './hooks/use-send-order-email';\nimport { Column, Row } from 'react-table';\nimport type { ITEPortal_Domain_Dto_OrderItemDto } from '../../../../api';\nimport { isNil } from '../../../../utils/is-nil';\nimport { useRBAC } from '@/features/rbac/useRBAC';\nimport { useExportOrder } from '@/pages/AdminPanel/PlacedOrders/hooks/use-export-order';\nimport { useExhibition } from '@/store/effector/exhibition';\n\nconst AddButtonWrapper = styled(Box)`\n  padding-bottom: 10px;\n  display: flex;\n  flex-direction: row;\n  justify-content: end;\n  gap: 20px;\n  flex-wrap: wrap;\n  align-items: center;\n`;\n\nconst TotalRowContainer = styled.div`\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  padding: 25px 25px 10px 0;\n  min-width: 225px;\n`;\n\ninterface OrderOptionsType {\n  row: Row<ITEPortal_Domain_Dto_OrderItemDto>;\n}\n\nexport const EditOrder = (): JSX.Element => {\n  const router = useRouter();\n  const { can } = useRBAC();\n  const { order } = editOrderRoute.useLoaderData();\n  const { orderId, exhibitionId } = editOrderRoute.useParams();\n  const culture = localStorage.getItem('lang');\n  const [openConfirm, setOpenConfirm] = useState(false);\n  const [editTableData, setEditTableData] =\n    useState<ITEPortal_Domain_Dto_OrderItemDto | null>(null);\n  const [orderItem, setOrderItem] = useState<IdType>();\n  const [openConfirmDeleteModal, setOpenConfirmDeleteModal] = useState(false);\n  const { t } = useTranslation();\n  const { requestSendOrderEmail } = useSendOrderEmail(orderId);\n  const exhibition = useExhibition();\n  const { openExportModal } = useExportOrder();\n\n  const closeConfirmDeleteModal = () => setOpenConfirmDeleteModal(false);\n\n  const closeModal = () => setOpenConfirm(false);\n\n  const OrderRowOptions = ({ row }: OrderOptionsType) => {\n    const rowValues = row.original;\n\n    const editProduct = () => {\n      setEditTableData(rowValues);\n      setOpenConfirm(!openConfirm);\n    };\n\n    return (\n      <Flex gap={4} flexDirection=\"row\">\n        <Link onClick={editProduct}>\n          <EditIcon />\n        </Link>\n        <Link\n          onClick={() => {\n            if (!isNil(rowValues.orderItemId)) {\n              showDeleteModal(rowValues.orderItemId);\n            }\n          }}\n        >\n          <DeleteIcon />\n        </Link>\n      </Flex>\n    );\n  };\n\n  const showDeleteModal = (id: IdType) => {\n    setOrderItem(id);\n    setOpenConfirmDeleteModal(!openConfirmDeleteModal);\n  };\n\n  const orderColumns = React.useMemo<\n    Array<Column<ITEPortal_Domain_Dto_OrderItemDto>>\n  >(\n    () => [\n      {\n        Header: t('order-id'),\n        accessor: 'id',\n        width: '10%',\n      },\n      {\n        Header: t('service-name'),\n        accessor: 'productName',\n        width: '30%',\n        Cell: ({ row: { original } }) => {\n          if (!original.included) {\n            return <>{original.productName}</>;\n          }\n\n          return (\n            <>\n              {original.productName}{' '}\n              <Tooltip\n                label={t('included-into-price-of')}\n                placement=\"top\"\n                hasArrow\n              >\n                <InfoIcon color=\"brandColor\" />\n              </Tooltip>\n            </>\n          );\n        },\n      },\n      {\n        accessor: 'orderItemId',\n        show: false,\n      },\n      {\n        Header: `${t('amount')}`,\n        accessor: 'amount',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.amount} />\n        ),\n      },\n      {\n        Header: `${t('dayAmountPlaceholder')}`,\n        accessor: 'dayAmount',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.dayAmount} />\n        ),\n      },\n      {\n        Header: `${t('personAmountPlaceholder')}`,\n        accessor: 'peopleAmount',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.peopleAmount} />\n        ),\n      },\n      {\n        Header: `${t('language')}`,\n        accessor: 'language',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <NumberColumnComponent value={values?.language} />\n        ),\n      },\n      {\n        Header: '',\n        id: 'options',\n        width: '5%',\n        Cell: ({ row }) => <OrderRowOptions row={row} />,\n      },\n    ],\n    []\n  );\n\n  const addProduct = () => {\n    setEditTableData(null);\n    setOpenConfirm(!openConfirm);\n  };\n\n  const downloadPDF = async () => {\n    if (order.orderId) {\n      try {\n        const { data } = await fetchApi(GET_PDF_BY_ORDER(order.orderId), {\n          method: FetchMethods.Get,\n          responseType: 'blob',\n          params: {\n            culture,\n          },\n        });\n\n        FileUtils.saveBlobAsFile(data, `exhibition-order-${order.orderId}.pdf`);\n      } catch (e) {\n        toast.error(t('unable-to-download', { object: 'PDF' }));\n      }\n    }\n  };\n\n  const deleteOrderItem = async () => {\n    try {\n      await fetchApi(DELETE_ORDER_ITEM(exhibitionId, orderId), {\n        method: FetchMethods.Delete,\n        params: {\n          orderItemId: orderItem,\n        },\n      });\n\n      toast.success(t('order-item-deleted'));\n\n      router.invalidate();\n    } catch (error: any) {\n      const fieldErrors = error?.response?.data?.errors;\n\n      if (fieldErrors) {\n        toast.error(fieldErrors);\n      }\n    }\n  };\n\n  return (\n    <>\n      <AddButtonWrapper>\n        <AsyncButton colorScheme=\"red\" onClick={requestSendOrderEmail}>\n          <EmailIcon mr={1} />\n          {t('send-email')}\n        </AsyncButton>\n        {exhibition?.eventEditionId && (\n          <AsyncButton onClick={openExportModal}>\n            <ArrowUpIcon mr={1} />\n            {t('bitrixExport')}\n          </AsyncButton>\n        )}\n        <AsyncButton marginRight=\"auto\" onClick={downloadPDF}>\n          <DownloadIcon mr={1} />\n          {t('downloadPdf')}\n        </AsyncButton>\n        {can('canRemoveSurchargeFromOrder') && (\n          <MarkupManagement order={order} />\n        )}\n        {can('canAddOrderPersonalDiscount') && (\n          <PersonalDiscount order={order} />\n        )}\n        <Button colorScheme=\"red\" onClick={addProduct}>\n          {t('add-service')}\n        </Button>\n      </AddButtonWrapper>\n      <Card>\n        {openConfirm && (\n          <EditOrderForm\n            openConfirm={openConfirm}\n            closeModal={closeModal}\n            editTableData={editTableData}\n          />\n        )}\n        <Table columns={orderColumns} data={order.products || []} />\n        <Flex justifyContent=\"flex-end\">\n          <TotalRowContainer>\n            <Text fontSize=\"md\">{t('cartTotal')}</Text>\n            <Text fontSize=\"md\" fontWeight=\"700\">\n              {numberWithSpaces(\n                order.orderSummary || 0,\n                order.currency || 'RUB',\n                false\n              )}\n            </Text>\n          </TotalRowContainer>\n        </Flex>\n        {openConfirmDeleteModal && (\n          <ConfirmModal\n            modalMessage={t('delete-order-item-message')}\n            isOpen={openConfirmDeleteModal}\n            closeModal={closeConfirmDeleteModal}\n            confirm={deleteOrderItem}\n          />\n        )}\n      </Card>\n    </>\n  );\n};\n","import {\n  FieldValues,\n  useForm,\n  FormProvider,\n  useController,\n} from 'react-hook-form';\nimport {\n  ButtonGroup,\n  FormControl,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Stack,\n} from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport Input from '@/components/Fields/Input';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { t } from 'i18next';\nimport { toast } from 'react-toastify';\nimport { OptionType } from '@/model/common';\nimport { editOrderRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { useRouter } from '@tanstack/react-router';\nimport { typedAxios } from '@/api/typed-axios';\nimport {\n  ITEPortal_Domain_Dto_AdminPriceListItem,\n  ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto,\n} from '@/api';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ninterface AddBuildingTypeProductProps {\n  openConfirm: boolean;\n  closeModal: () => void;\n  editTableData?: any;\n}\n\nconst defaultValues = {\n  id: null,\n  amount: null,\n  dayAmount: null,\n  peopleAmount: null,\n  language: null,\n};\n\nexport const EditOrderForm = ({\n  openConfirm,\n  closeModal,\n  editTableData,\n}: AddBuildingTypeProductProps) => {\n  const { orderId, exhibitionId } = editOrderRoute.useParams();\n  const router = useRouter();\n  const { items } = editOrderRoute.useLoaderData();\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [editData, setEditData] = useState<any>();\n\n  const products = useMemo(() => {\n    return items.map((i) => ({\n      value: i.name || i.id,\n      label: `${i.name || i.id} (${i.displayName})`,\n      meta: i,\n    })) satisfies OptionType<ITEPortal_Domain_Dto_AdminPriceListItem>[];\n  }, [items]);\n\n  useEffect(() => {\n    if (!editTableData) {\n      setEditData(defaultValues);\n    }\n\n    if (editTableData) {\n      const orderItemData = [] as any;\n\n      Object.keys(editTableData).forEach((field) => {\n        orderItemData[field] =\n          field === 'id'\n            ? {\n                value: editTableData?.id,\n                label: editTableData?.productName,\n              }\n            : editTableData[field];\n      });\n\n      setEditData(orderItemData);\n    }\n  }, [editTableData]);\n\n  useEffect(() => {\n    methods.reset({\n      ...editData,\n    });\n  }, [editData]);\n\n  const methods = useForm({\n    mode: 'onBlur',\n  });\n\n  const {\n    field: { ...idProps },\n  } = useController({ name: 'id', control: methods?.control });\n\n  const submitHandler = async (values: FieldValues) => {\n    const id = values?.id?.value;\n    const dayAmount = values?.dayAmount || 0;\n    const peopleAmount = values?.peopleAmount || 0;\n    const amount = values?.amount || 0;\n    const language = values?.language || '';\n\n    const data = {\n      dayAmount,\n      peopleAmount,\n      language,\n      amount,\n      id,\n      included: editTableData ? editTableData.included : undefined,\n    } satisfies ITEPortal_Domain_Dto_OrderItem_CreateOrderItemDto;\n\n    try {\n      setIsSubmitting(true);\n\n      if (editTableData) {\n        await typedAxios.order.putExhibitionsOrders({\n          orderId: +orderId,\n          exhibitionId: +exhibitionId,\n          orderItemId: editTableData.orderItemId,\n          requestBody: data,\n        });\n      } else {\n        await typedAxios.order.postExhibitionsOrders({\n          orderId: +orderId,\n          exhibitionId: +exhibitionId,\n          requestBody: data,\n        });\n      }\n\n      closeModal();\n      router.invalidate();\n    } catch (error: any) {\n      const fieldErrors = error?.response?.data?.errors;\n\n      if (fieldErrors) {\n        toast.error(fieldErrors);\n      }\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <Modal\n      isOpen={openConfirm}\n      onClose={closeModal}\n      size=\"xl\"\n      scrollBehavior=\"inside\"\n      isCentered\n    >\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{useNameTranslate('add-product')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>\n          <FormProvider {...methods}>\n            <form>\n              <Stack spacing=\"5\">\n                <FormControlWrapper>\n                  <SelectComponent\n                    label={useNameTranslate('service-name')}\n                    maxWidth=\"100%\"\n                    options={products}\n                    defaultValue={editData?.['id']}\n                    isRequired\n                    {...idProps}\n                  />\n                  <Input\n                    label={`${useNameTranslate('amount')} / ${useNameTranslate(\n                      'sqm'\n                    )}`}\n                    maxWidth=\"100%\"\n                    defaultValue={editData?.['amount']}\n                    name=\"amount\"\n                  />\n                  <Input\n                    label={useNameTranslate('dayAmountPlaceholder')}\n                    maxWidth=\"100%\"\n                    defaultValue={editData?.['dayAmount']}\n                    name=\"dayAmount\"\n                  />\n                  <Input\n                    label={useNameTranslate('personAmountPlaceholder')}\n                    maxWidth=\"100%\"\n                    defaultValue={editData?.['peopleAmount']}\n                    name=\"peopleAmount\"\n                  />\n                  <Input\n                    label={useNameTranslate('language')}\n                    maxWidth=\"100%\"\n                    defaultValue={editData?.['language']}\n                    name=\"language\"\n                  />\n                </FormControlWrapper>\n              </Stack>\n            </form>\n          </FormProvider>\n        </ModalBody>\n        <ModalFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <OrderButton\n              colorScheme=\"red\"\n              onClick={methods.handleSubmit(submitHandler)}\n              disabled={isSubmitting}\n            >\n              {t('save')}\n            </OrderButton>\n            <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n              {t('cancel')}\n            </OrderButton>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\n\nimport InputNumber from '../../../../../components/Fields/InputNumber';\nimport { useTranslation } from 'react-i18next';\nimport { useEffect } from 'react';\nimport { IBaseOrder } from '../../../../../model/IBaseOrder';\nimport { ModalFactory } from '../../../../../components/Modal/api';\nimport { ITEPortal_Domain_Dto_Order_PersonalExtraChargeDto } from '../../../../../api';\nimport { isNil } from '../../../../../utils/is-nil';\n\nexport type EditChargeContextType =\n  ITEPortal_Domain_Dto_Order_PersonalExtraChargeDto;\n\nexport const MarkupForm = ({ order }: { order: IBaseOrder }) => {\n  const { t } = useTranslation();\n  const instance = useForm<{ markup: number | null }>();\n\n  useEffect(() => {\n    instance.watch((value) => {\n      ModalFactory.updateContext({\n        personalExtraChargePercentage: value.markup,\n      });\n    });\n  }, []);\n\n  useEffect(() => {\n    if (!isNil(order.personalExtraChargePercentage)) {\n      instance.reset({\n        markup: +order.personalExtraChargePercentage,\n      });\n    }\n  }, [order]);\n\n  return (\n    <FormProvider {...instance}>\n      <InputNumber\n        name=\"markup\"\n        label={t('markup')}\n        addon=\"%\"\n        max={100}\n        min={0.1}\n        step={0.1}\n        precision={1}\n        defaultValue={\n          !isNil(order.personalExtraChargePercentage)\n            ? order.personalExtraChargePercentage\n            : undefined\n        }\n      />\n    </FormProvider>\n  );\n};\n","import { IBaseOrder } from '../../../../../model/IBaseOrder';\nimport { Button, Flex, Switch, Text } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { ModalFactory } from '../../../../../components/Modal/api';\nimport { EditChargeContextType, MarkupForm } from './MarkupForm';\nimport {\n  useManageCommonExtraCharge,\n  useManagePersonalExtraCharge,\n} from './use-order-extra-charge-management';\nimport { useRouter } from '@tanstack/react-router';\n\ntype VATManagementPropsType = {\n  order: IBaseOrder;\n};\n\nexport const MarkupManagement = ({ order }: VATManagementPropsType) => {\n  const router = useRouter();\n  const { t } = useTranslation();\n  const { toggleCommonExtraCharge } = useManageCommonExtraCharge();\n  const { savePersonalExtraCharge } = useManagePersonalExtraCharge();\n\n  const toggleCharge = () => {\n    toggleCommonExtraCharge(order, () => {\n      ModalFactory.close();\n      router.invalidate();\n    });\n  };\n\n  const addVAT = () => {\n    ModalFactory.show({\n      title: t('personal-markup'),\n      Component: () => <MarkupForm order={order} />,\n      onOk: async (context?: EditChargeContextType) => {\n        if (!context) {\n          return Promise.resolve();\n        }\n\n        return savePersonalExtraCharge(order, context, () => {\n          router.invalidate();\n          ModalFactory.close();\n        });\n      },\n      okLabel: t('save'),\n    });\n  };\n\n  return (\n    <>\n      <Flex alignItems=\"center\" justifyContent=\"space-between\">\n        <Switch\n          colorScheme=\"red\"\n          isChecked={order.removeExtraCharge === true}\n          onChange={toggleCharge}\n        />\n        <Text ml=\"10px\">{t('remove-markup')}</Text>\n      </Flex>\n      <Button\n        colorScheme=\"red\"\n        onClick={addVAT}\n        isDisabled={order.removeExtraCharge === true}\n      >\n        + {t('personal-markup')}{' '}\n        {order.hasPersonalExtraCharge &&\n          `(${order.personalExtraChargePercentage}%)`}\n      </Button>\n    </>\n  );\n};\n","import { IBaseOrder } from '../../../../../model/IBaseOrder';\nimport { ModalFactory } from '../../../../../components/Modal/api';\nimport { useTranslation } from 'react-i18next';\nimport { typedAxios } from '../../../../../api/typed-axios';\nimport { isNil } from '../../../../../utils/is-nil';\nimport { toast } from 'react-toastify';\nimport { EditChargeContextType } from './MarkupForm';\n\nexport const useManageCommonExtraCharge = () => {\n  const { t } = useTranslation();\n  const toggleCommonExtraCharge = (order: IBaseOrder, onSaved?: () => void) => {\n    if (isNil(order.orderId)) {\n      return;\n    }\n\n    ModalFactory.confirm({\n      Component: () => <>{t('delete-markup-confirmation')}</>,\n      onOk: async () => {\n        const chargeState = order.removeExtraCharge !== true;\n\n        try {\n          if (isNil(order.orderId)) {\n            return;\n          }\n\n          await typedAxios.order.putOrdersRemoveExtraCharge({\n            orderId: order.orderId,\n            requestBody: {\n              removeExtraCharge: chargeState,\n            },\n          });\n\n          onSaved?.();\n        } catch {\n          toast.error(\n            chargeState === false\n              ? t('unable-to-remove-common-extra-charge')\n              : t('unable-to-add-common-extra-charge')\n          );\n        }\n      },\n    });\n  };\n\n  return {\n    toggleCommonExtraCharge,\n  };\n};\n\nexport const useManagePersonalExtraCharge = () => {\n  const savePersonalExtraCharge = async (\n    order: IBaseOrder,\n    values: EditChargeContextType,\n    onSaved?: () => void\n  ) => {\n    if (order.orderId && !isNil(values.personalExtraChargePercentage)) {\n      await typedAxios.order.putOrdersPersonalExtraCharge({\n        orderId: order.orderId,\n        requestBody: {\n          personalExtraChargePercentage: values.personalExtraChargePercentage,\n        },\n      });\n\n      onSaved?.();\n    }\n  };\n\n  return {\n    savePersonalExtraCharge,\n  };\n};\n","import { Button } from '../../../../../components/Buttons/Button/Button';\nimport { useTranslation } from 'react-i18next';\nimport { useState } from 'react';\nimport { PersonalDiscountForm } from './PersonalDiscountForm';\nimport { IBaseOrder } from '../../../../../model/IBaseOrder';\n\ntype PersonalDiscountPropsType = {\n  order: IBaseOrder;\n};\n\nexport const PersonalDiscount = (props: PersonalDiscountPropsType) => {\n  const { order } = props;\n  const { t } = useTranslation();\n  const [isEditModalOpened, toggleOpenState] = useState(false);\n\n  if (order.isDraft) {\n    return null;\n  }\n\n  return (\n    <>\n      <Button colorScheme=\"red\" onClick={() => toggleOpenState(true)}>\n        {order.hasDiscount\n          ? t('edit-personal-discount')\n          : `+ ${t('apply-personal-discount')}`}\n      </Button>\n      {isEditModalOpened && (\n        <PersonalDiscountForm\n          order={order}\n          onClose={() => toggleOpenState(false)}\n        />\n      )}\n    </>\n  );\n};\n","import {\n  ButtonGroup,\n  Flex,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n} from '@chakra-ui/react';\nimport { useNameTranslate } from '../../../../../hooks/useStringName';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { Button } from '../../../../../components/Buttons/Button/Button';\nimport { t } from 'i18next';\nimport React, { useEffect, useState } from 'react';\nimport { IBaseOrder } from '../../../../../model/IBaseOrder';\n\nimport * as v from 'zod';\nimport InputNumber from '../../../../../components/Fields/InputNumber';\nimport { SubmitHandler } from 'react-hook-form/dist/types/form';\nimport { typedAxios } from '../../../../../api/typed-axios';\nimport i18n from '../../../../../i18n';\nimport { SelectComponent } from '../../../../../components/MultiSelect/MultiSelect';\nimport { PERSONAL_DISCOUNT_TYPE } from '../../../../../constants/order';\nimport { editOrderRoute } from '../../../../../features/Routing/protected/admin-exhibitions';\nimport { toast } from 'react-toastify';\nimport { isNil } from '../../../../../utils/is-nil';\nimport { useRouter } from '@tanstack/react-router';\n\ntype PersonalDiscountFormPropsType = {\n  order: IBaseOrder;\n  onClose: () => void;\n};\n\nconst schema = v.object({\n  typeOfDiscount: v.object({\n    value: v.number(),\n    label: v.string(),\n  }),\n  discount: v.preprocess(\n    (value: unknown) => {\n      if (value === '') {\n        return value;\n      }\n\n      return typeof value === 'string' ? +value : value;\n    },\n    v.number({\n      required_error: i18n.t('required-field'),\n      invalid_type_error: i18n.t('required-field'),\n    })\n  ),\n});\n\ntype FormValues = v.infer<typeof schema>;\n\nconst SubmitTypes = {\n  Delete: 'delete',\n  Save: 'save',\n} as const;\n\ntype SubmitType = (typeof SubmitTypes)[keyof typeof SubmitTypes];\n\nexport const PersonalDiscountForm = (props: PersonalDiscountFormPropsType) => {\n  const router = useRouter();\n  const { order, onClose } = props;\n  const isUpdate = !isNil(order.personalDiscount);\n  const [submitType, setSubmitType] = useState<SubmitType | null>(null);\n  const isDeleting = submitType === SubmitTypes.Delete;\n  const isSaving = submitType === SubmitTypes.Save;\n\n  const { currency } = editOrderRoute.useLoaderData();\n  const instance = useForm<FormValues>({\n    resolver: zodResolver(schema),\n  });\n\n  const [discountType, setDiscountType] = useState<number>(\n    order.typeOfDiscount || PERSONAL_DISCOUNT_TYPE.PERCENT\n  );\n  const isPercentSelected = discountType === PERSONAL_DISCOUNT_TYPE.PERCENT;\n\n  const save: SubmitHandler<FormValues> = async (values) => {\n    if (!order.orderId) {\n      return;\n    }\n\n    const typeOfDiscount = values.typeOfDiscount.value;\n    const value = values.discount;\n\n    if (\n      typeOfDiscount === PERSONAL_DISCOUNT_TYPE.AMOUNT &&\n      !isNil(order.orderSummary) &&\n      value > order.orderSummary\n    ) {\n      instance.setError('discount', {\n        message: t('discount-could-not-exceed-total'),\n      });\n\n      return;\n    }\n\n    if (typeOfDiscount === PERSONAL_DISCOUNT_TYPE.PERCENT && value > 100) {\n      instance.setError('discount', {\n        message: t('discount-gte-100'),\n      });\n\n      return;\n    }\n\n    setSubmitType(SubmitTypes.Save);\n\n    try {\n      await typedAxios.order[\n        isUpdate ? 'putOrdersPersonalDiscount' : 'postOrdersPersonalDiscount'\n      ]({\n        orderId: order.orderId,\n        requestBody: {\n          // @ts-expect-error desc\n          typeOfDiscount,\n          value,\n        },\n      });\n\n      toast.success(t('personal-discount-applied'));\n\n      router.invalidate();\n      onClose();\n    } catch (e) {\n      instance.setError('discount', {\n        message: t('unable-to-apply-discount'),\n      });\n    } finally {\n      setSubmitType(null);\n    }\n  };\n\n  const removeDiscount = async () => {\n    if (!order.orderId) {\n      return;\n    }\n\n    setSubmitType(SubmitTypes.Delete);\n\n    try {\n      await typedAxios.order.deleteOrdersPersonalDiscount({\n        orderId: order.orderId,\n      });\n      toast.success(t('personal-discount-removed'));\n\n      router.invalidate();\n      onClose();\n    } catch {\n      toast.error(t('unable-to-remove-discount'));\n    } finally {\n      setSubmitType(null);\n    }\n  };\n\n  useEffect(() => {\n    const defaultDiscountType =\n      order.typeOfDiscount || PERSONAL_DISCOUNT_TYPE.PERCENT;\n    const label =\n      defaultDiscountType === PERSONAL_DISCOUNT_TYPE.PERCENT\n        ? t('percent')\n        : t('fixed-amount');\n\n    instance.reset({\n      discount: order.personalDiscount,\n      typeOfDiscount: {\n        value: defaultDiscountType,\n        label: label,\n      },\n    });\n  }, [order]);\n\n  useEffect(() => {\n    instance.watch((value, { name }) => {\n      if (name === 'typeOfDiscount') {\n        setDiscountType(\n          value.typeOfDiscount?.value || PERSONAL_DISCOUNT_TYPE.PERCENT\n        );\n      }\n    });\n  }, []);\n\n  return (\n    <Modal\n      isOpen\n      size=\"xl\"\n      onClose={onClose}\n      scrollBehavior=\"inside\"\n      isCentered\n    >\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{useNameTranslate('personal-discount')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>\n          <FormProvider {...instance}>\n            <Flex gap=\"20px\" flexDirection=\"column\">\n              <SelectComponent\n                name=\"typeOfDiscount\"\n                label={t('type-of-personal-discount')}\n                options={[\n                  {\n                    value: PERSONAL_DISCOUNT_TYPE.PERCENT,\n                    label: t('percent'),\n                  },\n                  {\n                    value: PERSONAL_DISCOUNT_TYPE.AMOUNT,\n                    label: t('fixed-amount'),\n                  },\n                ]}\n              />\n              <InputNumber\n                maxWidth=\"100%\"\n                label={t('personal-discount')}\n                name=\"discount\"\n                max={isPercentSelected ? 100 : undefined}\n                precision={isPercentSelected ? 2 : 0}\n                step={isPercentSelected ? 0.1 : 1}\n                keepWithinRange\n                addon={isPercentSelected ? '%' : currency}\n              />\n            </Flex>\n          </FormProvider>\n        </ModalBody>\n        <ModalFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <Button colorScheme=\"secondary\" onClick={onClose}>\n              {t('cancel')}\n            </Button>\n            {order.hasDiscount && (\n              <Button\n                colorScheme=\"secondary\"\n                disabled={isDeleting}\n                isLoading={isDeleting}\n                onClick={removeDiscount}\n              >\n                {t('remove-personal-discount')}\n              </Button>\n            )}\n            <Button\n              colorScheme=\"red\"\n              disabled={isSaving}\n              isLoading={isSaving}\n              onClick={instance.handleSubmit(save)}\n            >\n              {t(\n                isUpdate\n                  ? 'update-personal-discount'\n                  : 'apply-personal-discount'\n              )}\n            </Button>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import { toast } from 'react-toastify';\nimport { typedAxios } from '../../../../../api/typed-axios';\nimport { ModalFactory } from '../../../../../components/Modal/api';\nimport { useTranslation } from 'react-i18next';\nimport { TextArea } from '../../../../../components/TextArea/TextArea';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport * as v from 'zod';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport i18n from '../../../../../i18n';\nimport { Nullable } from '../../../../../types/support-types';\n\nconst Schema = v.object({\n  comment: v.string().min(1, {\n    message: i18n.t('required-field'),\n  }),\n});\n\ntype FormValues = v.infer<typeof Schema>;\n\nexport const useSendOrderEmail = (orderId: Nullable<string>) => {\n  const { t } = useTranslation();\n\n  const instance = useForm<FormValues>({\n    resolver: zodResolver(Schema),\n  });\n\n  const sendEmail = async (values: FormValues) => {\n    try {\n      if (!orderId) {\n        return;\n      }\n\n      await typedAxios.order.postOrdersSendOrderChangedConfirmation({\n        orderId: +orderId,\n        requestBody: values.comment,\n      });\n\n      toast.success(t('success-email'));\n\n      ModalFactory.close();\n      instance.reset();\n    } catch (error: any) {\n      const fieldErrors = error?.response?.data?.errors;\n\n      if (fieldErrors) {\n        toast.error(fieldErrors);\n      }\n    }\n  };\n\n  const requestSendOrderEmail = () => {\n    if (!orderId) {\n      return;\n    }\n\n    ModalFactory.show({\n      title: t('order-comments'),\n      Component: () => (\n        <FormProvider {...instance}>\n          <TextArea<FormValues> name=\"comment\" />\n        </FormProvider>\n      ),\n      okLabel: t('send-email'),\n      onOk: async () => {\n        return instance.handleSubmit(sendEmail)();\n      },\n    });\n  };\n\n  return {\n    requestSendOrderEmail,\n  };\n};\n","import { useForm, FormProvider, useController } from 'react-hook-form';\nimport {\n  ButtonGroup,\n  FormControl,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Stack,\n} from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { t } from 'i18next';\nimport { FetchMethods } from '@/utils/constants';\nimport { STATUS_CONFIG } from '@/constants/admin-pages';\nimport fetchApi from '@/utils/fetchAPI';\nimport { CHANGE_ORDER_STATUS } from '@/constants/endpoints';\nimport { toast } from 'react-toastify';\nimport { OptionType } from '@/model/common';\nimport { ITEPortal_Domain_Dto_AdminOrderSummary } from '@/api';\nimport { isNil } from '@/utils/is-nil';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ntype FormValues = {\n  orderStatus: OptionType;\n};\n\ninterface AddBuildingTypeProductProps {\n  openConfirm: boolean;\n  closeModal: () => void;\n  refresh: () => void;\n  editTableData?: ITEPortal_Domain_Dto_AdminOrderSummary;\n}\n\nexport const EditStatusModal = ({\n  openConfirm,\n  closeModal,\n  refresh,\n  editTableData,\n}: AddBuildingTypeProductProps) => {\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [editData, setEditData] = useState<any>();\n  const culture = localStorage.getItem('lang');\n  const methods = useForm<FormValues>({\n    mode: 'onBlur',\n  });\n\n  useEffect(() => {\n    const orderData = editTableData;\n\n    if (orderData?.orderStatus) {\n      const value = STATUS_CONFIG.find(\n        (status: OptionType) => status?.value === orderData.orderStatus\n      );\n\n      if (value) {\n        methods.setValue('orderStatus', value);\n      }\n\n      setEditData(orderData);\n    }\n  }, [editTableData]);\n\n  useEffect(() => {\n    methods.reset({\n      ...editData,\n    });\n  }, [editData]);\n\n  const {\n    field: { ...statusProps },\n  } = useController({ name: 'orderStatus', control: methods.control });\n\n  const submitHandler = async (values: FormValues) => {\n    const status = values?.orderStatus?.value;\n\n    if (!editTableData?.orderId || isNil(status)) {\n      return;\n    }\n\n    setIsSubmitting(true);\n    try {\n      await fetchApi(CHANGE_ORDER_STATUS(editTableData?.orderId), {\n        method: FetchMethods.Put,\n        params: { orderStatus: status, culture },\n      });\n\n      closeModal();\n      refresh();\n    } catch (error: any) {\n      const fieldErrors = error?.response?.data?.errors;\n\n      if (fieldErrors) {\n        toast.error(fieldErrors);\n      }\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <Modal isOpen={openConfirm} onClose={closeModal} size=\"xl\" isCentered>\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{useNameTranslate('edit-order')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>\n          <FormProvider {...methods}>\n            <form>\n              <Stack spacing=\"5\">\n                <FormControlWrapper>\n                  <SelectComponent\n                    label={useNameTranslate('status')}\n                    options={STATUS_CONFIG}\n                    defaultValue={editData?.['status']}\n                    isRequired\n                    {...statusProps}\n                  />\n                </FormControlWrapper>\n              </Stack>\n            </form>\n          </FormProvider>\n        </ModalBody>\n        <ModalFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <OrderButton\n              colorScheme=\"red\"\n              onClick={methods.handleSubmit(submitHandler)}\n              disabled={isSubmitting}\n              isLoading={isSubmitting}\n            >\n              {t('save')}\n            </OrderButton>\n            <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n              {t('cancel')}\n            </OrderButton>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import { useTranslation } from 'react-i18next';\nimport React, { useState } from 'react';\nimport { Box, Flex, Link, Select } from '@chakra-ui/react';\nimport {\n  DeleteIcon,\n  DownloadIcon,\n  EditIcon,\n  ExternalLinkIcon,\n} from '@chakra-ui/icons';\nimport dayjs from 'dayjs';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport { Card } from '@/components/Card/Card';\nimport { Table } from '@/components/Table/Table';\nimport styled from 'styled-components';\nimport { Column, Row } from 'react-table';\nimport { ToExhibition } from '@/layout/AdminAdditionalPanel/ToExhibition';\nimport fetchApi from '@/utils/fetchAPI';\nimport { GET_PDF_BY_ORDER, PLACED_ORDERS } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { useNavigate } from '@tanstack/react-router';\nimport { STATUS_CONFIG } from '@/constants/admin-pages';\nimport { EditStatusModal } from '@/pages/AdminPanel/PlacedOrders/EditStatus';\nimport {\n  type ITEPortal_Domain_Dto_AdminOrderSummary,\n  ITEPortal_Domain_Dto_OrderDto,\n} from '@/api';\nimport { useRBAC } from '@/features/rbac/useRBAC';\nimport { ConfirmModal } from '../../ConfirmModal';\nimport { toast } from 'react-toastify';\nimport { typedAxios } from '../../../api/typed-axios';\nimport { isNil } from '../../../utils/is-nil';\nimport { useTableLoader } from '../../../components/Table/useTableLoader';\nimport { Button } from '../../../components/Buttons/Button/Button';\nimport { FileUtils } from '../../../utils/file-utils';\nimport { viewExhibitionPlacedOrdersRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { ORDER_STATUSES } from '@/constants/order';\nimport { OrderBadge } from '@/components/OrderBadge';\n\nconst OptionWrapper = styled(Flex)`\n  flex-direction: row;\n  gap: 20px;\n`;\n\nconst ToExhibitionWrapper = styled(Box)`\n  padding-bottom: 20px;\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n`;\n\ninterface PlacedOrdersOptionsType {\n  row: Row<ITEPortal_Domain_Dto_AdminOrderSummary>;\n}\n\nexport const PlacedOrders = () => {\n  const { can } = useRBAC();\n  const culture = localStorage.getItem('lang');\n  const { exhibitionId } = viewExhibitionPlacedOrdersRoute.useParams();\n  const { exhibitorId, orderStatus } =\n    viewExhibitionPlacedOrdersRoute.useSearch();\n  const { t } = useTranslation();\n  const [isEditModalOpened, setIsEditModalOpened] = useState(false);\n  const [orderIdToDelete, setOrderIdToDelete] = useState<number | null>(null);\n  const [editTableData, setEditTableData] =\n    useState<ITEPortal_Domain_Dto_AdminOrderSummary | null>(null);\n  const navigate = useNavigate();\n  const canCreateOrder = can('canCreateOrder');\n\n  const {\n    data: orders,\n    refresh,\n    isLoading,\n  } = useTableLoader<ITEPortal_Domain_Dto_AdminOrderSummary>({\n    resource: PLACED_ORDERS,\n    additionalPrams: { exhibitionId, culture, exhibitorId, orderStatus },\n  });\n\n  const showPdfByOrder = async (\n    order: ITEPortal_Domain_Dto_OrderDto['orderId']\n  ) => {\n    try {\n      const { data } = await fetchApi(GET_PDF_BY_ORDER(order), {\n        method: FetchMethods.Get,\n        responseType: 'blob',\n        params: {\n          culture,\n        },\n      });\n\n      FileUtils.saveBlobAsFile(data, `exhibition-order-${order}.pdf`);\n    } catch {\n      toast.error(t('unable-to-download', { object: 'PDF' }));\n    }\n  };\n\n  const DownloadPDF = ({ row }: PlacedOrdersOptionsType) => {\n    const orderId = row.original.orderId;\n\n    return (\n      <Link onClick={() => showPdfByOrder(orderId)}>\n        <DownloadIcon />\n      </Link>\n    );\n  };\n\n  const openModal = () => {\n    setIsEditModalOpened(!isEditModalOpened);\n  };\n\n  const PlacedOrdersOptions = ({ row }: PlacedOrdersOptionsType) => {\n    const orderId = row.original.orderId;\n\n    if (!orderId) {\n      return null;\n    }\n\n    const canDeleteOrder = can('canDeleteOrder');\n    const canChangeOrderStatus = can('canChangeOrderStatus');\n\n    const editStatus = () => {\n      setEditTableData(row.original);\n      openModal();\n    };\n\n    return (\n      <OptionWrapper>\n        <Link onClick={() => editOrder(orderId)}>\n          <ExternalLinkIcon />\n        </Link>\n        {canChangeOrderStatus && (\n          <Link onClick={editStatus}>\n            <EditIcon />\n          </Link>\n        )}\n\n        {canDeleteOrder && (\n          <Link onClick={() => setOrderIdToDelete(orderId)}>\n            <DeleteIcon />\n          </Link>\n        )}\n      </OptionWrapper>\n    );\n  };\n\n  const editOrder = (id: ITEPortal_Domain_Dto_AdminOrderSummary['orderId']) => {\n    navigate({\n      to: '/admin/exhibitions/$exhibitionId/view/placed-orders/$orderId/edit',\n      params: {\n        exhibitionId: exhibitionId,\n        orderId: id,\n      },\n    });\n  };\n\n  const deleteOrder = async () => {\n    try {\n      if (isNil(orderIdToDelete)) {\n        return;\n      }\n\n      await typedAxios.order.deleteOrders({\n        orderId: orderIdToDelete,\n      });\n\n      refresh();\n    } catch {\n      toast.error(\n        t('unable-to-delete', {\n          entity: t('order').toLowerCase(),\n        })\n      );\n    }\n  };\n\n  const closeModal = () => setIsEditModalOpened(false);\n\n  const placedOrdersColumns = React.useMemo<\n    Record<any, Column<ITEPortal_Domain_Dto_AdminOrderSummary>>\n  >(() => {\n    return {\n      id: {\n        Header: `${t('orderNumber')}`,\n        accessor: 'orderId',\n        width: '5%',\n      },\n      exhibitorName: {\n        Header: `${t('orderName')}`,\n        accessor: 'exhibitorName',\n        width: '30%',\n      },\n      status: {\n        Header: `${t('status')}`,\n        accessor: 'orderStatus',\n        width: '10%',\n        Cell: ({ value }) => <OrderBadge status={value} />,\n      },\n      createdDate: {\n        Header: `${t('createDate')}`,\n        accessor: 'createdDate',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <>\n            {values?.createdDate\n              ? dayjs(values?.createdDate).format('DD.MM.YYYY')\n              : ''}\n          </>\n        ),\n      },\n      lastModifiedDate: {\n        Header: `${t('editDate')}`,\n        accessor: 'lastModifiedDate',\n        width: '10%',\n        Cell: ({ row: { values } }: any) => (\n          <>\n            {values?.lastModifiedDate\n              ? dayjs(values?.lastModifiedDate).format('DD.MM.YYYY')\n              : ''}\n          </>\n        ),\n      },\n      orderSummary: {\n        Header: () => (\n          <Box w=\"100%\" textAlign=\"right\">\n            {t('orderTotal')}\n          </Box>\n        ),\n        accessor: 'orderSummary',\n        width: '20%',\n        Cell: ({ row }: PlacedOrdersOptionsType) => {\n          return (\n            <Box\n              whiteSpace=\"nowrap\"\n              textAlign=\"right\"\n            >{`${row?.values?.orderSummary} ${row?.values?.currency}`}</Box>\n          );\n        },\n      },\n      currency: {\n        accessor: 'currency',\n        show: false,\n      },\n      downloadPdf: {\n        Header: `${t('downloadPdf')}`,\n        id: 'downloadPdf',\n        width: '10%',\n        Cell: ({ row }) => <DownloadPDF row={row} />,\n      },\n      options: {\n        Header: '',\n        id: 'options',\n        width: '5%',\n        Cell: ({ row }: PlacedOrdersOptionsType) => (\n          <PlacedOrdersOptions row={row} />\n        ),\n      },\n    };\n  }, []);\n\n  const getOrderColumns = () => {\n    const {\n      id,\n      exhibitorName,\n      status,\n      createdDate,\n      lastModifiedDate,\n      orderSummary,\n      currency,\n      downloadPdf,\n      options,\n    } = placedOrdersColumns;\n\n    if (!can('canEditOrders')) {\n      return [\n        id,\n        exhibitorName,\n        status,\n        createdDate,\n        lastModifiedDate,\n        orderSummary,\n        currency,\n        downloadPdf,\n      ];\n    }\n\n    return [\n      id,\n      exhibitorName,\n      status,\n      createdDate,\n      lastModifiedDate,\n      orderSummary,\n      currency,\n      downloadPdf,\n      options,\n    ];\n  };\n\n  return (\n    <LoaderWrapper loading={isLoading}>\n      <ToExhibitionWrapper>\n        <ToExhibition />\n        <Select\n          defaultValue={orderStatus}\n          bg=\"white\"\n          onChange={(event) => {\n            navigate({\n              to: './',\n              search: {\n                orderStatus: event.target.value\n                  ? +event.target.value\n                  : undefined,\n                exhibitorId,\n              },\n            });\n          }}\n          placeholder={t('status')}\n          width=\"200px\"\n          ml=\"auto\"\n          mr={4}\n        >\n          {STATUS_CONFIG.map((cfg) => {\n            if (cfg.value === ORDER_STATUSES.Undefined) {\n              return null;\n            }\n\n            return (\n              <option key={cfg.value} value={cfg.value}>\n                {cfg.label}\n              </option>\n            );\n          })}\n        </Select>\n        {canCreateOrder && (\n          <Button\n            colorScheme=\"red\"\n            onClick={() => {\n              navigate({\n                to: './create',\n                search: {\n                  exhibitorId: exhibitorId ?? undefined,\n                },\n              });\n            }}\n          >\n            + {t('createNewOrder')}\n          </Button>\n        )}\n      </ToExhibitionWrapper>\n\n      <Card>\n        <Table columns={getOrderColumns()} data={orders} />\n        {editTableData && isEditModalOpened && (\n          <EditStatusModal\n            openConfirm={isEditModalOpened}\n            closeModal={closeModal}\n            refresh={refresh}\n            editTableData={editTableData}\n          />\n        )}\n        {orderIdToDelete && (\n          <ConfirmModal\n            modalMessage={t('delete-order')}\n            isOpen={!!orderIdToDelete}\n            closeModal={() => setOrderIdToDelete(null)}\n            confirm={deleteOrder}\n          />\n        )}\n      </Card>\n    </LoaderWrapper>\n  );\n};\n","import { FormProvider, UseFormReturn } from 'react-hook-form';\nimport React, { useEffect, useState } from 'react';\nimport { Stack } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { OptionType } from '@/model/common';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto } from '@/api/models/ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto';\nimport { ExportToBitrixFormValidationSchemaType } from '@/pages/AdminPanel/PlacedOrders/hooks/use-export-order';\n\nexport const ExportToBitrixForm = ({\n  instance,\n}: {\n  instance: UseFormReturn<ExportToBitrixFormValidationSchemaType>;\n}) => {\n  const { t } = useTranslation();\n  const [companyId, setCompanyId] = useState<number>();\n  const [bankAccounts, setBankAccounts] =\n    useState<\n      Array<\n        OptionType<ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto>\n      >\n    >();\n\n  const { data: companyOptions = [] } = useQuery(\n    QueryOptions.loadCompanyOptions()\n  );\n\n  useEffect(() => {\n    const fetchBankAccounts = async () => {\n      if (companyId) {\n        const bankAccountsData =\n          await typedAxios.iteCompany.getCompaniesBankAccounts({\n            companyId,\n          });\n\n        const bankAccountOptions = bankAccountsData.map((ba) => ({\n          value: ba.id,\n          label: ba.title,\n          meta: ba,\n        })) satisfies Array<\n          OptionType<ITEPortal_Domain_Dto_Bitrix_EventEdition_EventEditionDropdownDto>\n        >;\n\n        setBankAccounts(bankAccountOptions);\n      }\n    };\n\n    if (companyId) {\n      instance.resetField('bankAccount');\n      fetchBankAccounts();\n    }\n  }, [companyId]);\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing={4}>\n        <SelectComponent<ExportToBitrixFormValidationSchemaType>\n          label={t('company')}\n          options={companyOptions}\n          isRequired\n          name=\"company\"\n          onChange={({ value }) => setCompanyId(value)}\n        />\n        {companyId && (\n          <SelectComponent<ExportToBitrixFormValidationSchemaType>\n            label={t('bank-account')}\n            options={bankAccounts}\n            isRequired\n            name=\"bankAccount\"\n          />\n        )}\n      </Stack>\n    </FormProvider>\n  );\n};\n","import React, { useCallback } from 'react';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { useTranslation } from 'react-i18next';\nimport { useForm } from 'react-hook-form';\nimport { ApiError } from '@/api';\nimport { toast } from 'react-toastify';\nimport { ExportToBitrixForm } from '@/pages/AdminPanel/PlacedOrders/exportOrderForm';\nimport * as vali from 'zod';\nimport i18n from '@/i18n';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { editOrderRoute } from '@/features/Routing/protected/admin-exhibitions';\nimport { typedAxios } from '@/api/typed-axios';\n\nconst OptionSchema = vali.object(\n  {\n    value: vali.coerce.number(),\n    label: vali.string(),\n  },\n  {\n    required_error: i18n.t('required-field'),\n  }\n);\n\nconst ValidationSchema = vali.object({\n  company: OptionSchema,\n  bankAccount: OptionSchema,\n});\n\nexport type ExportToBitrixFormValidationSchemaType = vali.infer<\n  typeof ValidationSchema\n>;\n\nexport const useExportOrder = () => {\n  const { t } = useTranslation();\n  const { orderId } = editOrderRoute.useParams();\n  const queryClient = new QueryClient();\n\n  const instance = useForm<ExportToBitrixFormValidationSchemaType>({\n    resolver: zodResolver(ValidationSchema),\n    mode: 'onChange',\n  });\n\n  const exportOrder = async (\n    values: ExportToBitrixFormValidationSchemaType\n  ) => {\n    try {\n      console.log(values);\n      await typedAxios.bitrix.postBitrixOrders({\n        orderId: +orderId,\n        requestBody: {\n          bankAccountId: values?.bankAccount?.value,\n          iteCompanyId: values?.company?.value,\n        },\n      });\n\n      ModalFactory.close();\n      toast.success(t('order-exported-successfully'));\n    } catch (e) {\n      if (e instanceof ApiError) {\n        const message = e.body;\n\n        if (message && typeof message === 'string') {\n          toast.error(message);\n        } else {\n          toast.error(t('error-occurred'));\n        }\n      }\n    }\n  };\n\n  const openExportModal = useCallback(() => {\n    ModalFactory.show({\n      title: t('bitrixExport'),\n      Component: () => (\n        <QueryClientProvider client={queryClient}>\n          <ExportToBitrixForm instance={instance} />\n        </QueryClientProvider>\n      ),\n      okLabel: t('export'),\n      onOk: async () => {\n        return instance.handleSubmit(exportOrder)();\n      },\n    });\n  }, []);\n\n  return {\n    openExportModal,\n  };\n};\n","import { Text } from '@chakra-ui/react';\n\ninterface NumberStringType {\n  value: number;\n}\n\nexport const NumberColumnComponent = ({ value }: NumberStringType) => {\n  const columnValue = value !== 0 ? value : '';\n\n  return <Text>{columnValue}</Text>;\n};\n","import { FieldValues, useForm, FormProvider } from 'react-hook-form';\nimport {\n  ButtonGroup,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerOverlay,\n  FormControl,\n  Stack,\n} from '@chakra-ui/react';\nimport Input from '@/components/Fields/Input';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { toast } from 'react-toastify';\n\nimport unitsOfMeasurement from '@/i18n/lang/unit-of-measurement/en.json';\nimport { Checkbox } from '@/components/Fields/Checkbox';\nimport { typedObjectKeys } from '@/utils/typed-object-keys';\nimport { Strict } from '@/types/support-types';\nimport { OptionType } from '@/model/common';\nimport { typedAxios } from '@/api/typed-axios';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '@/api';\nimport { isNil } from '@/utils/is-nil';\nimport { TKey } from '@/i18n/types';\nimport { useTranslation } from 'react-i18next';\nimport { useParentCategoriesLoader } from '@/pages/AdminPanel/ServiceDirectory/EditCategoryForm/use-parent-categories-loader';\nimport { isOption } from '@/utils/is-option';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { ServiceDictionaryValidationSchema } from '@/pages/AdminPanel/ServiceDirectory/types';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ninterface EditEntityModalProps<T> {\n  openConfirm: boolean;\n  closeModal: () => void;\n  refresh: () => void;\n  editTableData: Required<T> | undefined;\n  parentCategoryName: ITEPortal_Domain_Dto_CategoryDto['name'];\n}\n\nconst defaultValues = {\n  id: null,\n  parentCategoryName: null,\n  imageUrl: null,\n  descriptionRu: null,\n  descriptionEn: null,\n};\n\ntype FormValues = Omit<ITEPortal_Domain_Dto_CategoryDto, 'unitOfMeasure'> & {\n  displayNameRu: string;\n  displayNameEn: string;\n  descriptionRu: string;\n  descriptionEn: string;\n  unitOfMeasure: OptionType;\n  isDecimal: boolean;\n  parentCategoryName?: ITEPortal_Domain_Dto_CategoryDto['name'];\n};\n\nexport const EditCategoryForm = <\n  T extends Strict<ITEPortal_Domain_Dto_CategoryDto>\n>({\n  openConfirm,\n  closeModal,\n  refresh,\n  editTableData,\n}: EditEntityModalProps<T>) => {\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [editData, setEditData] = useState<any>();\n  const isEdit = Boolean(editTableData);\n  const { t } = useTranslation();\n\n  const { data: parentCategories = [] } = useParentCategoriesLoader();\n\n  useEffect(\n    function prepareEditData() {\n      if (!editTableData) {\n        setEditData(defaultValues);\n      }\n\n      if (editTableData) {\n        const fetchData = async () => {\n          const categoryID = editTableData.name;\n\n          if (isNil(categoryID)) {\n            return;\n          }\n\n          setIsSubmitting(true);\n          try {\n            const data = await typedAxios.category.getCategoriesResources({\n              name: categoryID,\n            });\n\n            const editDataWithResources: FormValues = {\n              id: editTableData.id,\n              name: editTableData.name,\n              imageUrl: editTableData.imageUrl,\n              parentCategoryName: editTableData.parentCategoryId,\n              displayNameRu: data?.ru?.name || '',\n              displayNameEn: data?.en?.name || '',\n              descriptionRu: data?.ru?.description || '',\n              descriptionEn: data?.en?.description || '',\n              isDecimal: editTableData.isDecimal,\n              unitOfMeasure: {\n                value: editTableData.unitOfMeasure,\n                label: t(editTableData.unitOfMeasure as TKey),\n              },\n            };\n\n            typedObjectKeys(editDataWithResources).forEach((field) => {\n              methods.setValue(field, editDataWithResources[field]);\n            });\n\n            setEditData(editDataWithResources);\n          } catch (error: any) {\n            const fieldErrors = error?.response?.data?.errors;\n\n            if (fieldErrors) {\n              toast.error(fieldErrors);\n            }\n          } finally {\n            setIsSubmitting(false);\n          }\n        };\n\n        fetchData();\n      }\n    },\n    [editTableData]\n  );\n\n  useEffect(\n    function setFormValues() {\n      methods.reset({\n        ...editData,\n      });\n    },\n    [editData]\n  );\n\n  const methods = useForm<FormValues>({\n    mode: 'onBlur',\n    resolver: zodResolver(ServiceDictionaryValidationSchema),\n  });\n\n  const unitOptions = [\n    {\n      value: '',\n      label: '',\n    },\n    ...typedObjectKeys(unitsOfMeasurement).map((unit) => {\n      return {\n        value: unit,\n        label: t(unit),\n      };\n    }),\n  ];\n\n  const submitHandler = async (values: FieldValues) => {\n    const method = editTableData ? 'put' : 'post';\n\n    try {\n      setIsSubmitting(true);\n\n      console.log(values);\n\n      await typedAxios.category[`${method}Categories`]({\n        requestBody: {\n          name: values.name,\n          isDecimal: !!values?.isDecimal,\n          unitOfMeasure: values?.unitOfMeasure?.value,\n          parentCategoryName: isOption(values.parentCategoryName)\n            ? values.parentCategoryName.value\n            : values.parentCategoryName,\n          resources: [\n            {\n              key: 'name',\n              value: values?.displayNameRu || '',\n              cultureName: 'ru',\n            },\n            {\n              key: 'name',\n              value: values?.displayNameEn || '',\n              cultureName: 'en',\n            },\n            {\n              key: 'description',\n              value: values?.descriptionRu || '',\n              cultureName: 'ru',\n            },\n            {\n              key: 'description',\n              value: values?.descriptionEn || '',\n              cultureName: 'en',\n            },\n          ],\n        },\n      });\n\n      if (values?.['imageUrl'] && typeof values?.['imageUrl'][0] !== 'string') {\n        typedAxios.category.postCategoriesImage({\n          name: values.name,\n          formData: {\n            image: values?.['imageUrl'][0],\n          },\n        });\n      }\n\n      toast.success(t('saved'));\n      closeModal();\n      refresh();\n    } catch (error: any) {\n      // processErrorsObject(error);\n      toast.error(t('error-occurred'));\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <Drawer isOpen={openConfirm} onClose={closeModal} size=\"lg\">\n      <DrawerOverlay />\n      <DrawerContent>\n        <DrawerHeader>\n          {t(isEdit ? 'edit-category' : 'new-category')}\n        </DrawerHeader>\n        <DrawerCloseButton />\n        <DrawerBody>\n          <FormProvider {...methods}>\n            <form>\n              <Stack spacing=\"5\">\n                <FormControlWrapper>\n                  <Input<FormValues>\n                    label=\"ID\"\n                    maxWidth=\"100%\"\n                    name=\"name\"\n                    disabled={!!editTableData}\n                    isRequired\n                  />\n                  <Input<FormValues>\n                    label={`${t('category-name')} (RU)`}\n                    maxWidth=\"100%\"\n                    name=\"displayNameRu\"\n                    isRequired\n                  />\n                  <Input<FormValues>\n                    label={`${t('category-name')} (EN)`}\n                    maxWidth=\"100%\"\n                    name=\"displayNameEn\"\n                    isRequired\n                  />\n                  <SelectComponent<FormValues>\n                    label={t('parent-category-name')}\n                    // @ts-expect-error desc\n                    options={parentCategories}\n                    name=\"parentCategoryName\"\n                  />\n                  <SelectComponent<FormValues>\n                    name=\"unitOfMeasure\"\n                    options={unitOptions}\n                    label={t('unit-of-measurement')}\n                    isRequired\n                  />\n                  <Checkbox<FormValues> name=\"isDecimal\">\n                    {t('decimal-values')}\n                  </Checkbox>\n                  <UploadFileDropzone<FormValues>\n                    label={t('upload-image')}\n                    name=\"imageUrl\"\n                    defaultValue={editData?.['imageUrl']}\n                  />\n                  <TextArea<FormValues>\n                    label={`${t('category-description')} (RU)`}\n                    name=\"descriptionRu\"\n                  />\n                  <TextArea<FormValues>\n                    label={`${t('category-description')} (EN)`}\n                    name=\"descriptionEn\"\n                    defaultValue={editData?.['descriptionEn']}\n                  />\n                </FormControlWrapper>\n              </Stack>\n            </form>\n          </FormProvider>\n        </DrawerBody>\n        <DrawerFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <OrderButton\n              colorScheme=\"red\"\n              onClick={methods.handleSubmit(() =>\n                submitHandler(methods.getValues())\n              )}\n              disabled={isSubmitting}\n            >\n              {t('save')}\n            </OrderButton>\n            <OrderButton colorScheme=\"secondary\" onClick={closeModal}>\n              {t('cancel')}\n            </OrderButton>\n          </ButtonGroup>\n        </DrawerFooter>\n      </DrawerContent>\n    </Drawer>\n  );\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { typedAxios } from '@/api/typed-axios';\n\nexport const useParentCategoriesLoader = () => {\n  return useQuery({\n    queryKey: ['parent-categories'],\n    queryFn: async () => {\n      const data = await typedAxios.category.getCategoriesParentCategories();\n\n      const categories = data?.map((category) => {\n        return {\n          value: category?.name,\n          label: category?.displayName,\n        };\n      });\n\n      return categories || [];\n    },\n  });\n};\n","import { ITEPortal_Domain_Dto_ProductDto } from '@/api';\nimport { PRODUCT_TYPES, ProductTypesType } from '@/constants/categorie';\nimport { Fragment, useEffect, useMemo } from 'react';\nimport { Stack } from '@chakra-ui/react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { OptionType } from '@/model/common';\nimport { EditBuildingProductFieldset } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditBuildingTypeProduct';\nimport { EditTemporaryStaffProductFieldset } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditTemporaryStaffProduct';\nimport { EditDefaultProductFieldset } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditDefaultProduct';\nimport i18n from '@/i18n';\n\ntype AbstractEditProductModalFormPropsType = {\n  product: ITEPortal_Domain_Dto_ProductDto | null;\n  productType?: ProductTypesType | null;\n};\n\nconst productTypeOptions: Array<OptionType> = [\n  {\n    value: PRODUCT_TYPES.COMMON,\n    label: i18n.t('product-type-common'),\n  },\n  {\n    value: PRODUCT_TYPES.BUILDING,\n    label: i18n.t('product-type-select-building'),\n  },\n  {\n    value: PRODUCT_TYPES.TEMPORARY_STAFF,\n    label: i18n.t('product-type-temporary-staff'),\n  },\n];\n\nexport const AbstractEditProductDrawerForm = (\n  props: AbstractEditProductModalFormPropsType\n) => {\n  const { product, productType } = props;\n  const formInstance = useForm<{\n    productType: { value: ProductTypesType; label: string };\n  }>();\n  const productTypeFromSelect = formInstance.watch('productType');\n\n  const Fieldset = useMemo(() => {\n    switch (productTypeFromSelect?.value) {\n      case 'select-building': {\n        return EditBuildingProductFieldset;\n      }\n\n      case 'temporary-staff': {\n        return EditTemporaryStaffProductFieldset;\n      }\n\n      case 'common': {\n        return EditDefaultProductFieldset;\n      }\n\n      default: {\n        return Fragment;\n      }\n    }\n  }, [productTypeFromSelect]);\n\n  useEffect(\n    function setProductType() {\n      if (productType) {\n        formInstance.setValue(\n          'productType',\n          // @ts-expect-error desc\n          productTypeOptions.find((po) => po.value === productType) ||\n            productTypeOptions[0]\n        );\n      }\n    },\n    [productType]\n  );\n\n  return (\n    <Stack spacing={5}>\n      {!product?.id && (\n        <FormProvider {...formInstance}>\n          <SelectComponent\n            label={i18n.t('product-type')}\n            name=\"productType\"\n            disabled={Boolean(productType)}\n            options={productTypeOptions}\n          />\n        </FormProvider>\n      )}\n      {Fieldset === Fragment ? (\n        <Fragment />\n      ) : (\n        <Fieldset editTableData={product} />\n      )}\n    </Stack>\n  );\n};\n","import { useForm, FormProvider } from 'react-hook-form';\nimport { FormControl, Stack } from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport Input from '@/components/Fields/Input';\nimport React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport fetchApi from '@/utils/fetchAPI';\nimport { EDIT_PRODUCT_RESOURCES } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { toast } from 'react-toastify';\nimport { BUILDING_TYPES } from '@/constants/admin-pages';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { OptionType } from '@/model/common';\nimport { CATEGORY_TYPES } from '@/constants/categorie';\nimport {\n  ITEPortal_Domain_Dto_AddProductDto,\n  ITEPortal_Domain_Dto_ProductDto,\n} from '@/api';\nimport {\n  BuildingProductValidationSchema,\n  BuildingProductValidationSchemaType,\n  CommonProductValidationSchemaType,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/validation-schemas';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport {\n  editProductApi,\n  useProductForm,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ninterface AddBuildingTypeProductProps {\n  editTableData: ITEPortal_Domain_Dto_ProductDto | null;\n}\n\nconst mapValues = (\n  values: BuildingProductValidationSchemaType\n): ITEPortal_Domain_Dto_AddProductDto => {\n  const buildingTypes = values?.buildingTypes?.map(\n    (type: OptionType) => type?.value\n  );\n\n  return {\n    name: values?.name,\n    categoryName: CATEGORY_TYPES.SELECT_BUILDING,\n    // @ts-expect-error to think how to map Enum to zod type\n    buildingTypes: buildingTypes,\n    resources: [\n      {\n        key: 'name',\n        value: values?.displayNameRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'name',\n        value: values?.displayNameEn || '',\n        cultureName: 'en',\n      },\n      {\n        key: 'description',\n        value: values?.descriptionRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'description',\n        value: values?.descriptionEn || '',\n        cultureName: 'en',\n      },\n      {\n        key: 'imageDescription',\n        value: values?.imageDescriptionRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'imageDescription',\n        value: values?.imageDescriptionEn || '',\n        cultureName: 'en',\n      },\n      {\n        key: 'additionalNotes',\n        value: values?.additionalNotesRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'additionalNotes',\n        value: values?.additionalNotesEn || '',\n        cultureName: 'en',\n      },\n    ],\n  };\n};\n\nexport const EditBuildingProductFieldset = ({\n  editTableData,\n}: AddBuildingTypeProductProps) => {\n  const culture = localStorage.getItem('lang');\n\n  const methods = useForm<BuildingProductValidationSchemaType>({\n    mode: 'onBlur',\n    resolver: zodResolver(BuildingProductValidationSchema),\n  });\n\n  const { categoryOptions } = useProductForm();\n\n  useEffect(() => {\n    editProductApi.setFormInstance({\n      map: mapValues,\n      formInstance: methods,\n    });\n  }, []);\n\n  useEffect(() => {\n    if (editTableData) {\n      const fetchData = async () => {\n        const productID = editTableData?.name;\n\n        if (!productID) {\n          return;\n        }\n\n        try {\n          const { data } = await fetchApi(EDIT_PRODUCT_RESOURCES(productID), {\n            method: FetchMethods.Get,\n            params: {\n              culture,\n            },\n          });\n          const buildingTypeValues = editTableData?.buildingTypes?.map(\n            (type: number) => {\n              const buildingTypeLabel = BUILDING_TYPES.find(\n                (dictionaryType) => dictionaryType.value === type\n              )?.label;\n\n              return {\n                value: type,\n                label: buildingTypeLabel,\n              };\n            }\n          );\n\n          const editDataWithResources = {\n            name: editTableData?.name,\n            imageUrls: editTableData?.imageUrls,\n            displayNameRu: data?.ru?.name,\n            displayNameEn: data?.en?.name,\n            buildingTypes: buildingTypeValues,\n            descriptionRu: data?.ru?.description,\n            descriptionEn: data?.en?.description,\n            imageDescriptionRu: data?.ru?.imageDescription,\n            imageDescriptionEn: data?.en?.imageDescription,\n            additionalNotesRu: data?.ru?.additionalNotes,\n            additionalNotesEn: data?.en?.additionalNotes,\n            categoryName: categoryOptions.find(\n              (ct) => ct.value === editTableData.categoryName\n            ),\n          } as any;\n\n          methods.reset(editDataWithResources);\n        } catch (error: any) {\n          const fieldErrors = error?.response?.data?.errors;\n\n          if (fieldErrors) {\n            toast.error(fieldErrors);\n          }\n        } finally {\n        }\n      };\n\n      fetchData();\n    }\n  }, [editTableData]);\n\n  return (\n    <FormProvider {...methods}>\n      <form>\n        <Stack spacing=\"5\">\n          <FormControlWrapper>\n            <Input<BuildingProductValidationSchemaType>\n              label=\"ID\"\n              maxWidth=\"100%\"\n              name=\"name\"\n              disabled={Boolean(editTableData)}\n              isRequired\n            />\n            <Input<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('service-name')} (RU)`}\n              maxWidth=\"100%\"\n              name=\"displayNameRu\"\n              isRequired\n            />\n            <Input<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('service-name')} (EN)`}\n              maxWidth=\"100%\"\n              name=\"displayNameEn\"\n              isRequired\n            />\n            <SelectComponent<BuildingProductValidationSchemaType>\n              label={useNameTranslate('building-type')}\n              options={BUILDING_TYPES}\n              closeMenuOnSelect={false}\n              isMulti\n              isRequired\n              name=\"buildingTypes\"\n            />\n            <SelectComponent<CommonProductValidationSchemaType>\n              label={useNameTranslate('category-name')}\n              options={categoryOptions}\n              isRequired\n              name=\"categoryName\"\n            />\n            <UploadFileDropzone<BuildingProductValidationSchemaType>\n              label={useNameTranslate('upload-image')}\n              defaultValue={editTableData?.imageUrls?.join('\\n')}\n              multiple={true}\n              name=\"imageUrls\"\n            />\n            <TextArea<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('image-description')} (RU)`}\n              name=\"imageDescriptionRu\"\n            />\n            <TextArea<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('image-description')} (EN)`}\n              name=\"imageDescriptionEn\"\n            />\n            <TextArea<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('service-description')} (RU)`}\n              name=\"descriptionRu\"\n            />\n            <TextArea<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('service-description')} (EN)`}\n              name=\"descriptionEn\"\n            />\n            <TextArea<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('additional-notes')} (RU)`}\n              name=\"additionalNotesRu\"\n            />\n            <TextArea<BuildingProductValidationSchemaType>\n              label={`${useNameTranslate('additional-notes')} (EN)`}\n              name=\"additionalNotesEn\"\n            />\n          </FormControlWrapper>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import { useForm, FormProvider } from 'react-hook-form';\nimport { FormControl, Stack } from '@chakra-ui/react';\nimport Input from '@/components/Fields/Input';\nimport React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { BUILDING_TYPES } from '@/constants/admin-pages';\nimport { useTranslation } from 'react-i18next';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { useQuery } from '@tanstack/react-query';\nimport {\n  ITEPortal_Domain_Dto_AddProductDto,\n  ITEPortal_Domain_Dto_ProductDto,\n} from '@/api';\nimport { useCommonProductEditLoader } from '@/pages/AdminPanel/ServiceDirectory/EditProductForm/useCommonProductEditLoader';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport {\n  CommonProductValidationSchema,\n  CommonProductValidationSchemaType,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/validation-schemas';\nimport {\n  editProductApi,\n  useProductForm,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\nimport { OptionType } from '@/model/common';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ninterface AddBuildingTypeProductProps {\n  editTableData: ITEPortal_Domain_Dto_ProductDto | null;\n}\n\nconst mapValues = (\n  values: CommonProductValidationSchemaType\n): ITEPortal_Domain_Dto_AddProductDto => {\n  const buildingTypes = values?.buildingTypes?.map(\n    (type: OptionType) => type?.value\n  );\n\n  return {\n    name: values.name,\n    // @ts-expect-error to think how to map Enum to zod type\n    buildingTypes: buildingTypes,\n    linkedProductIds: Array.isArray(values.linkedProductIds)\n      ? values.linkedProductIds.map((opt) => +opt.value)\n      : [],\n    categoryName: values.categoryName?.value as string,\n    resources: [\n      {\n        key: 'name',\n        value: values?.displayNameRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'name',\n        value: values?.displayNameEn || '',\n        cultureName: 'en',\n      },\n      {\n        key: 'description',\n        value: values?.descriptionRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'description',\n        value: values?.descriptionEn || '',\n        cultureName: 'en',\n      },\n    ],\n  };\n};\n\nexport const EditDefaultProductFieldset = ({\n  editTableData,\n}: AddBuildingTypeProductProps) => {\n  const { t } = useTranslation();\n  const { data: dependencyOptions } = useQuery(\n    QueryOptions.loadPriceListItemsShort()\n  );\n\n  const { categoryOptions, categoryName } = useProductForm();\n\n  console.log({ categoryName });\n\n  const { data: editData } = useCommonProductEditLoader(\n    editTableData,\n    categoryName\n  );\n\n  console.log(editData);\n\n  const methods = useForm<CommonProductValidationSchemaType>({\n    mode: 'onBlur',\n    resolver: zodResolver(CommonProductValidationSchema),\n  });\n\n  useEffect(() => {\n    methods.reset({\n      ...editData,\n    });\n  }, [editData]);\n\n  useEffect(() => {\n    editProductApi.setFormInstance({\n      formInstance: methods,\n      map: mapValues,\n    });\n  }, []);\n\n  return (\n    <FormProvider {...methods}>\n      <form>\n        <Stack spacing=\"5\">\n          <FormControlWrapper>\n            <Input<CommonProductValidationSchemaType>\n              label=\"ID\"\n              maxWidth=\"100%\"\n              name=\"name\"\n              disabled={Boolean(editTableData?.id)}\n              isRequired\n            />\n            <Input<CommonProductValidationSchemaType>\n              label={`${t('service-name')} (RU)`}\n              maxWidth=\"100%\"\n              name=\"displayNameRu\"\n              isRequired\n            />\n            <Input<CommonProductValidationSchemaType>\n              label={`${t('service-name')} (EN)`}\n              maxWidth=\"100%\"\n              name=\"displayNameEn\"\n              isRequired\n            />\n            <SelectComponent<CommonProductValidationSchemaType>\n              label={t('building-type')}\n              options={BUILDING_TYPES}\n              closeMenuOnSelect={false}\n              name=\"buildingTypes\"\n              isMulti\n              isRequired\n            />\n            <SelectComponent<CommonProductValidationSchemaType>\n              label={t('category-name')}\n              options={categoryOptions}\n              isRequired\n              name=\"categoryName\"\n            />\n            <UploadFileDropzone<CommonProductValidationSchemaType>\n              label={t('upload-image')}\n              defaultValue={editData?.imageUrls?.join('\\n')}\n              multiple={true}\n              name=\"imageFiles\"\n            />\n            <TextArea<CommonProductValidationSchemaType>\n              label={`${t('service-description')} (RU)`}\n              name=\"descriptionRu\"\n            />\n            <TextArea<CommonProductValidationSchemaType>\n              label={`${t('service-description')} (EN)`}\n              name=\"descriptionEn\"\n            />\n            <SelectComponent<CommonProductValidationSchemaType>\n              name=\"linkedProductIds\"\n              label={t('dependencies')}\n              options={dependencyOptions}\n              isMulti\n            />\n          </FormControlWrapper>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import {\n  Button,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerOverlay,\n} from '@chakra-ui/react';\nimport {\n  editProductApi,\n  useProductForm,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\nimport { AbstractEditProductDrawerForm } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/AbstractEditProductDrawerForm';\nimport { useTranslation } from 'react-i18next';\nimport { AsyncButton } from '@/components/AsyncButton';\nimport { useCommonProductSave } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useCommonProductSave';\nimport { CommonProductValidationSchemaType } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/validation-schemas';\nimport { queryClient } from '@/features/query';\nimport { useEffect } from 'react';\n\nexport const EditProductDrawer = () => {\n  const { categoryId, product, productType, isOpened, map, formInstance } =\n    useProductForm();\n  const { t } = useTranslation();\n\n  const { mutateAsync, isSuccess } =\n    useCommonProductSave<CommonProductValidationSchemaType>();\n\n  const handleSubmit = async () => {\n    if (!formInstance || typeof map !== 'function') {\n      return;\n    }\n\n    const isValid = await formInstance.trigger();\n\n    if (!isValid) {\n      return;\n    }\n\n    const values = formInstance.getValues();\n\n    return mutateAsync({\n      isUpdate: Boolean(product?.id),\n      values,\n      map: map,\n    });\n  };\n\n  useEffect(\n    function refetchProductsData() {\n      if (isSuccess) {\n        queryClient\n          .refetchQueries({\n            queryKey: ['category-products', categoryId],\n          })\n          .then(() => {\n            editProductApi.close();\n          });\n      }\n    },\n    [isSuccess]\n  );\n\n  return (\n    <Drawer\n      size=\"lg\"\n      isOpen={isOpened}\n      placement=\"right\"\n      onClose={() => editProductApi.close()}\n    >\n      <DrawerOverlay />\n      <DrawerContent>\n        <DrawerCloseButton />\n        <DrawerHeader>\n          {product?.id ? t('edit-product') : t('add-product')}\n        </DrawerHeader>\n\n        <DrawerBody>\n          <AbstractEditProductDrawerForm\n            product={product}\n            productType={productType}\n          />\n        </DrawerBody>\n\n        <DrawerFooter>\n          <Button\n            variant=\"outline\"\n            mr={3}\n            onClick={() => editProductApi.close()}\n          >\n            {t('cancel')}\n          </Button>\n          <AsyncButton colorScheme=\"blue\" onClick={handleSubmit}>\n            {t('save')}\n          </AsyncButton>\n        </DrawerFooter>\n      </DrawerContent>\n    </Drawer>\n  );\n};\n","import { useForm, FormProvider } from 'react-hook-form';\nimport { FormControl, Stack } from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport Input from '@/components/Fields/Input';\nimport React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport fetchApi from '@/utils/fetchAPI';\nimport { EDIT_PRODUCT_RESOURCES } from '@/constants/endpoints';\nimport { FetchMethods, FieldTypeConfig } from '@/utils/constants';\nimport { toast } from 'react-toastify';\nimport { OptionType } from '@/model/common';\nimport { BUILDING_TYPES } from '@/constants/admin-pages';\nimport { CATEGORY_TYPES } from '@/constants/categorie';\nimport {\n  CommonProductValidationSchemaType,\n  TemporaryStaffValidationSchema,\n  TemporaryStaffValidationSchemaType,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/validation-schemas';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport {\n  ITEPortal_Domain_Dto_AddProductDto,\n  ITEPortal_Domain_Dto_ProductDto,\n} from '@/api';\nimport {\n  editProductApi,\n  useProductForm,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\ninterface AddBuildingTypeProductProps {\n  editTableData: ITEPortal_Domain_Dto_ProductDto | null;\n}\n\nconst mapData = (\n  values: TemporaryStaffValidationSchemaType\n): ITEPortal_Domain_Dto_AddProductDto => {\n  const buildingTypes = values?.buildingTypes?.map(\n    (type: OptionType) => type?.value\n  );\n\n  return {\n    name: values?.name,\n    categoryName: CATEGORY_TYPES.TEMPORARY_STAFF,\n    fieldType: values?.fieldType?.value + '',\n    // @ts-expect-error to think how to map Enum to zod type\n    buildingTypes: buildingTypes,\n    resources: [\n      {\n        key: 'name',\n        value: values?.displayNameRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'name',\n        value: values?.displayNameEn || '',\n        cultureName: 'en',\n      },\n      {\n        key: 'description',\n        value: values?.descriptionRu || '',\n        cultureName: 'ru',\n      },\n      {\n        key: 'description',\n        value: values?.descriptionEn || '',\n        cultureName: 'en',\n      },\n    ],\n  };\n};\n\nexport const EditTemporaryStaffProductFieldset = ({\n  editTableData,\n}: AddBuildingTypeProductProps) => {\n  const culture = localStorage.getItem('lang');\n  const { categoryOptions } = useProductForm();\n\n  useEffect(() => {\n    if (editTableData) {\n      const fetchData = async () => {\n        const productID = editTableData?.name;\n\n        if (!productID) {\n          return;\n        }\n\n        const fieldTypeEditLabel = FieldTypeConfig.find(\n          (type: OptionType) => type.value === editTableData?.fieldType\n        )?.label;\n\n        try {\n          const { data } = await fetchApi(EDIT_PRODUCT_RESOURCES(productID), {\n            method: FetchMethods.Get,\n            params: {\n              culture,\n            },\n          });\n          const buildingTypeValues = editTableData?.buildingTypes?.map(\n            (type: number) => {\n              const buildingTypeLabel = BUILDING_TYPES.find(\n                (dictionaryType) => dictionaryType.value === type\n              )?.label;\n\n              return {\n                value: type,\n                label: buildingTypeLabel,\n              };\n            }\n          );\n\n          const editDataWithResources: TemporaryStaffValidationSchemaType = {\n            name: editTableData?.name,\n            buildingTypes: buildingTypeValues,\n            displayNameRu: data?.ru?.name,\n            displayNameEn: data?.en?.name,\n            descriptionRu: data?.ru?.description,\n            descriptionEn: data?.en?.description,\n            fieldType: {\n              value: editTableData?.fieldType,\n              label: fieldTypeEditLabel,\n            },\n            categoryName: categoryOptions.find(\n              (ct) => ct.value === editTableData.categoryName\n            ),\n          } as any;\n\n          methods.reset(editDataWithResources);\n        } catch (error: any) {\n          const fieldErrors = error?.response?.data?.errors;\n\n          if (fieldErrors) {\n            toast.error(fieldErrors);\n          }\n        } finally {\n        }\n      };\n\n      fetchData();\n    }\n  }, [editTableData]);\n\n  useEffect(() => {\n    // @ts-expect-error todo investigate type error\n    editProductApi.setFormInstance({\n      formInstance: methods,\n      map: mapData,\n    });\n  }, []);\n\n  const methods = useForm<TemporaryStaffValidationSchemaType>({\n    mode: 'onBlur',\n    resolver: zodResolver(TemporaryStaffValidationSchema),\n  });\n\n  return (\n    <FormProvider {...methods}>\n      <Stack spacing=\"5\">\n        <FormControlWrapper>\n          <Input<TemporaryStaffValidationSchemaType>\n            label=\"ID\"\n            maxWidth=\"100%\"\n            name=\"name\"\n            disabled={Boolean(editTableData)}\n            isRequired\n          />\n          <SelectComponent<TemporaryStaffValidationSchemaType>\n            label={useNameTranslate('building-type')}\n            options={BUILDING_TYPES}\n            closeMenuOnSelect={false}\n            isMulti\n            isRequired\n            name=\"buildingTypes\"\n          />\n          <Input<TemporaryStaffValidationSchemaType>\n            label={`${useNameTranslate('service-name')} (RU)`}\n            maxWidth=\"100%\"\n            name=\"displayNameRu\"\n            isRequired\n          />\n          <Input<TemporaryStaffValidationSchemaType>\n            label={`${useNameTranslate('service-name')} (EN)`}\n            maxWidth=\"100%\"\n            name=\"displayNameEn\"\n            isRequired\n          />\n          <SelectComponent<CommonProductValidationSchemaType>\n            label={useNameTranslate('category-name')}\n            options={categoryOptions}\n            isRequired\n            name=\"categoryName\"\n          />\n          <TextArea<TemporaryStaffValidationSchemaType>\n            label={`${useNameTranslate('service-description')} (RU)`}\n            name=\"descriptionRu\"\n          />\n          <TextArea<TemporaryStaffValidationSchemaType>\n            label={`${useNameTranslate('service-description')} (EN)`}\n            name=\"descriptionEn\"\n          />\n          <SelectComponent<TemporaryStaffValidationSchemaType>\n            label={useNameTranslate('additional-field')}\n            options={FieldTypeConfig}\n            isRequired\n            name=\"fieldType\"\n          />\n        </FormControlWrapper>\n      </Stack>\n    </FormProvider>\n  );\n};\n","import { useMutation } from '@tanstack/react-query';\nimport { ApiError, ITEPortal_Domain_Dto_AddProductDto } from '@/api';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\nimport fetchApi from '@/utils/fetchAPI';\nimport { SAVE_PRODUCT_IMAGES } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { CommonProductValidationSchemaType } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/validation-schemas';\nimport { useTranslation } from 'react-i18next';\n\nexport const useCommonProductSave = <\n  T extends CommonProductValidationSchemaType\n>() => {\n  const { t } = useTranslation();\n\n  return useMutation({\n    mutationKey: ['save-common-product'],\n    mutationFn: async (opts: {\n      values: T;\n      isUpdate: boolean;\n      map: (v: T) => ITEPortal_Domain_Dto_AddProductDto;\n    }) => {\n      const { values, isUpdate, map } = opts;\n      const categoryName = values.categoryName?.value as string;\n      const productData = map(values);\n\n      try {\n        if (isUpdate) {\n          await typedAxios.product.putProducts({\n            requestBody: { ...productData, categoryName },\n          });\n        } else {\n          await typedAxios.product.postProducts({\n            requestBody: { ...productData, categoryName },\n          });\n        }\n\n        const filesData = values.imageFiles || values.imageUrls;\n\n        if (filesData && filesData[0] instanceof File) {\n          const formData = new FormData();\n\n          filesData.forEach((file) => formData.append('images', file));\n\n          await fetchApi(\n            SAVE_PRODUCT_IMAGES(values?.name),\n            {\n              method: FetchMethods.Post,\n              data: formData,\n            },\n            { 'Content-Type': 'multipart/form-data' }\n          );\n        }\n\n        toast.success(t('product-saved-successfully'));\n      } catch (error) {\n        if (error instanceof ApiError && typeof error.body === 'string') {\n          toast.error(error.body);\n        }\n      }\n    },\n  });\n};\n","import {\n  ITEPortal_Domain_Dto_AddProductDto,\n  ITEPortal_Domain_Dto_CategoryDto,\n  ITEPortal_Domain_Dto_ProductDto,\n} from '@/api';\nimport { createApi, createStore } from 'effector';\nimport { useUnit } from 'effector-react';\nimport { UseFormReturn } from 'react-hook-form/dist/types';\nimport {\n  BuildingProductValidationSchemaType,\n  CommonProductValidationSchemaType,\n  TemporaryStaffValidationSchemaType,\n} from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/validation-schemas';\nimport { ProductTypesType } from '@/constants/categorie';\nimport { useQuery } from '@tanstack/react-query';\nimport { QueryOptions } from '@/features/query/query-options';\n\nconst $editProduct = createStore<{\n  isOpened: boolean;\n  product: ITEPortal_Domain_Dto_ProductDto | null;\n  productType?: ProductTypesType | null;\n  categoryName?: ITEPortal_Domain_Dto_CategoryDto['name'];\n  categoryId?: ITEPortal_Domain_Dto_CategoryDto['id'] | null;\n  formInstance: UseFormReturn<\n    | CommonProductValidationSchemaType\n    | TemporaryStaffValidationSchemaType\n    | BuildingProductValidationSchemaType\n  > | null;\n  map:\n    | ((\n        values:\n          | CommonProductValidationSchemaType\n          | TemporaryStaffValidationSchemaType\n          | BuildingProductValidationSchemaType\n      ) => ITEPortal_Domain_Dto_AddProductDto)\n    | null;\n}>({\n  categoryName: null,\n  categoryId: null,\n  isOpened: false,\n  product: null,\n  formInstance: null,\n  productType: null,\n  map: null,\n});\n\nexport const editProductApi = createApi($editProduct, {\n  open: (\n    state,\n    payload: {\n      product: ITEPortal_Domain_Dto_ProductDto | null;\n      productType?: ProductTypesType | null;\n      categoryName?: ITEPortal_Domain_Dto_CategoryDto['name'];\n      categoryId?: ITEPortal_Domain_Dto_CategoryDto['id'];\n    }\n  ) => {\n    return {\n      ...state,\n      product: payload.product,\n      productType: payload.productType,\n      categoryName: payload.categoryName,\n      categoryId: payload.categoryId,\n      isOpened: true,\n    };\n  },\n\n  setFormInstance: (\n    state,\n    payload: {\n      formInstance?: UseFormReturn<\n        | CommonProductValidationSchemaType\n        | TemporaryStaffValidationSchemaType\n        | BuildingProductValidationSchemaType\n      >;\n      map: (\n        values:\n          | CommonProductValidationSchemaType\n          | TemporaryStaffValidationSchemaType\n          | BuildingProductValidationSchemaType\n      ) => ITEPortal_Domain_Dto_AddProductDto;\n    }\n  ) => {\n    return {\n      ...state,\n      ...payload,\n    };\n  },\n\n  close: () => {\n    return {\n      isOpened: false,\n      product: null,\n      formInstance: null,\n      productType: null,\n      map: null,\n      categoryName: null,\n      categoryId: null,\n    };\n  },\n});\n\nexport const useProductForm = () => {\n  const { data: categoryOptions = [] } = useQuery(\n    QueryOptions.loadCategoryOptions()\n  );\n\n  return {\n    ...useUnit($editProduct),\n    categoryOptions,\n  };\n};\n","import { ITEPortal_Domain_Dto_ProductDto } from '@/api';\nimport {\n  CATEGORY_TYPES,\n  PRODUCT_TYPES,\n  ProductTypesType,\n} from '@/constants/categorie';\nimport i18n from '@/i18n';\n\nexport const CreateProductUtils = {\n  getProductType: (product: ITEPortal_Domain_Dto_ProductDto | null) => {\n    if (!product) {\n      return null;\n    }\n\n    const productCategory = product.categoryName;\n\n    switch (productCategory) {\n      case CATEGORY_TYPES.SELECT_BUILDING: {\n        return PRODUCT_TYPES.BUILDING;\n      }\n\n      case CATEGORY_TYPES.TEMPORARY_STAFF: {\n        return PRODUCT_TYPES.TEMPORARY_STAFF;\n      }\n\n      default: {\n        return PRODUCT_TYPES.COMMON;\n      }\n    }\n  },\n\n  getCreateButtonLabelByType: (productType: ProductTypesType | null) => {\n    switch (productType) {\n      case PRODUCT_TYPES.BUILDING: {\n        return i18n.t('add-service-for-buildings');\n      }\n\n      case PRODUCT_TYPES.TEMPORARY_STAFF: {\n        return i18n.t('add-service-for-temporary-staff');\n      }\n\n      default: {\n        return i18n.t('add-service');\n      }\n    }\n  },\n};\n","import * as vali from 'zod';\nimport i18n from '@/i18n';\n\nconst OptionSchema = vali.object(\n  {\n    value: vali.union([vali.coerce.string(), vali.number()]),\n    label: vali.coerce.string().nullable(),\n  },\n  {\n    required_error: i18n.t('required-field'),\n  }\n);\n\nconst SchemaWithImages = vali.object({\n  imageUrls: vali\n    .array(vali.union([vali.string(), vali.instanceof(File)]))\n    .optional()\n    .nullable(),\n  imageFiles: vali.array(vali.instanceof(File)).optional().nullable(),\n});\n\nexport const SharedProductValidationSchema = vali.object({\n  name: vali\n    .string({\n      invalid_type_error: i18n.t('required-field'),\n    })\n    .min(1, {\n      message: i18n.t('required-field'),\n    }),\n  displayNameRu: vali\n    .string({\n      invalid_type_error: i18n.t('required-field'),\n    })\n    .min(1, {\n      message: i18n.t('required-field'),\n    }),\n  displayNameEn: vali\n    .string({\n      invalid_type_error: i18n.t('required-field'),\n    })\n    .min(1, {\n      message: i18n.t('required-field'),\n    }),\n  buildingTypes: vali.array(OptionSchema, {\n    required_error: i18n.t('required-field'),\n  }),\n  descriptionRu: vali.coerce.string().optional().nullable(),\n  descriptionEn: vali.coerce.string().optional().nullable(),\n  categoryName: OptionSchema,\n});\n\nexport const CommonProductValidationSchema = vali\n  .object({\n    linkedProductIds: vali.array(OptionSchema).optional(),\n  })\n  .merge(SharedProductValidationSchema)\n  .merge(SchemaWithImages);\n\nexport const BuildingProductValidationSchema = vali\n  .object({\n    imageDescriptionRu: vali\n      .string({\n        invalid_type_error: i18n.t('required-field'),\n      })\n      .optional()\n      .nullable(),\n    imageDescriptionEn: vali\n      .string({\n        invalid_type_error: i18n.t('required-field'),\n      })\n      .optional()\n      .nullable(),\n    additionalNotesRu: vali\n      .string({\n        invalid_type_error: i18n.t('required-field'),\n      })\n      .optional()\n      .nullable(),\n    additionalNotesEn: vali\n      .string({\n        invalid_type_error: i18n.t('required-field'),\n      })\n      .optional()\n      .nullable(),\n  })\n  .merge(SharedProductValidationSchema)\n  .merge(SchemaWithImages);\n\nexport const TemporaryStaffValidationSchema = vali\n  .object({\n    fieldType: OptionSchema,\n  })\n  .merge(SharedProductValidationSchema);\n\nexport type CommonProductValidationSchemaType = vali.infer<\n  typeof CommonProductValidationSchema\n>;\nexport type BuildingProductValidationSchemaType = vali.infer<\n  typeof BuildingProductValidationSchema\n>;\nexport type TemporaryStaffValidationSchemaType = vali.infer<\n  typeof TemporaryStaffValidationSchema\n>;\n","import { BUILDING_TYPES } from '@/constants/admin-pages';\nimport { useQuery } from '@tanstack/react-query';\nimport { ITEPortal_Domain_Dto_ProductDto } from '@/api';\nimport { typedAxios } from '@/api/typed-axios';\nimport { CommonProductValidationSchemaType } from '@/pages/AdminPanel/ServiceDirectory/EditProductForm/types';\nimport { OptionType } from '@/model/common';\nimport { useProductForm } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\n\nexport const useCommonProductEditLoader = (\n  product: ITEPortal_Domain_Dto_ProductDto | null,\n  categoryName?: string | null\n) => {\n  const { categoryOptions } = useProductForm();\n\n  return useQuery<CommonProductValidationSchemaType>({\n    queryKey: ['edit-product', product?.id],\n    queryFn: async () => {\n      if (!product?.name) {\n        // @ts-expect-error desc\n        return {\n          categoryName: categoryOptions.find((ct) => categoryName === ct.value),\n        } as CommonProductValidationSchemaType;\n      }\n\n      const resources = await typedAxios.product.getProductsResources({\n        name: product?.name,\n      });\n\n      const buildingTypeValues = product?.buildingTypes?.map((type: number) => {\n        const buildingTypeLabel = BUILDING_TYPES.find(\n          (dictionaryType) => dictionaryType.value === type\n        )?.label;\n\n        return {\n          value: type,\n          label: buildingTypeLabel,\n        } satisfies OptionType;\n      });\n\n      const editDataWithResources: CommonProductValidationSchemaType = {\n        name: product.name,\n        displayNameRu: resources?.ru?.name,\n        displayNameEn: resources?.en?.name,\n        // @ts-expect-error to think how to map Enum to zod type\n        buildingTypes: buildingTypeValues || [],\n        descriptionRu: resources?.ru?.description,\n        descriptionEn: resources?.en?.description,\n        imageUrls: product.imageUrls || [],\n        // @ts-expect-error desc\n        categoryName: categoryOptions.find((ct) =>\n          categoryName\n            ? categoryName === ct.value\n            : ct.value === product.categoryName\n        ),\n        // categoryName: {\n        //   value: product.categoryName || '',\n        //   label: product.categoryName || '',\n        // },\n        linkedProductIds: Array.isArray(product.linkedProductIds)\n          ? product.linkedProductIds.map((id) => ({ value: id, label: null }))\n          : [],\n        // dependencies: [\n        //   {\n        //     value: 474,\n        //     // label: 474,\n        //   },\n        // ],\n      };\n\n      return editDataWithResources;\n    },\n  });\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport React, { useEffect } from 'react';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { Stack } from '@chakra-ui/react';\nimport * as vali from 'zod';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport { useNameTranslate } from '@/hooks/useStringName';\n\nconst ValidationSchema = vali.object({\n  file: vali.array(vali.instanceof(File)).optional().nullish(),\n});\n\nexport type ImportCSVFormValues = vali.infer<typeof ValidationSchema>;\n\nexport const ImportCSVForm = () => {\n  const instance = useForm<ImportCSVFormValues>({\n    resolver: zodResolver(ValidationSchema),\n  });\n\n  useEffect(() => {\n    ModalFactory.updateContext(instance);\n  }, [instance]);\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing={4}>\n        <UploadFileDropzone\n          label={useNameTranslate('upload-csv')}\n          multiple={false}\n          name=\"file\"\n          accept={{ 'text/csv': ['.csv'] }}\n        />\n      </Stack>\n    </FormProvider>\n  );\n};\n","import {\n  useCategoriesLoader,\n  useHasCategorySearchCriteria,\n} from '@/pages/AdminPanel/Accordion/use-categories-loader';\nimport { Accordion } from '@chakra-ui/react';\nimport { CategoryItem } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/CategoryItem';\nimport { EditCategoryModalForm } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/EditCategoryModalForm';\nimport {\n  DragDropContext,\n  Droppable,\n  Draggable,\n  OnDragEndResponder,\n} from 'react-beautiful-dnd';\nimport { DraggableUtils } from '@/utils/draggable-utils';\nimport { useCategoriesOrderUpdate } from '@/pages/AdminPanel/Accordion/use-categories-order-update';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport React, { useMemo, useState } from 'react';\nimport { DraggableHandlerIcon } from '@/components/Icons/DraggableHandlerIcon';\nimport { EditProductDrawer } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/EditProductDrawer';\n\nexport const ServiceDirectory = (): JSX.Element => {\n  const { data = [] } = useCategoriesLoader();\n  const [currentExpandedIndex, setExpandedIndex] = useState<number | undefined>(\n    undefined\n  );\n  const hasSearchCriteria = useHasCategorySearchCriteria();\n  const canBeReordered = useMemo(() => {\n    if (hasSearchCriteria) {\n      return false;\n    }\n\n    return DraggableUtils.canBeReordered(data);\n  }, [data, hasSearchCriteria]);\n  const { mutateAsync: reorderAsync, isPending: isReordering } =\n    useCategoriesOrderUpdate();\n\n  const dropHandler: OnDragEndResponder = (result) => {\n    const { source, destination } = result;\n\n    if (!destination) {\n      return;\n    }\n\n    const currentOpened = data.find(\n      (_, index) => index === currentExpandedIndex\n    );\n\n    const startIndex = source.index;\n    const endIndex = destination.index;\n\n    reorderAsync({\n      categoriesSource: data,\n      startIndex,\n      endIndex,\n      preSaveFn: (reorderedList) => {\n        if (reorderedList) {\n          const reorderedExpandedIndex = reorderedList.findIndex(\n            (it) => it.id === currentOpened?.id\n          );\n\n          if (reorderedExpandedIndex > -1) {\n            setExpandedIndex(reorderedExpandedIndex);\n          }\n        }\n      },\n    });\n  };\n\n  return (\n    <LoaderWrapper loading={isReordering}>\n      <Accordion\n        index={currentExpandedIndex}\n        allowToggle\n        onChange={(expandedIndex) => {\n          if (typeof expandedIndex === 'number') {\n            setExpandedIndex(expandedIndex);\n          }\n        }}\n      >\n        <DragDropContext onDragEnd={dropHandler}>\n          <Droppable\n            droppableId=\"first-level-categories\"\n            type=\"draggable-accordion\"\n          >\n            {(provided, snapshot) => {\n              return (\n                <div\n                  {...provided.droppableProps}\n                  ref={provided.innerRef}\n                  style={DraggableUtils.getListStyle(snapshot.isDraggingOver)}\n                >\n                  {data?.map((category, index) => {\n                    return (\n                      <Draggable\n                        key={category.name}\n                        draggableId={category.id.toString()}\n                        index={index}\n                        isDragDisabled={!canBeReordered}\n                      >\n                        {(itemProvided, itemSnapshot) => {\n                          return (\n                            <div\n                              ref={itemProvided.innerRef}\n                              {...itemProvided.draggableProps}\n                              style={DraggableUtils.getItemStyle(\n                                itemSnapshot.isDragging,\n                                itemProvided.draggableProps.style\n                              )}\n                            >\n                              <CategoryItem\n                                key={category.name}\n                                category={category}\n                                isDragDisabled={!canBeReordered}\n                                dragHandle={\n                                  canBeReordered ? (\n                                    <div {...itemProvided.dragHandleProps}>\n                                      <DraggableHandlerIcon />\n                                    </div>\n                                  ) : null\n                                }\n                              />\n                            </div>\n                          );\n                        }}\n                      </Draggable>\n                    );\n                  })}\n                  {provided.placeholder}\n                </div>\n              );\n            }}\n          </Droppable>\n        </DragDropContext>\n      </Accordion>\n      <EditCategoryModalForm />\n      <EditProductDrawer />\n    </LoaderWrapper>\n  );\n};\n","import { Button, Flex } from '@chakra-ui/react';\nimport { editProductApi } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\nimport { CreateProductUtils } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/utils';\nimport { editCategoryApi } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/edit-category-api';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '@/api';\nimport { ProductTypesType } from '@/constants/categorie';\nimport i18n from '@/i18n';\nimport { isNil } from '@/utils/is-nil';\n\ntype CategoryControlsPropsType = {\n  category: ITEPortal_Domain_Dto_CategoryDto;\n  productType: ProductTypesType;\n};\nexport const CategoryControls = (props: CategoryControlsPropsType) => {\n  const { category, productType } = props;\n  const isSubCategory = !isNil(category.parentCategoryId);\n\n  return (\n    <Flex>\n      <Button\n        size=\"sm\"\n        ml={4}\n        mr={4}\n        onClick={() =>\n          editProductApi.open({\n            product: null,\n            productType,\n            categoryName: category.name,\n            categoryId: category.id,\n          })\n        }\n      >\n        {CreateProductUtils.getCreateButtonLabelByType(productType)}\n      </Button>\n      {!isSubCategory && (\n        <Button\n          size=\"sm\"\n          ml={4}\n          mr={4}\n          onClick={() =>\n            editCategoryApi.open({\n              category: null,\n              parentCategoryName: category.name,\n            })\n          }\n        >\n          {i18n.t('add-sub-category')}\n        </Button>\n      )}\n    </Flex>\n  );\n};\n","import {\n  AccordionButton,\n  AccordionIcon,\n  AccordionItem,\n  AccordionPanel,\n  Box,\n  Card,\n  CardBody,\n  Flex,\n} from '@chakra-ui/react';\nimport { ProductsList } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/ProductsList';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '@/api';\nimport React, { ReactNode } from 'react';\nimport { EditIcon } from '@chakra-ui/icons';\nimport { editCategoryApi } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/edit-category-api';\nimport { SubCategoriesList } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/SubCategoriesList';\nimport { CreateProductUtils } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/utils';\nimport { CategoryControls } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/CategoryControls';\nimport { Debug } from '@/components/Debug';\n\ntype CategoryItemPropsType = {\n  category: ITEPortal_Domain_Dto_CategoryDto;\n  isDragDisabled?: boolean;\n  dragHandle?: ReactNode;\n};\n\nexport const CategoryItem = (props: CategoryItemPropsType) => {\n  const { category, dragHandle } = props;\n  const productType = CreateProductUtils.getProductType({\n    id: 0,\n    categoryName: category.name,\n  });\n\n  return (\n    <AccordionItem key={category.id} border=\"unset\">\n      {({ isExpanded }) => (\n        <Card mb={2}>\n          <CardBody padding={2} pb={isExpanded ? 4 : 2}>\n            <Flex flexDirection=\"row\" alignItems=\"center\">\n              {dragHandle}\n              <AccordionButton>\n                <Box as=\"span\" flex=\"1\" textAlign=\"left\" fontWeight=\"500\">\n                  <Debug>{category.id}</Debug>\n                  {category.displayName || category.name}\n                </Box>\n              </AccordionButton>\n              <EditIcon\n                ml={2}\n                mr={2}\n                cursor=\"pointer\"\n                onClick={() => {\n                  editCategoryApi.open({\n                    category,\n                    parentCategoryName: category.parentCategoryId,\n                  });\n                }}\n              />\n\n              <AccordionButton\n                width=\"fit-content\"\n                background=\"transparent !important\"\n              >\n                <AccordionIcon cursor=\"pointer\" />\n              </AccordionButton>\n            </Flex>\n            {isExpanded && (\n              <>\n                <AccordionPanel pb={4}>\n                  {isExpanded && (\n                    <SubCategoriesList parentCategoryId={category.id} />\n                  )}\n                  {isExpanded && <ProductsList categoryId={category.id} />}\n                </AccordionPanel>\n                {productType && (\n                  <CategoryControls\n                    category={category}\n                    productType={productType}\n                  />\n                )}\n              </>\n            )}\n          </CardBody>\n        </Card>\n      )}\n    </AccordionItem>\n  );\n};\n","import { EditCategoryForm } from '@/pages/AdminPanel/ServiceDirectory/EditCategoryForm/EditCategoryForm';\nimport {\n  editCategoryApi,\n  useEditCategoryApi,\n} from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/edit-category-api';\nimport { useCategoriesLoaderQueryOptions } from '@/pages/AdminPanel/Accordion/use-categories-loader';\nimport { queryClient } from '@/features/query';\n\nexport const EditCategoryModalForm = () => {\n  const { category, isModalOpened, parentCategoryName } = useEditCategoryApi();\n\n  const { queryKey } = useCategoriesLoaderQueryOptions();\n\n  if (!isModalOpened) {\n    return null;\n  }\n\n  return (\n    <EditCategoryForm\n      openConfirm={isModalOpened}\n      closeModal={() => editCategoryApi.close()}\n      refresh={() => {\n        queryClient.invalidateQueries({\n          queryKey: queryKey,\n        });\n      }}\n      // @ts-expect-error refactor types\n      editTableData={category || undefined}\n      parentCategoryName={parentCategoryName}\n    />\n  );\n};\n","import {\n  ITEPortal_Domain_Dto_CategoryDto,\n  ITEPortal_Domain_Dto_ProductDto,\n} from '@/api';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport { Column } from 'react-table';\nimport i18n from '@/i18n';\nimport { Badge, Flex, Text, Tooltip } from '@chakra-ui/react';\nimport { DeleteIcon, EditIcon } from '@chakra-ui/icons';\nimport { editProductApi } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/useProductForm';\nimport { DraggableHandlerIcon } from '@/components/Icons/DraggableHandlerIcon';\nimport { DraggableTable } from '@/components/Table/DraggableTable';\nimport {\n  useProductsLoader,\n  useProductsLoaderOptions,\n} from '@/pages/AdminPanel/Accordion/use-products-loader';\nimport { useProductsOrderUpdate } from '@/pages/AdminPanel/Accordion/use-products-order-update';\nimport { OnDragEndResponder } from 'react-beautiful-dnd';\nimport { BUILDING_TYPES } from '@/constants/admin-pages';\nimport { CreateProductUtils } from '@/pages/AdminPanel/ServiceDirectory/EditProductFieldsets/utils';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\nimport { queryClient } from '@/features/query';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useHasProductSearchCriteria } from '@/pages/AdminPanel/Accordion/use-categories-loader';\n\ntype ProductsListPropsType = {\n  categoryId: ITEPortal_Domain_Dto_CategoryDto['id'];\n};\n\nconst BuildingTypes = ({ row }: { row: ITEPortal_Domain_Dto_ProductDto }) => {\n  const buildingTypes = row.buildingTypes;\n\n  const buildingTypeNames =\n    buildingTypes?.map((type: number) => {\n      return BUILDING_TYPES.find(\n        (dictionaryTypeName) => dictionaryTypeName.value === type\n      )?.label;\n    }) || [];\n\n  const total = buildingTypeNames.length;\n  const tailLength = total - 2;\n\n  if (tailLength > 0) {\n    return (\n      <Tooltip\n        label={buildingTypeNames.join(', ')}\n        placement=\"top\"\n        hasArrow\n        openDelay={500}\n      >\n        <Flex\n          flexDirection=\"row\"\n          flexWrap=\"wrap\"\n          gap={1}\n          alignItems=\"center\"\n          cursor=\"help\"\n        >\n          {buildingTypeNames.slice(0, 2).map((bt, i) => (\n            <Badge fontSize=\"0.7em\" key={i}>\n              {bt}\n            </Badge>\n          ))}{' '}\n          {tailLength > 0 && <Text fontSize=\"0.7em\">+{tailLength} </Text>}\n        </Flex>\n      </Tooltip>\n    );\n  }\n\n  return (\n    <Flex flexDirection=\"row\" flexWrap=\"wrap\" gap={1} alignItems=\"center\">\n      {buildingTypeNames.slice(0, 2).map((bt, i) => (\n        <Badge fontSize=\"0.7em\" key={i}>\n          {bt}\n        </Badge>\n      ))}\n    </Flex>\n  );\n};\n\nconst getColumns = (opts: {\n  isDraggable: boolean;\n  onRemoved: () => void;\n}): Array<Column<ITEPortal_Domain_Dto_ProductDto>> => {\n  const handleProductDelete = (product: ITEPortal_Domain_Dto_ProductDto) => {\n    ModalFactory.confirm({\n      title: i18n.t('attention'),\n      Component: () => <>{i18n.t('delete-order-item-message')}</>,\n      okLabel: i18n.t('delete'),\n      onOk: async () => {\n        if (!product.name) {\n          return;\n        }\n\n        try {\n          await typedAxios.product.deleteProducts({\n            name: product.name,\n          });\n\n          toast.success(i18n.t('order-item-deleted'));\n\n          ModalFactory.close();\n\n          opts.onRemoved();\n        } catch {\n          toast.error(i18n.t('error-occurred'));\n        }\n      },\n    });\n  };\n\n  const columns: Array<Column<ITEPortal_Domain_Dto_ProductDto>> = [\n    {\n      id: 'drag-handler',\n      Header: 'ID',\n      width: '2%',\n      Cell: () => <DraggableHandlerIcon />,\n    },\n    {\n      Header: opts.isDraggable ? () => null : 'ID',\n      accessor: 'name',\n      width: '5%',\n    },\n    {\n      Header: i18n.t('service-name'),\n      accessor: 'displayName',\n      width: '550%',\n    },\n    {\n      Header: i18n.t('building-type'),\n      accessor: 'buildingTypes',\n      minWidth: 250,\n      Cell: ({ row }) => <BuildingTypes row={row.original} />,\n    },\n    {\n      id: 'actions',\n      Cell: ({ row }) => (\n        <Flex flexDirection=\"row\" gap={4}>\n          <EditIcon\n            cursor=\"pointer\"\n            onClick={() => {\n              if (row.original.categoryId) {\n                editProductApi.open({\n                  product: row.original,\n                  productType: CreateProductUtils.getProductType(row.original),\n                  categoryName: row.original.categoryName,\n                  categoryId: +row.original.categoryId,\n                });\n              }\n            }}\n          />\n          <DeleteIcon\n            cursor=\"pointer\"\n            onClick={() => handleProductDelete(row.original)}\n          />\n        </Flex>\n      ),\n    },\n  ];\n\n  return columns.filter((c) => {\n    if (opts.isDraggable) {\n      return true;\n    }\n\n    return c.id !== 'drag-handler';\n  });\n};\n\nexport const ProductsList = (props: ProductsListPropsType) => {\n  const hasSearch = useHasProductSearchCriteria();\n\n  const { t } = useTranslation();\n  const { getProductsLoaderOptions } = useProductsLoaderOptions();\n  const { isFetching, data = [] } = useProductsLoader(props.categoryId);\n  const { mutate: updateProductsOrder, isPending: isUpdatingOrder } =\n    useProductsOrderUpdate(props.categoryId);\n\n  const dropHandler: OnDragEndResponder = (result) => {\n    const { source, destination } = result;\n\n    if (!destination) {\n      return;\n    }\n\n    const startIndex = source.index;\n    const endIndex = destination.index;\n\n    updateProductsOrder({\n      productsSource: data,\n      startIndex,\n      endIndex,\n    });\n  };\n\n  if (data.length === 0 && !isFetching) {\n    return null;\n  }\n\n  return (\n    <>\n      <Text fontWeight=\"500\" mb={2}>\n        {t('services-list')}\n      </Text>\n      <LoaderWrapper loading={isFetching || isUpdatingOrder}>\n        <DraggableTable\n          columns={getColumns({\n            isDraggable: !hasSearch,\n            onRemoved: () =>\n              queryClient.refetchQueries({\n                queryKey: getProductsLoaderOptions(props.categoryId).queryKey,\n              }),\n          })}\n          data={data}\n          onDragEnd={dropHandler}\n        />\n      </LoaderWrapper>\n    </>\n  );\n};\n","import { ITEPortal_Domain_Dto_CategoryDto } from '@/api';\nimport {\n  DragDropContext,\n  Draggable,\n  Droppable,\n  OnDragEndResponder,\n} from 'react-beautiful-dnd';\nimport { DraggableUtils } from '@/utils/draggable-utils';\nimport { useSubCategoriesOrderUpdate } from '@/pages/AdminPanel/Accordion/use-sub-categories-order-update';\nimport { CategoryItem } from '@/pages/AdminPanel/ServiceDirectory/ServiceDirectory.Accordion/CategoryItem';\nimport { DraggableHandlerIcon } from '@/components/Icons/DraggableHandlerIcon';\nimport React, { useMemo, useState } from 'react';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport { Accordion, Text } from '@chakra-ui/react';\n\nimport {\n  useHasCategorySearchCriteria,\n  useSubCategoriesLoader,\n} from '@/pages/AdminPanel/Accordion/use-categories-loader';\nimport { useTranslation } from 'react-i18next';\n\ntype SubCategoriesListPropsType = {\n  parentCategoryId: ITEPortal_Domain_Dto_CategoryDto['id'];\n};\n\nexport const SubCategoriesList = (props: SubCategoriesListPropsType) => {\n  const { parentCategoryId } = props;\n  const { t } = useTranslation();\n  const [currentExpandedIndex, setExpandedIndex] = useState<number | undefined>(\n    undefined\n  );\n\n  const hasCategorySearchCriteria = useHasCategorySearchCriteria();\n\n  const { data: categories = [], isFetching } =\n    useSubCategoriesLoader(parentCategoryId);\n\n  const canBeReordered = useMemo(() => {\n    if (hasCategorySearchCriteria) {\n      return false;\n    }\n\n    if (!categories.length) {\n      return false;\n    }\n\n    return DraggableUtils.canBeReordered(categories);\n  }, [categories, hasCategorySearchCriteria]);\n\n  const { mutateAsync: reorderAsync, isPending: isReordering } =\n    useSubCategoriesOrderUpdate(parentCategoryId);\n\n  const dropHandler: OnDragEndResponder = (result) => {\n    const { source, destination } = result;\n\n    if (!destination) {\n      return;\n    }\n\n    const currentOpened = categories.find(\n      (_, index) => index === currentExpandedIndex\n    );\n\n    const startIndex = source.index;\n    const endIndex = destination.index;\n\n    reorderAsync({\n      categoriesSource: categories,\n      startIndex,\n      endIndex,\n      preSaveFn: (reorderedList) => {\n        if (reorderedList) {\n          const reorderedExpandedIndex = reorderedList.findIndex(\n            (it) => it.id === currentOpened?.id\n          );\n\n          if (reorderedExpandedIndex > -1) {\n            setExpandedIndex(reorderedExpandedIndex);\n          }\n        }\n      },\n    });\n  };\n\n  if (categories.length === 0) {\n    return null;\n  }\n\n  return (\n    <>\n      <Text fontWeight=\"500\" mb={2}>\n        {t('sub-categories')}\n      </Text>\n      <Accordion\n        allowToggle\n        index={currentExpandedIndex}\n        onChange={(expandedIndex) => {\n          if (typeof expandedIndex === 'number') {\n            setExpandedIndex(expandedIndex);\n          }\n        }}\n      >\n        <LoaderWrapper loading={isReordering || isFetching}>\n          <DragDropContext onDragEnd={dropHandler}>\n            <Droppable\n              droppableId=\"first-level-categories\"\n              type=\"draggable-accordion-sub-categories\"\n            >\n              {(provided, snapshot) => {\n                return (\n                  <div\n                    {...provided.droppableProps}\n                    ref={provided.innerRef}\n                    style={{\n                      ...DraggableUtils.getListStyle(snapshot.isDraggingOver),\n                      padding: 0,\n                      marginBottom: '1rem',\n                    }}\n                  >\n                    {categories?.map((category, index) => {\n                      return (\n                        <Draggable\n                          key={category.name}\n                          draggableId={category.id.toString()}\n                          index={index}\n                          isDragDisabled={!canBeReordered}\n                        >\n                          {(itemProvided, itemSnapshot) => {\n                            return (\n                              <div\n                                ref={itemProvided.innerRef}\n                                {...itemProvided.draggableProps}\n                                style={DraggableUtils.getItemStyle(\n                                  itemSnapshot.isDragging,\n                                  itemProvided.draggableProps.style\n                                )}\n                              >\n                                <CategoryItem\n                                  key={category.name}\n                                  category={category}\n                                  isDragDisabled={!canBeReordered}\n                                  dragHandle={\n                                    canBeReordered ? (\n                                      <div {...itemProvided.dragHandleProps}>\n                                        <DraggableHandlerIcon />\n                                      </div>\n                                    ) : null\n                                  }\n                                />\n                              </div>\n                            );\n                          }}\n                        </Draggable>\n                      );\n                    })}\n                    {provided.placeholder}\n                  </div>\n                );\n              }}\n            </Droppable>\n          </DragDropContext>\n        </LoaderWrapper>\n      </Accordion>\n    </>\n  );\n};\n","import { useUnit } from 'effector-react';\nimport { createApi, createStore } from 'effector';\nimport { ITEPortal_Domain_Dto_CategoryDto } from '@/api';\n\nconst INITIAL_STATE = {\n  isModalOpened: false,\n  category: null,\n  parentCategoryName: null,\n};\n\nconst $editCategory = createStore<{\n  isModalOpened: boolean;\n  category: ITEPortal_Domain_Dto_CategoryDto | null;\n  parentCategoryName: ITEPortal_Domain_Dto_CategoryDto['parentCategoryId'];\n}>(INITIAL_STATE);\n\nexport const editCategoryApi = createApi($editCategory, {\n  open: (\n    state,\n    payload: {\n      category: ITEPortal_Domain_Dto_CategoryDto | null;\n      parentCategoryName: ITEPortal_Domain_Dto_CategoryDto['name'];\n    }\n  ) => {\n    return {\n      ...state,\n      category: payload.category,\n      parentCategoryName: payload.parentCategoryName,\n      isModalOpened: true,\n    };\n  },\n\n  close: () => {\n    return INITIAL_STATE;\n  },\n});\n\nexport const useEditCategoryApi = () => {\n  return useUnit($editCategory);\n};\n","import * as v from 'zod';\n\nexport const ServiceDictionaryValidationSchema = v.object({\n  name: v.string().min(1, { message: 'ID field is required' }),\n  displayNameRu: v\n    .string()\n    .min(1, { message: 'Category name RU field is required' }),\n  displayNameEn: v\n    .string()\n    .min(1, { message: 'Category name EN  field is required' }),\n  unitOfMeasure: v.object({\n    value: v.string(),\n    label: v.string(),\n  }),\n});\n","import { Box, Code } from '@chakra-ui/react';\nimport { Table } from '@/components/Table/Table';\nimport { useMemo } from 'react';\nimport { Column } from 'react-table';\nimport { BitrixTableData } from '@/pages/AdminPanel/Settings/BitrixPassport/TableData';\nimport styled from 'styled-components';\n\nexport type BitrixPassportTableFields = {\n  name: string;\n  description: string;\n  method: string;\n  url: string;\n  queryParams?: string;\n  requestBody?: string;\n  response?: string;\n};\n\nconst TableMainCallData = styled(Box)`\n  font-weight: 600;\n  font-size: 14px;\n`;\n\nconst TableCallData = styled(Box)`\n  font-size: 14px;\n`;\n\nconst CodeWrapper = styled(Code)`\n  text-align: left;\n  white-space: pre;\n  word-spacing: normal;\n  word-break: normal;\n  word-wrap: normal;\n  line-height: 1.5;\n  font-size: 14px;\n  font-weight: 400;\n`;\n\nexport const BitrixIntegrationPassportTab = (): JSX.Element => {\n  const codeCellData = (value: string | undefined) => {\n    return value ? <CodeWrapper>{value}</CodeWrapper> : <Box>-</Box>;\n  };\n\n  const columns = useMemo<Array<Column<BitrixPassportTableFields>>>(() => {\n    return [\n      {\n        accessor: 'description',\n        Header: 'Description',\n        width: '20%',\n        Cell: ({ value }) => {\n          return <TableMainCallData>{value}</TableMainCallData>;\n        },\n      },\n      {\n        accessor: 'name',\n        Header: 'Name',\n        Cell: ({ value }) => {\n          return <TableCallData>{value}</TableCallData>;\n        },\n      },\n      {\n        accessor: 'method',\n        Header: 'Method',\n        width: '5%',\n        Cell: ({ value }) => {\n          return <TableCallData>{value}</TableCallData>;\n        },\n      },\n      {\n        accessor: 'url',\n        Header: 'URL',\n        Cell: ({ value }) => {\n          return codeCellData(value);\n        },\n      },\n      {\n        accessor: 'queryParams',\n        Header: 'Query params',\n        width: '15%',\n        Cell: ({ value }) => {\n          return codeCellData(value);\n        },\n      },\n      {\n        accessor: 'requestBody',\n        Header: 'Request body',\n        Cell: ({ value }) => {\n          return codeCellData(value);\n        },\n      },\n      {\n        accessor: 'response',\n        Header: 'Response',\n        Cell: ({ value }) => {\n          return codeCellData(value);\n        },\n      },\n    ];\n  }, []);\n\n  return (\n    <Box>\n      <Table columns={columns} data={BitrixTableData} />\n    </Box>\n  );\n};\n","import { BitrixPassportTableFields } from '@/pages/AdminPanel/Settings/BitrixPassport/BitrixIntegrationPassportTab';\n\nexport const BitrixTableData = [\n  {\n    name: 'getBitrixEventMasters',\n    description: 'Event masters list',\n    method: 'GET',\n    url: '/bitrix/event-masters',\n    queryParams: '',\n    requestBody: '',\n    response: `{\n  id: number, \n  title?: string | null\n}[]`,\n  },\n  {\n    name: 'getBitrixEventEditions',\n    description: 'Master exhibitions list',\n    method: 'GET',\n    url: '/bitrix/event-editions/{eventMasterId}',\n    queryParams: `{\n  eventMasterId?: number\n}`,\n    requestBody: '',\n    response: `{\n  id: number, \n  title?: string | null\n}[]`,\n  },\n  {\n    name: 'postBitrixExhibition',\n    description: 'import exhibition from Bitrix',\n    method: 'POST',\n    url: '/bitrix/exhibition/{eventEditionId}',\n    queryParams: `{\n  eventEditionId: number\n}`,\n    requestBody: 'number[]',\n    response: '',\n  },\n  {\n    name: 'postBitrixExhibitionExhibitors',\n    description: 'Import exhibitors from Bitrix',\n    method: 'POST',\n    url: '/bitrix/exhibition/{exhibitionId}/exhibitors',\n    queryParams: `{\n  exhibitionId: number\n}`,\n    requestBody: '',\n    response: '',\n  },\n  {\n    name: 'postBitrixPriceList',\n    description: 'Import price lists from Bitrix',\n    method: 'POST',\n    url: '/bitrix/price-list/{exhibitionId}',\n    queryParams: `{\n  exhibitionId: number\n}`,\n    requestBody: '',\n    response: '',\n  },\n  {\n    name: 'postBitrixSalesOffices',\n    description: 'Import sales offices from Bitrix',\n    method: 'POST',\n    url: '/bitrix/sales-offices',\n    queryParams: '',\n    requestBody: '',\n    response: '',\n  },\n  {\n    name: 'postBitrixOrders',\n    description: 'Update order in Bitrix',\n    method: 'POST',\n    url: '/bitrix/orders/{orderId}',\n    queryParams: `{\n  orderId: number\n}`,\n    requestBody: `{\nbankAccountId?: number;\niteCompanyId?: number;\n}`,\n    response: '',\n  },\n  {\n    name: 'postBitrixUpdateContactId',\n    description: 'Update contact ID',\n    method: 'POST',\n    url: '/bitrix/update-contact-id/{userId}/{contactId}',\n    queryParams: `{\n  userId: number,\n  contactId: number,\n}`,\n    requestBody: '',\n    response: '',\n  },\n  {\n    name: 'getCompanies',\n    description: 'Get companies list',\n    method: 'GET',\n    url: '/companies',\n    queryParams: '',\n    requestBody: '',\n    response: `{\n  bitrixId?: number;\n  title?: string | null;\n  email?: string | null;\n  id: number;\n}[]`,\n  },\n  {\n    name: 'getCompaniesBankAccounts',\n    description: 'Get companies bank accounts',\n    method: 'GET',\n    url: '/companies/{companyId}/bank-accounts',\n    queryParams: `{\n  companyId: number,\n}`,\n    requestBody: '',\n    response: `{\n  bitrixId?: number;\n  title?: string;\n  bitrixCompanyId?: number;\n  bankName?: string;\n  bic?: string;\n  checkingAccount?: string;\n  correspondentAccount?: string;\n  accountCurrency?: string;\n  bankAddressRu?: string;\n  swift?: string;\n  bankAddressEng?: string;\n  iban?: string;\n  id: number;\n}[]`,\n  },\n  {\n    name: 'getStandsSharers',\n    description: 'Get stands sharers',\n    method: 'GET',\n    url: '/stands/{standId}/sharers',\n    queryParams: `{\n  standId: number,\n}`,\n    requestBody: '',\n    response: `{\n  companyId?: number;\n  area?: number;\n  standNumber?: string;\n  standConfiguration?: ITEPortal_Contracts_Enums_StandConfiguration;\n}[]`,\n  },\n  {\n    name: 'getStandsProducts',\n    description: 'Get stands products',\n    method: 'GET',\n    url: '/stands/{standId}/products',\n    queryParams: `{\n  standId: number,\n}`,\n    requestBody: '',\n    response: `{\n  productId?: number;\n  standId?: number;\n  discount?: number;\n  currency?: string;\n  price?: number;\n  quantity?: number;\n  vat?: number;\n  vatIncluded?: boolean;\n  displayName?: string;\n}[]`,\n  },\n] satisfies BitrixPassportTableFields[];\n","import { FormProvider, useForm } from 'react-hook-form';\nimport React, { useState } from 'react';\nimport { FormControl, Stack, Button } from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport Input from '@/components/Fields/Input';\nimport styled from 'styled-components';\nimport { EDIT_PASSWORD } from '@/constants/endpoints';\nimport { toast } from 'react-toastify';\nimport fetchApi from '@/utils/fetchAPI';\nimport { FetchMethods } from '@/utils/constants';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n`;\n\nexport const ChangePassword = (): JSX.Element => {\n  const methods = useForm();\n  const [isSubmitting, setIsSubmitting] = useState(false);\n\n  const submitHandler = async (value: any) => {\n    setIsSubmitting(true);\n    try {\n      await fetchApi(EDIT_PASSWORD, {\n        method: FetchMethods.Post,\n        data: {\n          ...value,\n        },\n      });\n    } catch (error: any) {\n      const fieldErrors = error?.response?.data?.errors;\n\n      if (fieldErrors) {\n        toast.error(fieldErrors);\n      }\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <FormProvider {...methods}>\n      <form>\n        <Stack spacing=\"5\">\n          <FormControlWrapper>\n            <Input\n              maxWidth=\"360px\"\n              name=\"currentPassword\"\n              label={useNameTranslate('current-password')}\n            />\n            <Input\n              maxWidth=\"360px\"\n              name=\"newPassword\"\n              label={useNameTranslate('new-password')}\n            />\n            <Input\n              maxWidth=\"360px\"\n              name=\"confirmNewPassword\"\n              label={useNameTranslate('confirm-new-password')}\n            />\n\n            <Button\n              colorScheme=\"red\"\n              width=\"100px\"\n              isLoading={isSubmitting}\n              onClick={methods.handleSubmit(submitHandler)}\n            >\n              {useNameTranslate('save')}\n            </Button>\n          </FormControlWrapper>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import { useMemo, useState } from 'react';\n\nimport { Stack, Flex, Button } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { settingsRoute } from '../../../../features/Routing/protected/settings';\nimport { Table } from '../../../../components/Table/Table';\nimport { Column } from 'react-table';\n\nimport { EditIcon, DeleteIcon } from '@chakra-ui/icons';\nimport { EditDiscountModal } from './EditDiscountModal';\nimport { ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto } from '../../../../api';\nimport { useRouter } from '@tanstack/react-router';\nimport { ModalFactory } from '../../../../components/Modal/api';\nimport { toast } from 'react-toastify';\nimport { typedAxios } from '../../../../api/typed-axios';\n\nexport const DiscountsTab = () => {\n  const router = useRouter();\n  const { discounts } = settingsRoute.useLoaderData();\n  const { t } = useTranslation();\n  const [editableRow, setEditableRow] =\n    useState<ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto | null>(null);\n\n  const isEditModalOpened = editableRow !== null;\n\n  const confirmDeletion = (\n    discount: ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto\n  ) => {\n    ModalFactory.confirm({\n      Component: () => <>{t('delete-cleaning-discount')}</>,\n      onOk: async () => {\n        try {\n          await typedAxios.discount.deleteDiscountsCleaning({\n            discountId: discount.id,\n          });\n\n          ModalFactory.close();\n          router.invalidate();\n        } catch {\n          toast.error(\n            t('unable-to-delete', {\n              entity: t('discount_').toLowerCase(),\n            })\n          );\n        }\n      },\n    });\n  };\n\n  const columns = useMemo(() => {\n    return [\n      {\n        accessor: 'areaFrom',\n        Header: t('areaFrom'),\n        Cell: ({ value }) => {\n          return <>{value}</>;\n        },\n      },\n      {\n        accessor: 'areaTo',\n        Header: t('areaTo'),\n        Cell: ({ value }) => {\n          return <>{value}</>;\n        },\n      },\n      {\n        accessor: 'discountPercentage',\n        Header: `${t('discount')} (%)`,\n        Cell: ({ value }) => {\n          return <>{value}</>;\n        },\n      },\n      {\n        id: 'actions',\n        Header: '',\n        width: '40px',\n        Cell: ({ row }) => {\n          return (\n            <Flex columnGap=\"10px\" maxWidth=\"40px\">\n              <EditIcon onClick={() => setEditableRow(row.original)} />\n              <DeleteIcon onClick={() => confirmDeletion(row.original)} />\n            </Flex>\n          );\n        },\n      },\n    ] satisfies Column<ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto>[];\n  }, [editableRow]);\n\n  const data = useMemo(() => {\n    return discounts;\n  }, [discounts]);\n\n  return (\n    <Stack spacing={5} direction=\"column\" paddingBottom={200}>\n      <Flex flexDirection=\"row\" justifyContent=\"flex-end\">\n        <Button\n          colorScheme=\"red\"\n          onClick={() =>\n            setEditableRow({\n              id: 0,\n            })\n          }\n        >\n          + {t('add-discount')}\n        </Button>\n      </Flex>\n      <Table columns={columns} data={data} />\n\n      {isEditModalOpened && (\n        <EditDiscountModal\n          model={editableRow}\n          close={() => {\n            setEditableRow(null);\n          }}\n          onSaved={() => {\n            router.invalidate();\n          }}\n        />\n      )}\n    </Stack>\n  );\n};\n","import * as v from 'zod';\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport {\n  Button,\n  ButtonGroup,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  Stack,\n} from '@chakra-ui/react';\nimport { useNameTranslate } from '../../../../hooks/useStringName';\nimport { t } from 'i18next';\nimport React, { useEffect } from 'react';\nimport InputNumber from '../../../../components/Fields/InputNumber';\nimport {\n  ApiError,\n  ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto,\n} from '../../../../api';\nimport { typedAxios } from '../../../../api/typed-axios';\nimport i18n from '../../../../i18n';\n\nconst AREA_EXISTS_MESSAGE = 'Discount already exists for the specified range.';\n\nconst isAreaExistsMessage = (message: string) =>\n  message.toLowerCase() === AREA_EXISTS_MESSAGE.toLowerCase();\n\nconst preprocessNumber = (value: unknown) => {\n  if (value === '') {\n    return value;\n  }\n\n  return typeof value === 'string' ? +value : value;\n};\n\nconst ValidationSchema = v\n  .object({\n    areaFrom: v.preprocess(preprocessNumber, v.number().safe()),\n    areaTo: v.preprocess(preprocessNumber, v.number().safe()),\n    discountPercentage: v.preprocess(preprocessNumber, v.number().lte(100)),\n  })\n  .refine(\n    (schema) => {\n      return schema.areaFrom < schema.areaTo;\n    },\n    {\n      path: ['areaFrom'],\n      message: i18n.t('areaFrom-gt-to-error'),\n    }\n  )\n  .refine(\n    (schema) => {\n      return schema.areaTo > schema.areaFrom;\n    },\n    {\n      path: ['areaTo'],\n      message: i18n.t('areaTo-lt-form-error'),\n    }\n  );\n\ntype FormValues = v.infer<typeof ValidationSchema>;\n\ntype EditDiscountModalPropsType = {\n  close: () => void;\n  onSaved?: () => void;\n  model: ITEPortal_Domain_Dto_Discount_GetCleaningDiscountDto | null;\n};\n\nexport const EditDiscountModal = (props: EditDiscountModalPropsType) => {\n  const { close, model, onSaved } = props;\n  const instance = useForm<FormValues>({\n    resolver: zodResolver(ValidationSchema),\n  });\n\n  useEffect(\n    function setFormValuesOfLoadedModel() {\n      instance.reset({\n        ...model,\n      });\n    },\n    [model]\n  );\n\n  const save: SubmitHandler<FormValues> = async (values) => {\n    try {\n      if (model?.id && model.id > 0) {\n        await typedAxios.discount.putDiscountsCleaning({\n          ...values,\n          discountId: model.id,\n        });\n      } else {\n        await typedAxios.discount.postDiscountsCleaning(values);\n      }\n\n      instance.reset();\n      close();\n\n      onSaved?.();\n    } catch (e) {\n      if (e instanceof ApiError && typeof e.body === 'string') {\n        instance.setError('areaFrom', {\n          message: isAreaExistsMessage(e.body)\n            ? t('cleaning-discount-area-error')\n            : e.body,\n        });\n      }\n    }\n  };\n\n  return (\n    <Modal isOpen onClose={close} size=\"xl\" scrollBehavior=\"inside\" isCentered>\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{useNameTranslate('discount')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>\n          <FormProvider {...instance}>\n            <form>\n              <Stack spacing=\"5\">\n                <InputNumber<FormValues>\n                  name=\"areaFrom\"\n                  precision={2}\n                  step={0.1}\n                  min={0}\n                  label={t('areaFrom')}\n                />\n                <InputNumber<FormValues>\n                  name=\"areaTo\"\n                  precision={2}\n                  step={0.1}\n                  min={0}\n                  label={t('areaTo')}\n                />\n                <InputNumber<FormValues>\n                  name=\"discountPercentage\"\n                  max={100}\n                  min={0}\n                  precision={2}\n                  step={0.1}\n                  label={`${t('discount')} (%)`}\n                />\n              </Stack>\n            </form>\n          </FormProvider>\n        </ModalBody>\n        <ModalFooter justifyContent=\"center\">\n          <ButtonGroup gap=\"1\" justifyContent=\"center\">\n            <Button colorScheme=\"red\" variant=\"outline\" onClick={close}>\n              {t('cancel')}\n            </Button>\n            <Button colorScheme=\"red\" onClick={instance.handleSubmit(save)}>\n              {t('save')}\n            </Button>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport React, { useState } from 'react';\nimport { FormControl, Stack, Button } from '@chakra-ui/react';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport styled from 'styled-components';\nimport { CHANGE_MAIN_LOGO } from '@/constants/endpoints';\nimport { toast } from 'react-toastify';\nimport fetchApi from '@/utils/fetchAPI';\nimport { FetchMethods } from '@/utils/constants';\nimport { UploadFileDropzone } from '@/components/FileUpload/FileUpload';\nimport { useTranslation } from 'react-i18next';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n  max-width: 600px;\n`;\n\nexport const LogoTab = (): JSX.Element => {\n  const methods = useForm();\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const { t } = useTranslation();\n\n  const submitHandler = async (value: any) => {\n    if (value?.['logo']) {\n      setIsSubmitting(true);\n      try {\n        await fetchApi(\n          CHANGE_MAIN_LOGO,\n          {\n            method: FetchMethods.Post,\n\n            data: { logo: value?.['logo'][0] },\n          },\n          { 'Content-Type': 'multipart/form-data' }\n        );\n\n        toast.success(t('success-logo-download'));\n      } catch (error: any) {\n        const fieldErrors = error?.response?.data?.errors;\n\n        if (fieldErrors) {\n          toast.error(fieldErrors);\n        }\n      } finally {\n        setIsSubmitting(false);\n      }\n    }\n  };\n\n  return (\n    <FormProvider {...methods}>\n      <form>\n        <Stack spacing=\"5\">\n          <FormControlWrapper>\n            <UploadFileDropzone\n              label={useNameTranslate('change-logo')}\n              name=\"logo\"\n              accept={{\n                'image/png': ['.png'],\n              }}\n            />\n            <Button\n              colorScheme=\"red\"\n              width=\"100px\"\n              isLoading={isSubmitting}\n              onClick={methods.handleSubmit(submitHandler)}\n            >\n              {useNameTranslate('save')}\n            </Button>\n          </FormControlWrapper>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport * as v from 'zod';\n\nimport React, { useEffect } from 'react';\nimport { useNameTranslate } from '../../../hooks/useStringName';\nimport { Box, Button, FormControl, Stack } from '@chakra-ui/react';\nimport { UploadFileDropzone } from '../../../components/FileUpload/FileUpload';\nimport styled from 'styled-components';\nimport Input from '../../../components/Fields/Input';\nimport { FormLabel } from '../../../components/FormLabel/FormLabel';\nimport { typedAxios } from '../../../api/typed-axios';\nimport { settingsRoute } from '../../../features/Routing/protected/settings';\nimport { toast } from 'react-toastify';\nimport { useTranslation } from 'react-i18next';\n\ntype ManualUploaderFormValues = {\n  manualFileEn?: Blob[];\n  manualLinkEn?: string | null;\n  manualFileRu?: Blob[];\n  manualLinkRu?: string | null;\n};\n\nconst Schema = v.object({\n  manualFileEn: v.array(v.instanceof(File)),\n  manualLinkEn: v.string().url('Should be valid URL'),\n  manualFileRu: v.array(v.instanceof(File)),\n  manualLinkRu: v.string().url('Should be valid URL'),\n});\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n  max-width: 600px;\n`;\n\nconst ControlLine = styled.div`\n  display: flex;\n  flex-direction: row;\n  align-items: end;\n  gap: 10px;\n\n  > div:first-of-type {\n    width: 70%;\n  }\n`;\n\nexport const ManualUploaderTab = () => {\n  const { t } = useTranslation();\n  const instance = useForm<ManualUploaderFormValues>({\n    resolver: zodResolver(Schema),\n  });\n\n  const loaderData = settingsRoute.useLoaderData();\n\n  useEffect(\n    function setFormValuesOfLoadedModel() {\n      instance.reset({\n        manualLinkRu: loaderData.settings.exhibitorManualRu,\n        manualLinkEn: loaderData.settings.exhibitorManualEn,\n      });\n    },\n    [loaderData]\n  );\n\n  const handleSaveSetting =\n    (scope: keyof ManualUploaderFormValues, locale: 'en' | 'ru') =>\n    async () => {\n      const valid = await instance.trigger(scope);\n      const value = instance.getValues(scope);\n\n      if (!valid) {\n        return;\n      }\n\n      switch (true) {\n        case scope.includes('manualLink') && typeof value === 'string':\n          typedAxios.globalSettings\n            .postGlobalSettingsEditExhibitorManualUrl({\n              culture: locale,\n              url: value,\n            })\n            .then(() => {\n              toast.success(t('user-manual-updated'));\n            })\n            .catch(() => {\n              toast.error(t('user-manual-update-failed'));\n            });\n\n          break;\n\n        case scope.includes('manualFile') && value && value[0] instanceof Blob:\n          typedAxios.globalSettings\n            .postGlobalSettingsEditExhibitorManualFile({\n              culture: locale,\n              formData: {\n                manual: value[0],\n              },\n            })\n            .then(() => {\n              toast.success(t('user-manual-updated'));\n            })\n            .catch(() => {\n              toast.error(t('user-manual-update-failed'));\n            });\n\n          break;\n      }\n    };\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing=\"5\">\n        <FormControlWrapper>\n          <ControlLine>\n            <UploadFileDropzone<ManualUploaderFormValues>\n              label={`${useNameTranslate('participantManual')} (EN)`}\n              name=\"manualFileEn\"\n              multiple={false}\n              accept={{\n                'application/pdf': ['.pdf'],\n              }}\n            />\n            <Button\n              colorScheme=\"red\"\n              width=\"100px\"\n              onClick={handleSaveSetting('manualFileEn', 'en')}\n            >\n              {useNameTranslate('save')}\n            </Button>\n          </ControlLine>\n\n          <ControlLine>\n            <Box>\n              <FormLabel>\n                {useNameTranslate('linkToParticipantManual')} (EN)\n              </FormLabel>\n              <Input<ManualUploaderFormValues>\n                name=\"manualLinkEn\"\n                maxWidth=\"100%\"\n              />\n            </Box>\n            <Button\n              colorScheme=\"red\"\n              width=\"100px\"\n              onClick={handleSaveSetting('manualLinkEn', 'en')}\n            >\n              {useNameTranslate('save')}\n            </Button>\n          </ControlLine>\n\n          <ControlLine>\n            <UploadFileDropzone<ManualUploaderFormValues>\n              label={`${useNameTranslate('participantManual')} (RU)`}\n              name=\"manualFileRu\"\n              multiple={false}\n              accept={{\n                'application/pdf': ['.pdf'],\n              }}\n            />\n            <Button\n              colorScheme=\"red\"\n              width=\"100px\"\n              onClick={handleSaveSetting('manualFileRu', 'ru')}\n            >\n              {useNameTranslate('save')}\n            </Button>\n          </ControlLine>\n\n          <ControlLine>\n            <Box>\n              <FormLabel>\n                {useNameTranslate('linkToParticipantManual')} (RU)\n              </FormLabel>\n              <Input<ManualUploaderFormValues>\n                name=\"manualLinkRu\"\n                maxWidth=\"100%\"\n              />\n            </Box>\n            <Button\n              colorScheme=\"red\"\n              width=\"100px\"\n              onClick={handleSaveSetting('manualLinkRu', 'ru')}\n            >\n              {useNameTranslate('save')}\n            </Button>\n          </ControlLine>\n        </FormControlWrapper>\n      </Stack>\n    </FormProvider>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport React, { useEffect, useState } from 'react';\nimport { Box, FormControl, Stack, Button } from '@chakra-ui/react';\nimport { FormLabel } from '@/components/FormLabel/FormLabel';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport Input from '@/components/Fields/Input';\nimport styled from 'styled-components';\nimport { settingsRoute } from '../../../features/Routing/protected/settings';\nimport { typedAxios } from '../../../api/typed-axios';\nimport {\n  ApiError,\n  CancelablePromise,\n  ITEPortal_Domain_Dto_GlobalSettingsDto,\n} from '../../../api';\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n`;\n\nconst ParticipantCheckContainer = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: start;\n  gap: 10px;\n  width: 100%;\n`;\n\nconst ParticipantCheckWrapper = styled(Box)`\n  min-width: 100%;\n`;\n\ntype SettingsFormValues = Pick<\n  ITEPortal_Domain_Dto_GlobalSettingsDto,\n  'host' | 'port' | 'username' | 'fromEmail'\n>;\n\nexport const Settings = (): JSX.Element => {\n  const methods = useForm<SettingsFormValues>();\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const { settings } = settingsRoute.useLoaderData();\n\n  useEffect(\n    function setFormValuesOfLoadedModel() {\n      methods.reset({\n        ...settings,\n      });\n    },\n    [settings]\n  );\n\n  const save = async (saverFn: CancelablePromise<any>) => {\n    try {\n      setIsSubmitting(true);\n      await saverFn;\n    } catch (e) {\n      if (e instanceof ApiError) {\n        const fieldErrors = e.body.errors;\n\n        if (fieldErrors) {\n          Object.entries(fieldErrors).forEach(([fieldName, errors]) => {\n            methods.setError(fieldName as keyof SettingsFormValues, {\n              message: errors as string,\n            });\n          });\n        }\n      }\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <FormProvider {...methods}>\n      <form>\n        <Stack spacing=\"5\">\n          <FormControlWrapper>\n            <ParticipantCheckWrapper>\n              <FormLabel>{useNameTranslate('from-email')}</FormLabel>\n              <ParticipantCheckContainer>\n                <Input<SettingsFormValues> maxWidth=\"360px\" name=\"fromEmail\" />\n                <Button\n                  colorScheme=\"red\"\n                  isLoading={isSubmitting}\n                  onClick={methods.handleSubmit(({ fromEmail }) =>\n                    save(\n                      typedAxios.globalSettings.postGlobalSettingsEditFromEmail(\n                        {\n                          fromEmail: fromEmail || undefined,\n                        }\n                      )\n                    )\n                  )}\n                >\n                  {useNameTranslate('save')}\n                </Button>\n              </ParticipantCheckContainer>\n            </ParticipantCheckWrapper>\n            <ParticipantCheckWrapper>\n              <FormLabel>{useNameTranslate('username-email')}</FormLabel>\n              <ParticipantCheckContainer>\n                <Input maxWidth=\"360px\" name=\"username\" />\n                <Button\n                  colorScheme=\"red\"\n                  isLoading={isSubmitting}\n                  onClick={methods.handleSubmit(({ username }) =>\n                    save(\n                      typedAxios.globalSettings.postGlobalSettingsEditUsername({\n                        username: username || undefined,\n                      })\n                    )\n                  )}\n                >\n                  {useNameTranslate('save')}\n                </Button>\n              </ParticipantCheckContainer>\n            </ParticipantCheckWrapper>\n            <ParticipantCheckWrapper>\n              <FormLabel>{useNameTranslate('host')}</FormLabel>\n              <ParticipantCheckContainer>\n                <Input maxWidth=\"360px\" name=\"host\" />\n                <Button\n                  colorScheme=\"red\"\n                  isLoading={isSubmitting}\n                  onClick={methods.handleSubmit(({ host }) =>\n                    save(\n                      typedAxios.globalSettings.postGlobalSettingsEditHost({\n                        host: host || undefined,\n                      })\n                    )\n                  )}\n                >\n                  {useNameTranslate('save')}\n                </Button>\n              </ParticipantCheckContainer>\n            </ParticipantCheckWrapper>\n            <ParticipantCheckWrapper>\n              <FormLabel>{useNameTranslate('port')}</FormLabel>\n              <ParticipantCheckContainer>\n                <Input maxWidth=\"360px\" name=\"port\" />\n                <Button\n                  colorScheme=\"red\"\n                  isLoading={isSubmitting}\n                  onClick={methods.handleSubmit(({ port }) =>\n                    save(\n                      typedAxios.globalSettings.postGlobalSettingsEditPort({\n                        port: port || undefined,\n                      })\n                    )\n                  )}\n                >\n                  {useNameTranslate('save')}\n                </Button>\n              </ParticipantCheckContainer>\n            </ParticipantCheckWrapper>\n          </FormControlWrapper>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import { useTranslation } from 'react-i18next';\nimport { Tab, TabList, TabPanel, TabPanels, Tabs } from '@chakra-ui/react';\nimport styled from 'styled-components';\n\nimport { Settings } from '@/pages/AdminPanel/Settings/Settings';\nimport { ChangePassword } from '@/pages/AdminPanel/Settings/ChangePassword';\nimport { LogoTab } from './LogoTab';\nimport { ManualUploaderTab } from './ManualUploaderTab';\nimport {\n  SettingsPageSearchSchemaType,\n  settingsRoute,\n} from '../../../features/Routing/protected/settings';\nimport { useNavigate } from '@tanstack/react-router';\nimport { DiscountsTab } from './Disounts';\nimport { BitrixIntegrationPassportTab } from '@/pages/AdminPanel/Settings/BitrixPassport/BitrixIntegrationPassportTab';\n\nconst tabStyles = {\n  borderColor: 'blackAlpha.200',\n  borderBottomColor: '#F7FAFC',\n  color: 'red',\n};\n\nconst TabWrapper = styled(TabPanel)`\n  padding-top: 50px;\n`;\n\nconst TabsMap: Record<SettingsPageSearchSchemaType['tab'], number> = {\n  global: 0,\n  smtp: 1,\n  logo: 2,\n  manual: 3,\n  discount: 4,\n  bitrix: 5,\n};\n\nexport const SettingsPage = (): JSX.Element => {\n  const { t } = useTranslation();\n  const { tab = 'global' } = settingsRoute.useSearch();\n  const navigate = useNavigate();\n\n  const selectedTabFromUrl = TabsMap[tab] || 0;\n\n  return (\n    <>\n      <Tabs\n        index={selectedTabFromUrl}\n        variant=\"enclosed\"\n        onChange={(index) => {\n          navigate({\n            to: './',\n            search: {\n              tab: Object.keys(TabsMap)[index],\n            },\n          });\n        }}\n      >\n        <TabList>\n          <Tab _selected={tabStyles}>{t('main-settings')}</Tab>\n          <Tab _selected={tabStyles}>{t('change-password')}</Tab>\n          <Tab _selected={tabStyles}>{t('logo')}</Tab>\n          <Tab _selected={tabStyles}>{t('participantManual')}</Tab>\n          <Tab _selected={tabStyles}>{t('cleaning-discounts')}</Tab>\n          <Tab _selected={tabStyles}>{t('bitrix-integration-passport')}</Tab>\n        </TabList>\n        <TabPanels>\n          <TabWrapper>\n            <Settings />\n          </TabWrapper>\n          <TabWrapper>\n            <ChangePassword />\n          </TabWrapper>\n          <TabWrapper>\n            <LogoTab />\n          </TabWrapper>\n          <TabWrapper>\n            <ManualUploaderTab />\n          </TabWrapper>\n          <TabWrapper>\n            <DiscountsTab />\n          </TabWrapper>\n          <TabWrapper>\n            <BitrixIntegrationPassportTab />\n          </TabWrapper>\n        </TabPanels>\n      </Tabs>\n    </>\n  );\n};\n","import { useEffect } from 'react';\nimport { NewUsersForm } from '@/pages/AdminPanel/UsersTable/NewUsers/NewUsersForm';\n\ninterface NewUserProps {\n  type: 'add' | 'edit';\n}\n\nexport const NewUser = ({ type }: NewUserProps): JSX.Element => {\n  useEffect(() => {\n    const element = document.getElementById('breadcrumbsId');\n\n    if (element) {\n      element.scrollIntoView({ behavior: 'smooth' });\n    }\n  }, []);\n\n  return <NewUsersForm type={type} />;\n};\n","import React, { useEffect, useState } from 'react';\nimport {\n  useForm,\n  FormProvider,\n  useController,\n  FieldValues,\n} from 'react-hook-form';\nimport {\n  ButtonGroup,\n  FormControl,\n  Stack,\n  Button as ChakraButton,\n} from '@chakra-ui/react';\nimport Input from '@/components/Fields/Input';\nimport { Button } from '@/components/Buttons/Button/Button';\nimport styled from 'styled-components';\nimport { useNameTranslate } from '@/hooks/useStringName';\nimport { ROLES } from '@/constants/admin-pages';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { ADD_USER, EDIT_USER, EDIT_USER_INFO } from '@/constants/endpoints';\nimport fetchApi from '@/utils/fetchAPI';\nimport { FetchMethods } from '@/utils/constants';\nimport { useNavigate, useParams } from '@tanstack/react-router';\nimport { useFormErrorsHandler } from '../../../../hooks/useFormErrorsHandler';\nimport { useTranslation } from 'react-i18next';\n\ninterface NewUsersFormProps {\n  type: string;\n}\n\nconst FormControlWrapper = styled(FormControl)`\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n`;\n\ntype OptionType = { label?: string; value: string | number };\n\nexport const NewUsersForm = ({ type }: NewUsersFormProps): JSX.Element => {\n  const { t } = useTranslation();\n  const { userId } = useParams({ strict: false });\n  const editForm = type === 'edit';\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [editData, setEditData] = useState<any>();\n  const navigate = useNavigate();\n\n  const methods = useForm({\n    mode: 'onChange',\n  });\n\n  const { processErrorsObject } = useFormErrorsHandler(methods);\n\n  useEffect(\n    function setFormValuesOfLoadedModel() {\n      methods.reset({\n        ...editData,\n      });\n    },\n    [editData]\n  );\n\n  const {\n    field: { ...roleProps },\n  } = useController({ name: 'role', control: methods.control });\n\n  const toUsers = () => {\n    navigate({\n      to: '/admin/users',\n      replace: true,\n    });\n  };\n\n  useEffect(function loadUserDataIfFormOpenedForEdit() {\n    if (type === 'edit') {\n      const fetchData = async () => {\n        setIsSubmitting(true);\n        try {\n          const { data } = await fetchApi(EDIT_USER_INFO(userId));\n\n          data.data.role = ROLES.find(\n            (roleOption: OptionType) => roleOption?.value === data.data.role\n          );\n\n          Object.keys(data).forEach((field) => {\n            methods.setValue(field, data[field]);\n          });\n\n          setEditData(data.data);\n        } catch (error: any) {\n          //\n        } finally {\n          setIsSubmitting(false);\n        }\n      };\n\n      fetchData();\n    }\n  }, []);\n\n  const submitHandler = async (values: FieldValues) => {\n    const method = editForm ? FetchMethods.Put : FetchMethods.Post;\n    const link = editForm ? EDIT_USER : ADD_USER;\n\n    const data = { ...values, role: values?.role?.value };\n\n    setIsSubmitting(true);\n    try {\n      await fetchApi(link, {\n        method: method,\n        data,\n      });\n\n      await toUsers();\n    } catch (error: any) {\n      processErrorsObject(error);\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <FormProvider {...methods}>\n      <form onSubmit={methods.handleSubmit(submitHandler)}>\n        <Stack spacing=\"5\">\n          <FormControlWrapper>\n            <Input\n              label={useNameTranslate('full-name')}\n              maxWidth=\"100%\"\n              name=\"name\"\n              defaultValue={editData?.['name']}\n              isRequired\n            />\n            <SelectComponent\n              label={useNameTranslate('role')}\n              options={ROLES}\n              defaultValue={editData?.['role']}\n              isRequired\n              {...roleProps}\n            />\n            <Input\n              label={useNameTranslate('emailPlaceholder')}\n              maxWidth=\"100%\"\n              name=\"email\"\n              defaultValue={editData?.['email']}\n              isRequired\n            />\n            <Input\n              label={useNameTranslate('phone')}\n              maxWidth=\"100%\"\n              name=\"phoneNumber\"\n              defaultValue={editData?.['phoneNumber']}\n            />\n            <Input\n              label=\"Bitrix ID\"\n              maxWidth=\"100%\"\n              name=\"contactId\"\n              tooltip={t('bitrix-id-tooltip')}\n              defaultValue={editData?.['contactId']}\n            />\n          </FormControlWrapper>\n          <ButtonGroup gap=\"1\">\n            <ChakraButton\n              colorScheme=\"red\"\n              isLoading={isSubmitting}\n              onClick={methods.handleSubmit(submitHandler)}\n            >\n              {useNameTranslate('save')}\n            </ChakraButton>\n            <Button\n              colorScheme=\"secondary\"\n              buttonType=\"reset\"\n              onClick={toUsers}\n            >\n              {useNameTranslate('cancel')}\n            </Button>\n          </ButtonGroup>\n        </Stack>\n      </form>\n    </FormProvider>\n  );\n};\n","import React, { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Box, Flex, Link, Text } from '@chakra-ui/react';\nimport { DeleteIcon, EditIcon } from '@chakra-ui/icons';\nimport styled from 'styled-components';\nimport { Column, Row } from 'react-table';\nimport { Table } from '@/components/Table/Table';\nimport { Card } from '@/components/Card/Card';\nimport { toast } from 'react-toastify';\nimport { Button } from '@/components/Buttons/Button/Button';\nimport { ROLES } from '@/constants/admin-pages';\nimport { User } from '@/model/IUser';\nimport { useNavigate } from '@tanstack/react-router';\nimport { DeleteModal } from '@/pages/Exhibition/DeleteModal';\nimport { typedAxios } from '@/api/typed-axios';\nimport { useTableLoader } from '@/components/Table/useTableLoader';\nimport { ITEPortal_Domain_Dto_UserDto } from '@/api';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport { useRBAC } from '@/features/rbac/useRBAC';\n\nconst OptionWrapper = styled(Flex)`\n  flex-direction: row;\n  gap: 20px;\n`;\n\nconst ButtonContainer = styled(Box)`\n  padding-top: 20px;\n`;\n\ninterface UsersTableOptionsProps {\n  row: Row<ITEPortal_Domain_Dto_UserDto>;\n}\n\nexport const UsersTable = (): JSX.Element => {\n  const { t } = useTranslation();\n  const [openConfirm, setOpenConfirm] = useState(false);\n  const [userIdValue, setUserIdValue] = useState();\n  const navigate = useNavigate();\n  const { can } = useRBAC();\n\n  const {\n    data = [],\n    isLoading,\n    refresh,\n  } = useTableLoader<ITEPortal_Domain_Dto_UserDto>({\n    resource: 'users',\n    additionalPrams: {\n      roles: [\n        User.Role.SuperAdmin,\n        User.Role.Admin,\n        User.Role.Moderator,\n        User.Role.SupportManager,\n        User.Role.TechnicalManager,\n      ],\n    },\n    xhrOptions: {\n      paramsSerializer: {\n        indexes: null,\n      },\n    },\n  });\n\n  const openDeleteModal = (userId: any) => {\n    setUserIdValue(userId);\n    setOpenConfirm(!openConfirm);\n  };\n\n  const closeDeleteModal = () => setOpenConfirm(false);\n\n  const UsersTableOptions = ({ row }: UsersTableOptionsProps) => {\n    const rowValues = row.values;\n\n    if (\n      row.original.role === User.Role.SuperAdmin &&\n      !can('canManageSuperAdmins')\n    ) {\n      return null;\n    }\n\n    return (\n      <OptionWrapper>\n        <Link onClick={() => editUser(rowValues?.id)}>\n          <EditIcon />\n        </Link>\n        <Link onClick={() => openDeleteModal(rowValues?.id)}>\n          <DeleteIcon />\n        </Link>\n      </OptionWrapper>\n    );\n  };\n\n  const UserRole = ({ row }: UsersTableOptionsProps): JSX.Element => {\n    const role = row?.values?.role as number;\n\n    return (\n      <Text>\n        {role ? ROLES.find((userRole) => userRole?.value === role)?.label : ''}\n      </Text>\n    );\n  };\n\n  const deleteUser = async () => {\n    if (userIdValue) {\n      try {\n        await typedAxios.user.deleteUsersDelete({\n          id: userIdValue,\n        });\n\n        refresh();\n        toast.success(t('user-deleted-successfully'));\n      } catch {\n        toast.error(t('error-occurred'));\n      }\n    }\n  };\n\n  const usersTableColumns = React.useMemo<\n    Array<Column<ITEPortal_Domain_Dto_UserDto>>\n  >(\n    () => [\n      {\n        Header: `ID`,\n        accessor: 'id',\n        show: false,\n      },\n      {\n        Header: `${t('full-name')}`,\n        accessor: 'name',\n        width: '20%',\n      },\n      {\n        Header: `${t('emailPlaceholder')}`,\n        accessor: 'email',\n        width: '35%',\n      },\n      {\n        Header: `${t('role')}`,\n        accessor: 'role',\n        width: '35%',\n        Cell: ({ row }) => <UserRole row={row} />,\n      },\n      {\n        Header: '',\n        id: 'options',\n        width: '5%',\n        Cell: ({ row }) => <UsersTableOptions row={row} />,\n      },\n    ],\n    []\n  );\n\n  const addUser = () => {\n    navigate({ to: '/admin/users/add' });\n  };\n\n  const editUser = (id: string) => {\n    navigate({\n      to: '/admin/users/$userId/edit',\n      params: { userId: id },\n    });\n  };\n\n  return (\n    <LoaderWrapper loading={isLoading}>\n      <Card>\n        <DeleteModal\n          onSubmit={deleteUser}\n          isOpen={openConfirm}\n          onClose={closeDeleteModal}\n        />\n        <Table columns={usersTableColumns} data={data} />\n        <ButtonContainer>\n          <Button colorScheme=\"red\" onClick={addUser}>\n            {t('add-user')}\n          </Button>\n        </ButtonContainer>\n      </Card>\n    </LoaderWrapper>\n  );\n};\n","import { Card, CardBody, Flex } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport Layout from '@/layout/Default';\nimport { Link } from '@tanstack/react-router';\n\nexport const AgentHome = (): JSX.Element => {\n  const { t } = useTranslation();\n\n  return (\n    <Layout>\n      <Flex\n        direction=\"row\"\n        gap={4}\n        alignSelf=\"center\"\n        position=\"absolute\"\n        top=\"50%\"\n        left=\"50%\"\n        transform=\"translate(-50%, -50%)\"\n      >\n        <Link to=\"/admin/exhibitions\">\n          <Card>\n            <CardBody>{t('agent-cabinet')}</CardBody>\n          </Card>\n        </Link>\n        <Link to=\"/profile\">\n          <Card>\n            <CardBody>{t('myExhibitions')}</CardBody>\n          </Card>\n        </Link>\n      </Flex>\n    </Layout>\n  );\n};\n","import { useTranslation } from 'react-i18next';\nimport { useNavigate } from '@tanstack/react-router';\nimport { viewExhibitionCart } from '@/features/Routing/protected/exhibitions-by-role';\nimport { numberWithSpaces } from '@/utils/amountTransformation';\nimport { replacePaths } from '@/utils/route';\nimport { SHOW_EXHIBITION_PATH } from '@/constants/router';\nimport { Divider, Text } from '@chakra-ui/react';\nimport { Button as OrderButton } from '@/components/Buttons/Button/Button';\nimport { TKey } from '@/i18n/types';\nimport { OrderItem, TemporaryStaffOrderItem } from '@/model/IOrderItem';\nimport { ORDER_STATUSES } from '@/constants/order';\nimport {\n  ITEPortal_Domain_Dto_Order_CreateOrderDto,\n  ITEPortal_Domain_Dto_Order_CreateOrderFromAdminDto,\n} from '@/api';\nimport { typedAxios } from '@/api/typed-axios';\nimport { Card } from '@/components/Card/Card';\nimport {\n  CartButtonsContainer,\n  TotalRowContainer,\n  TotalRowContainerSummary,\n  TotalWrapper,\n} from './styled';\nimport { ModalFactory } from '@/components/Modal/api';\nimport { Cart } from '@/model/ICart';\nimport { SpaceOnlyStandOrderCommentsForm } from './OrderComments/SpaceOnlyStandOrderCommentsForm';\nimport {\n  ExtendedStandOrderCommentsForm,\n  ExtendedStandOrderCommentsFormType,\n  ExtendedStandOrderCommentsFormValuesType,\n} from './OrderComments/ExtendedStandOrderCommentsForm';\nimport { orderApi, useOrder } from '@/store/effector/order';\nimport { loadingApi } from '@/store/effector/loading';\nimport { useOrderCompleteness } from '@/store/effector/order-completeness';\nimport { Order } from '@/model/IOrder';\n\ninterface TotalCardProps {\n  total: number;\n  currency: string;\n  items: Array<OrderItem | TemporaryStaffOrderItem>;\n  cart: Cart;\n}\n\nexport const CartTotal = ({ currency, items, cart }: TotalCardProps) => {\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n  const { orderId } = useOrder();\n\n  const { exhibitionId, stand } = viewExhibitionCart.useParams();\n  const { isOrderCompleted } = useOrderCompleteness();\n\n  const canPlaceOrder = items?.length === 0 || !isOrderCompleted;\n\n  const navigateToOrders = () => {\n    const orderPath = replacePaths(SHOW_EXHIBITION_PATH, {\n      ':exhibitionId': exhibitionId,\n    });\n\n    navigate({\n      to: orderPath,\n    });\n\n    orderApi.clearProducts();\n  };\n\n  const createOrder = async ({\n    asDraft,\n    comments,\n  }: {\n    asDraft: boolean;\n    comments?: ExtendedStandOrderCommentsFormValuesType;\n  }) => {\n    const modalMessage: TKey = asDraft ? 'draftConfirmed' : 'orderConfirmed';\n\n    const products = Order.prepareItemsForPlace(items);\n\n    const dataForSave = {\n      exhibitionId: +exhibitionId,\n      standId: +stand,\n      products,\n      orderStatus: asDraft ? ORDER_STATUSES.Draft : ORDER_STATUSES.Submitted,\n    } satisfies ITEPortal_Domain_Dto_Order_CreateOrderDto;\n\n    if (orderId) {\n      Object.assign(dataForSave, { orderId });\n    }\n\n    let payload: ITEPortal_Domain_Dto_Order_CreateOrderFromAdminDto = {\n      ...dataForSave,\n      additionalComments: comments?.additionalComments,\n    };\n\n    if (orderId || !asDraft) {\n      payload = {\n        ...payload,\n        carpetColor: comments?.carpetColor?.value,\n        fasciaInscription: comments?.fasciaInscription,\n        fasciaInscriptionColor: comments?.fasciaInscriptionColor?.value,\n      };\n    }\n\n    try {\n      loadingApi.on();\n\n      if (orderId) {\n        await typedAxios.order.putOrders({\n          requestBody: payload,\n        });\n      } else {\n        await typedAxios.order.postOrders({\n          requestBody: payload,\n        });\n      }\n\n      ModalFactory.closeById('order-comments');\n\n      ModalFactory.info({\n        title: t('thankYou'),\n        Component: () => <>{t(modalMessage)}</>,\n        cancelLabel: t('toOrders'),\n        onCancel: async () => {\n          orderApi.cleanUpOrderState();\n\n          navigateToOrders();\n        },\n      });\n    } catch (error) {\n    } finally {\n      loadingApi.off();\n    }\n  };\n\n  const amount = (value: number) => {\n    return numberWithSpaces(value, currency, false);\n  };\n\n  const requestComments = () => {\n    ModalFactory.show({\n      id: 'order-comments',\n      title: t('order-comments'),\n      Component: cart.isSpaceOnlyStand\n        ? SpaceOnlyStandOrderCommentsForm\n        : ExtendedStandOrderCommentsForm,\n      okLabel: t('confirmOrder'),\n      onOk: async (context?: ExtendedStandOrderCommentsFormType) => {\n        return context?.handleSubmit((v) => {\n          createOrder({\n            asDraft: false,\n            comments: v,\n          });\n        })();\n      },\n    });\n  };\n\n  return (\n    <Card width=\"25%\">\n      <TotalWrapper>\n        <TotalRowContainer>\n          <Text fontSize=\"md\">{t('cartTotal')}</Text>\n          <Text fontSize=\"md\">{amount(cart.itemsTotal)}</Text>\n        </TotalRowContainer>\n        {cart.hasPersonalDiscount && (\n          <TotalRowContainer>\n            <Text fontSize=\"md\">{t('personal-discount')}:</Text>\n            <Text fontSize=\"md\">-{amount(cart.personalDiscount)}</Text>\n          </TotalRowContainer>\n        )}\n        {cart.hasCleaningDiscount && (\n          <TotalRowContainer>\n            <Text fontSize=\"md\">{t('cleaning-discount')}:</Text>\n            <Text fontSize=\"md\">{amount(cart.cleaningDiscount)}</Text>\n          </TotalRowContainer>\n        )}\n        {Boolean(cart.markup) && (\n          <TotalRowContainer>\n            <Text fontSize=\"md\">{t('cartMarkup')}</Text>\n            <Text fontSize=\"md\">{amount(cart.markup)}</Text>\n          </TotalRowContainer>\n        )}\n        {cart.hasVat && (\n          <TotalRowContainer>\n            <Text fontSize=\"md\">{t('cartTax')}</Text>\n            <Text fontSize=\"md\">{amount(cart.vat)}</Text>\n          </TotalRowContainer>\n        )}\n        <Divider />\n        <TotalRowContainerSummary>\n          <Text fontSize=\"md\">{t('cartTotal')}</Text>\n          <Text fontSize=\"md\" fontWeight=\"700\">\n            {amount(cart.total)}\n          </Text>\n        </TotalRowContainerSummary>\n      </TotalWrapper>\n      <CartButtonsContainer>\n        <OrderButton\n          width=\"100%\"\n          colorScheme=\"red\"\n          onClick={() => {\n            requestComments();\n          }}\n          disabled={canPlaceOrder}\n        >\n          {t('confirmOrder')}\n        </OrderButton>\n        <OrderButton\n          width=\"100%\"\n          colorScheme=\"black\"\n          onClick={() => createOrder({ asDraft: true })}\n          disabled={canPlaceOrder}\n        >\n          {t('saveDraft')}\n        </OrderButton>\n      </CartButtonsContainer>\n    </Card>\n  );\n};\n","import { FormProvider, useForm, UseFormReturn } from 'react-hook-form';\nimport * as v from 'zod';\nimport { useModalFactoryContextProvider } from '../../../components/Modal/api';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { TextArea } from '../../../components/TextArea/TextArea';\nimport { useTranslation } from 'react-i18next';\nimport { SpaceOnlyStandOrderCommentsFormSchema } from './SpaceOnlyStandOrderCommentsForm';\nimport Input from '../../../components/Fields/Input';\nimport i18n from '../../../i18n';\nimport { Stack } from '@chakra-ui/react';\nimport { SelectComponent } from '@/components/MultiSelect/MultiSelect';\nimport { CARPET_COLORS, FASCIA_INSCRIPTION_COLORS } from '@/i18n/lang/colors';\n\nconst OptionSchema = v.object(\n  {\n    value: v.coerce.string(),\n    label: v.string(),\n  },\n  {\n    required_error: i18n.t('required-field'),\n  }\n);\n\nconst Schema = v\n  .object({\n    fasciaInscription: v\n      .string()\n      .min(1, i18n.t('required-field'))\n      .max(500, i18n.t('exceed-n-characters', { n: 500 })),\n    fasciaInscriptionColor: OptionSchema,\n    carpetColor: OptionSchema,\n  })\n  .merge(SpaceOnlyStandOrderCommentsFormSchema);\n\nexport type ExtendedStandOrderCommentsFormValuesType = v.infer<typeof Schema>;\n\nexport type ExtendedStandOrderCommentsFormType =\n  UseFormReturn<ExtendedStandOrderCommentsFormValuesType>;\n\nexport const ExtendedStandOrderCommentsForm = () => {\n  const { t } = useTranslation();\n  const instance: ExtendedStandOrderCommentsFormType =\n    useForm<ExtendedStandOrderCommentsFormValuesType>({\n      resolver: zodResolver(Schema),\n    });\n\n  useModalFactoryContextProvider(instance);\n\n  return (\n    <FormProvider {...instance}>\n      <Stack spacing={5}>\n        <Input<ExtendedStandOrderCommentsFormValuesType>\n          name=\"fasciaInscription\"\n          label={t('fascia-inscription')}\n          maxWidth=\"unset\"\n          isRequired\n        />\n        <SelectComponent<ExtendedStandOrderCommentsFormValuesType>\n          name=\"fasciaInscriptionColor\"\n          label={t('fascia-inscription-color')}\n          maxWidth=\"unset\"\n          isRequired\n          options={FASCIA_INSCRIPTION_COLORS}\n        />\n        <SelectComponent<ExtendedStandOrderCommentsFormValuesType>\n          name=\"carpetColor\"\n          label={t('carpet-color')}\n          maxWidth=\"unset\"\n          isRequired\n          options={CARPET_COLORS}\n        />\n        <TextArea<ExtendedStandOrderCommentsFormValuesType>\n          name=\"additionalComments\"\n          label={t('comment')}\n        />\n      </Stack>\n    </FormProvider>\n  );\n};\n","import { FormProvider, useForm, UseFormReturn } from 'react-hook-form';\nimport * as v from 'zod';\nimport { useModalFactoryContextProvider } from '../../../components/Modal/api';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { TextArea } from '../../../components/TextArea/TextArea';\nimport { useTranslation } from 'react-i18next';\n\nexport const SpaceOnlyStandOrderCommentsFormSchema = v.object({\n  additionalComments: v.string().max(1000).optional(),\n});\n\ntype ValuesType = v.infer<typeof SpaceOnlyStandOrderCommentsFormSchema>;\n\nexport type SpaceOnlyStandOrderCommentsFormType = UseFormReturn<ValuesType>;\n\nexport const SpaceOnlyStandOrderCommentsForm = () => {\n  const { t } = useTranslation();\n  const instance: SpaceOnlyStandOrderCommentsFormType = useForm<ValuesType>({\n    resolver: zodResolver(SpaceOnlyStandOrderCommentsFormSchema),\n  });\n\n  useModalFactoryContextProvider(instance);\n\n  return (\n    <FormProvider {...instance}>\n      <TextArea<ValuesType> name=\"additionalComments\" label={t('comment')} />\n    </FormProvider>\n  );\n};\n","import React, { useCallback, useMemo } from 'react';\nimport { Icon, Table, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react';\nimport { ArrowBackIcon, SmallCloseIcon } from '@chakra-ui/icons';\nimport { Card } from '@/components/Card/Card';\nimport { useTranslation } from 'react-i18next';\nimport { OrderItem, TemporaryStaffOrderItem } from '@/model/IOrderItem';\nimport { CART_TABLE } from '@/constants/technical-services';\nimport { numberWithSpaces } from '@/utils/amountTransformation';\nimport Layout from '@/layout/Default';\nimport { Content, ContentInner } from '@/components/Content';\nimport { replacePaths } from '@/utils/route';\nimport { CREATE_EXHIBITION_ORDER_PATH } from '@/constants/router';\nimport Breadcrumbs from '@/components/Breadcrumbs';\nimport { IBreadcrumbItem } from '@/model/common';\nimport { ExhibitionTitle } from '@/components/Sidebar/OrderList/OrderList.styled';\nimport { Loader } from '@/components/Loader/Loader';\nimport { IsLoadingWrapper, LoaderWrapper } from '@/theme/css/styles';\nimport dayjs from 'dayjs';\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter';\nimport { viewExhibitionCart } from '../../features/Routing/protected/exhibitions-by-role';\nimport { AmountCounter } from '../../components/AmountCounter';\nimport { CATEGORY_TYPES } from '../../constants/categorie';\nimport { Product } from '../../model/IProduct';\nimport { Cart as CartInstance } from '../../model/ICart';\nimport {\n  BackButtonWrapper,\n  Button,\n  ExhibitionBoxWrapper,\n  OrderCartWrapper,\n  OrderPageWrapper,\n  PageTitleWithService,\n} from './styled';\nimport { CartTotal } from './CartTotal';\nimport { IBaseOrder } from '../../model/IBaseOrder';\nimport { isNil } from '../../utils/is-nil';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { orderApi, useOrder, useOrderTotal } from '@/store/effector/order';\nimport { useStand } from '@/store/effector/stand';\nimport { useAppLoading } from '@/store/effector/loading';\nimport { OrderItemDependencyWarning } from '@/components/Sidebar/OrderList/OrderItemDependencyWarning';\n\ndayjs.extend(isSameOrAfter);\n\ninterface CartRowProps {\n  item: OrderItem | TemporaryStaffOrderItem;\n  currency: string;\n}\n\nconst CartRow: React.FC<CartRowProps> = ({ item, currency }) => {\n  const { t } = useTranslation();\n  const { product } = item;\n  const total = numberWithSpaces(item.total, currency);\n  const isDisabled =\n    product?.category?.name === CATEGORY_TYPES.TEMPORARY_STAFF ||\n    product?.category?.name === CATEGORY_TYPES.SELECT_BUILDING ||\n    item.included;\n\n  const itemName = item?.displayName;\n\n  const precision = (() => {\n    if (product?.category?.name === CATEGORY_TYPES.SELECT_BUILDING) {\n      return 1;\n    }\n\n    return item.product.category.isDecimal ? 2 : 0;\n  })();\n\n  const deleteHandler = useCallback(() => {\n    orderApi.removeItem(item);\n  }, []);\n\n  const changeHandler = (value: number) => {\n    orderApi.changeItem({\n      id: product.getProductId(),\n      product,\n      amount: value,\n    });\n  };\n\n  const unit = (() => {\n    if (product.category.name === CATEGORY_TYPES.SELECT_BUILDING) {\n      return t('sqm');\n    }\n\n    return item.product instanceof Product ? item.product.unit : undefined;\n  })();\n\n  return (\n    <>\n      <Tr>\n        <Td>{itemName}</Td>\n        <Td isNumeric whiteSpace=\"nowrap\">\n          {product?.formattedPrice}\n        </Td>\n        <Td w={120} isNumeric>\n          <div style={{ marginLeft: 'auto', width: 'fit-content' }}>\n            <AmountCounter\n              amountCounterValue={item.getAmount()}\n              onChange={(counterValue: number) => changeHandler(counterValue)}\n              disabled={isDisabled}\n              precision={precision}\n              step={product instanceof Product ? product.amountStep : 1}\n              suffix={unit}\n            />\n          </div>\n        </Td>\n        <Td w={160} isNumeric whiteSpace=\"nowrap\">\n          {total}\n        </Td>\n        <Td w={50} isNumeric>\n          {!item.included && (\n            <Button\n              onClick={deleteHandler}\n              disabled={\n                product?.category?.id === CATEGORY_TYPES.SELECT_BUILDING\n              }\n            >\n              <Icon as={SmallCloseIcon} />\n            </Button>\n          )}\n        </Td>\n      </Tr>\n      {item && (\n        <OrderItemDependencyWarning\n          orderItem={item}\n          ml=\"-1.5rem\"\n          mr=\"-1.5rem\"\n          pl=\"20px\"\n          pr=\"20px\"\n          width=\"unset\"\n          renderProps={(children) => (\n            <Tr>\n              <Td colSpan={5} pt={0} pb={0}>\n                {children}\n              </Td>\n            </Tr>\n          )}\n        />\n      )}\n    </>\n  );\n};\n\nconst BackButton = () => {\n  const { t } = useTranslation();\n\n  return (\n    <BackButtonWrapper>\n      <ArrowBackIcon w={5} h={5} color=\"grey.300\" />\n      {t('toService')}\n    </BackButtonWrapper>\n  );\n};\n\nconst Cart: React.FC = () => {\n  const { currency, margin, exhibitionName } = useExhibition();\n  const { exhibitionId, stand } = viewExhibitionCart.useParams();\n  const { cleaningDiscount } = viewExhibitionCart.useLoaderData();\n  const { items, orderDto } = useOrder();\n  const total = useOrderTotal();\n  const isLoader = useAppLoading();\n  const { standForOrder } = useStand();\n\n  const cart = useMemo(() => {\n    const order = new IBaseOrder({\n      orderId: orderDto?.orderId || 0,\n      exhibitionId: orderDto?.exhibitionId || 0,\n      // typeOfDiscount: orderDto?.typeOfDiscount || 0,\n      // personalDiscount: orderDto?.personalDiscount || 0,\n      standId: orderDto?.standId || 0,\n      personalExtraChargePercentage: orderDto?.personalExtraChargePercentage,\n      removeExtraCharge: orderDto?.removeExtraCharge,\n    });\n\n    const cartInstance = new CartInstance();\n\n    cartInstance\n      .setItems(items)\n      .setOrder(order)\n      .setItems(items)\n      .setCleaningDiscounts(cleaningDiscount)\n      .setMargin(margin);\n\n    if (standForOrder) {\n      cartInstance.setStandInfo({\n        type: standForOrder.buildingType,\n        // this is just to mock, type only will be used\n        id: standForOrder.standNumber || 0,\n        // this is just to mock, type only will be used\n        name: standForOrder.standNumber || '',\n      });\n    }\n\n    if (!isNil(currency)) {\n      cartInstance.setCurrency(currency);\n    }\n\n    return cartInstance;\n  }, [orderDto, items, currency, margin, cleaningDiscount, standForOrder]);\n\n  const { t } = useTranslation();\n\n  const getBack: IBreadcrumbItem[] = [\n    {\n      label: <BackButton />,\n      link: replacePaths(CREATE_EXHIBITION_ORDER_PATH, {\n        ':exhibitionId': exhibitionId,\n        ':stand': stand,\n      }),\n    },\n  ];\n\n  return (\n    <>\n      {isLoader && (\n        <IsLoadingWrapper>\n          <LoaderWrapper>\n            <Loader />\n          </LoaderWrapper>\n        </IsLoadingWrapper>\n      )}\n      <Layout>\n        <Content>\n          <ContentInner>\n            <OrderPageWrapper>\n              <PageTitleWithService>\n                <Breadcrumbs items={getBack} />\n                {t('yourOrder')}\n                <ExhibitionBoxWrapper>\n                  <ExhibitionTitle>{exhibitionName}</ExhibitionTitle>\n                </ExhibitionBoxWrapper>\n              </PageTitleWithService>\n              <OrderCartWrapper>\n                <Card width=\"75%\">\n                  <Table colorScheme=\"gray\">\n                    <Thead>\n                      <Tr>\n                        {CART_TABLE?.map((columnName, index) => {\n                          const firstColumn = index === 0;\n\n                          return (\n                            <Th key={columnName} isNumeric={!firstColumn}>\n                              {t(columnName)}\n                            </Th>\n                          );\n                        })}\n                      </Tr>\n                    </Thead>\n                    {items?.length > 0 && (\n                      <Tbody>\n                        {items?.map((tableRow) => (\n                          <CartRow\n                            item={tableRow}\n                            key={tableRow.uniqueKey}\n                            currency={currency || ''}\n                          />\n                        ))}\n                      </Tbody>\n                    )}\n                  </Table>\n                </Card>\n                <CartTotal\n                  total={total}\n                  currency={currency || ''}\n                  items={items}\n                  cart={cart}\n                />\n              </OrderCartWrapper>\n            </OrderPageWrapper>\n          </ContentInner>\n        </Content>\n      </Layout>\n    </>\n  );\n};\n\nexport default Cart;\n","import styled from 'styled-components';\nimport { Box } from '@chakra-ui/react';\nimport { CenteredPageTitle } from '../../components/Typography/PageTitle';\nimport { ExhibitionBox } from '../../components/Sidebar/OrderList/OrderList.styled';\n\nexport const Button = styled.button`\n  opacity: 0.5;\n\n  transition: all ease-in-out 0.15s;\n\n  &:hover {\n    opacity: 1;\n  }\n`;\n\nexport const OrderPageWrapper = styled.div``;\n\nexport const OrderCartWrapper = styled.div`\n  display: flex;\n  flex-direction: row;\n  width: 100%;\n  padding: 0 100px;\n  gap: 24px;\n`;\n\nexport const TotalWrapper = styled.div`\n  display: flex;\n  flex-direction: column;\n  padding-top: 5px;\n`;\n\nexport const TotalRowContainer = styled.div`\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  padding: 5px 0 10px 0;\n`;\n\nexport const TotalRowContainerSummary = styled(TotalRowContainer)`\n  padding-top: 20px;\n  padding-bottom: 20px;\n`;\n\nexport const CartButtonsContainer = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n`;\n\nexport const PageTitleWithService = styled(CenteredPageTitle)`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n  width: 100%;\n  padding: 0 100px;\n`;\n\nexport const ExhibitionBoxWrapper = styled(ExhibitionBox)`\n  max-width: 25%;\n  text-align: end;\n  background-color: inherit;\n`;\n\nexport const BackButtonWrapper = styled(Box)`\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  font-size: 16px;\n  gap: 10px;\n`;\n","import {\n  ButtonGroup,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n} from '@chakra-ui/react';\nimport { Button } from '@/components/Buttons/Button/Button';\n\nimport { useTranslation } from 'react-i18next';\n\ninterface ConfirmModalProps {\n  modalMessage: string;\n  isOpen: boolean;\n  closeModal: () => void;\n  confirm: any;\n}\n\nexport const ConfirmModal = ({\n  modalMessage,\n  isOpen,\n  closeModal,\n  confirm,\n}: ConfirmModalProps) => {\n  const { t } = useTranslation();\n\n  return (\n    <Modal isOpen={isOpen} onClose={closeModal} size=\"lg\" isCentered>\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{t('attention')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>{modalMessage}</ModalBody>\n        <ModalFooter onClick={closeModal}>\n          <ButtonGroup gap=\"1\">\n            <Button colorScheme=\"secondary\" onClick={confirm}>\n              {t('yes')}\n            </Button>\n            <Button colorScheme=\"black\" onClick={closeModal}>\n              {t('cancel')}\n            </Button>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import {\n  ButtonGroup,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n} from '@chakra-ui/react';\nimport { Button } from '@/components/Buttons/Button/Button';\n\nimport { useTranslation } from 'react-i18next';\n\ninterface DeleteModalProps {\n  onSubmit: () => void;\n  isOpen: boolean;\n  onClose: () => void;\n}\n\nexport const DeleteModal = ({\n  onSubmit,\n  isOpen,\n  onClose,\n}: DeleteModalProps): JSX.Element => {\n  const { t } = useTranslation();\n\n  return (\n    <Modal isOpen={isOpen} onClose={onClose} size=\"lg\" isCentered>\n      <ModalOverlay />\n      <ModalContent>\n        <ModalHeader>{t('attention')}</ModalHeader>\n        <ModalCloseButton />\n        <ModalBody>{t('deletePosition')}</ModalBody>\n        <ModalFooter onClick={onClose}>\n          <ButtonGroup gap=\"1\">\n            <Button colorScheme=\"secondary\" onClick={onSubmit}>\n              {t('yes')}\n            </Button>\n            <Button colorScheme=\"black\" onClick={onClose}>\n              {t('cancel')}\n            </Button>\n          </ButtonGroup>\n        </ModalFooter>\n      </ModalContent>\n    </Modal>\n  );\n};\n","import styled from 'styled-components';\nimport { Accordion, AccordionItem, Box, Text } from '@chakra-ui/react';\nimport { PageTitle } from '@/components/Typography/PageTitle';\n\nexport const AccordionButtonWrapper = styled(AccordionItem)`\n  border: none;\n  width: 100%;\n`;\n\nexport const PageTitleContainer = styled(PageTitle)`\n  padding-top: 30px;\n  text-align: center;\n`;\n\nexport const AccordionButtonDescription = styled(Box)`\n  flex: 1;\n  text-align: left;\n`;\n\nexport const AccordionTitleWrapper = styled.div`\n  display: flex;\n  flex-direction: column;\n`;\n\nexport const AccordionTitleContainer = styled(Text)`\n  font-size: 18px;\n  font-weight: 600;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  gap: 10px;\n`;\n\nexport const DotContainer = styled(Box)`\n  margin: 0 2px;\n  border-radius: 50%;\n  display: inline-block;\n`;\n\nexport const AccordionItemWrapper = styled.div`\n  width: 50%;\n  min-width: 800px;\n  padding: 10px;\n`;\n\nexport const AccordionWrapper = styled(Accordion)`\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n`;\n\nexport const OrderRowWrapper = styled(Box)`\n  padding: 10px;\n  border-radius: 5px;\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n`;\n\nexport const OrdersWrapper = styled(Box)`\n  width: 100%;\n`;\n\nexport const OrderInfoContainer = styled(Box)`\n  width: 60%;\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-start;\n  align-items: center;\n  gap: 50px;\n  color: #2d3748;\n  font-size: 16px;\n`;\n\nexport const OrderOptionsContainer = styled(Box)`\n  width: 40%;\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  align-items: center;\n  gap: 10px;\n`;\n\nexport const OptionBox = styled(Box)`\n  color: #718096;\n  cursor: pointer;\n\n  &:hover {\n    color: #e53e3e;\n  }\n`;\n\nexport const AddOrderButtonContainer = styled(Box)`\n  padding-top: 20px;\n  padding-bottom: 10px;\n  display: flex;\n  justify-content: flex-start;\n`;\n","import {\n  filesStorageApi,\n  useFilesStorage,\n} from '@/pages/Exhibition/FilesStorage/filesStorageApi';\nimport { useQuery } from '@tanstack/react-query';\nimport { typedAxios } from '@/api/typed-axios';\nimport {\n  Button,\n  Card,\n  CardBody,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerOverlay,\n  Table,\n  TableContainer,\n  Tbody,\n  Td,\n  Text,\n  Th,\n  Thead,\n  Tr,\n} from '@chakra-ui/react';\nimport { AsyncButton } from '@/components/AsyncButton';\nimport { useTranslation } from 'react-i18next';\nimport React, { useRef } from 'react';\nimport { toast } from 'react-toastify';\nimport { queryClient } from '@/features/query';\nimport { LoaderWrapper } from '@/components/Loader/Loader';\nimport fetchApi from '@/utils/fetchAPI';\nimport { FileUtils } from '@/utils/file-utils';\nimport type { ITEPortal_Domain_Dto_Stand_GetStandFileDto } from '@/api';\nimport { DeleteIcon } from '@chakra-ui/icons';\nimport { DownloadFileLink } from '@/components/DownloadFileLink';\n\ntype FilesStoragePropsType = {\n  canUploadNewFiles: boolean;\n};\n\nexport const FilesStorage = (props: FilesStoragePropsType) => {\n  const { canUploadNewFiles } = props;\n  const inputRef = useRef<HTMLInputElement>(null);\n\n  const { t } = useTranslation();\n  const { stand } = useFilesStorage();\n\n  const hasStandId = typeof stand?.standId === 'number';\n\n  const { isFetching, data = [] } = useQuery({\n    queryKey: ['stand-files-storage', stand?.standId],\n    enabled: hasStandId,\n    queryFn: async () => {\n      if (!stand?.standId) {\n        return [];\n      }\n\n      return typedAxios.stand.getStandsFiles({\n        standId: stand.standId,\n      });\n    },\n  });\n\n  const handleUpload = async (e: React.ChangeEvent<HTMLInputElement>) => {\n    if (!canUploadNewFiles) {\n      return;\n    }\n\n    try {\n      const file = e.currentTarget.files?.[0];\n\n      if (!stand?.standId || !(file instanceof File)) {\n        return;\n      }\n\n      await typedAxios.stand.putStandsFiles({\n        standId: stand?.standId,\n        formData: {\n          file,\n        },\n      });\n\n      await queryClient.refetchQueries({\n        queryKey: ['stand-files-storage', stand?.standId],\n      });\n\n      toast.success(t('file-upload-success'));\n    } catch {\n      toast.error(t('error-occurred'));\n    }\n  };\n\n  const handleClose = () => {\n    filesStorageApi.reset();\n  };\n\n  const handleDownloadArchive = async () => {\n    if (!stand?.standId) {\n      return;\n    }\n\n    const { data: stream } = await fetchApi(`stands/${stand?.standId}/zip`, {\n      method: 'GET',\n      responseType: 'blob',\n    });\n\n    FileUtils.saveBlobAsFile(stream, `stand-files-${stand.standId}.zip`);\n  };\n\n  const handleFileDelete =\n    (file: ITEPortal_Domain_Dto_Stand_GetStandFileDto) => async () => {\n      if (!stand?.standId) {\n        return;\n      }\n\n      try {\n        await typedAxios.stand.deleteStandsFiles({\n          standId: stand?.standId,\n          fileId: file.id,\n        });\n        await queryClient.refetchQueries({\n          queryKey: ['stand-files-storage', stand?.standId],\n        });\n\n        toast.success(t('file-delete-success'));\n      } catch {\n        toast.error(t('error-occurred'));\n      }\n    };\n\n  return (\n    <Drawer\n      size=\"lg\"\n      isOpen={hasStandId}\n      placement=\"right\"\n      onClose={handleClose}\n    >\n      <DrawerOverlay />\n      <DrawerContent>\n        <DrawerCloseButton />\n        <DrawerHeader>\n          {t('stand-files', { standNumber: stand?.standNumber })}\n        </DrawerHeader>\n        <DrawerBody>\n          <LoaderWrapper\n            loading={isFetching}\n            display=\"flex\"\n            flexDirection=\"column\"\n          >\n            {canUploadNewFiles && (\n              <>\n                <input\n                  ref={inputRef}\n                  type=\"file\"\n                  hidden\n                  onChange={handleUpload}\n                />\n                <AsyncButton\n                  marginLeft=\"auto\"\n                  colorScheme=\"blue\"\n                  mt={2}\n                  mb={4}\n                  onClick={() => {\n                    inputRef.current?.click();\n                  }}\n                >\n                  {t('upload')}\n                </AsyncButton>\n              </>\n            )}\n\n            {data.length > 0 && (\n              <Card>\n                <CardBody>\n                  <TableContainer>\n                    <Table variant=\"simple\">\n                      <Thead>\n                        <Tr>\n                          <Th>{t('file')}</Th>\n                          <Th>{t('delete')}</Th>\n                        </Tr>\n                      </Thead>\n                      <Tbody>\n                        {data.map((file) => {\n                          return (\n                            <Tr key={file.fileName}>\n                              <Td>\n                                <DownloadFileLink\n                                  attachmentUrl={file.fileUrl}\n                                  fileName={file.fileName}\n                                  withIcon={false}\n                                  color=\"inherit\"\n                                  fontSize=\"sm\"\n                                />\n                              </Td>\n                              <Td isNumeric>\n                                <DeleteIcon\n                                  cursor=\"pointer\"\n                                  onClick={handleFileDelete(file)}\n                                />\n                              </Td>\n                            </Tr>\n                          );\n                        })}\n                      </Tbody>\n                    </Table>\n                  </TableContainer>\n                </CardBody>\n              </Card>\n            )}\n\n            {!isFetching && data.length === 0 && (\n              <Text color=\"gray.500\">{t('no-files-uploaded')}</Text>\n            )}\n          </LoaderWrapper>\n        </DrawerBody>\n\n        <DrawerFooter>\n          <Button\n            variant=\"outline\"\n            colorScheme=\"red\"\n            mr={3}\n            onClick={handleClose}\n          >\n            {t('cancel')}\n          </Button>\n          <AsyncButton\n            variant=\"outline\"\n            colorScheme=\"red\"\n            mr={3}\n            onClick={handleDownloadArchive}\n          >\n            {t('download-files-archive')}\n          </AsyncButton>\n        </DrawerFooter>\n      </DrawerContent>\n    </Drawer>\n  );\n};\n","import { createApi, createStore } from 'effector';\nimport { useUnit } from 'effector-react';\nimport { ITEPortal_Domain_Dto_StandSummariesDto } from '@/api';\n\ntype FilesStorageStateType = {\n  stand: ITEPortal_Domain_Dto_StandSummariesDto | null;\n};\n\nconst $filesStorage = createStore<FilesStorageStateType>({\n  stand: null,\n});\n\nexport const filesStorageApi = createApi($filesStorage, {\n  setStand: (_, stand: ITEPortal_Domain_Dto_StandSummariesDto) => ({\n    stand,\n  }),\n\n  reset: () => ({\n    stand: null,\n  }),\n});\n\nexport const useFilesStorage = () => useUnit($filesStorage);\n","import React, { useState } from 'react';\nimport { useNavigate, useRouter } from '@tanstack/react-router';\nimport { Card } from '@/components/Card/Card';\nimport { Content, ContentInner } from '@/components/Content';\nimport { Table } from '@/components/Table/Table';\nimport {\n  Accordion,\n  AccordionButton,\n  AccordionIcon,\n  AccordionItem,\n  AccordionPanel,\n  Button,\n  Flex,\n  Text,\n  Tooltip,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport {\n  AccordionButtonDescription,\n  AccordionButtonWrapper,\n  AccordionItemWrapper,\n  AccordionTitleContainer,\n  AccordionTitleWrapper,\n  AccordionWrapper,\n  AddOrderButtonContainer,\n  OptionBox,\n  OrderInfoContainer,\n  OrderOptionsContainer,\n  OrderRowWrapper,\n  OrdersWrapper,\n  PageTitleContainer,\n} from './Exhibition.styled';\nimport { MdDelete, MdModeEdit } from 'react-icons/md';\nimport { AiFillFilePdf } from 'react-icons/ai';\nimport Layout from '@/layout/Default';\nimport fetchApi from '@/utils/fetchAPI';\nimport { Loader } from '@/components/Loader/Loader';\nimport { GET_PDF_BY_ORDER } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { DeleteModal } from '@/pages/Exhibition/DeleteModal';\nimport { exhibitionViewRoute } from '@/features/Routing/protected/exhibitions-by-role';\nimport {\n  ITEPortal_Domain_Dto_OrderItemDto,\n  ITEPortal_Domain_Dto_StandOrderDto,\n  ITEPortal_Domain_Dto_StandSummariesDto,\n} from '@/api';\nimport { typedAxios } from '@/api/typed-axios';\nimport { toast } from 'react-toastify';\nimport { useEditOrderLoader } from './useEditOrderLoader';\nimport { InfoIcon } from '@chakra-ui/icons';\nimport { StandDescription } from './shared/StandDescription';\nimport { useExhibitionStateReset } from '@/hooks/useExhibitionStateReset';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { standApi } from '@/store/effector/stand';\nimport { orderApi } from '@/store/effector/order';\nimport { loadingApi, useAppLoading } from '@/store/effector/loading';\nimport { FileUtils } from '../../utils/file-utils';\nimport { OrderBadge } from '@/components/OrderBadge';\nimport { ORDER_STATUSES } from '@/constants/order';\nimport { filesStorageApi } from '@/pages/Exhibition/FilesStorage/filesStorageApi';\nimport { FilesStorage } from '@/pages/Exhibition/FilesStorage/FilesStorage';\nimport { useGetOrderItems } from '@/pages/Exhibition/useGetOrderItems';\nimport { orderTranscriptTableColumns } from '@/pages/Exhibition/orderTranscriptTableColumns';\n\ninterface AccordionButtonContentProps {\n  standName: string;\n  stand: ITEPortal_Domain_Dto_StandSummariesDto;\n}\n\ntype OrderRowContentProps = {\n  title: string;\n  stand: ITEPortal_Domain_Dto_StandSummariesDto;\n  editable: boolean;\n} & Pick<ITEPortal_Domain_Dto_StandOrderDto, 'status' | 'orderId'>;\n\ntype OrderRowProps = Required<{\n  status: OrderRowContentProps['status'];\n  order: Required<OrderRowContentProps['orderId']>;\n  stand: OrderRowContentProps['stand'];\n  canEdit: boolean;\n  canRemove: boolean;\n}>;\n\nconst defaultAccordionValue = [0];\n\nconst AccordionButtonContent = ({\n  stand,\n  standName,\n}: AccordionButtonContentProps) => {\n  const { standNumber } = stand;\n  const { t } = useTranslation();\n\n  return (\n    <AccordionTitleWrapper>\n      <AccordionTitleContainer>\n        {standName}\n        {standNumber && (\n          <>\n            , {standNumber}\n            <Tooltip label={t('stand-number')} hasArrow placement=\"top\">\n              <InfoIcon color=\"lightgray\" boxSize={4} />\n            </Tooltip>\n          </>\n        )}\n      </AccordionTitleContainer>\n    </AccordionTitleWrapper>\n  );\n};\n\nconst OrderOptions = ({\n  status,\n  order,\n  stand,\n  canEdit,\n  canRemove,\n}: OrderRowProps): JSX.Element => {\n  const culture = localStorage.getItem('lang');\n  const router = useRouter();\n  const { t } = useTranslation();\n  const [openConfirm, setOpenConfirm] = useState(false);\n\n  const { exhibitionId } = exhibitionViewRoute.useParams();\n\n  const { editOrder } = useEditOrderLoader({\n    orderId: order,\n    exhibitionId: +exhibitionId,\n    stand,\n  });\n\n  const showPdf = async (e: MouseEvent) => {\n    e.stopPropagation();\n\n    try {\n      const { data } = await fetchApi(GET_PDF_BY_ORDER(order), {\n        method: FetchMethods.Get,\n        responseType: 'blob',\n        params: {\n          culture,\n        },\n      });\n\n      FileUtils.saveBlobAsFile(data, `order-${order}.pdf`);\n    } catch (error) {}\n  };\n\n  const deleteOrder = async () => {\n    loadingApi.on();\n    try {\n      if (typeof order === 'number') {\n        await typedAxios.order.deleteOrdersDraft({\n          orderId: order,\n        });\n\n        router.invalidate();\n      }\n    } catch {\n      toast.error(\n        t('unable-to-delete', {\n          entity: t('order').toLowerCase(),\n        })\n      );\n    } finally {\n      loadingApi.off();\n    }\n  };\n\n  const openDeleteModal = (e: MouseEvent) => {\n    e.stopPropagation();\n\n    setOpenConfirm(!openConfirm);\n  };\n\n  const closeDeleteModal = () => setOpenConfirm(false);\n\n  return (\n    <>\n      <OptionBox onClick={(e: MouseEvent) => showPdf(e)}>\n        <AiFillFilePdf />\n      </OptionBox>\n      <DeleteModal\n        onSubmit={deleteOrder}\n        isOpen={openConfirm}\n        onClose={closeDeleteModal}\n      />\n      {status === ORDER_STATUSES.Draft && (\n        <>\n          {canEdit && (\n            <OptionBox onClick={editOrder}>\n              <MdModeEdit />\n            </OptionBox>\n          )}\n          {canRemove && (\n            <OptionBox onClick={(e: MouseEvent) => openDeleteModal(e)}>\n              <MdDelete />\n            </OptionBox>\n          )}\n        </>\n      )}\n    </>\n  );\n};\n\nconst OrderRowContent = ({\n  title,\n  status,\n  orderId,\n  stand,\n  editable,\n}: OrderRowContentProps): JSX.Element => {\n  return (\n    <OrdersWrapper>\n      <OrderRowWrapper>\n        <OrderInfoContainer>\n          <Text minW=\"15%\">{title}</Text>\n          <Text minW=\"5%\">{orderId}</Text>\n          <OrderBadge status={status} />\n        </OrderInfoContainer>\n        <OrderOptionsContainer>\n          <OrderOptions\n            canEdit={editable}\n            canRemove={editable}\n            status={status}\n            order={orderId}\n            stand={stand}\n          />\n        </OrderOptionsContainer>\n      </OrderRowWrapper>\n    </OrdersWrapper>\n  );\n};\n\nconst Exhibition = () => {\n  const { exhibitionId } = exhibitionViewRoute.useParams();\n  const { standsData } = exhibitionViewRoute.useLoaderData();\n  const { exhibition } = useExhibition();\n  const isLoader = useAppLoading();\n  const { getOrderItems, orderLoading } = useGetOrderItems();\n  const [orderItems, setOrderItems] = useState<\n    Array<ITEPortal_Domain_Dto_OrderItemDto>\n  >([]);\n\n  const { t } = useTranslation();\n  const navigate = useNavigate();\n\n  useExhibitionStateReset();\n\n  if (!exhibition) {\n    return null;\n  }\n\n  const { name } = exhibition;\n\n  const canManageOrder = exhibition.canEditOrders;\n\n  const createOrder = (stand: ITEPortal_Domain_Dto_StandSummariesDto) => {\n    orderApi.clearProducts();\n    standApi.setStandForOrder(stand);\n\n    navigate({\n      to: `/exhibitions/$exhibitionId/$stand/create`,\n      params: {\n        exhibitionId: exhibitionId,\n        stand: stand.standId,\n      },\n    });\n  };\n\n  return (\n    <Layout>\n      <Content>\n        <ContentInner>\n          <PageTitleContainer centered=\"true\">{name}</PageTitleContainer>\n          <AccordionWrapper defaultIndex={defaultAccordionValue} allowMultiple>\n            {isLoader ? (\n              <Loader centralized />\n            ) : (\n              standsData?.map((stand, index) => {\n                const { orders } = stand;\n                const hasOrders = !!orders?.length;\n                const standName = `${t('stand')} ${index + 1}`;\n\n                const getOrderData = (orderIndex: number) => {\n                  setOrderItems([]);\n                  const order = orders?.[orderIndex];\n                  const products = getOrderItems(order?.orderId);\n\n                  products.then(function (result) {\n                    if (result) {\n                      setOrderItems(result);\n                    }\n                  });\n                };\n\n                return (\n                  <AccordionItemWrapper key={index}>\n                    <Card>\n                      <AccordionButtonWrapper>\n                        <AccordionButton\n                          _hover={{ backgroundColor: 'inherit' }}\n                        >\n                          <AccordionButtonDescription as=\"span\">\n                            <AccordionButtonContent\n                              standName={standName}\n                              stand={stand}\n                            />\n                          </AccordionButtonDescription>\n                          <AccordionIcon />\n                        </AccordionButton>\n\n                        <AccordionPanel pb={4}>\n                          <StandDescription stand={stand} />\n\n                          <AddOrderButtonContainer gap={2}>\n                            {canManageOrder && (\n                              <Button\n                                size=\"sm\"\n                                onClick={() => createOrder(stand)}\n                              >\n                                {t('createNewOrder')}\n                              </Button>\n                            )}\n                            {stand.projectId && (\n                              <Button\n                                colorScheme=\"red\"\n                                variant=\"outline\"\n                                size=\"sm\"\n                                onClick={() => {\n                                  navigate({\n                                    to: `/exhibitions/${exhibitionId}/${stand.standId}/project/${stand.projectId}`,\n                                  });\n                                }}\n                              >\n                                {t('stand-project')}\n                              </Button>\n                            )}\n                            <Button\n                              size=\"sm\"\n                              variant=\"outline\"\n                              colorScheme=\"red\"\n                              onClick={() => {\n                                filesStorageApi.setStand(stand);\n                              }}\n                            >\n                              {t('my-files')}\n                            </Button>\n                          </AddOrderButtonContainer>\n                          <Accordion\n                            onChange={(tabIndex: number) =>\n                              getOrderData(tabIndex)\n                            }\n                            allowToggle\n                            reduceMotion\n                          >\n                            {hasOrders &&\n                              orders.map((order, orderKey) => {\n                                const orderTitle = `${t('order')} ${\n                                  orderKey + 1\n                                }`;\n\n                                return (\n                                  <AccordionItem key={orderKey}>\n                                    <AccordionButton>\n                                      <OrderRowContent\n                                        title={orderTitle}\n                                        status={order?.status}\n                                        orderId={order?.orderId}\n                                        key={orderKey}\n                                        stand={stand}\n                                        editable={canManageOrder}\n                                      />\n                                      <AccordionIcon />\n                                    </AccordionButton>\n\n                                    <AccordionPanel\n                                      pb={4}\n                                      style={{\n                                        display: 'flex',\n                                        justifyContent: 'center',\n                                      }}\n                                    >\n                                      {orderLoading ? (\n                                        <Loader />\n                                      ) : (\n                                        <Flex flexDir=\"column\">\n                                          <Table\n                                            columns={\n                                              orderTranscriptTableColumns\n                                            }\n                                            data={orderItems}\n                                          />\n                                        </Flex>\n                                      )}\n                                    </AccordionPanel>\n                                  </AccordionItem>\n                                );\n                              })}\n                          </Accordion>\n                        </AccordionPanel>\n                      </AccordionButtonWrapper>\n                    </Card>\n                  </AccordionItemWrapper>\n                );\n              })\n            )}\n          </AccordionWrapper>\n          <FilesStorage canUploadNewFiles />\n        </ContentInner>\n      </Content>\n    </Layout>\n  );\n};\n\nexport default Exhibition;\n","import i18n from '@/i18n';\nimport { Column } from 'react-table';\nimport { ITEPortal_Domain_Dto_OrderItemDto } from '@/api';\nimport styled from 'styled-components';\nimport { Box } from '@chakra-ui/react';\n\nconst TranscriptTableRow = styled(Box)`\n  font-size: 12px;\n`;\n\nconst TranscriptTableHeader = styled(Box)`\n  font-size: 10px;\n  font-weight: 600;\n`;\n\nexport const orderTranscriptTableColumns = [\n  {\n    Header: (\n      <TranscriptTableHeader>\n        {i18n.t('product-type-common')}\n      </TranscriptTableHeader>\n    ),\n    accessor: 'productName',\n    width: '60%',\n    Cell: ({ value }) => {\n      return <TranscriptTableRow>{value}</TranscriptTableRow>;\n    },\n  },\n  {\n    Header: <TranscriptTableHeader>{i18n.t('language')}</TranscriptTableHeader>,\n    accessor: 'language',\n    Cell: ({ value }) => {\n      return <TranscriptTableRow>{value}</TranscriptTableRow>;\n    },\n  },\n  {\n    Header: (\n      <TranscriptTableHeader>\n        {i18n.t('peopleMountShort')}\n      </TranscriptTableHeader>\n    ),\n    accessor: 'peopleAmount',\n    Cell: ({ value }) => {\n      return (\n        <TranscriptTableRow>\n          {value && value > 0 ? value : ''}\n        </TranscriptTableRow>\n      );\n    },\n  },\n  {\n    Header: (\n      <TranscriptTableHeader>{i18n.t('daysMountShort')}</TranscriptTableHeader>\n    ),\n    accessor: 'dayAmount',\n    Cell: ({ value }) => {\n      return (\n        <TranscriptTableRow>\n          {value && value > 0 ? value : ''}\n        </TranscriptTableRow>\n      );\n    },\n  },\n  {\n    Header: <TranscriptTableHeader>{i18n.t('amount')}</TranscriptTableHeader>,\n    accessor: 'amount',\n    Cell: ({ value }) => {\n      return <TranscriptTableRow>{value}</TranscriptTableRow>;\n    },\n  },\n] satisfies Array<Column<ITEPortal_Domain_Dto_OrderItemDto>>;\n","import styled from 'styled-components';\nimport { Flex, Text, Tooltip } from '@chakra-ui/react';\nimport {\n  StandConfDescriptionByConf,\n  StandConfLabelsByConf,\n  StandTypeLabelsByType,\n} from '../../../utils/constants';\nimport { InfoIcon } from '@chakra-ui/icons';\nimport { useTranslation } from 'react-i18next';\nimport {\n  ITEPortal_Contracts_Enums_BuildingType,\n  ITEPortal_Domain_Dto_StandSummariesDto,\n} from '../../../api';\nimport { isNil } from '@/utils/is-nil';\nimport { getPavilionLabelByCode } from '@/pages/AdminPanel/PersonalAccounts/StandsTab/contsants';\n\nconst AccordionSubTitleContainer = styled.div`\n  display: flex;\n  flex-direction: row;\n  color: #718096;\n  font-size: 14px;\n  gap: 10px;\n  align-items: center;\n`;\n\nexport const StandDescription = ({\n  stand,\n  includeStandNumber,\n  inline,\n  originalBuildingType,\n}: {\n  originalBuildingType?: ITEPortal_Contracts_Enums_BuildingType;\n  stand: ITEPortal_Domain_Dto_StandSummariesDto;\n  includeStandNumber?: boolean;\n  inline?: boolean;\n}) => {\n  const {\n    buildingType,\n    standConfiguration,\n    standNumber,\n    area,\n    secondFloorArea,\n    pavilionHall,\n  } = stand;\n  const totalArea = (area || 0) + (secondFloorArea || 0);\n  const { t } = useTranslation();\n  const shouldRenderStandNumber = includeStandNumber && standNumber;\n\n  return (\n    <AccordionSubTitleContainer>\n      <Flex\n        gap={inline ? 4 : 1}\n        flexDirection={inline ? 'row' : 'column'}\n        width=\"100%\"\n        flexWrap=\"wrap\"\n      >\n        {shouldRenderStandNumber && (\n          <Flex flexDirection=\"row\" alignItems=\"center\" gap={2}>\n            <Text whiteSpace=\"nowrap\">{standNumber}</Text>\n            <Tooltip label={t('stand-number')} hasArrow placement=\"top\">\n              <InfoIcon color=\"lightgray\" boxSize={4} />\n            </Tooltip>\n          </Flex>\n        )}\n        {!isNil(buildingType) && (\n          <Flex flexDirection=\"row\" alignItems=\"center\" gap={2}>\n            <Text whiteSpace=\"nowrap\">\n              {StandTypeLabelsByType[originalBuildingType || buildingType]}\n            </Text>\n            <Tooltip\n              label={\n                buildingType === 1\n                  ? t('stand-space-only-description')\n                  : t('area-type')\n              }\n              hasArrow\n              placement=\"top\"\n            >\n              <InfoIcon color=\"lightgray\" boxSize={4} />\n            </Tooltip>\n          </Flex>\n        )}\n        <Flex flexDirection=\"row\" alignItems=\"center\" gap={2}>\n          <Text whiteSpace=\"nowrap\">\n            {totalArea} {t('sqm')}\n          </Text>\n          <Tooltip label={t('stand-area')} hasArrow placement=\"top\">\n            <InfoIcon color=\"lightgray\" boxSize={4} />\n          </Tooltip>\n        </Flex>\n        {standConfiguration && (\n          <Flex flexDirection=\"row\" alignItems=\"center\" gap={2}>\n            <Text whiteSpace=\"nowrap\">\n              {StandConfLabelsByConf[standConfiguration]}\n            </Text>\n            <Tooltip\n              label={\n                StandConfDescriptionByConf[standConfiguration] ||\n                t('stand-configuration')\n              }\n              hasArrow\n              placement=\"top\"\n            >\n              <InfoIcon color=\"lightgray\" boxSize={4} />\n            </Tooltip>\n          </Flex>\n        )}\n        {pavilionHall && (\n          <Flex flexDirection=\"row\" alignItems=\"center\" gap={2}>\n            <Text whiteSpace=\"nowrap\">\n              {getPavilionLabelByCode(pavilionHall)}\n            </Text>\n            <Tooltip label={t('pavilion')} hasArrow placement=\"top\">\n              <InfoIcon color=\"lightgray\" boxSize={4} />\n            </Tooltip>\n          </Flex>\n        )}\n      </Flex>\n    </AccordionSubTitleContainer>\n  );\n};\n","import { typedAxios } from '@/api/typed-axios';\nimport { Category } from '@/model/ICategory';\nimport { OrderItem, TemporaryStaffOrderItem } from '@/model/IOrderItem';\nimport {\n  ITEPortal_Contracts_Enums_BuildingType,\n  ITEPortal_Domain_Dto_OrderDto,\n  ITEPortal_Domain_Dto_StandSummariesDto,\n} from '@/api';\nimport { useSearchCategoryForProduct } from '@/hooks/useSearchCategoryForProduct';\nimport { useNavigate } from '@tanstack/react-router';\nimport { CATEGORY_TYPES } from '@/constants/categorie';\nimport { ProductUtils } from '@/utils/product-utils';\nimport { standApi } from '@/store/effector/stand';\nimport { orderApi } from '@/store/effector/order';\nimport { loadingApi } from '@/store/effector/loading';\nimport { Product } from '@/model/IProduct';\n\nexport const useEditOrderLoader = ({\n  orderId,\n  exhibitionId,\n  stand,\n}: {\n  orderId: ITEPortal_Domain_Dto_OrderDto['orderId'];\n  exhibitionId: ITEPortal_Domain_Dto_OrderDto['exhibitionId'];\n  stand: ITEPortal_Domain_Dto_StandSummariesDto;\n}) => {\n  const { findCategoryForProduct } = useSearchCategoryForProduct();\n  const navigate = useNavigate();\n\n  const editOrder = async () => {\n    if (!orderId || !exhibitionId || !stand.currency) {\n      return;\n    }\n\n    loadingApi.on();\n\n    try {\n      let buildingType = stand.buildingType;\n\n      const orderDto = await typedAxios.order.getOrders1({\n        orderId: +orderId,\n      });\n\n      const { products: draftProducts, standId } = orderDto;\n\n      const data = await typedAxios.priceListItem.getPricelistItems({\n        exhibitionId: +exhibitionId,\n        currency: stand.currency,\n      });\n\n      const buildings = data.filter(\n        (p) => p.categoryName === CATEGORY_TYPES.SELECT_BUILDING\n      );\n\n      const orderedBuilding = buildings?.find((b) =>\n        draftProducts?.find((dp) => b.productName === dp.id)\n      );\n\n      if (orderedBuilding && Array.isArray(orderedBuilding.buildingTypes)) {\n        buildingType = Math.max(\n          ...orderedBuilding.buildingTypes\n        ) as ITEPortal_Contracts_Enums_BuildingType;\n      }\n\n      const productsInfo = data?.filter((product) => {\n        if (!Array.isArray(draftProducts)) {\n          return [];\n        }\n\n        const orderProductIds = draftProducts.map(\n          (draftProduct) => draftProduct.id\n        );\n\n        if (!product.productName) {\n          return false;\n        }\n\n        return orderProductIds.includes(product.productName);\n      });\n\n      if (!draftProducts) {\n        return;\n      }\n\n      const draftOrderedItems: Array<OrderItem> = [];\n\n      draftProducts.forEach((responseProduct) => {\n        const filteredProduct = productsInfo?.find(\n          (productInfo) => productInfo?.productName === responseProduct?.id\n        );\n\n        if (!filteredProduct) {\n          return;\n        }\n\n        const category =\n          findCategoryForProduct(filteredProduct?.categoryId) ||\n          new Category({\n            id: filteredProduct?.categoryName || '',\n            name: filteredProduct?.categoryName,\n            displayName: filteredProduct?.categoryDisplayName,\n          });\n\n        const product = responseProduct.included\n          ? Product.linkedFromJSON({ ...filteredProduct, category })\n          : ProductUtils.createProductFromPriceListItem(filteredProduct, {\n              category,\n            });\n\n        if (TemporaryStaffOrderItem.is(responseProduct)) {\n          draftOrderedItems.push(\n            TemporaryStaffOrderItem.fromJSON({\n              ...responseProduct,\n              product,\n            })\n          );\n        } else {\n          draftOrderedItems.push(\n            OrderItem.fromJSON({\n              ...responseProduct,\n              product,\n              included: !!responseProduct.included,\n              id: product.getProductId(),\n            })\n          );\n        }\n      });\n\n      console.log(draftOrderedItems);\n\n      if (draftOrderedItems.length > 0) {\n        orderApi.setState(draftOrderedItems);\n      }\n\n      orderApi.setOrderDto(orderDto);\n\n      standApi.setStandForOrder({ ...stand, buildingType });\n\n      navigate({\n        to: `/exhibitions/$exhibitionId/$stand/create`,\n        params: {\n          exhibitionId: exhibitionId,\n          stand: standId,\n        },\n      });\n    } finally {\n      loadingApi.off();\n    }\n  };\n\n  return {\n    editOrder,\n  };\n};\n","import { typedAxios } from '@/api/typed-axios';\nimport { ITEPortal_Domain_Dto_OrderDto } from '@/api';\nimport { useState } from 'react';\n\nexport const useGetOrderItems = () => {\n  const [orderLoading, setOrderLoading] = useState<boolean>(false);\n\n  const getOrderItems = async (\n    orderId: ITEPortal_Domain_Dto_OrderDto['orderId']\n  ) => {\n    if (!orderId) {\n      return;\n    }\n\n    setOrderLoading(true);\n\n    try {\n      const orders = await typedAxios.order.getOrders1({\n        orderId: +orderId,\n      });\n\n      const { products } = orders;\n\n      return products;\n    } finally {\n      setOrderLoading(false);\n    }\n  };\n\n  return { getOrderItems, orderLoading };\n};\n","import {\n  Button,\n  CardBody,\n  CardHeader,\n  FormControl,\n  FormErrorMessage,\n  Heading,\n  Input,\n  Stack,\n} from '@chakra-ui/react';\nimport { FieldValues, useForm } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport { useState } from 'react';\nimport { useNavigate } from '@tanstack/react-router';\nimport { VERIFY_EMAIL_PATH } from '@/features/Routing/RoutesConfig/authRoutesConfig';\nimport { Logo, StyledCard } from '@/pages/common/Auth.styled';\nimport fetchApi from '@/utils/fetchAPI';\nimport { LOGIN } from '@/constants/endpoints';\nimport { FetchMethods } from '@/utils/constants';\nimport { FormError } from '@/model/common';\nimport { LanguageSwitcher } from '@/components/LanguageSwitcher/LanguageSwitcher';\nimport { DEFAULT_LOGO_PATH } from '@/utils/constants';\nimport { loginRoute } from '../../features/Routing/auth';\nimport { authApi } from '@/store/effector/auth';\n\nconst LoginPage = (): JSX.Element => {\n  const { t } = useTranslation();\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [errors, setErrors] = useState<FormError>({});\n  const navigate = useNavigate();\n  const { redirect } = loginRoute.useSearch();\n  const culture = localStorage.getItem('lang');\n\n  const { register, handleSubmit } = useForm();\n\n  const submitHandler = async (values: FieldValues) => {\n    const email = values.email;\n\n    setIsSubmitting(true);\n\n    try {\n      await fetchApi(LOGIN, {\n        method: FetchMethods.Post,\n        data: {\n          email: email,\n        },\n        params: {\n          culture,\n        },\n      });\n\n      localStorage.removeItem('user');\n      authApi.addEmail(values.email);\n\n      navigate({\n        to: VERIFY_EMAIL_PATH,\n        search: {\n          redirect,\n        },\n      });\n    } catch (error) {\n      setErrors({ email: ['Email не зарегистрирован'] });\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  return (\n    <StyledCard>\n      <CardHeader>\n        <Logo src={DEFAULT_LOGO_PATH} alt=\"Logo\" />\n        <LanguageSwitcher />\n        <Heading size={{ base: 'xs', md: 'sm' }}>{t('welcomeAuth')}</Heading>\n        <Heading size={{ base: 'xs' }} fontWeight=\"400\" marginTop=\"7px\">\n          {t('loginTitle')}\n        </Heading>\n      </CardHeader>\n      <CardBody>\n        <form onSubmit={handleSubmit(submitHandler)}>\n          <Stack spacing=\"5\">\n            <FormControl isInvalid={!!errors['email']}>\n              <Input\n                type=\"email\"\n                placeholder={t('emailPlaceholder') as string}\n                {...register('email', { required: true })}\n              />\n              {errors['email'] && (\n                <FormErrorMessage>{errors['email'].join(' ')}</FormErrorMessage>\n              )}\n            </FormControl>\n            <Button type=\"submit\" isLoading={isSubmitting}>\n              {t('signIn')}\n            </Button>\n          </Stack>\n        </form>\n      </CardBody>\n    </StyledCard>\n  );\n};\n\nexport default LoginPage;\n","import Layout from '@/layout/Default';\nimport TechnicalServicesGrid from '@/components/TechnicalServicesGrid';\nimport { TKey } from '../../i18n/types';\n\ninterface CategoriesProps {\n  title?: TKey;\n}\n\nconst Categories: React.FC<CategoriesProps> = ({ title }) => {\n  return (\n    <Layout>\n      <TechnicalServicesGrid title={title} />\n    </Layout>\n  );\n};\n\nexport default Categories;\n","import { ContentInner, ContentWithSidebars } from '@/components/Content';\nimport { PageTitle } from '@/components/Typography/PageTitle';\nimport CategoriesSidebar from '@/components/Sidebar/CategoriesSidebar';\nimport Breadcrumbs from '@/components/Breadcrumbs';\nimport ServiceFactory from '@/components/Forms/Services/ServiceFactory';\nimport OrderListSidebar from '@/components/Sidebar/OrderList';\nimport styled from 'styled-components';\nimport { IBreadcrumbItem } from '@/model/common';\nimport { useTranslation } from 'react-i18next';\nimport { CREATE_EXHIBITION_ORDER_PATH } from '@/constants/router';\nimport { replacePaths } from '@/utils/route';\nimport { getBreadcrumbsByCategory } from '@/utils/breadcrumbs';\nimport Layout from '@/layout/Default';\nimport { useCategoriesByData } from '@/hooks/categoriesConverter/useCategoriesByData';\nimport { createExhibitionOrderServiceRoute } from '../../features/Routing/protected/exhibitions-by-role';\nimport { useCatalog } from '@/store/effector/catalog';\nimport { Loader } from '@/components/Loader/Loader';\n\nconst StyledContentInner = styled(ContentInner)`\n  padding: 26px 24px;\n`;\n\nconst Service = () => {\n  const { t } = useTranslation();\n  const { rootCategories, flatMap, isLoading } = useCatalog();\n\n  const exhibitionCategoriesObject = useCategoriesByData(rootCategories);\n  // const exhibitionSubCategoriesObject = useSubCategoriesByData(subCategories);\n  const { exhibitionId, stand, service } =\n    createExhibitionOrderServiceRoute.useParams();\n\n  const categoryInfo = flatMap.get(service); //useProductCategory(mergedCategories, service);\n  const category = categoryInfo;\n  const description = categoryInfo?.description || '';\n\n  if (isLoading) {\n    return <Loader centralized />;\n  }\n\n  if (!category) {\n    // todo update it\n    return <>not found</>;\n  }\n\n  const breadcrumbsItems = () => {\n    return [\n      {\n        label: t('technicalServices'),\n        link: replacePaths(CREATE_EXHIBITION_ORDER_PATH, {\n          ':exhibitionId': exhibitionId,\n          ':stand': stand,\n        }),\n      },\n      ...getBreadcrumbsByCategory(category, exhibitionId, stand),\n    ] as IBreadcrumbItem[];\n  };\n\n  return (\n    <Layout>\n      <CategoriesSidebar categories={exhibitionCategoriesObject} />\n      <OrderListSidebar />\n      <ContentWithSidebars>\n        <StyledContentInner>\n          <Breadcrumbs items={breadcrumbsItems()} />\n          <PageTitle>{category.displayName}</PageTitle>\n          <ServiceFactory\n            category={category}\n            description={description}\n            // subCategoryId={subCategory?.parent?.id}\n          />\n        </StyledContentInner>\n      </ContentWithSidebars>\n    </Layout>\n  );\n};\n\nexport default Service;\n","import { IExhibitionSummary } from '@/model/IExhibitionSummary';\nimport { isNil } from '@/utils/is-nil';\nimport { ExhibitionCard } from '@/components/Card/ExhibitionCard';\n\nimport styled from 'styled-components';\nimport { Link } from '@tanstack/react-router';\nimport { useExhibitionDetailedPreload } from './hooks/use-exhibition-detailed-preload';\nimport { Stack } from '@chakra-ui/react';\n\nconst ExhibitionsCardWrapper = styled(Link)`\n  width: 100%;\n  //min-width: 800px;\n  display: block;\n`;\n\nexport const ExhibitionsList = (props: {\n  exhibitions: IExhibitionSummary[];\n}) => {\n  const { preloadExhibition } = useExhibitionDetailedPreload();\n\n  return (\n    <Stack spacing={4}>\n      {props.exhibitions.map((exhibition, index) => {\n        const { exhibitionSummary, stands, orders } = exhibition;\n\n        if (isNil(exhibitionSummary)) {\n          return null;\n        }\n\n        const { logoUrl, name, id, place, description } = exhibitionSummary;\n\n        const subtitles = [\n          `${exhibition.formattedStartDate} - ${exhibition.formattedEndDate}`,\n          place,\n        ];\n\n        return (\n          <ExhibitionsCardWrapper\n            to={`/exhibitions/${id}`}\n            key={index}\n            onClick={() => preloadExhibition(exhibition)}\n          >\n            <ExhibitionCard\n              image={logoUrl || ''}\n              name={name || ''}\n              subtitles={subtitles || []}\n              description={description}\n              stands={stands}\n              orders={orders}\n            />\n          </ExhibitionsCardWrapper>\n        );\n      })}\n    </Stack>\n  );\n};\n","import {\n  SystemStyleObject,\n  Tab,\n  TabList,\n  TabPanel,\n  TabPanelProps,\n  TabPanels,\n  TabProps,\n  Tabs,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { useExhibitionLoader } from './hooks/use-exhibition-loader';\nimport { ExhibitionsList } from './ExhibitionsList';\n\nconst selectedTabStyles: SystemStyleObject = {\n  background: 'blackAlpha.300',\n};\nconst tabStyles: TabProps = {\n  background: 'blackAlpha.100',\n  minW: '100px',\n};\n\nconst tabPanelsStyle: TabPanelProps = {\n  width: '100%',\n  maxWidth: '800px',\n};\n\nexport const ExhibitionsTabs = (\n  props: Pick<ReturnType<typeof useExhibitionLoader>, 'exhibitions'>\n) => {\n  const {\n    exhibitions: { pastExhibitions, currentExhibitions },\n  } = props;\n\n  const { t } = useTranslation();\n\n  return (\n    <Tabs variant=\"unstyled\" align=\"center\" w=\"100%\">\n      <TabList>\n        <Tab\n          _selected={selectedTabStyles}\n          {...tabStyles}\n          borderTopLeftRadius=\"md\"\n          borderBottomLeftRadius=\"md\"\n        >\n          {t('current-exhibitions')}\n        </Tab>\n        <Tab\n          _selected={selectedTabStyles}\n          {...tabStyles}\n          borderTopRightRadius=\"md\"\n          borderBottomRightRadius=\"md\"\n        >\n          {t('past-exhibitions')}\n        </Tab>\n      </TabList>\n      <TabPanels>\n        <TabPanel {...tabPanelsStyle}>\n          <ExhibitionsList exhibitions={currentExhibitions} />\n        </TabPanel>\n        <TabPanel {...tabPanelsStyle}>\n          <ExhibitionsList exhibitions={pastExhibitions} />\n        </TabPanel>\n      </TabPanels>\n    </Tabs>\n  );\n};\n","import { Flex } from '@chakra-ui/react';\nimport { Content, ContentInner } from '@/components/Content';\nimport styled from 'styled-components';\nimport { CenteredPageTitle } from '@/components/Typography/PageTitle';\nimport { useTranslation } from 'react-i18next';\nimport Layout from '@/layout/Default';\nimport { Loader } from '@/components/Loader/Loader';\n\nimport { useExhibitionLoader } from './hooks/use-exhibition-loader';\nimport { ExhibitionsTabs } from './ExhibitionsTabs';\n\nconst ExhibitionsWrapper = styled(Flex)`\n  justify-content: center;\n  flex-direction: column;\n  align-items: center;\n  gap: 20px;\n  padding-bottom: 10px;\n`;\n\nexport const Profile = (): JSX.Element => {\n  const { t } = useTranslation();\n  const { exhibitions, isLoading } = useExhibitionLoader();\n\n  return (\n    <Layout>\n      <Content>\n        <ContentInner>\n          <ExhibitionsWrapper>\n            <CenteredPageTitle>{t('myExhibitions')}</CenteredPageTitle>\n\n            {isLoading ? (\n              <Loader />\n            ) : (\n              <ExhibitionsTabs exhibitions={exhibitions} />\n            )}\n          </ExhibitionsWrapper>\n        </ContentInner>\n      </Content>\n    </Layout>\n  );\n};\n","import { MarginType } from '@/model/common';\nimport { IExhibitionSummary } from '@/model/IExhibitionSummary';\nimport { typedAxios } from '@/api/typed-axios';\nimport { exhibitionApi } from '@/store/effector/exhibition';\nimport { IExhibition } from '@/model/IExhibition';\n\nexport function useExhibitionDetailedPreload() {\n  const preloadExhibition = async (exhibition: IExhibitionSummary) => {\n    if (!exhibition.exhibitionSummary?.id) {\n      return;\n    }\n\n    try {\n      const data = await typedAxios.exhibition.getExhibitions({\n        id: exhibition.exhibitionSummary.id,\n      });\n\n      const margins: MarginType = {\n        firstMargin: data.firstMargin,\n        firstMarginDate: data.firstMarginDate,\n        secondMargin: data.secondMargin,\n        secondMarginDate: data.secondMarginDate,\n        thirdMargin: data.thirdMargin,\n        thirdMarginDate: data.thirdMarginDate,\n      };\n\n      const exhibitionNewInstance = new IExhibition({\n        id: exhibition.exhibitionSummary.id,\n        ...exhibition,\n      });\n\n      exhibitionApi.prepare({\n        exhibitionName: exhibition.exhibitionSummary.name,\n        margin: margins,\n        sellingOfficeId: exhibition.sellingOfficeId || 0,\n        currency: exhibition.currency,\n        exhibitionId: exhibition.exhibitionSummary.id,\n        exhibition: exhibitionNewInstance,\n      });\n    } catch (error: any) {}\n  };\n\n  return {\n    preloadExhibition,\n  };\n}\n","import { useEffect, useState } from 'react';\nimport { typedAxios } from '../../../api/typed-axios';\nimport { ExhibitionUtils } from '../../../utils/exhibition-utils';\nimport { useBoolean } from '@chakra-ui/react';\nimport { IExhibitionSummary } from '../../../model/IExhibitionSummary';\n\nexport function useExhibitionLoader() {\n  const [exhibitions, setExhibitions] = useState<\n    ReturnType<typeof ExhibitionUtils.splitExhibitionByDate>\n  >({ currentExhibitions: [], pastExhibitions: [] });\n\n  const [isLoading, { off }] = useBoolean(true);\n\n  useEffect(() => {\n    const load = async () => {\n      try {\n        const response =\n          await typedAxios.exhibition.getExhibitionsExhibitorStatistics();\n\n        setExhibitions(\n          ExhibitionUtils.splitExhibitionByDate(\n            response.map((ex) => new IExhibitionSummary(ex))\n          )\n        );\n      } finally {\n        off();\n      }\n    };\n\n    load();\n  }, []);\n\n  return {\n    exhibitions,\n    isLoading,\n  };\n}\n","import { Content, ContentInner } from '@/components/Content';\nimport { PageTitleContainer } from '@/pages/Exhibition/Exhibition.styled';\nimport Layout from '@/layout/Default';\nimport { standProjectRoute } from '@/features/Routing/protected/exhibitions-by-role';\nimport { Box, Card, CardBody, Flex, Heading } from '@chakra-ui/react';\nimport { StandProjectImage } from './StandProjectImage';\nimport { StandProjectDescription } from '@/pages/StandProject/StandProjectDescription';\nimport { useTranslation } from 'react-i18next';\nimport { useExhibition } from '@/store/effector/exhibition';\nimport { Link } from '@tanstack/react-router';\nimport { ChevronLeftIcon } from '@chakra-ui/icons';\n\nexport const StandProject = () => {\n  const { exhibitionId } = standProjectRoute.useParams();\n  const { project } = standProjectRoute.useLoaderData();\n  const { t } = useTranslation();\n  const { exhibitionName } = useExhibition();\n\n  if (!project) {\n    return null;\n  }\n\n  return (\n    <Layout>\n      <Content>\n        <ContentInner>\n          <Box mt={8} ml={8}>\n            <Link to={`/exhibitions/${exhibitionId}`}>\n              <ChevronLeftIcon mr={2} />\n              {t('back-to-my-stands')}\n            </Link>\n          </Box>\n          <PageTitleContainer centered=\"true\" pt={0} mt={0} mb={8}>\n            {exhibitionName}\n          </PageTitleContainer>\n          <Flex justifyContent=\"center\">\n            <Card maxW={['90%', '80%']} maxH=\"80vh\" position=\"relative\">\n              <CardBody pl={12} pr={12} height=\"100%\">\n                <Heading mb={6} as=\"h2\" size=\"lg\">\n                  {t('stand-project')}\n                </Heading>\n                <Flex\n                  gap={project.projectImageUrl ? 12 : 0}\n                  height=\"calc(100% - 70px)\"\n                >\n                  <div style={{ flexBasis: '50%' }}>\n                    {project.projectImageUrl && (\n                      <StandProjectImage\n                        projectImageUrl={project.projectImageUrl}\n                      />\n                    )}\n                  </div>\n                  <div style={{ flexBasis: '50%' }}>\n                    {project && <StandProjectDescription project={project} />}\n                  </div>\n                </Flex>\n              </CardBody>\n            </Card>\n          </Flex>\n        </ContentInner>\n      </Content>\n    </Layout>\n  );\n};\n","import { AttachmentIcon, DeleteIcon } from '@chakra-ui/icons';\nimport { Box, Button } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { InputHTMLAttributes, useRef, useState } from 'react';\n\ntype AttachmentUploaderPropsType = {\n  onFileChange: (file: File) => void;\n};\n\nconst allowedMimeTypes = (\n  [\n    'image/*',\n    'application/pdf',\n    'application/vnd.ms-excel',\n    'application/msword',\n    'text/csv',\n    'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n  ] satisfies Array<InputHTMLAttributes<HTMLInputElement>['accept']>\n).join();\n\nexport const AttachmentUploader = (props: AttachmentUploaderPropsType) => {\n  const { t } = useTranslation();\n  const inputRef = useRef<HTMLInputElement>(null);\n  const [attachment, setAttachment] = useState<File | null>(null);\n\n  return (\n    <>\n      <input\n        ref={inputRef}\n        type=\"file\"\n        style={{ display: 'none' }}\n        accept={allowedMimeTypes}\n        multiple={false}\n        onChange={(event) => {\n          const file = event.target.files?.item(0);\n\n          if (file) {\n            setAttachment(file);\n\n            if (typeof props.onFileChange === 'function') {\n              props.onFileChange(file);\n            }\n          }\n        }}\n      />\n\n      {attachment?.name ? (\n        <Box\n          display=\"flex\"\n          flexDirection=\"row\"\n          justifyContent=\"flex-start\"\n          alignItems=\"center\"\n          mr=\"auto\"\n          color=\"red.500\"\n          fontSize=\"sm\"\n        >\n          <AttachmentIcon mr={2} />\n          {attachment.name}\n          <DeleteIcon ml={2} onClick={() => setAttachment(null)} />\n        </Box>\n      ) : (\n        <Button\n          size=\"sm\"\n          variant=\"ghost\"\n          colorScheme=\"red\"\n          mr=\"auto\"\n          onClick={() => {\n            inputRef.current?.click();\n          }}\n        >\n          {t('attach-file')} <AttachmentIcon ml={2} />\n        </Button>\n      )}\n    </>\n  );\n};\n","import { FormProvider, useForm } from 'react-hook-form';\nimport { TextArea } from '@/components/TextArea/TextArea';\nimport * as vali from 'zod';\nimport i18n from '@/i18n';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { Flex } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { AttachmentUploader } from '@/pages/StandProject/StandProjectDescription/AttachmentUploader';\nimport { toast } from 'react-toastify';\nimport { AsyncButton } from '@/components/AsyncButton';\nimport { typedAxios } from '@/api/typed-axios';\nimport { standProjectRoute } from '@/features/Routing/protected/exhibitions-by-role';\nimport { useRouter } from '@tanstack/react-router';\nimport { useState } from 'react';\n\nconst ValidationSchema = vali.object({\n  comment: vali.string().min(1, {\n    message: i18n.t('required-field'),\n  }),\n  file: vali.instanceof(File).optional(),\n});\n\ntype FormValues = vali.infer<typeof ValidationSchema>;\n\nexport const CommentForm = () => {\n  const { t } = useTranslation();\n  const { stand, projectId } = standProjectRoute.useParams();\n  const router = useRouter();\n  const [uploaderKey, setUploaderKey] = useState<number | null>(null);\n\n  const formInstance = useForm<FormValues>({\n    resolver: zodResolver(ValidationSchema),\n  });\n\n  const handleSubmit = async (values: FormValues) => {\n    try {\n      const changeId = await typedAxios.stand.postStandsProjectChanges({\n        standId: +stand,\n        projectId: +projectId,\n        requestBody: {\n          comment: values.comment,\n        },\n      });\n\n      if (values.file instanceof File) {\n        await typedAxios.stand.putStandsProjectChanges({\n          changesId: +changeId,\n          projectId: +projectId,\n          standId: +stand,\n          formData: {\n            file: values.file,\n          },\n        });\n      }\n\n      setUploaderKey(changeId);\n\n      router.invalidate();\n\n      formInstance.reset({\n        comment: '',\n      });\n      toast.success(t('saved'));\n    } catch {\n      toast.error(t('error-occurred'));\n    }\n  };\n\n  const approveProject = async () => {\n    try {\n      await typedAxios.stand.postStandsUpdateProjectStatus({\n        projectId: +projectId,\n        standId: +stand,\n        requestBody: {\n          standStatus: true,\n        },\n      });\n\n      router.invalidate();\n\n      toast.success(t('saved'));\n    } catch {\n      toast.error(t('error-occurred'));\n    }\n  };\n\n  return (\n    <FormProvider {...formInstance}>\n      <Flex direction=\"column\" mt=\"auto\">\n        <TextArea<FormValues>\n          label={`${t('stand-change-request-label')}:`}\n          name=\"comment\"\n        />\n\n        <Flex direction=\"row\" gap={4} justifyContent=\"flex-end\" mt={4}>\n          <AttachmentUploader\n            key={uploaderKey}\n            onFileChange={(file) => {\n              formInstance.setValue('file', file);\n            }}\n          />\n          <AsyncButton\n            size=\"sm\"\n            variant=\"outline\"\n            colorScheme=\"red\"\n            onClick={formInstance.handleSubmit(handleSubmit)}\n          >\n            {t('request-changes')}\n          </AsyncButton>\n          <AsyncButton\n            size=\"sm\"\n            variant=\"solid\"\n            colorScheme=\"red\"\n            onClick={approveProject}\n          >\n            {t('approve-project')}\n          </AsyncButton>\n        </Flex>\n      </Flex>\n    </FormProvider>\n  );\n};\n","import { Flex, Text } from '@chakra-ui/react';\nimport { HistoryItem } from '@/pages/StandProject/StandProjectDescription/HistoryItem';\nimport { useTranslation } from 'react-i18next';\nimport {\n  type ITEPortal_Domain_Dto_Stand_GetStandProjectChangesDto,\n  type ITEPortal_Domain_Dto_Stand_GetStandProjectDto,\n} from '@/api';\n\nimport { CustomScroll } from 'react-custom-scroll';\nimport { DateUtils } from '@/utils/date-utils';\n\ntype CommentsHistoryPropsType = {\n  comments?: ITEPortal_Domain_Dto_Stand_GetStandProjectDto['projectChangesHistory'];\n  ownershipResolver?: (\n    historyItem: ITEPortal_Domain_Dto_Stand_GetStandProjectChangesDto\n  ) => boolean;\n};\n\nexport const CommentsHistory = (props: CommentsHistoryPropsType) => {\n  const { comments, ownershipResolver } = props;\n  const { t } = useTranslation();\n\n  if (!Array.isArray(comments) || comments.length === 0) {\n    return null;\n  }\n\n  const sortedComments =\n    DateUtils.sortByDateAddedDescending<ITEPortal_Domain_Dto_Stand_GetStandProjectChangesDto>(\n      comments\n    );\n\n  return (\n    <Flex flexDirection=\"column\" maxHeight=\"calc(100% - 250px)\">\n      <Text fontWeight={500} mb={4}>\n        {t('stand-changes-history')}:\n      </Text>\n\n      <CustomScroll heightRelativeToParent=\"100%\">\n        <Flex flexDirection=\"column\" gap={4}>\n          {sortedComments.map((historyItem, index) => (\n            <HistoryItem\n              key={index}\n              historyItem={historyItem}\n              ownershipResolver={ownershipResolver}\n            />\n          ))}\n        </Flex>\n      </CustomScroll>\n    </Flex>\n  );\n};\n","import { Flex, Text } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { DateUtils } from '@/utils/date-utils';\nimport { useAuth } from '@/store/effector/auth';\nimport { DownloadFileLink } from '@/components/DownloadFileLink';\nimport { useMemo } from 'react';\nimport { ITEPortal_Domain_Dto_Stand_GetStandProjectChangesDto } from '@/api';\n\ntype HistoryItemPropsType = {\n  historyItem: ITEPortal_Domain_Dto_Stand_GetStandProjectChangesDto;\n  ownershipResolver?: (\n    historyItem: ITEPortal_Domain_Dto_Stand_GetStandProjectChangesDto\n  ) => boolean;\n};\n\nexport const HistoryItem = (props: HistoryItemPropsType) => {\n  const { t } = useTranslation();\n  const { user } = useAuth();\n  const { historyItem, ownershipResolver } = props;\n  const ownershipLabel =\n    typeof ownershipResolver === 'function' ? t('exhibitor') : t('you');\n  const postedByCurrentUser = useMemo(() => {\n    if (typeof ownershipResolver === 'function') {\n      return ownershipResolver(historyItem);\n    }\n\n    return historyItem.createdBy === user?.id;\n  }, [ownershipResolver, user, historyItem]);\n\n  if (!historyItem) {\n    return null;\n  }\n\n  return (\n    <Flex\n      flexDirection=\"column\"\n      background=\"gray.100\"\n      padding={4}\n      borderRadius=\"md\"\n    >\n      <Text color={postedByCurrentUser ? 'red' : 'gray.600'} fontWeight={500}>\n        {postedByCurrentUser ? ownershipLabel : t('technical-manager')}\n      </Text>\n      <Text fontSize={14} color=\"gray.600\">\n        {historyItem.comment}\n      </Text>\n      {historyItem.attachmentUrl && (\n        <DownloadFileLink attachmentUrl={historyItem.attachmentUrl} />\n      )}\n      {historyItem.createdAt && (\n        <Text fontSize={12} color=\"gray.400\" marginLeft=\"auto\">\n          {DateUtils.format(historyItem.createdAt, 'DD.MM.YYYY HH:mm:ss')}\n        </Text>\n      )}\n    </Flex>\n  );\n};\n","import { Flex, Heading, Text } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { CommentForm } from '@/pages/StandProject/StandProjectDescription/CommentForm';\nimport { CommentsHistory } from '@/pages/StandProject/StandProjectDescription/CommentsHistory';\nimport { ITEPortal_Domain_Dto_Stand_GetStandProjectDto } from '@/api';\n\ntype ProjectDescriptionPropsType = Pick<\n  ITEPortal_Domain_Dto_Stand_GetStandProjectDto,\n  'projectDescription' | 'projectChangesHistory' | 'approved'\n>;\n\nexport const ProjectDescription = (props: ProjectDescriptionPropsType) => {\n  const { projectDescription, projectChangesHistory, approved } = props;\n  const { t } = useTranslation();\n\n  return (\n    <Flex flexDirection=\"column\" gap={4} height=\"100%\">\n      {projectDescription && (\n        <>\n          <Heading as=\"h2\" size=\"sm\" noOfLines={1}>\n            {t('project-tech-manager-comment-title')}\n          </Heading>\n          <Text>{projectDescription}</Text>\n        </>\n      )}\n\n      <CommentsHistory comments={projectChangesHistory} />\n      {!approved && <CommentForm />}\n    </Flex>\n  );\n};\n","import { Flex } from '@chakra-ui/react';\nimport { ProjectDescription } from '@/pages/StandProject/StandProjectDescription/ProjectDescription';\nimport { ITEPortal_Domain_Dto_Stand_GetStandProjectDto } from '@/api';\n\ntype StandProjectDescriptionPropsType = {\n  project: ITEPortal_Domain_Dto_Stand_GetStandProjectDto;\n};\nexport const StandProjectDescription = (\n  props: StandProjectDescriptionPropsType\n) => {\n  const { project } = props;\n\n  if (!project) {\n    return null;\n  }\n\n  const { projectDescription } = project;\n\n  return (\n    <Flex flexDirection=\"column\" height=\"100%\">\n      <ProjectDescription\n        projectDescription={projectDescription}\n        projectChangesHistory={project.projectChangesHistory}\n        approved={project.approved}\n      />\n    </Flex>\n  );\n};\n","import styled from 'styled-components';\n\nexport const ProjectImage = styled.img`\n  height: auto;\n  width: 100%;\n  cursor: pointer;\n  max-width: 700px;\n  cursor: pointer;\n`;\n","import { Button, Flex } from '@chakra-ui/react';\nimport { ProjectImage } from '@/pages/StandProject/StandProjectImage/StandProjectImage.styled';\nimport Lightbox from 'yet-another-react-lightbox';\nimport Download from 'yet-another-react-lightbox/plugins/download';\nimport { useState } from 'react';\nimport { FileUtils } from '@/utils/file-utils';\nimport { useTranslation } from 'react-i18next';\nimport { ITEPortal_Domain_Dto_Stand_GetStandProjectDto } from '@/api';\n\ntype StandProjectImagePropsType = Pick<\n  ITEPortal_Domain_Dto_Stand_GetStandProjectDto,\n  'projectImageUrl'\n>;\n\nexport const StandProjectImage = (props: StandProjectImagePropsType) => {\n  const { projectImageUrl } = props;\n  const [open, setOpen] = useState(false);\n  const { t } = useTranslation();\n\n  if (!projectImageUrl) {\n    return null;\n  }\n\n  const fileExtension = projectImageUrl.split('.').at(-1)?.toUpperCase();\n  const fileName = projectImageUrl.split('/').at(-1);\n\n  return (\n    <Flex flexDirection=\"column\" maxW=\"100%\" gap={6}>\n      {props.projectImageUrl && (\n        <ProjectImage\n          src={props.projectImageUrl}\n          onClick={() => setOpen(true)}\n        />\n      )}\n      <Button\n        width=\"fit-content\"\n        size=\"sm\"\n        onClick={() => {\n          if (fileName) {\n            FileUtils.saveUrlAsFile(projectImageUrl, fileName);\n          }\n        }}\n      >\n        {t('download-file')}, {fileExtension}\n      </Button>\n      <Lightbox\n        open={open}\n        close={() => setOpen(false)}\n        index={0}\n        slides={[\n          {\n            src: projectImageUrl,\n          },\n        ]}\n        animation={{ fade: 0 }}\n        controller={{ closeOnPullDown: true, closeOnBackdropClick: true }}\n        styles={{ root: { '--yarl__color_backdrop': 'rgba(0, 0, 0, .7)' } }}\n        plugins={[Download]}\n        download={{\n          download: ({ slide }) => {\n            FileUtils.saveUrlToBlob(slide.src);\n          },\n        }}\n      />\n    </Flex>\n  );\n};\n","import React, { useState } from 'react';\nimport {\n  Button,\n  CardBody,\n  CardHeader,\n  Heading,\n  HStack,\n  PinInput,\n  PinInputField,\n  Stack,\n  FormControl,\n  FormErrorMessage,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { FieldValues, useForm } from 'react-hook-form';\nimport { Logo, StyledCard } from '@/pages/common/Auth.styled';\nimport { Timer } from '@/components/Timer/Timer';\nimport fetchApi from '@/utils/fetchAPI';\nimport { CODE_VERIFY } from '@/constants/endpoints';\nimport { DEFAULT_LOGO_PATH, FetchMethods } from '@/utils/constants';\nimport { useNavigate } from '@tanstack/react-router';\nimport { FormError, IdType } from '@/model/common';\nimport { User } from '@/model/IUser';\nimport { indexRouteFactory } from '@/features/Routing/userPaths';\nimport { LanguageSwitcher } from '@/components/LanguageSwitcher/LanguageSwitcher';\nimport { verifyEmailRoute } from '@/features/Routing/auth';\nimport { authApi, useAuth } from '@/store/effector/auth';\n\ninterface VerifyEmailPageProps {\n  pinLength?: number;\n}\n\nexport type OfficeType = {\n  currency: string;\n  id: IdType;\n  location: string;\n  name: string;\n};\n\nconst VerifyEmailPage: React.FC<VerifyEmailPageProps> = ({ pinLength = 4 }) => {\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const authInfo = useAuth();\n  const { redirect } = verifyEmailRoute.useSearch();\n  const [errors, setErrors] = useState<FormError>({});\n  const navigate = useNavigate();\n\n  const { t } = useTranslation();\n\n  const methods = useForm();\n\n  const submitHandler = async (values: FieldValues) => {\n    const code = (values.code as string[]).join('');\n    const userEmail = authInfo.userEmail;\n\n    setIsSubmitting(true);\n\n    try {\n      const { data } = await fetchApi(CODE_VERIFY, {\n        method: FetchMethods.Post,\n        data: {\n          email: userEmail,\n          code: code,\n        },\n      });\n\n      const currentUser = new User({\n        fullName: data?.name,\n        role: data?.role,\n        id: data?.id,\n      });\n\n      localStorage.setItem('token', data?.token);\n      localStorage.setItem('user', JSON.stringify(currentUser));\n\n      authApi.setUser(currentUser);\n      authApi.setIsLoggedIn(true);\n      authApi.setToken(data?.token);\n\n      // dispatch(clearProducts());\n\n      const indexRoute = (() => {\n        if (redirect) {\n          return redirect;\n        }\n\n        if (currentUser.role) {\n          return indexRouteFactory(currentUser.role);\n        }\n\n        return '/';\n      })();\n\n      navigate({\n        to: indexRoute,\n      });\n    } catch (error) {\n      setErrors({ verify: ['Неверный код доступа'] });\n    } finally {\n      setIsSubmitting(false);\n    }\n  };\n\n  const setValues = (values: string) => {\n    const codeValues = Array.from(values);\n\n    Object.values(codeValues).forEach((field, index) => {\n      const fieldName = `code.${index}`;\n\n      methods.setValue(fieldName, field);\n    });\n  };\n\n  return (\n    <StyledCard>\n      <CardHeader>\n        <Logo src={DEFAULT_LOGO_PATH} alt=\"Logo\" />\n        <LanguageSwitcher />\n        <Heading size={{ base: 'xs', md: 'sm' }}>{t('welcomeAuth')}</Heading>\n        <Heading size={{ base: 'xs' }} fontWeight=\"400\" marginTop=\"7px\">\n          {t('verifyEmailAddress')}\n        </Heading>\n      </CardHeader>\n      <CardBody>\n        <form onSubmit={methods.handleSubmit(submitHandler)}>\n          <FormControl isInvalid={!!errors['verify']}>\n            <Stack spacing=\"5\">\n              <HStack marginLeft=\"auto\" marginRight=\"auto\">\n                <PinInput\n                  type=\"number\"\n                  onComplete={(values) => setValues(values)}\n                >\n                  {new Array(pinLength).fill(undefined).map((_, index) => (\n                    <PinInputField\n                      key={index}\n                      {...methods.register(`code.${index}`)}\n                    />\n                  ))}\n                </PinInput>\n              </HStack>\n              {errors['verify'] && (\n                <FormErrorMessage justifyContent=\"center\">\n                  {errors['verify'].join(' ')}\n                </FormErrorMessage>\n              )}\n              <Button type=\"submit\" isLoading={isSubmitting}>\n                {t('confirm')}\n              </Button>\n\n              <Timer sec={59} />\n            </Stack>\n          </FormControl>\n        </form>\n      </CardBody>\n    </StyledCard>\n  );\n};\n\nexport default VerifyEmailPage;\n","import styled from 'styled-components';\nimport { Card, Image } from '@chakra-ui/react';\n\nexport const StyledCard = styled(Card)`\n  max-width: 450px;\n  width: 100%;\n\n  .chakra-card__body {\n    padding: 0 40px 36px;\n  }\n\n  .chakra-card__header {\n    padding-top: 48px;\n    text-align: center;\n  }\n\n  .chakra-button {\n    margin-top: 32px;\n  }\n`;\n\nexport const Logo = styled(Image)`\n  width: auto;\n  margin-bottom: 1.5rem;\n  margin-left: auto;\n  margin-right: auto;\n  height: 120px;\n  object-fit: contain;\n`;\n","import { User } from '@/model/IUser';\nimport { IdType } from '@/model/common';\nimport { persist, StorageAdapter } from 'effector-storage';\nimport { createApi, createDomain, sample } from 'effector';\nimport { produce } from 'immer';\nimport { useUnit } from 'effector-react';\n\ntype TokenType = null | IdType;\n\ninterface State {\n  isLoggedIn: boolean;\n  user: null | User;\n  userEmail: string;\n  token: TokenType;\n}\n\nconst initialState: State = {\n  isLoggedIn: false,\n  user: null,\n  userEmail: '',\n  token: localStorage.getItem('token') || null,\n};\n\nconst auth = createDomain('auth');\n\nexport const $auth = auth.createStore<State>(initialState, { name: 'auth' });\n\nconst adapter: StorageAdapter = (key) => ({\n  get: () => {\n    const state = localStorage.getItem(key);\n\n    if (!state) {\n      return initialState;\n    }\n\n    try {\n      const deserialized = JSON.parse(state);\n\n      if (deserialized.user) {\n        deserialized.user = new User({\n          ...deserialized.user,\n        });\n      }\n\n      return deserialized;\n    } catch {\n      return initialState;\n    }\n  },\n  set: (value) => localStorage.setItem(key, JSON.stringify(value)),\n});\n\npersist({\n  store: $auth,\n  adapter: adapter,\n});\n\nexport const authApi = createApi($auth, {\n  addEmail: (state, payload: string) => {\n    return produce(state, (draft) => {\n      draft.userEmail = payload;\n    });\n  },\n  setUser: (state, payload: null | User) => {\n    return produce(state, (draft) => {\n      draft.user = payload;\n    });\n  },\n  setIsLoggedIn: (state, payload: boolean) => {\n    return produce(state, (draft) => {\n      draft.isLoggedIn = payload;\n    });\n  },\n  setToken: (state, payload: TokenType) => {\n    return produce(state, (draft) => {\n      draft.token = payload;\n    });\n  },\n\n  logout: () => initialState,\n});\n\nsample({\n  clock: authApi.logout,\n  target: auth.createEffect('auth/cleanup', {\n    handler: async () => {\n      console.log('auth clean up');\n      try {\n        localStorage.clear();\n        window.location.href = '/login';\n      } catch (e) {\n        console.warn(e);\n      }\n    },\n  }),\n});\n\nexport const useAuth = () => useUnit($auth);\n","import { createGate, useGate } from 'effector-react';\nimport { PropsWithChildren } from 'react';\n\nexport const CatalogGate = createGate('catalog-gate');\n\nexport const CatalogGateHOC = (props: PropsWithChildren) => {\n  useGate(CatalogGate);\n\n  return <>{props.children}</>;\n};\n","import { Category } from '@/model/ICategory';\nimport { createApi, createEffect, createStore } from 'effector';\nimport { produce } from 'immer';\nimport { useUnit } from 'effector-react';\nimport { queryClient } from '@/features/query';\nimport { leaveExhibitionOrderEvent } from '@/store/effector/cleanup';\nimport { QueryOptions } from '@/features/query/query-options';\nimport { CategoryQueryOptionsType } from '@/features/query/query-options/types';\n\ntype CatalogStateType = {\n  rootCategories: Category[];\n  flatMap: Map<string, Category>;\n  isLoading: boolean;\n};\n\nconst initialState: CatalogStateType = {\n  rootCategories: [],\n  flatMap: new Map<string, Category>(),\n  isLoading: true,\n};\n\nexport const $catalog = createStore<CatalogStateType>(initialState).reset(\n  leaveExhibitionOrderEvent\n);\n\nconst catalogApi = createApi($catalog, {\n  updateCategories: (\n    state,\n    payload: Pick<CatalogStateType, 'rootCategories' | 'flatMap'>\n  ) => {\n    return produce(state, (draft) => {\n      draft.rootCategories = payload.rootCategories;\n      draft.flatMap = payload.flatMap;\n      draft.isLoading = false;\n    });\n  },\n});\n\nexport const loadCategoriesFX = createEffect(\n  async (opts: CategoryQueryOptionsType) => {\n    const data = await queryClient.ensureQueryData(\n      QueryOptions.loadCategoriesQueryOptions(opts)\n    );\n\n    const sortedCategories = data.map((category) => new Category(category));\n\n    const flatMap = new Map<string, Category>();\n\n    sortedCategories.forEach((ct) => {\n      flatMap.set(ct.name, ct);\n    });\n\n    sortedCategories.forEach((ct) => {\n      if (ct.parentCategoryId && flatMap.get(ct.parentCategoryId)) {\n        ct.parent = flatMap.get(ct.parentCategoryId);\n        flatMap.get(ct.parentCategoryId)?.tree.push(ct);\n      }\n    });\n\n    const rootCategories = [...flatMap.values()].filter(\n      (ct) => !ct.parentCategoryId\n    );\n\n    catalogApi.updateCategories({\n      rootCategories: rootCategories,\n      flatMap: flatMap,\n    });\n  }\n);\n\nexport const useCatalog = () => {\n  const state = useUnit($catalog);\n\n  return {\n    ...state,\n    isEmpty: state.rootCategories.length === 0,\n  };\n};\n\nexport const useCatalogLoading = () => {\n  return useUnit(loadCategoriesFX.inFlight);\n};\n","import { createEvent } from 'effector';\n\nexport const leaveExhibitionOrderEvent = createEvent();\n\nleaveExhibitionOrderEvent.watch(() => {\n  console.log('leaveExhibitionOrderEvent');\n});\n","import { createApi, createStore } from 'effector';\nimport { OptionType, SystemLangType } from '@/model/common';\nimport { produce } from 'immer';\nimport { useUnit } from 'effector-react/compat';\n\ntype CommonState = {\n  categoryOptions: OptionType[];\n  lang: SystemLangType;\n};\n\nconst $common = createStore<CommonState>({\n  categoryOptions: [],\n  lang:\n    (localStorage.getItem('lang') as SystemLangType) ||\n    (navigator.language as SystemLangType),\n});\n\nexport const commonApi = createApi($common, {\n  setCategoryOptions: (state, payload: OptionType[]) => {\n    return produce(state, (draft) => {\n      draft.categoryOptions = payload;\n    });\n  },\n\n  setLanguage: (state, payload: SystemLangType) => {\n    return produce(state, (draft) => {\n      draft.lang = payload;\n    });\n  },\n});\n\nexport const useCommonStore = () => useUnit($common);\n","import { IdType, MarginType } from '@/model/common';\nimport { Nullable } from '@/types/support-types';\nimport { createApi, createStore } from 'effector';\nimport { produce } from 'immer';\nimport { useUnit } from 'effector-react';\nimport { leaveExhibitionOrderEvent } from '@/store/effector/cleanup';\nimport { typedObjectKeys } from '@/utils/typed-object-keys';\nimport { IExhibition } from '@/model/IExhibition';\n\ntype InitialState = {\n  margin: MarginType;\n  currency: Nullable<string>;\n  exhibitionName: Nullable<string>;\n  sellingOfficeId: IdType;\n  exhibitionId: IdType;\n  exhibition: IExhibition | null;\n  eventEditionId?: IdType | null;\n};\n\nexport const exhibitionInitialState: InitialState = {\n  exhibitionName: '',\n  margin: {\n    firstMargin: null,\n    firstMarginDate: null,\n    secondMargin: undefined,\n    secondMarginDate: undefined,\n    thirdMargin: undefined,\n    thirdMarginDate: undefined,\n  },\n  currency: null,\n  sellingOfficeId: 0,\n  exhibitionId: 0,\n  exhibition: null,\n  eventEditionId: null,\n};\n\nexport const $exhibition = createStore<InitialState>(\n  exhibitionInitialState\n).reset(leaveExhibitionOrderEvent);\n\nexport const exhibitionApi = createApi($exhibition, {\n  prepare: (state, payload: InitialState) => {\n    return produce(state, (draft) => {\n      draft.exhibitionName = payload.exhibitionName;\n      draft.margin = payload.margin;\n      draft.sellingOfficeId = payload.sellingOfficeId;\n      draft.currency = payload.currency;\n      draft.exhibitionId = payload.exhibitionId;\n    });\n  },\n\n  update: (state, payload: Partial<InitialState>) => {\n    return produce(state, (draft) => {\n      typedObjectKeys(payload).forEach((key) => {\n        if (key && payload[key] && payload[key] !== undefined) {\n          // @ts-expect-error fix types\n          draft[key] = payload[key];\n        }\n      });\n    });\n  },\n\n  setName: (state, payload: string) => {\n    return produce(state, (draft) => {\n      draft.exhibitionName = payload;\n    });\n  },\n\n  setEventEditionId: (state, payload: number | null) => {\n    return produce(state, (draft) => {\n      draft.eventEditionId = payload;\n    });\n  },\n\n  setInstance: (state, payload: IExhibition | null) => {\n    return produce(state, (draft) => {\n      draft.exhibition = payload;\n    });\n  },\n});\n\nexport const useExhibition = () => useUnit($exhibition);\n","import { merge, sample } from 'effector';\nimport { $catalog, loadCategoriesFX } from '@/store/effector/catalog';\nimport { $stand } from '@/store/effector/stand';\nimport {\n  $exhibition,\n  exhibitionInitialState,\n} from '@/store/effector/exhibition';\nimport { persist as persistLocal } from 'effector-storage/local';\nimport { persist as persistAbstract } from 'effector-storage';\nimport { isNil } from '@/utils/is-nil';\nimport { createLogger } from '@/store/effector/logger';\nimport { $order } from '@/store/effector/order';\n// import { $auth } from '@/store/effector/auth';\nimport { CatalogGate } from '@/store/effector/catalog-gate';\nimport { $vatSettings } from '@/store/effector/vat-settings';\nimport { StorageAdapter } from 'effector-storage';\nimport { $orderCompleteness } from '@/store/effector/order-completeness';\n\nconst merged = merge([$stand, $exhibition, CatalogGate.open]);\n\nsample({\n  clock: merged,\n  target: loadCategoriesFX,\n  fn: () => {\n    const stand = $stand.getState();\n    const exhibition = $exhibition.getState();\n\n    return {\n      buildingType: stand.standForOrder.buildingType,\n      exhibitionId: exhibition.exhibitionId,\n      sellingOfficeId: exhibition.sellingOfficeId,\n      currency: exhibition.currency,\n    };\n  },\n  filter: () => {\n    const stand = $stand.getState();\n    const exhibition = $exhibition.getState();\n\n    return (\n      CatalogGate.status.getState() &&\n      !isNil(stand.standForOrder.buildingType) &&\n      !isNil(exhibition.exhibitionId) &&\n      !isNil(exhibition.sellingOfficeId)\n    );\n  },\n});\n\nconst exhibitionAdapter: StorageAdapter = (key) => ({\n  get: () => {\n    const state = localStorage.getItem(key);\n\n    if (!state) {\n      return exhibitionInitialState;\n    }\n\n    try {\n      const deserialized = JSON.parse(state);\n\n      // commented for now, should be tested in production\n      // for now - just load exhibition each time route matched\n      // if (deserialized.exhibition) {\n      //   deserialized.exhibition = IExhibition.fromJSON(deserialized.exhibition);\n      // }\n\n      // console.log(deserialized);\n\n      return deserialized;\n    } catch {\n      return exhibitionInitialState;\n    }\n  },\n  set: (value) => localStorage.setItem(key, JSON.stringify(value)),\n});\n\npersistAbstract({\n  store: $exhibition,\n  key: 'exhibition',\n  adapter: exhibitionAdapter,\n});\n\npersistLocal({\n  store: $stand,\n  key: 'stand',\n  sync: 'force',\n});\n\ncreateLogger({\n  // $auth,\n  $stand,\n  $order,\n  $exhibition,\n  $catalog,\n  loadCategoriesFX: loadCategoriesFX,\n  $vatSettings,\n  $orderCompleteness,\n});\n","import { createApi, createStore } from 'effector';\nimport { useUnit } from 'effector-react';\n\nconst $loading = createStore<boolean>(false);\n\nexport const loadingApi = createApi($loading, {\n  on: () => true,\n  off: () => false,\n  toggle: (state) => !state,\n});\n\nexport const useAppLoading = () => useUnit($loading);\n","import { Store, EventCallable, is, Effect } from 'effector';\n\ntype LogType = '$' | 'ev' | 'fx' | string;\n\nconst fontFamily =\n  'font-family: \"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",\"Android Emoji\",\"EmojiOne Mozilla\",\"Twemoji Mozilla\",\"Noto Emoji\",\"Segoe UI Symbol\",EmojiSymbols,emoji;';\n\nconst log = (type: LogType, ...args: any[]) => {\n  const [name, ...rest] = args;\n\n  console.groupCollapsed('%c☄️', fontFamily, type, name);\n  console.log(...rest);\n  console.groupEnd();\n};\n\nexport const createLogger = (\n  units: Record<string, Store<any> | EventCallable<any> | Effect<any, any, any>>\n) => {\n  if (process.env.NODE_ENV !== 'development') {\n    return;\n  }\n\n  Object.entries(units).forEach(([name, unit]) => {\n    if (is.effect(unit)) {\n      unit.pending.watch((pending) => {\n        log('fx', `${name} -> pending`, pending);\n      });\n\n      unit.done.watch(({ params, result }) => {\n        log('fx', `${name} -> done`, { params, result });\n      });\n\n      return;\n    }\n\n    unit.watch((s) => {\n      switch (true) {\n        case is.store(unit): {\n          log('$', name, s);\n          break;\n        }\n\n        case is.event(unit): {\n          log('ev', name, s);\n          break;\n        }\n\n        default:\n          log('untyped', name, s);\n      }\n    });\n  });\n};\n","import { $order } from '@/store/effector/order';\nimport { useUnit } from 'effector-react';\n\nexport const $orderCompleteness = $order.map(({ items }) => {\n  const itemsWithDependencies = items.filter(\n    (it) => it.product.hasLinkedProducts\n  );\n\n  if (itemsWithDependencies.length === 0) {\n    return [];\n  }\n\n  const allOrderItemsIds = items.map((item) => item.product.getProductId());\n\n  return itemsWithDependencies\n    .filter((productWithDeps) => {\n      const depsIDS =\n        productWithDeps.product.linkedProducts?.map((pr) =>\n          pr.getProductId()\n        ) || [];\n\n      return !depsIDS.every((dependencyId) =>\n        allOrderItemsIds.includes(dependencyId)\n      );\n    })\n    .map((productWithDeps) => {\n      return {\n        productId: productWithDeps.product.getProductId(),\n        outstandingDeps: productWithDeps.product.linkedProducts?.filter(\n          (dep) => !allOrderItemsIds.includes(dep.getProductId())\n        ),\n      };\n    });\n});\n\nexport const useOrderCompleteness = () => {\n  const incompleteItemsDueToDependency = useUnit($orderCompleteness);\n\n  return {\n    isOrderCompleted: incompleteItemsDueToDependency.length === 0,\n    incompleteItemsDueToDependency,\n  };\n};\n","import { BuildingTypeInfo } from '@/model/common';\nimport { createApi, createEffect, createStore, sample } from 'effector';\nimport { produce } from 'immer';\nimport { persist } from 'effector-storage';\nimport { useUnit } from 'effector-react';\nimport {\n  ITEPortal_Contracts_Enums_BuildingType,\n  ITEPortal_Domain_Dto_OrderDto,\n} from '@/api';\nimport {\n  IOrderItem,\n  OrderItem,\n  TemporaryStaffOrderItem,\n} from '@/model/IOrderItem';\nimport { Order } from '@/model/IOrder';\nimport { CATEGORY_TYPES } from '@/constants/categorie';\nimport { standApi } from '@/store/effector/stand';\nimport { leaveExhibitionOrderEvent } from '@/store/effector/cleanup';\nimport i18n from '@/i18n';\n\nexport type ChangeItemPayload = {\n  id: IOrderItem['id'];\n  amount: number;\n  product: IOrderItem['product'];\n};\n\nexport type InitialState = {\n  items: Array<OrderItem | TemporaryStaffOrderItem>;\n  buildings: BuildingTypeInfo[];\n  orderDto?: ITEPortal_Domain_Dto_OrderDto | null;\n};\n\nconst initialState: InitialState = {\n  items: [],\n  buildings: [],\n  orderDto: null,\n};\n\nexport const $order = createStore<InitialState>(initialState).reset(\n  leaveExhibitionOrderEvent\n);\n\nconst adapter = (\n  // @ts-expect-error desc\n  key\n) => ({\n  get: () => {\n    const state = localStorage.getItem(key);\n\n    if (!state) {\n      return initialState;\n    }\n\n    try {\n      const deserialized = JSON.parse(state);\n\n      return Order.fromJSON(deserialized);\n    } catch {\n      return initialState;\n    }\n  },\n  set: (value: InitialState) => {\n    return localStorage.setItem(key, JSON.stringify(value));\n  },\n});\n\npersist({\n  store: $order,\n  key: 'order',\n  adapter,\n});\n\nexport const orderApi = createApi($order, {\n  addItem: (state, payload: OrderItem) => {\n    return produce(state, (draft) => {\n      draft.items.push(payload);\n    });\n  },\n  /**\n   * @description test covered by OE-3\n   */\n  addItemsBatch: (state, payload: Array<OrderItem>) => {\n    return produce(state, (draft) => {\n      draft.items = [...state.items, ...payload].reduce((acc, item) => {\n        const existing = acc.find((oi) => oi.id === item.id);\n\n        if (existing) {\n          existing.setAmount(existing.getAmount() + item.getAmount());\n          if (item.included) {\n            existing.included = true;\n          }\n        } else {\n          acc.push(item);\n        }\n\n        return acc;\n      }, [] as Array<OrderItem>);\n    });\n  },\n  /**\n   * @description test covered by OE-4 OE-5\n   */\n  removeItem: (state, payload: OrderItem) => {\n    return produce(state, (draft) => {\n      const linkedProductIds =\n        payload.product.includedPriceListItems?.map((lp) =>\n          lp.getProductId()\n        ) || [];\n\n      draft.items = draft.items.filter((item) => {\n        return item.id !== payload.id && !linkedProductIds.includes(item.id);\n      });\n    });\n  },\n  clearBuildingItems: () => {},\n  /**\n   * @description test covered by OE-6\n   */\n  changeItem: (state, payload: ChangeItemPayload) => {\n    return produce(state, (draft) => {\n      draft.items = draft.items.map((item) => {\n        if (item.id === payload.id) {\n          item.setAmount(payload.amount);\n        }\n\n        return item;\n      });\n    });\n  },\n  setState: (state, payload: OrderItem[]) => {\n    return produce(state, (draft) => {\n      draft.items = payload;\n    });\n  },\n  clearProducts: (state) => {\n    return produce(state, (draft) => {\n      draft.items = initialState.items;\n      // draft.total = initialState.total;\n    });\n  },\n  setBuildings: () => {},\n  setOrderDto: (state, payload: ITEPortal_Domain_Dto_OrderDto | null) => {\n    return produce(state, (draft) => {\n      draft.orderDto = payload;\n    });\n  },\n  cleanUpOrderState: () => {\n    return initialState;\n  },\n});\n\nsample({\n  clock: [orderApi.addItem],\n  filter: (orderItem) => {\n    return orderItem.product.category.name === CATEGORY_TYPES.SELECT_BUILDING;\n  },\n  target: createEffect({\n    name: 'if-building-selected-update-building-type',\n    handler: (orderItem: OrderItem) => {\n      if (Array.isArray(orderItem.product.buildingTypes)) {\n        standApi.updateBuildingType(\n          Math.max(\n            ...orderItem.product.buildingTypes\n          ) as ITEPortal_Contracts_Enums_BuildingType\n        );\n      }\n    },\n  }),\n});\n\nsample({\n  clock: orderApi.removeItem,\n  filter: (orderItem) => {\n    return orderItem.product.category.name === CATEGORY_TYPES.SELECT_BUILDING;\n  },\n  target: [\n    createEffect({\n      name: 'reset-original-building-type',\n      handler: () => {\n        standApi.resetOriginalBuildingType();\n      },\n    }),\n    createEffect({\n      name: 'remove-all-ordered-items-if-building-removed',\n      handler: () => {\n        orderApi.clearProducts();\n      },\n    }),\n  ],\n});\n\nsample({\n  clock: [orderApi.addItem],\n  filter: (orderItem) => {\n    return (\n      Array.isArray(orderItem.product.includedPriceListItems) &&\n      orderItem.product.includedPriceListItems.length > 0\n    );\n  },\n  target: createEffect({\n    name: 'if-product-has-linked-products-then-add-them-to-the-order-with-zero-price',\n    handler: (orderItem: OrderItem) => {\n      if (Array.isArray(orderItem.product.includedPriceListItems)) {\n        orderApi.addItemsBatch(\n          orderItem.product.includedPriceListItems?.map((product) => {\n            return new OrderItem({\n              id: product.getProductId(),\n              product: product,\n              amount: product.quantity,\n              included: true,\n              includedReason: orderItem.displayName\n                ? (i18n.t(`included-into-price-of`, {\n                    name: orderItem.displayName,\n                  }) as string)\n                : undefined,\n            });\n          })\n        );\n      }\n    },\n  }),\n});\n\nexport const useOrder = () => {\n  const state = useUnit($order);\n\n  return {\n    ...state,\n    orderId: state.orderDto?.orderId,\n  };\n};\n\nexport const $orderTotal = $order.map((state) => {\n  return state.items.reduce((accumulator, currentValue) => {\n    return accumulator + currentValue.total;\n  }, 0);\n});\n\nexport const useOrderTotal = () => useUnit($orderTotal);\n","import { createApi, createStore } from 'effector';\nimport { produce } from 'immer';\nimport { useUnit } from 'effector-react';\nimport {\n  ITEPortal_Contracts_Enums_BuildingType,\n  ITEPortal_Domain_Dto_StandSummariesDto,\n} from '@/api';\nimport { leaveExhibitionOrderEvent } from '@/store/effector/cleanup';\n\ntype StandType = ITEPortal_Domain_Dto_StandSummariesDto;\n\ntype StandInitialState = {\n  standForOrder: StandType;\n  originalBuildingType?: ITEPortal_Contracts_Enums_BuildingType;\n};\n\nconst initialState: StandInitialState = {\n  standForOrder: {\n    buildingType: undefined,\n  },\n};\n\nexport const $stand = createStore<StandInitialState>(initialState).reset(\n  leaveExhibitionOrderEvent\n);\n\n// $stand.watch(console.log);\n\nexport const standApi = createApi($stand, {\n  setStandForOrder: (state, payload: StandType) => {\n    return produce(state, (draft) => {\n      draft.standForOrder = payload;\n      draft.originalBuildingType = payload.buildingType;\n    });\n  },\n  updateBuildingType: (\n    state,\n    payload: ITEPortal_Contracts_Enums_BuildingType\n  ) => {\n    return {\n      ...state,\n      standForOrder: {\n        ...state.standForOrder,\n        buildingType: payload,\n      },\n    };\n  },\n  resetOriginalBuildingType: (state) => {\n    return produce(state, (draft) => {\n      draft.standForOrder.buildingType = draft.originalBuildingType;\n    });\n  },\n});\n\nexport const useStand = () => useUnit($stand);\n","import { $exhibition } from '@/store/effector/exhibition';\nimport { useUnit } from 'effector-react';\nimport i18n from '@/i18n';\nimport { FEATURES, useFeature } from '@/features/feautres';\n\nexport const $vatSettings = $exhibition.map((state) => {\n  return {\n    vatMessage:\n      state.currency?.toLowerCase() === 'rub' ? i18n.t('vat-message') : null,\n  };\n});\n\nexport const useVatSettings = () => {\n  const featureEnabled = useFeature(FEATURES.VAT_DESCRIPTION);\n\n  if (!featureEnabled) {\n    return {\n      vatMessage: null,\n    };\n  }\n\n  return useUnit($vatSettings);\n};\n","import { Box, Flex } from '@chakra-ui/react';\nimport styled from 'styled-components';\n\nexport const IsLoadingWrapper = styled(Box)`\n  background: silver;\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  z-index: 999999;\n  opacity: 0.4;\n`;\n\nexport const LoaderWrapper = styled(Flex)`\n  justify-content: center;\n  padding-top: 10%;\n`;\n","import { Global, css } from '@emotion/react';\n\nexport const GlobalStyles = () => (\n  <Global\n    styles={css`\n      input[disabled],\n      input[aria-disabled='true'],\n      input[data-disabled],\n      textarea[disabled],\n      textarea[aria-disabled='true'],\n      textarea[data-disabled] {\n        background-color: #f7f7f7;\n        opacity: 1 !important;\n        color: #999999;\n      }\n    `}\n  />\n);\n","import { defineStyle, defineStyleConfig, extendTheme } from '@chakra-ui/react';\n\nconst brandPrimary = defineStyle({\n  padding: '6px 12px',\n  background: 'var(--chakra-colors-brandColor) !important',\n  color: '#fff',\n  fontWeight: 600,\n  fontSize: '14px',\n  lineHeight: '20px',\n  alignItems: 'center',\n});\n\nconst brandSecondary = defineStyle({\n  padding: '6px 12px',\n  background: '#fff',\n  color: 'var(--chakra-colors-brandColor)',\n  border: '1px solid var(--chakra-colors-brandColor)',\n  fontWeight: 600,\n  fontSize: '14px',\n  lineHeight: '20px',\n  alignItems: 'center',\n  height: 'auto',\n});\n\nexport const buttonTheme = defineStyleConfig({\n  variants: { brandPrimary, brandSecondary },\n  defaultProps: {\n    variant: 'brandPrimary',\n  },\n});\n\nconst theme = extendTheme({\n  styles: {\n    global: {\n      '*': {\n        boxSizing: 'border-box',\n      },\n      '#root': {\n        backgroundColor: '#F7FAFC',\n        color: '#2d3748',\n      },\n    },\n  },\n  sizes: {\n    'nav-bar-height': '72px',\n    'side-bar-width': '178px',\n    'order-list-width': '350px',\n    'header-brand-width': '40px',\n  },\n  colors: {\n    brandColor: '#E8431A',\n  },\n  components: {\n    Button: buttonTheme,\n  },\n});\n\nexport default theme;\n","type valueType = number;\n\nconst isFloat = (n: valueType) => {\n  return Number(n) === n && n % 1 !== 0;\n};\n\nexport const numberWithSpaces = (\n  value: valueType,\n  currency: string,\n  useIntl: boolean = false\n) => {\n  let buffer = value;\n\n  if (useIntl) {\n    return new Intl.NumberFormat(navigator.language, {\n      style: 'currency',\n      currency: currency || 'RUB',\n    }).format(+buffer);\n  }\n\n  if (isFloat(buffer)) {\n    buffer = Number(buffer.toFixed(2));\n  }\n\n  const parts = buffer.toString().split('.');\n\n  parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n\n  return `${parts.join('.')} ${currency}`;\n};\n","export const attempt = <T = unknown>(\n  fn: () => T | null,\n  options?: { silent: boolean }\n) => {\n  try {\n    return fn();\n  } catch (e) {\n    if (options?.silent && process.env.NODE_ENV === 'development') {\n      console.warn(e);\n    }\n\n    return null;\n  }\n};\n","import { Category } from '@/model/ICategory';\nimport { IBreadcrumbItem } from '@/model/common';\nimport { replacePaths } from './route';\nimport { CREATE_EXHIBITION_ORDER_TAB_PATH } from '@/constants/router';\n\nexport function getBreadcrumbsByCategory(\n  category: Category,\n  exhibitionId: string,\n  stand: string\n): IBreadcrumbItem[] {\n  const items: IBreadcrumbItem[] = [];\n\n  if (category.parent) {\n    items.push(\n      ...getBreadcrumbsByCategory(category.parent, exhibitionId, stand)\n    );\n  }\n\n  items.push({\n    label: category.displayName,\n    link: replacePaths(CREATE_EXHIBITION_ORDER_TAB_PATH, {\n      ':exhibitionId': exhibitionId,\n      ':stand': stand,\n      ':service': category.name,\n    }),\n  });\n\n  return items;\n}\n","import { t } from 'i18next';\nimport {\n  type ITEPortal_Contracts_Enums_BuildingType,\n  ITEPortal_Contracts_Enums_StandConfiguration,\n} from '../api';\nimport i18n from '../i18n';\n\nexport const FetchMethods = {\n  Delete: 'DELETE',\n  Patch: 'PATCH',\n  Post: 'POST',\n  Get: 'GET',\n  Put: 'PUT',\n};\n\nexport const DatePickerMonths = [\n  'Январь',\n  'Февраль',\n  'Март',\n  'Апрель',\n  'Май',\n  'Июнь',\n  'Июль',\n  'Август',\n  'Сентябрь',\n  'Октябрь',\n  'Ноябрь',\n  'Декабрь',\n];\n\nexport const DatePickerDays = ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'];\n\nexport const StandTypeLabelsByType: Record<\n  ITEPortal_Contracts_Enums_BuildingType,\n  string\n> = {\n  0: '',\n  1: i18n.t('stand-space-only'),\n  2: i18n.t('stand-standard'),\n  3: i18n.t('stand-standard-plus'),\n  4: i18n.t('stand-premium-ferrara'),\n  5: i18n.t('stand-premium-verona'),\n  6: i18n.t('stand-premium-ravenna'),\n  7: i18n.t('stand-premium-kremona'),\n  8: i18n.t('stand-premium-ancona'),\n  9: i18n.t('stand-premium-fabriano'),\n  10: i18n.t('stand-premium-livorno'),\n  11: i18n.t('stand-optima'),\n};\n\nexport const StandConfLabelsByConf: Record<\n  ITEPortal_Contracts_Enums_StandConfiguration,\n  string\n> = {\n  1: '',\n  2: i18n.t('stand-conf-cor'),\n  3: i18n.t('stand-conf-inl'),\n  4: i18n.t('stand-conf-isl'),\n  5: i18n.t('stand-conf-pen'),\n};\n\nexport const StandConfDescriptionByConf: Record<\n  ITEPortal_Contracts_Enums_StandConfiguration,\n  string\n> = {\n  1: '',\n  2: i18n.t('stand-conf-cor-description'),\n  3: i18n.t('stand-conf-inl-description'),\n  4: i18n.t('stand-conf-isl-description'),\n  5: i18n.t('stand-conf-pen-description'),\n};\n\nexport const AreaTypeConfig = [\n  { label: 'Space Only', value: 1 },\n  { label: 'Standard', value: 2 },\n  { label: 'Standard Plus', value: 3 },\n  { label: 'Premium – Ferrara', value: 4 },\n  { label: 'Premium – Verona', value: 5 },\n  { label: 'Premium – Ravenna', value: 6 },\n  { label: 'Premium – Kremona', value: 7 },\n  { label: 'Premium – Ancona', value: 8 },\n  { label: 'Premium – Fabriano', value: 9 },\n  { label: 'Premium – Livorno', value: 10 },\n  { label: 'Optima', value: 11 },\n];\n\nexport const StandConfiguration = [\n  { label: '', value: 1 },\n  { label: 'COR', value: 2 },\n  { label: 'INL', value: 3 },\n  { label: 'ISL', value: 4 },\n  { label: 'PEN', value: 5 },\n];\n\nexport const FieldTypeConfig = [\n  { value: 'none', label: t('without-language') || '' },\n  { value: 'select', label: t('select-list') || '' },\n  { value: 'input', label: t('input') || '' },\n];\n\nexport const DEFAULT_LOGO_PATH =\n  'https://storage.yandexcloud.net/prod.techstore-files/main-logo/main-logo.png';\n","import dayjs from 'dayjs';\n\nexport const DateUtils = {\n  isDate: (date: unknown): date is Date => {\n    return date instanceof Date && !isNaN(date.getTime());\n  },\n  format(date: string, format = 'DD.MM.YYYY HH:mm'): string {\n    return dayjs(date).format(format);\n  },\n  findLatestDate: (dates: Array<string | null | undefined>): string | null => {\n    if (dates.length === 0) {\n      return null;\n    }\n\n    let latestDate: dayjs.Dayjs | null = null;\n\n    for (const dateString of dates.filter(Boolean)) {\n      const date = dayjs(dateString);\n\n      // Check if date is valid\n      if (!date.isValid()) {\n        continue;\n      }\n\n      if (!latestDate || date.isAfter(latestDate)) {\n        latestDate = date;\n      }\n    }\n\n    return latestDate ? latestDate.format('DD.MM.YYYY') : null;\n  },\n  sortByDateAddedDescending: <T extends { createdAt?: string | null }>(\n    array: Array<T>\n  ) => {\n    return array.sort((a, b) => {\n      const dateA = dayjs(a.createdAt);\n      const dateB = dayjs(b.createdAt);\n\n      if (dateA.isAfter(dateB)) {\n        return -1;\n      } else if (dateA.isBefore(dateB)) {\n        return 1;\n      } else {\n        return 0;\n      }\n    });\n  },\n};\n","import { CSSProperties } from 'react';\nimport { DraggingStyle, NotDraggingStyle } from 'react-beautiful-dnd';\n\nexport const DraggableUtils = {\n  canBeReordered: <T extends { orderIndex?: number | null }>(list: T[]) => {\n    return true || list.length > 0;\n    // if (list.length === 0 || list.length === 1) {\n    //   return false;\n    // }\n    //\n    // const sortedList = list\n    //   .filter(\n    //     (item) => item.orderIndex !== undefined && item.orderIndex !== null\n    //   )\n    //   .sort((a, b) => (a.orderIndex || 0) - (b.orderIndex || 0));\n    //\n    // for (let i = 0; i < sortedList.length - 1; i++) {\n    //   if (\n    //     sortedList[i + 1].orderIndex === 0 &&\n    //     sortedList[i].orderIndex === 0\n    //   ) {\n    //     return true;\n    //   }\n    //\n    //   if (\n    //     (sortedList[i + 1].orderIndex || 0) -\n    //       (sortedList[i].orderIndex || 0) !==\n    //     1\n    //   ) {\n    //     return false;\n    //   }\n    // }\n    //\n    // return true;\n  },\n  isBrokenIndexing: <T extends { orderIndex?: number | null }>(\n    list: T[]\n  ): boolean => {\n    const hasAtLeastOneDuplicatedOrderIndex = (lst: T[]) => {\n      return !lst\n        .map((it) => it.orderIndex)\n        .every((oi, index, arr) => arr.indexOf(oi) === index);\n    };\n\n    return (\n      DraggableUtils.canBeReordered(list) &&\n      hasAtLeastOneDuplicatedOrderIndex(list)\n    );\n  },\n  reorder: <T extends { orderIndex?: number | null }>(\n    list: T[],\n    startIndex: number,\n    endIndex: number,\n    forceNormalized?: boolean\n  ): T[] => {\n    if (list.length === 0) {\n      return list;\n    }\n\n    if (forceNormalized) {\n      list.forEach((it, i) => {\n        it.orderIndex = i;\n      });\n    }\n\n    const minIndex = list[0].orderIndex || 0;\n    const greatestIndex = list.at(-1)?.orderIndex || list.length - 1;\n    const isFullListOrdering = greatestIndex === list.length - 1;\n    const hasBrokenIndexing = DraggableUtils.isBrokenIndexing(list);\n\n    if (isFullListOrdering || hasBrokenIndexing) {\n      const result = Array.from(list);\n      const [removed] = result.splice(startIndex, 1);\n\n      result.splice(endIndex, 0, removed);\n      result.forEach((item, index) => {\n        item.orderIndex = index;\n      });\n\n      return result;\n    }\n\n    const ghostStartIndex = (() => {\n      switch (true) {\n        case startIndex === list.length - 1: {\n          return greatestIndex;\n        }\n\n        case startIndex > endIndex: {\n          return greatestIndex - startIndex;\n        }\n\n        default: {\n          return minIndex + startIndex;\n        }\n      }\n    })();\n    const ghostEndIndex = (() => {\n      switch (true) {\n        case endIndex === 0: {\n          return minIndex;\n        }\n\n        case startIndex > endIndex: {\n          return greatestIndex - (startIndex - endIndex || 1);\n        }\n\n        default: {\n          return minIndex + endIndex;\n        }\n      }\n    })();\n\n    const ghostArray = Array(greatestIndex + 1).fill(null);\n\n    list.reverse().forEach((item, i) => (ghostArray[greatestIndex - i] = item));\n\n    const [removed] = ghostArray.splice(ghostStartIndex, 1);\n\n    ghostArray.splice(ghostEndIndex, 0, removed);\n\n    ghostArray.forEach((it, i) => {\n      if (it) {\n        it.orderIndex = i;\n      }\n    });\n\n    return ghostArray.filter(Boolean);\n  },\n\n  getListStyle: (isDraggingOver: boolean): CSSProperties => ({\n    background: isDraggingOver\n      ? 'var(--chakra-colors-green-50)'\n      : 'transparent',\n    padding: 'var(--chakra-space-2)',\n    border: isDraggingOver ? '2px dashed lightgray' : '2px dashed transparent',\n    borderRadius: isDraggingOver ? 'var(--chakra-radii-md)' : undefined,\n    width: '100%',\n  }),\n\n  getItemStyle: (\n    isDragging: boolean,\n    styles: DraggingStyle | NotDraggingStyle | undefined\n  ): CSSProperties => ({\n    ...styles,\n    // width: '100%',\n  }),\n};\n","import { IExhibitionSummary } from '../model/IExhibitionSummary';\n\nconst splitExhibitionByDate = (exhibitions: IExhibitionSummary[]) => {\n  const { currentExhibitions, pastExhibitions } = exhibitions.reduce(\n    (result, exhibition) => {\n      if (exhibition.isPast) {\n        result.pastExhibitions.push(exhibition);\n      } else {\n        result.currentExhibitions.push(exhibition);\n      }\n\n      return result;\n    },\n    {\n      currentExhibitions: [] as IExhibitionSummary[],\n      pastExhibitions: [] as IExhibitionSummary[],\n    }\n  );\n\n  return { currentExhibitions, pastExhibitions };\n};\n\nexport const ExhibitionUtils = {\n  splitExhibitionByDate,\n};\n","import axios, { AxiosRequestConfig, ResponseType } from 'axios';\nimport { FetchMethods } from '@/utils/constants';\nimport { appendTrailingSlash, removeTrailingSlash } from '@/utils/url';\n\nexport function generateAPIURL(baseUrl: string, endpoint: string) {\n  return appendTrailingSlash(baseUrl) + removeTrailingSlash(endpoint);\n}\n\n/**\n * perform a query with specified parameters\n * @param {string} endpoint URL for the query\n * @param {Object} options options wor the query\n */\n\nexport type XhrOptions = {\n  method: string;\n  data?: object;\n  params?: object;\n  responseType?: ResponseType;\n} & Omit<AxiosRequestConfig, 'method'>;\n\ntype AdditionalHeadersType = {\n  'Content-Type': string;\n};\n\nexport default async function fetchApi<T = any>(\n  endpoint: string,\n  options: XhrOptions = { method: FetchMethods.Get },\n  additionalHeaders?: AdditionalHeadersType\n) {\n  return axios<T>(\n    generateAPIURL(process.env.PUBLIC_API_URL as string, endpoint),\n    {\n      withCredentials: true,\n      headers: {\n        'Accept': 'application/json',\n        'Content-Type': 'application/json',\n        'Authorization': `Bearer ${localStorage.getItem('token')}`,\n        ...additionalHeaders,\n      },\n      ...options,\n    }\n  );\n}\n","import FileDownload from 'js-file-download';\n\nexport const FileUtils = {\n  saveBlobAsFile: (blob: Blob, fileName: string): void => {\n    FileDownload(blob, fileName);\n  },\n\n  saveUrlAsFile: (url: string, fileName: string): void => {\n    const link = document.createElement('a');\n\n    link.href = url;\n    link.target = '_blank';\n    link.style.display = 'none';\n    link.setAttribute('download', fileName);\n    document.body.appendChild(link);\n    link.click();\n  },\n\n  saveUrlToBlob: async (url: string): Promise<void> => {\n    async function toDataURL(urlToBlob: string) {\n      const blob = await fetch(urlToBlob, {\n        mode: 'cors',\n      }).then(async (res) => {\n        return res.blob();\n      });\n\n      return URL.createObjectURL(blob);\n    }\n\n    const fileName = url.split('/').reverse()[0];\n    const a = document.createElement('a');\n\n    a.href = await toDataURL(url);\n    a.download = fileName;\n\n    document.body.appendChild(a);\n\n    const clickHandler = () => {\n      setTimeout(() => {\n        URL.revokeObjectURL(url);\n        a.removeEventListener('click', clickHandler);\n      }, 150);\n    };\n\n    a.addEventListener('click', clickHandler);\n\n    a.click();\n  },\n};\n","import { FieldValues } from 'react-hook-form';\nimport { isOption } from './is-option';\n\nexport const formOptionsAsValues = <T extends FieldValues = FieldValues>(\n  values: T\n): T => {\n  const transformed: FieldValues = {};\n\n  Object.entries(values).forEach(([key, value]) => {\n    if (isOption(value)) {\n      transformed[key] = value.value;\n    } else {\n      transformed[key] = value;\n    }\n  });\n\n  return transformed as T;\n};\n","export const isNil = (v: unknown): v is null | undefined => {\n  return v === null || v === undefined;\n};\n","import { OptionType } from '../model/common';\nimport { isNil } from './is-nil';\n\nexport const isOption = (\n  value: OptionType | undefined | null\n): value is OptionType => {\n  return !isNil(value?.value) && !isNil(value?.label);\n};\n\nexport const isArrayOfOptions = (\n  value: unknown\n): value is Array<OptionType> => {\n  if (Array.isArray(value)) {\n    return value.every((opt) => !isNil(opt.value));\n  }\n\n  return false;\n};\n","export const MathUtils = {\n  roundToNearestQuarter: (numberToRound: number) => {\n    return Number((Math.round(numberToRound * 4) / 4).toFixed(2));\n  },\n};\n","import { Product } from '@/model/IProduct';\nimport { Category } from '@/model/ICategory';\nimport i18n from '@/i18n';\nimport { TKey } from '@/i18n/types';\nimport { ITEPortal_Domain_Dto_PriceListItemSummary } from '@/api';\n\nexport const ProductUtils = {\n  createProductFromPriceListItem: (\n    priceListItem: ITEPortal_Domain_Dto_PriceListItemSummary,\n    opts?: {\n      category?: Category;\n      categorySource?: Category[];\n    }\n  ) => {\n    let category = (() => {\n      if (opts?.category) {\n        return opts.category;\n      }\n\n      if (opts?.categorySource?.length) {\n        return opts.categorySource.find((cat) => {\n          return cat.id === priceListItem.categoryId;\n        });\n      }\n    })();\n\n    if (!category) {\n      // console.warn('category mocked');\n\n      category = new Category({\n        id: priceListItem.categoryId || 0,\n        name: priceListItem.categoryName,\n        displayName: i18n.t(priceListItem.categoryName as TKey),\n      });\n    }\n\n    return new Product({\n      ...priceListItem,\n      category,\n      imageUrls: priceListItem.imageUrls || undefined,\n    });\n  },\n};\n","import { Product } from '@/model/IProduct';\nimport { CREATE_EXHIBITION_ORDER_TAB_PATH } from '@/constants/router';\nimport { IdType } from '@/model/common';\n\nexport const replacePaths = (\n  route: string,\n  replace: Record<string, string | number>\n) => {\n  Object.keys(replace).forEach((key) => {\n    route = route.replace(key, <string>replace[key]);\n  });\n\n  return route;\n};\n\nexport const getPathByProduct = (\n  exhibitionId: IdType,\n  standId: IdType,\n  product: Product\n): string => {\n  return replacePaths(CREATE_EXHIBITION_ORDER_TAB_PATH, {\n    ':exhibitionId': exhibitionId,\n    ':stand': standId,\n    ':service': product.category.name,\n  });\n};\n","import { isNil } from '@/utils/is-nil';\n\nexport const typedObjectKeys = <T extends object>(obj: T) => {\n  if (isNil(obj)) {\n    return [];\n  }\n\n  return Object.keys(obj) as Array<keyof T>;\n};\n","export const UrlUtils = {\n  appendTimestampToUrl: (url: string) => {\n    const urlObject = new URL(url);\n\n    const queryParams = new URLSearchParams(urlObject.search);\n\n    queryParams.set('timestamp', Date.now() + '');\n\n    urlObject.search = queryParams.toString();\n\n    return urlObject.toString();\n  },\n};\n","export const removeTrailingSlash = (url: string) => url.replace(/\\/?$/, '');\n\nexport const appendTrailingSlash = (url: string) =>\n  url.replace(/\\/?(\\?|#|$)/, '/');\n"],"names":["ChakraProvider","theme","GlobalStyles","RouterProvider","ToastContainer","ModalFactoryProvider","settings","Category","id","SETTINGS","name","displayName","category","CREATE_USER","image","agentMenu","EXHIBITIONS","getCategoriesByRole","user","isAgent","isSuperAdmin","isAdmin","isSupportManager","isTechnicalManager","isModerator","exhibitions","serviceDirectory","SERVICE_DICTIONARY","memberDirectory","MEMBER_DIRECTORY","createUser","exhibitionId","t","canManagePersonalAccounts","checkRBACRule","$auth","menuItems","push","PERSONAL_ACCOUNTS","resolveUrl","PLACED_ORDERS","axios","config","HttpRequest","AxiosHttpRequest","request","BASE","VERSION","WITH_CREDENTIALS","CREDENTIALS","TOKEN","USERNAME","PASSWORD","HEADERS","ENCODE_PATH","auth","AuthService","bitrix","BitrixService","CategoryService","currency","CurrencyService","discount","DiscountService","exhibition","ExhibitionService","exhibitor","ExhibitorService","globalSettings","GlobalSettingsService","iteCompany","IteCompanyService","order","OrderService","priceList","PriceListService","priceListItem","PriceListItemService","product","ProductService","sellingOffice","SellingOfficeService","stand","StandService","UserService","ApiError","response","message","url","status","statusText","body","Error","options","BaseHttpRequest","CancelError","Symbol","toStringTag","CancelablePromise","executor","Promise","resolve","reject","onCancel","cancelHandler","Object","defineProperty","get","value","reason","onFulfilled","onRejected","then","catch","onFinally","finally","length","error","console","warn","OpenAPI","undefined","isDefined","isString","isStringWithValue","isBlob","type","stream","arrayBuffer","constructor","test","base64","str","btoa","err","Buffer","from","toString","getQueryString","params","qs","append","key","encodeURIComponent","String","process","Array","isArray","forEach","v","entries","k","join","getUrl","encoder","encodeURI","path","replace","substring","group","hasOwnProperty","query","getFormData","formData","JSON","stringify","filter","resolver","getHeaders","token","username","password","additionalHeaders","formHeaders","headers","credentials","Accept","reduce","mediaType","getRequestBody","sendRequest","axiosClient","source","requestConfig","axiosError","data","method","withCredentials","cancelToken","cancel","getResponseHeader","responseHeader","content","getResponseBody","catchErrorCodes","result","errors","ok","errorStatus","errorStatusText","errorBody","e","responseBody","isCancelled","httpRequest","requestBody","eventMasterId","eventEditionId","culture","orderId","userId","contactId","pageNumber","pageSize","buildingType","parentCategoryId","search","areaFrom","areaTo","discountPercentage","discountId","email","hasTechnicalManager","exhibitorId","employeeId","fromEmail","host","port","companyId","bankAccountId","orderStatus","orderItemId","categoryIds","productId","priceListId","priceListItemId","categoryId","exceptPriceListId","standId","projectId","changesId","fileId","roles","removeTrailingSlash","localStorage","getItem","TypedAxiosHttpRequest","axiosInstance","interceptors","use","clear","window","location","href","Authorization","typedAxios","AdminSearch","useTranslation","navigate","useNavigate","currentSearch","useSearch","strict","context","useMatches","at","searchOptions","doSearch","parameterName","p","doDebouncedSearch","useDebouncedCallback","clearSearch","Flex","flexDirection","map","searchDescriptor","index","placeholder","queryParameterName","Box","mr","InputGroup","maxWidth","InputLeftElement","pointerEvents","SearchIcon","color","Input","defaultValue","onKeyUp","target","onChangeCapture","stopPropagation","preventDefault","AmountCounter","amountCounterValue","onChange","disabled","suffix","step","precision","useCounter","min","max","keepWithinRange","_","valueAsNumber","MathUtils","increment","decrement","update","controlledValue","AmountWrapper","lang","HStack","maxW","CounterButtonDec","onClick","MinusIcon","boxSize","match","startsWith","slice","onBlur","event","parseFloat","Number","isNaN","textAlign","height","variant","role","Text","CounterButtonInc","AddIcon","Button","ifProp","css","AsyncButton","props","rest","useState","isLoading","toggleLoading","handleAsyncClick","promise","isDisabled","Wrapper","StyledLink","Link","Image","to","src","DEFAULT_LOGO_PATH","alt","BreadcrumbsWrapper","BreadcrumbsLinkContainer","BreadcrumbLink","items","spacing","separator","ChevronRightIcon","Breadcrumb","breadcrumbItem","label","link","BreadcrumbItem","as","schemeConfig","primary","backgroundImage","secondary","border","opacity","disabledSecondary","black","transparent","red","backgroundColor","hoverConfig","focusConfig","colorScheme","children","width","fontWeight","buttonType","defaultColor","minWidth","transition","px","fontSize","borderRadius","_hover","_focus","Spinner","ChakraCardWrapper","ChakraCardContainer","ChakraCardTitle","CardHeader","ChakraCardFooter","CardFooter","Card","className","header","footer","CardBody","SubtitlesWrapper","DescriptionWrapper","ImageContainer","ImageWrapper","DotsContainer","FooterTextWrapper","SubtitleRowWrapper","Subtitle","subtitles","subtitle","Divider","orientation","FooterSection","stands","orders","bg","ExhibitionCard","description","direction","base","sm","overflow","h","w","Stack","Heading","size","StyledCard","ServiceName","TechnicalCardWrapper","service","viewExhibitionCart","pathName","replacePaths","CREATE_EXHIBITION_ORDER_TAB_PATH","Content","ContentInner","ContentWithSidebars","AdminPanelContent","DatePicker","dateFormat","isRequired","control","useFormContext","fieldState","useController","defaultDate","Date","FormControl","isInvalid","invalid","display","FormLabel","Controller","render","field","fieldValue","SingleDatepicker","date","onDateChange","configs","dayNames","DatePickerDays","monthNames","DatePickerMonths","FormErrorMessage","isDebugEnabled","sessionStorage","Debug","ModalPrices","prices","useExhibition","PricesWrapper","current","PriceRowContainer","PriceLabel","PriceNumber","price","ImageSection","ImageDescription","BuildingDescriptionSection","buildingLabel","buildingDescription","BuildingDescriptionWrapper","BuildingDescriptionLabelContainer","BuildingDescriptionBodyRow","TableSection","tableData","TableContainerWrapper","Table","Thead","Tr","titles","columnTitle","BuildingTableTitle","Tbody","rows","row","BuildingTableRow","NoteSection","note","NoteSectionContainer","Th","Td","TableContainer","BuildingCardWrapper","DevelopmentCard","cardInfo","isSelected","standForOrder","useStand","useDisclosure","isOpen","onOpen","onClose","openConfirm","setOpenConfirm","handleSubmit","useForm","onSubmit","selectBuilding","useCallback","building","Math","buildingTypes","priceListItemsBasedOnBuildingType","find","pi","productName","includedPriceListItems","setLinkedItems","orderApi","OrderItem","getProductId","amount","area","setBuilding","ModalConfirm","closeModal","Modal","isCentered","ModalOverlay","ModalContent","ModalHeader","ModalCloseButton","ModalBody","buildingName","ModalFooter","ButtonGroup","gap","ModalInfoComponent","imageDescription","changeHandler","Product","counterValue","imageExtensions","FileLink","DownloadFileLink","fileName","attachmentUrl","fileNameFromProps","onDelete","withIcon","textProps","couldBeOpenedInPopup","some","ext","endsWith","open","setOpen","cursor","mt","FileUtils","AttachmentIcon","canBeDeleted","DeleteIcon","ModalFactory","Component","okLabel","onOk","close","slides","animation","fade","controller","closeOnPullDown","closeOnBackdropClick","styles","root","plugins","download","slide","Checkbox","formContext","registeredFieldProps","register","clearErrors","isChecked","FormControlWrapper","ParticipantCheckContainer","addonLeft","addonRight","tooltip","registerFieldName","htmlFor","Tooltip","hasArrow","placement","InfoIcon","style","marginTop","InputLeftAddon","InputRightAddon","StyledForCaseWithAddon","borderTopLeftRadius","borderBottomLeftRadius","addon","NumberInput","valueAsString","NumberInputField","NumberInputStepper","NumberIncrementStepper","NumberDecrementStepper","OrderTableRowContainerBadgeComponent","Select","rootProps","Container","UploadFileDropzone","multiple","accept","defaultLabelFromProps","defaultLabel","setValue","onDrop","droppedFiles","shouldValidate","useDropzone","getRootProps","getInputProps","acceptedFiles","filesLength","files","file","uploadFileLabel","filesCount","formLabelStyle","getSelectBuildingInfo","products","selectBuildingData","productData","productDisplayName","additionalNotes","imageUrls","text","BuildingTypesWrapper","useBuildingsLoader","createExhibitionOrderServiceRoute","originalBuildingType","useQuery","queryKey","queryFn","productItemCardData","productItemCardObjects","item","categoryName","CATEGORY_TYPES","ProductUtils","SelectBuilding","useOrder","isLoader","useAppLoading","vatMessage","useVatSettings","cardItems","isFetching","useEffect","loadingApi","marginY","ShowMoreText","lines","keepNewLines","more","less","anchorClass","LoaderWrapper","Loader","oi","cardName","images","BuildingGallery","SELECT_BUILDING","TEMPORARY_STAFF","serviceCategory","Form","Price","Label","TooltipWrapper","rowDataComponentsConfig","inputNumber","input","badge","submitHandler","param","instance","isValid","formState","FormProvider","WarningIcon","alignItems","tableElement","formattedPrice","fieldType","LANGUAGES_OPTIONS","required","isSubmitting","setIsSubmitting","productItems","setProductItems","clickHandler","values","language","personAmount","parseInt","staff_amount","dayAmount","day_amount","TemporaryStaffOrderItem","peopleAmount","fetchData","GET_PRICELIST_PRODUCTS","FetchMethods","serviceSpecification","useProductsLoader","tree","mb","OrderTableRow","rowData","withDivider","opts","flatMap","useCatalog","setLoading","categoriesSource","cat","getConfig","NavBar","StyleMenu","StyledSearch","RightBlockWrapper","useAuth","matchContext","useParams","shouldRenderExhibitionSearchForExhibitor","Boolean","isExhibitor","shouldRenderPageSpecificSearch","headerMenuConfig","LanguageSwitcher","saveManual","manualUrl","UrlUtils","icon","xmlns","viewBox","d","DraggableHandlerIcon","forwardRef","ref","Icon","fill","fillRule","clipRule","OrdersIcon","UsersIcon","DotsWrapper","setIndex","useMemo","toggleOpen","state","updateIndex","singleImage","position","on","view","click","carousel","padding","imageFit","finite","iconPrev","iconNext","inline","aspectRatio","margin","Thumbnail","CommonProductGallery","thumbnailsCount","useFeatureValue","visibleSlides","hiddenSlidesCount","i","whiteSpace","ButtonsWrapper","i18n","useCommonStore","lngValue","setLngValue","setLanguageValue","languageValue","commonApi","setItem","changeLanguage","reload","centralized","thickness","speed","emptyColor","top","left","LoaderWrapperLoadingStyles","userSelect","loading","boxProps","zIndex","List","redirectTo","rightIcon","Item","active","modals","useUnit","$modalStack","modal","isOpened","scrollBehavior","shouldUseOverlay","title","justifyContent","minW","cancelLabel","$modalContext","domain","createDomain","createStore","defaultModalProps","infoModalDefaultProps","confirmModalDefaultProps","createApi","show","newModal","info","confirm","closeAll","closeById","descriptorById","indexOfDescriptor","findIndex","splice","lastModalDescriptor","pop","setTimeout","attempt","stack","isOpenedById","getState","updateContext","payload","useModalFactoryContextProvider","SelectComponent","isMulti","closeMenuOnSelect","blurInputOnSelect","allowCreate","onClear","every","isOption","option","opt","isArrayOfOptions","possibleValues","includes","BaseComponent","borderColor","minHeight","menuPortal","getValues","isClearable","menuPlacement","menuPortalTarget","document","resetField","badgeConfig","ORDER_STATUSES","OrderBadge","isNil","badgeType","Badge","NameComponent","OrderTableRowContainerNameComponent","verticalAlign","OrderTableRowContainerPriceComponent","OrderTableRowContainerInputWrapper","OrderTableRowContainerInputComponent","RowControl","orderItem","isProductSupportsDecimals","isDecimal","getAmount","unit","amountStep","AddItemToOrderButton","addItem","productToAdd","setAmount","OrderTableRowWrapper","OrderTableRowContainer","InfoSectionContainer","ParamsSectionContainer","rowDataText","rowDataOptions","ButtonContainer","included","Row","UserInfo","StyledChevronDownIcon","ChevronDownIcon","fullName","StyledMenuList","MenuList","StyledMenuItem","MenuItem","can","useRBAC","logOutHandler","authApi","Menu","MenuButton","exhibitorPathRootPath","MenuDivider","StyledInputGroup","optionValue","optionLabel","trim","toLowerCase","queryClient","useQueryClient","useCategoriesByData","useRef","onSelectHandler","getPathByProduct","originalValue","autoCompleteQueryOptions","queryOptions","enabled","AutoComplete","onSelectOption","freeSolo","emptyState","openOnFocus","Search2Icon","AutoCompleteInput","onFocus","ensureQueryData","AutoCompleteList","AutoCompleteItem","BarTitleWrapper","categories","barTitle","itemRefs","categoryInfo","useProductCategory","parent","offsetTop","getScrollElement","scrollTo","behavior","scrollRef","fixed","serviceObject","resolvedUlr","pageUrl","SHOW_SUPPORT_MANAGER_PATH","SHOW_SUPPORT_MANAGER_ADDITIONAL_PATH","total","useOrderTotal","isOrderCompleted","useOrderCompleteness","StyledText","cost","toLocaleString","StyledButton","CREATE_EXHIBITION_CART_PATH","exhibitionName","StyledHeader","ExhibitionBox","ExhibitionTitle","StandDescription","includeStandNumber","HeaderTitle","OrderItemDependencyWarning","renderProps","alertProps","incompleteItemsDueToDependency","inTheListOfIncomplete","incomplete","wrapInto","el","Alert","AlertTitle","ArrowUpIcon","ml","AlertDescription","listStyle","outstandingDeps","pr","StyledSidebar","Footer","WrapperInner","Name","Count","Actions","productPrice","itemName","visible","setVisible","isBuilding","deleteHandler","unitOfMeasurement","unitOfMeasure","onMouseLeave","onMouseEnter","CloseIcon","pl","pt","pb","SidebarWrapper","SidebarHeader","SidebarFooter","SidebarInner","DraggableTable","columns","onDragEnd","useTable","initialState","hiddenColumns","column","accessor","getTableProps","getTableBodyProps","headerGroups","prepareRow","isEmpty","DragDropContext","headerGroup","getHeaderGroupProps","headerIndex","getHeaderProps","paddingLeft","paddingRight","Droppable","droppableId","provided","innerRef","droppableProps","Draggable","draggableId","providedRow","rowSnapshot","draggableProps","getRowProps","isDragging","DraggableUtils","cells","cell","cellIndex","dragHandleProps","getCellProps","m","PaginationContainer","PaginationSchema","CurrentPage","TotalPages","PageSize","TotalCount","setPageNumber","setPageSize","paginationInfo","parsedSchema","safeParse","success","IconButton","ChevronLeftIcon","pageSizeNumber","onBulkAction","showBulkAction","useSortBy","useRowSelect","hooks","visibleColumns","columnsData","Header","getToggleAllRowsSelectedProps","checked","Cell","getToggleRowSelectedProps","selectedFlatRows","toggleAllRowsSelected","rowIds","original","getSortByToggleProps","isSorted","isSortedDesc","ChevronUpIcon","useTableLoader","resource","onError","ignorePagination","additionalPrams","xhrOptions","setIsLoading","setData","setPaginationInfo","responseData","responseArray","paginationInfoHeader","s","hasOwn","AxiosHeaders","parse","log","onPageSizeChange","onPageChange","page","currentPage","currentSize","refresh","Grid","SimpleGrid","CenteredTitle","PageTitle","rootCategories","categoryConfig","subcategoriesByCategory","useSubCategoriesByData","categoriesToRender","rowGap","md","xl","TextArea","CodeWrapper","CodeLabel","CodeTimer","Timer","sec","userEmail","authInfo","over","setOver","time","setTime","tick","resendCode","LOGIN","timerID","setInterval","clearInterval","padStart","FlexedPageTitle","CenteredPageTitle","ROLES","User","BUILDING_TYPES","STATUS_CONFIG","CLEANING","PRODUCT_TYPES","BUILDING","COMMON","CODE_VERIFY","GET_PDF_BY_ORDER","EXHIBITIONS_TABLE","EXHIBITORS_FROM_EXHIBITOR","CREATE_EXHIBITION","EDIT_EXHIBITION","EDIT_USER_INFO","ADD_USER","EDIT_USER","CHANGE_ORDER_STATUS","SAVE_EXHIBITION_IMG","GET_PRICELISTS","DOWNLOAD_EXHIBITOR_CSV","EDIT_PRICELIST_ITEM","IMPORT_PRICELIST_ITEMS","SAVE_PRODUCT_IMAGES","MEMBERS","EDIT_MEMBERS","memberId","EDIT_PRODUCT_RESOURCES","EDIT_PASSWORD","DELETE_PRICE_LIST","CHANGE_MAIN_LOGO","DELETE_ORDER_ITEM","Undefined","Submitted","Draft","Invoiced","Paid","Cancelled","Processing","PERSONAL_DISCOUNT_TYPE","PERCENT","AMOUNT","SPACE_ONLY_BUILDING_TYPE","SHOW_EXHIBITION_PATH","SHOW_SUPPORT_MANAGER_ACTION_PATH","CREATE_EXHIBITION_ORDER_PATH","CART_TABLE","LOGIN_PATH","VERIFY_EMAIL_PATH","rootAuthRoute","Route","getParentRoute","rootRoute","beforeLoad","isLoggedIn","redirect","indexRouteFactory","component","Outlet","loginRoute","validateSearch","searchObj","verifyEmailRoute","authRouteTree","addChildren","routerRBACGuard","rule","protectedRoute","indexRoute","profileRoute","Profile","cabinetRoute","ADMIN_AREA_PREFIX","AdminPanelPage","flatRouteTree","protectedTree","exhibitionsRoutesTree","serviceDictionaryRoutesRootTree","memberDirectoryRoutesTree","settingsRoutesRootTree","usersRoutesRootTree","agentRoutesRoot","exhibitionRootRoute","exhibitionViewRoute","createExhibitionOrderCategoryRoute","standProjectRoute","adminExhibitionRoutesRoot","exhibitionsTabs","ExhibitionAccountsTabs","ExhibitionListRouteSearchSchema","tab","ExhibitionAccountsListRouteSearchSchema","exhibitionListRoute","ExhibitionsTabsPage","createExhibitionRoute","NewExhibition","loader","technicalManagers","manager","editExhibitionRoute","viewExhibitionRoute","viewExhibitionAccountsRoute","PersonalAccountsTab","EditPersonalAccountsPageSearchSchema","editExhibitionAccountRoute","NewAccount","pendingComponent","shouldReload","cause","backPath","accountId","accountData","sellingOffices","currencyData","officesOptions","technicalManagersOptions","currencyOptions","agents","QueryOptions","office","agentsModels","ag","offices","companies","addExhibitionAccountRoute","c","meta","PlacedOrdersRouteSearchSchema","optional","viewExhibitionPlacedOrdersRoute","PlacedOrders","editOrderRoute","EditOrder","alreadyAddedItemIds","exhibitors","IBaseOrder","createOrderRoute","CreateOrder","AgentHome","onLeave","leaveExhibitionOrderEvent","exhibitionInstance","exhibitionNewInstance","$exhibition","IExhibition","exhibitionApi","standsData","cleaningDiscount","invalidateStand","sellingOfficeId","$stand","standApi","CatalogGateHOC","isPast","StandProject","fetchQuery","project","memberDirectoryRoutesRoot","memberDictionaryRoute","MembersDirectory","viewExhibitorRoute","ManageExhibitorUsers","pageTitle","companyName","serviceDictionaryRoutesRoot","serviceDictionaryRoute","ServiceDirectory","saveCSV","openImportModal","importProductsFile","URL","createObjectURL","Blob","createElement","setAttribute","appendChild","toast","ImportCSVForm","ctx","subHeader","editCategoryApi","parentCategoryName","editProductApi","action","settingsRoutesRoot","SettingsPageSearchSchema","settingsRoute","SettingsPage","discounts","usersRoutesRoot","usersListRoute","UsersTable","addNewUserRoute","NewUser","editUserRoute","routeTree","router","Router","rootRouteWithContext","QueryClientProvider","client","superAdminPathRootPath","adminPathRootPath","FEATURES","VAT_DESCRIPTION","LINKED_ZERO_PRICE_PRODUCTS","PRODUCT_GALLERY_PREVIEW_IMAGES_COUNT","getFeaturesMap","useFeature","feature","flag","QueryClient","defaultOptions","queries","refetchOnWindowFocus","refetchIntervalInBackground","standsQueryOptions","exhibitorQueryOptions","loadExhibitorStand","loadCategoriesQueryOptions","loadPriceListItemsShort","initialData","priceListItemOption","loadStandProject","retry","loadCategoryOptions","ct","loadEventMasterOptions","eventMasters","em","loadCompanyOptions","subexponentsQueryOptions","productsQueryOptions","rules","canManageSuperAdmins","canDeleteOrder","canCreateOrder","canEditOrders","canViewPublicExhibitions","canAccessAdminUsers","canAccessAdminSettings","canAccessAdminServiceDirectory","canAccessAdminCompanies","canAccessAdminExhibitions","canAccessExhibitionProfile","canAccessExhibitionPersonalAccounts","canAccessExhibitionOrders","canAddExhibition","canEditExhibition","canManageExhibition","canAddExhibitionExhibitor","canAddStand","canAddOrderPersonalDiscount","canRemoveSurchargeFromOrder","canChangeOrderStatus","guard","bootstrapSentry","dsn","tracesSampleRate","replaysSessionSampleRate","replaysOnErrorSampleRate","release","categoriesData","imageUrl","subCategoriesData","subCategory","useExhibitionStateReset","errorsOverride","useFormErrorsHandler","processErrorsArray","handledError","ignoreFields","errorsData","messageErrorKey","propertyName","split","errorKey","charAt","getFieldState","setError","errorMessage","dir","processErrorsObject","fieldPrefix","overrideMessage","messages","override","typedObjectKeys","o","exhibitionCategory","useSearchCategoryForProduct","findCategoryForProduct","useNameTranslate","ru","en","validateTranslationsMatch","initReactI18next","init","resources","translation","fallbackLng","interpolation","escapeValue","FASCIA_INSCRIPTION_COLORS","colorCode","scope","code","CARPET_COLORS","translations","getElementById","enableMocking","BackButtonWrapper","ToExhibition","getBack","ArrowBackIcon","StyledContentInner","$withToolbar","pageName","breadcrumbsItems","ConnectedSidebar","ExhibitionSidebar","SidebarByRole","Main","assign","personalDiscount","personalExtraChargePercentage","removeExtraCharge","isFinite","typeOfDiscount","Serializable","Cart","cleaningDiscounts","standInfo","cleaningItems","totalArea","cleaningTotal","cleaningArea","cleaningDiscountMultiplier","markupPercentage","currentDate","firstMarkup","firstMarginDate","secondMarkup","secondMarginDate","thirdMarkup","thirdMarginDate","hasPersonalExtraCharge","isSameOrAfter","thirdMargin","secondMargin","firstMargin","subTotal","hasPersonalDiscount","itemsTotal","hasVat","subTotalWithMarkup","vatPercent","markup","vat","subTotalWithVat","_urlResolver","toJSON","json","fromJSON","endDate","isBefore","orderCreationLastDate","startDate","format","isValidExhibition","nullish","logoUrl","place","IExhibitionSummary","exhibitionSummary","Order","categoryObj","originalProductId","includedReason","toFixed","is","itemDetails","linkedProducts","linkedFromJSON","includedProductName","jobTitle","subdivision","_fullName","_id","_email","_image","_jobTitle","_role","_subdivision","Role","SuperAdmin","Admin","SupportManager","TechnicalManager","Moderator","Exhibitor","Agent","useHasCategorySearchCriteria","searchProduct","useHasProductSearchCriteria","useCategoriesLoaderQueryOptions","structuralSharing","useSubCategoriesLoaderQueryOptions","useCategoriesLoader","useSubCategoriesLoader","useCategoriesOrderUpdate","useMutation","mutationKey","mutationFn","startIndex","endIndex","preSaveFn","initialTableData","localOrdered","orderIndex","useProductsLoaderOptions","getProductsLoaderOptions","refetchOnMount","retryOnMount","placeholderData","keepPreviousData","useProductsOrderUpdate","productsSource","useSubCategoriesOrderUpdate","OptionSchema","required_error","ValidationSchema","linked","n","nullable","EditPriceListItemForm","editTableData","reloadPriceList","existingPriceListItems","zeroPriceProductsEnabled","entityId","setEntityId","priceListItemOptions","filteredPricelistItemOptions","existingIds","indexOf","formInstance","zodResolver","useFieldArray","linkedFieldset","fields","remove","reset","it","includedPricelistItemId","quantity","filteredLinkedProducts","addAnother","includedPriceListItemId","headerMessage","Drawer","DrawerOverlay","DrawerContent","DrawerHeader","DrawerCloseButton","DrawerBody","flexBasis","DrawerFooter","MarginContainer","MarginWrapper","dateFields","ExhibitionDescription","editForm","managers","useLoaderData","methods","mode","toExhibitions","managerValue","managerOption","isDateField","DateUtils","toDate","logo","OptionWrapper","FooterContainer","Exhibitions","useExportExhibition","ExhibitionOptions","ExternalLinkIcon","EditIcon","exhibitionColumns","selectedTabStyles","background","tabStyles","tabPanelsStyle","indexFromUrl","Tabs","align","TabList","Tab","_selected","borderTopRightRadius","borderBottomRightRadius","TabPanels","TabPanel","eventMaster","ImportExhibitionForm","setEventMasterId","setExhibition","setTechnicalManagers","fetchExhibition","exhibitionsData","ex","fetchTechnicalManagers","technicalManagersData","borderBottomColor","TabWrapper","element","scrollIntoView","isManual","PriceLists","SelectedPriceWrapper","SelectedPriceContainer","ToolBarWrapper","ButtonContentContainer","TransparentButtonsTextContainer","setCurrency","setCurrencyOptions","priceListsData","setPriceListsData","setOpenImportModal","defaultValues","editData","setEditData","setEditTableData","priceLists","setPriceLists","selectedPriceId","setSelectedPriceId","openDeletePriceListItem","setOpenDeletePriceListItem","deleteAll","setDeleteAll","setPriceListItemId","setEventEditionId","fetchEventEditionId","deletePriceListItemModalShow","keys","PriceListsOptions","rowValues","editRow","importCSV","closeImportModal","importItems","importPriceListItems","showPriceList","addRow","deleteRow","priceListsColumns","TableIncludedPriceListItemsBadge","currencyId","deletePriceList","minH","pricelists","CiImport","DeleteModal","itemsWithDisplayName","ipi","tailLength","Fragment","tooltipProps","openDelay","flexWrap","bt","saveExhibition","withoutContactIdManagers","gt","File","refine","isAfter","transform","EditMemberForm","fieldErrors","UsersTableActions","useRouter","openForm","useSaveEmployee","flexDir","invalidate","AddNewEmployeeForm","model","EmployeeFormSchema","phoneNumber","exhibitorEmployees","trigger","openConfirmEditMember","setOpenConfirmEditMember","editUser","createdDate","lastModifiedDate","MainInfo","UpdateCompanyFormSchema","NewCompanyFormSchema","isAgentSelectedForExhibitor","watch","selectedCompanyOption","setSelectedCompany","useSuspenseQuery","useBoolean","isAgentCreating","isAgentCreatingApi","useSearchCompanyByEmployee","findCompanyByEmployee","isCompanyFoundByEmployee","saveCompany","useCompanySave","officeOption","technicalManagerEmail","currencyOption","agent","isAgentCheckboxDisabled","__isNew__","filteredCompanies","ParticipantCheckWrapper","isEdit","savedId","agentId","employeeName","employeeEmail","foundCompany","setFoundCompany","isEmployeeEmailFieldVisible","toggleIsEmployeeEmailFieldVisible","toggle","isCompanySelectionAllowed","toggleIsCompanySelectionAllowed","markIsCompanyFoundByEmployee","markCompanyNotFoundByEmployee","off","company","existingEmployee","z","technicalManager","EditManagerModal","TabsMap","main","users","subexponents","ExhibitionInfoWrapper","ShowExhibitionInfo","selectedTabFromUrl","isLazy","StandsTab","UsersTab","ProductsTab","SubexponentsTab","PersonalAccounts","openEditTechnicalManagersModal","useEditTechnicalManagers","processedAccounts","setLoader","setShowBulkAction","selectedRows","setSelectedRows","ac","lastVisitDate","empl","personalAccountsData","showBitrixModal","setShowBitrixModal","PersonalAccountsOptions","showDeleteModal","entity","responseType","importFile","personalAccountsColumns","addPersonalAccount","importPersonalAccountsFromBitrix","setDistributeMode","ConfirmModal","modalMessage","secondFloorArea","standConfiguration","standNumber","sortedStands","sort","a","b","reValidateMode","StandFieldSet","isNew","onRemove","focusName","FilesStorage","canUploadNewFiles","StandProjectForm","useStandSave","isSaving","saveStand","openEditStandProjectForm","standProjectApi","openStandFileStorage","filesStorageApi","boxShadow","lg","AreaTypeConfig","StandConfiguration","PavilionOptions","paddingX","changeDescription","invalid_type_error","ProjectChangeForm","editable","approved","useStandProject","uploaderKey","setUploaderKey","employeesIds","changeId","comment","projectChangesHistory","CommentsHistory","comments","ownershipResolver","historyItem","createdBy","AttachmentUploader","onFileChange","ProjectImageUploader","projectImageUrl","ProjectImage","projectDescription","standIdFromUrl","toggleOpened","isDescriptionEditable","setDescriptionEditable","dataUpdatedAt","isExistingProject","handleClose","reopenProject","standStatus","saveProjectId","canEditHistory","$standProject","setStandId","getPavilionLabelByCode","rawValues","formOptionsAsValues","refetchQueries","foundModel","setFoundModel","useEmployeeSearch","findUser","isSearching","foundEmployee","openCreateModal","useEmployeeCreate","invalidateQueries","saveEmployee","saveTechnicalManagers","exhibitorIds","AddItemToOrderModal","useCreateOrderContext","originalPriceListItem","oit","itemsOptions","AddedToOrderItemsTable","selectedItems","removeItem","NumberColumnComponent","OrderControls","CreateOrderButton","reducer","itemsSource","sourceItems","availableItems","employees","hasPriceList","selected","exhibitorIdFromQuery","useReducer","dispatch","hasStands","couldAddItems","CreateOrderFormSchema","shouldDirty","shouldTouch","employeesOptions","standsOptions","updateDueToExChange","loadedItems","loadedStands","createOrder","selectedExhibitorId","createdOrderId","employeeUserId","CreateOrderContextProvider","paddingBottom","NoPriceListsLink","NoStandsLink","hasItems","paddingTop","CreateOrderContext","createContext","useContext","Provider","AlertIcon","here","textDecoration","postProcess","AddButtonWrapper","setIsOpened","TotalRowContainer","setOrderItem","openConfirmDeleteModal","setOpenConfirmDeleteModal","requestSendOrderEmail","useSendOrderEmail","openExportModal","useExportOrder","OrderRowOptions","orderColumns","downloadPDF","object","deleteOrderItem","EmailIcon","marginRight","DownloadIcon","MarkupManagement","PersonalDiscount","EditOrderForm","numberWithSpaces","orderSummary","orderItemData","idProps","MarkupForm","toggleCommonExtraCharge","useManageCommonExtraCharge","savePersonalExtraCharge","useManagePersonalExtraCharge","Switch","onSaved","chargeState","isEditModalOpened","toggleOpenState","isDraft","hasDiscount","PersonalDiscountForm","schema","SubmitTypes","Delete","Save","isUpdate","submitType","setSubmitType","isDeleting","discountType","setDiscountType","isPercentSelected","save","removeDiscount","defaultDiscountType","Schema","sendEmail","EditStatusModal","orderData","statusProps","ToExhibitionWrapper","exhibitorName","downloadPdf","setIsEditModalOpened","orderIdToDelete","setOrderIdToDelete","showPdfByOrder","DownloadPDF","openModal","PlacedOrdersOptions","editOrder","deleteOrder","placedOrdersColumns","cfg","ExportToBitrixForm","setCompanyId","bankAccounts","setBankAccounts","fetchBankAccounts","bankAccountsData","ba","bankAccount","exportOrder","iteCompanyId","descriptionRu","descriptionEn","EditCategoryForm","useParentCategoriesLoader","categoryID","editDataWithResources","displayNameRu","displayNameEn","ServiceDictionaryValidationSchema","unitOptions","cultureName","productTypeOptions","AbstractEditProductDrawerForm","productType","productTypeFromSelect","Fieldset","EditBuildingProductFieldset","EditTemporaryStaffProductFieldset","EditDefaultProductFieldset","po","mapValues","imageDescriptionRu","imageDescriptionEn","additionalNotesRu","additionalNotesEn","BuildingProductValidationSchema","categoryOptions","useProductForm","productID","buildingTypeValues","buildingTypeLabel","dictionaryType","linkedProductIds","dependencyOptions","useCommonProductEditLoader","CommonProductValidationSchema","EditProductDrawer","useCommonProductSave","mutateAsync","isSuccess","mapData","fieldTypeEditLabel","FieldTypeConfig","TemporaryStaffValidationSchema","filesData","imageFiles","FormData","$editProduct","setFormInstance","CreateProductUtils","getProductType","getCreateButtonLabelByType","SchemaWithImages","SharedProductValidationSchema","merge","currentExpandedIndex","setExpandedIndex","hasSearchCriteria","canBeReordered","reorderAsync","isReordering","isPending","Accordion","allowToggle","expandedIndex","destination","currentOpened","reorderedList","reorderedExpandedIndex","snapshot","isDraggingOver","isDragDisabled","itemProvided","itemSnapshot","CategoryItem","dragHandle","EditCategoryModalForm","CategoryControls","isSubCategory","AccordionItem","isExpanded","AccordionButton","flex","AccordionIcon","AccordionPanel","SubCategoriesList","ProductsList","useEditCategoryApi","isModalOpened","BuildingTypes","buildingTypeNames","dictionaryTypeName","getColumns","handleProductDelete","onRemoved","isDraggable","hasSearch","updateProductsOrder","mutate","isUpdatingOrder","hasCategorySearchCriteria","marginBottom","INITIAL_STATE","$editCategory","TableMainCallData","TableCallData","Code","BitrixIntegrationPassportTab","codeCellData","BitrixTableData","queryParams","ChangePassword","DiscountsTab","editableRow","setEditableRow","confirmDeletion","columnGap","EditDiscountModal","preprocessNumber","safe","lte","isAreaExistsMessage","LogoTab","manualFileEn","manualLinkEn","manualFileRu","manualLinkRu","ControlLine","ManualUploaderTab","loaderData","exhibitorManualRu","exhibitorManualEn","handleSaveSetting","locale","valid","manual","Settings","saverFn","fieldName","global","smtp","NewUsersForm","roleProps","toUsers","roleOption","userIdValue","setUserIdValue","paramsSerializer","indexes","openDeleteModal","UsersTableOptions","UserRole","userRole","deleteUser","usersTableColumns","alignSelf","CartTotal","cart","canPlaceOrder","navigateToOrders","asDraft","dataForSave","additionalComments","carpetColor","fasciaInscription","fasciaInscriptionColor","requestComments","isSpaceOnlyStand","SpaceOnlyStandOrderCommentsForm","ExtendedStandOrderCommentsForm","TotalWrapper","hasCleaningDiscount","TotalRowContainerSummary","CartButtonsContainer","SpaceOnlyStandOrderCommentsFormSchema","CartRow","isNumeric","marginLeft","SmallCloseIcon","colSpan","BackButton","orderDto","cartInstance","setItems","setOrder","setCleaningDiscounts","setMargin","setStandInfo","IsLoadingWrapper","OrderPageWrapper","PageTitleWithService","ExhibitionBoxWrapper","OrderCartWrapper","columnName","tableRow","uniqueKey","AccordionButtonWrapper","PageTitleContainer","AccordionButtonDescription","AccordionTitleWrapper","AccordionTitleContainer","AccordionItemWrapper","AccordionWrapper","OrderRowWrapper","OrdersWrapper","OrderInfoContainer","OrderOptionsContainer","OptionBox","AddOrderButtonContainer","inputRef","useFilesStorage","hasStandId","handleUpload","currentTarget","handleDownloadArchive","hidden","fileUrl","$filesStorage","setStand","defaultAccordionValue","AccordionButtonContent","standName","OrderOptions","canEdit","canRemove","useEditOrderLoader","showPdf","AiFillFilePdf","MdModeEdit","MdDelete","OrderRowContent","useGetOrderItems","getOrderItems","orderLoading","orderItems","setOrderItems","canManageOrder","centered","defaultIndex","allowMultiple","hasOrders","getOrderData","tabIndex","reduceMotion","orderKey","orderTitle","orderTranscriptTableColumns","TranscriptTableRow","TranscriptTableHeader","AccordionSubTitleContainer","pavilionHall","shouldRenderStandNumber","StandTypeLabelsByType","StandConfLabelsByConf","StandConfDescriptionByConf","draftProducts","buildings","orderedBuilding","productsInfo","draftOrderedItems","dp","orderProductIds","draftProduct","responseProduct","filteredProduct","productInfo","categoryDisplayName","setOrderLoading","setErrors","Logo","exhibitionCategoriesObject","getBreadcrumbsByCategory","ExhibitionsCardWrapper","ExhibitionsList","preloadExhibition","useExhibitionDetailedPreload","formattedStartDate","formattedEndDate","ExhibitionsTabs","pastExhibitions","currentExhibitions","ExhibitionsWrapper","useExhibitionLoader","margins","setExhibitions","load","ExhibitionUtils","maxH","StandProjectImage","StandProjectDescription","attachment","setAttachment","CommentForm","approveProject","sortedComments","maxHeight","CustomScroll","heightRelativeToParent","HistoryItem","ownershipLabel","postedByCurrentUser","createdAt","ProjectDescription","noOfLines","fileExtension","toUpperCase","pinLength","currentUser","verify","setValues","PinInput","onComplete","PinInputField","persist","store","adapter","deserialized","set","addEmail","produce","draft","setUser","setIsLoggedIn","setToken","logout","sample","clock","createEffect","handler","CatalogGate","createGate","useGate","Map","$catalog","catalogApi","updateCategories","loadCategoriesFX","sortedCategories","createEvent","$common","navigator","setCategoryOptions","setLanguage","exhibitionInitialState","prepare","setName","setInstance","merged","fn","sync","createLogger","$order","$vatSettings","$orderCompleteness","$loading","units","itemsWithDependencies","hasLinkedProducts","allOrderItemsIds","productWithDeps","depsIDS","dependencyId","dep","addItemsBatch","acc","existing","lp","clearBuildingItems","changeItem","setState","clearProducts","setBuildings","setOrderDto","cleanUpOrderState","$orderTotal","accumulator","currentValue","setStandForOrder","updateBuildingType","resetOriginalBuildingType","Global","brandPrimary","defineStyle","lineHeight","brandSecondary","buttonTheme","defineStyleConfig","variants","defaultProps","extendTheme","boxSizing","sizes","colors","brandColor","components","useIntl","buffer","Intl","NumberFormat","parts","silent","Patch","Post","Get","Put","isDate","getTime","findLatestDate","dates","latestDate","dateString","sortByDateAddedDescending","array","dateA","dateB","list","isBrokenIndexing","lst","arr","reorder","forceNormalized","minIndex","greatestIndex","isFullListOrdering","hasBrokenIndexing","removed","ghostStartIndex","ghostEndIndex","ghostArray","reverse","getListStyle","getItemStyle","splitExhibitionByDate","fetchApi","endpoint","baseUrl","appendTrailingSlash","saveBlobAsFile","blob","saveUrlAsFile","saveUrlToBlob","urlToBlob","fetch","res","toDataURL","revokeObjectURL","removeEventListener","addEventListener","transformed","roundToNearestQuarter","numberToRound","round","createProductFromPriceListItem","categorySource","route","obj","appendTimestampToUrl","urlObject","URLSearchParams","now"],"mappings":";6PAoBA,EAXA,WACE,MACE,WAAC,EAAAA,cAAc,EAACC,MAAO,SAAa,WAClC,UAAC,EAAAC,YAAY,KACb,UAAC,EAAAC,cAAc,KACf,UAAC,EAAAC,cAAc,KACf,UAAC,EAAAC,oBAAoB,OAG3B,uJCYA,EAxBkB,WAChB,IAAMC,EAAW,IAAI,EAAAC,QAAQ,CAAC,CAC5BC,GAAI,EAAAC,QAAQ,CACZC,KAAM,EAAAD,QAAQ,CACdE,YAAa,WAAM,CAAC,EAAAF,QAAQ,CAC9B,GAOA,MAAO,CACL,CACEG,SARe,IAAI,EAAAL,QAAQ,CAAC,CAC9BC,GAAI,EAAAK,WAAW,CACfH,KAAM,EAAAG,WAAW,CACjBF,YAAa,WAAM,CAAC,EAAAE,WAAW,CACjC,GAKIC,MAAO,UAAC,SAAe,IACzB,EACA,CACEF,SAAUN,EACVQ,MAAO,UAAC,SAAe,IACzB,EACD,AACH,0JCtBaC,EAAY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