{"version":3,"file":"static/js/main.8b0aa145.js","sources":["../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/regenerator/index.js","ThemedWrapper/ThemedComponents/TokenInputSized.tsx","ThemedWrapper/ThemedComponents/FilterToken.tsx","ThemedWrapper/ThemedComponents/ThemedMenuItem.tsx","utils/images/SearchPeople.svg","webpack://control-panel-front/./src/components/Ads/PamAdvertisement/PamAdvertisement.module.css?f810","components/Ads/PamAdvertisement/PamAdvertisement.tsx","webpack://control-panel-front/./src/components/Footer/Footer.module.css?bcd4","components/Footer/Footer.tsx","webpack://control-panel-front/./src/components/License/LicenseErrorBanner/components/LicenseErrorCaption/LicenseErrorCaption.module.css?413c","components/License/LicenseErrorBanner/components/LicenseErrorCaption/LicenseErrorCaption.tsx","webpack://control-panel-front/./src/components/License/LicenseErrorBanner/components/LicenseErrorDetailsList/LicenseErrorDetailsList.module.css?9007","components/License/LicenseErrorBanner/components/LicenseErrorDetailsList/LicenseErrorDetailsList.tsx","webpack://control-panel-front/./src/components/License/LicenseErrorBanner/components/LicenseWarning/LicenseWarning.module.css?c023","components/License/LicenseErrorBanner/components/LicenseWarning/LicenseWarning.tsx","webpack://control-panel-front/./src/components/License/LicenseErrorBanner/LicenseErrorBanner.module.css?4e5f","components/License/LicenseErrorBanner/LicenseErrorBanner.tsx","webpack://control-panel-front/./src/components/App/App.module.css?583a","../node_modules/@skbkontur/logos/src/Pam.js","components/App/data.tsx","../node_modules/@skbkontur/react-ui-addons/lib/utils/getKonturAvatarUrl.js","components/App/Menu.tsx","components/App/utils.ts","components/App/Content.tsx","context/AppStateHooks/OrganizationState.tsx","context/AppStateHooks/CurrentUserState.tsx","webpack://control-panel-front/./src/components/Errors/CustomError/CustomError.module.css?9a61","components/Errors/CustomError/CustomError.tsx","webpack://control-panel-front/./src/components/Errors/ErrorBlock/ErrorBlock.module.css?05ee","components/Errors/ErrorBlock/ErrorBlock.tsx","components/Roles/EditRoleModal/util.ts","../node_modules/typograf/dist/typograf.es.mjs","utils/metrics/tracker.ts","../node_modules/@skbkontur/support-center/node_modules/nanoid/index.browser.js","../node_modules/@skbkontur/support-center/src/constants/attributes.ts","../node_modules/@skbkontur/support-center/src/supportButton.ts","../node_modules/@skbkontur/support-center/src/utils/defineReactUIStackInfoCheckerInWindow.ts","../node_modules/@skbkontur/support-center/src/reactUIStackInfoChecker.ts","../node_modules/@skbkontur/support-center/src/feedSdkProxy.ts","../node_modules/@skbkontur/support-center/src/resizeNode.ts","../node_modules/@skbkontur/support-center/src/movementNode.ts","../node_modules/@skbkontur/support-center/src/widgetContainer.ts","../node_modules/@skbkontur/support-center/src/constants/iframeSettings.ts","../node_modules/@skbkontur/support-center/src/utils/definePostMessageTransportInTheGlobalScope.ts","../node_modules/@skbkontur/support-center/src/utils/eventEmitter.ts","../node_modules/@skbkontur/support-center/src/postMessageTransport.ts","../node_modules/@skbkontur/support-center/src/utils/typePredicates.ts","../node_modules/@skbkontur/support-center/src/supportCenter.ts","../node_modules/@skbkontur/support-center/src/utils/createIFrame.ts","../node_modules/@skbkontur/support-center/src/utils/getSupportCenterEventEmitter.ts","../node_modules/@skbkontur/support-center/src/utils/defineSupportCenterInTheGlobalScope.ts","utils/supportCenter.ts","context/ServiceContext.tsx","webpack://control-panel-front/./src/shared/Block/Block.module.css?1eb6","shared/Block/Block.tsx","shared/Buttons/DefaultButton.tsx","shared/Buttons/RedButton.tsx","webpack://control-panel-front/./src/shared/CustomModal/CustomModal.module.css?c874","shared/CustomModal/CustomModal.tsx","webpack://control-panel-front/./src/shared/GlobalLoader/GlobalLoader.module.css?3be5","shared/GlobalLoader/GlobalLoader.tsx","../node_modules/react-content-loader/src/shared/uid.ts","../node_modules/react-content-loader/src/web/Svg.tsx","../node_modules/react-content-loader/src/web/ContentLoader.tsx","../node_modules/react-content-loader/src/web/presets/FacebookStyle.tsx","webpack://control-panel-front/./src/shared/ListSkeleton/ListSkeleton.module.css?0d88","shared/ListSkeleton/ListSkeleton.tsx","webpack://control-panel-front/./src/shared/Table/Table.module.css?f425","shared/Table/Table.tsx","webpack://control-panel-front/./src/shared/Question/Question.module.css?a276","shared/Question/Question.tsx","webpack://control-panel-front/./src/shared/AdminModal/AdminModal.module.css?a6fb","shared/AdminModal/AdminModal.tsx","webpack://control-panel-front/./src/shared/AdminRoleCell/AdminRoleCell.module.css?3aa0","shared/AdminRoleCell/AdminRoleCell.tsx","../node_modules/@skbkontur/react-ui/lib/events/fixClickFocusIE/fixClickFocusIE.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/CustomComboBoxReducer/CustomComboBoxReducer.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/CustomComboBox.styles/CustomComboBox.styles.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/ComboBoxView/ComboBoxView.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/CustomComboBox/CustomComboBox.js","../node_modules/@skbkontur/react-ui/components/ComboBox/ComboBox/ComboBox.js","shared/ColoredPad/ColoredPad.tsx","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/ArrowDownIcon/ArrowDownIcon.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/getComboBoxTheme/getComboBoxTheme.js","webpack://control-panel-front/./src/shared/AutocompleteSearch/AutocompleteSearch.module.css?e943","shared/AutocompleteSearch/AutocompleteSearch.tsx","webpack://control-panel-front/./src/shared/Banner/Banner.module.css?9053","shared/Banner/Banner.tsx","webpack://control-panel-front/./src/shared/BlockWithDescription/BlockWithDescription.module.css?8c8d","shared/BlockWithDescription/BlockWithDescription.tsx","webpack://control-panel-front/./src/shared/Border/Border.module.css?1c51","shared/Border/Border.tsx","webpack://control-panel-front/./src/shared/Caption/Caption.module.css?f205","shared/Caption/Caption.tsx","webpack://control-panel-front/./src/shared/ColoredPad/ColoredPad.module.css?7309","components/Images/PeopleNotification.svg","webpack://control-panel-front/./src/shared/ColoredSection/ColoredSection.module.css?beef","shared/ColoredSection/ColoredSection.tsx","webpack://control-panel-front/./src/shared/ConfirmationModal/ConfirmationModal.module.css?5815","shared/ConfirmationModal/ConfirmationModal.tsx","webpack://control-panel-front/./src/shared/DetailsFormItem/DetailsFormItem.module.css?ae14","shared/DetailsFormItem/DetailsFormItem.tsx","webpack://control-panel-front/./src/shared/Expander/Expander.module.css?1c5f","shared/Expander/Expander.tsx","shared/FromToFilter/util.ts","webpack://control-panel-front/./src/shared/FailedResult/FailedResult.module.css?6421","shared/FailedResult/FailedResult.tsx","webpack://control-panel-front/./src/shared/FileUploader/AddedFile/AddedFile.module.css?60a5","shared/FileUploader/AddedFile/AddedFile.tsx","webpack://control-panel-front/./src/shared/FileUploader/UploadFile/UploadFile.module.css?9efc","shared/FileUploader/UploadFile/UploadFile.tsx","webpack://control-panel-front/./src/shared/FiltersResultCaption/FiltersResultCaption.module.css?764e","shared/FiltersResultCaption/FiltersResultCaption.tsx","webpack://control-panel-front/./src/shared/FromToFilter/FromToFilter.module.css?1a06","shared/FromToFilter/FromToFilter.tsx","shared/GoBackLink/GoBackLink.tsx","shared/ImageWithProps/ImageWithProps.tsx","../node_modules/react-infinite-scroll-component/node_modules/tslib/tslib.es6.js","../node_modules/react-infinite-scroll-component/node_modules/throttle-debounce/dist/index.esm.js","webpack://control-panel-front/./src/shared/InfiniteScrollable/InfiniteScrollable.module.css?e61f","shared/InfiniteScrollable/InfiniteScrollable.tsx","webpack://control-panel-front/./src/shared/Item/Item.module.css?1393","shared/Item/Item.tsx","webpack://control-panel-front/./src/shared/LabelForInput/LabelForInput.module.css?a8b3","shared/LabelForInput/LabelForInput.tsx","webpack://control-panel-front/./src/shared/Line/Line.module.css?012b","shared/Line/Line.tsx","webpack://control-panel-front/./src/shared/LoginInputWithTip/LoginInputWithTip.module.css?1e03","shared/LoginInputWithTip/LoginInputWithTip.tsx","webpack://control-panel-front/./src/shared/TooltipOverTruncated/TooltipOverTruncated.module.css?825a","shared/TooltipOverTruncated/TooltipOverTruncated.tsx","shared/LoginWithDomain/LoginWithDomain.tsx","shared/LogonCaption/LogonCaption.tsx","webpack://control-panel-front/./src/shared/LogonsList/LogonsList.module.css?e605","shared/LogonsList/LogonsList.tsx","webpack://control-panel-front/./src/shared/MultipleInput/MultipleInput.module.css?b6a3","shared/MultipleInput/MultipleInput.tsx","webpack://control-panel-front/./src/shared/MultipleTabs/MultipleTabs.module.css?64db","shared/MultipleTabs/MultipleTabs.tsx","webpack://control-panel-front/./src/shared/ProgressChart/ProgressChart.module.css?7679","shared/ProgressChart/ProgressChart.tsx","shared/Redirect/Redirect.tsx","shared/Search/Search.tsx","shared/SelectTimezone/SelectTimezone.tsx","webpack://control-panel-front/./src/shared/ShowMoreButton/ShowMoreButton.module.css?f3fb","shared/ShowMoreButton/ShowMoreButton.tsx","shared/SideMenuLink/SideMenuLink.tsx","webpack://control-panel-front/./src/shared/StatisticsBlock/StatisticsBlock.module.css?cd20","shared/StatisticsBlock/StatisticsBlock.tsx","webpack://control-panel-front/./src/shared/StatisticsItem/StatisticsItem.module.css?3593","shared/StatisticsItem/StatisticsItem.tsx","webpack://control-panel-front/./src/shared/TableFilterMenu/TableFilterMenu.module.css?71a1","shared/TableFilterMenu/TableFilterMenu.tsx","webpack://control-panel-front/./src/shared/TableFiltersPanel/TableFiltersPanel.module.css?395c","shared/TableFiltersPanel/TableFiltersPanel.tsx","webpack://control-panel-front/./src/shared/TableRow/TableRow.module.css?4826","shared/TableRow/TableRow.tsx","webpack://control-panel-front/./src/shared/TabsWrapper/TabsWrapper.module.css?f3d4","shared/TabsWrapper/TabsWrapper.tsx","webpack://control-panel-front/./src/shared/TimeInterval/TimeInterval.module.css?e712","shared/TimeInterval/TimeInterval.tsx","webpack://control-panel-front/./src/shared/TrashIcon/TrashIcon.module.css?00ff","shared/TrashIcon/TrashIcon.tsx","webpack://control-panel-front/./src/shared/UserPad/UserPad.module.css?8d38","shared/UserPad/UserPad.tsx","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/core/AxiosError.js","../node_modules/axios/lib/env/classes/FormData.js","../node_modules/axios/lib/helpers/toFormData.js","../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/defaults/transitional.js","../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../node_modules/axios/lib/platform/browser/classes/FormData.js","../node_modules/axios/lib/platform/browser/index.js","../node_modules/axios/lib/helpers/formDataToJSON.js","../node_modules/axios/lib/defaults/index.js","../node_modules/axios/lib/helpers/toURLEncodedForm.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/core/AxiosHeaders.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/cancel/CanceledError.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/helpers/speedometer.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/adapters/adapters.js","../node_modules/axios/lib/helpers/null.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/parseProtocol.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/env/data.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/axios.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","utils/api/AdminsApi/AdminsApi.ts","utils/api/AdminsApi/AdminsInvitesApi.ts","utils/api/ConfigurationsApi/ActiveSyncApi.ts","utils/api/ConfigurationsApi/ConfigurationsApi.ts","utils/api/ConfigurationsApi/PamRdgApi.ts","utils/api/ConfigurationsApi/RadiusApi.ts","utils/api/ConfigurationsApi/SshApi.ts","utils/api/ConfigurationsApi/WindowsApi.ts","utils/api/EnvironmentSettingsApi/EnvironmentSettingsApi.ts","utils/api/EventsApi/EventsApi.ts","utils/api/LicenseApi/LicenseApi.ts","utils/api/MachinesApi/MachinesApi.ts","utils/api/OrganizationsApi/OrganizationsApi.ts","utils/api/PermissionsApi/PermissionsApi.ts","utils/api/RolesApi/RolesApi.ts","utils/api/SessionsApi/SessionsApi.ts","utils/api/UsersApi/GroupsApi.ts","utils/api/UsersApi/utils.ts","utils/api/UsersApi/UsersApi.ts","utils/api/UsersApi/UsersInvitesApi.ts","utils/api/index.ts","utils/api/utils.ts","utils/common.ts","utils/constants.ts","utils/hooks/ScrollToTopOnMount.tsx","utils/hooks/useCheckAuth.tsx","utils/hooks/useErrorModal.tsx","utils/hooks/useTimeout.tsx","utils/hooks/useUpdateInfiniteScroll.tsx","utils/hooks/useMetrics.tsx","utils/hooks/useResponsiveLayout.tsx","utils/hooks/useTimeDebounce.ts","utils/metrics/constants.ts","utils/navigation/pageTabs.tsx","utils/navigation/routes.ts","utils/permissions.tsx","utils/storage/localStorage.ts","utils/storage/sessionStorage.ts","utils/storage/index.ts","utils/time.ts","utils/types/configurationTypes.ts","utils/types/eventsTypes.ts","utils/types/factorTypes.ts","utils/types/environmentTypes.ts","utils/types/invitesTypes.ts","utils/types/policyTypes.ts","utils/types/radiusConfigurationTypes.ts","utils/types/userTypes.ts","utils/types/validationErrors.ts","utils/types/windowsConfigurationTypes.ts","utils/types/rolesTypes.ts","utils/types/sourceTypes.ts","utils/parseTypes.ts","utils/urls.ts","utils/validationErrors.tsx","../node_modules/@remix-run/router/history.ts","../node_modules/@remix-run/router/utils.ts","../node_modules/@babel/runtime/helpers/esm/toArray.js","../node_modules/@remix-run/router/router.ts","../node_modules/@skbkontur/colors/dist/esm/colors.js","../node_modules/@skbkontur/global-object/index.js","../node_modules/@skbkontur/global-object/types.js","../node_modules/@skbkontur/icons/ArrowALeftIcon20Regular.js","../node_modules/@skbkontur/icons/ArrowCDownIcon16Regular.js","../node_modules/@skbkontur/icons/ArrowCLeftIcon16Regular.js","../node_modules/@skbkontur/icons/ArrowCRightIcon16Regular.js","../node_modules/@skbkontur/icons/ArrowRoundSyncForwardIcon16Light.js","../node_modules/@skbkontur/icons/ArrowUiCornerOutUpRightIcon16Regular.js","../node_modules/@skbkontur/icons/ArrowUiCornerOutUpRightIcon20Regular.js","../node_modules/@skbkontur/icons/AttachLinkIcon20Regular.js","../node_modules/@skbkontur/icons/BagBriefcaseIcon24Regular.js","../node_modules/@skbkontur/icons/BlockIcon16Light.js","../node_modules/@skbkontur/icons/BlockIcon16Regular.js","../node_modules/@skbkontur/icons/BlockIcon20Regular.js","../node_modules/@skbkontur/icons/BlockIcon24Regular.js","../node_modules/@skbkontur/icons/BookClosedHelpIcon24Regular.js","../node_modules/@skbkontur/icons/BookNotepadIcon20Regular.js","../node_modules/@skbkontur/icons/BookNotepadIcon24Regular.js","../node_modules/@skbkontur/icons/CheckSquareIcon20Regular.js","../node_modules/@skbkontur/icons/CopyIcon16Light.js","../node_modules/@skbkontur/icons/CopyIcon20Regular.js","../node_modules/@skbkontur/icons/DataChartBarsAIcon24Regular.js","../node_modules/@skbkontur/icons/FaceAHappyIcon24Regular.js","../node_modules/@skbkontur/icons/FileFormatCsvIcon20Light.js","../node_modules/@skbkontur/icons/JewelCrownIcon24Regular.js","../node_modules/@skbkontur/icons/MailArrowOutIcon16Light.js","../node_modules/@skbkontur/icons/MailIcon16Light.js","../node_modules/@skbkontur/icons/NetDownloadIcon16Light.js","../node_modules/@skbkontur/icons/NetDownloadIcon16Regular.js","../node_modules/@skbkontur/icons/NetDownloadIcon24Regular.js","../node_modules/@skbkontur/icons/NetUploadIcon20Regular.js","../node_modules/@skbkontur/icons/People2Icon24Regular.js","../node_modules/@skbkontur/icons/PeopleCircle1Icon20Regular.js","../node_modules/@skbkontur/icons/PlusIcon16Regular.js","../node_modules/@skbkontur/icons/PlusIcon20Light.js","../node_modules/@skbkontur/icons/PlusIcon20Regular.js","../node_modules/@skbkontur/icons/PlusIcon24Regular.js","../node_modules/@skbkontur/icons/QuestionCircleIcon16Regular.js","../node_modules/@skbkontur/icons/SearchLoupeIcon20Light.js","../node_modules/@skbkontur/icons/SecurityLockOpenIcon24Regular.js","../node_modules/@skbkontur/icons/SettingsGearIcon24Regular.js","../node_modules/@skbkontur/icons/SettingsSlidersH2Icon20Light.js","../node_modules/@skbkontur/icons/ShapeCircleIcon16Solid.js","../node_modules/@skbkontur/icons/StarIcon20Regular.js","../node_modules/@skbkontur/icons/TechPcDesktopIcon24Regular.js","../node_modules/@skbkontur/icons/TechPhoneClassicIcon16Solid.js","../node_modules/@skbkontur/icons/TechServerIcon24Regular.js","../node_modules/@skbkontur/icons/TimeClockIcon20Solid.js","../node_modules/@skbkontur/icons/ToolPencilLineIcon16Light.js","../node_modules/@skbkontur/icons/ToolPencilLineIcon16Regular.js","../node_modules/@skbkontur/icons/TrashCanIcon16Light.js","../node_modules/@skbkontur/icons/TrashCanIcon16Regular.js","../node_modules/@skbkontur/icons/TrashCanIcon20Regular.js","../node_modules/@skbkontur/icons/TrashCanIcon24Regular.js","../node_modules/@skbkontur/icons/TrashCanIcon64Regular.js","../node_modules/@skbkontur/icons/UiFilterFunnelIcon16Light.js","../node_modules/@skbkontur/icons/UiFilterSortAHighToLowIcon16Regular.js","../node_modules/@skbkontur/icons/UiFilterSortALowToHighIcon16Regular.js","../node_modules/@skbkontur/icons/UiMenuDots3HIcon24Regular.js","../node_modules/@skbkontur/icons/WarningTriangleIcon20Regular.js","../node_modules/@skbkontur/icons/XCircleIcon16Light.js","../node_modules/@skbkontur/icons/XCircleIcon16Solid.js","../node_modules/@skbkontur/icons/XCircleIcon20Solid.js","../node_modules/@skbkontur/icons/XCircleIcon64Regular.js","../node_modules/@skbkontur/icons/XIcon16Light.js","../node_modules/@skbkontur/icons/XIcon20Light.js","../node_modules/@skbkontur/icons/XIcon20Regular.js","../node_modules/@skbkontur/icons/XIcon32Regular.js","../node_modules/@skbkontur/icons/helpers/forwardRef.js","../node_modules/@skbkontur/icons/icons/ArrowALeftIcon/ArrowALeftIcon20Regular.js","../node_modules/@skbkontur/icons/icons/ArrowCDownIcon/ArrowCDownIcon16Regular.js","../node_modules/@skbkontur/icons/icons/ArrowCLeftIcon/ArrowCLeftIcon16Regular.js","../node_modules/@skbkontur/icons/icons/ArrowCRightIcon/ArrowCRightIcon16Regular.js","../node_modules/@skbkontur/icons/icons/ArrowRoundSyncForwardIcon/ArrowRoundSyncForwardIcon16Light.js","../node_modules/@skbkontur/icons/icons/ArrowUiCornerOutUpRightIcon/ArrowUiCornerOutUpRightIcon16Regular.js","../node_modules/@skbkontur/icons/icons/ArrowUiCornerOutUpRightIcon/ArrowUiCornerOutUpRightIcon20Regular.js","../node_modules/@skbkontur/icons/icons/AttachLinkIcon/AttachLinkIcon20Regular.js","../node_modules/@skbkontur/icons/icons/BagBriefcaseIcon/BagBriefcaseIcon24Regular.js","../node_modules/@skbkontur/icons/icons/BlockIcon/BlockIcon16Light.js","../node_modules/@skbkontur/icons/icons/BlockIcon/BlockIcon16Regular.js","../node_modules/@skbkontur/icons/icons/BlockIcon/BlockIcon20Regular.js","../node_modules/@skbkontur/icons/icons/BlockIcon/BlockIcon24Regular.js","../node_modules/@skbkontur/icons/icons/BookClosedHelpIcon/BookClosedHelpIcon24Regular.js","../node_modules/@skbkontur/icons/icons/BookNotepadIcon/BookNotepadIcon20Regular.js","../node_modules/@skbkontur/icons/icons/BookNotepadIcon/BookNotepadIcon24Regular.js","../node_modules/@skbkontur/icons/icons/CheckSquareIcon/CheckSquareIcon20Regular.js","../node_modules/@skbkontur/icons/icons/CopyIcon/CopyIcon16Light.js","../node_modules/@skbkontur/icons/icons/CopyIcon/CopyIcon20Regular.js","../node_modules/@skbkontur/icons/icons/DataChartBarsAIcon/DataChartBarsAIcon24Regular.js","../node_modules/@skbkontur/icons/icons/FaceAHappyIcon/FaceAHappyIcon24Regular.js","../node_modules/@skbkontur/icons/icons/FileFormatCsvIcon/FileFormatCsvIcon20Light.js","../node_modules/@skbkontur/icons/icons/JewelCrownIcon/JewelCrownIcon24Regular.js","../node_modules/@skbkontur/icons/icons/MailArrowOutIcon/MailArrowOutIcon16Light.js","../node_modules/@skbkontur/icons/icons/MailIcon/MailIcon16Light.js","../node_modules/@skbkontur/icons/icons/NetDownloadIcon/NetDownloadIcon16Light.js","../node_modules/@skbkontur/icons/icons/NetDownloadIcon/NetDownloadIcon16Regular.js","../node_modules/@skbkontur/icons/icons/NetDownloadIcon/NetDownloadIcon24Regular.js","../node_modules/@skbkontur/icons/icons/NetUploadIcon/NetUploadIcon20Regular.js","../node_modules/@skbkontur/icons/icons/People2Icon/People2Icon24Regular.js","../node_modules/@skbkontur/icons/icons/PeopleCircle1Icon/PeopleCircle1Icon20Regular.js","../node_modules/@skbkontur/icons/icons/PlusIcon/PlusIcon16Regular.js","../node_modules/@skbkontur/icons/icons/PlusIcon/PlusIcon20Light.js","../node_modules/@skbkontur/icons/icons/PlusIcon/PlusIcon20Regular.js","../node_modules/@skbkontur/icons/icons/PlusIcon/PlusIcon24Regular.js","../node_modules/@skbkontur/icons/icons/QuestionCircleIcon/QuestionCircleIcon16Regular.js","../node_modules/@skbkontur/icons/icons/SearchLoupeIcon/SearchLoupeIcon20Light.js","../node_modules/@skbkontur/icons/icons/SecurityLockOpenIcon/SecurityLockOpenIcon24Regular.js","../node_modules/@skbkontur/icons/icons/SettingsGearIcon/SettingsGearIcon24Regular.js","../node_modules/@skbkontur/icons/icons/SettingsSlidersH2Icon/SettingsSlidersH2Icon20Light.js","../node_modules/@skbkontur/icons/icons/ShapeCircleIcon/ShapeCircleIcon16Solid.js","../node_modules/@skbkontur/icons/icons/StarIcon/StarIcon20Regular.js","../node_modules/@skbkontur/icons/icons/TechPcDesktopIcon/TechPcDesktopIcon24Regular.js","../node_modules/@skbkontur/icons/icons/TechPhoneClassicIcon/TechPhoneClassicIcon16Solid.js","../node_modules/@skbkontur/icons/icons/TechServerIcon/TechServerIcon24Regular.js","../node_modules/@skbkontur/icons/icons/TimeClockIcon/TimeClockIcon20Solid.js","../node_modules/@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Light.js","../node_modules/@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular.js","../node_modules/@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Light.js","../node_modules/@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular.js","../node_modules/@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon20Regular.js","../node_modules/@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon24Regular.js","../node_modules/@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon64Regular.js","../node_modules/@skbkontur/icons/icons/UiFilterFunnelIcon/UiFilterFunnelIcon16Light.js","../node_modules/@skbkontur/icons/icons/UiFilterSortAHighToLowIcon/UiFilterSortAHighToLowIcon16Regular.js","../node_modules/@skbkontur/icons/icons/UiFilterSortALowToHighIcon/UiFilterSortALowToHighIcon16Regular.js","../node_modules/@skbkontur/icons/icons/UiMenuBars3HIcon/UiMenuBars3HIcon24Regular.js","../node_modules/@skbkontur/icons/icons/UiMenuDots3HIcon/UiMenuDots3HIcon24Regular.js","../node_modules/@skbkontur/icons/icons/WarningTriangleIcon/WarningTriangleIcon20Regular.js","../node_modules/@skbkontur/icons/icons/XCircleIcon/XCircleIcon16Light.js","../node_modules/@skbkontur/icons/icons/XCircleIcon/XCircleIcon16Solid.js","../node_modules/@skbkontur/icons/icons/XCircleIcon/XCircleIcon20Solid.js","../node_modules/@skbkontur/icons/icons/XCircleIcon/XCircleIcon64Regular.js","../node_modules/@skbkontur/icons/icons/XIcon/XIcon16Light.js","../node_modules/@skbkontur/icons/icons/XIcon/XIcon20Light.js","../node_modules/@skbkontur/icons/icons/XIcon/XIcon20Regular.js","../node_modules/@skbkontur/icons/icons/XIcon/XIcon32Regular.js","../node_modules/@skbkontur/icons/internal/BaseIcon.js","../node_modules/@skbkontur/icons/internal/Icon.js","../node_modules/@skbkontur/icons/internal/correctIconPosition.js","../node_modules/@skbkontur/icons/internal/cssRules.js","../node_modules/@skbkontur/icons/internal/getIconPosition.js","../node_modules/@skbkontur/icons/internal/injectCss.js","../node_modules/@skbkontur/icons/internal/utils.js","../node_modules/@skbkontur/km-tracker/dist/tracker.js","../node_modules/@skbkontur/km-tracker/node_modules/react/cjs/react.production.min.js","../node_modules/@skbkontur/km-tracker/node_modules/react/index.js","../node_modules/@skbkontur/logos/src/Id.js","../node_modules/@skbkontur/logos/src/Kontur.js","../node_modules/@skbkontur/react-ui-addons/node_modules/classnames/index.js","../node_modules/src/ValidationText.tsx","../node_modules/src/utils/isNonNullable/isNonNullable.ts","../node_modules/src/ReactUiDetection.ts","../node_modules/src/ValidationTooltip.tsx","../node_modules/src/ErrorRenderer.tsx","../node_modules/src/utils/utils.ts","../node_modules/src/utils/isNullable/isNullable.ts","../node_modules/src/ValidationContextWrapper.tsx","../node_modules/src/ValidationContainer.tsx","../node_modules/src/utils/createPropsGetter.ts","../node_modules/src/utils/getRootNode/getRootNode.ts","../node_modules/src/smoothScrollIntoView.ts","../node_modules/src/ValidationHelper.ts","../node_modules/src/ValidationWrapperInternal.tsx","../node_modules/src/ValidationWrapper.tsx","../node_modules/src/Validations/ValidationBuilder.ts","../node_modules/src/Validations/ValidationReader.ts","../node_modules/src/Validations/ValidationWriter.ts","../node_modules/src/Validations/PathHelper.ts","../node_modules/@skbkontur/react-ui/components/Button/Button.mixins/Button.mixins.js","../node_modules/@skbkontur/react-ui/components/Button/Button.styles/Button.styles.js","../node_modules/@skbkontur/react-ui/components/Button/ButtonIcon.styles/ButtonIcon.styles.js","../node_modules/@skbkontur/react-ui/components/Button/LoadingButtonIcon/LoadingButtonIcon.js","../node_modules/@skbkontur/react-ui/components/Button/ButtonIcon/ButtonIcon.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon16Light/ArrowARightIcon16Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon20Light/ArrowARightIcon20Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon24Regular/ArrowARightIcon24Regular.js","../node_modules/@skbkontur/react-ui/components/Button/ArrowRightIcon/ArrowRightIcon.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon16Light/ArrowALeftIcon16Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon20Light/ArrowALeftIcon20Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon24Regular/ArrowALeftIcon24Regular.js","../node_modules/@skbkontur/react-ui/components/Button/ArrowLeftIcon/ArrowLeftIcon.js","../node_modules/@skbkontur/react-ui/components/Button/ButtonArrow/ButtonArrow.js","../node_modules/@skbkontur/react-ui/components/Button/getInnerLinkTheme/getInnerLinkTheme.js","../node_modules/@skbkontur/react-ui/components/Button/Button/Button.js","../node_modules/@skbkontur/react-ui/components/Center/Center.styles/Center.styles.js","../node_modules/@skbkontur/react-ui/components/Center/Center/Center.js","../node_modules/@skbkontur/react-ui/lib/date/types/types.js","../node_modules/@skbkontur/react-ui/lib/date/constants/constants.js","../node_modules/@skbkontur/react-ui/lib/date/InternalDateGetter/InternalDateGetter.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowAUpIcon/ArrowAUp16Light/ArrowAUp16Light.js","../node_modules/@skbkontur/react-ui/lib/date/InternalDateCalculator/InternalDateCalculator.js","../node_modules/@skbkontur/react-ui/lib/date/InternalDateSetter/InternalDateSetter.js","../node_modules/@skbkontur/react-ui/lib/date/InternalDateValidator/InternalDateValidator.js","../node_modules/@skbkontur/react-ui/lib/date/InternalDateTransformer/InternalDateTransformer.js","../node_modules/@skbkontur/react-ui/lib/date/localeSets/localeSets.js","../node_modules/@skbkontur/react-ui/components/DateInput/DateFragmentsView.styles/DateFragmentsView.styles.js","../node_modules/@skbkontur/react-ui/components/DateInput/DateInput.styles/DateInput.styles.js","../node_modules/@skbkontur/react-ui/components/DateInput/helpers/DateInputKeyboardActions/DateInputKeyboardActions.js","../node_modules/@skbkontur/react-ui/lib/date/InternalDate/InternalDate.js","../node_modules/@skbkontur/react-ui/lib/ConditionalHandler/ConditionalHandler.js","../node_modules/@skbkontur/react-ui/components/DatePicker/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/Calendar/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/internal/DateSelect/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/DatePicker/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/Calendar/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/internal/DateSelect/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/DatePicker/locale/index/index.js","../node_modules/@skbkontur/react-ui/internal/icons2022/CalendarIcon/CalendarIcon16Light/CalendarIcon16Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/CalendarIcon/CalendarIcon20Light/CalendarIcon20Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/CalendarIcon/CalendarIcon24Regular/CalendarIcon24Regular.js","../node_modules/@skbkontur/react-ui/components/DateInput/CalendarIcon/CalendarIcon.js","../node_modules/@skbkontur/react-ui/components/DateInput/DateFragmentsView/DateFragmentsView.js","../node_modules/@skbkontur/react-ui/lib/extractKeyboardAction/extractKeyboardAction.js","../node_modules/@skbkontur/react-ui/components/DateInput/helpers/inputNumber/inputNumber.js","../node_modules/@skbkontur/react-ui/components/DateInput/helpers/InternalDateMediator/InternalDateMediator.js","../node_modules/@skbkontur/react-ui/components/DateInput/DateInput/DateInput.js","../node_modules/@skbkontur/react-ui/internal/NativeDateInput/NativeDateInput.styles/NativeDateInput.styles.js","../node_modules/@skbkontur/react-ui/internal/NativeDateInput/utils/utils.js","../node_modules/@skbkontur/react-ui/internal/NativeDateInput/NativeDateInput/NativeDateInput.js","../node_modules/@skbkontur/react-ui/lib/animation/stepper/stepper.js","../node_modules/@skbkontur/react-ui/lib/animation/presets/presets.js","../node_modules/@skbkontur/react-ui/lib/animation/index/index.js","../node_modules/@skbkontur/react-ui/lib/memo/memo.js","../node_modules/@skbkontur/react-ui/components/Calendar/config/config.js","../node_modules/@skbkontur/react-ui/components/Calendar/DayCellViewModel/DayCellViewModel.js","../node_modules/@skbkontur/react-ui/components/Calendar/MonthViewModel/MonthViewModel.js","../node_modules/@skbkontur/react-ui/components/Calendar/CalendarScrollEvents/CalendarScrollEvents.js","../node_modules/@skbkontur/react-ui/components/Calendar/CalendarDateShape/CalendarDateShape.js","../node_modules/@skbkontur/react-ui/internal/DateSelect/DateSelect.styles/DateSelect.styles.js","../node_modules/@skbkontur/react-ui/internal/DateSelect/DateSelect/DateSelect.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCollapseCVOpenIcon/ArrowCollapseCVOpenIcon16Regular/ArrowCollapseCVOpenIcon16Regular.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCUpIcon/ArrowCUpIcon16Regular/ArrowCUpIcon16Regular.js","../node_modules/@skbkontur/react-ui/components/Calendar/MonthView.styles/MonthView.styles.js","../node_modules/@skbkontur/react-ui/components/Calendar/MonthView/MonthView.js","../node_modules/@skbkontur/react-ui/components/Calendar/DayCellView.styles/DayCellView.styles.js","../node_modules/@skbkontur/react-ui/components/Calendar/DayCellView/DayCellView.js","../node_modules/@skbkontur/react-ui/components/Calendar/Month/Month.js","../node_modules/@skbkontur/react-ui/components/Calendar/Calendar.styles/Calendar.styles.js","../node_modules/@skbkontur/react-ui/components/Calendar/Calendar/Calendar.js","../node_modules/@skbkontur/react-ui/components/DatePicker/DatePicker.styles/DatePicker.styles.js","../node_modules/@skbkontur/react-ui/components/DatePicker/DatePicker/DatePicker.js","../node_modules/@skbkontur/react-ui/components/Calendar/CalendarUtils/CalendarUtils.js","../node_modules/@skbkontur/react-ui/internal/PopupMenu/PopupMenu.styles/PopupMenu.styles.js","../node_modules/@skbkontur/react-ui/internal/PopupMenu/PopupMenu/PopupMenu.js","../node_modules/@skbkontur/react-ui/components/DropdownMenu/DropdownMenu/DropdownMenu.js","../node_modules/@skbkontur/react-ui/internal/PopupMenu/validatePositions/validatePositions.js","../node_modules/@skbkontur/react-ui/components/DropdownMenu/getDropdownMenuTheme/getDropdownMenuTheme.js","../node_modules/@skbkontur/react-ui/components/Gapped/Gapped/Gapped.js","../node_modules/@skbkontur/react-ui/components/Hint/Hint.styles/Hint.styles.js","../node_modules/@skbkontur/react-ui/components/Hint/Hint/Hint.js","../node_modules/@skbkontur/react-ui/components/Input/Input.styles/Input.styles.js","../node_modules/@skbkontur/react-ui/components/Input/InputLayout/InputLayout.styles/InputLayout.styles.js","../node_modules/@skbkontur/react-ui/components/Input/InputLayout/InputLayoutAsideIcon/InputLayoutAsideIcon.js","../node_modules/@skbkontur/react-ui/components/Input/InputLayout/InputLayoutAsideText/InputLayoutAsideText.js","../node_modules/@skbkontur/react-ui/components/Input/InputLayout/InputLayoutAside/InputLayoutAside.js","../node_modules/@skbkontur/react-ui/components/Input/InputLayout/InputLayoutContext/InputLayoutContext.js","../node_modules/@skbkontur/react-ui/internal/InternalMaskedInput/InternalMaskedInput.styles/InternalMaskedInput.styles.js","../node_modules/@skbkontur/react-ui/lib/needsPolyfillPlaceholder/needsPolyfillPlaceholder.js","../node_modules/@skbkontur/react-ui/internal/InternalMaskedInput/InternalMaskedInput/InternalMaskedInput.js","../node_modules/@skbkontur/react-ui/components/Input/Input/Input.js","../node_modules/@skbkontur/react-ui/components/Input/InputLayout/InputLayout/InputLayout.js","../node_modules/@skbkontur/react-ui/components/Input/InputLayout/PolyfillPlaceholder/PolyfillPlaceholder.js","../node_modules/@skbkontur/react-ui/components/Link/Link.styles/Link.styles.js","../node_modules/@skbkontur/react-ui/components/Link/Link/Link.js","../node_modules/@skbkontur/react-ui/components/Link/Link.mixins/Link.mixins.js","../node_modules/@skbkontur/react-ui/components/Link/LinkIcon/LinkIcon.js","../node_modules/@skbkontur/react-ui/components/MenuHeader/MenuHeader.mixins/MenuHeader.mixins.js","../node_modules/@skbkontur/react-ui/components/MenuHeader/MenuHeader.styles/MenuHeader.styles.js","../node_modules/@skbkontur/react-ui/components/MenuHeader/MenuHeader/MenuHeader.js","../node_modules/@skbkontur/react-ui/components/MenuItem/MenuItem.mixins/MenuItem.mixins.js","../node_modules/@skbkontur/react-ui/components/MenuItem/MenuItem.styles/MenuItem.styles.js","../node_modules/@skbkontur/react-ui/components/MenuItem/MenuItem/MenuItem.js","../node_modules/@skbkontur/react-ui/components/MenuSeparator/MenuSeparator.styles/MenuSeparator.styles.js","../node_modules/@skbkontur/react-ui/components/MenuSeparator/MenuSeparator/MenuSeparator.js","../node_modules/@skbkontur/react-ui/components/Modal/Modal.styles/Modal.styles.js","../node_modules/@skbkontur/react-ui/components/Modal/ModalSeparator/ModalSeparator.js","../node_modules/@skbkontur/react-ui/components/Modal/ModalContext/ModalContext.js","../node_modules/@skbkontur/react-ui/components/Modal/ModalFooter/ModalFooter.js","../node_modules/@skbkontur/react-ui/internal/icons2022/XIcon/XIcon20Regular/XIcon20Regular.js","../node_modules/@skbkontur/react-ui/components/Modal/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/Modal/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/Modal/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/Modal/ModalClose/ModalClose.js","../node_modules/@skbkontur/react-ui/components/Modal/ModalHeader/ModalHeader.js","../node_modules/@skbkontur/react-ui/components/Modal/ModalBody/ModalBody.js","../node_modules/@skbkontur/react-ui/components/Modal/getModalBodyTheme/getModalBodyTheme.js","../node_modules/@skbkontur/react-ui/components/Modal/Modal/Modal.js","../node_modules/@skbkontur/react-ui/components/Modal/getModalTheme/getModalTheme.js","../node_modules/@skbkontur/react-ui/components/ResponsiveLayout/ResponsiveLayout/ResponsiveLayout.js","../node_modules/@skbkontur/react-ui/components/ResponsiveLayout/decorator/decorator.js","../node_modules/@skbkontur/react-ui/components/ResponsiveLayout/ResponsiveLayoutEvents/ResponsiveLayoutEvents.js","../node_modules/@skbkontur/react-ui/components/ResponsiveLayout/useResponsiveLayout/useResponsiveLayout.js","../node_modules/@skbkontur/react-ui/components/ScrollContainer/ScrollContainer.styles/ScrollContainer.styles.js","../node_modules/@skbkontur/react-ui/components/ScrollContainer/ScrollContainer/ScrollContainer.js","../node_modules/@skbkontur/react-ui/components/ScrollContainer/ScrollContainer.constants/ScrollContainer.constants.js","../node_modules/@skbkontur/react-ui/components/ScrollContainer/ScrollContainer.helpers/ScrollContainer.helpers.js","../node_modules/@skbkontur/react-ui/components/ScrollContainer/ScrollBar/ScrollBar.js","../node_modules/@skbkontur/react-ui/components/Select/ArrowDownIcon/ArrowDownIcon.js","../node_modules/@skbkontur/react-ui/components/Select/Item/Item.js","../node_modules/@skbkontur/react-ui/components/Select/Select.styles/Select.styles.js","../node_modules/@skbkontur/react-ui/components/Select/Select/Select.js","../node_modules/@skbkontur/react-ui/components/Select/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/Select/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/Select/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/Select/selectTheme/selectTheme.js","../node_modules/@skbkontur/react-ui/lib/theming/AnimationKeyframes/AnimationKeyframes.js","../node_modules/@skbkontur/react-ui/components/Spinner/Spinner.styles/Spinner.styles.js","../node_modules/@skbkontur/react-ui/components/Spinner/Spinner/Spinner.js","../node_modules/@skbkontur/react-ui/components/Spinner/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/Spinner/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/Spinner/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/Sticky/Sticky.styles/Sticky.styles.js","../node_modules/@skbkontur/react-ui/components/Sticky/Sticky/Sticky.js","../node_modules/@skbkontur/react-ui/components/Tabs/Indicator.styles/Indicator.styles.js","../node_modules/@skbkontur/react-ui/components/Tabs/Indicator/Indicator.js","../node_modules/@skbkontur/react-ui/components/Tabs/TabsContext/TabsContext.js","../node_modules/@skbkontur/react-ui/components/Tabs/Tabs.styles/Tabs.styles.js","../node_modules/@skbkontur/react-ui/components/Tabs/helpers/helpers.js","../node_modules/@skbkontur/react-ui/components/Tabs/Tab.styles/Tab.styles.js","../node_modules/@skbkontur/react-ui/components/Tabs/Tab/Tab.js","../node_modules/@skbkontur/react-ui/components/Tabs/Tabs/Tabs.js","../node_modules/@skbkontur/react-ui/components/TokenInput/TokenInput.mixins/TokenInput.mixins.js","../node_modules/@skbkontur/react-ui/components/TokenInput/TokenInput.styles/TokenInput.styles.js","../node_modules/@skbkontur/react-ui/lib/uidUtils/uidUtils.js","../node_modules/@skbkontur/react-ui/components/TokenInput/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/TokenInput/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/TokenInput/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/TokenInput/TokenInputReducer/TokenInputReducer.js","../node_modules/@skbkontur/react-ui/components/TokenInput/TokenInputMenu/TokenInputMenu.js","../node_modules/@skbkontur/react-ui/components/TokenInput/TokenInput/TokenInput.js","../node_modules/@skbkontur/react-ui/components/TokenInput/TextWidthHelper/TextWidthHelper.js","../node_modules/@skbkontur/react-ui/components/Token/Token.mixins/Token.mixins.js","../node_modules/@skbkontur/react-ui/components/Token/Token.styles/Token.styles.js","../node_modules/@skbkontur/react-ui/components/Token/TokenView/TokenView.js","../node_modules/@skbkontur/react-ui/components/Token/Token/Token.js","../node_modules/@skbkontur/react-ui/components/Token/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/Token/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/Token/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/Tooltip/Tooltip.styles/Tooltip.styles.js","../node_modules/@skbkontur/react-ui/components/Tooltip/Tooltip/Tooltip.js","../node_modules/@skbkontur/react-ui/internal/CloseButtonIcon/CloseButtonIcon.styles/CloseButtonIcon.styles.js","../node_modules/@skbkontur/react-ui/internal/icons2022/XIcon/XIcon20Light/XIcon20Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/XIcon/XIcon24Regular/XIcon24Regular.js","../node_modules/@skbkontur/react-ui/internal/CloseButtonIcon/CrossIcon/CrossIcon.js","../node_modules/@skbkontur/react-ui/internal/CloseButtonIcon/CloseButtonIcon/CloseButtonIcon.js","../node_modules/@skbkontur/react-ui/internal/CommonWrapper/utils/extractCommonProps/extractCommonProps.js","../node_modules/@skbkontur/react-ui/internal/CommonWrapper/utils/tryGetBoolean/tryGetBoolean.js","../node_modules/@skbkontur/react-ui/internal/CommonWrapper/CommonWrapper/CommonWrapper.js","../node_modules/@skbkontur/react-ui/internal/CommonWrapper/utils/getCommonVisualStateDataAttributes/getCommonVisualStateDataAttributes.js","../node_modules/@skbkontur/react-ui/internal/CommonWrapper/utils/getVisualStateDataAttributes/getVisualStateDataAttributes.js","../node_modules/@skbkontur/react-ui/lib/toKebabCase/toKebabCase.js","../node_modules/@skbkontur/react-ui/internal/MenuMessage/MenuMessage.styles/MenuMessage.styles.js","../node_modules/@skbkontur/react-ui/components/MenuFooter/MenuFooter.mixins/MenuFooter.mixins.js","../node_modules/@skbkontur/react-ui/components/MenuFooter/MenuFooter.styles/MenuFooter.styles.js","../node_modules/@skbkontur/react-ui/internal/MenuMessage/MenuMessage/MenuMessage.js","../node_modules/@skbkontur/react-ui/components/MenuFooter/MenuFooter/MenuFooter.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/ComboBoxMenu/ComboBoxMenu.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/locale/index/index.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/internal/CustomComboBox/CustomComboBoxTypes/CustomComboBoxTypes.js","../node_modules/@skbkontur/react-ui/internal/DropdownContainer/DropdownContainer.styles/DropdownContainer.styles.js","../node_modules/@skbkontur/react-ui/internal/DropdownContainer/getManualPosition/getManualPosition.js","../node_modules/@skbkontur/react-ui/internal/DropdownContainer/DropdownContainer/DropdownContainer.js","../node_modules/@skbkontur/react-ui/internal/FocusControlWrapper/FocusControlWrapper/FocusControlWrapper.js","../node_modules/@skbkontur/react-ui/internal/FocusControlWrapper/useFocusControl/useFocusControl.js","../node_modules/@skbkontur/react-ui/internal/HideBodyVerticalScroll/HideBodyVerticalScroll/HideBodyVerticalScroll.js","../node_modules/@skbkontur/react-ui/lib/events/MouseDrag/MouseDrag.js","../node_modules/@skbkontur/react-ui/internal/InputLikeText/HiddenInput/HiddenInput.js","../node_modules/@skbkontur/react-ui/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js","../node_modules/@skbkontur/react-ui/internal/InputLikeText/InputLikeText/InputLikeText.js","../node_modules/@skbkontur/react-ui/lib/dom/selectionHelpers/selectionHelpers.js","../node_modules/@skbkontur/react-ui/internal/MaskCharLowLine/MaskCharLowLine.styles/MaskCharLowLine.styles.js","../node_modules/@skbkontur/react-ui/internal/MaskCharLowLine/MaskCharLowLine/MaskCharLowLine.js","../node_modules/@skbkontur/react-ui/internal/Menu/MenuContext/MenuContext.js","../node_modules/@skbkontur/react-ui/internal/Menu/Menu.styles/Menu.styles.js","../node_modules/@skbkontur/react-ui/internal/InternalMenu/addIconPaddingIfPartOfMenu/addIconPaddingIfPartOfMenu.js","../node_modules/@skbkontur/react-ui/internal/InternalMenu/isIconPaddingEnabled/isIconPaddingEnabled.js","../node_modules/@skbkontur/react-ui/internal/Menu/isActiveElement/isActiveElement.js","../node_modules/@skbkontur/react-ui/internal/Menu/MenuNavigation/MenuNavigation.js","../node_modules/@skbkontur/react-ui/internal/Menu/Menu/Menu.js","../node_modules/@skbkontur/react-ui/internal/MobilePopup/MobilePopup.styles/MobilePopup.styles.js","../node_modules/@skbkontur/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles/MobilePopupHeader.styles.js","../node_modules/@skbkontur/react-ui/internal/MobilePopup/MobilePopup/MobilePopup.js","../node_modules/@skbkontur/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader/MobilePopupHeader.js","../node_modules/@skbkontur/react-ui/lib/InstanceWithAnchorElement/InstanceWithAnchorElement.js","../node_modules/@skbkontur/react-ui/internal/Popup/PopupHelper/PopupHelper.js","../node_modules/@skbkontur/react-ui/internal/Popup/PopupPin.styles/PopupPin.styles.js","../node_modules/@skbkontur/react-ui/internal/Popup/Popup.styles/Popup.styles.js","../node_modules/@skbkontur/react-ui/internal/Popup/PopupPin/PopupPin.js","../node_modules/@skbkontur/react-ui/internal/Popup/Popup/Popup.js","../node_modules/@skbkontur/react-ui/internal/RenderContainer/RenderInnerContainer/RenderInnerContainer.js","../node_modules/@skbkontur/react-ui/internal/RenderContainer/RenderContainer/RenderContainer.js","../node_modules/@skbkontur/react-ui/internal/RenderLayer/RenderLayer/RenderLayer.js","../node_modules/@skbkontur/react-ui/internal/ResizeDetector/ResizeDetector.styles/ResizeDetector.styles.js","../node_modules/@skbkontur/react-ui/internal/ResizeDetector/ResizeDetector/ResizeDetector.js","../node_modules/@skbkontur/react-ui/internal/ZIndex/ZIndexStorage/ZIndexStorage.js","../node_modules/@skbkontur/react-ui/internal/ZIndex/ZIndex/ZIndex.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon16Regular/ArrowCDownIcon16Regular.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon20Regular/ArrowCDownIcon20Regular.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon24Regular/ArrowCDownIcon24Regular.js","../node_modules/@skbkontur/react-ui/internal/icons2022/BaseIcon.styles/BaseIcon.styles.js","../node_modules/@skbkontur/react-ui/internal/icons2022/BaseIcon/BaseIcon.js","../node_modules/@skbkontur/react-ui/internal/icons2022/LoadingIcon/LoadingIcon.js","../node_modules/@skbkontur/react-ui/internal/icons2022/iconConstants/iconConstants.js","../node_modules/@skbkontur/react-ui/internal/icons2022/iconSizer/iconSizer.js","../node_modules/@skbkontur/react-ui/internal/icons/16px/icon.styles/icon.styles.js","../node_modules/@skbkontur/react-ui/internal/icons/16px/index/index.js","../node_modules/@skbkontur/react-ui/internal/icons/CrossIcon/CrossIcon.js","../node_modules/@skbkontur/react-ui/internal/icons/SpinnerIcon.styles/SpinnerIcon.styles.js","../node_modules/@skbkontur/react-ui/components/Spinner/SpinnerFallbackAnimation/SpinnerFallbackAnimation.js","../node_modules/@skbkontur/react-ui/internal/icons/SpinnerIcon/SpinnerIcon.js","../node_modules/@skbkontur/react-ui/internal/themes/DefaultTheme/DefaultTheme.js","../node_modules/@skbkontur/react-ui/lib/LayoutEvents/LayoutEvents.js","../node_modules/@skbkontur/react-ui/lib/ModalStack/ModalStack.js","../node_modules/@skbkontur/react-ui/lib/SSRSafe/SSRSafe.js","../node_modules/@skbkontur/react-ui/lib/Upgrades/Upgrades.js","../node_modules/@skbkontur/react-ui/lib/callChildRef/callChildRef/callChildRef.js","../node_modules/@skbkontur/react-ui/lib/chars/chars.js","../node_modules/@skbkontur/react-ui/lib/client/client.js","../node_modules/@skbkontur/react-ui/lib/createPropsGetter/createPropsGetter.js","../node_modules/@skbkontur/react-ui/lib/currentEnvironment/currentEnvironment.js","../node_modules/@skbkontur/react-ui/lib/dom/getDOMRect/getDOMRect.js","../node_modules/@skbkontur/react-ui/lib/dom/getScrollWidth/getScrollWidth.js","../node_modules/tabbable/src/index.js","../node_modules/@skbkontur/react-ui/lib/dom/tabbableHelpers/tabbableHelpers.js","../node_modules/@skbkontur/react-ui/lib/events/keyListener/keyListener.js","../node_modules/@skbkontur/react-ui/lib/events/keyboard/KeyboardEventCodes/KeyboardEventCodes.js","../node_modules/@skbkontur/react-ui/lib/events/keyboard/KeyboardMapKeys/KeyboardMapKeys.js","../node_modules/@skbkontur/react-ui/lib/events/keyboard/extractCode/extractCode.js","../node_modules/@skbkontur/react-ui/lib/events/keyboard/identifiers/identifiers.js","../node_modules/@skbkontur/react-ui/lib/events/stopPropagation/stopPropagation.js","../node_modules/@skbkontur/react-ui/lib/featureFlagsContext/FeatureFlagsHelpers/FeatureFlagsHelpers.js","../node_modules/@skbkontur/react-ui/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js","../node_modules/@skbkontur/react-ui/lib/filterProps/filterProps.js","../node_modules/@skbkontur/react-ui/lib/forwardRefAndName/forwardRefAndName.js","../node_modules/@skbkontur/react-ui/lib/isInstanceOf/isInstanceOf.js","../node_modules/@skbkontur/react-ui/lib/listenFocusOutside/listenFocusOutside.js","../node_modules/@skbkontur/react-ui/lib/locale/LocaleContext/LocaleContext.js","../node_modules/@skbkontur/react-ui/lib/locale/LocaleHelper/LocaleHelper.js","../node_modules/@skbkontur/react-ui/lib/locale/constants/constants.js","../node_modules/@skbkontur/react-ui/lib/locale/decorators/decorators.js","../node_modules/@skbkontur/react-ui/lib/locale/types/types.js","../node_modules/@skbkontur/react-ui/lib/locale/useLocaleForControl/useLocaleForControl.js","../node_modules/@skbkontur/react-ui/lib/reactGetTextContent/reactGetTextContent.js","../node_modules/@skbkontur/react-ui/lib/rootNode/getRootNode/getRootNode.js","../node_modules/@skbkontur/react-ui/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js","../node_modules/@skbkontur/react-ui/lib/styles/ColorKeywords/ColorKeywords.js","../node_modules/@skbkontur/react-ui/lib/styles/ColorObject/ColorObject.js","../node_modules/@skbkontur/react-ui/lib/styles/ColorFactory/ColorFactory.js","../node_modules/@skbkontur/react-ui/lib/styles/ColorFunctions/ColorFunctions.js","../node_modules/@skbkontur/react-ui/lib/styles/ColorHelpers/ColorHelpers.js","../node_modules/@skbkontur/react-ui/lib/styles/DimensionFunctions/DimensionFunctions.js","../node_modules/@skbkontur/react-ui/lib/styles/Mixins/Mixins.js","../node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","../node_modules/stylis/src/Utility.js","../node_modules/stylis/src/Tokenizer.js","../node_modules/stylis/src/Enum.js","../node_modules/stylis/src/Serializer.js","../node_modules/stylis/src/Parser.js","../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","../node_modules/stylis/src/Middleware.js","../node_modules/@emotion/hash/dist/emotion-hash.esm.js","../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","../node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js","../node_modules/stylis-plugin-extra-scope/dist/stylis-plugin-extra-scope.esm.js","../node_modules/@skbkontur/react-ui/lib/theming/Emotion/Emotion.js","../node_modules/@skbkontur/react-ui/lib/theming/ThemeContext/ThemeContext.js","../node_modules/@skbkontur/react-ui/lib/theming/ThemeFactory/ThemeFactory.js","../node_modules/@skbkontur/react-ui/lib/theming/ThemeHelpers/ThemeHelpers.js","../node_modules/@skbkontur/react-ui/lib/theming/themes/DefaultTheme/DefaultTheme.js","../node_modules/@skbkontur/react-ui/internal/themes/Theme2022/Theme2022.js","../node_modules/@skbkontur/react-ui/lib/theming/themes/Theme2022/Theme2022.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/@skbkontur/react-ui/lib/utils/utils.js","../node_modules/@skbkontur/side-menu/node_modules/tslib/tslib.es6.js","../node_modules/@skbkontur/side-menu/internal/themes/SideMenuTheme.js","../node_modules/@skbkontur/side-menu/lib/theming/ThemeHelpers.js","../node_modules/@skbkontur/side-menu/lib/utils/memo.js","../node_modules/@skbkontur/side-menu/src/SideMenu/SideMenu.styles.js","../node_modules/@skbkontur/side-menu/src/SideMenuDropdown/SideMenuDropdown.styles.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/ItemContent.styles.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/Icon.styles.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/Caption.styles.js","../node_modules/@skbkontur/side-menu/src/SideMenuContext.js","../node_modules/@skbkontur/side-menu/lib/utils/scripts.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/Icon.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/Caption.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/Marker.styles.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/Marker.js","../node_modules/@skbkontur/side-menu/src/internal/ItemContent/ItemContent.js","../node_modules/@skbkontur/side-menu/src/internal/SeparatedSubMenu.styles.js","../node_modules/@skbkontur/side-menu/SideMenuDataTids.js","../node_modules/@skbkontur/side-menu/src/Tree.js","../node_modules/@skbkontur/side-menu/src/Navigation.js","../node_modules/@skbkontur/side-menu/src/internal/BackButton.js","../node_modules/@skbkontur/side-menu/src/internal/SeparatedSubMenu.js","../node_modules/@skbkontur/side-menu/src/internal/InnerSubMenu.js","../node_modules/@skbkontur/side-menu/src/internal/NestedMenu.styles.js","../node_modules/@skbkontur/side-menu/src/internal/NestedMenu.js","../node_modules/@skbkontur/side-menu/src/internal/SubMenu.js","../node_modules/@skbkontur/side-menu/src/internal/ClickableElement.styles.js","../node_modules/@skbkontur/side-menu/hooks/useMemoIcon.js","../node_modules/@skbkontur/side-menu/src/internal/ClickableElement.js","../node_modules/@skbkontur/side-menu/src/SideMenuItem/SideMenuItem.js","../node_modules/@skbkontur/side-menu/src/SideMenuDropdown/SideMenuDropdown.js","../node_modules/@skbkontur/side-menu/src/SideMenuOrganisations/SideMenuOrganisations.js","../node_modules/@skbkontur/side-menu/src/SideMenuBody/SideMenuBody.styles.js","../node_modules/@skbkontur/side-menu/src/SideMenuBody/SideMenuBody.js","../node_modules/@skbkontur/side-menu/src/SideMenuFooter/SideMenuFooter.styles.js","../node_modules/@skbkontur/side-menu/src/SideMenuFooter/SideMenuFooter.js","../node_modules/@skbkontur/side-menu/src/SideMenuHeader/SideMenuHeader.styles.js","../node_modules/@skbkontur/react-ui-addons/node_modules/tslib/tslib.es6.js","../node_modules/@skbkontur/react-ui-addons/internal/themes/AddonsTheme.js","../node_modules/@skbkontur/react-ui-addons/internal/themes/AddonsDarkTheme.js","../node_modules/@skbkontur/react-ui-addons/lib/theming/ThemeHelpers.js","../node_modules/@skbkontur/react-ui-addons/lib/utils/memo.js","../node_modules/@skbkontur/react-ui-addons/components/Logotype/Logotype.styles.js","../node_modules/@skbkontur/side-menu/src/internal/SideMenuLogotype.styles.js","../node_modules/@skbkontur/side-menu/src/internal/Burger.styles.js","../node_modules/@skbkontur/react-ui-addons/components/Logotype/ProductWidget.js","../node_modules/@skbkontur/react-ui-addons/components/Logotype/Logotype.js","../node_modules/@skbkontur/side-menu/src/internal/Burger.js","../node_modules/@skbkontur/side-menu/src/internal/SideMenuLogotype.js","../node_modules/@skbkontur/side-menu/src/SideMenuHeader/SideMenuHeader.js","../node_modules/@skbkontur/react-ui-addons/components/UserAvatar/UserAvatar.styles.js","../node_modules/@skbkontur/react-ui-addons/components/UserAvatar/UserIcon.js","../node_modules/@skbkontur/react-ui-addons/components/UserAvatar/UserAvatar.js","../node_modules/@skbkontur/side-menu/src/SideMenuAvatar/SideMenuAvatar.js","../node_modules/@skbkontur/side-menu/src/SideMenuSubItem/SideMenuSubItem.js","../node_modules/@skbkontur/side-menu/src/SideMenuDivider/SideMenuDivider.styles.js","../node_modules/@skbkontur/side-menu/src/SideMenuDivider/SideMenuDivider.js","../node_modules/@skbkontur/side-menu/src/SideMenuSubItemHeader/SideMenuSubItemHeader.styles.js","../node_modules/@skbkontur/side-menu/src/SideMenuSubItemHeader/SideMenuSubItemHeader.js","../node_modules/@skbkontur/side-menu/src/internal/RightBorder.styles.js","../node_modules/@skbkontur/side-menu/src/internal/RightBorder.js","../node_modules/@skbkontur/side-menu/src/SideMenuLink/SideMenuLink.styles.js","../node_modules/@skbkontur/side-menu/src/SideMenuLink/SideMenuLink.js","../node_modules/@skbkontur/side-menu/src/SideMenuSubLink/SideMenuSubLink.js","../node_modules/@skbkontur/side-menu/src/internal/Backdrop.styles.js","../node_modules/@skbkontur/side-menu/src/internal/Backdrop.js","../node_modules/@skbkontur/side-menu/src/SideMenu/SideMenu.js","../node_modules/@skbkontur/side-menu/hooks/useAnimateOnMount.js","../node_modules/@skbkontur/ui-helpers/formatPhone.js","../node_modules/axios/node_modules/form-data/lib/browser.js","../node_modules/call-bind-apply-helpers/actualApply.js","../node_modules/call-bind-apply-helpers/functionApply.js","../node_modules/call-bind-apply-helpers/functionCall.js","../node_modules/call-bind-apply-helpers/index.js","../node_modules/call-bind-apply-helpers/reflectApply.js","../node_modules/call-bound/index.js","../node_modules/classnames/index.js","../node_modules/copy-to-clipboard/index.js","../node_modules/dayjs/dayjs.min.js","../node_modules/dayjs/locale/ru.js","../node_modules/dayjs/plugin/customParseFormat.js","../node_modules/dayjs/plugin/isToday.js","../node_modules/dayjs/plugin/isYesterday.js","../node_modules/dayjs/plugin/timezone.js","../node_modules/dayjs/plugin/updateLocale.js","../node_modules/dayjs/plugin/utc.js","../node_modules/dunder-proto/get.js","../node_modules/es-define-property/index.js","../node_modules/es-errors/eval.js","../node_modules/es-errors/index.js","../node_modules/es-errors/range.js","../node_modules/es-errors/ref.js","../node_modules/es-errors/syntax.js","../node_modules/es-errors/type.js","../node_modules/es-errors/uri.js","../node_modules/es-object-atoms/index.js","../node_modules/eventemitter3/index.js","../node_modules/function-bind/implementation.js","../node_modules/function-bind/index.js","../node_modules/get-intrinsic/index.js","../node_modules/get-proto/Object.getPrototypeOf.js","../node_modules/get-proto/Reflect.getPrototypeOf.js","../node_modules/get-proto/index.js","../node_modules/gopd/gOPD.js","../node_modules/gopd/index.js","../node_modules/has-symbols/index.js","../node_modules/has-symbols/shams.js","../node_modules/hasown/index.js","../node_modules/invariant/browser.js","../node_modules/lodash.debounce/index.js","../node_modules/lodash.isequal/index.js","../node_modules/lodash.throttle/index.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_root.js","../node_modules/lodash/isArray.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isString.js","../node_modules/lodash/lodash.js","../node_modules/math-intrinsics/abs.js","../node_modules/math-intrinsics/floor.js","../node_modules/math-intrinsics/isNaN.js","../node_modules/math-intrinsics/max.js","../node_modules/math-intrinsics/min.js","../node_modules/math-intrinsics/pow.js","../node_modules/math-intrinsics/round.js","../node_modules/math-intrinsics/sign.js","../node_modules/moment-timezone/index.js","../node_modules/moment-timezone/moment-timezone.js","../node_modules/moment/moment.js","../node_modules/normalize-wheel/index.js","../node_modules/normalize-wheel/src/ExecutionEnvironment.js","../node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js","../node_modules/normalize-wheel/src/isEventSupported.js","../node_modules/normalize-wheel/src/normalizeWheel.js","../node_modules/object-assign/index.js","../node_modules/object-inspect/index.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/qs/lib/formats.js","../node_modules/qs/lib/index.js","../node_modules/qs/lib/parse.js","../node_modules/qs/lib/stringify.js","../node_modules/qs/lib/utils.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/client.js","../node_modules/react-dom/index.js","../node_modules/focus-lock/dist/es2015/constants.js","../node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../node_modules/use-callback-ref/dist/es2015/useRef.js","../node_modules/use-callback-ref/dist/es2015/assignRef.js","../node_modules/react-focus-lock/dist/es2015/FocusGuard.js","../node_modules/use-sidecar/dist/es2015/medium.js","../node_modules/react-focus-lock/dist/es2015/medium.js","../node_modules/react-focus-lock/dist/es2015/Lock.js","../node_modules/react-clientside-effect/lib/index.es.js","../node_modules/focus-lock/dist/es2015/utils/array.js","../node_modules/focus-lock/dist/es2015/utils/is.js","../node_modules/focus-lock/dist/es2015/utils/tabOrder.js","../node_modules/focus-lock/dist/es2015/utils/tabUtils.js","../node_modules/focus-lock/dist/es2015/utils/tabbables.js","../node_modules/focus-lock/dist/es2015/utils/DOMutils.js","../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js","../node_modules/focus-lock/dist/es2015/utils/all-affected.js","../node_modules/focus-lock/dist/es2015/focusInside.js","../node_modules/focus-lock/dist/es2015/utils/correctFocus.js","../node_modules/focus-lock/dist/es2015/utils/firstFocus.js","../node_modules/focus-lock/dist/es2015/solver.js","../node_modules/focus-lock/dist/es2015/utils/auto-focus.js","../node_modules/focus-lock/dist/es2015/utils/parenting.js","../node_modules/focus-lock/dist/es2015/focusMerge.js","../node_modules/focus-lock/dist/es2015/setFocus.js","../node_modules/focus-lock/dist/es2015/index.js","../node_modules/focus-lock/dist/es2015/focusables.js","../node_modules/react-focus-lock/dist/es2015/util.js","../node_modules/react-focus-lock/dist/es2015/Trap.js","../node_modules/focus-lock/dist/es2015/focusIsHidden.js","../node_modules/react-focus-lock/dist/es2015/Combination.js","../node_modules/react-focus-lock/dist/es2015/index.js","../node_modules/react-input-mask/index.js","../node_modules/react-input-mask/lib/react-input-mask.production.min.js","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/index.js","../node_modules/react-router-dom/dom.ts","../node_modules/react-router-dom/index.tsx","../node_modules/react-router/lib/context.ts","../node_modules/react-router/lib/hooks.tsx","../node_modules/react-router/lib/components.tsx","../node_modules/react-router/index.ts","../node_modules/react-transition-group/esm/config.js","../node_modules/react-transition-group/esm/Transition.js","../node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/react-transition-group/esm/utils/reflow.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/jsx-runtime.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../node_modules/shallowequal/index.js","../node_modules/side-channel-list/index.js","../node_modules/side-channel-map/index.js","../node_modules/side-channel-weakmap/index.js","../node_modules/side-channel/index.js","../node_modules/toggle-selection/index.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/v4.js","../node_modules/warning/warning.js","webpack://control-panel-front/./src/index.module.css?eca8","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/createSuper.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@skbkontur/react-ui/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js","../node_modules/tslib/tslib.es6.mjs","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/create fake namespace object","../webpack/runtime/define property getters","../webpack/runtime/ensure chunk","../webpack/runtime/get javascript chunk filename","../webpack/runtime/get mini-css chunk filename","../webpack/runtime/global","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/load script","../webpack/runtime/make namespace object","../webpack/runtime/node module decorator","../webpack/runtime/publicPath","../webpack/runtime/css loading","../webpack/runtime/jsonp chunk loading","../node_modules/@sentry/src/debug-build.ts","../node_modules/@sentry/src/worldwide.ts","../node_modules/@sentry/src/logger.ts","../node_modules/@sentry/src/is.ts","../node_modules/@sentry/src/browser.ts","../node_modules/@sentry/src/string.ts","../node_modules/@sentry/src/object.ts","../node_modules/@sentry/src/misc.ts","../node_modules/@sentry/src/syncpromise.ts","../node_modules/@sentry/src/eventProcessors.ts","../node_modules/@sentry/src/time.ts","../node_modules/@sentry/src/constants.ts","../node_modules/@sentry/src/session.ts","../node_modules/@sentry/src/memo.ts","../node_modules/@sentry/src/stacktrace.ts","../node_modules/@sentry/src/normalize.ts","../node_modules/@sentry/src/baggage.ts","../node_modules/@sentry/src/tracing.ts","../node_modules/@sentry/src/utils/spanUtils.ts","../node_modules/@sentry/src/utils/prepareEvent.ts","../node_modules/@sentry/src/scope.ts","../node_modules/@sentry/src/exports.ts","../node_modules/@sentry/src/utils/getRootSpan.ts","../node_modules/@sentry/src/tracing/dynamicSamplingContext.ts","../node_modules/@sentry/src/utils/applyScopeDataToEvent.ts","../node_modules/@sentry/src/version.ts","../node_modules/@sentry/src/hub.ts","../node_modules/@sentry/src/integration.ts","../node_modules/@sentry/src/integrations/inboundfilters.ts","../node_modules/@sentry/src/integrations/functiontostring.ts","../node_modules/@sentry/src/sdk.ts","../node_modules/@sentry/src/supports.ts","../node_modules/@sentry/src/vendor/supportsHistory.ts","../node_modules/@sentry/src/instrument/_handlers.ts","../node_modules/@sentry/src/instrument/history.ts","../node_modules/@babel/runtime/helpers/esm/superPropBase.js","../node_modules/@babel/runtime/helpers/esm/get.js","../node_modules/@sentry/src/utils/sdkMetadata.ts","../node_modules/@sentry/src/dsn.ts","../node_modules/@sentry/src/envelope.ts","../node_modules/@sentry/src/error.ts","../node_modules/@sentry/src/api.ts","../node_modules/@sentry/src/metrics/envelope.ts","../node_modules/@sentry/src/metrics/utils.ts","../node_modules/@sentry/src/baseclient.ts","../node_modules/src/debug-build.ts","../node_modules/src/eventbuilder.ts","../node_modules/src/helpers.ts","../node_modules/src/client.ts","../node_modules/@sentry/src/env.ts","../node_modules/src/userfeedback.ts","../node_modules/@sentry/src/clientreport.ts","../node_modules/@sentry/src/instrument/console.ts","../node_modules/@sentry/src/instrument/dom.ts","../node_modules/@sentry/src/instrument/xhr.ts","../node_modules/@sentry/src/instrument/fetch.ts","../node_modules/@sentry/src/severity.ts","../node_modules/@sentry/src/url.ts","../node_modules/src/integrations/breadcrumbs.ts","../node_modules/src/integrations/dedupe.ts","../node_modules/@sentry/src/instrument/globalError.ts","../node_modules/@sentry/src/instrument/globalUnhandledRejection.ts","../node_modules/src/integrations/globalhandlers.ts","../node_modules/src/integrations/httpcontext.ts","../node_modules/@sentry/src/aggregate-errors.ts","../node_modules/src/integrations/linkederrors.ts","../node_modules/src/integrations/trycatch.ts","../node_modules/src/stack-parsers.ts","../node_modules/@sentry/src/promisebuffer.ts","../node_modules/@sentry/src/ratelimit.ts","../node_modules/@sentry/src/transports/base.ts","../node_modules/src/transports/utils.ts","../node_modules/src/transports/fetch.ts","../node_modules/src/transports/xhr.ts","../node_modules/src/sdk.ts","../node_modules/@sentry/src/metrics/metric-summary.ts","../node_modules/@sentry/src/semanticAttributes.ts","../node_modules/@sentry/src/tracing/spanstatus.ts","../node_modules/@sentry/src/tracing/span.ts","../node_modules/@sentry/src/utils/hasTracingEnabled.ts","../node_modules/@sentry/src/tracing/trace.ts","../node_modules/@sentry/src/tracing/transaction.ts","../node_modules/@sentry/src/tracing/idletransaction.ts","../node_modules/@sentry/src/tracing/utils.ts","../node_modules/@sentry/src/tracing/errors.ts","../node_modules/@sentry/src/tracing/sampling.ts","../node_modules/@sentry/src/tracing/hubextensions.ts","../node_modules/@sentry-internal/src/common/debug-build.ts","../node_modules/@sentry-internal/src/browser/types.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/bindReporter.ts","../node_modules/@sentry-internal/src/browser/instrument.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/getNavigationEntry.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/getActivationStart.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/initMetric.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/generateUniqueID.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/observe.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/onHidden.ts","../node_modules/@sentry-internal/src/browser/web-vitals/lib/getVisibilityWatcher.ts","../node_modules/@sentry-internal/src/browser/web-vitals/getLCP.ts","../node_modules/@sentry-internal/src/browser/web-vitals/getCLS.ts","../node_modules/@sentry-internal/src/browser/web-vitals/getFID.ts","../node_modules/@sentry-internal/src/browser/metrics/utils.ts","../node_modules/@sentry-internal/src/browser/metrics/index.ts","../node_modules/@sentry/src/tracing/measurement.ts","../node_modules/@sentry-internal/src/common/fetch.ts","../node_modules/@sentry-internal/src/browser/request.ts","../node_modules/@sentry-internal/src/browser/browsertracing.ts","../node_modules/@sentry-internal/src/browser/router.ts","../node_modules/@sentry-internal/src/browser/backgroundtab.ts","components/Resources/utils.tsx","webpack://control-panel-front/./src/components/PageHeaderWithTabs/PageHeaderWithTabs.module.css?a0f6","components/PageHeaderWithTabs/PageHeaderWithTabs.tsx","utils/flags.ts","webpack://control-panel-front/./src/pages/AdminsPage/AdminsPage.module.css?a42d","pages/AdminsPage/AdminsPage.tsx","utils/metrics/utils.ts","webpack://control-panel-front/./src/components/Resources/PamResourceBlock/PamResourceBlock.module.css?bbad","components/Resources/PamResourceBlock/PamResourceBlock.tsx","utils/hooks/useResourceClick.tsx","webpack://control-panel-front/./src/components/Resources/ResourceBlock/ResourceBlock.module.css?50e3","components/Resources/ResourceBlock/ResourceBlock.tsx","webpack://control-panel-front/./src/components/Resources/ResourcesGroup/ResourcesGroup.module.css?5e32","components/Resources/ResourcesGroup/ResourcesGroup.tsx","components/Configurations/CommonFormItems/FormFooter/FormFooter.tsx","components/Resources/resourcesGroups.tsx","webpack://control-panel-front/./src/components/Resources/ResourcesList/ResourcesList.module.css?ff65","components/Resources/ResourcesList/ResourcesList.tsx","webpack://control-panel-front/./src/components/Configurations/Configurations.module.css?1dfb","components/Configurations/CommonFormItems/util.ts","components/Configurations/CommonFormItems/DomainItem.tsx","webpack://control-panel-front/./src/components/Configurations/CommonFormItems/FormFooter/FormFooter.module.css?3c12","components/Configurations/CommonFormItems/NetBiosNameItem.tsx","../node_modules/@skbkontur/react-ui/lib/events/fixFirefoxModifiedClickOnLabel/fixFirefoxModifiedClickOnLabel.js","../node_modules/@skbkontur/react-ui/components/RadioGroup/RadioGroupContext/RadioGroupContext.js","../node_modules/@skbkontur/react-ui/components/Radio/Radio.mixins/Radio.mixins.js","../node_modules/@skbkontur/react-ui/components/Radio/Radio.styles/Radio.styles.js","../node_modules/@skbkontur/react-ui/components/Radio/Radio/Radio.js","../node_modules/@skbkontur/react-ui/internal/FocusTrap/FocusTrap/FocusTrap.js","../node_modules/@skbkontur/react-ui/components/RadioGroup/RadioGroup.styles/RadioGroup.styles.js","../node_modules/@skbkontur/react-ui/components/RadioGroup/RadioGroup/RadioGroup.js","../node_modules/@skbkontur/react-ui/lib/styles/getLabGrotesqueBaselineCompensation/getLabGrotesqueBaselineCompensation.js","../node_modules/@skbkontur/react-ui/components/RadioGroup/Prevent/Prevent.js","components/Configurations/CommonFormItems/PlatformItem.tsx","../node_modules/@skbkontur/react-ui/components/Toggle/Toggle.mixins/Toggle.mixins.js","../node_modules/@skbkontur/react-ui/components/Toggle/Toggle.styles/Toggle.styles.js","../node_modules/@skbkontur/react-ui/components/Toggle/Toggle/Toggle.js","../node_modules/@skbkontur/react-ui/components/Group/Group.styles/Group.styles.js","../node_modules/@skbkontur/react-ui/components/Group/Group/Group.js","../node_modules/@skbkontur/react-ui/components/Switcher/Switcher.styles/Switcher.styles.js","../node_modules/@skbkontur/react-ui/components/Switcher/Switcher/Switcher.js","components/Configurations/CommonFormItems/RadiusAdapterAddress.tsx","components/Configurations/CommonFormItems/SelfRegistrationItem.tsx","components/Configurations/CommonFormItems/SharedSecretItem.tsx","../node_modules/@skbkontur/react-ui/components/Switcher/helpers/helpers.js","../node_modules/@skbkontur/react-ui/components/Switcher/switcherTheme/switcherTheme.js","webpack://control-panel-front/./src/components/Configurations/CommonFormItems/StrategyBlock/StrategyBlock.module.css?ea08","components/Configurations/CommonFormItems/StrategyBlock/StrategyBlock.tsx","components/Configurations/CommonFormItems/TitleItem.tsx","../node_modules/react-transition-group/esm/utils/ChildMapping.js","../node_modules/react-transition-group/esm/TransitionGroup.js","../node_modules/dom-helpers/esm/removeClass.js","../node_modules/react-transition-group/esm/CSSTransition.js","../node_modules/dom-helpers/esm/addClass.js","../node_modules/dom-helpers/esm/hasClass.js","../node_modules/@skbkontur/react-ui/components/Toast/Toast.styles/Toast.styles.js","../node_modules/@skbkontur/react-ui/components/Toast/ToastView.styles/ToastView.styles.js","../node_modules/@skbkontur/react-ui/components/Toast/ToastView/ToastView.js","../node_modules/@skbkontur/react-ui/components/Toast/Toast/Toast.js","../node_modules/@skbkontur/react-ui/components/Toast/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/Toast/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/Toast/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/Toast/ToastStatic/ToastStatic.js","utils/types/sshConfigurationTypes.ts","components/Configurations/ConfigurationForm.tsx","components/Configurations/RadiusProxy/index.ts","components/Configurations/RadiusProxy/util.tsx","components/Configurations/RadiusProxy/RadiusProxyForm/RadiusFormItems/RadiusClientItem.tsx","components/Configurations/RadiusProxy/RadiusProxyForm/RadiusFormItems/MainFactorItem.tsx","components/Configurations/RadiusProxy/RadiusProxyForm/RadiusFormItems/SecondFactorItem.tsx","components/Configurations/RadiusProxy/RadiusProxyForm/RadiusProxyForm.tsx","components/Configurations/SSH/index.ts","../node_modules/@skbkontur/react-ui/components/Checkbox/Checkbox.mixins/Checkbox.mixins.js","../node_modules/@skbkontur/react-ui/components/Checkbox/Checkbox.styles/Checkbox.styles.js","../node_modules/@skbkontur/react-ui/components/Checkbox/Checkbox/Checkbox.js","components/Configurations/Windows/WindowsForm/WindowsForm.tsx","components/Configurations/SSH/util.ts","components/Configurations/SSH/SSHForm/SSHFormItems/MainFactorItem.tsx","components/Configurations/SSH/SSHForm/SSHFormItems/SecondFactorItem.tsx","components/Configurations/SSH/SSHForm/SSHForm.tsx","components/Configurations/Windows/index.ts","components/Configurations/Windows/WindowsForm/util.ts","components/Configurations/Windows/WindowsForm/WindowsFormItems/MainFactorItem.tsx","../node_modules/@skbkontur/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Solid/CheckAIcon16Solid.js","../node_modules/@skbkontur/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Solid/CheckAIcon20Solid.js","../node_modules/@skbkontur/react-ui/components/Checkbox/CheckedIcon/CheckedIcon.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ShapeSquareIcon/ShapeSquareIcon16Solid/ShapeSquareIcon16Solid.js","../node_modules/@skbkontur/react-ui/components/Checkbox/IndeterminateIcon/IndeterminateIcon.js","components/Configurations/Windows/WindowsForm/WindowsFormItems/RadiusServerBlock.tsx","components/Configurations/Windows/WindowsForm/WindowsFormItems/SecondFactorItem.tsx","utils/types/errorTypes.ts","components/Configurations/util.tsx","components/Configurations/ConfigurationsWrapper.tsx","context/ActiveSyncConfigurationsState/ActiveSyncConfigurationsState.tsx","context/ActiveSyncConfigurationsState/index.tsx","components/Configurations/ActiveSync/ActiveSyncConfigurationBlock/utils.ts","webpack://control-panel-front/./src/components/Configurations/ActiveSync/ActiveSyncConfigurationBlock/ActiveSyncConfigurationBlock.module.css?bcbb","components/Configurations/ActiveSync/ActiveSyncConfigurationBlock/ActiveSyncConfigurationBlock.tsx","../node_modules/@skbkontur/react-ui/components/Loader/Loader.styles/Loader.styles.js","../node_modules/@skbkontur/react-ui/components/Loader/Loader/Loader.js","utils/images/AbstractMonochrome.svg","components/Configurations/ActiveSync/utils.ts","webpack://control-panel-front/./src/components/Configurations/ActiveSync/ActiveSyncConfigurationsList/ActiveSyncConfigurationsList.module.css?1048","components/Configurations/ActiveSync/ActiveSyncConfigurationsList/utils.ts","components/Configurations/ActiveSync/ActiveSyncConfigurationsList/ActiveSyncConfigurationsList.tsx","webpack://control-panel-front/./src/pages/ActiveSyncConfigurationsPage/ActiveSyncConfigurationsPage.module.css?744c","../node_modules/@skbkontur/react-ui/lib/taskWithDelayAndMinimalDuration/taskWithDelayAndMinimalDuration.js","webpack://control-panel-front/./src/components/Configurations/ActiveSync/ActiveSyncForm/ActiveSyncForm.module.css?e08c","components/Configurations/ActiveSync/ActiveSyncForm/util.ts","components/Configurations/ActiveSync/ActiveSyncForm/ActiveSyncForm.tsx","webpack://control-panel-front/./src/components/Configurations/ActiveSync/ActiveSyncRegistrationLink/ActiveSyncRegistrationLink.module.css?ffae","components/Configurations/ActiveSync/ActiveSyncRegistrationLink/ActiveSyncRegistrationLink.tsx","webpack://control-panel-front/./src/pages/ActiveSyncConfigurationsPage/components/ActiveSyncPageHeader/ActiveSyncPageHeader.module.css?64c7","pages/ActiveSyncConfigurationsPage/components/ActiveSyncPageHeader/utils.ts","pages/ActiveSyncConfigurationsPage/components/ActiveSyncPageHeader/ActiveSyncPageHeader.tsx","pages/ActiveSyncConfigurationsPage/ActiveSyncConfigurationsPage.tsx","webpack://control-panel-front/./src/pages/ConfigurationsPage/ConfigurationsPage.module.css?7994","pages/ConfigurationsPage/ConfigurationsPage.tsx","webpack://control-panel-front/./src/pages/ErrorPage/ErrorPage.module.css?a968","pages/ErrorPage/ErrorPage.tsx","../node_modules/@skbkontur/ui-helpers/pluralize.js","../node_modules/@skbkontur/react-ui/components/SidePage/SidePage.styles/SidePage.styles.js","../node_modules/@skbkontur/react-ui/components/SidePage/SidePageBody/SidePageBody.js","webpack://control-panel-front/./src/pages/ErrorsInvitesPage/ErrorsInvitesPage.module.css?e003","pages/ErrorsInvitesPage/utils.ts","pages/ErrorsInvitesPage/ErrorsInvitesPage.tsx","pages/EventsPage/utils.ts","webpack://control-panel-front/./src/components/Events/EventsFilter/EventsFilter.module.css?9913","components/Events/EventsFilter/EventsFilter.tsx","components/Events/utils.tsx","webpack://control-panel-front/./src/components/Events/EventBlock/EventBlock.module.css?5a7d","components/Events/EventBlock/components/EventInfo.tsx","components/Events/EventBlock/components/EventInitiator.tsx","components/Events/EventBlock/components/EventStatusIndicator.tsx","components/Events/EventBlock/components/EventTime.tsx","components/Events/EventBlock/components/EventUser.tsx","components/Events/EventBlock/EventBlock.tsx","../node_modules/@skbkontur/react-ui/components/SidePage/SidePageContext/SidePageContext.js","../node_modules/@skbkontur/react-ui/components/SidePage/SidePageContainer/SidePageContainer.js","../node_modules/@skbkontur/react-ui/components/SidePage/SidePageFooter/SidePageFooter.js","../node_modules/@skbkontur/react-ui/components/SidePage/SidePageHeader/SidePageHeader.js","../node_modules/@skbkontur/react-ui/components/SidePage/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/SidePage/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/SidePage/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/SidePage/SidePageCloseButton/SidePageCloseButton.js","../node_modules/@skbkontur/react-ui/components/SidePage/SidePage/SidePage.js","utils/images/Abstract.svg","webpack://control-panel-front/./src/components/Events/ExpandedEventInfo/ExpandedEventInfo.module.css?21ee","components/Events/ExpandedEventInfo/Details/EventDeviceInfo.tsx","components/Events/ExpandedEventInfo/Details/EventFA.tsx","components/Events/ExpandedEventInfo/Details/EventDetailsBlock.tsx","components/Events/ExpandedEventInfo/Details/EventUserBlock.tsx","components/Events/ExpandedEventInfo/ExpandedEventInfo.tsx","webpack://control-panel-front/./src/components/Events/EventsList/EventsList.module.css?a0a7","components/Events/EventsList/utils.ts","components/Events/EventsList/EventsList.tsx","webpack://control-panel-front/./src/pages/EventsPage/EventsPage.module.css?cd60","pages/util.ts","webpack://control-panel-front/./src/pages/EventsPage/NoEvents/NoEventsPage.module.css?1682","pages/EventsPage/NoEvents/NoEventsPage.tsx","pages/EventsPage/EventsPage.tsx","context/GroupsContext/util.ts","context/GroupsContext/GroupContext.tsx","context/GroupsContext/index.tsx","webpack://control-panel-front/./src/pages/GroupDetailsPage/components/index.module.css?87e8","pages/GroupDetailsPage/components/GroupDetailsPageContent.tsx","pages/GroupDetailsPage/GroupDetailsPage.tsx","context/MachinesPAMContext/MachineContext.tsx","components/Errors/util.ts","context/MachinesPAMContext/MachinesPAMContext.tsx","context/MachinesPAMContext/index.tsx","webpack://control-panel-front/./src/pages/MachinePAMDetailsPage/components/index.module.css?f6b9","utils/types/pamResourceTypes.ts","pages/MachinePAMDetailsPage/components/utils.ts","pages/MachinePAMDetailsPage/components/MachinePAMDeaillsPageContent.tsx","pages/MachinePAMDetailsPage/MachinePAMDetailsPage.tsx","webpack://control-panel-front/./src/components/MachinesPAM/MachinesPAMAddModal/MachinesPAMAddModal.module.css?0ebe","utils/types/sessionsTypes.ts","components/MachinesPAM/MachinesPAMAddModal/components/AddMachineModalInput.tsx","components/MachinesPAM/MachinesPAMAddModal/util.ts","components/MachinesPAM/MachinesPAMAddModal/MachinesPAMAddModal.tsx","webpack://control-panel-front/./src/pages/MachinesPAMPage/components/index.module.css?7ef3","pages/MachinesPAMPage/components/MachinesPAMPageContent.tsx","pages/MachinesPAMPage/MachinesPAMPage.tsx","utils/images/RightArrow.tsx","pages/NoConfigurationsResourcePage/utils.ts","webpack://control-panel-front/./src/pages/NoConfigurationsResourcePage/components/NoConfugurationPageContent/NoConfigurationPageContent.module.css?8144","pages/NoConfigurationsResourcePage/components/NoConfugurationPageContent/NoConfigurationPageContent.tsx","pages/NoConfigurationsResourcePage/NoConfigurationsResourcePage.tsx","webpack://control-panel-front/./src/pages/ResourcesPage/ResourcesPage.module.css?ece9","pages/ResourcesPage/ResourcesPage.tsx","webpack://control-panel-front/./src/pages/RoleDetailsPage/RoleDetailsPage.module.css?0a87","pages/RoleDetailsPage/RoleDetailsPage.tsx","components/Roles/util.ts","webpack://control-panel-front/./src/components/Roles/EditRoleModal/EditRoleModal.module.css?1ee7","components/Roles/EditRoleModal/RoleTimetableRow.tsx","components/Roles/EditRoleModal/RoleTimetable.tsx","components/Roles/EditRoleModal/EditRoleModal.tsx","components/Roles/EmptyOrgRolesList/EmptyOrgRolesList.tsx","containers/RoleContainer/RoleContainer.tsx","webpack://control-panel-front/./src/components/Roles/RoleBlock/RoleBlock.module.css?49f7","components/Roles/RoleBlock/Cells/RoleExpirationDateCell.tsx","components/Roles/RoleBlock/Cells/RoleInfoCell.tsx","components/Roles/RoleBlock/Cells/RoleResourcesCell.tsx","components/Roles/RoleBlock/util.ts","components/Roles/RoleBlock/Cells/RoleStatusIndicatorCell.tsx","components/Roles/RoleBlock/RoleBlock.tsx","webpack://control-panel-front/./src/components/Roles/RolesList/RolesList.module.css?45b6","components/Roles/RolesList/util.ts","components/Roles/RolesList/RolesList.tsx","webpack://control-panel-front/./src/pages/RolesPage/RolesPage.module.css?d645","pages/RolesPage/RolesPage.tsx","pages/SessionsPage/utils.ts","webpack://control-panel-front/./src/components/Sessions/SessionsFilter/SessionsFilter.module.css?af74","components/Sessions/SessionsFilter/SessionsFilter.tsx","components/Sessions/CloseSessionConfirmModal.tsx","webpack://control-panel-front/./src/components/Sessions/SessionBlock/SessionsBlock.module.css?d121","pages/UsersListPage/utils.ts","components/Sessions/SessionBlock/util.tsx","components/Sessions/SessionBlock/SessionBlock.tsx","utils/hooks/useCloseSession.tsx","webpack://control-panel-front/./src/components/Sessions/SessionsList/SessionsList.module.css?25b7","components/Sessions/SessionsList/utils.ts","components/Sessions/SessionsList/SessionsList.tsx","webpack://control-panel-front/./src/pages/SessionsPage/SessionsPage.module.css?48a9","pages/SessionsPage/SessionsPage.tsx","webpack://control-panel-front/./src/pages/StatisticsPage/StatisticsPage.module.css?7bef","pages/StatisticsPage/utils.ts","pages/StatisticsPage/StatisticsPage.tsx","webpack://control-panel-front/./src/pages/UserDetailsPage/UserDetailsPage.module.css?295c","pages/UserDetailsPage/util.ts","pages/UserDetailsPage/UserDetailsPage.tsx","webpack://control-panel-front/./src/pages/UsersListPage/components/DownloadSyncButton/DownloadSyncButton.module.css?0e53","pages/UsersListPage/components/DownloadSyncButton/DownloadSyncButton.tsx","context/InvitesContext/InvitesContext.tsx","context/InvitesContext/index.tsx","webpack://control-panel-front/./src/pages/UsersListPage/components/SendingInvitesStatusBlock/SendingInvitesStatusBlock.module.css?3e6e","pages/UsersListPage/components/SendingInvitesStatusBlock/SendingInvitesStatusBlock.tsx","webpack://control-panel-front/./src/pages/UsersListPage/UsersListPage.module.css?7e3b","components/Invites/InviteBlock/InviteBlock.tsx","pages/UsersListPage/UsersListPage.tsx","context/UsersContext/UsersContext.tsx","pages/UsersPage/UsersPage.tsx","webpack://control-panel-front/./src/components/Invites/InviteBlock/InviteBlock.module.css?318f","components/Invites/InviteBlock/util.ts","components/Invites/InviteBlock/Cells/AddressCell.tsx","components/Invites/InviteBlock/Cells/DateCell.tsx","components/Invites/InviteBlock/Cells/ExpireCell.tsx","components/Invites/InviteBlock/Cells/LogonCell.tsx","../node_modules/@skbkontur/react-ui/components/Paging/Paging.styles/Paging.styles.js","../node_modules/@skbkontur/react-ui/components/Paging/NavigationHelper/NavigationHelper.js","../node_modules/@skbkontur/react-ui/components/Paging/PagingHelper/PagingHelper.js","../node_modules/@skbkontur/react-ui/components/Paging/locale/locales/en/en.js","../node_modules/@skbkontur/react-ui/components/Paging/Paging/Paging.js","../node_modules/@skbkontur/react-ui/components/Paging/locale/index/index.js","../node_modules/@skbkontur/react-ui/components/Paging/locale/locales/ru/ru.js","../node_modules/@skbkontur/react-ui/components/Paging/PagingDefaultComponent/PagingDefaultComponent.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon16Light/ArrowCRightIcon16Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon20Light/ArrowCRightIcon20Light.js","../node_modules/@skbkontur/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon24Regular/ArrowCRightIcon24Regular.js","../node_modules/@skbkontur/react-ui/components/Paging/ForwardIcon/ForwardIcon.js","components/CommonUserComponents/EditLoginsModal/EditLoginsModal.tsx","webpack://control-panel-front/./src/components/Invites/InvitesTab/InvitesTab.module.css?61b0","components/Invites/InvitesTab/InvitesTab.tsx","components/Invites/InvitesTab/SendInviteModal/SendAdminInviteModal.tsx","components/Admins/AdminsTab/util.ts","components/Admins/AdminsTab/AdminsInvitesTab.tsx","webpack://control-panel-front/./src/components/CommonUserComponents/EditLoginsModal/EditLoginsModal.module.css?7e7e","components/CommonUserComponents/EditLoginsModal/utils.ts","components/Users/utils.tsx","components/CommonUserComponents/LastActivity/LastActivity.tsx","webpack://control-panel-front/./src/components/CommonUserComponents/Logons/Logons.module.css?7e08","components/CommonUserComponents/Logons/Logons.tsx","components/CommonUserComponents/OtpDevices/OtpDevices.module.css","components/CommonUserComponents/OtpDevices/OtpDevices.tsx","webpack://control-panel-front/./src/components/CommonUserComponents/Phone/Phone.module.css?ea7c","components/CommonUserComponents/Phone/Phone.tsx","components/Admins/AdminBlock/AdminBlock.tsx","components/CommonUserComponents/SecondFactorIndicator/SecondFactorIndicator.tsx","webpack://control-panel-front/./src/components/Admins/AdminBlock/AdminBlock.module.css?b103","components/Admins/AdminBlock/Cells/AdminAttributesListCell.tsx","components/Admins/AdminBlock/Cells/AdminCell.tsx","components/Admins/AdminBlock/utils.ts","components/Admins/AdminsTab/AdminsTab.tsx","webpack://control-panel-front/./src/components/Admins/AdminsTab/AdminsTab.module.css?aec5","components/Users/UserBlock/utils.tsx","webpack://control-panel-front/./src/components/Users/UserBlock/index.module.css?d895","components/Users/UserBlock/components/LogonsModule.tsx","components/Users/UserBlock/components/AttributesList.tsx","components/Users/UserBlock/UserBlock.tsx","components/Users/UserBlock/components/UserInfo.tsx","components/Users/UserBlock/PlainUserBlock.tsx","context/SelectContext/SelectContext.tsx","context/SelectContext/index.ts","../node_modules/qrcode.react/lib/esm/index.js","webpack://control-panel-front/./src/components/Groups/GroupMembers/GroupMembers.module.css?57a0","components/Groups/GroupMembers/utils.ts","components/Groups/GroupMembers/GroupMembers.tsx","webpack://control-panel-front/./src/components/CommonUserComponents/NoSearchResults/NoSearchResults.module.css?9d35","components/CommonUserComponents/NoSearchResults/NoSearchResults.tsx","webpack://control-panel-front/./src/components/Groups/GroupsTab/GroupsTab.module.css?9254","components/Groups/GroupsTab/GroupsTab.tsx","webpack://control-panel-front/./src/components/Invites/InvitesTab/SendInviteModal/index.module.css?a2bf","components/Invites/InvitesTab/SendInviteModal/components/EmailInviteTab.tsx","components/Invites/InvitesTab/utils.ts","components/Invites/InvitesTab/SendInviteModal/components/FileInviteTab.tsx","containers/UserContainer/UserContainer.tsx","components/Invites/InvitesTab/SendInviteModal/components/LinkInviteTab.tsx","components/Invites/InvitesTab/SendInviteModal/components/PhoneInviteTab.tsx","components/Invites/InvitesTab/SendInviteModal/SendUserInviteModal.tsx","components/Invites/InvitesTab/SendInviteModal/utils.ts","components/Invites/InvitesTab/UsersInvitesTab.tsx","webpack://control-panel-front/./src/components/MachinesPAM/MachinePAMDetails/index.module.css?7d09","components/MachinesPAM/MachinePAMDetails/MachinePAMDetails.tsx","components/UserDetails/UserRolesTab/util.ts","webpack://control-panel-front/./src/components/MachinesPAM/MachinePAMRoles/index.module.css?57b4","webpack://control-panel-front/./src/components/MachinesPAM/MachinePAMRoles/MachinesPAMRolesModal/MachinesPAMRolesModal.module.css?8d34","components/MachinesPAM/MachinePAMRoles/MachinesPAMRolesModal/MachinesPAMRolesModal.tsx","components/MachinesPAM/MachinePAMRoles/MachinePAMRoles.tsx","webpack://control-panel-front/./src/components/MachinesPAM/MachinePAMSessions/index.module.css?ea99","components/MachinesPAM/MachinePAMSessions/MachinePAMSessions.tsx","webpack://control-panel-front/./src/components/MachinesPAM/MachinesPAMActive/index.module.css?2a9f","components/MachinesPAM/MachinesPAMActive/MachinesPAMActive.tsx","webpack://control-panel-front/./src/components/RoleDetails/RolePAMDetails/RolePAMDetails.module.css?fc62","webpack://control-panel-front/./src/components/RoleDetails/RolePAMDetails/TimetableView.module.css?3b2c","components/RoleDetails/RolePAMDetails/TimetableView.tsx","components/RoleDetails/RolePAMDetails/RolePAMDetails.tsx","components/RoleDetails/utils.ts","webpack://control-panel-front/./src/components/RoleDetails/AddGroupsForRoleModal/AddGroupsForRoleModal.module.css?ab2c","components/RoleDetails/AddGroupsForRoleModal/AddGroupsForRoleModal.tsx","webpack://control-panel-front/./src/components/RoleDetails/RolePAMGroups/index.module.css?ca7f","components/RoleDetails/RolePAMGroups/RolePAMGroups.tsx","webpack://control-panel-front/./src/components/RoleDetails/AddMachinesForRoleModal/AddMachinesForRoleModal.module.css?98f6","components/RoleDetails/AddMachinesForRoleModal/AddMachinesForRoleModal.tsx","webpack://control-panel-front/./src/components/RoleDetails/RolePAMMachine/index.module.css?e6fe","components/RoleDetails/RolePAMMachine/RolePAMMachine.tsx","webpack://control-panel-front/./src/components/RoleDetails/AddUsersForRoleModal/AddUsersForRoleModal.module.css?604b","components/RoleDetails/AddUsersForRoleModal/AddUsersForRoleModal.tsx","webpack://control-panel-front/./src/components/RoleDetails/RolePAMMembers/index.module.css?359a","components/RoleDetails/RolePAMMembers/RolePAMMembers.tsx","webpack://control-panel-front/./src/components/UserDetails/UserDetailsTab/UserDetailsTab.module.css?cb55","components/UserDetails/UserDetailsTab/UserDetailsForm/UserDetailsForm.tsx","components/UserDetails/UserDetailsTab/UserDetailsTab.tsx","webpack://control-panel-front/./src/components/UserDetails/UserGroupsTab/UserGroupsTab.module.css?a6c5","components/UserDetails/UserGroupsTab/UserGroupsTab.tsx","webpack://control-panel-front/./src/components/UserDetails/UserRolesTab/HandleUserRolesModal/HandleUserRolesModal.module.css?5675","components/UserDetails/UserRolesTab/HandleUserRolesModal/HandleUserRolesModal.tsx","webpack://control-panel-front/./src/components/UserDetails/UserRolesTab/UserRolesTab.module.css?fb42","components/UserDetails/UserRolesTab/UserRolesTab.tsx","webpack://control-panel-front/./src/components/UserDetails/UserSessionsTab/UserSessionsTab.module.css?0dfb","components/UserDetails/UserSessionsTab/util.ts","components/UserDetails/UserSessionsTab/UserSessionsTab.tsx","webpack://control-panel-front/./src/pages/UsersListPage/NoUsers/imgs/imgStyles.module.css?db08","pages/UsersListPage/NoUsers/imgs/Letter.tsx","pages/UsersListPage/NoUsers/imgs/Manual.tsx","webpack://control-panel-front/./src/pages/UsersListPage/NoUsers/NoUsers.module.css?7c9d","pages/UsersListPage/NoUsers/NoUsers.tsx","webpack://control-panel-front/./src/components/Users/UsersTab/components/index.module.css?e88e","components/Users/UsersTab/components/SearchBlock.tsx","components/Users/UsersTab/components/Filter2Factor.tsx","../node_modules/@skbkontur/mass-actions-panel/node_modules/tslib/tslib.es6.js","../node_modules/@skbkontur/mass-actions-panel/src/ActionButton.styles.js","../node_modules/@skbkontur/mass-actions-panel/src/ActionButton.js","../node_modules/@skbkontur/mass-actions-panel/src/MassActionsPanel.styles.js","../node_modules/@skbkontur/mass-actions-panel/src/MassActionsPanel.js","components/Users/UsersTab/components/MassUsersActionsPanel.tsx","components/Users/UsersTab/UsersTab.tsx","components/Users/UsersTab/components/SortingLastActivity.tsx","components/Users/UsersTab/components/UsersList.tsx","webpack://control-panel-front/./src/components/Users/UsersTab/UsersTab.module.css?ea50","context/UsersContext/index.tsx","utils/hooks/useQueryState.tsx","components/App/Routes.tsx","components/App/App.tsx","reportWebVitals.ts","ThemedWrapper/ThemedWrapper.tsx","index.tsx"],"sourceRoot":"","sourcesContent":["module.exports = require(\"regenerator-runtime\");\n","import {\n THEME_2022,\n ThemeContext,\n ThemeFactory,\n TokenInput,\n TokenInputProps,\n} from '@skbkontur/react-ui';\nimport { FC } from 'react';\n\ninterface TokenInputSizedProps extends Omit, 'size'> {\n innerRef?: any;\n size: 'small' | 'medium' | 'large';\n}\n\ninterface TokenInputSizedTheme {\n tokenFontSize: string;\n tokenInputFontSize: string;\n tokenInputLineHeight: string;\n tokenInputPaddingX: string;\n tokenInputPaddingY: string;\n tokenLineHeight: string;\n tokenMarginX: string;\n tokenPaddingX: string;\n tokenPaddingY: string;\n}\n\nconst sizes: Record = {\n small: {\n tokenInputFontSize: '14px',\n tokenFontSize: '14px',\n tokenInputLineHeight: '22px',\n tokenLineHeight: '20px',\n tokenInputPaddingY: '2px',\n tokenPaddingY: '1px',\n tokenInputPaddingX: '2px',\n tokenPaddingX: '3px',\n tokenMarginX: '2px',\n },\n medium: {\n tokenInputFontSize: '16px',\n tokenFontSize: '16px',\n tokenInputLineHeight: '28px',\n tokenLineHeight: '22px',\n tokenInputPaddingY: '3px',\n tokenPaddingY: '3px',\n tokenInputPaddingX: '3px',\n tokenPaddingX: '5px',\n tokenMarginX: '2px',\n },\n large: {\n tokenInputFontSize: '18px',\n tokenFontSize: '18px',\n tokenInputLineHeight: '34px',\n tokenLineHeight: '24px',\n tokenInputPaddingY: '4px',\n tokenPaddingY: '5px',\n tokenInputPaddingX: '4px',\n tokenPaddingX: '7px',\n tokenMarginX: '2px',\n },\n};\n\nexport const TokenInputSized: FC = ({\n size = 'medium',\n ...props\n}) => (\n \n \n \n);\n","import { KonturColors } from '@skbkontur/colors';\nimport {\n THEME_2022,\n ThemeContext,\n ThemeFactory,\n Token,\n TokenProps,\n} from '@skbkontur/react-ui';\nimport { FC } from 'react';\n\nconst FILTER_TOKEN_THEME = {\n tokenBorderRadius: '24px',\n tokenBorderWidth: '0px',\n tokenDefaultIdleBg: KonturColors.grayscaleWhiteFFF,\n tokenDefaultIdleBgHover: KonturColors.grayscaleWhiteFFF,\n tokenPaddingXMedium: '8px',\n tokenPaddingYMedium: '2px',\n};\n\nexport const FilterToken: FC = (props) => (\n \n \n \n);\n","import {\n MenuItem,\n MenuItemProps,\n THEME_2022,\n ThemeContext,\n ThemeFactory,\n} from '@skbkontur/react-ui';\nimport { FC, SyntheticEvent } from 'react';\n\nexport const ThemedMenuItem: FC = (props) => (\n \n ) => {\n e.preventDefault();\n props.onClick?.(e);\n }}\n {...props}\n >\n {props.children}\n \n \n);\n","var _circle, _path, _circle2, _path2;\nvar _excluded = [\"title\", \"titleId\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from \"react\";\nfunction SvgSearchPeople(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 95,\n height: 74,\n viewBox: \"0 0 95 74\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 32,\n cy: 32,\n r: 32,\n fill: \"#FE4C4C\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25.4961 32.3034C25.4961 15.2891 39.2834 1.4967 56.2903 1.4967C73.2971 1.4967 87.0844 15.2891 87.0844 32.3034C87.0844 49.3178 73.2971 63.1102 56.2903 63.1102C39.2834 63.1102 25.4961 49.3178 25.4961 32.3034ZM56.2903 -0.0032959C38.4544 -0.0032959 23.9961 14.4612 23.9961 32.3034C23.9961 50.1457 38.4544 64.6102 56.2903 64.6102C63.5762 64.6102 70.2985 62.1965 75.7018 58.1248C76.5372 57.4953 77.7178 57.5427 78.4523 58.2875L93.7248 73.7757C94.0156 74.0707 94.4872 74.0707 94.778 73.7757C95.0688 73.4808 95.0688 73.0026 94.778 72.7077L79.7192 57.4363C78.9276 56.6335 78.9606 55.3392 79.7359 54.5206C85.2204 48.7303 88.5844 40.9098 88.5844 32.3034C88.5844 14.4612 74.1261 -0.0032959 56.2903 -0.0032959Z\",\n fill: \"#6C1D45\"\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 57,\n cy: 32,\n r: 14,\n fill: \"#6C1D45\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M52.4336 28.0893C52.4336 25.5519 54.4816 23.5 57.0018 23.5C59.5219 23.5 61.57 25.5519 61.57 28.0893C61.57 30.6267 59.5219 32.6786 57.0018 32.6786C54.4816 32.6786 52.4336 30.6267 52.4336 28.0893ZM57.0018 22C53.6476 22 50.9336 24.7291 50.9336 28.0893C50.9336 29.8229 51.656 31.3885 52.8159 32.498C53.1071 32.7765 53.0247 33.3115 52.6594 33.4813C51.0562 34.2269 49.6432 35.6384 49.1464 38.1695C49.0832 38.4915 49.0351 38.8302 49.0031 39.1863C48.966 39.5988 49.2704 39.9633 49.6829 40.0004C50.0955 40.0375 50.46 39.7331 50.497 39.3206C50.5246 39.0134 50.5657 38.7265 50.6183 38.4584C51.0165 36.4297 52.0938 35.3986 53.2919 34.8415C54.5371 34.2625 55.955 34.1787 57.0021 34.1787C58.1201 34.1787 59.6527 34.2747 60.9483 34.9584C62.1828 35.6099 63.284 36.837 63.5072 39.3206C63.5443 39.7331 63.9088 40.0375 64.3213 40.0004C64.7339 39.9633 65.0383 39.5988 65.0012 39.1863C64.734 36.2141 63.348 34.5288 61.6484 33.6319C61.1707 33.3797 61.0574 32.651 61.4264 32.2566C62.4459 31.1668 63.07 29.7006 63.07 28.0893C63.07 24.7291 60.356 22 57.0018 22Z\",\n fill: \"white\"\n })));\n}\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgSearchPeople);\nexport default __webpack_public_path__ + \"static/media/SearchPeople.d6012b0d428f666275cc7bb6c25c35d1.svg\";\nexport { ForwardRef as ReactComponent };","// extracted by mini-css-extract-plugin\nexport default {\"adsWrapper\":\"PamAdvertisement_adsWrapper__f3FNo\",\"adsImgWrapper\":\"PamAdvertisement_adsImgWrapper__ZLg+U\",\"ads\":\"PamAdvertisement_ads__+xsd3\",\"mainAdsContent\":\"PamAdvertisement_mainAdsContent__OjojQ\",\"adsCloseButton\":\"PamAdvertisement_adsCloseButton__z+Mkl\"};","import { KonturColors } from '@skbkontur/colors';\nimport { XIcon20Regular as XIcon } from '@skbkontur/icons/XIcon20Regular';\nimport { Button } from '@skbkontur/react-ui';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../../context/ServiceContext';\nimport { Banner } from '../../../shared';\nimport { ReactComponent as SearchPeople } from '../../../utils/images/SearchPeople.svg';\nimport styles from './PamAdvertisement.module.css';\n\ninterface Props {\n onClickButton: () => void;\n onClose: () => void;\n}\n\n/**\n * Компонент отвечает за отрисовку баннера-рекламы PAM.\n * https://yt.skbkontur.ru/issue/KID-972.\n */\nexport const PamAdvertisement: FC = ({ onClickButton, onClose }) => {\n const { tp } = useContext(ServiceCtx);\n\n return (\n \n
\n
\n \n
\n
\n

\n {tp.execute(\n 'Контролируйте доступ пользователей к критичным ресурсам с помощью Контур.PAM'\n )}\n

\n \n {tp.execute('Записаться на тестирование')}\n \n
\n
\n }\n size='medium'\n use='backless'\n className={styles.adsCloseButton}\n onClick={onClose}\n borderless\n />\n
\n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"footer\":\"Footer_footer__VZ15d\",\"secondFInstuction\":\"Footer_secondFInstuction__f6D6Z\"};","import { Link } from '@skbkontur/react-ui';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { DOCUMENTATION } from '../../utils/constants';\nimport { useMetrics } from '../../utils/hooks/useMetrics';\nimport { METRICS_CATEGORIES } from '../../utils/metrics/constants';\nimport styles from './Footer.module.css';\n\nexport const Footer: FC = () => {\n const { tp } = useContext(ServiceCtx);\n const { click } = useMetrics(METRICS_CATEGORIES.general);\n\n return (\n
\n \n {tp.execute('СКБ Контур')} {tp.execute('с 1988 года')}\n \n
\n click('2FactorDocumentationFooterLink')}\n >\n {tp.execute('Как работает двухфакторная аутентификация')}\n \n
\n
\n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"licenseErrorCaption\":\"LicenseErrorCaption_licenseErrorCaption__tLkSF\"};","import { FC, useContext } from 'react';\n\nimport {\n ServiceContext,\n ServiceCtx,\n} from '../../../../../context/ServiceContext';\nimport styles from './LicenseErrorCaption.module.css';\n\ninterface Props {\n message: string;\n}\n\nexport const LicenseErrorCaption: FC = ({ message }) => {\n const { tp } = useContext(ServiceCtx);\n return

{tp.execute(message)}

;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"errorInfoList\":\"LicenseErrorDetailsList_errorInfoList__lIkzU\",\"singleListElement\":\"LicenseErrorDetailsList_singleListElement__9FuiJ\"};","import cn from 'classnames';\nimport { FC, useContext } from 'react';\n\nimport {\n ServiceContext,\n ServiceCtx,\n} from '../../../../../context/ServiceContext';\nimport { OnPremLicenseErrorDetails } from '../../../../../utils/types/licenseTypes';\nimport styles from './LicenseErrorDetailsList.module.css';\n\ninterface Props {\n details: OnPremLicenseErrorDetails[];\n}\n\nexport const LicenseErrorDetailsList: FC = ({ details }) => {\n const { tp } = useContext(ServiceCtx);\n return (\n \n {details.map((el) => (\n
  • {tp.execute(el.message)}
  • \n ))}\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"warningWrapper\":\"LicenseWarning_warningWrapper__fCRyc\"};","import { WarningTriangleIcon20Regular as Warn } from '@skbkontur/icons/WarningTriangleIcon20Regular';\nimport { FC, useContext } from 'react';\n\nimport {\n ServiceContext,\n ServiceCtx,\n} from '../../../../../context/ServiceContext';\nimport { OnPremLicenseErrorDetails } from '../../../../../utils/types/licenseTypes';\nimport styles from './LicenseWarning.module.css';\n\ninterface Props {\n warnings: OnPremLicenseErrorDetails[];\n}\n\nexport const LicenseWarning: FC = ({ warnings }) => {\n const { tp } = useContext(ServiceCtx);\n\n return (\n
    \n \n
      \n {warnings.map((el) => (\n
    • {tp.execute(el.message)}
    • \n ))}\n
    \n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"bannerContentWrapper\":\"LicenseErrorBanner_bannerContentWrapper__AjbmE\",\"bannerContent\":\"LicenseErrorBanner_bannerContent__94PGB\",\"bannerTextContent\":\"LicenseErrorBanner_bannerTextContent__z+W+E\",\"closeBannerButton\":\"LicenseErrorBanner_closeBannerButton__NRYu4\"};","import { XIcon16Light as XIconSmall } from '@skbkontur/icons/XIcon16Light';\nimport { XIcon32Regular as XIcon } from '@skbkontur/icons/XIcon32Regular';\nimport { Button } from '@skbkontur/react-ui';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../../context/ServiceContext';\nimport { OnPremLicenseStatusResponse } from '../../../utils/api/LicenseApi/types';\nimport { LicenseErrorCaption, LicenseErrorDetailsList } from './components';\nimport { LicenseWarning } from './components/LicenseWarning/LicenseWarning';\nimport styles from './LicenseErrorBanner.module.css';\n\ninterface Props {\n licenseCheckDetails: OnPremLicenseStatusResponse;\n onClose: () => void;\n}\n\n/**\n * Компонент отвечает за отрисовку баннера при ошибке проверки onprem лицензии.\n * https://yt.skbkontur.ru/issue/KID-864.\n */\nexport const LicenseErrorBanner: FC = ({\n licenseCheckDetails,\n onClose,\n}) => {\n const { tp } = useContext(ServiceCtx);\n const { warnings, error, notifications } = licenseCheckDetails;\n return (\n
    \n
    \n {warnings?.details && }\n
    \n {error && }\n {error?.details && (\n \n )}\n {/* Не показываем нотификации, если есть ошибки */}\n {!error && notifications && (\n \n )}\n {!error && notifications?.details && (\n \n )}\n
    \n \n
    \n }\n size='medium'\n use='backless'\n className={styles.closeBannerButton}\n onClick={onClose}\n borderless\n />\n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"appWrapper\":\"App_appWrapper__Vxd8+\",\"contentWrapper\":\"App_contentWrapper__uwZr7\",\"mainContent\":\"App_mainContent__vB3nC\",\"menu\":\"App_menu__jNcTA\",\"orgItem\":\"App_orgItem__as6ls\",\"menuText\":\"App_menuText__V0tl+\",\"item\":\"App_item__hxWjt\",\"hideListMarker\":\"App_hideListMarker__ftNPB\",\"smallMenuBackground\":\"App_smallMenuBackground__VbHAO\",\"loaderPadding\":\"App_loaderPadding__zMhWK\"};","import React, { forwardRef } from 'react';\r\nexport var Pam = forwardRef(function (_a, ref) {\r\n var _b = _a.color, color = _b === void 0 ? '#FE4C4C' : _b, _c = _a.size, size = _c === void 0 ? 24 : _c;\r\n return (React.createElement(\"span\", { style: {\r\n width: size * 1.7916666666666667 + \"px\",\r\n height: size,\r\n lineHeight: size + \"px\",\r\n display: 'inline-block',\r\n }, ref: ref },\r\n React.createElement(\"svg\", { viewBox: \"0 0 43 24\", xmlns: \"http://www.w3.org/2000/svg\", focusable: false, style: {\r\n marginBottom: \"-\" + size * 0.20833333333333337 + \"px\",\r\n width: '100%',\r\n height: '100%',\r\n display: 'inline-block',\r\n } },\r\n React.createElement(\"path\", { d: \"M12.117 9.16c0 .87-.184 1.616-.554 2.237-.356.62-.891 1.102-1.604 1.445-.713.343-1.511.515-2.396.515H3.366V19H1.524V4.942h6.04c.937 0 1.742.171 2.415.515.686.33 1.214.811 1.584 1.445.37.62.554 1.373.554 2.257zM7.326 6.465h-3.98v5.366h3.98c.95 0 1.683-.23 2.198-.693.528-.462.792-1.122.792-1.98 0-.87-.264-1.538-.792-2-.515-.462-1.248-.693-2.198-.693zM16.314 12.03l-.653 1.881h5.267l-.674-1.9-1.227-3.505-.178-.475-.575-1.723c-.224.779-.877 2.686-1.96 5.722zM24.61 19h-1.88l-1.288-3.584h-6.316L13.86 19h-1.841l5.088-14.058h2.396L24.61 19zM35.405 11.14l2.178-6.198h2.89V19h-1.781v-7.01c0-2.296.02-4.204.06-5.721a189.638 189.638 0 0 1-1.783 5.167L34.316 19h-1.604l-2.495-7.049c-.87-2.35-1.524-4.23-1.96-5.643v1.426l.02 4.257V19h-1.723V4.942h2.891l2.198 6.197c.91 2.456 1.544 4.317 1.9 5.584.37-1.254.99-3.115 1.862-5.584z\", fill: color }))));\r\n});\r\nPam.displayName = 'Pam';\r\nPam.__KONTUR_REACT_UI__ = 'Pam';\r\nPam.__KONTUR_LOGO__ = true;\r\n","import { BookNotepadIcon20Regular } from '@skbkontur/icons/BookNotepadIcon20Regular';\nimport { BookNotepadIcon24Regular as Notepad } from '@skbkontur/icons/BookNotepadIcon24Regular';\nimport { DataChartBarsAIcon24Regular as Chart } from '@skbkontur/icons/DataChartBarsAIcon24Regular';\nimport { FaceAHappyIcon24Regular } from '@skbkontur/icons/FaceAHappyIcon24Regular';\nimport { JewelCrownIcon24Regular as Crown } from '@skbkontur/icons/JewelCrownIcon24Regular';\nimport { People2Icon24Regular as People } from '@skbkontur/icons/People2Icon24Regular';\nimport { SettingsGearIcon24Regular as Gear } from '@skbkontur/icons/SettingsGearIcon24Regular';\nimport { TechPcDesktopIcon24Regular } from '@skbkontur/icons/TechPcDesktopIcon24Regular';\nimport { TechServerIcon24Regular } from '@skbkontur/icons/TechServerIcon24Regular';\nimport React from 'react';\n\nimport { APP_PAGES } from '../../utils/metrics/constants';\nimport { ID_ROUTES, PAM_ROUTES } from '../../utils/navigation/routes';\n\nexport interface MenuDataI {\n caption: string;\n href: string;\n icon: React.ReactElement;\n id: string;\n key: string;\n metric?: T;\n}\n//TODO: заменить enum на урлю. Какие есть подводные: нужны полные урлы\nexport enum ID_MENU_PAGES {\n Admins = 'Admins',\n Events = 'Events',\n Resources = 'Resources',\n Statistics = 'Statistics',\n Users = 'Users',\n}\n\nexport enum PAM_MENU_PAGES {\n Admins = 'Admins',\n Events = 'Events',\n MachinesPAM = 'MachinesPAM',\n Roles = 'Roles',\n Sessions = 'Sessions',\n SettingsGateway = 'SettingsGateway',\n Statistics = 'Statistics',\n Users = 'Users',\n}\n\nexport const ID_MENU_DATA: MenuDataI[] = [\n {\n id: ID_MENU_PAGES.Resources,\n key: '/resources',\n icon: ,\n caption: 'Ресурсы',\n href: ID_ROUTES.RESOURCES.LIST,\n metric: APP_PAGES.resourcesListPage,\n },\n {\n id: ID_MENU_PAGES.Users,\n key: '/users/active',\n icon: ,\n caption: 'Пользователи',\n href: `/${ID_ROUTES.USERS.LIST}/${ID_ROUTES.USERS.TABS.ACTIVE}`,\n metric: APP_PAGES.usersListPage,\n },\n {\n id: ID_MENU_PAGES.Events,\n key: '/events',\n icon: ,\n caption: 'Журнал событий',\n href: ID_ROUTES.EVENTS,\n metric: APP_PAGES.eventsPage,\n },\n {\n id: ID_MENU_PAGES.Statistics,\n key: '/statics',\n icon: ,\n caption: 'Статистика',\n href: ID_ROUTES.STATISTICS,\n metric: APP_PAGES.statisticsPage,\n },\n {\n id: ID_MENU_PAGES.Admins,\n key: '/admins/active',\n icon: ,\n caption: 'Администраторы',\n href: `/${ID_ROUTES.ADMINS.LIST}/active`,\n metric: APP_PAGES.adminsListPage,\n },\n];\n\nexport const PAM_MENU_DATA: MenuDataI[] = [\n {\n id: PAM_MENU_PAGES.Events,\n key: '/events',\n icon: ,\n caption: 'Журнал событий',\n href: PAM_ROUTES.EVENTS,\n },\n {\n id: PAM_MENU_PAGES.Sessions,\n key: '/sessions',\n icon: ,\n caption: 'Сессии',\n href: PAM_ROUTES.SESSIONS,\n },\n {\n id: PAM_MENU_PAGES.Users,\n key: '/users/active',\n icon: ,\n caption: 'Пользователи',\n href: `/${PAM_ROUTES.USERS.LIST}/${PAM_ROUTES.USERS.TABS.ACTIVE}`,\n },\n {\n id: PAM_MENU_PAGES.Roles,\n key: '/roles',\n icon: ,\n caption: 'Роли',\n href: PAM_ROUTES.ROLES,\n },\n {\n id: PAM_MENU_PAGES.SettingsGateway,\n key: '/settings-gateway',\n icon: ,\n caption: 'Настройки шлюза',\n href: PAM_ROUTES.SETTINGS_GATEWAY.LIST,\n },\n {\n id: PAM_MENU_PAGES.MachinesPAM,\n key: '/machine-pam/active',\n icon: ,\n caption: 'Машины PAM',\n href: `${PAM_ROUTES.MACHINES_PAM.LIST}/${PAM_ROUTES.MACHINES_PAM.TABS.ACTIVE}`,\n },\n {\n id: PAM_MENU_PAGES.Admins,\n key: '/admins/active',\n icon: ,\n caption: 'Администраторы',\n href: `${PAM_ROUTES.ADMINS.LIST}/${PAM_ROUTES.ADMINS.TABS.ACTIVE}`,\n },\n {\n id: PAM_MENU_PAGES.Statistics,\n key: '/statistics',\n icon: ,\n caption: 'Статистика',\n href: PAM_ROUTES.STATISTICS,\n },\n];\n","var BASE_URL_TEST = 'https://api.testkontur.ru/cabinet-api/v1/users';\r\nvar BASE_URL_PROD = 'https://api.kontur.ru/cabinet-api/v1/users';\r\nexport var getKonturAvatarUrl = function (getAvatarUrlData) {\r\n var baseUrl = getAvatarUrlData.baseUrl, userId = getAvatarUrlData.userId, avatarId = getAvatarUrlData.avatarId, avatarSize = getAvatarUrlData.avatarSize, production = getAvatarUrlData.production;\r\n var url = baseUrl || (production ? BASE_URL_PROD : BASE_URL_TEST);\r\n var size = avatarSize ? \"?size=\" + avatarSize : '';\r\n return url + \"/\" + userId + \"/avatars/\" + (avatarId || 'current') + size;\r\n};\r\n","import { KonturColors } from '@skbkontur/colors';\nimport { BagBriefcaseIcon24Regular as Bag } from '@skbkontur/icons/BagBriefcaseIcon24Regular';\nimport { BookClosedHelpIcon24Regular as Book } from '@skbkontur/icons/BookClosedHelpIcon24Regular';\nimport { Id, Kontur, Pam } from '@skbkontur/logos';\nimport {\n MenuItem,\n Sticky,\n THEME_2022,\n ThemeContext,\n ThemeFactory,\n} from '@skbkontur/react-ui';\nimport { getKonturAvatarUrl } from '@skbkontur/react-ui-addons';\nimport { SideMenu } from '@skbkontur/side-menu';\nimport cn from 'classnames';\nimport { FC, useContext, useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { SideMenuLink, TooltipOverTruncated } from '../../shared';\nimport { isPAMMode } from '../../utils/common';\nimport { DOCUMENTATION } from '../../utils/constants';\nimport { useCheckAuth } from '../../utils/hooks';\nimport { useMetrics } from '../../utils/hooks/useMetrics';\nimport { METRICS_CATEGORIES } from '../../utils/metrics/constants';\nimport { Organization } from '../../utils/types/';\nimport { getCabinetUrl, getLogOutUrl } from '../../utils/urls';\nimport styles from './App.module.css';\nimport { AppContext, AppCtx } from './Content';\nimport { ID_MENU_DATA, PAM_MENU_DATA } from './data';\nimport { getActivePageId } from './utils';\n\ninterface Props {\n organization?: Organization;\n}\n\nexport const Menu: FC = ({ organization }) => {\n useCheckAuth();\n const { pathname } = useLocation();\n const isPAM = isPAMMode();\n const currentMenuMock = isPAM ? PAM_MENU_DATA : ID_MENU_DATA;\n const { tp } = useContext(ServiceCtx);\n const {\n currentUserState: { currentUser },\n } = useContext(AppCtx);\n const { fio, email, phone, userId } = currentUser || {};\n const { logoutClick, sideMenuClick } = useMetrics(METRICS_CATEGORIES.general);\n\n const [activePageId, setActivePageId] = useState(\n currentMenuMock[0].id\n );\n\n const onMenuItemChange = (id: string) => {\n setActivePageId(id);\n };\n\n const visibleUserInfo = fio || email || phone || 'Пользователь';\n\n useEffect(() => {\n setActivePageId(getActivePageId(currentMenuMock, pathname));\n }, [pathname]);\n\n const logo = isPAM ? : ;\n\n const orgName = (\n \n );\n\n const MenuItemTheme = ThemeFactory.create(\n {\n sideMenuItemHoverBg: KonturColors.grayscaleLightBackground,\n sideMenuItemActiveBg: KonturColors.grayscaleLightBackground,\n },\n THEME_2022\n );\n\n const MenuDocItemTheme = ThemeFactory.create(\n {\n sideMenuItemActiveBg: KonturColors.grayscaleLightBackground,\n },\n THEME_2022\n );\n\n return (\n \n \n }\n productLogo={logo}\n withWidget={false}\n />\n \n {currentMenuMock.map((item) => {\n return (\n item.metric && sideMenuClick(item.metric)}\n />\n );\n })}\n \n \n \n }\n caption='Документация'\n href={DOCUMENTATION}\n target='_blank'\n isButton={true}\n className={styles.item}\n onClick={() => sideMenuClick('documentation')}\n />\n \n \n }\n caption={orgName}\n className={cn(styles.item, styles.orgItem)}\n />\n \n \n {\n sideMenuClick('сabinet');\n window.location.assign(getCabinetUrl());\n }}\n >\n Личный кабинет\n \n {\n logoutClick();\n window.location.assign(getLogOutUrl());\n }}\n >\n Выйти\n \n \n \n \n
    \n \n );\n};\n","import {\n BASE_ROUTES,\n ID_ROUTES,\n PAM_ROUTES,\n} from '../../utils/navigation/routes';\nimport LocalStorage from '../../utils/storage/localStorage';\nimport {\n ID_MENU_DATA,\n ID_MENU_PAGES,\n PAM_MENU_DATA,\n PAM_MENU_PAGES,\n} from './data';\n\n//TODO: нужно переработать этот подход, иначе сравнивая только кусок пути мы можем наткнуться на баг в котором будут пересекаться два пути. Например /admin/active и /users/active.\nexport const getActivePageId = (\n routes: typeof PAM_MENU_DATA | typeof ID_MENU_DATA,\n pathname: string\n) => {\n if (routes === PAM_MENU_DATA) {\n switch (true) {\n case pathname.includes(PAM_ROUTES.MACHINES_PAM.LIST):\n case pathname.includes(PAM_ROUTES.MACHINES_PAM.LIST) &&\n pathname.includes(PAM_ROUTES.MACHINES_PAM.TABS.ACTIVE):\n case pathname.includes(PAM_ROUTES.MACHINES_PAM.LIST) &&\n pathname.includes(PAM_ROUTES.MACHINES_PAM.TABS.AWAIT_SETTINGS):\n case pathname.includes(PAM_ROUTES.MACHINE_PAM.LIST.replace('/:id', '')):\n return PAM_MENU_PAGES.MachinesPAM;\n case pathname.includes(PAM_ROUTES.SETTINGS_GATEWAY.LIST):\n return PAM_MENU_PAGES.SettingsGateway;\n case pathname.includes(PAM_ROUTES.ROLES):\n case pathname.includes(PAM_ROUTES.ROLE_PAM.LIST.replace('/:id', '')):\n return PAM_MENU_PAGES.Roles;\n case pathname.includes(PAM_ROUTES.USERS.LIST):\n return PAM_MENU_PAGES.Users;\n case pathname.includes(PAM_ROUTES.SESSIONS):\n return PAM_MENU_PAGES.Sessions;\n case pathname.includes(PAM_ROUTES.EVENTS):\n return PAM_MENU_PAGES.Events;\n case pathname.includes(PAM_ROUTES.ADMINS.LIST):\n return PAM_MENU_PAGES.Admins;\n case pathname.includes(PAM_ROUTES.STATISTICS):\n return PAM_MENU_PAGES.Statistics;\n default:\n return PAM_MENU_PAGES.Events;\n }\n }\n\n if (routes === ID_MENU_DATA) {\n switch (true) {\n case pathname.includes(ID_ROUTES.RESOURCES.LIST):\n return ID_MENU_PAGES.Resources;\n case pathname.includes(ID_ROUTES.ADMINS.LIST):\n return ID_MENU_PAGES.Admins;\n case pathname.includes(ID_ROUTES.USERS.LIST):\n case pathname.includes(\n `${ID_ROUTES.USERS.TABS.INVITED}/${ID_ROUTES.USERS.INVITED_ERRORS}`\n ):\n return ID_MENU_PAGES.Users;\n case pathname.includes(ID_ROUTES.STATISTICS):\n return ID_MENU_PAGES.Statistics;\n case pathname.includes(ID_ROUTES.EVENTS):\n return ID_MENU_PAGES.Events;\n default:\n return ID_MENU_PAGES.Resources;\n }\n }\n\n return BASE_ROUTES.MAIN;\n};\n\nexport const shouldSkipPamAds = (storage: LocalStorage) => {\n return !!storage.getSkipPamAdsFlag();\n};\n","import {\n createContext,\n FC,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { Outlet, useLoaderData, useLocation } from 'react-router-dom';\n\nimport {\n CurrentUserState,\n OrganizationState,\n useCurrentUserState,\n useOrganizationState,\n} from '../../context/AppStateHooks';\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { default as Api } from '../../utils/api';\nimport { OnPremLicenseStatusResponse } from '../../utils/api/LicenseApi/types';\nimport { isPAMMode, processError } from '../../utils/common';\nimport { PAM_ADS_LANDING_URL } from '../../utils/constants';\nimport { useMetrics } from '../../utils/hooks';\nimport {\n METRICS_CATEGORIES,\n METRICS_LABELS,\n} from '../../utils/metrics/constants';\nimport { BASE_ROUTES } from '../../utils/navigation/routes';\nimport { Organization } from '../../utils/types';\nimport { getCheckOnPremLicenseFlag } from '../../utils/urls';\nimport { PamAdvertisement } from '../Ads/PamAdvertisement/PamAdvertisement';\nimport { Footer } from '../Footer/Footer';\nimport { LicenseErrorBanner } from '../License';\nimport styles from './App.module.css';\nimport { Menu } from './Menu';\nimport { shouldSkipPamAds } from './utils';\n\nexport interface AppContext {\n currentUserState: CurrentUserState;\n organizationState: OrganizationState;\n}\n\nexport const AppCtx = createContext(null as unknown as AppContext);\n\nexport const Content: FC = () => {\n const { pathname } = useLocation();\n const organizationInfo = useLoaderData() as Organization;\n const { api, sessionStorage, localStorage, tracker } =\n useContext(ServiceCtx);\n\n const { click } = useMetrics(METRICS_CATEGORIES.general);\n /** States from context. */\n const [organizationState] = useOrganizationState();\n const [currentUserState] = useCurrentUserState();\n\n const [onPremLicenseError, setOnPremLicenseError] =\n useState();\n\n const [showPamAds, setShowPamAds] = useState(\n !shouldSkipPamAds(localStorage)\n );\n const anchorRef = useRef(null);\n\n const getEnvSettings = async () => {\n await api.EnvironmentSettings.getEnvironmentSettings();\n };\n\n const checkOnPremLicense = async (): Promise<\n OnPremLicenseStatusResponse | undefined\n > => {\n try {\n const result = await api.License.getOnPremLicenseStatus();\n\n if (!result.error && !result.notifications && !result.warnings) {\n return;\n }\n\n return result;\n } catch (err) {\n const error = processError(err);\n // Пока показываем общую ошибку, без подробностей\n return {\n error: {\n code: error.code,\n message: 'Не удалось проверить лицензию OnPrem инсталляции',\n },\n };\n }\n };\n\n useEffect(() => {\n (async () => {\n organizationState.setOrganization(organizationInfo);\n tracker.setOrganization(organizationInfo);\n await getEnvSettings();\n const shouldCheckLicense =\n getCheckOnPremLicenseFlag() &&\n !sessionStorage.getSkipOnPremErrorBannerFlag();\n\n if (shouldCheckLicense) {\n const result = await checkOnPremLicense();\n setOnPremLicenseError(result);\n }\n\n if (isPAMMode()) {\n const roles = await api.Roles.getRolesList();\n organizationState.setRolesCount(roles.totalCount);\n }\n })();\n }, [organizationInfo.id]);\n\n const closeOnPremLicenseError = () => {\n setOnPremLicenseError(undefined);\n sessionStorage.setSkipOnPremErrorBannerFlag();\n };\n\n const isError = pathname === `/${BASE_ROUTES.ERROR}`;\n\n return (\n \n
    \n {!isError && }\n
    \n \n {!isPAMMode() && showPamAds && (\n {\n click('openLanding', METRICS_LABELS.showPamAds);\n anchorRef.current?.click();\n }}\n onClose={() => {\n click('closeLanding', METRICS_LABELS.showPamAds);\n localStorage.setSkipPamAdsFlag();\n setShowPamAds(false);\n }}\n />\n )}\n
    \n \n
    \n {!isError &&
    }\n
    \n {onPremLicenseError && (\n \n )}\n
    \n \n );\n};\n\n/** Получаем информацию об организации. */\nexport const organizationLoader = async (): Promise => {\n const api = new Api();\n return await api.Organizations.getOrganization();\n};\n","import { useState } from 'react';\n\nimport type { Organization, Undefined } from '../../utils/types/';\n\n/** Стейт приложения, хранящий информацию о текущей организваии. */\nexport interface OrganizationState {\n organization?: Organization;\n rolesCount?: number;\n setOrganization: (value: Organization) => void;\n setRolesCount: (value: number) => void;\n}\n\nexport const useOrganizationState = () => {\n const [organization, setOrganization] = useState>();\n const [rolesCount, setRolesCount] = useState>();\n\n return [\n {\n organization,\n setOrganization,\n rolesCount,\n setRolesCount,\n },\n ] as const;\n};\n","import { useState } from 'react';\n\nimport type { Admin, Undefined } from '../../utils/types';\n\n/** Стейт приложения, хранящий информацию о текущем пользователе. */\nexport interface CurrentUserState {\n currentUser?: Admin;\n setCurrentUser: (value: Admin) => void;\n}\n\nexport const useCurrentUserState = () => {\n const [currentUser, setCurrentUser] = useState>();\n\n return [\n {\n currentUser,\n setCurrentUser,\n },\n ] as const;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"errBody\":\"CustomError_errBody__PkLed\",\"errCaption\":\"CustomError_errCaption__S+uzu\",\"errIcon\":\"CustomError_errIcon__xyEjP\"};","import { KonturColors } from '@skbkontur/colors';\nimport { XCircleIcon64Regular as XCircle } from '@skbkontur/icons/XCircleIcon64Regular';\nimport { Modal } from '@skbkontur/react-ui';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../../context/ServiceContext';\nimport { DEFAULT_SMALL_MODAL_WIDTH } from '../../../utils/constants';\nimport styles from './CustomError.module.css';\n\ninterface Props {\n caption?: string;\n errorText?: string;\n onClose: () => void;\n}\n\nexport const CustomError: FC = ({ caption, errorText, onClose }) => {\n const { tp } = useContext(ServiceCtx);\n return (\n \n \n
    \n \n

    \n {tp.execute(caption || 'Произошла ошибка')}\n

    \n

    \n {tp.execute(errorText || 'Попробуйте повторить действие позже')}\n

    \n
    \n
    \n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"statBlockCaption\":\"ErrorBlock_statBlockCaption__B951z\",\"statisticsError\":\"ErrorBlock_statisticsError__Xo9aD\"};","import { Button } from '@skbkontur/react-ui';\nimport { FC, useContext, useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router';\n\nimport { ServiceContext, ServiceCtx } from '../../../context/ServiceContext';\nimport { useMetrics } from '../../../utils/hooks';\nimport {\n APP_PAGES,\n METRICS_CATEGORIES,\n METRICS_LABELS,\n} from '../../../utils/metrics/constants';\nimport { BASE_ROUTES } from '../../../utils/navigation/routes';\nimport image from './error.png';\nimport styles from './ErrorBlock.module.css';\n\nexport const ErrorBlock: FC = () => {\n const navigate = useNavigate();\n\n const { tp, tracker } = useContext(ServiceCtx);\n const { pageLoaded, returnClick } = useMetrics(\n METRICS_CATEGORIES.usersManagement\n );\n const [loader, setLoader] = useState(false);\n\n useEffect(() => {\n tracker.setPage(APP_PAGES.statisticsPage);\n pageLoaded(APP_PAGES.statisticsPage);\n }, []);\n\n const onReturn = () => {\n setLoader(true);\n returnClick(METRICS_LABELS.error);\n navigate(BASE_ROUTES.MAIN, { replace: true });\n };\n\n return (\n
    \n Ошибка\n

    \n {tp.execute('Произошла ошибка')}\n

    \n
    \n {tp.execute('Не удалось получить информацию')}\n
    \n \n
    \n );\n};\n","import { ValidationInfo } from '@skbkontur/react-ui-validations';\nimport { isEqual } from 'lodash';\n\nimport { WEEK, WEEK_DAYS } from '../../../utils/constants';\nimport {\n ajustTimeZone,\n DAY_END,\n formatDateDDMMYYYY,\n getCurrentTimezone,\n} from '../../../utils/time';\nimport { Null, Nullable } from '../../../utils/types';\nimport {\n BaseRoleInfo,\n ExpandedBaseRoleInfo,\n RoleActivityModes,\n TimetableRow,\n} from '../../../utils/types/rolesTypes';\n\nexport type ActiveRoleModes =\n | RoleActivityModes.DaySegment\n | RoleActivityModes.FullDay;\n\n// Тип item в селекте для выбора периода активности роли\nexport interface IVariant {\n title: string;\n value: ActiveRoleModes;\n}\n\n/** Периоды активности роли для Select. */\nexport const activeRoleItems: IVariant[] = [\n {\n value: RoleActivityModes.FullDay,\n title: 'Весь день',\n },\n {\n value: RoleActivityModes.DaySegment,\n title: 'По часам',\n },\n];\n\n// Периоды, когда роль активна.\nexport const activeRoleModes = [\n RoleActivityModes.DaySegment,\n RoleActivityModes.FullDay,\n];\n\nexport const activeRoleMap: Record = {\n [RoleActivityModes.DaySegment]: 'По часам',\n [RoleActivityModes.FullDay]: 'Весь день',\n};\n\n/**\n * Интерфейс формы с изменениями роли. В форме id роли не обязателен, потому что\n * она может использоваться и для создания новой роли.\n */\nexport interface RoleEditForm extends Omit {\n id?: string;\n}\n\n/** Валидация значений формы редактирования роли. */\nexport interface FormValidationInfo {\n description?: Null;\n name?: Null;\n timetable?: Null;\n}\n\nexport enum START_WEEKEND_INDEXES {\n Week = 1,\n Days = 5,\n}\n\n/**\n * Проверяем, является ли день по переданному индексу выходным.\n *\n * @param daysNumber Общее количество дней/периодов. 2 или 7.\n * @param i Индекс дня/периода.\n */\nexport const isWeekendTime = (daysNumber: number, i: number) => {\n const weekendIndex =\n daysNumber > WEEK.length\n ? START_WEEKEND_INDEXES.Days\n : START_WEEKEND_INDEXES.Week;\n return i >= weekendIndex;\n};\n\n/**\n * Вычисляем activityMode по времени начала и конца активности.\n *\n * @param start Время начала действия роли.\n * @param end Время окончания действия роли.\n */\nexport const calcRoleActivityMode = (\n start: Nullable,\n end: Nullable\n): RoleActivityModes => {\n switch (true) {\n case start === DEFAULT_TIME && end === DEFAULT_TIME:\n return RoleActivityModes.FullDay;\n case !start && !end:\n return RoleActivityModes.NotActive;\n default:\n return RoleActivityModes.DaySegment;\n }\n};\n\n/**\n * Переключаем количество дней с Пн-Пт, Сб-Вс на Пн, Вт, Ср, Чт, Пт, Сб, Вс, и\n * наоборот.\n *\n * @param daysNumber Новое количество дней/периодов.\n * @param prevValue Предыдущее значение расписания. Нужно для того, чтобы\n * сохранить уже введенные пользователем значения.\n */\nexport const switchTimetableLength = (\n daysNumber: number,\n prevValue: Null> = []\n): Array => {\n const localPrevValue = !prevValue ? [] : prevValue;\n const result: Array = [];\n const previousWeekendIndex =\n daysNumber === WEEK.length\n ? START_WEEKEND_INDEXES.Days\n : START_WEEKEND_INDEXES.Week;\n\n for (let i = 0; i < daysNumber; i++) {\n let startTime: Null = localPrevValue[0]\n ? localPrevValue[0].startTime\n : DEFAULT_START_TIME; //null;\n let endTime: Null = localPrevValue[0]\n ? localPrevValue[0].endTime\n : DEFAULT_END_TIME; //null;\n let activityMode =\n localPrevValue[0]?.activityMode ||\n calcRoleActivityMode(startTime, endTime);\n\n if (isWeekendTime(daysNumber, i)) {\n startTime = localPrevValue[previousWeekendIndex]?.startTime || null;\n endTime = localPrevValue[previousWeekendIndex]?.endTime || null;\n activityMode =\n localPrevValue[previousWeekendIndex]?.activityMode ||\n calcRoleActivityMode(startTime, endTime);\n }\n\n result[i] = {\n startTime,\n endTime,\n activityMode,\n };\n }\n\n return result;\n};\n\nexport const NOT_ACTIVE_TIMETABLE_ROW = {\n startTime: null,\n endTime: null,\n activityMode: RoleActivityModes.NotActive,\n};\n\nexport const DEFAULT_START_TIME = '10:00';\nexport const DEFAULT_END_TIME = '18:00';\nexport const DEFAULT_TIME = '00:00';\nexport const DEFAULT_TIMETABLE_ROW = {\n activityMode: RoleActivityModes.DaySegment,\n startTime: DEFAULT_START_TIME,\n endTime: DEFAULT_END_TIME,\n};\n\nexport const INITIAL_ROLE_INFO = {\n name: '',\n timetable: [\n DEFAULT_TIMETABLE_ROW, // будни\n NOT_ACTIVE_TIMETABLE_ROW, // выходные\n ],\n timeZone: getCurrentTimezone(),\n};\n\nexport const ALL_DAY_TIMETABLE: TimetableRow = {\n startTime: null,\n endTime: null,\n activityMode: RoleActivityModes.FullDay,\n};\n\nexport const INITIAL_ALL_DAY_ROLE_INFO: BaseRoleInfo = {\n name: '',\n timetable: null,\n timeZone: getCurrentTimezone(),\n};\n\nexport const timetableViewsMap = new Map([\n [true, WEEK_DAYS],\n [false, WEEK],\n]);\n\nconst adaptTimetableRow = (row: TimetableRow) => {\n const { startTime, endTime, activityMode } = row;\n\n switch (true) {\n // заменяем startTime и endTime на null\n case activityMode === RoleActivityModes.FullDay:\n case startTime === DEFAULT_TIME && endTime === DAY_END:\n return ALL_DAY_TIMETABLE;\n case activityMode === RoleActivityModes.NotActive:\n return NOT_ACTIVE_TIMETABLE_ROW;\n case startTime && startTime === endTime:\n // если startTime и endTime - 00:00, считаем, что заданы сутки\n return startTime === DEFAULT_TIME\n ? ALL_DAY_TIMETABLE\n : // если время начала и конца действия роли равны, роль неактивна\n NOT_ACTIVE_TIMETABLE_ROW;\n // если endTime 00:00, меняем его на 23:59\n case endTime === DEFAULT_TIME:\n row.endTime = DAY_END;\n return row;\n default:\n return row;\n }\n};\n\n/**\n * Готовим расписание работы роли к добавлению в тело запроса в апи:\n *\n * - При необходимости дополняем двухстрочное расписание до семидневного - api\n * пока умеет работать только с таким.\n * - Если startTime и endTime - 00:00, меняем activityMode на FullDay.\n * - Если время начала и конца действия роли равны и не 00:00, то меняем\n * activityMode на notActive.\n * - Если activityMode = FullDay или NotActive, меняем startTime и endTime на\n * null.\n * - Если все дни в расписании имеют activityMode = FullDay, то возвращаем null\n * (безлимит)\n * - Если время окончания действия роли 00:00, меняем его на 23:59.\n *\n * @param value Расписание.\n */\nexport const processTimetable = (\n value: Array\n): Null> => {\n let fullDayCache = 0;\n let newTimetable = [];\n\n // если расписание состоит из 2 строк, расширяем до 7\n if (value.length === WEEK.length) {\n for (let i = 0; i < 7; i++) {\n const adapted = isWeekendTime(7, i)\n ? adaptTimetableRow(value[1])\n : adaptTimetableRow(value[0]);\n\n if (adapted.activityMode === RoleActivityModes.FullDay) {\n fullDayCache++;\n }\n\n newTimetable.push(adapted);\n }\n } else {\n newTimetable = value.map((el) => {\n const adapted = adaptTimetableRow(el);\n\n if (adapted.activityMode === RoleActivityModes.FullDay) {\n fullDayCache++;\n }\n\n return adapted;\n });\n }\n\n return fullDayCache === WEEK_DAYS.length ? null : newTimetable;\n};\n\n/**\n * Проверяем вид расписания. Расписание на бэкенде всегда хранится в массиве из\n * 7 объектов.\n *\n * @param timetable Расписание.\n */\nexport const computeTimetableView = (timetable: TimetableRow[]): string[] => {\n if (timetable.length === WEEK.length) {\n return WEEK;\n }\n\n // Если первые 5 и последние 2 элементы равны между собой, то считаем, что расписание в виде WEEK.\n // Если последние 2 элемента не равны, сразу выходим\n if (!isEqual(timetable[5], timetable[6])) {\n return WEEK_DAYS;\n }\n\n // Проверяем первые 5 элементов\n const first = timetable[0];\n\n for (let i = 1; i < 5; i++) {\n // сравниваем элементы с первым\n if (!isEqual(timetable[i], first)) {\n return WEEK_DAYS;\n }\n }\n\n return WEEK;\n};\n\n/**\n * Получаем дату окончания работы роли в локальном часовом поясе.\n *\n * @param endDate Строка с датой.\n */\nexport const getLocalEndTime = (endDate: string): string => {\n return formatDateDDMMYYYY(ajustTimeZone(endDate));\n};\n\n/**\n * Валидируем расписание.\n *\n * - Проверяем, что время заполнено, если activityMode = DaySegment.\n * - Проверяем, что время начала меньше времени окончания действия роли (кроме\n * 00:00).\n *\n * @param timetable Расписание.\n */\nexport const checkTimetableValidation = (timetable: TimetableRow[]) => {\n return timetable.some(({ startTime, endTime, activityMode }) => {\n switch (true) {\n case activityMode === RoleActivityModes.DaySegment &&\n (!startTime || !endTime):\n case startTime &&\n endTime &&\n activityMode === RoleActivityModes.DaySegment &&\n endTime !== DEFAULT_TIME &&\n startTime > endTime:\n return true;\n default:\n return false;\n }\n });\n};\n\nexport const DEFAULT_SELECT_VALUE = {\n value: RoleActivityModes.DaySegment as ActiveRoleModes,\n title: activeRoleMap[RoleActivityModes.DaySegment as ActiveRoleModes],\n};\n","/*! typograf | © 2023 Denis Seleznev | MIT License | https://github.com/typograf/typograf */\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\n// http://www.w3.org/TR/html4/sgml/entities\nvar visibleEntities = [\n ['iexcl', 161],\n ['cent', 162],\n ['pound', 163],\n ['curren', 164],\n ['yen', 165],\n ['brvbar', 166],\n ['sect', 167],\n ['uml', 168],\n ['copy', 169],\n ['ordf', 170],\n ['laquo', 171],\n ['not', 172],\n ['reg', 174],\n ['macr', 175],\n ['deg', 176],\n ['plusmn', 177],\n ['sup2', 178],\n ['sup3', 179],\n ['acute', 180],\n ['micro', 181],\n ['para', 182],\n ['middot', 183],\n ['cedil', 184],\n ['sup1', 185],\n ['ordm', 186],\n ['raquo', 187],\n ['frac14', 188],\n ['frac12', 189],\n ['frac34', 190],\n ['iquest', 191],\n ['Agrave', 192],\n ['Aacute', 193],\n ['Acirc', 194],\n ['Atilde', 195],\n ['Auml', 196],\n ['Aring', 197],\n ['AElig', 198],\n ['Ccedil', 199],\n ['Egrave', 200],\n ['Eacute', 201],\n ['Ecirc', 202],\n ['Euml', 203],\n ['Igrave', 204],\n ['Iacute', 205],\n ['Icirc', 206],\n ['Iuml', 207],\n ['ETH', 208],\n ['Ntilde', 209],\n ['Ograve', 210],\n ['Oacute', 211],\n ['Ocirc', 212],\n ['Otilde', 213],\n ['Ouml', 214],\n ['times', 215],\n ['Oslash', 216],\n ['Ugrave', 217],\n ['Uacute', 218],\n ['Ucirc', 219],\n ['Uuml', 220],\n ['Yacute', 221],\n ['THORN', 222],\n ['szlig', 223],\n ['agrave', 224],\n ['aacute', 225],\n ['acirc', 226],\n ['atilde', 227],\n ['auml', 228],\n ['aring', 229],\n ['aelig', 230],\n ['ccedil', 231],\n ['egrave', 232],\n ['eacute', 233],\n ['ecirc', 234],\n ['euml', 235],\n ['igrave', 236],\n ['iacute', 237],\n ['icirc', 238],\n ['iuml', 239],\n ['eth', 240],\n ['ntilde', 241],\n ['ograve', 242],\n ['oacute', 243],\n ['ocirc', 244],\n ['otilde', 245],\n ['ouml', 246],\n ['divide', 247],\n ['oslash', 248],\n ['ugrave', 249],\n ['uacute', 250],\n ['ucirc', 251],\n ['uuml', 252],\n ['yacute', 253],\n ['thorn', 254],\n ['yuml', 255],\n ['fnof', 402],\n ['Alpha', 913],\n ['Beta', 914],\n ['Gamma', 915],\n ['Delta', 916],\n ['Epsilon', 917],\n ['Zeta', 918],\n ['Eta', 919],\n ['Theta', 920],\n ['Iota', 921],\n ['Kappa', 922],\n ['Lambda', 923],\n ['Mu', 924],\n ['Nu', 925],\n ['Xi', 926],\n ['Omicron', 927],\n ['Pi', 928],\n ['Rho', 929],\n ['Sigma', 931],\n ['Tau', 932],\n ['Upsilon', 933],\n ['Phi', 934],\n ['Chi', 935],\n ['Psi', 936],\n ['Omega', 937],\n ['alpha', 945],\n ['beta', 946],\n ['gamma', 947],\n ['delta', 948],\n ['epsilon', 949],\n ['zeta', 950],\n ['eta', 951],\n ['theta', 952],\n ['iota', 953],\n ['kappa', 954],\n ['lambda', 955],\n ['mu', 956],\n ['nu', 957],\n ['xi', 958],\n ['omicron', 959],\n ['pi', 960],\n ['rho', 961],\n ['sigmaf', 962],\n ['sigma', 963],\n ['tau', 964],\n ['upsilon', 965],\n ['phi', 966],\n ['chi', 967],\n ['psi', 968],\n ['omega', 969],\n ['thetasym', 977],\n ['upsih', 978],\n ['piv', 982],\n ['bull', 8226],\n ['hellip', 8230],\n ['prime', 8242],\n ['Prime', 8243],\n ['oline', 8254],\n ['frasl', 8260],\n ['weierp', 8472],\n ['image', 8465],\n ['real', 8476],\n ['trade', 8482],\n ['alefsym', 8501],\n ['larr', 8592],\n ['uarr', 8593],\n ['rarr', 8594],\n ['darr', 8595],\n ['harr', 8596],\n ['crarr', 8629],\n ['lArr', 8656],\n ['uArr', 8657],\n ['rArr', 8658],\n ['dArr', 8659],\n ['hArr', 8660],\n ['forall', 8704],\n ['part', 8706],\n ['exist', 8707],\n ['empty', 8709],\n ['nabla', 8711],\n ['isin', 8712],\n ['notin', 8713],\n ['ni', 8715],\n ['prod', 8719],\n ['sum', 8721],\n ['minus', 8722],\n ['lowast', 8727],\n ['radic', 8730],\n ['prop', 8733],\n ['infin', 8734],\n ['ang', 8736],\n ['and', 8743],\n ['or', 8744],\n ['cap', 8745],\n ['cup', 8746],\n ['int', 8747],\n ['there4', 8756],\n ['sim', 8764],\n ['cong', 8773],\n ['asymp', 8776],\n ['ne', 8800],\n ['equiv', 8801],\n ['le', 8804],\n ['ge', 8805],\n ['sub', 8834],\n ['sup', 8835],\n ['nsub', 8836],\n ['sube', 8838],\n ['supe', 8839],\n ['oplus', 8853],\n ['otimes', 8855],\n ['perp', 8869],\n ['sdot', 8901],\n ['lceil', 8968],\n ['rceil', 8969],\n ['lfloor', 8970],\n ['rfloor', 8971],\n ['lang', 9001],\n ['rang', 9002],\n ['spades', 9824],\n ['clubs', 9827],\n ['hearts', 9829],\n ['diams', 9830],\n ['loz', 9674],\n ['OElig', 338],\n ['oelig', 339],\n ['Scaron', 352],\n ['scaron', 353],\n ['Yuml', 376],\n ['circ', 710],\n ['tilde', 732],\n ['ndash', 8211],\n ['mdash', 8212],\n ['lsquo', 8216],\n ['rsquo', 8217],\n ['sbquo', 8218],\n ['ldquo', 8220],\n ['rdquo', 8221],\n ['bdquo', 8222],\n ['dagger', 8224],\n ['Dagger', 8225],\n ['permil', 8240],\n ['lsaquo', 8249],\n ['rsaquo', 8250],\n ['euro', 8364],\n ['NestedGreaterGreater', 8811],\n ['NestedLessLess', 8810]\n];\n\nvar invisibleEntities = [\n ['nbsp', 160],\n ['thinsp', 8201],\n ['ensp', 8194],\n ['emsp', 8195],\n ['shy', 173],\n ['zwnj', 8204],\n ['zwj', 8205],\n ['lrm', 8206],\n ['rlm', 8207]\n];\n\nvar HtmlEntities = /** @class */ (function () {\n function HtmlEntities() {\n var _this = this;\n this.entities = this.prepareEntities(__spreadArray(__spreadArray([], visibleEntities, true), invisibleEntities, true));\n this.entitiesByName = {};\n this.entitiesByNameEntity = {};\n this.entitiesByDigitEntity = {};\n this.entitiesByUtf = {};\n this.entities.forEach(function (entity) {\n _this.entitiesByName[entity.name] = entity;\n _this.entitiesByNameEntity[entity.nameEntity] = entity;\n _this.entitiesByDigitEntity[entity.digitEntity] = entity;\n _this.entitiesByUtf[entity.utf] = entity;\n });\n this.invisibleEntities = this.prepareEntities(invisibleEntities);\n }\n /**\n * Entities as name or digit to UTF-8.\n */\n HtmlEntities.prototype.toUtf = function (context) {\n var _this = this;\n if (context.text.search(/&#/) !== -1) {\n context.text = this.decHexToUtf(context.text);\n }\n if (context.text.search(/&[a-z]/i) !== -1) {\n // 2 - min length of entity without & and ;. Example: ⅅ\n // 31 - max length of entity without & and ;. Example: ∳\n context.text = context.text.replace(/&[a-z\\d]{2,31};/gi, function (key) {\n var entity = _this.entitiesByNameEntity[key];\n return entity ? entity.utf : key;\n });\n }\n };\n /**\n * Entities in decimal or hexadecimal form to UTF-8.\n */\n HtmlEntities.prototype.decHexToUtf = function (text) {\n return text\n .replace(/&#(\\d{1,6});/gi, function ($0, $1) {\n return String.fromCharCode(parseInt($1, 10));\n })\n .replace(/&#x([\\da-f]{1,6});/gi, function ($0, $1) {\n return String.fromCharCode(parseInt($1, 16));\n });\n };\n /**\n * Restore HTML entities in text.\n */\n HtmlEntities.prototype.restore = function (context) {\n var params = context.prefs.htmlEntity;\n var type = params.type;\n var entities = this.entities;\n if (type === 'name' || type === 'digit') {\n if (params.onlyInvisible || params.list) {\n entities = [];\n if (params.onlyInvisible) {\n entities = entities.concat(this.invisibleEntities);\n }\n if (params.list) {\n entities = entities.concat(this.prepareListParam(params.list));\n }\n }\n var entityType = type === 'name' ? 'nameEntity' : 'digitEntity';\n context.text = this.restoreEntitiesByIndex(context.text, entityType, entities);\n }\n };\n /**\n * Get a entity by utf using the type.\n */\n HtmlEntities.prototype.getByUtf = function (symbol, type) {\n var result;\n switch (type) {\n case 'digit':\n result = this.entitiesByDigitEntity[symbol];\n break;\n case 'name':\n result = this.entitiesByNameEntity[symbol];\n break;\n default:\n result = symbol;\n break;\n }\n return result;\n };\n HtmlEntities.prototype.prepareEntities = function (entities) {\n var result = [];\n entities.forEach(function (entity) {\n var name = entity[0], digit = entity[1];\n var utf = String.fromCharCode(digit);\n result.push({\n name: name,\n nameEntity: '&' + name + ';',\n digitEntity: '&#' + digit + ';',\n utf: utf,\n reName: new RegExp('&' + name + ';', 'g'),\n reUtf: new RegExp(utf, 'g')\n });\n });\n return result;\n };\n HtmlEntities.prototype.prepareListParam = function (list) {\n var _this = this;\n var result = [];\n list.forEach(function (name) {\n var entity = _this.entitiesByName[name];\n if (entity) {\n result.push(entity);\n }\n });\n return result;\n };\n HtmlEntities.prototype.restoreEntitiesByIndex = function (text, type, entities) {\n entities.forEach(function (entity) {\n text = text.replace(entity.reUtf, entity[type]);\n });\n return text;\n };\n return HtmlEntities;\n}());\nvar htmlEntities = new HtmlEntities();\n\nvar locales = [];\nfunction addLocale(locale) {\n var code = (locale || '').split('/')[0];\n if (code && code !== 'common' && !hasLocale(code)) {\n locales.push(code);\n locales.sort();\n }\n}\nfunction getLocales() {\n return locales;\n}\nfunction hasLocale(locale) {\n return locale === 'common' || locales.indexOf(locale) !== -1;\n}\nfunction prepareLocale(locale1, locale2) {\n var locale = locale1 || locale2;\n if (!locale) {\n return [];\n }\n return Array.isArray(locale) ? locale : [locale];\n}\nfunction checkLocales(locales) {\n if (!locales.length) {\n throw Error('Not defined the property \"locale\".');\n }\n locales.forEach(function (locale) {\n if (!hasLocale(locale)) {\n throw Error(\"\\\"\".concat(locale, \"\\\" is not supported locale.\"));\n }\n });\n}\n\nvar data$1 = {};\n/**\n * Get data for use in rules.\n */\nfunction getData(key) {\n return data$1[key];\n}\n/**\n * Set data for use in rules.\n */\nfunction setData(newData) {\n Object.keys(newData).forEach(function (key) {\n addLocale(key);\n data$1[key] = newData[key];\n });\n}\n\nvar inlineElements = [\n 'a',\n 'abbr',\n 'acronym',\n 'b',\n 'bdo',\n 'big',\n 'br',\n 'button',\n 'cite',\n 'code',\n 'dfn',\n 'em',\n 'i',\n 'img',\n 'input',\n 'kbd',\n 'label',\n 'map',\n 'object',\n 'q',\n 'samp',\n 'script',\n 'select',\n 'small',\n 'span',\n 'strong',\n 'sub',\n 'sup',\n 'textarea',\n 'time',\n 'tt',\n 'var'\n];\n\nvar regExpUrl = new RegExp('(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)', 'g');\nvar regExpNumber = '\\\\d+([.,]\\\\d+)?';\nvar regExpDigit = /\\d/;\nfunction isDigit(symbol) {\n return symbol.search(regExpDigit) > -1;\n}\n\nvar privateLabel = '\\uF000';\nvar privateSeparateLabel = '\\uF001';\n\nvar SafeTags = /** @class */ (function () {\n function SafeTags() {\n this.groups = ['own', 'html', 'url'];\n this.hidden = {};\n this.counter = 0;\n var html = [\n [''],\n [''],\n [''],\n ['<\\\\?xml', '\\\\?>'],\n ['']\n ];\n [\n 'code',\n 'kbd',\n 'object',\n 'pre',\n 'samp',\n 'script',\n 'style',\n 'var'\n ].forEach(function (tag) {\n html.push([\n \"<\".concat(tag, \"(\\\\s[^>]*?)?>\"),\n \"\")\n ]);\n });\n this.tags = {\n own: [],\n html: html.map(this.prepareRegExp),\n url: [regExpUrl]\n };\n }\n /**\n * Add own safe tag.\n */\n SafeTags.prototype.add = function (tag) {\n this.tags.own.push(this.prepareRegExp(tag));\n };\n /**\n * Show safe tags.\n */\n SafeTags.prototype.show = function (context, group) {\n var reReplace = new RegExp(privateLabel + 'tf\\\\d+' + privateLabel, 'g');\n var reSearch = new RegExp(privateLabel + 'tf\\\\d');\n var replaceLabel = function (match) {\n return context.safeTags.hidden[group][match] || match;\n };\n for (var i = 0, len = this.tags[group].length; i < len; i++) {\n context.text = context.text.replace(reReplace, replaceLabel);\n if (context.text.search(reSearch) === -1) {\n break;\n }\n }\n };\n /**\n * Hide safe tags.\n */\n SafeTags.prototype.hide = function (context, group) {\n var _this = this;\n context.safeTags.hidden[group] = {};\n var pasteLabel = this.pasteLabel.bind(this, context, group);\n this.tags[group].forEach(function (tag) {\n context.text = context.text.replace(_this.prepareRegExp(tag), pasteLabel);\n });\n };\n /**\n * Hide HTML tags.\n */\n SafeTags.prototype.hideHTMLTags = function (context) {\n if (context.isHTML) {\n var pasteLabel = this.pasteLabel.bind(this, context, 'html');\n context.text = context.text\n .replace(/<\\/?[a-z][^]*?>/gi, pasteLabel) // Tags\n .replace(/<\\/?[a-z][^]*?>/gi, pasteLabel) // Escaping tags\n .replace(/&[gl]t;/gi, pasteLabel);\n }\n };\n /**\n * Get previous label.\n */\n SafeTags.prototype.getPrevLabel = function (text, position) {\n for (var i = position - 1; i >= 0; i--) {\n if (text[i] === privateLabel) {\n return text.slice(i, position + 1);\n }\n }\n return '';\n };\n SafeTags.prototype.getNextLabel = function (text, position) {\n for (var i = position + 1; i < text.length; i++) {\n if (text[i] === privateLabel) {\n return text.slice(position, i + 1);\n }\n }\n return '';\n };\n SafeTags.prototype.getTagByLabel = function (context, label) {\n var result = null;\n this.groups.some(function (group) {\n var value = context.safeTags.hidden[group][label];\n if (typeof value !== 'undefined') {\n result = {\n group: group,\n value: value\n };\n }\n return result;\n });\n return result;\n };\n SafeTags.prototype.getTagInfo = function (tag) {\n if (!tag) {\n return null;\n }\n var result = { group: tag.group };\n switch (tag.group) {\n case 'html':\n result.name = tag.value.split(/[<\\s>]/)[1];\n result.isInline = inlineElements.indexOf(result.name) > -1;\n result.isClosing = tag.value.search(/^<\\//) > -1;\n break;\n case 'url':\n result.isInline = true;\n break;\n case 'own':\n result.isInline = false;\n break;\n }\n return result;\n };\n SafeTags.prototype.pasteLabel = function (context, group, match) {\n var safeTags = context.safeTags;\n var key = privateLabel + 'tf' + safeTags.counter + privateLabel;\n safeTags.hidden[group][key] = match;\n safeTags.counter++;\n return key;\n };\n SafeTags.prototype.prepareRegExp = function (tag) {\n if (tag instanceof RegExp) {\n return tag;\n }\n var startTag = tag[0], endTag = tag[1], middle = tag[2];\n return new RegExp(startTag +\n (typeof middle === 'undefined' ? '[^]*?' : middle) +\n endTag, 'gi');\n };\n SafeTags.prototype.getPrevTagInfo = function (context, text, pos) {\n var prevLabel = this.getPrevLabel(text, pos - 1);\n if (prevLabel) {\n var prevTag = this.getTagByLabel(context, prevLabel);\n if (prevTag) {\n return this.getTagInfo(prevTag);\n }\n }\n return null;\n };\n SafeTags.prototype.getNextTagInfo = function (context, text, pos) {\n var nextLabel = this.getNextLabel(text, pos + 1);\n if (nextLabel) {\n var nextTag = this.getTagByLabel(context, nextLabel);\n if (nextTag) {\n return this.getTagInfo(nextTag);\n }\n }\n return null;\n };\n return SafeTags;\n}());\n\nfunction repeat(symbol, count) {\n var result = '';\n for (;;) {\n if ((count & 1) === 1) {\n result += symbol;\n }\n count >>>= 1;\n if (count === 0) {\n break;\n }\n symbol += symbol;\n }\n return result;\n}\nfunction replaceNbsp$1(text) {\n return text.replace(/\\u00A0/g, ' ');\n}\nfunction replace(text, re) {\n for (var i = 0; i < re.length; i++) {\n text = text.replace(re[i][0], re[i][1]);\n }\n return text;\n}\nfunction isHTML(text) {\n return text.search(/(<\\/?[a-z]| b.index ? 1 : -1; });\n}\nfunction getRules() {\n var result = __spreadArray([], rules, true);\n sortRules(result);\n return result;\n}\nfunction getInnerRules() {\n return __spreadArray([], innerRules, true);\n}\nfunction getRuleIndex(rule) {\n if (typeof rule.index === 'number') {\n return rule.index;\n }\n var _a = rule.name.split('/'), group = _a[1];\n var groupIndex = groupIndexes[group];\n if (typeof groupIndex === 'undefined') {\n groupIndex = DEFAULT_RULE_INDEX;\n }\n if (typeof rule.index === 'string') {\n return groupIndex + parseInt(rule.index, 10);\n }\n return groupIndex;\n}\nfunction prepareRule(rule) {\n var _a = rule.name.split('/'), locale = _a[0], group = _a[1], shortName = _a[2];\n var preparedRule = {\n name: rule.name,\n shortName: shortName,\n handler: rule.handler,\n queue: rule.queue || DEFAULT_QUEUE_NAME,\n enabled: rule.disabled === true ? false : true,\n locale: locale,\n group: group,\n index: getRuleIndex(rule),\n settings: rule.settings,\n live: rule.live,\n htmlAttrs: rule.htmlAttrs,\n };\n return preparedRule;\n}\n\nvar PACKAGE_VERSION = '7.3.0';\n\nfunction prepareHtmlEntity(htmlEntity) {\n var result = {\n type: (htmlEntity === null || htmlEntity === void 0 ? void 0 : htmlEntity.type) || 'default',\n list: htmlEntity === null || htmlEntity === void 0 ? void 0 : htmlEntity.list,\n onlyInvisible: Boolean(htmlEntity === null || htmlEntity === void 0 ? void 0 : htmlEntity.onlyInvisible),\n };\n return result;\n}\nfunction prepareLineEnding(lineEnding) {\n return lineEnding || 'LF';\n}\nfunction preparePrefs(prefs) {\n var result = {\n locale: prepareLocale(prefs.locale),\n lineEnding: prepareLineEnding(prefs.lineEnding),\n live: Boolean(prefs.live),\n ruleFilter: prefs.ruleFilter,\n enableRule: prefs.enableRule,\n disableRule: prefs.disableRule,\n processingSeparateParts: prefs.processingSeparateParts,\n htmlEntity: prepareHtmlEntity(prefs.htmlEntity),\n };\n return result;\n}\nfunction prepareContextPrefs(prefs, executePrefs) {\n var result = __assign({}, prefs);\n if (!executePrefs) {\n return result;\n }\n if ('locale' in executePrefs) {\n result.locale = prepareLocale(executePrefs.locale);\n }\n if ('htmlEntity' in executePrefs) {\n result.htmlEntity = prepareHtmlEntity(executePrefs.htmlEntity);\n }\n if ('lineEnding' in executePrefs) {\n result.lineEnding = prepareLineEnding(executePrefs.lineEnding);\n }\n if ('processingSeparateParts' in executePrefs) {\n result.processingSeparateParts = executePrefs.processingSeparateParts;\n }\n if ('ruleFilter' in executePrefs) {\n result.ruleFilter = executePrefs.ruleFilter;\n }\n return result;\n}\n\nvar Typograf = /** @class */ (function () {\n function Typograf(prefs) {\n var _this = this;\n this.rules = [];\n this.innerRules = [];\n this.rulesByQueues = {};\n this.innerRulesByQueues = {};\n this.separatePartsTags = [\n 'title',\n 'p',\n 'h[1-6]',\n 'select',\n 'legend',\n ];\n this.prefs = preparePrefs(prefs);\n checkLocales(this.prefs.locale);\n this.safeTags = new SafeTags();\n this.settings = {};\n this.enabledRules = {};\n this.innerRulesByQueues = {};\n this.innerRules = getInnerRules();\n this.innerRules.forEach(function (rule) {\n _this.innerRulesByQueues[rule.queue] = _this.innerRulesByQueues[rule.queue] || [];\n _this.innerRulesByQueues[rule.queue].push(rule);\n });\n this.rulesByQueues = {};\n this.rules = getRules();\n this.rules.forEach(function (rule) {\n _this.prepareRuleSettings(rule);\n _this.rulesByQueues[rule.queue] = _this.rulesByQueues[rule.queue] || [];\n _this.rulesByQueues[rule.queue].push(rule);\n });\n this.prefs.disableRule && this.disableRule(this.prefs.disableRule);\n this.prefs.enableRule && this.enableRule(this.prefs.enableRule);\n }\n Typograf.addRule = function (rule) {\n addRule(rule);\n };\n Typograf.addRules = function (rules) {\n var _this = this;\n rules.forEach(function (item) {\n _this.addRule(item);\n });\n };\n /**\n * Add internal rule.\n * Internal rules are executed before main rules.\n */\n Typograf.addInnerRule = function (rule) {\n addInnerRule(rule);\n };\n Typograf.addInnerRules = function (rules) {\n var _this = this;\n rules.forEach(function (item) {\n _this.addInnerRule(item);\n });\n };\n Typograf.getRule = function (ruleName) {\n var rule = null;\n var rules = getRules();\n rules.some(function (item) {\n if (item.name === ruleName) {\n rule = item;\n return true;\n }\n return false;\n });\n return rule;\n };\n Typograf.getRules = function () {\n return getRules();\n };\n Typograf.getInnerRules = function () {\n return getInnerRules();\n };\n Typograf.getLocales = function () {\n return getLocales();\n };\n Typograf.addLocale = function (locale) {\n addLocale(locale);\n };\n Typograf.hasLocale = function (locale) {\n return hasLocale(locale);\n };\n Typograf.setData = function (data) {\n setData(data);\n };\n Typograf.getData = function (key) {\n return getData(key);\n };\n /**\n * Execute typographical rules for text.\n */\n Typograf.prototype.execute = function (text, prefs) {\n text = '' + text;\n if (!text) {\n return '';\n }\n var contextPrefs = prepareContextPrefs(this.prefs, prefs);\n checkLocales(contextPrefs.locale);\n var context = this.prepareContext(text, contextPrefs);\n return this.process(context);\n };\n Typograf.prototype.getSetting = function (ruleName, setting) {\n return this.settings[ruleName] && this.settings[ruleName][setting];\n };\n Typograf.prototype.setSetting = function (ruleName, setting, value) {\n this.settings[ruleName] = this.settings[ruleName] || {};\n this.settings[ruleName][setting] = value;\n };\n Typograf.prototype.isEnabledRule = function (ruleName) {\n return this.enabledRules[ruleName] !== false;\n };\n Typograf.prototype.isDisabledRule = function (ruleName) {\n return !this.enabledRules[ruleName];\n };\n Typograf.prototype.enableRule = function (ruleName) {\n return this.enable(ruleName, true);\n };\n Typograf.prototype.disableRule = function (ruleName) {\n return this.enable(ruleName, false);\n };\n /**\n * Add safe tag.\n *\n * @example\n * // const typograf = new Typograf({ locale: 'ru' });\n * // typograf.addSafeTag('', '');\n * // typograf.addSafeTag('', '', '.*?');\n * // typograf.addSafeTag(/.*?/gi);\n */\n Typograf.prototype.addSafeTag = function (startTag, endTag, middle) {\n var tag = startTag instanceof RegExp ? startTag : [startTag, endTag, middle];\n this.safeTags.add(tag);\n };\n Typograf.prototype.prepareContext = function (text, prefs) {\n var context = {\n text: text,\n isHTML: isHTML(text),\n prefs: prefs,\n getData: function (key) {\n if (key === 'char') {\n return prefs.locale.map(function (item) {\n return getData(item + '/' + key);\n }).join('');\n }\n else {\n return getData(prefs.locale[0] + '/' + key);\n }\n },\n safeTags: this.safeTags,\n };\n return context;\n };\n Typograf.prototype.splitBySeparateParts = function (context) {\n if (!context.isHTML || context.prefs.processingSeparateParts === false) {\n return [context.text];\n }\n var text = [];\n var reTags = new RegExp('<(' + this.separatePartsTags.join('|') + ')(\\\\s[^>]*?)?>[^]*?', 'gi');\n var position = 0;\n context.text.replace(reTags, function ($0, $1, $2, itemPosition) {\n if (position !== itemPosition) {\n text.push((position ? privateSeparateLabel : '') +\n context.text.slice(position, itemPosition) +\n privateSeparateLabel);\n }\n text.push($0);\n position = itemPosition + $0.length;\n return $0;\n });\n text.push(position ?\n (privateSeparateLabel + context.text.slice(position, context.text.length)) :\n context.text);\n return text;\n };\n Typograf.prototype.process = function (context) {\n var _this = this;\n context.text = removeCR(context.text);\n this.executeRules(context, 'start');\n this.safeTags.hide(context, 'own');\n this.executeRules(context, 'hide-safe-tags-own');\n this.safeTags.hide(context, 'html');\n this.executeRules(context, 'hide-safe-tags-html');\n var isRootHTML = context.isHTML;\n var re = new RegExp(privateSeparateLabel, 'g');\n context.text = this.splitBySeparateParts(context).map(function (item) {\n context.text = item;\n context.isHTML = isHTML(item);\n _this.safeTags.hideHTMLTags(context);\n _this.safeTags.hide(context, 'url');\n _this.executeRules(context, 'hide-safe-tags-url');\n _this.executeRules(context, 'hide-safe-tags');\n htmlEntities.toUtf(context);\n if (context.prefs.live) {\n context.text = replaceNbsp$1(context.text);\n }\n _this.executeRules(context, 'utf');\n _this.executeRules(context);\n htmlEntities.restore(context);\n _this.executeRules(context, 'html-entities');\n _this.safeTags.show(context, 'url');\n _this.executeRules(context, 'show-safe-tags-url');\n return context.text.replace(re, '');\n }).join('');\n context.isHTML = isRootHTML;\n this.safeTags.show(context, 'html');\n this.executeRules(context, 'show-safe-tags-html');\n this.safeTags.show(context, 'own');\n this.executeRules(context, 'show-safe-tags-own');\n this.executeRules(context, 'end');\n return fixLineEnding(context.text, context.prefs.lineEnding);\n };\n Typograf.prototype.executeRules = function (context, queue) {\n var _this = this;\n if (queue === void 0) { queue = DEFAULT_QUEUE_NAME; }\n var rules = this.rulesByQueues[queue];\n var innerRules = this.innerRulesByQueues[queue];\n innerRules && innerRules.forEach(function (rule) {\n _this.ruleIterator(context, rule);\n });\n rules && rules.forEach(function (rule) {\n _this.ruleIterator(context, rule);\n });\n };\n Typograf.prototype.ruleIterator = function (context, rule) {\n if ((context.prefs.live === true && rule.live === false) || (context.prefs.live === false && rule.live === true)) {\n return;\n }\n if ((rule.locale === 'common' || rule.locale === context.prefs.locale[0]) && this.isEnabledRule(rule.name)) {\n if (context.prefs.ruleFilter && !context.prefs.ruleFilter(rule)) {\n return;\n }\n this.onBeforeRule && this.onBeforeRule(rule.name, context);\n context.text = rule.handler.call(this, context.text, this.settings[rule.name], context);\n this.onAfterRule && this.onAfterRule(rule.name, context);\n }\n };\n Typograf.prototype.prepareRuleSettings = function (rule) {\n this.settings[rule.name] = deepCopy(rule.settings);\n this.enabledRules[rule.name] = rule.enabled;\n };\n Typograf.prototype.enable = function (ruleName, enabled) {\n var _this = this;\n if (Array.isArray(ruleName)) {\n ruleName.forEach(function (item) {\n _this.enableByMask(item, enabled);\n });\n }\n else {\n this.enableByMask(ruleName, enabled);\n }\n };\n Typograf.prototype.enableByMask = function (ruleName, enabled) {\n var _this = this;\n if (!ruleName) {\n return;\n }\n if (ruleName.search(/\\*/) !== -1) {\n var re_1 = new RegExp(ruleName\n .replace(/\\//g, '\\\\/')\n .replace(/\\*/g, '.*'));\n this.rules.forEach(function (el) {\n var name = el.name;\n if (re_1.test(name)) {\n _this.enabledRules[name] = enabled;\n }\n });\n }\n else {\n this.enabledRules[ruleName] = enabled;\n }\n };\n Typograf.groups = [];\n Typograf.titles = {};\n Typograf.version = PACKAGE_VERSION;\n return Typograf;\n}());\n\nvar common = {\n 'common/char': 'a-z',\n 'common/dash': '--?|‒|–|—',\n 'common/quote': '«‹»›„“‟”\"',\n};\n\nvar be = {\n 'be/char': 'абвгдежзйклмнопрстуфхцчшыьэюяёіўґ',\n 'be/quote': {\n left: '«“',\n right: '»”',\n }\n};\n\nvar bg = {\n 'bg/char': 'абвгдежзийклмнопрстуфхцчшщъьюя',\n 'bg/quote': {\n left: '„’',\n right: '“’',\n }\n};\n\nvar ca = {\n 'ca/char': 'abcdefghijlmnopqrstuvxyzàçèéíïòóúü',\n 'ca/quote': {\n left: '«“',\n right: '»”',\n }\n};\n\nvar cs = {\n 'cs/char': 'a-záéíóúýčďěňřšťůž',\n 'cs/quote': {\n left: '„‚',\n right: '“‘',\n }\n};\n\nvar da = {\n 'da/char': 'a-zåæø',\n 'da/quote': {\n left: '»›',\n right: '«‹',\n }\n};\n\nvar de = {\n 'de/char': 'a-zßäöü',\n 'de/quote': {\n left: '„‚',\n right: '“‘',\n }\n};\n\nvar el = {\n 'el/char': 'ΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϲάέήίόύώ',\n 'el/quote': {\n left: '«“',\n right: '»”',\n }\n};\n\nvar enGB = {\n 'en-GB/char': 'a-z',\n 'en-GB/quote': {\n left: '‘“',\n right: '’”',\n }\n};\n\nvar enUS = {\n 'en-US/char': 'a-z',\n 'en-US/quote': {\n left: '“‘',\n right: '”’',\n },\n 'en-US/shortWord': 'a|an|and|as|at|bar|but|by|for|if|in|nor|not|of|off|on|or|out|per|pro|so|the|to|up|via|yet',\n};\n\nvar eo = {\n 'eo/char': 'abcdefghijklmnoprstuvzĉĝĥĵŝŭ',\n 'eo/quote': {\n left: '“‘',\n right: '”’',\n }\n};\n\nvar es = {\n 'es/char': 'a-záéíñóúü',\n 'es/quote': {\n left: '«“',\n right: '»”',\n }\n};\n\nvar et = {\n 'et/char': 'abdefghijklmnoprstuvzäõöüšž',\n 'et/quote': {\n left: '„«',\n right: '“»',\n }\n};\n\nvar fi = {\n 'fi/char': 'abcdefghijklmnopqrstuvyöäå',\n 'fi/quote': {\n left: '”’',\n right: '”’',\n }\n};\n\nvar fr = {\n 'fr/char': 'a-zàâçèéêëîïôûüœæ',\n 'fr/quote': {\n left: '«‹',\n right: '»›',\n spacing: true,\n }\n};\n\nvar ga = {\n 'ga/char': 'abcdefghilmnoprstuvwxyzáéíóú',\n 'ga/quote': {\n left: '“‘',\n right: '”’',\n }\n};\n\nvar hu = {\n 'hu/char': 'a-záäéíóöúüőű',\n 'hu/quote': {\n left: '„»',\n right: '”«',\n }\n};\n\nvar it = {\n 'it/char': 'a-zàéèìòù',\n 'it/quote': {\n left: '«“',\n right: '»”',\n }\n};\n\nvar lv = {\n 'lv/char': 'abcdefghijklmnopqrstuvxzæœ',\n 'lv/quote': {\n left: '«„',\n right: '»“',\n }\n};\n\nvar nl = {\n 'nl/char': 'a-zäçèéêëîïñöûü',\n 'nl/quote': {\n left: '‘“',\n right: '’”',\n }\n};\n\nvar no = {\n 'no/char': 'a-zåæèéêòóôø',\n 'no/quote': {\n left: '«’',\n right: '»’',\n }\n};\n\nvar pl = {\n 'pl/char': 'abcdefghijklmnoprstuvwxyzóąćęłńśźż',\n 'pl/quote': {\n left: '„«',\n right: '”»',\n }\n};\n\nvar ro = {\n 'ro/char': 'abcdefghijklmnoprstuvxzîășț',\n 'ro/quote': {\n left: '„«',\n right: '”»',\n }\n};\n\nvar ru = {\n 'ru/char': 'а-яё',\n 'ru/dashBefore': '(^| |\\\\n)',\n 'ru/dashAfter': '(?=[\\u00A0 ,.?:!]|$)',\n 'ru/dashAfterDe': '(?=[,.?:!]|[\\u00A0 ][^А-ЯЁ]|$)',\n 'ru/l': 'а-яёa-z',\n 'ru/L': 'А-ЯЁA-Z',\n 'ru/month': 'январь|февраль|март|апрель|май|июнь|июль|август|сентябрь|октябрь|ноябрь|декабрь',\n 'ru/monthGenCase': 'января|февраля|марта|апреля|мая|июня|июля|августа|сентября|октября|ноября|декабря',\n 'ru/monthPreCase': 'январе|феврале|марте|апреле|мае|июне|июле|августе|сентябре|октябре|ноябре|декабре',\n 'ru/quote': {\n left: '«„‚',\n right: '»“‘',\n removeDuplicateQuotes: true,\n },\n 'ru/shortMonth': 'янв|фев|мар|апр|ма[ейя]|июн|июл|авг|сен|окт|ноя|дек',\n 'ru/shortWord': 'а|бы|в|во|да|до|же|за|и|из|к|ко|ли|на|не|ни|но|о|об|от|по|с|со|то|у',\n 'ru/weekday': 'понедельник|вторник|среда|четверг|пятница|суббота|воскресенье',\n};\n\nvar sk = {\n 'sk/char': 'abcdefghijklmnoprstuvwxyzáäéíóôúýčďľňŕšťž',\n 'sk/quote': {\n left: '„‚',\n right: '“‘',\n }\n};\n\nvar sl = {\n 'sl/char': 'a-zčšž',\n 'sl/quote': {\n left: '„‚',\n right: '“‘',\n }\n};\n\nvar sr = {\n 'sr/char': 'abcdefghijklmnoprstuvzćčđšž',\n 'sr/quote': {\n left: '„’',\n right: '”’',\n }\n};\n\nvar sv = {\n 'sv/char': 'a-zäåéö',\n 'sv/quote': {\n left: '”’',\n right: '”’',\n }\n};\n\nvar tr = {\n 'tr/char': 'abcdefghijklmnoprstuvyzâçîöûüğış',\n 'tr/quote': {\n left: '“‘',\n right: '”’',\n }\n};\n\nvar uk = {\n 'uk/char': 'абвгдежзийклмнопрстуфхцчшщьюяєіїґ',\n 'uk/quote': {\n left: '«„',\n right: '»“',\n }\n};\n\nvar data = [\n common,\n be,\n bg,\n ca,\n cs,\n da,\n de,\n el,\n enGB,\n enUS,\n eo,\n es,\n et,\n fi,\n fr,\n ga,\n hu,\n it,\n lv,\n nl,\n no,\n pl,\n ro,\n ru,\n sk,\n sl,\n sr,\n sv,\n tr,\n uk\n];\ndata.forEach(function (item) { return setData(item); });\n\nvar eMailRule = {\n name: 'common/html/e-mail',\n queue: 'end',\n handler: function (text, _settings, context) {\n return context.isHTML ? text : text.replace(/(^|[\\s;(])([\\w\\-.]{2,64})@([\\w\\-.]{2,64})\\.([a-z]{2,64})([)\\s.,!?]|$)/gi, '$1$2@$3.$4$5');\n },\n disabled: true,\n htmlAttrs: false,\n};\n\nvar entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': ''',\n '/': '/'\n};\nvar escapeRule = {\n name: 'common/html/escape',\n index: '+100',\n queue: 'end',\n handler: function (text) {\n return text.replace(/[&<>\"'/]/g, function (key) { return entityMap[key]; });\n },\n disabled: true,\n};\n\nvar nbrRule = {\n name: 'common/html/nbr',\n index: '+10',\n queue: 'end',\n handler: function (text) {\n return text.replace(/([^\\n>])\\n(?=[^\\n])/g, '$1
    \\n');\n },\n disabled: true,\n htmlAttrs: false,\n};\n\nvar blockElements = [\n 'address',\n 'article',\n 'aside',\n 'blockquote',\n 'canvas',\n 'dd',\n 'div',\n 'dl',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'li',\n 'main',\n 'nav',\n 'noscript',\n 'ol',\n 'output',\n 'p',\n 'pre',\n 'section',\n 'table',\n 'tfoot',\n 'ul',\n 'video'\n];\n\nvar blockRe = new RegExp('<(' + blockElements.join('|') + ')[>\\\\s]');\nvar separator = '\\n\\n';\nvar pRule = {\n name: 'common/html/p',\n index: '+5',\n queue: 'end',\n handler: function (text) {\n var buffer = text.split(separator);\n buffer.forEach(function (text, i, data) {\n if (!text.trim()) {\n return;\n }\n if (!blockRe.test(text)) {\n data[i] = text.replace(/^(\\s*)/, '$1

    ').replace(/(\\s*)$/, '

    $1');\n }\n });\n return buffer.join(separator);\n },\n disabled: true,\n htmlAttrs: false,\n};\n\nvar processingAttrsRule = {\n name: 'common/html/processingAttrs',\n queue: 'hide-safe-tags-own',\n handler: function (text, settings, context) {\n var _this = this;\n var reAttrs = new RegExp('(^|\\\\s)(' + settings.attrs.join('|') + ')=(\"[^\"]*?\"|\\'[^\\']*?\\')', 'gi');\n var prefs = deepCopy(context.prefs);\n prefs.ruleFilter = function (rule) { return rule.htmlAttrs !== false; };\n return text.replace(/(<[-\\w]+\\s)([^>]+?)(?=>)/g, function (_match, tagName, attrs) {\n var resultAttrs = attrs.replace(reAttrs, function (_submatch, space, attrName, attrValue) {\n var lquote = attrValue[0];\n var rquote = attrValue[attrValue.length - 1];\n var value = attrValue.slice(1, -1);\n return space + attrName + '=' + lquote + _this.execute(value, prefs) + rquote;\n });\n return tagName + resultAttrs;\n });\n },\n settings: {\n attrs: ['title', 'placeholder']\n },\n disabled: true,\n htmlAttrs: false,\n};\n\nvar quotRule = {\n name: 'common/html/quot',\n queue: 'hide-safe-tags',\n handler: function (text) {\n return text.replace(/"/g, '\"');\n },\n};\n\nvar stripTagsRule = {\n name: 'common/html/stripTags',\n index: '+99',\n queue: 'end',\n handler: function (text) {\n return text.replace(/<[^>]+>/g, '');\n },\n disabled: true,\n};\n\nvar urlRule = {\n name: 'common/html/url',\n queue: 'end',\n handler: function (text, _settings, context) {\n return context.isHTML ? text : text.replace(regExpUrl, function ($0, protocol, path) {\n path = path\n .replace(/([^/]+\\/?)(\\?|#)$/, '$1') // Remove ending ? and #\n .replace(/^([^/]+)\\/$/, '$1'); // Remove ending /\n if (protocol === 'http') {\n path = path.replace(/^([^/]+)(:80)([^\\d]|\\/|$)/, '$1$3'); // Remove 80 port\n }\n else if (protocol === 'https') {\n path = path.replace(/^([^/]+)(:443)([^\\d]|\\/|$)/, '$1$3'); // Remove 443 port\n }\n var url = path;\n var fullUrl = protocol + '://' + path;\n var firstPart = '';\n if (protocol === 'http' || protocol === 'https') {\n url = url.replace(/^www\\./, '');\n return firstPart + (protocol === 'http' ? url : protocol + '://' + url) + '';\n }\n return firstPart + fullUrl + '';\n });\n },\n disabled: true,\n htmlAttrs: false,\n};\n\nTypograf.addRules([\n eMailRule,\n escapeRule,\n nbrRule,\n pRule,\n processingAttrsRule,\n quotRule,\n stripTagsRule,\n urlRule,\n]);\n\nvar afterNumberRule = {\n name: 'common/nbsp/afterNumber',\n handler: function (text, _settings, context) {\n var char = context.getData('char');\n var re = '(^|\\\\s)(\\\\d{1,5}) ([' + char + ']+)';\n return text.replace(new RegExp(re, 'gi'), '$1$2\\u00A0$3');\n },\n disabled: true,\n};\n\nvar afterParagraphMarkRule = {\n name: 'common/nbsp/afterParagraphMark',\n handler: function (text) {\n return text.replace(/¶ ?(?=\\d)/g, '¶\\u00A0');\n },\n};\n\nvar afterSectionMarkRule = {\n name: 'common/nbsp/afterSectionMark',\n handler: function (text, _settings, context) {\n // \\u2009 - THIN SPACE\n // \\u202F - NARROW NO-BREAK SPACE\n var locale = context.prefs.locale[0];\n return text.replace(/§[ \\u00A0\\u2009]?(?=\\d|I|V|X)/g, locale === 'ru' ? '§\\u202F' : '§\\u00A0');\n },\n};\n\nvar afterShortWordRule = {\n name: 'common/nbsp/afterShortWord',\n handler: function (text, settings, context) {\n var lengthShortWord = settings.lengthShortWord, useShortWordList = settings.useShortWordList;\n var quote = getData('common/quote');\n var char = context.getData('char');\n var shortWord = context.getData('shortWord');\n var before = ' \\u00A0(' + privateLabel + quote;\n var subStr = useShortWordList && shortWord !== undefined\n ? '(^|[' + before + '])(' + shortWord + ') '\n : '(^|[' + before + '])([' + char + ']{1,' + lengthShortWord + '}) ';\n var newSubStr = '$1$2\\u00A0';\n var re = new RegExp(subStr, 'gim');\n return text\n .replace(re, newSubStr)\n .replace(re, newSubStr);\n },\n settings: {\n lengthShortWord: 2,\n useShortWordList: false,\n },\n};\n\nvar beforeShortLastNumberRule = {\n name: 'common/nbsp/beforeShortLastNumber',\n handler: function (text, settings, context) {\n var quote = context.getData('quote');\n var ch = context.getData('char');\n var CH = ch.toUpperCase();\n var re = new RegExp('([' + ch + CH +\n ']) (?=\\\\d{1,' + settings.lengthLastNumber +\n '}[-+−%\\'\"' + quote.right + ')]?([.!?…]( [' +\n CH + ']|$)|$))', 'gm');\n return text.replace(re, '$1\\u00A0');\n },\n live: false,\n settings: {\n lengthLastNumber: 2,\n },\n};\n\nvar beforeShortLastWordRule = {\n name: 'common/nbsp/beforeShortLastWord',\n handler: function (text, settings, context) {\n var ch = context.getData('char');\n var CH = ch.toUpperCase();\n var re = new RegExp('([' + ch + '\\\\d]) ([' +\n ch + CH + ']{1,' + settings.lengthLastWord +\n '}[.!?…])( [' + CH + ']|$)', 'g');\n return text.replace(re, '$1\\u00A0$2$3');\n },\n settings: {\n lengthLastWord: 3,\n },\n};\n\nvar dpiRule = {\n name: 'common/nbsp/dpi',\n handler: function (text) {\n return text.replace(/(\\d) ?(lpi|dpi)(?!\\w)/, '$1\\u00A0$2');\n },\n};\n\nfunction replaceNbsp($0, $1, $2, $3) {\n return $1 + $2.replace(/([^\\u00A0])\\u00A0([^\\u00A0])/g, '$1 $2') + $3;\n}\nvar nowrapRule = {\n name: 'common/nbsp/nowrap',\n queue: 'end',\n handler: function (text) {\n return text\n .replace(/()(.*?)(<\\/nowrap>)/g, replaceNbsp)\n .replace(/()(.*?)(<\\/nobr>)/g, replaceNbsp);\n },\n};\n\nvar replaceNbspRule = {\n name: 'common/nbsp/replaceNbsp',\n queue: 'utf',\n live: false,\n handler: replaceNbsp$1,\n disabled: true,\n};\n\nTypograf.addRules([\n afterNumberRule,\n afterParagraphMarkRule,\n afterSectionMarkRule,\n afterShortWordRule,\n beforeShortLastNumberRule,\n beforeShortLastWordRule,\n dpiRule,\n nowrapRule,\n replaceNbspRule,\n]);\n\nvar digitGroupingRule = {\n name: 'common/number/digitGrouping',\n index: '310',\n disabled: true,\n handler: function (text, settings) {\n return text\n .replace(new RegExp(\"(^ ?|\\\\D |\".concat(privateLabel, \")(\\\\d{1,3}([ \\u00A0\\u202F\\u2009]\\\\d{3})+)(?! ?[\\\\d-])\"), 'gm'), function ($0, $1, $2) { return $1 + $2.replace(/\\s/g, settings.space); })\n // https://www.bipm.org/utils/common/pdf/si-brochure/SI-Brochure-9-EN.pdf #5.4.4\n .replace(/(\\d{5,}([.,]\\d+)?)/g, function ($0, $1) {\n var decimalMarker = $1.match(/[.,]/);\n var parts = decimalMarker ? $1.split(decimalMarker) : [$1];\n var integerPart = parts[0];\n var fractionalPart = parts[1];\n integerPart = integerPart.replace(/(\\d)(?=(\\d{3})+([^\\d]|$))/g, '$1' + settings.space);\n return decimalMarker ?\n integerPart + decimalMarker + fractionalPart :\n integerPart;\n });\n },\n settings: {\n space: '\\u202F',\n },\n};\n\nvar fractionRule = {\n name: 'common/number/fraction',\n handler: function (text) {\n return text\n .replace(/(^|\\D)1\\/2(\\D|$)/g, '$1½$2')\n .replace(/(^|\\D)1\\/4(\\D|$)/g, '$1¼$2')\n .replace(/(^|\\D)3\\/4(\\D|$)/g, '$1¾$2');\n },\n};\n\nvar mathSignsRule = {\n name: 'common/number/mathSigns',\n handler: function (text) {\n return replace(text, [\n [/!=/g, '≠'],\n [/<=/g, '≤'],\n [/(^|[^=])>=/g, '$1≥'],\n [/<=>/g, '⇔'],\n [/<>/g, '≫'],\n [/~=/g, '≅'],\n [/(^|[^+])\\+-/g, '$1±']\n ]);\n }\n};\n\nvar timesRule = {\n name: 'common/number/times',\n handler: function (text) {\n return text.replace(/(\\d)[ \\u00A0]?[xх][ \\u00A0]?(\\d)/g, '$1×$2');\n },\n};\n\nTypograf.addRules([\n digitGroupingRule,\n fractionRule,\n mathSignsRule,\n timesRule,\n]);\n\nvar delBOMRule = {\n name: 'common/other/delBOM',\n queue: 'start',\n index: -1,\n handler: function (text) {\n if (text.charCodeAt(0) === 0xFEFF) {\n return text.slice(1);\n }\n return text;\n },\n};\n\nvar repeatWordRule = {\n name: 'common/other/repeatWord',\n handler: function (text, settings, context) {\n var quote = getData('common/quote');\n var char = context.getData('char');\n var punc = '[;:,.?! \\n' + quote + ']';\n var re = new RegExp('(' + punc + '|^)' +\n '([' + char + ']{' + settings.min + ',}) ' +\n '\\\\2(' + punc + '|$)', 'gi');\n return text.replace(re, '$1$2$3');\n },\n settings: { min: 2 },\n disabled: true,\n};\n\nTypograf.addRules([\n delBOMRule,\n repeatWordRule,\n]);\n\nvar apostropheRule = {\n name: 'common/punctuation/apostrophe',\n handler: function (text, _settings, context) {\n var char = context.getData('char');\n var letters = '([' + char + '])';\n var re = new RegExp(letters + '\\'' + letters, 'gi');\n return text.replace(re, '$1’$2');\n },\n};\n\nvar delDoublePunctuationRule = {\n name: 'common/punctuation/delDoublePunctuation',\n handler: function (text) {\n return text\n .replace(/(^|[^,]),,(?!,)/g, '$1,')\n .replace(/(^|[^:])::(?!:)/g, '$1:')\n .replace(/(^|[^!?.])\\.\\.(?!\\.)/g, '$1.')\n .replace(/(^|[^;]);;(?!;)/g, '$1;')\n .replace(/(^|[^?])\\?\\?(?!\\?)/g, '$1?');\n },\n};\n\nvar hellipRule = {\n name: 'common/punctuation/hellip',\n handler: function (text, _settings, context) {\n return context.prefs.locale[0] === 'ru' ?\n text.replace(/(^|[^.])\\.{3,4}(?=[^.]|$)/g, '$1…') :\n text.replace(/(^|[^.])\\.{3}(\\.?)(?=[^.]|$)/g, '$1…$2');\n },\n};\n\nvar MAX_LEVEL_WITH_ERRORS = 2;\nvar Quote = /** @class */ (function () {\n function Quote() {\n this.bufferQuotes = {\n left: '\\uF005\\uF006\\uF007',\n right: '\\uF008\\uF009\\uF0A0',\n };\n this.beforeLeft = ' \\n\\t\\u00a0[(';\n this.afterRight = ' \\n\\t\\u00a0!?.:;#*,…)\\\\]';\n }\n Quote.prototype.process = function (params) {\n var text = params.context.text;\n var count = this.count(text);\n if (!count.total) {\n return text;\n }\n var originalSettings = params.settings;\n var isEqualQuotes = params.settings.left[0] === params.settings.right[0];\n // For SW, FI\n if (isEqualQuotes) {\n params.settings = deepCopy(params.settings);\n params.settings.left = this.bufferQuotes.left.slice(0, params.settings.left.length);\n params.settings.right = this.bufferQuotes.right.slice(0, params.settings.right.length);\n }\n // For FR\n if (params.settings.spacing) {\n text = this.removeSpacing(text, params.settings);\n }\n text = this.set(text, params);\n // For FR\n if (params.settings.spacing) {\n text = this.setSpacing(text, params.settings);\n }\n // For RU\n if (params.settings.removeDuplicateQuotes) {\n text = this.removeDuplicates(text, params.settings);\n }\n // For SW, FI\n if (isEqualQuotes) {\n text = this.returnOriginalQuotes(text, originalSettings, params.settings);\n params.settings = originalSettings;\n }\n return text;\n };\n Quote.prototype.returnOriginalQuotes = function (text, originalSettings, bufferSettings) {\n var buffer = {};\n for (var i = 0; i < bufferSettings.left.length; i++) {\n buffer[bufferSettings.left[i]] = originalSettings.left[i];\n buffer[bufferSettings.right[i]] = originalSettings.right[i];\n }\n return text.replace(new RegExp('[' + bufferSettings.left + bufferSettings.right + ']', 'g'), function (quote) {\n return buffer[quote];\n });\n };\n Quote.prototype.count = function (text) {\n var count = { total: 0 };\n text.replace(new RegExp('[' + getData('common/quote') + ']', 'g'), function (quote) {\n if (!count[quote]) {\n count[quote] = 0;\n }\n count[quote]++;\n count.total++;\n return quote;\n });\n return count;\n };\n Quote.prototype.removeDuplicates = function (text, settings) {\n var lquote = settings.left[0];\n var lquote2 = settings.left[1] || lquote;\n var rquote = settings.right[0];\n if (lquote !== lquote2) {\n return text;\n }\n return text\n // ««word» word» -> «word» word»\n .replace(new RegExp(lquote + lquote, 'g'), lquote)\n // «word «word»» -> «word «word»\n .replace(new RegExp(rquote + rquote, 'g'), rquote);\n };\n Quote.prototype.removeSpacing = function (text, settings) {\n for (var i = 0, len = settings.left.length; i < len; i++) {\n var lquote = settings.left[i];\n var rquote = settings.right[i];\n text = text\n .replace(new RegExp(lquote + '([ \\u202F\\u00A0])', 'g'), lquote)\n .replace(new RegExp('([ \\u202F\\u00A0])' + rquote, 'g'), rquote);\n }\n return text;\n };\n Quote.prototype.setSpacing = function (text, settings) {\n for (var i = 0, len = settings.left.length; i < len; i++) {\n var lquote = settings.left[i];\n var rquote = settings.right[i];\n text = text\n .replace(new RegExp(lquote + '([^\\u202F])', 'g'), lquote + '\\u202F$1')\n .replace(new RegExp('([^\\u202F])' + rquote, 'g'), '$1\\u202F' + rquote);\n }\n return text;\n };\n Quote.prototype.set = function (text, params) {\n var quotes = getData('common/quote');\n var lquote = params.settings.left[0];\n var lquote2 = params.settings.left[1] || lquote;\n var rquote = params.settings.right[0];\n var reL = new RegExp('(^|[' + this.beforeLeft + '])([' + quotes + ']+)(?=[^\\\\s' + privateLabel + '])', 'gim');\n var reR = new RegExp('([^\\\\s' + privateLabel + '])([' + quotes + ']+)(?=[' + this.afterRight + ']|$)', 'gim');\n text = text\n .replace(reL, function ($0, $1, $2) { return $1 + repeat(lquote, $2.length); })\n .replace(reR, function ($0, $1, $2) { return $1 + repeat(rquote, $2.length); });\n text = this.setAboveTags(text, params);\n if (lquote !== lquote2) {\n text = this.setInner(text, params.settings);\n }\n return text;\n };\n Quote.prototype.setAboveTags = function (text, params) {\n var _this = this;\n var quotes = getData('common/quote');\n var lquote = params.settings.left[0];\n var rquote = params.settings.right[0];\n return text.replace(new RegExp('(^|.)([' + quotes + '])(.|$)', 'gm'), function (original, prev, quote, next, pos) {\n if (prev !== privateLabel && next !== privateLabel) {\n return original;\n }\n if (prev === privateLabel && next === privateLabel) {\n if (quote === '\"') {\n return prev + _this.getAboveTwoTags(text, pos + 1, params) + next;\n }\n return original;\n }\n if (prev === privateLabel) {\n var hasRight = _this.afterRight.indexOf(next) > -1;\n var prevInfo = params.safeTags.getPrevTagInfo(params.context, text, pos - 1);\n if (hasRight && prevInfo && prevInfo.group === 'html') {\n return prev + (prevInfo.isClosing ? rquote : lquote) + next;\n }\n return prev + (!next || hasRight ? rquote : lquote) + next;\n }\n else {\n var hasLeft = _this.beforeLeft.indexOf(prev) > -1;\n var nextInfo = params.safeTags.getNextTagInfo(params.context, text, pos + 1);\n if (hasLeft && nextInfo && nextInfo.group === 'html') {\n return prev + (nextInfo.isClosing ? rquote : lquote) + next;\n }\n return prev + (!prev || hasLeft ? lquote : rquote) + next;\n }\n });\n };\n Quote.prototype.getAboveTwoTags = function (text, pos, params) {\n var prevInfo = params.safeTags.getPrevTagInfo(params.context, text, pos);\n var nextInfo = params.safeTags.getNextTagInfo(params.context, text, pos);\n if (prevInfo) {\n if (prevInfo.group === 'html') {\n if (!prevInfo.isClosing) {\n return params.settings.left[0];\n }\n if (nextInfo && nextInfo.isClosing && prevInfo.isClosing) {\n return params.settings.right[0];\n }\n }\n }\n return text[pos];\n };\n Quote.prototype.setInner = function (text, settings) {\n var lquote = settings.left[0];\n var rquote = settings.right[0];\n var minLevel = 0;\n var maxLevel = this.getMaxLevel(text, lquote, rquote, settings.left.length);\n var level = minLevel;\n var result = '';\n for (var i = 0, len = text.length; i < len; i++) {\n var letter = text[i];\n if (letter === lquote) {\n result += settings.left[level > maxLevel - 1 ? maxLevel - 1 : level];\n level++;\n if (level > maxLevel) {\n level = maxLevel;\n }\n }\n else if (letter === rquote) {\n level--;\n if (level < minLevel) {\n level = minLevel;\n }\n result += settings.right[level];\n }\n else {\n if (letter === '\"') {\n level = minLevel;\n }\n result += letter;\n }\n }\n return result;\n };\n Quote.prototype.getMaxLevel = function (text, leftQuote, rightQuote, length) {\n var count = this.count(text);\n return count[leftQuote] === count[rightQuote] ?\n length :\n Math.min(length, MAX_LEVEL_WITH_ERRORS);\n };\n return Quote;\n}());\nvar quote = new Quote();\nvar settings = {};\ngetLocales().forEach(function (locale) {\n settings[locale] = deepCopy(getData(locale + '/quote'));\n});\nvar quoteRule$1 = {\n name: 'common/punctuation/quote',\n handler: function (text, commonSettings, context) {\n var locale = context.prefs.locale[0];\n var settings = commonSettings[locale];\n if (!settings) {\n return text;\n }\n return quote.process({\n context: context,\n settings: settings,\n safeTags: this.safeTags,\n });\n },\n settings: settings,\n};\n\nvar quoteLinkRule = {\n name: 'common/punctuation/quoteLink',\n queue: 'show-safe-tags-html',\n index: '+5',\n handler: function (text, _settings, context) {\n var quotes = this.getSetting('common/punctuation/quote', context.prefs.locale[0]);\n var lquote1 = htmlEntities.getByUtf(quotes.left[0]);\n var rquote1 = htmlEntities.getByUtf(quotes.right[0]);\n var lquote2 = htmlEntities.getByUtf(quotes.left[1]);\n var rquote2 = htmlEntities.getByUtf(quotes.right[1]);\n lquote2 = lquote2 ? ('|' + lquote2) : '';\n rquote2 = rquote2 ? ('|' + rquote2) : '';\n var re = new RegExp('(<[aA]\\\\s[^>]*?>)(' + lquote1 + lquote2 + ')([^]*?)(' + rquote1 + rquote2 + ')()', 'g');\n return text.replace(re, '$2$1$3$5$4');\n },\n};\n\nTypograf.addRules([\n apostropheRule,\n delDoublePunctuationRule,\n hellipRule,\n quoteRule$1,\n quoteLinkRule,\n]);\n\nvar beforeBracketRule = {\n name: 'common/space/beforeBracket',\n handler: function (text, _settings, context) {\n var char = context.getData('char');\n var re = new RegExp('([' + char + '.!?,;…)])\\\\(', 'gi');\n return text.replace(re, '$1 (');\n },\n};\n\nvar bracketRule$1 = {\n name: 'common/space/bracket',\n handler: function (text) {\n return text\n .replace(/(\\() +/g, '(')\n .replace(/ +\\)/g, ')');\n },\n};\n\nvar delBeforePercentRule = {\n name: 'common/space/delBeforePercent',\n handler: function (text) {\n return text.replace(/(\\d)( |\\u00A0)(%|‰|‱)/g, '$1$3');\n },\n};\n\nvar delBeforePunctuationRule = {\n name: 'common/space/delBeforePunctuation',\n handler: function (text) {\n return text.replace(/(^|[^!?:;,.…]) ([!?:;,])(?!\\))/g, '$1$2');\n },\n};\n\nvar delBetweenExclamationMarksRule = {\n name: 'common/space/delBetweenExclamationMarks',\n handler: function (text) {\n return text.replace(/([!?]) (?=[!?])/g, '$1');\n },\n};\n\nvar delBeforeDotRule = {\n name: 'common/space/delBeforeDot',\n handler: function (text) {\n return text.replace(/(^|[^!?:;,.…]) (\\.|\\.\\.\\.)(\\s|$)/g, '$1$2$3');\n },\n};\n\nvar delLeadingBlanksRule = {\n name: 'common/space/delLeadingBlanks',\n handler: function (text) {\n return text.replace(/^[ \\t]+/mg, '');\n },\n disabled: true,\n};\n\nvar delRepeatNRule = {\n name: 'common/space/delRepeatN',\n index: '-1',\n handler: function (text, settings) {\n var maxConsecutiveLineBreaks = settings.maxConsecutiveLineBreaks;\n var consecutiveLineBreaksRegex = new RegExp(\"\\n{\".concat(maxConsecutiveLineBreaks + 1, \",}\"), 'g');\n var replaceValue = repeat('\\n', maxConsecutiveLineBreaks);\n return text.replace(consecutiveLineBreaksRegex, replaceValue);\n },\n settings: {\n maxConsecutiveLineBreaks: 2,\n },\n};\n\nvar delRepeatSpaceRule = {\n name: 'common/space/delRepeatSpace',\n index: '-1',\n handler: function (text) {\n return text.replace(/([^\\n \\t])[ \\t]{2,}(?![\\n \\t])/g, '$1 ');\n },\n};\n\nvar delTrailingBlanksRule = {\n name: 'common/space/delTrailingBlanks',\n index: '-3',\n handler: function (text) {\n return text.replace(/[ \\t]+\\n/g, '\\n');\n },\n};\n\nvar insertFinalNewlineRule = {\n name: 'common/space/insertFinalNewline',\n queue: 'end',\n handler: function (text) {\n return text[text.length - 1] === '\\n' ? text : text + '\\n';\n },\n live: false,\n disabled: true,\n};\n\nvar replaceTabRule = {\n name: 'common/space/replaceTab',\n index: '-5',\n handler: function (text) {\n return text.replace(/\\t/g, ' ');\n },\n};\n\nvar squareBracketRule = {\n name: 'common/space/squareBracket',\n handler: function (text) {\n return text\n .replace(/(\\[) +/g, '[')\n .replace(/ +\\]/g, ']');\n },\n};\n\nvar trimLeftRule = {\n name: 'common/space/trimLeft',\n index: '-4',\n handler: String.prototype.trimLeft ?\n function (text) { return text.trimLeft(); } :\n /* istanbul ignore next */\n function (text) { return text.replace(/^[\\s\\uFEFF\\xA0]+/g, ''); },\n};\n\nvar trimRightRule = {\n name: 'common/space/trimRight',\n index: '-3',\n live: false,\n handler: String.prototype.trimRight ?\n function (text) { return text.trimRight(); } :\n /* istanbul ignore next */\n function (text) { return text.replace(/[\\s\\uFEFF\\xA0]+$/g, ''); }\n};\n\nvar reColon = new RegExp('(\\\\D):([^)\",:.?\\\\s\\\\/\\\\\\\\' + privateLabel + '])', 'g');\nvar afterColonRule = {\n name: 'common/space/afterColon',\n handler: function (text) {\n return text.replace(reColon, '$1: $2');\n },\n};\n\nvar afterCommaRule = {\n name: 'common/space/afterComma',\n handler: function (text, settings, context) {\n var quote = context.getData('quote');\n var quotes = typeof quote === 'string' ? quote : quote.right;\n return text.replace(new RegExp('(.),([^)\",:.?\\\\s\\\\/\\\\\\\\' + privateLabel + quotes + '])', 'g'), function ($0, $1, $2) { return isDigit($1) && isDigit($2) ? $0 : $1 + ', ' + $2; });\n }\n};\n\nvar reQuestionMark = new RegExp('\\\\?([^).…!;?\\\\s[\\\\])' + privateLabel + getData('common/quote') + '])', 'g');\nvar afterQuestionMarkRule = {\n name: 'common/space/afterQuestionMark',\n handler: function (text) {\n return text.replace(reQuestionMark, '? $1');\n },\n};\n\nvar reExclamationMark = new RegExp('!([^).…!;?\\\\s[\\\\])' + privateLabel + getData('common/quote') + '])', 'g');\nvar afterExclamationMarkRule = {\n name: 'common/space/afterExclamationMark',\n handler: function (text) {\n return text.replace(reExclamationMark, '! $1');\n },\n};\n\nvar reSemicolon = new RegExp(';([^).…!;?\\\\s[\\\\])' + privateLabel + getData('common/quote') + '])', 'g');\nvar afterSemicolonRule = {\n name: 'common/space/afterSemicolon',\n handler: function (text) {\n return text.replace(reSemicolon, '; $1');\n },\n};\n\nTypograf.addRules([\n afterColonRule,\n afterCommaRule,\n afterQuestionMarkRule,\n afterExclamationMarkRule,\n afterSemicolonRule,\n beforeBracketRule,\n bracketRule$1,\n delBeforeDotRule,\n delBeforePercentRule,\n delBeforePunctuationRule,\n delBetweenExclamationMarksRule,\n delLeadingBlanksRule,\n delRepeatNRule,\n delRepeatSpaceRule,\n delTrailingBlanksRule,\n insertFinalNewlineRule,\n replaceTabRule,\n squareBracketRule,\n trimLeftRule,\n trimRightRule,\n]);\n\nvar arrowRule = {\n name: 'common/symbols/arrow',\n handler: function (text) {\n return replace(text, [\n [/(^|[^-])->(?!>)/g, '$1→'],\n [/(^|[^<])<-(?!-)/g, '$1←']\n ]);\n },\n};\n\nvar cfRule = {\n name: 'common/symbols/cf',\n handler: function (text) {\n var re = new RegExp('(^|[\\\\s(\\\\[+≈±−—–\\\\-])(\\\\d+(?:[.,]\\\\d+)?)[ \\u00A0\\u2009]?(C|F)([\\\\W\\\\s.,:!?\")\\\\]]|$)', 'mg');\n return text.replace(re, '$1$2\\u2009°$3$4');\n },\n};\n\nvar copyRule = {\n name: 'common/symbols/copy',\n handler: function (text) {\n return replace(text, [\n [/\\(r\\)/gi, '®'],\n [/(copyright )?\\((c|с)\\)/gi, '©'],\n [/\\(tm\\)/gi, '™']\n ]);\n },\n};\n\nTypograf.addRules([\n arrowRule,\n cfRule,\n copyRule,\n]);\n\nvar mainRule$1 = {\n name: 'en-US/dash/main',\n index: '-5',\n handler: function (text) {\n var dashes = getData('common/dash');\n var nonBreakingSpace = '\\u00A0';\n var emDash = '\\u2014';\n var spaceBefore = \"[ \".concat(nonBreakingSpace, \"]\"); // white space or a non-breaking space\n var spaceAfter = \"[ \".concat(nonBreakingSpace, \"\\n]\"); // same as spaceBefore, but includes line break\n var re = new RegExp(\"\".concat(spaceBefore, \"(\").concat(dashes, \")(\").concat(spaceAfter, \")\"), 'g');\n return text.replace(re, \"\".concat(nonBreakingSpace).concat(emDash, \"$2\"));\n },\n};\n\nTypograf.addRules([\n mainRule$1,\n]);\n\nvar centuriesRule$1 = {\n name: 'ru/dash/centuries',\n handler: function (text, settings) {\n var dashes = '(' + getData('common/dash') + ')';\n var re = new RegExp('(X|I|V)[ |\\u00A0]?' + dashes + '[ |\\u00A0]?(X|I|V)', 'g');\n return text.replace(re, '$1' + settings.dash + '$3');\n },\n settings: {\n dash: '\\u2013', // –\n },\n};\n\nvar daysMonthRule = {\n name: 'ru/dash/daysMonth',\n handler: function (text, settings) {\n var re = new RegExp('(^|\\\\s)([123]?\\\\d)' +\n '(' + getData('common/dash') + ')' +\n '([123]?\\\\d)[ \\u00A0]' +\n '(' + getData('ru/monthGenCase') + ')', 'g');\n return text.replace(re, '$1$2' + settings.dash + '$4\\u00A0$5');\n },\n settings: {\n dash: '\\u2013', // –\n },\n};\n\nvar deRule = {\n name: 'ru/dash/de',\n handler: function (text) {\n var re = new RegExp('([a-яё]+) де' + getData('ru/dashAfterDe'), 'g');\n return text.replace(re, '$1-де');\n },\n disabled: true,\n};\n\nvar decadeRule = {\n name: 'ru/dash/decade',\n handler: function (text, settings) {\n var re = new RegExp('(^|\\\\s)(\\\\d{3}|\\\\d)0' +\n '(' + getData('common/dash') + ')' +\n '(\\\\d{3}|\\\\d)0(-е[ \\u00A0])' +\n '(?=г\\\\.?[ \\u00A0]?г|год)', 'g');\n return text.replace(re, '$1$20' + settings.dash + '$40$5');\n },\n settings: {\n dash: '\\u2013', // –\n },\n};\n\nvar directSpeechRule = {\n name: 'ru/dash/directSpeech',\n handler: function (text) {\n var dashes = getData('common/dash');\n var re1 = new RegExp(\"([\\\"\\u00BB\\u2018\\u201C,])[ |\\u00A0]?(\".concat(dashes, \")[ |\\u00A0]\"), 'g');\n var re2 = new RegExp(\"(^|\".concat(privateLabel, \")(\").concat(dashes, \")( |\\u00A0)\"), 'gm');\n var re3 = new RegExp(\"([.\\u2026?!])[ \\u00A0](\".concat(dashes, \")[ \\u00A0]\"), 'g');\n return text\n .replace(re1, '$1\\u00A0\\u2014 ')\n .replace(re2, '$1\\u2014\\u00A0')\n .replace(re3, '$1 \\u2014\\u00A0');\n },\n};\n\nvar izpodRule = {\n name: 'ru/dash/izpod',\n handler: function (text) {\n var re = new RegExp(getData('ru/dashBefore') + '(И|и)з под' + getData('ru/dashAfter'), 'g');\n return text.replace(re, '$1$2з-под');\n },\n};\n\nvar izzaRule = {\n name: 'ru/dash/izza',\n handler: function (text) {\n var re = new RegExp(getData('ru/dashBefore') + '(И|и)з за' + getData('ru/dashAfter'), 'g');\n return text.replace(re, '$1$2з-за');\n },\n};\n\nvar kaRule = {\n name: 'ru/dash/ka',\n handler: function (text) {\n var re = new RegExp('([a-яё]+) ка(сь)?' + getData('ru/dashAfter'), 'g');\n return text.replace(re, '$1-ка$2');\n },\n};\n\nvar koeRule = {\n name: 'ru/dash/koe',\n handler: function (text) {\n var re = new RegExp(getData('ru/dashBefore') +\n '([Кк]о[ей])\\\\s([а-яё]{3,})' +\n getData('ru/dashAfter'), 'g');\n return text.replace(re, '$1$2-$3');\n },\n};\n\nvar mainRule = {\n name: 'ru/dash/main',\n index: '-5',\n handler: function (text) {\n var dashes = getData('common/dash');\n var re = new RegExp('([ \\u00A0])(' + dashes + ')([ \\u00A0\\\\n])', 'g');\n return text.replace(re, '\\u00A0\\u2014$3');\n },\n};\n\nvar monthRule = {\n name: 'ru/dash/month',\n handler: function (text, settings) {\n var months = '(' + getData('ru/month') + ')';\n var monthsPre = '(' + getData('ru/monthPreCase') + ')';\n var dashes = getData('common/dash');\n var re = new RegExp(months + ' ?(' + dashes + ') ?' + months, 'gi');\n var rePre = new RegExp(monthsPre + ' ?(' + dashes + ') ?' + monthsPre, 'gi');\n var newSubStr = '$1' + settings.dash + '$3';\n return text\n .replace(re, newSubStr)\n .replace(rePre, newSubStr);\n },\n settings: {\n dash: '\\u2013', // –\n },\n};\n\nvar surnameRule = {\n name: 'ru/dash/surname',\n handler: function (text) {\n var re = new RegExp('([А-ЯЁ][а-яё]+)\\\\s-([а-яё]{1,3})(?![^а-яё]|$)', 'g');\n return text.replace(re, '$1\\u00A0\\u2014$2');\n },\n};\n\nvar takiRule = {\n name: 'ru/dash/taki',\n handler: function (text) {\n var re = new RegExp('(верно|довольно|опять|прямо|так|вс[её]|действительно|неужели)\\\\s(таки)' +\n getData('ru/dashAfter'), 'g');\n return text.replace(re, '$1-$2');\n },\n};\n\nvar timeRule = {\n name: 'ru/dash/time',\n handler: function (text, settings) {\n var re = new RegExp(getData('ru/dashBefore') +\n '(\\\\d?\\\\d:[0-5]\\\\d)' +\n getData('common/dash') +\n '(\\\\d?\\\\d:[0-5]\\\\d)' +\n getData('ru/dashAfter'), 'g');\n return text.replace(re, '$1$2' + settings.dash + '$3');\n },\n settings: {\n dash: '\\u2013', // –\n },\n};\n\nvar toRule = {\n name: 'ru/dash/to',\n handler: function (text) {\n var words = '[Оо]ткуда|[Кк]уда|[Гг]де|[Кк]огда|[Зз]ачем|[Пп]очему|[Кк]ак|[Кк]ако[ейм]|[Кк]акая|[Кк]аки[емх]|[Кк]акими|[Кк]акую|[Чч]то|[Чч]его|[Чч]е[йм]|[Чч]ьим?|[Кк]то|[Кк]ого|[Кк]ому|[Кк]ем';\n var re = new RegExp('(^|[^А-ЯЁа-яё\\\\w])(' + words + ')( | -|- )(то|либо|нибудь)' +\n getData('ru/dashAfter'), 'g');\n return text.replace(re, function ($0, $1, $2, $3, $4) {\n var kakto = $2 + $3 + $4;\n // Отдельно обрабатываем в ru/dash/kakto\n if (kakto === 'как то' || kakto === 'Как то') {\n return $0;\n }\n return $1 + $2 + '-' + $4;\n });\n },\n};\n\nvar kaktoRule = {\n name: 'ru/dash/kakto',\n handler: function (text) {\n var re = new RegExp('(^|[^А-ЯЁа-яё\\\\w])([Кк]ак) то' + getData('ru/dashAfter'), 'g');\n return text.replace(re, '$1$2-то');\n },\n};\n\nvar weekdayRule$1 = {\n name: 'ru/dash/weekday',\n handler: function (text, settings) {\n var part = '(' + getData('ru/weekday') + ')';\n var re = new RegExp(part + ' ?(' + getData('common/dash') + ') ?' + part, 'gi');\n return text.replace(re, '$1' + settings.dash + '$3');\n },\n settings: {\n dash: '\\u2013', // –\n },\n};\n\nvar yearsRule$1 = {\n name: 'ru/dash/years',\n handler: function (text, settings) {\n var dashes = getData('common/dash');\n var re = new RegExp('(\\\\D|^)(\\\\d{4})[ \\u00A0]?(' +\n dashes + ')[ \\u00A0]?(\\\\d{4})(?=[ \\u00A0]?г)', 'g');\n return text.replace(re, function ($0, $1, $2, $3, $4) {\n if (parseInt($2, 10) < parseInt($4, 10)) {\n return $1 + $2 + settings.dash + $4;\n }\n return $0;\n });\n },\n settings: {\n dash: '\\u2013', // –\n },\n};\n\nTypograf.addRules([\n centuriesRule$1,\n daysMonthRule,\n deRule,\n decadeRule,\n directSpeechRule,\n izpodRule,\n izzaRule,\n kaRule,\n koeRule,\n mainRule,\n monthRule,\n surnameRule,\n takiRule,\n timeRule,\n toRule,\n kaktoRule,\n weekdayRule$1,\n yearsRule$1,\n]);\n\nvar sp1 = '(-|\\\\.|\\\\/)';\nvar sp2 = '(-|\\\\/)';\nvar re1 = new RegExp('(^|\\\\D)(\\\\d{4})' + sp1 + '(\\\\d{2})' + sp1 + '(\\\\d{2})(\\\\D|$)', 'gi');\nvar re2 = new RegExp('(^|\\\\D)(\\\\d{2})' + sp2 + '(\\\\d{2})' + sp2 + '(\\\\d{4})(\\\\D|$)', 'gi');\nvar fromISORule = {\n name: 'ru/date/fromISO',\n handler: function (text) {\n return text\n .replace(re1, '$1$6.$4.$2$7')\n .replace(re2, '$1$4.$2.$6$7');\n },\n};\n\nvar weekdayRule = {\n name: 'ru/date/weekday',\n handler: function (text) {\n var space = '( |\\u00A0)';\n var monthCase = getData('ru/monthGenCase');\n var weekday = getData('ru/weekday');\n var re = new RegExp('(\\\\d)' + space + '(' + monthCase + '),' + space + '(' + weekday + ')', 'gi');\n return text.replace(re, function (_, $1, $2, $3, $4, $5) {\n return $1 + $2 + $3.toLowerCase() + ',' + $4 + $5.toLowerCase();\n });\n },\n};\n\nTypograf.addRules([\n fromISORule,\n weekdayRule,\n]);\n\nvar currencyRule = {\n name: 'ru/money/currency',\n handler: function (text) {\n var currency = '([$€¥Ұ£₤₽])';\n var space = '[ \\u00A0\\u2009\\u202F]';\n var re1 = new RegExp('(^|[\\\\D]{2})' + currency + ' ?(' + regExpNumber + '(' + space + '\\\\d{3})*)(' + space + '?(тыс\\\\.|млн|млрд|трлн))?', 'gm');\n var re2 = new RegExp('(^|[\\\\D])(' + regExpNumber + ') ?' + currency, 'gm');\n return text\n .replace(re1, function ($0, $1, $2, $3, $4, $5, $6, $7) {\n return $1 + $3 + ($7 ? '\\u00A0' + $7 : '') + '\\u00A0' + $2;\n })\n .replace(re2, '$1$2\\u00A0$4');\n },\n disabled: true,\n};\n\nvar rubleRule = {\n name: 'ru/money/ruble',\n handler: function (text) {\n var newSubstr = '$1\\u00A0₽';\n var commonPart = '(\\\\d+)( |\\u00A0)?(р|руб)\\\\.';\n var re1 = new RegExp('^' + commonPart + '$', 'g');\n var re2 = new RegExp(commonPart + '(?=[!?,:;])', 'g');\n var re3 = new RegExp(commonPart + '(?=\\\\s+[A-ЯЁ])', 'g');\n return text\n .replace(re1, newSubstr)\n .replace(re2, newSubstr)\n .replace(re3, newSubstr + '.');\n },\n disabled: true,\n};\n\nTypograf.addRules([\n currencyRule,\n rubleRule,\n]);\n\nfunction abbr($0, $1, $2, $3) {\n // дд.мм.гггг\n if ($2 === 'дд' && $3 === 'мм') {\n return $0;\n }\n // Являются ли сокращения ссылкой\n if (['рф', 'ру', 'рус', 'орг', 'укр', 'бг', 'срб'].indexOf($3) > -1) {\n return $0;\n }\n return $1 + $2 + '.' + '\\u00A0' + $3 + '.';\n}\nvar abbrRule = {\n name: 'ru/nbsp/abbr',\n handler: function (text) {\n var re = new RegExp(\"(^|\\\\s|\".concat(privateLabel, \")([\\u0430-\\u044F\\u0451]{1,3})\\\\. ?([\\u0430-\\u044F\\u0451]{1,3})\\\\.\"), 'g');\n return text\n .replace(re, abbr)\n // Для тройных сокращений - а.е.м.\n .replace(re, abbr);\n },\n};\n\nvar addrRule = {\n name: 'ru/nbsp/addr',\n handler: function (text) {\n return text\n .replace(/(\\s|^)(дом|д\\.|кв\\.|под\\.|п-д) *(\\d+)/gi, '$1$2\\u00A0$3')\n .replace(/(\\s|^)(мкр-н|мк-н|мкр\\.|мкрн)\\s/gi, '$1$2\\u00A0') // микрорайон\n .replace(/(\\s|^)(эт\\.) *(-?\\d+)/gi, '$1$2\\u00A0$3')\n .replace(/(\\s|^)(\\d+) +этаж([^а-яё]|$)/gi, '$1$2\\u00A0этаж$3')\n .replace(/(\\s|^)литер\\s([А-Я]|$)/gi, '$1литер\\u00A0$2')\n /*\n область, край, станция, поселок, село,\n деревня, улица, переулок, проезд, проспект,\n бульвар, площадь, набережная, шоссе,\n тупик, офис, комната, участок, владение, строение, корпус\n */\n .replace(/(\\s|^)(обл|кр|ст|пос|с|д|ул|пер|пр|пр-т|просп|пл|бул|б-р|наб|ш|туп|оф|комн?|уч|вл|влад|стр|кор)\\. *([а-яёa-z\\d]+)/gi, '$1$2.\\u00A0$3')\n // город\n .replace(/(\\D[ \\u00A0]|^)г\\. ?([А-ЯЁ])/gm, '$1г.\\u00A0$2');\n },\n};\n\nvar afterNumberSignRule = {\n name: 'ru/nbsp/afterNumberSign',\n handler: function (text) {\n // \\u2009 - THIN SPACE\n // \\u202F - NARROW NO-BREAK SPACE\n return text.replace(/№[ \\u00A0\\u2009]?(\\d|п\\/п)/g, '№\\u202F$1');\n },\n};\n\nvar beforeParticleRule = {\n name: 'ru/nbsp/beforeParticle',\n index: '+5',\n handler: function (text) {\n var particles = '(ли|ль|же|ж|бы|б)';\n var re1 = new RegExp('([А-ЯЁа-яё]) ' + particles + '(?=[,;:?!\"‘“»])', 'g');\n var re2 = new RegExp('([А-ЯЁа-яё])[ \\u00A0]' + particles + '[ \\u00A0]', 'g');\n return text\n .replace(re1, '$1\\u00A0$2')\n .replace(re2, '$1\\u00A0$2 ');\n },\n};\n\nvar centuriesRule = {\n name: 'ru/nbsp/centuries',\n handler: function (text) {\n var dashes = getData('common/dash');\n var before = '(^|\\\\s)([VIX]+)';\n var after = '(?=[,;:?!\"‘“»]|$)';\n var re1 = new RegExp(before + '[ \\u00A0]?в\\\\.?' + after, 'gm');\n var re2 = new RegExp(before + '(' + dashes + ')' + '([VIX]+)[ \\u00A0]?в\\\\.?([ \\u00A0]?в\\\\.?)?' + after, 'gm');\n return text\n .replace(re1, '$1$2\\u00A0в.')\n .replace(re2, '$1$2$3$4\\u00A0вв.');\n },\n};\n\nvar dayMonthRule = {\n name: 'ru/nbsp/dayMonth',\n handler: function (text) {\n var re = new RegExp('(\\\\d{1,2}) (' + getData('ru/shortMonth') + ')', 'gi');\n return text.replace(re, '$1\\u00A0$2');\n },\n};\n\nvar initialsRule = {\n name: 'ru/nbsp/initials',\n handler: function (text) {\n var spaces = '\\u00A0\\u202F '; // nbsp, thinsp\n var quote = getData('ru/quote');\n var re = new RegExp('(^|[' + spaces +\n quote.left +\n privateLabel +\n '\"])([А-ЯЁ])\\\\.[' + spaces + ']?([А-ЯЁ])\\\\.[' + spaces +\n ']?([А-ЯЁ][а-яё]+)', 'gm');\n return text.replace(re, '$1$2.\\u00A0$3.\\u00A0$4');\n },\n};\n\nvar pow = {\n '2': '²',\n '²': '²',\n '3': '³',\n '³': '³',\n '': ''\n};\nvar mRule = {\n name: 'ru/nbsp/m',\n index: '+5',\n handler: function (text) {\n var re = new RegExp('(^|[\\\\s,.\\\\(' + privateLabel + '])' +\n '(\\\\d+)[ \\u00A0]?(мм?|см|км|дм|гм|mm?|km|cm|dm)([23²³])?([\\\\s\\\\).!?,;' +\n privateLabel + ']|$)', 'gm');\n return text.replace(re, function (_$0, $1, $2, $3, $4, $5) {\n return $1 + $2 + '\\u00A0' + $3 + pow[$4 || ''] + ($5 === '\\u00A0' ? ' ' : $5);\n });\n },\n};\n\nvar mlnRule = {\n name: 'ru/nbsp/mln',\n handler: function (text) {\n return text.replace(/(\\d) ?(тыс|млн|млрд|трлн)(\\.|\\s|$)/gi, '$1\\u00a0$2$3');\n },\n};\n\nvar oooRule = {\n name: 'ru/nbsp/ooo',\n handler: function (text) {\n return text.replace(/(^|[^a-яёA-ЯЁ])(ООО|ОАО|ЗАО|НИИ|ПБОЮЛ) /g, '$1$2\\u00A0');\n },\n};\n\nvar pageRule = {\n name: 'ru/nbsp/page',\n handler: function (text) {\n var re = new RegExp('(^|[)\\\\s' + privateLabel + '])' +\n '(стр|гл|рис|илл?|ст|п|c)\\\\. *(\\\\d+)([\\\\s.,?!;:]|$)', 'gim');\n return text.replace(re, '$1$2.\\u00A0$3$4');\n },\n};\n\nvar psRule = {\n name: 'ru/nbsp/ps',\n handler: function (text) {\n var re = new RegExp(\"(^|\\\\s|\".concat(privateLabel, \")[p\\u0437]\\\\.[ \\u00A0]?([p\\u0437]\\\\.[ \\u00A0]?)?[s\\u044B]\\\\.:? \"), 'gim');\n return text.replace(re, function ($0, $1, $2) {\n return $1 + ($2 ? 'P.\\u00A0P.\\u00A0S. ' : 'P.\\u00A0S. ');\n });\n },\n};\n\nvar rubleKopekRule = {\n name: 'ru/nbsp/rubleKopek',\n handler: function (text) {\n return text.replace(/(\\d) ?(?=(руб|коп)\\.)/g, '$1\\u00A0');\n },\n};\n\nvar seeRule = {\n name: 'ru/nbsp/see',\n handler: function (text) {\n var re = new RegExp(\"(^|\\\\s|\".concat(privateLabel, \"|\\\\()(\\u0441\\u043C|\\u0438\\u043C)\\\\.[ \\u00A0]?([\\u0430-\\u044F\\u04510-9a-z]+)([\\\\s.,?!]|$)\"), 'gi');\n return text.replace(re, function ($0, $1, $2, $3, $4) {\n return ($1 === '\\u00A0' ? ' ' : $1) + $2 + '.\\u00A0' + $3 + $4;\n });\n },\n};\n\nvar yearRule$1 = {\n name: 'ru/nbsp/year',\n handler: function (text) {\n return text.replace(/(^|\\D)(\\d{4}) ?г([ ,;.\\n]|$)/g, '$1$2\\u00A0г$3');\n },\n};\n\nvar yearsRule = {\n name: 'ru/nbsp/years',\n index: '+5',\n handler: function (text) {\n var dashes = getData('common/dash');\n var re = new RegExp('(^|\\\\D)(\\\\d{4})(' +\n dashes + ')(\\\\d{4})[ \\u00A0]?г\\\\.?([ \\u00A0]?г\\\\.)?(?=[,;:?!\"‘“»\\\\s]|$)', 'gm');\n return text.replace(re, '$1$2$3$4\\u00A0гг.');\n },\n};\n\nTypograf.addRules([\n abbrRule,\n addrRule,\n afterNumberSignRule,\n beforeParticleRule,\n centuriesRule,\n dayMonthRule,\n initialsRule,\n mRule,\n mlnRule,\n oooRule,\n pageRule,\n psRule,\n rubleKopekRule,\n seeRule,\n yearRule$1,\n yearsRule,\n]);\n\nvar commaRule$1 = {\n name: 'ru/number/comma',\n handler: function (text) {\n // \\u00A0 - NO-BREAK SPACE\n // \\u2009 - THIN SPACE\n // \\u202F - NARROW NO-BREAK SPACE\n return text.replace(/(^|\\s)(\\d+)\\.(\\d+[\\u00A0\\u2009\\u202F ]*?[%‰°×x])/gim, '$1$2,$3');\n },\n};\n\nvar ordinalsRule = {\n name: 'ru/number/ordinals',\n handler: function (text, _settings, context) {\n var char = context.getData('char');\n var re = new RegExp('(\\\\d[%‰]?)-(ый|ой|ая|ое|ые|ым|ом|ых|ого|ому|ыми)(?![' + char + '])', 'g');\n return text.replace(re, function ($0, $1, $2) {\n var parts = {\n 'ой': 'й',\n 'ый': 'й',\n 'ая': 'я',\n 'ое': 'е',\n 'ые': 'е',\n 'ым': 'м',\n 'ом': 'м',\n 'ых': 'х',\n 'ого': 'го',\n 'ому': 'му',\n 'ыми': 'ми',\n };\n return $1 + '-' + parts[$2];\n });\n },\n};\n\nTypograf.addRules([\n commaRule$1,\n ordinalsRule,\n]);\n\nfunction removeOptAlignTags(text, classNames) {\n var re = new RegExp('([^]*?)', 'g');\n return text.replace(re, '$2');\n}\nfunction removeOptAlignTagsFromTitle(text, classNames) {\n return text.replace(/[^]*?<\\/title>/i, function (text) {\n return removeOptAlignTags(text, classNames);\n });\n}\n\nvar classNames$2 = [\n 'typograf-oa-lbracket',\n 'typograf-oa-n-lbracket',\n 'typograf-oa-sp-lbracket'\n];\nvar name$2 = 'ru/optalign/bracket';\nvar bracketRule = {\n name: name$2,\n handler: function (text) {\n return text\n .replace(/( |\\u00A0)\\(/g, '<span class=\"typograf-oa-sp-lbracket\">$1</span><span class=\"typograf-oa-lbracket\">(</span>')\n .replace(/^\\(/gm, '<span class=\"typograf-oa-n-lbracket\">(</span>');\n },\n disabled: true,\n htmlAttrs: false,\n};\nvar innerStartBracketRule = {\n name: name$2,\n queue: 'start',\n handler: function (text) {\n return removeOptAlignTags(text, classNames$2);\n },\n htmlAttrs: false,\n};\nvar innerEndBracketRule = {\n name: name$2,\n queue: 'end',\n handler: function (text) {\n return removeOptAlignTagsFromTitle(text, classNames$2);\n },\n htmlAttrs: false,\n};\n\nvar classNames$1 = [\n 'typograf-oa-comma',\n 'typograf-oa-comma-sp',\n];\nvar name$1 = 'ru/optalign/comma';\nvar commaRule = {\n name: name$1,\n handler: function (text, _settings, context) {\n var char = context.getData('char');\n var re = new RegExp('([' + char + '\\\\d\\u0301]+), ', 'gi');\n return text.replace(re, '$1<span class=\"typograf-oa-comma\">,</span><span class=\"typograf-oa-comma-sp\"> </span>');\n },\n disabled: true,\n htmlAttrs: false,\n};\nvar innerStartCommaRule = {\n name: name$1,\n queue: 'start',\n handler: function (text) {\n return removeOptAlignTags(text, classNames$1);\n },\n htmlAttrs: false,\n};\nvar innerEndCommaRule = {\n name: name$1,\n queue: 'end',\n handler: function (text) {\n return removeOptAlignTagsFromTitle(text, classNames$1);\n },\n htmlAttrs: false,\n};\n\nvar classNames = [\n 'typograf-oa-lquote',\n 'typograf-oa-n-lquote',\n 'typograf-oa-sp-lquote'\n];\nvar name = 'ru/optalign/quote';\nvar quoteRule = {\n name: name,\n handler: function (text) {\n var quote = this.getSetting('common/punctuation/quote', 'ru');\n var lquotes = '([' + quote.left[0] + (quote.left[1] || '') + '])';\n var reNewLine = new RegExp('(^|\\n\\n|' + privateLabel + ')(' + lquotes + ')', 'g');\n var reInside = new RegExp('([^\\n' + privateLabel + '])([ \\u00A0\\n])(' + lquotes + ')', 'gi');\n return text\n .replace(reNewLine, '$1<span class=\"typograf-oa-n-lquote\">$2</span>')\n .replace(reInside, '$1<span class=\"typograf-oa-sp-lquote\">$2</span><span class=\"typograf-oa-lquote\">$3</span>');\n },\n disabled: true,\n htmlAttrs: false,\n};\nvar innerStartQuoteRule = {\n name: name,\n queue: 'start',\n handler: function (text) {\n return removeOptAlignTags(text, classNames);\n },\n htmlAttrs: false,\n};\nvar innerEndQuoteRule = {\n name: name,\n queue: 'end',\n handler: function (text) {\n return removeOptAlignTagsFromTitle(text, classNames);\n },\n htmlAttrs: false,\n};\n\nTypograf.addRules([\n bracketRule,\n commaRule,\n quoteRule,\n]);\nTypograf.addInnerRules([\n innerStartBracketRule,\n innerEndBracketRule,\n innerStartCommaRule,\n innerEndCommaRule,\n innerStartQuoteRule,\n innerEndQuoteRule,\n]);\n\nvar accentRule = {\n name: 'ru/other/accent',\n handler: function (text) {\n return text.replace(/([а-яё])([АЕЁИОУЫЭЮЯ])([^А-ЯЁ\\w]|$)/g, function ($0, $1, $2, $3) {\n return $1 + $2.toLowerCase() + '\\u0301' + $3;\n });\n },\n disabled: true,\n};\n\nvar defaultCityCodeLength = 5;\nvar countryCode = '7';\nvar exceptions = [];\nvar exceptionsMax = 8;\nvar exceptionsMin = 2;\n[\n 4162, 416332, 8512, 851111, 4722, 4725, 391379, 8442, 4732,\n 4152, 4154451, 4154459, 4154455, 41544513, 8142, 8332, 8612,\n 8622, 3525, 812, 8342, 8152, 3812, 4862, 3422, 342633, 8112,\n 9142, 8452, 3432, 3434, 3435, 4812, 8432, 8439, 3822,\n 4872, 3412, 3511, 3512, 3022, 4112, 4852, 4855, 3852, 3854,\n 8182, 818, 90, 3472, 4741, 4764, 4832, 4922, 8172, 8202, 8722,\n 4932, 493, 3952, 3951, 3953, 411533, 4842, 3842, 3843, 8212,\n 4942, '39131-39179', '39190-39199', 391, 4712, 4742, 8362, 495, 499, 4966, 4964, 4967, 498,\n 8312, 8313, 3832, 383612, 3532, 8412, 4232, 423370, 423630, 8632,\n 8642, 8482, 4242, 8672, 8652, 4752, 4822, 482502, 4826300, 3452,\n 8422, 4212, 3466, 3462, 8712, 8352,\n '901-934', '936-939', '950-953', 958, '960-969',\n '977-989', '991-997', 999\n].forEach(function (num) {\n if (typeof num === 'string') {\n var buf = num.split('-');\n for (var i = +buf[0]; i <= +buf[1]; i++) {\n exceptions.push(i);\n }\n }\n else {\n exceptions.push(num);\n }\n});\nfunction phone(num) {\n var firstSym = num[0];\n var cityCode = '';\n var hasPlusWithCode;\n var hasEight;\n if (num.length < 8) {\n return phoneBlocks(num);\n }\n // 8 495 123-45-67, +7 495 123-45-67\n if (num.length > 10) {\n if (firstSym === '+') {\n if (num[1] === countryCode) {\n hasPlusWithCode = true;\n num = num.substr(2);\n }\n else {\n return num;\n }\n }\n else if (firstSym === '8') {\n hasEight = true;\n num = num.substr(1);\n }\n }\n for (var cityCodeLen = exceptionsMax; cityCodeLen >= exceptionsMin; cityCodeLen--) {\n var code = +num.substr(0, cityCodeLen);\n if (exceptions.indexOf(code) > -1) {\n cityCode = num.substr(0, cityCodeLen);\n num = num.substr(cityCodeLen);\n break;\n }\n }\n if (!cityCode) {\n cityCode = num.substr(0, defaultCityCodeLength);\n num = num.substr(defaultCityCodeLength);\n }\n return (hasPlusWithCode ? '+' + countryCode + '\\u00A0' : '') +\n (hasEight ? '8\\u00A0' : '') +\n prepareCode(cityCode) + '\\u00A0' +\n phoneBlocks(num);\n}\nfunction prepareCode(code) {\n var numCode = +code;\n var len = code.length;\n var result = [code];\n var withoutBrackets = false;\n if (len > 3) {\n switch (len) {\n case 4:\n result = [code.substr(0, 2), code.substr(2, 2)];\n break;\n case 5:\n result = [code.substr(0, 3), code.substr(3, 3)];\n break;\n case 6:\n result = [code.substr(0, 2), code.substr(2, 2), code.substr(4, 2)];\n break;\n }\n }\n else {\n // Мобильные и московские номера без скобок\n withoutBrackets = (numCode > 900 && numCode <= 999) || numCode === 495 || numCode === 499;\n }\n var str = result.join('-');\n return withoutBrackets ? str : '(' + str + ')';\n}\nfunction phoneBlocks(num) {\n var add = '';\n if (num.length % 2) {\n add = num[0];\n add += num.length <= 5 ? '-' : '';\n num = num.substr(1, num.length - 1);\n }\n return add + num.split(/(?=(?:\\d\\d)+$)/).join('-');\n}\nfunction clearPhone(text) {\n return text.replace(/[^\\d+]/g, '');\n}\nvar phoneNumberRule = {\n name: 'ru/other/phone-number',\n live: false,\n handler: function (text) {\n var re = new RegExp('(^|,| |' + privateLabel + ')(\\\\+7[\\\\d\\\\(\\\\) \\u00A0-]{10,18})(?=,|;|' + privateLabel + '|$)', 'gm');\n return text\n .replace(re, function ($0, $1, $2) {\n var buf = clearPhone($2);\n return buf.length === 12 ? $1 + phone(buf) : $0;\n })\n .replace(\n // eslint-disable-next-line no-misleading-character-class\n /(^|[^а-яё])([☎☏✆📠📞📱]|т\\.|тел\\.|ф\\.|моб\\.|факс|сотовый|мобильный|телефон)(:?\\s*?)([+\\d(][\\d \\u00A0\\-()]{3,}\\d)/gi, function ($0, $1, $2, $3, $4) {\n var buf = clearPhone($4);\n if (buf.length >= 5) {\n return $1 + $2 + $3 + phone(buf);\n }\n return $0;\n });\n },\n};\n\nTypograf.addRules([\n accentRule,\n phoneNumberRule,\n]);\n\nvar anoRule = {\n name: 'ru/punctuation/ano',\n handler: function (text) {\n var re = new RegExp('([^«„[(!?,:;\\\\-‒–—\\\\s' + privateLabel + '])(\\\\s+)(а|но)(?= |\\u00A0|\\\\n)', 'g');\n return text.replace(re, '$1,$2$3');\n },\n};\n\nvar exclamationRule = {\n name: 'ru/punctuation/exclamation',\n handler: function (text) {\n return text\n .replace(/(^|[^!])!{2}($|[^!])/gm, '$1!$2')\n .replace(/(^|[^!])!{4}($|[^!])/gm, '$1!!!$2');\n },\n live: false,\n};\n\nvar exclamationQuestionRule = {\n name: 'ru/punctuation/exclamationQuestion',\n index: '+5',\n handler: function (text) {\n var re = new RegExp('(^|[^!])!\\\\?([^?]|$)', 'g');\n return text.replace(re, '$1?!$2');\n },\n};\n\nvar hellipQuestionRule = {\n name: 'ru/punctuation/hellipQuestion',\n handler: function (text) {\n return text\n .replace(/(^|[^.])(\\.\\.\\.|…),/g, '$1…')\n .replace(/(!|\\?)(\\.\\.\\.|…)(?=[^.]|$)/g, '$1..');\n },\n};\n\nTypograf.addRules([\n anoRule,\n exclamationRule,\n exclamationQuestionRule,\n hellipQuestionRule,\n]);\n\nvar afterHellipRule = {\n name: 'ru/space/afterHellip',\n handler: function (text) {\n return text\n .replace(/([а-яё])(\\.\\.\\.|…)([А-ЯЁ])/g, '$1$2 $3')\n .replace(/([?!]\\.\\.)([а-яёa-z])/gi, '$1 $2');\n },\n};\n\nvar yearRule = {\n name: 'ru/space/year',\n handler: function (text, _settings, context) {\n var char = context.getData('char');\n var re = new RegExp('(^| |\\u00A0)(\\\\d{3,4})(год([ауе]|ом)?)([^' +\n char + ']|$)', 'g');\n return text.replace(re, '$1$2 $3$5');\n }\n};\n\nTypograf.addRules([\n afterHellipRule,\n yearRule,\n]);\n\nvar nnRule = {\n name: 'ru/symbols/NN',\n handler: function (text) {\n return text.replace(/№№/g, '№');\n },\n};\n\nTypograf.addRules([\n nnRule,\n]);\n\nvar replacements = {\n A: 'А',\n a: 'а',\n B: 'В',\n E: 'Е',\n e: 'е',\n K: 'К',\n M: 'М',\n H: 'Н',\n O: 'О',\n o: 'о',\n P: 'Р',\n p: 'р',\n C: 'С',\n c: 'с',\n T: 'Т',\n y: 'у',\n X: 'Х',\n x: 'х'\n};\nvar keys = Object.keys(replacements).join('');\nvar switchingKeyboardLayoutRule = {\n name: 'ru/typo/switchingKeyboardLayout',\n handler: function (text) {\n var re = new RegExp('([' + keys + ']{1,3})(?=[А-ЯЁа-яё]+?)', 'g');\n return text.replace(re, function (str, $1) {\n var result = '';\n for (var i = 0; i < $1.length; i++) {\n result += replacements[$1[i]];\n }\n return result;\n });\n }\n};\n\nTypograf.addRules([\n switchingKeyboardLayoutRule,\n]);\n\nexport { Typograf as default };\n","import { tracker } from '@skbkontur/km-tracker';\nimport { Nullable } from '@skbkontur/react-ui/typings/utility-types';\n\nimport { PagesTabs } from '../../shared';\nimport { APP_MODES, isPAMMode, secureValue } from '../common';\nimport { UsersPageTabs } from '../navigation/pageTabs';\nimport { Environment, Organization, Undefined } from '../types';\nimport { detectEnvironment } from '../urls';\nimport {\n APP_PAGES,\n METRICS_CATEGORIES,\n METRICS_LABELS,\n METRICS_SITE_ID,\n} from './constants';\n\nexport class Tracker {\n private appMode = isPAMMode() ? APP_MODES.PAM : APP_MODES.KID;\n private page = '';\n private modal: Undefined<string> = '';\n private tab: Undefined<UsersPageTabs | string> = '';\n private organizationId = '';\n private organizationName = '';\n private multidomains = false;\n\n constructor() {\n try {\n tracker.initialize({\n siteID: METRICS_SITE_ID,\n trackerENV: detectEnvironment(),\n devMode: detectEnvironment() === Environment.LOCAL,\n options: {\n catchPageVisits: true,\n webVitalsOptions: {\n // https://github.com/GoogleChrome/web-vitals#report-the-value-on-every-change\n reportAllChanges: false,\n },\n },\n });\n } catch (err) {\n console.error(err);\n }\n }\n\n trackEvent(\n category: METRICS_CATEGORIES | string,\n action: string,\n label?: Nullable<METRICS_LABELS | string>,\n customVariables?: Record<string, unknown>\n ): void {\n const commonValues = {\n appMode: this.appMode,\n page: this.page,\n modal: this.modal,\n tab: this.tab,\n organizationId: this.organizationId,\n organizationName: this.organizationName,\n multidomains: this.multidomains,\n };\n\n tracker.trackEvent(category, action, label, {\n ...customVariables,\n ...commonValues,\n });\n }\n\n setPage(page: APP_PAGES, modal?: string, tab?: PagesTabs): void {\n this.page = page;\n this.modal = modal;\n this.tab = tab;\n }\n\n cleanPage(): void {\n this.page = '';\n this.modal = undefined;\n this.tab = undefined;\n }\n\n setOrganization(organization: Organization): void {\n this.organizationId = organization.id;\n this.organizationName = secureValue(organization.name || '');\n this.multidomains = organization.multiDomains;\n }\n}\n","export { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nexport let nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\n","export const DATA_TID_ATTRIBUTE = 'data-tid';\r\n\r\nexport const SUPPORT_BUTTON_DATA_TID = 'support-center-button';\r\n\r\nexport const CONTAINER_DATA_TID = 'support-center-container';\r\n\r\nexport const NO_FOCUS_LOCK_ATTRIBUTE = 'data-no-focus-lock';\r\n\r\nexport const INPUT_FOCUS_UNLOCKER_ID = 'support-focus-unlocker';\r\n","import {\r\n ButtonImageAttribute,\r\n ButtonStyleProperty,\r\n CounterStyleProperty,\r\n SupportButtonSettings,\r\n} from './types/postMessageTransport';\r\nimport { DATA_TID_ATTRIBUTE } from './constants/attributes';\r\n\r\ninterface AdditionalButtonHandlers {\r\n onKeyDown: (e: KeyboardEvent) => void;\r\n onMouseDown: (e: MouseEvent) => void;\r\n onMouseMove: (e: MouseEvent) => void;\r\n onMouseUp: (e: MouseEvent) => void;\r\n onMouseLeave: (e: MouseEvent) => void;\r\n}\r\n\r\ntype WidgetState = 'closed' | 'opened';\r\n\r\nconst MAX_NOTIFICATIONS_COUNT = 99;\r\n\r\nexport class SupportButton {\r\n constructor(onClick: (e: MouseEvent) => void) {\r\n this.buttonNode = document.createElement('button');\r\n this.buttonNode.setAttribute('type', 'button');\r\n this.buttonNode.setAttribute('aria-haspopup', 'true');\r\n this.buttonNode.setAttribute('aria-expanded', 'false');\r\n\r\n this.img = document.createElement('img');\r\n this.buttonNode.onclick = onClick;\r\n\r\n this.counter = document.createElement('span');\r\n this.counter.style.display = 'none';\r\n this.buttonNode.appendChild(this.counter);\r\n }\r\n\r\n private readonly buttonNode: HTMLButtonElement;\r\n\r\n private readonly img: HTMLImageElement;\r\n\r\n private readonly counter: HTMLSpanElement;\r\n\r\n private settings: SupportButtonSettings | undefined;\r\n\r\n private isHidden: boolean = true;\r\n\r\n private isHiddenManually: boolean = false;\r\n\r\n private isAttachedToContainer: boolean = false;\r\n\r\n private notificationsCount: number = 0;\r\n\r\n private isCounterHidden: boolean = false;\r\n\r\n private applyButtonStyles() {\r\n if (!this.settings) return;\r\n\r\n (Object.keys(this.settings.styles) as ButtonStyleProperty[]).forEach((key) => {\r\n this.buttonNode.style[key] = this.settings!.styles[key];\r\n });\r\n }\r\n\r\n private applyCounterStyles() {\r\n if (!this.settings) return;\r\n\r\n (Object.keys(this.settings.counter.styles) as CounterStyleProperty[]).forEach((key) => {\r\n this.counter.style[key] = this.settings!.counter.styles[key];\r\n });\r\n }\r\n\r\n private applyImageAttributes() {\r\n if (!this.settings) return;\r\n\r\n (Object.keys(this.settings.image.attributes) as ButtonImageAttribute[]).forEach((key) => {\r\n this.img.setAttribute(key, this.settings!.image.attributes[key]);\r\n });\r\n }\r\n\r\n private hideManually() {\r\n if (this.isHidden) return;\r\n\r\n this.isHiddenManually = true;\r\n this.buttonNode.style.display = 'none';\r\n }\r\n\r\n private showCounter() {\r\n if (!this.notificationsCount) return;\r\n\r\n this.counter.textContent = this.notificationsCount > MAX_NOTIFICATIONS_COUNT ? '!' : `${this.notificationsCount}`;\r\n this.counter.style.display = 'flex';\r\n this.isCounterHidden = false;\r\n }\r\n\r\n private hideCounter() {\r\n this.counter.style.display = 'none';\r\n this.isCounterHidden = true;\r\n }\r\n\r\n public showManually() {\r\n if (this.isHidden) return;\r\n\r\n this.isHiddenManually = false;\r\n this.buttonNode.style.display = 'flex';\r\n }\r\n\r\n public getNode(): HTMLButtonElement {\r\n return this.buttonNode;\r\n }\r\n\r\n public changeButtonAttributes(state: WidgetState) {\r\n if (!this.settings) return;\r\n\r\n if (state === 'opened' && this.settings.hideManually) {\r\n this.hideManually();\r\n return;\r\n }\r\n\r\n if (state === 'closed' && this.isHiddenManually) {\r\n this.showManually();\r\n return;\r\n }\r\n\r\n this.buttonNode.setAttribute('aria-label', this.settings.ariaLabel[state]);\r\n this.buttonNode.setAttribute('aria-expanded', state === 'opened' ? 'true' : 'false');\r\n this.img.src = this.settings.image.src[state];\r\n\r\n if (state === 'opened') {\r\n this.hideCounter();\r\n }\r\n\r\n if (state === 'closed') {\r\n this.showCounter();\r\n }\r\n }\r\n\r\n public saveSettings(settings: SupportButtonSettings) {\r\n this.settings = settings;\r\n this.applyButtonStyles();\r\n this.applyCounterStyles();\r\n }\r\n\r\n public render(): boolean {\r\n if (!this.settings?.render) return false;\r\n\r\n this.buttonNode.setAttribute('aria-label', this.settings.ariaLabel.closed);\r\n this.buttonNode.setAttribute(DATA_TID_ATTRIBUTE, this.settings.dataTid);\r\n\r\n this.img.src = this.settings.image.src.closed;\r\n this.applyImageAttributes();\r\n\r\n if (this.settings.classNames.length) {\r\n this.settings.classNames.forEach((className) => {\r\n this.buttonNode.classList.add(className);\r\n });\r\n }\r\n\r\n if (this.settings.counter.classNames.length) {\r\n this.settings.counter.classNames.forEach((className) => {\r\n this.counter.classList.add(className);\r\n });\r\n }\r\n\r\n this.buttonNode.appendChild(this.img);\r\n this.isHidden = false;\r\n\r\n return true;\r\n }\r\n\r\n public saveHandlers(handlers: AdditionalButtonHandlers) {\r\n this.buttonNode.onkeydown = handlers.onKeyDown;\r\n this.buttonNode.onmousedown = handlers.onMouseDown;\r\n this.buttonNode.onmousemove = handlers.onMouseMove;\r\n this.buttonNode.onmouseup = handlers.onMouseUp;\r\n this.buttonNode.onmouseleave = handlers.onMouseLeave;\r\n this.buttonNode.ondragstart = () => false;\r\n }\r\n\r\n public checkAndApplySettings(settings: SupportButtonSettings, state: WidgetState) {\r\n this.settings = settings;\r\n this.applyButtonStyles();\r\n\r\n this.img.src = this.settings.image.src[state];\r\n this.applyImageAttributes();\r\n }\r\n\r\n public getHeight(): string | undefined {\r\n return this.settings?.styles.height;\r\n }\r\n\r\n public hide() {\r\n this.isHidden = true;\r\n /**\r\n * Затираем предыдущее значение, потому что принудительно спрятали\r\n */\r\n this.isHiddenManually = false;\r\n this.buttonNode.style.display = 'none';\r\n }\r\n\r\n public show() {\r\n this.isHidden = false;\r\n this.isHiddenManually = false;\r\n this.buttonNode.style.display = 'flex';\r\n }\r\n\r\n public isButtonHidden() {\r\n return this.isHidden;\r\n }\r\n\r\n public setIsAttached(isAttached: boolean) {\r\n this.isAttachedToContainer = isAttached;\r\n }\r\n\r\n public isAttached() {\r\n return this.isAttachedToContainer;\r\n }\r\n\r\n public setAriaControls(iframeId: string) {\r\n this.buttonNode.setAttribute('aria-controls', iframeId);\r\n }\r\n\r\n public updateExternalNotificationsCount(count: number) {\r\n /**\r\n * Счетчик показывали, а теперь не нужно\r\n */\r\n if (this.notificationsCount && !count) {\r\n this.notificationsCount = count;\r\n this.hideCounter();\r\n return;\r\n }\r\n\r\n this.notificationsCount = count;\r\n if (!this.isCounterHidden) {\r\n this.showCounter();\r\n }\r\n }\r\n}\r\n","import { ReactUIStackInfoChecker } from '../reactUIStackInfoChecker';\r\n\r\nexport function defineReactUIStackInfoCheckerInWindow(checker: ReactUIStackInfoChecker) {\r\n if (window?.kontur?.Support?.__reactUIStackInfoChecker &&\r\n window.kontur.Support.__reactUIStackInfoChecker instanceof ReactUIStackInfoChecker) return;\r\n\r\n window.kontur = window.kontur || {};\r\n window.kontur.Support = window.kontur.Support || {};\r\n window.kontur.Support.__reactUIStackInfoChecker = checker;\r\n}\r\n","import { IReactUIStackInfoChecker } from './types/reactUIStackInfoChecker';\r\nimport {\r\n SupportCenterEventEmitter,\r\n UpdateZIndexPayload,\r\n SupportCenterEvents,\r\n} from './types/supportCenterEventEmitter';\r\nimport { INPUT_FOCUS_UNLOCKER_ID, NO_FOCUS_LOCK_ATTRIBUTE } from './constants/attributes';\r\nimport { defineReactUIStackInfoCheckerInWindow } from './utils/defineReactUIStackInfoCheckerInWindow';\r\n\r\nexport interface CheckFocusLockPayload {\r\n eventType: 'open' | 'close';\r\n iframeId: string;\r\n}\r\n\r\nfunction enableFocus() {\r\n const input = document.createElement('input');\r\n input.setAttribute('style', `\r\n position: absolute;\r\n width: 1px;\r\n left: -999px;\r\n top: -999px;\r\n height: 0;\r\n border: 0;\r\n outline: 0;\r\n margin: 0;\r\n padding: 0;\r\n overflow: hidden;\r\n opacity: 0;\r\n `);\r\n input.setAttribute('id', INPUT_FOCUS_UNLOCKER_ID);\r\n\r\n document.body.appendChild(input);\r\n input.focus();\r\n document.body.removeChild(input);\r\n}\r\n\r\nexport const CHECK_STACK_INFO_INTERVAL = 1500;\r\n\r\n/**\r\n * Еще один синглтон для всех виджетов на странице\r\n */\r\nexport class ReactUIStackInfoChecker implements IReactUIStackInfoChecker {\r\n constructor(eventEmitter: SupportCenterEventEmitter) {\r\n if (window?.kontur?.Support?.__reactUIStackInfoChecker &&\r\n window.kontur.Support.__reactUIStackInfoChecker instanceof ReactUIStackInfoChecker) {\r\n // eslint-disable-next-line no-constructor-return\r\n return window.kontur.Support.__reactUIStackInfoChecker;\r\n }\r\n\r\n defineReactUIStackInfoCheckerInWindow(this);\r\n this.openedContainers = new Set();\r\n this.eventEmitter = eventEmitter;\r\n\r\n /**\r\n * Первую проверку запускаем асинхронно, потому что при вызове конструктора\r\n * подписчиков еще нет, и, соответсвенно, мы не можем обработать случай, когда\r\n * виджет инициализируют при уже отрендеренной модалке(-ах)\r\n */\r\n window.setTimeout(this.handleChange, 0);\r\n\r\n this.intervalId = window.setInterval(() => {\r\n if (window.__ReactUIStackInfo?.emitter?.addListener &&\r\n typeof window.__ReactUIStackInfo.emitter.addListener === 'function') {\r\n this.handleChange();\r\n\r\n window.__ReactUIStackInfo.emitter.addListener('change', this.handleChange);\r\n window.clearInterval(this.intervalId);\r\n this.intervalId = 0;\r\n }\r\n }, CHECK_STACK_INFO_INTERVAL);\r\n }\r\n\r\n private readonly eventEmitter!: SupportCenterEventEmitter;\r\n\r\n private intervalId: number = 0;\r\n\r\n private openedContainers!: Set<string>;\r\n\r\n private mountedComponentsCount: number = 0;\r\n\r\n private handleChange = () => {\r\n if (!window.__ReactUIStackInfo?.mounted || !Array.isArray(window.__ReactUIStackInfo.mounted)) return;\r\n\r\n this.mountedComponentsCount = window.__ReactUIStackInfo.mounted.length;\r\n const payload: UpdateZIndexPayload = {\r\n nodesCount: this.mountedComponentsCount,\r\n };\r\n this.eventEmitter.emit('updateZIndex', payload);\r\n\r\n /**\r\n * Если отреденерилась новая модалка и хотя бы один виджет открыт - оживляем фокус\r\n */\r\n if (this.mountedComponentsCount && this.openedContainers.size) {\r\n enableFocus();\r\n }\r\n };\r\n\r\n public checkFocusLock({ eventType, iframeId }: CheckFocusLockPayload) {\r\n if (eventType === 'open') {\r\n this.openedContainers.add(iframeId);\r\n\r\n /**\r\n * Если открыта хотя бы одна модалка - устанавливаем атрибут\r\n * для сброса фокус-лока и \"оживляем\" фокус\r\n */\r\n if (this.mountedComponentsCount) {\r\n document.body.setAttribute(NO_FOCUS_LOCK_ATTRIBUTE, 'true');\r\n enableFocus();\r\n }\r\n } else {\r\n this.openedContainers.delete(iframeId);\r\n\r\n /**\r\n * Если закрылся последний виджет - снимаем атрибут с body\r\n */\r\n if (!this.openedContainers.size) {\r\n document.body.removeAttribute(NO_FOCUS_LOCK_ATTRIBUTE);\r\n } else {\r\n /**\r\n * Пробуем оживить фокус для еще не закрытых виджетов\r\n */\r\n enableFocus();\r\n }\r\n }\r\n }\r\n\r\n public subscribe<K extends keyof SupportCenterEvents>(\r\n event: K,\r\n handler: (...args: SupportCenterEvents[K]) => void,\r\n ): void {\r\n this.eventEmitter.subscribe(event, handler);\r\n }\r\n\r\n public removeIFrame(iframeId: string) {\r\n this.openedContainers.delete(iframeId);\r\n }\r\n}\r\n","// eslint-disable-next-line import/no-extraneous-dependencies\r\nimport {\r\n IFeedSDK,\r\n FeedNewEventHandler,\r\n PublicTarget,\r\n FeedMessage,\r\n FeedCommonResponse,\r\n} from '@skbkontur/types-notifications.feed.front.sdk';\r\nimport {\r\n IFeedSdkProxy,\r\n FeedSdkInitializationParameters,\r\n SearchFeedMessagesParameters,\r\n MarkFeedMessageAsSeenParameters,\r\n FeedCloseWebSocketParameters,\r\n} from './types/feedSdkProxy';\r\nimport { IPostMessageTransport } from './types/postMessageTransport';\r\n\r\nexport class FeedSdkProxy implements IFeedSdkProxy {\r\n constructor(feedSdk: IFeedSDK, postMessageTransport: IPostMessageTransport, iframeId: string) {\r\n this.postMessageTransport = postMessageTransport;\r\n this.feedSdk = feedSdk;\r\n this.iframeId = iframeId;\r\n }\r\n\r\n private readonly iframeId: string;\r\n\r\n private readonly feedSdk: IFeedSDK;\r\n\r\n private readonly postMessageTransport: IPostMessageTransport;\r\n\r\n private userId: string = '';\r\n\r\n private initialize = async (parameters: FeedSdkInitializationParameters) => {\r\n try {\r\n const initResult = await this.feedSdk.initialize({\r\n env: parameters.env,\r\n accountId: parameters.accountId,\r\n newEventHandler: this.feedEventHandler,\r\n disableEventTracking: parameters.disableEventTracking,\r\n });\r\n\r\n if (initResult.type === 'ok') {\r\n const { type, userId } = await this.feedSdk.authenticate(parameters.accountId);\r\n if (type === 'ok') {\r\n this.userId = userId;\r\n const subscriptionResult = await this.subscribe(\r\n parameters.accountId,\r\n parameters.channels,\r\n parameters.subscriptionDelta,\r\n );\r\n if (subscriptionResult.type === 'ok') {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'feedSdkSuccessfullyInitialized',\r\n });\r\n return;\r\n }\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'feedSdkNotInitialized',\r\n data: {\r\n error: subscriptionResult.errorList,\r\n },\r\n });\r\n return;\r\n }\r\n\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'feedSdkNotInitialized',\r\n data: {\r\n error: 'Can\\'t authenticate',\r\n },\r\n });\r\n return;\r\n }\r\n\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'feedSdkNotInitialized',\r\n data: {\r\n error: initResult.error,\r\n },\r\n });\r\n } catch (error) {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'feedSdkNotInitialized',\r\n data: {\r\n error,\r\n },\r\n });\r\n }\r\n };\r\n\r\n private subscribe = async (accountId: string, channels: string[], subscriptionDelta: number) => {\r\n const subscribeDate = new Date(new Date().getTime() - subscriptionDelta);\r\n\r\n const portalUserTarget: PublicTarget = {\r\n id: 'portal-user',\r\n value: this.userId,\r\n };\r\n\r\n return this.feedSdk.subscribe(\r\n accountId,\r\n channels,\r\n [portalUserTarget],\r\n subscribeDate.toISOString(),\r\n 'New',\r\n );\r\n };\r\n\r\n private initSdk = async (parameters: FeedSdkInitializationParameters) => {\r\n await this.initialize(parameters);\r\n };\r\n\r\n private closeWebSocket = ({ accountId }: FeedCloseWebSocketParameters) => {\r\n this.feedSdk.removeEventHandler(accountId);\r\n };\r\n\r\n private feedEventHandler: FeedNewEventHandler = (data) => {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'newExternalFeedEvent',\r\n data,\r\n });\r\n };\r\n\r\n private searchMessages = async (parameters: SearchFeedMessagesParameters) => {\r\n const searchResult = await this.feedSdk.searchMessages(\r\n parameters.accountId,\r\n parameters.from,\r\n parameters.to,\r\n parameters.messageState,\r\n parameters.cursor,\r\n parameters.order,\r\n parameters.limit,\r\n );\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'searchFeedMessagesResult',\r\n data: { searchResult, type: parameters.type, isFirstChunk: parameters.isFirstChunk },\r\n });\r\n };\r\n\r\n private async markMessageAsSeen(accountId: string, message: FeedMessage) {\r\n const { messageId, channel: { channelId } } = message;\r\n let result: FeedCommonResponse;\r\n try {\r\n result = await this.feedSdk.markMessageAsSeen(accountId, channelId, messageId);\r\n } catch (e) {\r\n result = {\r\n type: 'error',\r\n };\r\n }\r\n return result;\r\n }\r\n\r\n private markMessagesAsSeen = async (parameters: MarkFeedMessageAsSeenParameters) => {\r\n const results = await Promise.all(\r\n parameters.messages.map((message) => this.markMessageAsSeen(parameters.accountId, message)),\r\n );\r\n\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'markFeedMessagesAsSeenResults',\r\n results,\r\n });\r\n };\r\n\r\n /**\r\n * Подписки сохраняем в методе инициализации, потому что eventEmitter в конструкторе транспорта\r\n * не создается автоматически\r\n */\r\n public saveSubscriptions(): void {\r\n this.postMessageTransport.subscribe(this.iframeId, 'initializeExternalFeedSdk', this.initSdk);\r\n this.postMessageTransport.subscribe(this.iframeId, 'searchFeedMessages', this.searchMessages);\r\n this.postMessageTransport.subscribe(this.iframeId, 'closeWebSocket', this.closeWebSocket);\r\n this.postMessageTransport.subscribe(this.iframeId, 'markFeedMessagesAsSeen', this.markMessagesAsSeen);\r\n }\r\n}\r\n","interface ResizeNodeHandlers {\r\n onMouseDown: (e: MouseEvent) => void;\r\n onMouseMove: (e: MouseEvent) => void;\r\n onMouseUp: (e: MouseEvent) => void;\r\n onMouseLeave: (e: MouseEvent) => void;\r\n}\r\n\r\nexport class ResizeNode {\r\n constructor(handlers: ResizeNodeHandlers, inlineStyle: string) {\r\n this.node = document.createElement('div');\r\n this.node.setAttribute('style', inlineStyle);\r\n this.node.setAttribute('aria-hidden', 'true');\r\n\r\n this.node.onmousedown = handlers.onMouseDown;\r\n this.node.onmousemove = handlers.onMouseMove;\r\n this.node.onmouseup = handlers.onMouseUp;\r\n this.node.onmouseleave = handlers.onMouseLeave;\r\n this.node.ondragstart = () => false;\r\n }\r\n\r\n private node: HTMLDivElement;\r\n\r\n public getNode(): HTMLDivElement {\r\n return this.node;\r\n }\r\n\r\n public hide(): void {\r\n this.node.style.display = 'none';\r\n }\r\n\r\n public show(): void {\r\n this.node.style.display = 'block';\r\n }\r\n}\r\n","interface MovementNodeHandlers {\r\n onMouseDown: (e: MouseEvent) => void;\r\n onMouseMove: (e: MouseEvent) => void;\r\n onMouseUp: (e: MouseEvent) => void;\r\n onMouseLeave: (e: MouseEvent) => void;\r\n}\r\n\r\nexport class MovementNode {\r\n constructor(handlers: MovementNodeHandlers, inlineStyle: string) {\r\n this.node = document.createElement('div');\r\n this.node.setAttribute('style', inlineStyle);\r\n this.node.setAttribute('aria-hidden', 'true');\r\n\r\n this.node.onmousedown = handlers.onMouseDown;\r\n this.node.onmousemove = handlers.onMouseMove;\r\n this.node.onmouseup = handlers.onMouseUp;\r\n this.node.onmouseleave = handlers.onMouseLeave;\r\n this.node.ondragstart = () => false;\r\n }\r\n\r\n private node: HTMLDivElement;\r\n\r\n public getNode(): HTMLDivElement {\r\n return this.node;\r\n }\r\n\r\n public hide(): void {\r\n this.node.style.display = 'none';\r\n }\r\n\r\n public show(): void {\r\n this.node.style.display = 'block';\r\n }\r\n}\r\n","import { nanoid } from 'nanoid';\r\nimport {\r\n ContainerSettings,\r\n ContainerStyleProperty,\r\n IFrameSettings,\r\n IFrameStyleProperty,\r\n ContainerCommonStyleProperty,\r\n IPostMessageTransport,\r\n NewContainerSettings,\r\n ContainerStyles,\r\n} from './types/postMessageTransport';\r\nimport { SupportButton } from './supportButton';\r\nimport {\r\n SupportCenterGetAccessTokenHandler,\r\n SupportCenterInternalParameters,\r\n SupportCenterParameters,\r\n} from './types/command';\r\nimport { DestroyResponse, InitializeResponse } from './types/supportCenterResponse';\r\nimport { DATA_TID_ATTRIBUTE } from './constants/attributes';\r\nimport { ReactUIStackInfoChecker } from './reactUIStackInfoChecker';\r\nimport {\r\n ResizeWidgetPayload,\r\n SupportCenterEventEmitter,\r\n UpdateZIndexPayload,\r\n} from './types/supportCenterEventEmitter';\r\nimport { FeedSdkProxy } from './feedSdkProxy';\r\nimport { ResizeNode } from './resizeNode';\r\nimport { MovementNode } from './movementNode';\r\nimport { SupportCenterContainerInfo } from './types/supportCenter';\r\n\r\ntype RootNotePossibleStyleProperty = Extract<\r\n keyof CSSStyleDeclaration,\r\n 'border'\r\n | 'width'\r\n | 'height'\r\n | 'backgroundColor'\r\n | 'position'\r\n | 'right'\r\n | 'bottom'\r\n>;\r\n\r\ntype RootNoteStyles = Pick<CSSStyleDeclaration, RootNotePossibleStyleProperty>;\r\n\r\nfunction applyRootNodeStyles(rootNode: HTMLElement, styles: RootNoteStyles): void {\r\n (Object.keys(styles) as RootNotePossibleStyleProperty[]).forEach((key) => {\r\n // eslint-disable-next-line no-param-reassign\r\n rootNode.style[key] = styles[key];\r\n });\r\n}\r\n\r\nexport interface InternalSettings {\r\n /**\r\n * Минимально возможные отступы от границ вьюпорта\r\n */\r\n minPaddingX: number;\r\n minPaddingY: number;\r\n\r\n /**\r\n * Настройки, специфичные для перетаскивания\r\n */\r\n keyboardMovementStep: number;\r\n scrollBarWidth: number;\r\n\r\n /**\r\n * Настройки, специфичные для ресайза\r\n */\r\n minWidgetHeight: number;\r\n maxWidgetHeight: number;\r\n}\r\n\r\nexport interface ManagementData {\r\n isMouseButtonPressedForMovement: boolean;\r\n wasWidgetMoved: boolean;\r\n currentClientX: number;\r\n initialRight: number;\r\n isMouseButtonPressedForResize: boolean;\r\n currentClientY: number;\r\n initialHeight: number;\r\n}\r\n\r\nexport interface InternalContainerSettings {\r\n settings: InternalSettings;\r\n managementData: ManagementData;\r\n movementNodeInlineStyle: string;\r\n resizeNodeInlineStyle: string;\r\n}\r\n\r\nconst LEFT_MOUSE_BUTTON = 0;\r\n\r\nfunction shouldApplyNewHeightAfterResize(rootNode: HTMLElement, closedHeight: number | string): boolean {\r\n const finalClosedHeight = typeof closedHeight === 'string' ? (parseFloat(closedHeight) || 0) : closedHeight;\r\n\r\n const calculatedHeight = parseFloat(rootNode.style.height) || 0;\r\n /**\r\n * Сравниваем строки, чтобы зафиксировать количество знаков после запятой\r\n */\r\n return !!calculatedHeight && calculatedHeight.toFixed(2) !== finalClosedHeight.toFixed(2);\r\n}\r\n\r\nexport class WidgetContainer {\r\n constructor(\r\n postMessageTransport: IPostMessageTransport,\r\n iframeId: string,\r\n iframe: HTMLIFrameElement,\r\n supportCenterEventEmitter: SupportCenterEventEmitter,\r\n parameters: SupportCenterParameters,\r\n ) {\r\n const { OIDC, container, ...rest } = parameters;\r\n\r\n this.parameters = {\r\n ...rest,\r\n OIDC: {\r\n use: false,\r\n },\r\n };\r\n if (OIDC) {\r\n this.parameters.OIDC.use = OIDC.use;\r\n if (OIDC.additionalSettings) {\r\n this.parameters.OIDC.additionalSettings = {\r\n accessToken: OIDC.additionalSettings.accessToken,\r\n };\r\n this.getNewAccessToken = OIDC.additionalSettings.getNewAccessToken;\r\n }\r\n }\r\n\r\n if (container) {\r\n this.insideContainer = true;\r\n this.rootNode = container;\r\n } else {\r\n this.insideContainer = false;\r\n this.rootNode = document.createElement('div');\r\n }\r\n\r\n this.iframe = iframe;\r\n this.iframeId = iframeId;\r\n\r\n this.supportCenterEventEmitter = supportCenterEventEmitter;\r\n this.supportButton = new SupportButton(this.onButtonClick);\r\n this.reactUIStackInfoChecker = new ReactUIStackInfoChecker(supportCenterEventEmitter);\r\n\r\n this.postMessageTransport = postMessageTransport;\r\n\r\n this.mutationObserver = new MutationObserver(this.observeRootNode);\r\n\r\n const feedSdk = window.kontur?.Notifications?.FeedSDK;\r\n if (feedSdk) {\r\n this.feedSdkTransport = new FeedSdkProxy(feedSdk, this.postMessageTransport, this.iframeId);\r\n }\r\n }\r\n\r\n private now: number = 0;\r\n\r\n private readonly parameters: SupportCenterInternalParameters;\r\n\r\n private readonly rootNode: HTMLElement;\r\n\r\n private readonly iframe: HTMLIFrameElement;\r\n\r\n private readonly iframeId: string;\r\n\r\n private readonly postMessageTransport: IPostMessageTransport;\r\n\r\n private readonly reactUIStackInfoChecker: ReactUIStackInfoChecker;\r\n\r\n private readonly feedSdkTransport: FeedSdkProxy | undefined;\r\n\r\n private readonly insideContainer: boolean;\r\n\r\n private readonly supportCenterEventEmitter: SupportCenterEventEmitter;\r\n\r\n private readonly getNewAccessToken: SupportCenterGetAccessTokenHandler | undefined;\r\n\r\n private mutationObserver: MutationObserver;\r\n\r\n private supportButton: SupportButton;\r\n\r\n private resizeNode: ResizeNode | undefined;\r\n\r\n private movementNode: MovementNode | undefined;\r\n\r\n private initializationPromise: Promise<InitializeResponse> | undefined;\r\n\r\n private destroyPromise: Promise<DestroyResponse> | undefined;\r\n\r\n private containerSettings: ContainerSettings | undefined;\r\n\r\n private iframeSettings: IFrameSettings | undefined;\r\n\r\n private reactUIMountedNodesCount: number = 0;\r\n\r\n private internalSettings: InternalSettings | undefined;\r\n\r\n private managementData: ManagementData | undefined;\r\n\r\n private closeAnimationTimeoutId: number = 0;\r\n\r\n private temporaryZIndex: number | undefined;\r\n\r\n private observeRootNode = (records: MutationRecord[]) => {\r\n records.forEach((record) => {\r\n Array.from(record.removedNodes).forEach((node) => {\r\n if (node instanceof HTMLIFrameElement && node.id === this.iframeId) {\r\n this.postMessageTransport.markIFrameAsRemovedFromDOM(this.iframeId);\r\n }\r\n });\r\n });\r\n };\r\n\r\n private setContainerStyles(styles: ContainerStyles) {\r\n (Object.keys(styles) as ContainerStyleProperty[]).forEach((key) => {\r\n const value = styles[key];\r\n this.rootNode.style[key] = typeof value === 'string' ? value : `${value}px`;\r\n });\r\n }\r\n\r\n private applyCommonStyles() {\r\n if (!this.containerSettings || this.insideContainer) return;\r\n\r\n (Object.keys(this.containerSettings.common.styles) as ContainerCommonStyleProperty[]).forEach((key) => {\r\n /**\r\n * Если приходят новые настройки, и временный z-index установлен, применяем его\r\n */\r\n if (key === 'zIndex' && typeof this.temporaryZIndex === 'number') {\r\n this.rootNode.style[key] = `${this.temporaryZIndex}`;\r\n } else {\r\n this.rootNode.style[key] = this.containerSettings!.common.styles[key];\r\n }\r\n });\r\n\r\n /**\r\n * Если уже что-то было отрендерено из react-ui, считаем новый z-index\r\n */\r\n if (this.reactUIMountedNodesCount) {\r\n this.handleUpdateZIndex({ nodesCount: this.reactUIMountedNodesCount });\r\n }\r\n }\r\n\r\n private applyClosedStyles(enableAnimation: boolean) {\r\n if (!this.containerSettings || !this.iframeSettings) return;\r\n\r\n /**\r\n * Если виджет в контейнере - ничего не анимируем\r\n */\r\n if (this.insideContainer) {\r\n (Object.keys(this.iframeSettings.closed.styles) as IFrameStyleProperty[]).forEach((key) => {\r\n this.iframe.style[key] = this.iframeSettings!.closed.styles[key];\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.rootNode.className = '';\r\n if (this.containerSettings.closed.classNames.length) {\r\n this.containerSettings.closed.classNames.forEach((className) => {\r\n this.rootNode.classList.add(className);\r\n });\r\n }\r\n\r\n if (enableAnimation) {\r\n this.containerSettings.closed.animationClassNames.forEach((className) => {\r\n this.rootNode.classList.add(className);\r\n });\r\n this.closeAnimationTimeoutId = window.setTimeout(() => {\r\n if (!this.containerSettings || !this.iframeSettings) return;\r\n (Object.keys(this.iframeSettings.closed.styles) as IFrameStyleProperty[]).forEach((key) => {\r\n this.iframe.style[key] = this.iframeSettings!.closed.styles[key];\r\n });\r\n\r\n this.setContainerStyles(this.containerSettings.closed.styles);\r\n }, this.containerSettings.closed.closeDelay);\r\n } else {\r\n (Object.keys(this.iframeSettings.closed.styles) as IFrameStyleProperty[]).forEach((key) => {\r\n this.iframe.style[key] = this.iframeSettings!.closed.styles[key];\r\n });\r\n\r\n this.setContainerStyles(this.containerSettings.closed.styles);\r\n }\r\n\r\n if (this.containerSettings.opened.bodyClassNames.length) {\r\n this.containerSettings.opened.bodyClassNames.forEach((className) => {\r\n document.body.classList.remove(className);\r\n });\r\n }\r\n }\r\n\r\n private applyOpenedStyles() {\r\n if (!this.containerSettings || !this.iframeSettings) return;\r\n\r\n if (this.closeAnimationTimeoutId) {\r\n window.clearTimeout(this.closeAnimationTimeoutId);\r\n this.closeAnimationTimeoutId = 0;\r\n }\r\n\r\n (Object.keys(this.iframeSettings.opened.styles) as IFrameStyleProperty[]).forEach((key) => {\r\n this.iframe.style[key] = this.iframeSettings!.opened.styles[key];\r\n });\r\n\r\n if (this.insideContainer) return;\r\n\r\n this.setContainerStyles(this.containerSettings.opened.styles);\r\n\r\n this.rootNode.className = '';\r\n if (this.containerSettings.opened.classNames.length) {\r\n this.containerSettings.opened.classNames.forEach((className) => {\r\n this.rootNode.classList.add(className);\r\n });\r\n }\r\n if (this.containerSettings.opened.animationClassNames.length) {\r\n this.containerSettings.opened.animationClassNames.forEach((className) => {\r\n this.rootNode.classList.add(className);\r\n });\r\n }\r\n\r\n if (this.containerSettings.opened.bodyClassNames.length) {\r\n this.containerSettings.opened.bodyClassNames.forEach((className) => {\r\n document.body.classList.add(className);\r\n });\r\n }\r\n }\r\n\r\n private renderButton() {\r\n const isRendered = this.supportButton.render();\r\n if (isRendered) {\r\n this.rootNode.appendChild(this.supportButton.getNode());\r\n this.supportButton.setIsAttached(true);\r\n }\r\n }\r\n\r\n private sendInitializationTime = () => {\r\n if (!this.now) return;\r\n\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'initializationTime',\r\n time: (performance.now() - this.now) / 1000,\r\n });\r\n this.now = 0;\r\n };\r\n\r\n private async onIframeLoad(resolve: (value: InitializeResponse) => void) {\r\n const response = await this.postMessageTransport.sendCommand<'initialize'>({\r\n commandType: 'initialize',\r\n iframeId: this.iframeId,\r\n parameters: this.parameters,\r\n id: nanoid(),\r\n targetOrigin: window.location.origin,\r\n parentWindowInnerWidth: window.innerWidth,\r\n parentWindowInnerHeight: window.innerHeight,\r\n productLocation: {\r\n hostname: window.location.hostname,\r\n pathname: window.location.pathname,\r\n search: window.location.search,\r\n hash: window.location.hash,\r\n href: window.location.href,\r\n },\r\n hasExternalFeedSdk: !!this.feedSdkTransport,\r\n insideContainer: this.insideContainer,\r\n });\r\n\r\n if (response.code === 'initializeSuccessfully') {\r\n const {\r\n containerSettings,\r\n iframeSettings,\r\n buttonSettings,\r\n internalContainerSettings,\r\n } = response;\r\n this.containerSettings = containerSettings;\r\n this.iframeSettings = iframeSettings;\r\n\r\n this.supportButton.setAriaControls(this.iframeId);\r\n\r\n /**\r\n * Встраиваем в контейнер - сохранили настройки, обновили iframe-у и больше ничего не делаем\r\n */\r\n if (this.insideContainer) {\r\n this.applyClosedStyles(false);\r\n this.postMessageTransport.markIFrameAsReady(this.iframeId);\r\n window.setTimeout(this.sendInitializationTime, 0);\r\n resolve({\r\n code: 'ok',\r\n });\r\n return;\r\n }\r\n\r\n if (response.styleContent && response.styleTagId) {\r\n const currentStyle = document.head.querySelector(`#${response.styleTagId}`);\r\n if (!currentStyle) {\r\n const style = document.createElement('style');\r\n style.id = response.styleTagId;\r\n style.textContent = response.styleContent;\r\n document.head.appendChild(style);\r\n }\r\n }\r\n\r\n this.applyCommonStyles();\r\n this.applyClosedStyles(false);\r\n\r\n this.rootNode.setAttribute(DATA_TID_ATTRIBUTE, this.containerSettings.dataTid);\r\n\r\n if (internalContainerSettings) {\r\n const {\r\n settings,\r\n managementData,\r\n resizeNodeInlineStyle,\r\n movementNodeInlineStyle,\r\n } = internalContainerSettings;\r\n this.internalSettings = settings;\r\n this.managementData = managementData;\r\n\r\n this.supportButton.saveHandlers({\r\n onKeyDown: this.onButtonKeyDown,\r\n onMouseDown: this.onButtonMouseDown,\r\n onMouseMove: this.onButtonMouseMove,\r\n onMouseUp: this.onButtonMouseUp,\r\n onMouseLeave: this.onButtonMouseLeave,\r\n });\r\n\r\n if (!this.movementNode) {\r\n this.movementNode = new MovementNode({\r\n onMouseDown: this.onButtonMouseDown,\r\n onMouseMove: this.onButtonMouseMove,\r\n onMouseUp: this.onButtonMouseUp,\r\n onMouseLeave: this.onButtonMouseLeave,\r\n }, movementNodeInlineStyle);\r\n }\r\n\r\n this.rootNode.appendChild(this.movementNode.getNode());\r\n\r\n if (!this.resizeNode) {\r\n this.resizeNode = new ResizeNode({\r\n onMouseDown: this.onResizeZoneMouseDown,\r\n onMouseMove: this.onResizeZoneMouseMove,\r\n onMouseUp: this.onResizeZoneMouseUp,\r\n onMouseLeave: this.onResizeZoneMouseLeave,\r\n }, resizeNodeInlineStyle);\r\n }\r\n\r\n this.rootNode.appendChild(this.resizeNode.getNode());\r\n }\r\n\r\n this.supportButton.saveSettings(buttonSettings);\r\n this.renderButton();\r\n\r\n this.postMessageTransport.markIFrameAsReady(this.iframeId);\r\n window.setTimeout(this.sendInitializationTime, 0);\r\n resolve({\r\n code: 'ok',\r\n });\r\n return;\r\n }\r\n\r\n resolve(response);\r\n }\r\n\r\n /**\r\n * Если виджет еще не инициализирован, а модалки начинают рендериться (или уже отрендерились),\r\n * сохраняем количество и больше ничего не делаем\r\n *\r\n * Если настройки уже получены (виджет инициализирован), считаем финальный z-index\r\n * и применяем его\r\n */\r\n private handleUpdateZIndex = ({ nodesCount }: UpdateZIndexPayload) => {\r\n this.reactUIMountedNodesCount = nodesCount;\r\n\r\n /**\r\n * Если продукт принудительно установил z-index - мы ничего не пересчитываем\r\n */\r\n if (typeof this.temporaryZIndex === 'number') return;\r\n\r\n if (this.containerSettings) {\r\n const reactUIZIndex = this.reactUIMountedNodesCount * this.containerSettings.zIndexStep +\r\n this.containerSettings.zIndexDelta;\r\n const currentZIndex = parseInt(this.containerSettings.common.styles.zIndex, 10);\r\n const finalZIndex = Math.max(reactUIZIndex, currentZIndex);\r\n\r\n this.rootNode.style.zIndex = finalZIndex.toString();\r\n }\r\n };\r\n\r\n private handleResizeWidget = ({ innerHeight }: ResizeWidgetPayload) => {\r\n if (!this.internalSettings || !this.managementData || !this.containerSettings) return;\r\n const {\r\n minPaddingY,\r\n minWidgetHeight,\r\n maxWidgetHeight,\r\n } = this.internalSettings;\r\n const {\r\n bottom,\r\n height,\r\n } = this.containerSettings.opened.styles;\r\n\r\n if (typeof bottom !== 'number' || typeof height !== 'number') return;\r\n\r\n const shouldApplyNewHeight = shouldApplyNewHeightAfterResize(\r\n this.rootNode,\r\n this.containerSettings.closed.styles.height,\r\n );\r\n\r\n const newHeight = innerHeight - minPaddingY - bottom;\r\n let finalHeight: number;\r\n /**\r\n * При уменьшении высоты выбираем максимально возможный,\r\n * при увеличении - минимально возможный (чтобы не перескачить дефолтные 840px)\r\n */\r\n if (newHeight < height) {\r\n finalHeight = Math.max(newHeight, minWidgetHeight);\r\n this.containerSettings.opened.styles.height = finalHeight;\r\n } else {\r\n finalHeight = Math.min(newHeight, maxWidgetHeight);\r\n this.containerSettings.opened.styles.height = finalHeight;\r\n }\r\n\r\n if (shouldApplyNewHeight) {\r\n this.rootNode.style.height = `${finalHeight}px`;\r\n }\r\n };\r\n\r\n private onButtonClick = (e: MouseEvent) => {\r\n e.stopPropagation();\r\n\r\n /**\r\n * Если двигали виджет - последующее за mouseup событие click гасим,\r\n * чтобы не открывать виджет\r\n */\r\n if (this.managementData?.wasWidgetMoved) {\r\n this.managementData.wasWidgetMoved = false;\r\n this.managementData.currentClientX = 0;\r\n e.preventDefault();\r\n return;\r\n }\r\n\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n messageType: 'buttonClick',\r\n iframeId: this.iframeId,\r\n });\r\n };\r\n\r\n private onButtonKeyDown = (e: KeyboardEvent) => {\r\n if (!this.internalSettings || !this.managementData || !this.containerSettings) return;\r\n\r\n const {\r\n keyboardMovementStep,\r\n minPaddingX,\r\n scrollBarWidth,\r\n } = this.internalSettings;\r\n const {\r\n width,\r\n right,\r\n } = this.containerSettings.opened.styles;\r\n\r\n if (typeof width !== 'number' || !keyboardMovementStep || !minPaddingX) return;\r\n\r\n if (e.key === 'ArrowLeft') {\r\n const potentialRight = right + keyboardMovementStep;\r\n /**\r\n * Тут, даже несмотря на то, что шаг сдвига больше, чем 1px, тоже учитываем потенциальный скроллбар на странице\r\n */\r\n if (window.innerWidth - width - potentialRight - scrollBarWidth > minPaddingX) {\r\n e.stopPropagation();\r\n this.containerSettings.opened.styles.right = potentialRight;\r\n this.containerSettings.closed.styles.right = potentialRight;\r\n this.rootNode.style.right = `${potentialRight}px`;\r\n return;\r\n }\r\n }\r\n if (e.key === 'ArrowRight') {\r\n const potentialRight = right - keyboardMovementStep;\r\n if (potentialRight > minPaddingX) {\r\n e.stopPropagation();\r\n this.containerSettings.opened.styles.right = potentialRight;\r\n this.containerSettings.closed.styles.right = potentialRight;\r\n this.rootNode.style.right = `${potentialRight}px`;\r\n }\r\n }\r\n };\r\n\r\n private onButtonMouseDown = (e: MouseEvent) => {\r\n if (e.button !== LEFT_MOUSE_BUTTON || !this.managementData) return;\r\n\r\n e.stopPropagation();\r\n this.managementData.isMouseButtonPressedForMovement = true;\r\n this.managementData.currentClientX = e.clientX;\r\n };\r\n\r\n private onButtonMouseMove = (e: MouseEvent) => {\r\n if (!this.managementData || !this.internalSettings || !this.containerSettings ||\r\n this.managementData.currentClientX === e.clientX ||\r\n !this.managementData.isMouseButtonPressedForMovement) return;\r\n\r\n const { clientX } = e;\r\n const { minPaddingX, scrollBarWidth } = this.internalSettings;\r\n const { width, right } = this.containerSettings.opened.styles;\r\n\r\n if (typeof width !== 'number' || typeof right !== 'number' || !minPaddingX) return;\r\n\r\n /**\r\n * Двигаемся влево\r\n */\r\n if (clientX < this.managementData.currentClientX) {\r\n const shift = this.managementData.currentClientX - clientX;\r\n const potentialRight = right + shift;\r\n\r\n /**\r\n * Учитываем потенциальный скроллбар на странице, чтобы не укатить виджет вплотную к левому краю\r\n */\r\n if (window.innerWidth - width - potentialRight - scrollBarWidth >= minPaddingX) {\r\n e.stopPropagation();\r\n this.containerSettings.closed.styles.right = potentialRight;\r\n this.containerSettings.opened.styles.right = potentialRight;\r\n this.rootNode.style.right = `${potentialRight}px`;\r\n this.managementData.currentClientX = clientX;\r\n }\r\n /**\r\n * Двигаемся вправо\r\n */\r\n } else {\r\n const shift = clientX - this.managementData.currentClientX;\r\n const potentialRight = right - shift;\r\n\r\n if (potentialRight >= minPaddingX) {\r\n e.stopPropagation();\r\n this.containerSettings.closed.styles.right = potentialRight;\r\n this.containerSettings.opened.styles.right = potentialRight;\r\n this.rootNode.style.right = `${potentialRight}px`;\r\n this.managementData.currentClientX = clientX;\r\n }\r\n }\r\n\r\n /**\r\n * Однозначно поменяли расположение контейнера - сохраняем об этом информацию\r\n * для onButtonClick\r\n */\r\n this.managementData.wasWidgetMoved = true;\r\n };\r\n\r\n /**\r\n * Обработчик onButtonMouseUp лишь обнуляет информацию о том,\r\n * что клавиша мышки была нажата\r\n */\r\n private onButtonMouseUp = () => {\r\n if (!this.managementData || !this.containerSettings) return;\r\n this.managementData.isMouseButtonPressedForMovement = false;\r\n\r\n if (this.managementData.initialRight !== this.containerSettings.opened.styles.right) {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n messageType: 'calculateMovementResult',\r\n iframeId: this.iframeId,\r\n data: {\r\n initialRight: this.managementData.initialRight,\r\n currentRight: this.containerSettings.opened.styles.right,\r\n },\r\n });\r\n this.managementData.initialRight = this.containerSettings.opened.styles.right;\r\n }\r\n };\r\n\r\n /**\r\n * Если же мышка покинула границы элемента - нужно полностью сбросить состояние,\r\n * чтобы следующий клик привел к открытию виджета\r\n */\r\n private onButtonMouseLeave = () => {\r\n if (!this.managementData || !this.containerSettings) return;\r\n\r\n this.managementData.isMouseButtonPressedForMovement = false;\r\n this.managementData.currentClientX = 0;\r\n this.managementData.wasWidgetMoved = false;\r\n\r\n if (this.managementData.initialRight !== this.containerSettings.opened.styles.right) {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n messageType: 'calculateMovementResult',\r\n iframeId: this.iframeId,\r\n data: {\r\n initialRight: this.managementData.initialRight,\r\n currentRight: this.containerSettings.opened.styles.right,\r\n },\r\n });\r\n this.managementData.initialRight = this.containerSettings.opened.styles.right;\r\n }\r\n };\r\n\r\n private onResizeZoneMouseDown = (e: MouseEvent) => {\r\n if (e.button !== LEFT_MOUSE_BUTTON || !this.managementData) return;\r\n\r\n this.managementData.currentClientY = e.clientY;\r\n this.managementData.isMouseButtonPressedForResize = true;\r\n };\r\n\r\n private onResizeZoneMouseMove = (e: MouseEvent) => {\r\n if (!this.managementData || !this.internalSettings || !this.containerSettings ||\r\n !this.managementData.isMouseButtonPressedForResize ||\r\n this.managementData.currentClientY === e.clientY) return;\r\n\r\n const {\r\n minPaddingY,\r\n minWidgetHeight,\r\n } = this.internalSettings;\r\n const { bottom, height } = this.containerSettings.opened.styles;\r\n if (typeof height !== 'number') return;\r\n /**\r\n * В условии не проверяем \"непустоту\" bottom,\r\n * потому что отступ снизу может быть нулевым, а ресайзить при этом нужно давать возможность\r\n */\r\n if (!height || !minPaddingY || !minWidgetHeight) return;\r\n\r\n const { clientY } = e;\r\n\r\n /**\r\n * Тянем вверх\r\n */\r\n if (clientY < this.managementData.currentClientY) {\r\n const shift = this.managementData.currentClientY - clientY;\r\n const potentialHeight = height + shift;\r\n\r\n if (window.innerHeight - bottom - potentialHeight >= minPaddingY) {\r\n e.stopPropagation();\r\n this.containerSettings.opened.styles.height = potentialHeight;\r\n this.rootNode.style.height = `${potentialHeight}px`;\r\n this.managementData.currentClientY = clientY;\r\n }\r\n /**\r\n * Тянем вниз\r\n */\r\n } else {\r\n const shift = clientY - this.managementData.currentClientY;\r\n const potentialHeight = height - shift;\r\n\r\n if (potentialHeight >= minWidgetHeight) {\r\n e.stopPropagation();\r\n this.containerSettings.opened.styles.height = potentialHeight;\r\n this.rootNode.style.height = `${potentialHeight}px`;\r\n this.managementData.currentClientY = clientY;\r\n }\r\n }\r\n };\r\n\r\n private onResizeZoneMouseUp = () => {\r\n if (!this.managementData || !this.containerSettings) return;\r\n if (typeof this.containerSettings.opened.styles.height !== 'number') return;\r\n\r\n this.managementData.isMouseButtonPressedForResize = false;\r\n this.managementData.currentClientY = 0;\r\n\r\n if (this.managementData.initialHeight !== this.containerSettings.opened.styles.height) {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'calculateResizeResult',\r\n data: {\r\n initialHeight: this.managementData.initialHeight,\r\n currentHeight: this.containerSettings.opened.styles.height,\r\n },\r\n });\r\n this.managementData.initialHeight = this.containerSettings.opened.styles.height;\r\n }\r\n };\r\n\r\n private onResizeZoneMouseLeave = () => {\r\n if (!this.managementData || !this.containerSettings) return;\r\n if (typeof this.containerSettings.opened.styles.height !== 'number') return;\r\n\r\n this.managementData.isMouseButtonPressedForResize = false;\r\n this.managementData.currentClientY = 0;\r\n\r\n if (this.managementData.initialHeight !== this.containerSettings.opened.styles.height) {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n iframeId: this.iframeId,\r\n messageType: 'calculateResizeResult',\r\n data: {\r\n initialHeight: this.managementData.initialHeight,\r\n currentHeight: this.containerSettings.opened.styles.height,\r\n },\r\n });\r\n this.managementData.initialHeight = this.containerSettings.opened.styles.height;\r\n }\r\n };\r\n\r\n private getOidcToken = async (): Promise<void> => {\r\n if (!this.getNewAccessToken) {\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n messageType: 'newAccessTokenFormSupportCenter',\r\n iframeId: this.iframeId,\r\n token: '',\r\n });\r\n\r\n return;\r\n }\r\n\r\n let token: string = '';\r\n try {\r\n const newToken = await this.getNewAccessToken();\r\n if (newToken) {\r\n token = newToken;\r\n }\r\n } catch (error) {\r\n //\r\n }\r\n\r\n this.postMessageTransport.sendInternalMessage(this.iframeId, {\r\n messageType: 'newAccessTokenFormSupportCenter',\r\n iframeId: this.iframeId,\r\n token,\r\n });\r\n };\r\n\r\n private onWidgetIsOpened = () => {\r\n this.applyOpenedStyles();\r\n this.supportButton.changeButtonAttributes('opened');\r\n this.reactUIStackInfoChecker.checkFocusLock({ eventType: 'open', iframeId: this.iframeId });\r\n this.onShowManagementNodes();\r\n };\r\n\r\n private onWidgetIsClosed = () => {\r\n this.applyClosedStyles(true);\r\n this.supportButton.changeButtonAttributes('closed');\r\n this.reactUIStackInfoChecker.checkFocusLock({ eventType: 'close', iframeId: this.iframeId });\r\n this.onHideManagementNodes();\r\n };\r\n\r\n private onHideManagementNodes = () => {\r\n this.resizeNode?.hide();\r\n this.movementNode?.hide();\r\n };\r\n\r\n private onShowManagementNodes = () => {\r\n this.resizeNode?.show();\r\n this.movementNode?.show();\r\n };\r\n\r\n private onNewNotificationsCount = (count: number) => {\r\n this.supportButton.updateExternalNotificationsCount(count);\r\n };\r\n\r\n private onNewContainerSettings = (settings: NewContainerSettings, isWidgetOpened: boolean) => {\r\n if (!this.containerSettings || !this.iframeSettings) return;\r\n const {\r\n containerSettings,\r\n iframeSettings,\r\n buttonSettings,\r\n internalContainerSettings,\r\n applyAllSettings,\r\n } = settings;\r\n\r\n if (applyAllSettings) {\r\n this.containerSettings = containerSettings;\r\n this.iframeSettings = iframeSettings;\r\n this.internalSettings = internalContainerSettings?.settings;\r\n this.managementData = internalContainerSettings?.managementData;\r\n this.supportButton.saveSettings(buttonSettings);\r\n\r\n this.applyCommonStyles();\r\n\r\n if (isWidgetOpened) {\r\n this.applyOpenedStyles();\r\n } else {\r\n this.applyClosedStyles(false);\r\n }\r\n\r\n /**\r\n * Кнопка была добавлена в DOM, нарисована, а теперь надо спрятать\r\n */\r\n if (this.supportButton.isAttached() && !this.supportButton.isButtonHidden() && !buttonSettings.render) {\r\n this.supportButton.hide();\r\n return;\r\n }\r\n\r\n /**\r\n * Кнопка была добавлена в DOM, но позже скрыта, а теперь нужно показать\r\n */\r\n if (this.supportButton.isAttached() && this.supportButton.isButtonHidden() && buttonSettings.render) {\r\n this.supportButton.show();\r\n return;\r\n }\r\n\r\n /**\r\n * Кнопка не добавлена в DOM, а теперь её нужно отобразить\r\n */\r\n if (!this.supportButton.isAttached() && buttonSettings.render) {\r\n this.renderButton();\r\n return;\r\n }\r\n\r\n /**\r\n * Кнопка была добавлена в DOM, нарисована, и пришли новые настройки (иконка, размер, цвета)\r\n */\r\n if (this.supportButton.isAttached() && !this.supportButton.isButtonHidden() && buttonSettings.render) {\r\n this.supportButton.checkAndApplySettings(buttonSettings, isWidgetOpened ? 'opened' : 'closed');\r\n }\r\n } else {\r\n this.iframeSettings = iframeSettings;\r\n this.containerSettings.closed = {\r\n ...this.containerSettings.closed,\r\n ...containerSettings.closed,\r\n styles: {\r\n /**\r\n * Заменяем только ширину/высоту, чтобы сохранить right/bottom\r\n */\r\n ...this.containerSettings.closed.styles,\r\n width: containerSettings.closed.styles.width,\r\n height: containerSettings.closed.styles.height,\r\n },\r\n };\r\n\r\n if (!isWidgetOpened) {\r\n this.applyClosedStyles(false);\r\n }\r\n }\r\n };\r\n\r\n public async initialize(): Promise<InitializeResponse> {\r\n if (this.destroyPromise) {\r\n this.destroyPromise = undefined;\r\n }\r\n\r\n if (!this.initializationPromise) {\r\n this.postMessageTransport.addIFrame(this.iframeId, this.iframe);\r\n\r\n this.postMessageTransport.subscribe(this.iframeId, 'widgetIsOpened', this.onWidgetIsOpened);\r\n this.postMessageTransport.subscribe(this.iframeId, 'widgetIsClosed', this.onWidgetIsClosed);\r\n if (this.getNewAccessToken) {\r\n this.postMessageTransport.subscribe(this.iframeId, 'getOidcTokenInSupportCenter', this.getOidcToken);\r\n }\r\n\r\n if (this.feedSdkTransport) {\r\n this.feedSdkTransport.saveSubscriptions();\r\n }\r\n\r\n /**\r\n * Подписки на события об изменениях размера контейнера не создаем, если встраиваем виджет в \"чужой\" контейнер\r\n */\r\n if (!this.insideContainer) {\r\n this.postMessageTransport.subscribe(this.iframeId, 'hideManagementNodes', this.onHideManagementNodes);\r\n this.postMessageTransport.subscribe(this.iframeId, 'showManagementNodes', this.onShowManagementNodes);\r\n this.postMessageTransport.subscribe(this.iframeId, 'newContainerSettings', this.onNewContainerSettings);\r\n this.postMessageTransport.subscribe(this.iframeId, 'newNotificationsCount', this.onNewNotificationsCount);\r\n\r\n this.supportCenterEventEmitter.subscribe('resizeWidget', this.handleResizeWidget);\r\n this.reactUIStackInfoChecker.subscribe('updateZIndex', this.handleUpdateZIndex);\r\n }\r\n\r\n this.now = performance.now();\r\n this.initializationPromise = new Promise<InitializeResponse>((res) => {\r\n this.iframe.onload = () => this.onIframeLoad(res);\r\n this.rootNode.appendChild(this.iframe);\r\n\r\n if (!this.insideContainer) {\r\n applyRootNodeStyles(this.rootNode, {\r\n border: 'none',\r\n width: '0px',\r\n height: '0px',\r\n backgroundColor: 'transparent',\r\n position: 'fixed',\r\n right: '0px',\r\n bottom: '0px',\r\n });\r\n document.body.appendChild(this.rootNode);\r\n }\r\n\r\n this.mutationObserver.observe(this.rootNode, { childList: true });\r\n });\r\n }\r\n\r\n return this.initializationPromise;\r\n }\r\n\r\n public getContainerInfo(): SupportCenterContainerInfo {\r\n if (this.insideContainer) {\r\n return {\r\n zIndex: 0,\r\n right: 0,\r\n bottom: 0,\r\n };\r\n }\r\n\r\n const zIndex = parseInt(this.rootNode.style.zIndex, 10);\r\n const right = parseInt(this.rootNode.style.right, 10);\r\n const bottom = parseInt(this.rootNode.style.bottom, 10);\r\n\r\n return {\r\n zIndex,\r\n right,\r\n bottom,\r\n };\r\n }\r\n\r\n /**\r\n * - Отправляет виджету команду на \"уничтожение\", виджет останавливает все таймеры/поллинги/сокеты\r\n * - Резолвит все команды, которые были отправлены и пока не получены\r\n * - Очищает промис, который возвращается при инициализации\r\n * - Удаляет упоминание об iframe-е из ReactUIStackInfoChecker\r\n * - Чистит innerHTML контейнера, в котором виджет был отрендерен. Перед этим снимает стили и классы с ноды\r\n * - Снимает флажок о том, что у виджета есть уведомления (чтобы не применять стили, если снова инициализируют)\r\n * - Удаляет из DOM контейнер, если мы сами его создали\r\n */\r\n public async destroy(): Promise<DestroyResponse> {\r\n if (!this.destroyPromise) {\r\n // eslint-disable-next-line no-async-promise-executor\r\n this.destroyPromise = new Promise<DestroyResponse>(async (res) => {\r\n const response = await this.postMessageTransport.sendCommand<'destroy'>({\r\n commandType: 'destroy',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n });\r\n\r\n if (response.code !== 'widgetHasBeenDestroyed') {\r\n this.postMessageTransport.removeIFrame(this.iframeId);\r\n this.reactUIStackInfoChecker.removeIFrame(this.iframeId);\r\n this.initializationPromise = undefined;\r\n\r\n this.containerSettings = undefined;\r\n this.iframeSettings = undefined;\r\n this.internalSettings = undefined;\r\n this.managementData = undefined;\r\n this.supportButton.setIsAttached(false);\r\n\r\n this.mutationObserver.disconnect();\r\n\r\n if (this.insideContainer) {\r\n try {\r\n this.rootNode.removeChild(this.iframe);\r\n } catch {\r\n //\r\n }\r\n } else {\r\n this.rootNode.setAttribute('style', '');\r\n this.rootNode.className = '';\r\n this.rootNode.innerHTML = '';\r\n document.body.removeChild(this.rootNode);\r\n }\r\n }\r\n\r\n res(response);\r\n });\r\n }\r\n\r\n return this.destroyPromise;\r\n }\r\n\r\n public setTemporaryZIndex(zIndex: number): void {\r\n if (this.insideContainer || !this.containerSettings) return;\r\n\r\n if (typeof zIndex !== 'number') {\r\n throw new Error(`Validation error. Passed z-index value isn't a number: ${zIndex}`);\r\n }\r\n\r\n this.temporaryZIndex = zIndex;\r\n this.rootNode.style.zIndex = `${zIndex}`;\r\n }\r\n\r\n public resetTemporaryZIndex(): void {\r\n if (this.insideContainer || typeof this.temporaryZIndex !== 'number' || !this.containerSettings) return;\r\n\r\n this.temporaryZIndex = undefined;\r\n this.applyCommonStyles();\r\n }\r\n}\r\n","import { SupportCenterEnvironment, SupportCenterLanguage } from '../types/common';\r\n\r\nexport const IFRAME_ORIGINS: Record<SupportCenterEnvironment, string> = {\r\n localhost: 'https://localhost.testkontur.ru:8000',\r\n dev: 'https://tp-dev.testkontur.ru',\r\n dev2: 'https://csi-tp-dev.testkontur.ru',\r\n staging: 'https://tp.testkontur.ru',\r\n production: 'https://tp.kontur.ru',\r\n};\r\n\r\nexport const IFRAME_PATHNAMES: Record<SupportCenterLanguage, string> = {\r\n ru: '/support/widget_ru.html',\r\n en: '/support/widget_en.html',\r\n};\r\n","import { PostMessageTransport } from '../postMessageTransport';\r\n\r\nexport function definePostMessageTransportInTheGlobalScope(transport: PostMessageTransport) {\r\n if (window?.kontur?.Support?.__postMessageTransport &&\r\n window.kontur.Support.__postMessageTransport instanceof PostMessageTransport) return;\r\n\r\n window.kontur = window.kontur || {};\r\n window.kontur.Support = window.kontur.Support || {};\r\n window.kontur.Support.__postMessageTransport = transport;\r\n}\r\n","import { EventEmitterHandler, EventEmitterSubscriptions, IEventEmitter } from '../types/eventEmitter';\r\n\r\nexport class EventEmitter<Events extends Record<string, unknown[]>> implements IEventEmitter<Events> {\r\n private subscriptions: EventEmitterSubscriptions<Events> = {};\r\n\r\n public subscribe<K extends keyof Events>(event: K, handler: EventEmitterHandler<Events[K]>) {\r\n let handlers = this.subscriptions[event];\r\n if (!handlers) {\r\n handlers = new Set<EventEmitterHandler<Events[K]>>();\r\n this.subscriptions[event] = handlers;\r\n }\r\n\r\n if (handlers.has(handler)) return;\r\n handlers.add(handler);\r\n }\r\n\r\n public unsubscribe<K extends keyof Events>(event: K, handler: EventEmitterHandler<Events[K]>) {\r\n const handlers = this.subscriptions[event];\r\n if (!handlers || !handlers.has(handler)) return;\r\n\r\n handlers.delete(handler);\r\n }\r\n\r\n public emit<K extends keyof Events>(event: K, ...args: Events[K]) {\r\n const handlers = this.subscriptions[event];\r\n if (!handlers) return;\r\n\r\n handlers.forEach((handler) => {\r\n handler(...args);\r\n });\r\n }\r\n\r\n public clear(): void {\r\n this.subscriptions = {};\r\n }\r\n}\r\n","import {\r\n IPostMessageTransport,\r\n PostMessageTransportInternalMessage,\r\n WidgetMessages,\r\n} from './types/postMessageTransport';\r\nimport { definePostMessageTransportInTheGlobalScope } from './utils/definePostMessageTransportInTheGlobalScope';\r\nimport { EventEmitter } from './utils/eventEmitter';\r\nimport {\r\n ProductLocation,\r\n SupportCenterCommand,\r\n SupportCenterCommandAndResponses,\r\n SupportCenterCommandType,\r\n} from './types/command';\r\nimport {\r\n isInitializeExternalFeedSdkPostMessage,\r\n isWidgetIsClosedPostMessage,\r\n isWidgetIsOpenedPostMessage,\r\n isSearchFeedMessagesPostMessage,\r\n isCloseWebSocketPostMessage,\r\n isMarkFeedMessagesAsSeenPostMessage,\r\n isWidgetGetOidcTokenInSupportCenterPostMessage,\r\n isHideManagementNodesPostMessage,\r\n isShowManagementNodesPostMessage,\r\n isNewContainerSettingsPostMessage,\r\n isNewNotificationsCountPostMessage,\r\n isChangeParentHashPostMessage,\r\n} from './utils/typePredicates';\r\nimport { SupportCenterResponse } from './types/supportCenterResponse';\r\nimport { WidgetResponse } from './types/widgetResponse';\r\nimport { SupportCenterEventEmitter } from './types/supportCenterEventEmitter';\r\nimport { SupportCenterEvent, SupportCenterSubscriptions } from './types/subscriptions';\r\n\r\nexport const AUTO_RESOLVE_PROMISE_TIMEOUT = 30000;\r\n\r\nconst CHECK_WINDOW_RESIZE_TIMEOUT = 200;\r\n\r\ninterface PostMessageTransportCommandPromiseData {\r\n promise: Promise<SupportCenterResponse>;\r\n resolver: ((value: SupportCenterResponse) => void);\r\n resolveByTimeoutId: number;\r\n}\r\n\r\ninterface IFrameData {\r\n iframe: HTMLIFrameElement;\r\n isReady: boolean;\r\n isRemovedFromDOM: boolean;\r\n isDestroyed: boolean;\r\n}\r\n\r\nfunction isWidgetResponse(data: unknown): data is WidgetResponse {\r\n if (typeof data !== 'object') return false;\r\n return !!(data as WidgetResponse).iframeId &&\r\n !!(data as WidgetResponse).id &&\r\n !!(data as WidgetResponse).code;\r\n}\r\n\r\nfunction isSupportCenterEvent(data: unknown): data is SupportCenterEvent {\r\n if (typeof data !== 'object') return false;\r\n return !!(data as SupportCenterEvent).iframeId && !!(data as SupportCenterEvent).eventType;\r\n}\r\n\r\n/**\r\n * Команду с инициализацией отправит контейнер, дождавшись загрузки iframe-а\r\n *\r\n * Остальные команды будут складываться в очередь до тех пор, пока iframe не станет isReady = true\r\n */\r\nfunction canSendCommand(commandType: SupportCenterCommandType, data: IFrameData | undefined) {\r\n if (commandType === 'initialize') return true;\r\n if (!data) return false;\r\n\r\n return data.isReady && data.iframe.contentWindow;\r\n}\r\n\r\n/**\r\n * Синглтон для всех виджетов, присутствующих на странице\r\n */\r\nexport class PostMessageTransport implements IPostMessageTransport {\r\n constructor(iframeOrigin: string, supportCenterEventEmitter: SupportCenterEventEmitter) {\r\n if (window?.kontur?.Support?.__postMessageTransport &&\r\n window.kontur.Support.__postMessageTransport instanceof PostMessageTransport) {\r\n // eslint-disable-next-line no-constructor-return\r\n return window.kontur.Support.__postMessageTransport;\r\n }\r\n\r\n definePostMessageTransportInTheGlobalScope(this);\r\n this.iframeOrigin = iframeOrigin;\r\n\r\n /**\r\n * Инициализируем все сущности только при первом вызове конструктора\r\n */\r\n this.supportCenterEventEmitter = supportCenterEventEmitter;\r\n this.eventEmitters = new Map<string, EventEmitter<WidgetMessages>>();\r\n this.iframes = new Map<string, IFrameData>();\r\n this.commandsQueue = new Map<string, Set<SupportCenterCommand>>();\r\n this.commands = new Map<string, Map<string, PostMessageTransportCommandPromiseData>>();\r\n this.subscriptions = new Map<string, EventEmitter<SupportCenterSubscriptions>>();\r\n\r\n this.productLocation = {\r\n hostname: window.location.hostname,\r\n pathname: window.location.pathname,\r\n search: window.location.search,\r\n hash: window.location.hash,\r\n href: window.location.href,\r\n };\r\n\r\n window.addEventListener('message', this.onMessageHandler);\r\n window.addEventListener('resize', this.onResizeHandler);\r\n this.checkLocationIntervalId = window.setInterval(this.checkProductLocation, 2000);\r\n }\r\n\r\n private productLocation!: ProductLocation;\r\n\r\n private checkLocationIntervalId: number = 0;\r\n\r\n private readonly iframeOrigin: string = '';\r\n\r\n private readonly eventEmitters!: Map<string, EventEmitter<WidgetMessages>>;\r\n\r\n private readonly subscriptions!: Map<string, EventEmitter<SupportCenterSubscriptions>>;\r\n\r\n private iframes!: Map<string, IFrameData>;\r\n\r\n private commandsQueue!: Map<string, Set<SupportCenterCommand>>;\r\n\r\n private supportCenterEventEmitter!: SupportCenterEventEmitter;\r\n\r\n private previousResizeEventTime: number = 0;\r\n\r\n /**\r\n * Ключ - id iframe-а, в который было отправлено сообщение\r\n *\r\n * У внетреннего Map-а - id отправленной команды, чтобы по ней найти потом нужный промис и зарезолвить его\r\n */\r\n private commands!: Map<string, Map<string, PostMessageTransportCommandPromiseData>>;\r\n\r\n private emit<K extends keyof WidgetMessages>(iframeId: string, event: K, ...args: WidgetMessages[K]) {\r\n const eventEmitter = this.eventEmitters.get(iframeId);\r\n if (!eventEmitter) {\r\n console.log(`There is no eventEmitter for iframe: ${iframeId}`);\r\n return;\r\n }\r\n\r\n eventEmitter.emit(event, ...args);\r\n }\r\n\r\n private emitProductEvent(event: SupportCenterEvent) {\r\n const { iframeId, args, eventType } = event;\r\n const subscription = this.subscriptions.get(iframeId);\r\n if (!subscription) {\r\n console.log(`There is no subscription for iframe with id \"${iframeId}\"`);\r\n return;\r\n }\r\n\r\n try {\r\n subscription.emit(eventType, ...args);\r\n } catch (e) {\r\n //\r\n }\r\n }\r\n\r\n private onResizeHandler = () => {\r\n const now = Date.now();\r\n if (now - this.previousResizeEventTime < CHECK_WINDOW_RESIZE_TIMEOUT) return;\r\n\r\n this.previousResizeEventTime = now;\r\n this.supportCenterEventEmitter.emit('resizeWidget', {\r\n innerHeight: window.innerHeight,\r\n });\r\n };\r\n\r\n private onMessageHandler = (message: MessageEvent<unknown>) => {\r\n if (!message.data || typeof message.data !== 'string' || message.origin !== this.iframeOrigin) return;\r\n\r\n let parsedData: unknown;\r\n try {\r\n parsedData = JSON.parse(message.data);\r\n } catch (e) {\r\n console.log(`PostMessageTransport parsing error: content: ${message.data}`);\r\n }\r\n\r\n if (isWidgetResponse(parsedData)) {\r\n const data = this.getPostMessageTransportCommandPromise(parsedData.iframeId, parsedData.id);\r\n\r\n if (data?.resolveByTimeoutId) {\r\n window.clearTimeout(data.resolveByTimeoutId);\r\n }\r\n\r\n if (data?.resolver) {\r\n /**\r\n * Убираем служебную информацию из ответа\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { id, iframeId, ...rest } = parsedData;\r\n data.resolver(rest);\r\n }\r\n\r\n this.deletePostMessageTransportCommandPromise(parsedData.iframeId, parsedData.id);\r\n return;\r\n }\r\n\r\n if (isSupportCenterEvent(parsedData)) {\r\n this.emitProductEvent(parsedData);\r\n return;\r\n }\r\n\r\n if (isWidgetIsOpenedPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType);\r\n return;\r\n }\r\n\r\n if (isWidgetIsClosedPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType);\r\n return;\r\n }\r\n\r\n if (isWidgetGetOidcTokenInSupportCenterPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType);\r\n return;\r\n }\r\n\r\n if (isInitializeExternalFeedSdkPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType, parsedData.parameters);\r\n return;\r\n }\r\n\r\n if (isCloseWebSocketPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType, parsedData.parameters);\r\n return;\r\n }\r\n\r\n if (isSearchFeedMessagesPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType, parsedData.parameters);\r\n return;\r\n }\r\n\r\n if (isMarkFeedMessagesAsSeenPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType, parsedData.parameters);\r\n return;\r\n }\r\n\r\n if (isHideManagementNodesPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType);\r\n return;\r\n }\r\n\r\n if (isShowManagementNodesPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType);\r\n return;\r\n }\r\n\r\n if (isNewNotificationsCountPostMessage(parsedData)) {\r\n this.emit(parsedData.iframeId, parsedData.messageType, parsedData.count);\r\n return;\r\n }\r\n\r\n if (isNewContainerSettingsPostMessage(parsedData)) {\r\n this.emit(\r\n parsedData.iframeId,\r\n parsedData.messageType,\r\n parsedData.settings,\r\n parsedData.isWidgetOpened,\r\n );\r\n return;\r\n }\r\n\r\n /**\r\n * Далее идут события, которые не нужно передавать дальше\r\n */\r\n if (isChangeParentHashPostMessage(parsedData)) {\r\n window.location.hash = parsedData.hash;\r\n }\r\n };\r\n\r\n private checkProductLocation = () => {\r\n const productLocation: ProductLocation = {\r\n hostname: window.location.hostname,\r\n pathname: window.location.pathname,\r\n search: window.location.search,\r\n hash: window.location.hash,\r\n href: window.location.href,\r\n };\r\n\r\n if (this.productLocation.pathname !== productLocation.pathname ||\r\n this.productLocation.search !== productLocation.search || this.productLocation.hash !== productLocation.hash) {\r\n this.productLocation = productLocation;\r\n this.iframes.forEach((_, iframeId) => {\r\n this.sendInternalMessage(iframeId, { iframeId, messageType: 'newProductLocation', productLocation });\r\n });\r\n }\r\n };\r\n\r\n private saveNewPostMessageTransportCommandPromiseData(\r\n iframeId: string,\r\n commandId: string,\r\n data: PostMessageTransportCommandPromiseData,\r\n ) {\r\n let frameMap: Map<string, PostMessageTransportCommandPromiseData>;\r\n if (!this.commands.has(iframeId)) {\r\n frameMap = new Map<string, PostMessageTransportCommandPromiseData>();\r\n this.commands.set(iframeId, frameMap);\r\n } else {\r\n frameMap = this.commands.get(iframeId)!;\r\n }\r\n\r\n frameMap.set(commandId, data);\r\n }\r\n\r\n private getPostMessageTransportCommandPromise(\r\n iframeId: string,\r\n commandId: string,\r\n ): PostMessageTransportCommandPromiseData | undefined {\r\n const frameMap = this.commands.get(iframeId);\r\n if (!frameMap) return undefined;\r\n\r\n return frameMap.get(commandId);\r\n }\r\n\r\n private deletePostMessageTransportCommandPromise(\r\n iframeId: string,\r\n commandId: string,\r\n ): void {\r\n const frameMap = this.commands.get(iframeId);\r\n if (!frameMap) return;\r\n\r\n frameMap.delete(commandId);\r\n }\r\n\r\n private addCommandToQueue(command: SupportCenterCommand) {\r\n let queue: Set<SupportCenterCommand>;\r\n if (!this.commandsQueue.has(command.iframeId)) {\r\n queue = new Set<SupportCenterCommand>();\r\n this.commandsQueue.set(command.iframeId, queue);\r\n } else {\r\n queue = this.commandsQueue.get(command.iframeId)!;\r\n }\r\n\r\n queue.add(command);\r\n }\r\n\r\n private clearCommandDataByTimeout(command: SupportCenterCommand, timeout: number) {\r\n const queue = this.commandsQueue.get(command.iframeId);\r\n if (queue) {\r\n queue.delete(command);\r\n }\r\n\r\n const commandsPromiseData = this.commands.get(command.iframeId);\r\n if (commandsPromiseData) {\r\n const data = commandsPromiseData.get(command.id);\r\n if (data?.resolver) {\r\n data.resolver({\r\n code: 'timeout',\r\n context: {\r\n message: `Command \"${command.commandType}\" hasn't been executed after ${timeout} ms`,\r\n },\r\n });\r\n }\r\n if (data?.resolveByTimeoutId) {\r\n window.clearTimeout(data.resolveByTimeoutId);\r\n }\r\n\r\n commandsPromiseData.delete(command.id);\r\n }\r\n }\r\n\r\n public addIFrame(iframeId: string, iframe: HTMLIFrameElement): void {\r\n if (this.iframes.has(iframeId)) return;\r\n\r\n if (!this.iframes.size && !this.checkLocationIntervalId) {\r\n this.checkLocationIntervalId = window.setInterval(this.checkProductLocation, 2000);\r\n }\r\n\r\n this.iframes.set(iframeId, {\r\n iframe,\r\n isReady: false,\r\n isRemovedFromDOM: false,\r\n isDestroyed: false,\r\n });\r\n this.eventEmitters.set(iframeId, new EventEmitter<WidgetMessages>());\r\n }\r\n\r\n public async sendCommand<K extends SupportCenterCommandType>(\r\n command: SupportCenterCommandAndResponses[K]['command'],\r\n ): Promise<SupportCenterCommandAndResponses[K]['response']> {\r\n const data = this.iframes.get(command.iframeId);\r\n\r\n if (data?.isRemovedFromDOM) {\r\n return {\r\n code: 'iframeWasRemovedFromDOM',\r\n context: {\r\n message: `Iframe with id ${command.iframeId} was removed from the DOM`,\r\n },\r\n };\r\n }\r\n\r\n const promiseData: PostMessageTransportCommandPromiseData = {\r\n promise: new Promise<SupportCenterResponse>(() => {}),\r\n resolveByTimeoutId: 0,\r\n resolver: () => {},\r\n };\r\n promiseData.promise = new Promise<SupportCenterResponse>((res) => {\r\n promiseData.resolver = res;\r\n promiseData.resolveByTimeoutId = window.setTimeout(\r\n () => this.clearCommandDataByTimeout(command, AUTO_RESOLVE_PROMISE_TIMEOUT),\r\n AUTO_RESOLVE_PROMISE_TIMEOUT,\r\n );\r\n\r\n this.saveNewPostMessageTransportCommandPromiseData(\r\n command.iframeId,\r\n command.id,\r\n promiseData,\r\n );\r\n\r\n if (canSendCommand(command.commandType, data)) {\r\n data!.iframe.contentWindow!.postMessage(JSON.stringify(command), this.iframeOrigin);\r\n } else {\r\n this.addCommandToQueue(command);\r\n }\r\n });\r\n\r\n return promiseData.promise;\r\n }\r\n\r\n public sendInternalMessage(iframeId: string, message: PostMessageTransportInternalMessage) {\r\n const data = this.iframes.get(iframeId);\r\n if (!data?.iframe?.contentWindow || !data?.isReady) return;\r\n\r\n data.iframe.contentWindow.postMessage(JSON.stringify(message), this.iframeOrigin);\r\n }\r\n\r\n public markIFrameAsReady(iframeId: string) {\r\n const data = this.iframes.get(iframeId);\r\n if (!data || data.isReady || !data.iframe.contentWindow) return;\r\n\r\n data.isReady = true;\r\n const queue = this.commandsQueue.get(iframeId);\r\n if (queue) {\r\n queue.forEach((command) => {\r\n data.iframe.contentWindow!.postMessage(JSON.stringify(command), this.iframeOrigin);\r\n });\r\n\r\n queue.clear();\r\n }\r\n }\r\n\r\n public subscribe<K extends keyof WidgetMessages>(\r\n iframeId: string,\r\n event: K,\r\n handler: (...args: WidgetMessages[K]) => void,\r\n ) {\r\n const eventEmitter = this.eventEmitters.get(iframeId);\r\n if (!eventEmitter) return;\r\n\r\n eventEmitter.subscribe(event, handler);\r\n }\r\n\r\n public unsubscribe<K extends keyof WidgetMessages>(\r\n iframeId: string,\r\n event: K,\r\n handler: (...args: WidgetMessages[K]) => void,\r\n ) {\r\n const eventEmitter = this.eventEmitters.get(iframeId);\r\n if (!eventEmitter) return;\r\n\r\n eventEmitter.unsubscribe(event, handler);\r\n }\r\n\r\n public markIFrameAsRemovedFromDOM(iframeId: string) {\r\n const data = this.iframes.get(iframeId);\r\n if (!data) return;\r\n\r\n data.isRemovedFromDOM = true;\r\n }\r\n\r\n public subscribeProduct<K extends keyof SupportCenterSubscriptions>(\r\n iframeId: string,\r\n event: K,\r\n handler: (...args: SupportCenterSubscriptions[K]) => void,\r\n ): void {\r\n const subscription = this.subscriptions.get(iframeId);\r\n if (!subscription) return;\r\n\r\n subscription.subscribe(event, handler);\r\n }\r\n\r\n public unsubscribeProduct<K extends keyof SupportCenterSubscriptions>(\r\n iframeId: string,\r\n event: K,\r\n handler: (...args: SupportCenterSubscriptions[K]) => void,\r\n ): void {\r\n const subscription = this.subscriptions.get(iframeId);\r\n if (!subscription) return;\r\n\r\n subscription.unsubscribe(event, handler);\r\n }\r\n\r\n /**\r\n * Метод сам подчистит все подписки, которые создали ранее\r\n */\r\n public removeIFrame(iframeId: string): void {\r\n const commands = this.commands.get(iframeId);\r\n if (commands?.size) {\r\n commands.forEach((command) => {\r\n command.resolver({\r\n code: 'widgetHasBeenDestroyed',\r\n context: {\r\n message: 'Widget has been destroyed ealier',\r\n },\r\n });\r\n });\r\n\r\n commands.clear();\r\n }\r\n\r\n /**\r\n * Все ответы мы уже разослали, поэтому очередь команды можно чистить\r\n */\r\n const queue = this.commandsQueue.get(iframeId);\r\n if (queue) {\r\n queue.clear();\r\n }\r\n\r\n this.iframes.delete(iframeId);\r\n this.eventEmitters.delete(iframeId);\r\n\r\n const subscription = this.subscriptions.get(iframeId);\r\n if (subscription) {\r\n subscription.clear();\r\n }\r\n\r\n if (!this.iframes.size) {\r\n window.clearInterval(this.checkLocationIntervalId);\r\n this.checkLocationIntervalId = 0;\r\n }\r\n }\r\n\r\n public createSubscriptions(iframeId: string): void {\r\n this.subscriptions.set(iframeId, new EventEmitter<SupportCenterSubscriptions>());\r\n }\r\n}\r\n","import {\r\n WidgetIsClosedPostMessage,\r\n WidgetIsOpenedPostMessage,\r\n WidgetUpdateOidcTokenPostMessage,\r\n HideManagementNodesPostMessage,\r\n ShowManagementNodesPostMessage,\r\n NewContainerSettingsPostMessage,\r\n NewNotificationsCountPostMessage,\r\n CloseWebSocketPostMessage,\r\n InitializeExternalFeedSdkPostMessage,\r\n SearchFeedMessagesPostMessage,\r\n MarkFeedMessagesAsSeenPostMessage,\r\n ChangeParentHashPostMessage,\r\n} from '../types/postMessageTransport';\r\n\r\nexport function isWidgetIsOpenedPostMessage(data: unknown): data is WidgetIsOpenedPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return !!(data as WidgetIsOpenedPostMessage).iframeId &&\r\n (data as WidgetIsOpenedPostMessage).messageType === 'widgetIsOpened';\r\n}\r\n\r\nexport function isWidgetIsClosedPostMessage(data: unknown): data is WidgetIsClosedPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return !!(data as WidgetIsClosedPostMessage).iframeId &&\r\n (data as WidgetIsClosedPostMessage).messageType === 'widgetIsClosed';\r\n}\r\n\r\nexport function isWidgetGetOidcTokenInSupportCenterPostMessage(\r\n data: unknown,\r\n): data is WidgetUpdateOidcTokenPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return !!(data as WidgetUpdateOidcTokenPostMessage).iframeId &&\r\n (data as WidgetUpdateOidcTokenPostMessage).messageType === 'getOidcTokenInSupportCenter';\r\n}\r\n\r\nexport function isHideManagementNodesPostMessage(data: unknown): data is HideManagementNodesPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as HideManagementNodesPostMessage).messageType === 'hideManagementNodes';\r\n}\r\n\r\nexport function isShowManagementNodesPostMessage(data: unknown): data is ShowManagementNodesPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as ShowManagementNodesPostMessage).messageType === 'showManagementNodes';\r\n}\r\n\r\nexport function isNewContainerSettingsPostMessage(data: unknown): data is NewContainerSettingsPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as NewContainerSettingsPostMessage).messageType === 'newContainerSettings' &&\r\n !!(data as NewContainerSettingsPostMessage).settings &&\r\n typeof (data as NewContainerSettingsPostMessage).isWidgetOpened === 'boolean';\r\n}\r\n\r\nexport function isNewNotificationsCountPostMessage(data: unknown): data is NewNotificationsCountPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as NewNotificationsCountPostMessage).messageType === 'newNotificationsCount';\r\n}\r\n\r\nexport function isInitializeExternalFeedSdkPostMessage(data: unknown): data is InitializeExternalFeedSdkPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as InitializeExternalFeedSdkPostMessage).messageType === 'initializeExternalFeedSdk';\r\n}\r\n\r\nexport function isCloseWebSocketPostMessage(data: unknown): data is CloseWebSocketPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as CloseWebSocketPostMessage).messageType === 'closeWebSocket';\r\n}\r\n\r\nexport function isSearchFeedMessagesPostMessage(data: unknown): data is SearchFeedMessagesPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as SearchFeedMessagesPostMessage).messageType === 'searchFeedMessages';\r\n}\r\n\r\nexport function isMarkFeedMessagesAsSeenPostMessage(data: unknown): data is MarkFeedMessagesAsSeenPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as MarkFeedMessagesAsSeenPostMessage).messageType === 'markFeedMessagesAsSeen';\r\n}\r\n\r\nexport function isChangeParentHashPostMessage(data: unknown): data is ChangeParentHashPostMessage {\r\n if (typeof data !== 'object') return false;\r\n\r\n return (data as ChangeParentHashPostMessage).messageType === 'changeParentHash' &&\r\n !!(data as ChangeParentHashPostMessage).hash;\r\n}\r\n","import { nanoid } from 'nanoid';\r\nimport { WidgetContainer } from './widgetContainer';\r\nimport { defineSupportCenterInTheGlobalScope } from './utils/defineSupportCenterInTheGlobalScope';\r\nimport { ISupportCenter, SupportCenterContainerInfo } from './types/supportCenter';\r\nimport {\r\n ChangeIntegrationIdPayload,\r\n GetTopicAvailabilityCommand,\r\n GetTopicAvailabilityPayload,\r\n OpenCommand,\r\n OpenCommandPayload,\r\n SupportCenterParameters,\r\n} from './types/command';\r\nimport {\r\n CloseResponse,\r\n GetAdditionalParametersResponse,\r\n GetConditionResponse,\r\n GetRedefinedModulesFieldsResponse,\r\n GetTopicAvailabilityResponse,\r\n InitializeResponse,\r\n OpenResponse,\r\n SetAdditionalParametersResponse,\r\n SetConditionResponse,\r\n SetLanguageResponse,\r\n ManageRedefinedModulesFieldsResponse,\r\n UpdateAdditionalParametersResponse,\r\n HideButtonResponse,\r\n ShowButtonResponse,\r\n DestroyResponse,\r\n ChangeIntegrationIdResponse,\r\n} from './types/supportCenterResponse';\r\nimport { SupportCenterAdditionalParameters, SupportCenterLanguage } from './types/common';\r\nimport { IPostMessageTransport } from './types/postMessageTransport';\r\nimport { IFRAME_ORIGINS, IFRAME_PATHNAMES } from './constants/iframeSettings';\r\nimport { PostMessageTransport } from './postMessageTransport';\r\nimport { createIFrame } from './utils/createIFrame';\r\nimport { getSupportCenterEventEmitter } from './utils/getSupportCenterEventEmitter';\r\nimport { SupportCenterCondition, SupportCenterRedefinedModuleFields } from './types/support';\r\nimport { SupportCenterSubscriptions } from './types/subscriptions';\r\n\r\nconst DEFAULT_ALLOW = 'clipboard-read; clipboard-write; display-capture';\r\n\r\n/**\r\n * Класс \"Центр поддержки\"\r\n *\r\n * Используйте напрямую только если вам нужно зафиксировать версию загрузчика\r\n */\r\nexport class SupportCenter implements ISupportCenter {\r\n constructor(parameters: SupportCenterParameters) {\r\n const {\r\n environment,\r\n integrationId,\r\n allow,\r\n } = parameters;\r\n const iframeOrigin = IFRAME_ORIGINS[environment];\r\n\r\n if (!iframeOrigin) {\r\n throw new Error(`Support Center error: there is no widget url for the environment \"${environment}\"`);\r\n }\r\n\r\n if (!integrationId) {\r\n throw new Error(`Support Center error: integrationId can't be emtpy. Passed value: \"${integrationId}\"`);\r\n }\r\n\r\n this.iframeId = nanoid();\r\n const iframe = createIFrame(\r\n iframeOrigin,\r\n this.iframeId,\r\n IFRAME_PATHNAMES[parameters?.language || 'ru'],\r\n {\r\n border: 'none',\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: 'transparent',\r\n },\r\n allow || DEFAULT_ALLOW,\r\n );\r\n\r\n const supportCenterEventEmitter = getSupportCenterEventEmitter();\r\n this.postMessageTransport = new PostMessageTransport(iframeOrigin, supportCenterEventEmitter);\r\n /**\r\n * Хранилку для подписок создаем в конструкторе, чтобы дать возможность подписаться\r\n * до того, как виджет будет инициализирован\r\n */\r\n this.postMessageTransport.createSubscriptions(this.iframeId);\r\n\r\n this.widgetContainer = new WidgetContainer(\r\n this.postMessageTransport,\r\n this.iframeId,\r\n iframe,\r\n supportCenterEventEmitter,\r\n parameters,\r\n );\r\n }\r\n\r\n private readonly widgetContainer: WidgetContainer;\r\n\r\n private readonly postMessageTransport: IPostMessageTransport;\r\n\r\n private readonly iframeId: string;\r\n\r\n public async initialize(): Promise<InitializeResponse> {\r\n return this.widgetContainer.initialize();\r\n }\r\n\r\n public async open(payload?: OpenCommandPayload): Promise<OpenResponse> {\r\n const command: OpenCommand = {\r\n commandType: 'open',\r\n iframeId: this.iframeId,\r\n id: nanoid(),\r\n };\r\n if (payload) {\r\n command.payload = payload;\r\n }\r\n\r\n return this.postMessageTransport.sendCommand<'open'>(command);\r\n }\r\n\r\n public async close(): Promise<CloseResponse> {\r\n return this.postMessageTransport.sendCommand<'close'>({\r\n commandType: 'close',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n });\r\n }\r\n\r\n public async setAdditionalParameters(\r\n parameters: SupportCenterAdditionalParameters,\r\n ): Promise<SetAdditionalParametersResponse> {\r\n return this.postMessageTransport.sendCommand<'setAdditionalParameters'>({\r\n commandType: 'setAdditionalParameters',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n parameters,\r\n });\r\n }\r\n\r\n public async updateAdditionalParameters(\r\n parameters: SupportCenterAdditionalParameters,\r\n ): Promise<UpdateAdditionalParametersResponse> {\r\n return this.postMessageTransport.sendCommand<'updateAdditionalParameters'>({\r\n commandType: 'updateAdditionalParameters',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n parameters,\r\n });\r\n }\r\n\r\n public async getTopicAvailability(payload?: GetTopicAvailabilityPayload): Promise<GetTopicAvailabilityResponse> {\r\n const command: GetTopicAvailabilityCommand = {\r\n commandType: 'getTopicAvailability',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n };\r\n if (payload) {\r\n command.payload = payload;\r\n }\r\n\r\n return this.postMessageTransport.sendCommand<'getTopicAvailability'>(command);\r\n }\r\n\r\n public async getAdditionalParameters(): Promise<GetAdditionalParametersResponse> {\r\n return this.postMessageTransport.sendCommand<'getAdditionalParameters'>({\r\n commandType: 'getAdditionalParameters',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n });\r\n }\r\n\r\n public async setLanguage(language: SupportCenterLanguage): Promise<SetLanguageResponse> {\r\n return this.postMessageTransport.sendCommand<'setLanguage'>({\r\n commandType: 'setLanguage',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n language,\r\n });\r\n }\r\n\r\n public async getCondition(): Promise<GetConditionResponse> {\r\n return this.postMessageTransport.sendCommand<'getCondition'>({\r\n commandType: 'getCondition',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n });\r\n }\r\n\r\n public async setCondition(condition: SupportCenterCondition | null): Promise<SetConditionResponse> {\r\n return this.postMessageTransport.sendCommand<'setCondition'>({\r\n commandType: 'setCondition',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n condition,\r\n });\r\n }\r\n\r\n public async getRedefinedModulesFields(): Promise<GetRedefinedModulesFieldsResponse> {\r\n return this.postMessageTransport.sendCommand<'getRedefinedModulesFields'>({\r\n commandType: 'getRedefinedModulesFields',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n });\r\n }\r\n\r\n public async setRedefinedModulesFields(\r\n fields: SupportCenterRedefinedModuleFields[],\r\n ): Promise<ManageRedefinedModulesFieldsResponse> {\r\n return this.postMessageTransport.sendCommand<'setRedefinedModulesFields'>({\r\n commandType: 'setRedefinedModulesFields',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n fields,\r\n });\r\n }\r\n\r\n public async updateRedefinedModulesFields(\r\n fields: SupportCenterRedefinedModuleFields[],\r\n ): Promise<ManageRedefinedModulesFieldsResponse> {\r\n return this.postMessageTransport.sendCommand<'updateRedefinedModulesFields'>({\r\n commandType: 'updateRedefinedModulesFields',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n fields,\r\n });\r\n }\r\n\r\n public async hideButton(): Promise<HideButtonResponse> {\r\n return this.postMessageTransport.sendCommand<'hideButton'>({\r\n commandType: 'hideButton',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n });\r\n }\r\n\r\n public async showButton(): Promise<ShowButtonResponse> {\r\n return this.postMessageTransport.sendCommand<'showButton'>({\r\n commandType: 'showButton',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n });\r\n }\r\n\r\n public getContainerInfo(): SupportCenterContainerInfo {\r\n return this.widgetContainer.getContainerInfo();\r\n }\r\n\r\n public async destroy(): Promise<DestroyResponse> {\r\n return this.widgetContainer.destroy();\r\n }\r\n\r\n public subscribe<K extends keyof SupportCenterSubscriptions>(\r\n event: K,\r\n handler: (...args: SupportCenterSubscriptions[K]) => void,\r\n ): void {\r\n this.postMessageTransport.subscribeProduct(this.iframeId, event, handler);\r\n }\r\n\r\n public unsubscribe<K extends keyof SupportCenterSubscriptions>(\r\n event: K,\r\n handler: (...args: SupportCenterSubscriptions[K]) => void,\r\n ): void {\r\n this.postMessageTransport.unsubscribeProduct(this.iframeId, event, handler);\r\n }\r\n\r\n public async changeIntegrationId(payload: ChangeIntegrationIdPayload): Promise<ChangeIntegrationIdResponse> {\r\n return this.postMessageTransport.sendCommand<'changeIntegrationId'>({\r\n commandType: 'changeIntegrationId',\r\n id: nanoid(),\r\n iframeId: this.iframeId,\r\n payload,\r\n });\r\n }\r\n\r\n public setTemporaryZIndex(zIndex: number): void {\r\n this.widgetContainer.setTemporaryZIndex(zIndex);\r\n }\r\n\r\n public resetTemporaryZIndex(): void {\r\n this.widgetContainer.resetTemporaryZIndex();\r\n }\r\n}\r\n\r\ndefineSupportCenterInTheGlobalScope(SupportCenter);\r\n","type IframePossibleStyleProperty = Extract<\r\n keyof CSSStyleDeclaration,\r\n 'border' | 'width' | 'height' | 'backgroundColor'\r\n>;\r\n\r\ntype IFrameStyles = Pick<CSSStyleDeclaration, IframePossibleStyleProperty>;\r\n\r\nexport function createIFrame(\r\n origin: string,\r\n iframeId: string,\r\n pathName: string,\r\n styles: IFrameStyles,\r\n allow: string,\r\n): HTMLIFrameElement {\r\n const iframe = document.createElement('iframe');\r\n iframe.src = `${origin}${pathName}`;\r\n\r\n iframe.setAttribute('id', iframeId);\r\n iframe.setAttribute('allow', allow);\r\n\r\n (Object.keys(styles) as IframePossibleStyleProperty[]).forEach((key) => {\r\n iframe.style[key] = styles[key];\r\n });\r\n\r\n return iframe;\r\n}\r\n","import { SupportCenterEventEmitter, SupportCenterEvents } from '../types/supportCenterEventEmitter';\r\nimport { EventEmitter } from './eventEmitter';\r\n\r\n/**\r\n * Создает синглтон eventEmitter, который будет оповещать все виджеты о том,\r\n * что им нужно обновить z-index (и о других событиях, если они появятся)\r\n */\r\nexport function getSupportCenterEventEmitter(): SupportCenterEventEmitter {\r\n if (window?.kontur?.Support?.__supportCenterEventEmitter &&\r\n window.kontur.Support.__supportCenterEventEmitter instanceof EventEmitter) {\r\n return window.kontur.Support.__supportCenterEventEmitter;\r\n }\r\n\r\n const eventEmitter: SupportCenterEventEmitter = new EventEmitter<SupportCenterEvents>();\r\n window.kontur = window.kontur || {};\r\n window.kontur.Support = window.kontur.Support || {};\r\n window.kontur.Support.__supportCenterEventEmitter = eventEmitter;\r\n\r\n return eventEmitter;\r\n}\r\n","import { SupportCenter } from '../supportCenter';\r\nimport { SupportCenterParameters } from '../types/command';\r\n\r\nexport function defineSupportCenterInTheGlobalScope(\r\n supportCenter: new(parameters: SupportCenterParameters) => SupportCenter,\r\n) {\r\n if (window?.kontur?.Support?.SupportCenter && typeof window.kontur.Support.SupportCenter === 'function') return;\r\n\r\n window.kontur = window.kontur || {};\r\n window.kontur.Support = window.kontur.Support || {};\r\n window.kontur.Support.SupportCenter = supportCenter;\r\n}\r\n","import { KonturColors } from '@skbkontur/colors';\nimport { SupportCenter } from '@skbkontur/support-center';\n\nimport { SC_INTEGRATION_ID } from './constants';\nimport { Environment } from './types';\nimport { detectEnvironment } from './urls';\n\nconst scEnv =\n detectEnvironment() === Environment.PRODUCTION ? 'production' : 'staging';\n\nexport const supportCenter = new SupportCenter({\n integrationId: SC_INTEGRATION_ID,\n environment: scEnv,\n redefinedModulesFields: [\n {\n _type: 'appearance',\n values: {\n pallet: {\n primary: {\n background: KonturColors.primaryDefault,\n text: KonturColors.grayscaleWhiteFFF,\n },\n accent: {\n background: KonturColors.red0Logo,\n text: KonturColors.grayscaleWhiteFFF,\n },\n },\n button: {\n margin: { bottom: 20, right: 20 },\n visible: true,\n zIndex: 19000,\n },\n },\n },\n ],\n});\n\n/** Метод инициализирует виджет Центра поддержки. */\nexport const initialize = async (): Promise<void> => {\n try {\n await supportCenter.initialize();\n } catch (err) {\n const error = new Error(`Can't initialize supportCenter: ${err}`);\n // eslint-disable-next-line no-console\n console.log(error.message);\n }\n};\n","import { SupportCenter } from '@skbkontur/support-center';\nimport { createContext, FC, ReactNode } from 'react';\nimport { default as Typograf } from 'typograf';\n\nimport Api from '../utils/api';\nimport { Tracker } from '../utils/metrics/tracker';\nimport Storage from '../utils/storage';\nimport LocalStorage from '../utils/storage/localStorage';\nimport SessionStorage from '../utils/storage/sessionStorage';\nimport { initialize, supportCenter } from '../utils/supportCenter';\n\nexport interface ServiceContext {\n api: Api;\n localStorage: LocalStorage;\n sessionStorage: SessionStorage;\n supportCenter: SupportCenter;\n tp: Typograf;\n tracker: Tracker;\n}\n\nexport const ServiceCtx = createContext<ServiceContext>(\n null as unknown as ServiceContext\n);\n\ninterface Props {\n children: ReactNode;\n}\n\n/** Компонент оборачивает потомков в ServiceContext.Provider. */\nexport const ServiceContext: FC<Props> = ({ children }) => {\n // апишка для работы с бэкендом\n const api = new Api();\n // классы для работы с хранилищами браузера\n const storage = new Storage();\n const localStorage = storage.localStorage;\n const sessionStorage = storage.sessionStorage;\n\n // инициализируем Центр поддержки\n initialize();\n // Создаем экземпляр трекера\n const tracker = new Tracker();\n // подключаем типограф KID-286\n const tp = new Typograf({ locale: ['ru'] });\n // отключаем удаление пробелов и перенос строк в конце текста\n tp.disableRule('common/space/trimRight');\n\n return (\n <ServiceCtx.Provider\n value={{ api, localStorage, sessionStorage, supportCenter, tp, tracker }}\n >\n {children}\n </ServiceCtx.Provider>\n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"block\":\"Block_block__K5Bzg\"};","import cn from 'classnames';\nimport { FC, ReactNode } from 'react';\n\nimport styles from './Block.module.css';\n\ninterface Props {\n children: ReactNode;\n className?: string;\n}\n\nexport const Block: FC<Props> = ({ className = {}, children }) => {\n const style = cn(styles.block, className);\n return <main className={style}>{children}</main>;\n};\n","import { Button } from '@skbkontur/react-ui';\nimport { FC, ReactNode } from 'react';\n\ninterface Props {\n children: ReactNode;\n loading?: boolean;\n onClick: () => void;\n}\n\nexport const DefaultButton: FC<Props> = ({ children, onClick, loading }) => {\n return (\n <Button size='medium' onClick={onClick} loading={loading} width={164}>\n {children}\n </Button>\n );\n};\n","import { Button } from '@skbkontur/react-ui';\nimport { FC, ReactNode, useState } from 'react';\n\nimport { processError } from '../../utils/common';\n\ninterface Props {\n children: ReactNode;\n onClick: () => void | Promise<void>;\n}\n\nexport const RedButton: FC<Props> = ({ children, onClick }) => {\n const [loader, setLoader] = useState(false);\n\n const clickHandler = async () => {\n try {\n setLoader(true);\n await onClick();\n } catch (e) {\n processError(e);\n } finally {\n setLoader(false);\n }\n };\n\n return (\n <Button\n size='medium'\n use='danger'\n onClick={clickHandler}\n width={164}\n loading={loader}\n >\n {children}\n </Button>\n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"modal\":\"CustomModal_modal__VFaB3\",\"modalHeader\":\"CustomModal_modalHeader__4IloT\",\"content\":\"CustomModal_content__tbZIv\"};","import { Modal } from '@skbkontur/react-ui';\nimport { FC, ReactNode, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport styles from './CustomModal.module.css';\n\nexport interface CustomModalProps {\n caption?: string;\n content?: string;\n footer?: ReactNode;\n icon?: ReactNode;\n}\n\nexport const CustomModal: FC<CustomModalProps> = ({\n icon,\n caption,\n content,\n footer,\n}) => {\n const { tp } = useContext<ServiceContext>(ServiceCtx);\n return (\n <Modal width={400} noClose>\n <Modal.Body className={styles.modal}>\n <header className={styles.modalHeader}>\n {icon}\n {caption && <h3>{tp.execute(caption)}</h3>}\n </header>\n {content && <div className={styles.content}>{tp.execute(content)}</div>}\n <footer>{footer}</footer>\n </Modal.Body>\n </Modal>\n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"loaderPadding\":\"GlobalLoader_loaderPadding__dC8-n\"};","import { Center, Spinner } from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport styles from './GlobalLoader.module.css';\n\nexport const IGlobalLoader: FC<{ className?: string }> = ({ className }) => {\n const { tp } = useContext<ServiceContext>(ServiceCtx);\n return (\n <Center align='center' className={cn(styles.loaderPadding, className)}>\n <Spinner caption={tp.execute('Подождите, пожалуйста...')} type='big' />\n </Center>\n );\n};\n","export default (): string =>\n Math.random()\n .toString(36)\n .substring(6)\n","import * as React from 'react'\n\nimport uid from '../shared/uid'\nimport { IContentLoaderProps } from './'\n\nconst SVG: React.FC<IContentLoaderProps> = ({\n animate,\n animateBegin,\n backgroundColor,\n backgroundOpacity,\n baseUrl,\n children,\n foregroundColor,\n foregroundOpacity,\n gradientRatio,\n gradientDirection,\n uniqueKey,\n interval,\n rtl,\n speed,\n style,\n title,\n beforeMask,\n ...props\n}) => {\n const fixedId = uniqueKey || uid()\n const idClip = `${fixedId}-diff`\n const idGradient = `${fixedId}-animated-diff`\n const idAria = `${fixedId}-aria`\n\n const rtlStyle = rtl ? { transform: 'scaleX(-1)' } : null\n const keyTimes = `0; ${interval}; 1`\n const dur = `${speed}s`\n const gradientTransform =\n gradientDirection === 'top-bottom' ? 'rotate(90)' : undefined\n\n return (\n <svg\n aria-labelledby={idAria}\n role=\"img\"\n style={{ ...style, ...rtlStyle }}\n {...props}\n >\n {title ? <title id={idAria}>{title} : null}\n {beforeMask && React.isValidElement(beforeMask) ? beforeMask : null}\n \n\n \n {children}\n\n \n \n {animate && (\n \n )}\n \n\n \n {animate && (\n \n )}\n \n\n \n {animate && (\n \n )}\n \n \n \n \n )\n}\n\nSVG.defaultProps = {\n animate: true,\n backgroundColor: '#f5f6f7',\n backgroundOpacity: 1,\n baseUrl: '',\n foregroundColor: '#eee',\n foregroundOpacity: 1,\n gradientRatio: 2,\n gradientDirection: 'left-right',\n id: null,\n interval: 0.25,\n rtl: false,\n speed: 1.2,\n style: {},\n title: 'Loading...',\n beforeMask: null,\n}\n\nexport default SVG\n","import * as React from 'react'\n\nimport { Facebook, IContentLoaderProps } from '.'\nimport Svg from './Svg'\n\nconst ContentLoader: React.FC = props =>\n props.children ? : \n\nexport default ContentLoader\n","import * as React from 'react'\n\nimport { IContentLoaderProps } from '..'\nimport ContentLoader from '../ContentLoader'\n\nconst ReactContentLoaderFacebook: React.FC = props => (\n \n \n \n \n \n \n \n \n)\n\nexport default ReactContentLoaderFacebook\n","// extracted by mini-css-extract-plugin\nexport default {\"loaderWrapper\":\"ListSkeleton_loaderWrapper__XLt31\"};","import { KonturColors } from '@skbkontur/colors';\nimport { FC } from 'react';\nimport ContentLoader from 'react-content-loader';\n\nimport { ScrollToTopOnMount } from '../../utils/hooks';\nimport styles from './ListSkeleton.module.css';\n\nexport const ListSkeleton: FC = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"stickyWrap\":\"Table_stickyWrap__LGirM\",\"tableHeader\":\"Table_tableHeader__nCKRC\"};","import { Sticky } from '@skbkontur/react-ui';\nimport { FC, HTMLProps, ReactNode, useMemo } from 'react';\n\nimport { ListSkeleton } from '../ListSkeleton/ListSkeleton';\nimport styles from './Table.module.css';\n\nexport interface HeaderItem {\n colspan?: number;\n data: ReactNode;\n id: string;\n}\ninterface Props extends HTMLProps {\n filtersResult?: ReactNode;\n header?: Readonly;\n loader: boolean;\n rowsMap: ReactNode;\n stickiedHeader?: { enable: boolean; offset?: number };\n tableStyle: string;\n}\n\nexport const Table: FC = ({\n rowsMap,\n tableStyle,\n loader,\n header = null,\n filtersResult = null,\n stickiedHeader,\n}) => {\n const tableHead = useMemo(\n () =>\n header ? (\n \n \n {header.map((el) => (\n \n {el.data}\n \n ))}\n \n {filtersResult}\n \n ) : null,\n [header]\n );\n\n return (\n \n {stickiedHeader?.enable && header ? (\n \n {tableHead}\n \n ) : (\n tableHead\n )}\n {loader ? : {rowsMap}}\n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"question\":\"Question_question__okbaa\",\"tooltipText\":\"Question_tooltipText__j0eNh\"};","import { QuestionCircleIcon16Regular } from '@skbkontur/icons/QuestionCircleIcon16Regular';\nimport { PopupPositionsType, Tooltip, TooltipProps } from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport { FC, ReactNode } from 'react';\n\nimport styles from './Question.module.css';\n\ninterface Props extends TooltipProps {\n iconStyle?: string;\n pos?: PopupPositionsType;\n textStyle?: string;\n tooltipText: ReactNode;\n track?: () => void;\n}\n/**\n * Компонент рендерит иконку вопроса, по наведению на которую появляется тултип\n * с информацией.\n */\nexport const Question: FC = ({\n tooltipText,\n pos = 'right middle',\n iconStyle,\n textStyle = styles.tooltipText,\n track,\n}) => (\n
    {tooltipText}
    }\n pos={pos}\n onOpen={track}\n >\n \n \n);\n","// extracted by mini-css-extract-plugin\nexport default {\"adminForm\":\"AdminModal_adminForm__SLka7\",\"lbl\":\"AdminModal_lbl__M30SC\",\"formElement\":\"AdminModal_formElement__8YK5v\",\"modalFooter\":\"AdminModal_modalFooter__mC8R3\",\"adminModalWidth\":\"AdminModal_adminModalWidth__8ZR0N\"};","import { Button, Gapped, Input, Modal, Select } from '@skbkontur/react-ui';\nimport {\n ValidationContainer,\n ValidationInfo,\n ValidationWrapper,\n} from '@skbkontur/react-ui-validations';\nimport { FC, FormEvent, useContext, useEffect, useRef, useState } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport {\n ADMIN_DESCRIPTION,\n SUPERADMIN_DESCRIPTION,\n} from '../../utils/constants';\nimport { PermissionLevels } from '../../utils/permissions';\nimport { Null } from '../../utils/types';\nimport { renderTextValidationMessage } from '../../utils/validationErrors';\nimport { Question } from '../Question/Question';\nimport styles from './AdminModal.module.css';\n\ninterface IVariant {\n title: string;\n value: PermissionLevels;\n}\nexport interface AdminModalProps {\n actionButtonText: string;\n email: string;\n isSuperAdmin?: boolean;\n loader?: boolean;\n modalHeader: string;\n modalText?: string;\n onAction: (flag: boolean) => Promise;\n onCancel: () => void;\n onClose: () => void;\n onEmailChange?: (value: string) => void;\n validationInfo?: Null;\n}\n\nexport const AdminModal: FC = ({\n email,\n onAction,\n modalHeader,\n actionButtonText,\n onCancel,\n onClose,\n isSuperAdmin = false,\n validationInfo,\n onEmailChange,\n modalText = '',\n loader,\n}) => {\n const { tp } = useContext(ServiceCtx);\n\n const selectItems = [\n {\n value: PermissionLevels.Admin,\n title: 'Администратор',\n },\n {\n value: PermissionLevels.Superadmin,\n title: 'Суперадминистратор',\n },\n ];\n\n const getInitialRole = () =>\n selectItems.find(({ value }) =>\n isSuperAdmin\n ? value === PermissionLevels.Superadmin\n : value === PermissionLevels.Admin\n ) || selectItems[0];\n\n const [role, setRole] = useState(getInitialRole());\n\n const emailRef = useRef(null);\n useEffect(() => {\n emailRef.current?.focus();\n }, []);\n\n useEffect(() => {\n if (validationInfo) {\n emailRef.current?.focus();\n }\n }, [validationInfo]);\n\n const onSubmit = async (event: FormEvent) => {\n event.preventDefault();\n const flag = role.value === PermissionLevels.Superadmin;\n await onAction(flag);\n };\n\n return (\n \n {tp.execute(modalHeader)}\n \n \n \n

    {tp.execute(modalText)}

    \n \n \n \n \n \n \n \n \n \n items={selectItems}\n value={role}\n placeholder='Выберите роль'\n onValueChange={setRole}\n renderItem={({ title }) => title}\n renderValue={({ title }) => title}\n width='100%'\n size='medium'\n />\n \n \n \n {actionButtonText}\n \n \n \n \n
    \n
    \n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"roleCell\":\"AdminRoleCell_roleCell__PKXnW\",\"tooltipWidthStyle\":\"AdminRoleCell_tooltipWidthStyle__FG8o8\"};","import { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport {\n ADMIN_DESCRIPTION,\n SUPERADMIN_DESCRIPTION,\n} from '../../utils/constants';\nimport { Question } from '../Question/Question';\nimport styles from './AdminRoleCell.module.css';\n\ninterface Props {\n className?: string;\n flag: boolean;\n}\n\nexport const AdminRoleCell: FC = ({ flag, className }) => {\n const { tp } = useContext(ServiceCtx);\n return (\n \n {flag ? 'Да' : 'Нет'}\n \n \n );\n};\n","import { globalObject } from '@skbkontur/global-object';\nimport { getClosestFocusableElement } from \"../../dom/tabbableHelpers\";\nimport { isIE11, isEdge } from \"../../client\";\nimport { isInstanceOf } from \"../../isInstanceOf\";\nexport var fixClickFocusIE = function fixClickFocusIE(e) {\n if (isIE11 || isEdge) {\n // workaround for the IE/Edge focus bug\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14306303/\n if (globalObject.document && globalObject.document.activeElement !== e.target) {\n if (isInstanceOf(e.target, globalObject.HTMLElement)) {\n var closestFocusable = getClosestFocusableElement(e.target);\n\n if (closestFocusable) {\n closestFocusable.focus();\n }\n }\n }\n }\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport debounce from 'lodash.debounce';\nimport isEqual from 'lodash.isequal';\nimport { globalObject } from '@skbkontur/global-object';\nimport { isNonNullable } from \"../../../lib/utils\";\nimport { isKeyArrowUp, isKeyArrowVertical, isKeyEnter, isKeyEscape } from \"../../../lib/events/keyboard/identifiers\";\nimport * as LayoutEvents from \"../../../lib/LayoutEvents\";\nimport { DefaultState } from \"../CustomComboBox\";\nimport { ComboBoxRequestStatus } from \"../CustomComboBoxTypes\";\nvar DEBOUNCE_DELAY = 300;\n\nvar getValueString = function getValueString(value, valueToString) {\n return isNonNullable(value) ? valueToString(value) : '';\n};\n\nexport var Effect = {\n search: function search(query) {\n return function (dispatch, getState, getProps, getInstance) {\n getInstance().search(query);\n };\n },\n debouncedSearch: debounce(function (dispatch, getState, getProps, getInstance) {\n var searchEffect = Effect.search(getState().textValue);\n searchEffect(dispatch, getState, getProps, getInstance);\n }, DEBOUNCE_DELAY),\n cancelRequest: function cancelRequest(dispatch, getState, getProps, getInstance) {\n Effect.debouncedSearch.cancel();\n getInstance().cancelSearch();\n },\n blur: function blur(dispatch, getState, getProps) {\n var _getProps = getProps(),\n onBlur = _getProps.onBlur;\n\n if (onBlur) {\n onBlur();\n }\n },\n focus: function focus(dispatch, getState, getProps) {\n var _getProps2 = getProps(),\n onFocus = _getProps2.onFocus;\n\n if (onFocus) {\n onFocus();\n }\n },\n valueChange: function valueChange(value) {\n return function (dispatch, getState, getProps) {\n var _getProps3 = getProps(),\n onValueChange = _getProps3.onValueChange;\n\n if (onValueChange) {\n onValueChange(value);\n }\n };\n },\n unexpectedInput: function unexpectedInput(textValue, items) {\n return function (dispatch, getState, getProps) {\n var _getProps4 = getProps(),\n onUnexpectedInput = _getProps4.onUnexpectedInput,\n valueToString = _getProps4.valueToString;\n\n if (Array.isArray(items) && items.length === 1) {\n var singleItem = items[0];\n var valueContent = getValueString(singleItem, valueToString);\n\n if (valueContent === textValue) {\n dispatch({\n type: 'ValueChange',\n value: singleItem,\n keepFocus: false\n });\n return;\n }\n }\n\n if (onUnexpectedInput) {\n var _value = onUnexpectedInput(textValue);\n\n if (_value !== undefined) {\n dispatch({\n type: 'ValueChange',\n value: _value,\n keepFocus: false\n });\n }\n }\n };\n },\n inputChange: function inputChange(dispatch, getState, getProps) {\n var _getProps5 = getProps(),\n onInputValueChange = _getProps5.onInputValueChange;\n\n var _getState = getState(),\n textValue = _getState.textValue;\n\n if (onInputValueChange) {\n var returnedValue = onInputValueChange(textValue);\n\n if (typeof returnedValue === 'string' && returnedValue !== textValue) {\n dispatch({\n type: 'TextChange',\n value: returnedValue\n });\n }\n }\n },\n inputFocus: function inputFocus(dispatch, getState, getProps, getInstance) {\n var _getInstance = getInstance(),\n input = _getInstance.input;\n\n if (!input) {\n return;\n }\n\n input.focus();\n },\n highlightMenuItem: function highlightMenuItem(dispatch, getState, getProps, getInstance) {\n var _getProps6 = getProps(),\n value = _getProps6.value,\n itemToValue = _getProps6.itemToValue,\n valueToString = _getProps6.valueToString;\n\n var _getState2 = getState(),\n items = _getState2.items,\n focused = _getState2.focused,\n textValue = _getState2.textValue,\n requestStatus = _getState2.requestStatus;\n\n var _getInstance2 = getInstance(),\n menu = _getInstance2.menu;\n\n var valueString = getValueString(value, valueToString);\n\n if (!menu) {\n return;\n }\n\n if (!focused) {\n return;\n }\n\n var index = -1;\n\n if (items && items.length && isNonNullable(value)) {\n index = items.findIndex(function (x) {\n return itemToValue(x) === itemToValue(value);\n });\n }\n\n menu.highlightItem(index);\n\n if (index >= 0) {\n // @ts-expect-error: Use of private property.\n globalObject.requestAnimationFrame == null ? void 0 : globalObject.requestAnimationFrame(function () {\n return menu && menu.scrollToSelected();\n });\n return;\n }\n\n if (textValue !== valueString || requestStatus === ComboBoxRequestStatus.Failed) {\n globalObject.requestAnimationFrame == null ? void 0 : globalObject.requestAnimationFrame(function () {\n return menu && menu.down();\n });\n }\n },\n selectMenuItem: function selectMenuItem(event) {\n return function (dispatch, getState, getProps, getInstance) {\n var _getInstance3 = getInstance(),\n menu = _getInstance3.menu;\n\n if (menu) {\n menu.enter(event);\n }\n };\n },\n moveMenuHighlight: function moveMenuHighlight(direction) {\n return function (dispatch, getState, getProps, getInstance) {\n var _getInstance4 = getInstance(),\n menu = _getInstance4.menu;\n\n if (menu) {\n menu[direction]();\n }\n };\n },\n resetHighlightedMenuItem: function resetHighlightedMenuItem(dispatch, getState, getProps, getInstance) {\n var combobox = getInstance();\n\n if (combobox.menu && combobox.menu.hasHighlightedItem()) {\n combobox.menu.reset();\n }\n },\n reflow: function reflow() {\n LayoutEvents.emit();\n },\n selectInputText: function selectInputText(dispatch, getState, getProps, getInstance) {\n var combobox = getInstance();\n combobox.selectInputText();\n },\n inputKeyDown: function inputKeyDown(event) {\n return function (dispatch, getState, getProps) {\n var _getProps7 = getProps(),\n onInputKeyDown = _getProps7.onInputKeyDown;\n\n if (onInputKeyDown) {\n onInputKeyDown(event);\n }\n };\n }\n};\n\nvar never = function never() {\n return null;\n};\n\nexport function reducer(state, props, action) {\n switch (action.type) {\n case 'ValueChange':\n {\n var _value2 = action.value,\n keepFocus = action.keepFocus;\n\n var _textValue = getValueString(_value2, props.valueToString);\n\n if (keepFocus) {\n return [{\n opened: false,\n inputChanged: false,\n editing: true,\n items: null,\n textValue: _textValue\n }, [Effect.valueChange(_value2), Effect.cancelRequest, Effect.inputFocus]];\n }\n\n return [{\n opened: false,\n inputChanged: false,\n editing: false,\n items: null,\n textValue: _textValue\n }, [Effect.valueChange(_value2), Effect.cancelRequest]];\n }\n\n case 'TextChange':\n {\n var newState = {\n inputChanged: true,\n textValue: action.value\n };\n\n if (!action.value && !props.searchOnFocus) {\n return [_extends({}, newState, {\n opened: false,\n items: null\n }), [Effect.inputChange]];\n }\n\n return [newState, [Effect.debouncedSearch, Effect.inputChange]];\n }\n\n case 'KeyPress':\n {\n var e = action.event;\n var effects = [];\n var nextState = state;\n\n switch (true) {\n case isKeyEnter(e):\n if (!state.opened) {\n break;\n }\n\n e.preventDefault();\n effects.push(Effect.selectMenuItem(e));\n break;\n\n case isKeyArrowVertical(e):\n e.preventDefault();\n effects.push(Effect.moveMenuHighlight(isKeyArrowUp(e) ? 'up' : 'down'));\n\n if (!state.opened) {\n effects.push(Effect.search(state.textValue));\n }\n\n break;\n\n case isKeyEscape(e):\n nextState = _extends({}, state, {\n items: null,\n opened: false\n });\n break;\n }\n\n return [nextState, [].concat(effects, [Effect.inputKeyDown(e)])];\n }\n\n case 'DidUpdate':\n {\n if (isEqual(props.value, action.prevProps.value)) {\n return state;\n }\n\n if (action.fixValueChange) {\n var nextTextValue = getValueString(props.value, props.valueToString);\n\n if (!state.focused) {\n return [{\n editing: false,\n inputChanged: false,\n textValue: nextTextValue\n }, [Effect.cancelRequest]];\n }\n\n if (state.focused && state.opened) {\n return [_extends({}, state, {\n textValue: nextTextValue\n }), [Effect.cancelRequest, Effect.search(nextTextValue)]];\n }\n\n if (state.focused) {\n return _extends({}, state, {\n textValue: nextTextValue\n });\n }\n }\n\n return {\n opened: false,\n textValue: state.editing ? state.textValue : getValueString(props.value, props.valueToString)\n };\n }\n\n case 'Mount':\n {\n return {\n textValue: getValueString(props.value, props.valueToString)\n };\n }\n\n case 'Focus':\n {\n var _newState = {\n focused: true,\n editing: true\n };\n\n if (!props.searchOnFocus) {\n return [_newState, [Effect.focus]];\n }\n\n if (state.editing) {\n return [_newState, [Effect.search(state.textValue), Effect.focus]];\n }\n\n return [_newState, [Effect.search(''), Effect.focus, Effect.selectInputText]];\n }\n\n case 'InputClick':\n {\n var _newState2 = {\n inputChanged: false\n };\n\n if (!state.opened && props.searchOnFocus) {\n return [_newState2, [Effect.search('')]];\n }\n\n return state;\n }\n\n case 'Blur':\n {\n var inputChanged = state.inputChanged,\n _items = state.items;\n\n if (!inputChanged) {\n return [{\n focused: false,\n opened: false,\n items: null,\n editing: false\n }, [Effect.blur, Effect.cancelRequest]];\n }\n\n return [{\n focused: false,\n opened: false,\n items: null\n }, [Effect.blur, Effect.cancelRequest, Effect.unexpectedInput(state.textValue, _items)]];\n }\n\n case 'Reset':\n {\n return DefaultState;\n }\n\n case 'Open':\n {\n return {\n opened: true\n };\n }\n\n case 'Close':\n {\n return {\n opened: false,\n items: null\n };\n }\n\n case 'Search':\n {\n return [state, [Effect.search(action.query)]];\n }\n\n case 'RequestItems':\n {\n return {\n loading: true,\n opened: true,\n requestStatus: ComboBoxRequestStatus.Pending\n };\n }\n\n case 'ReceiveItems':\n {\n var shouldResetMenuHighlight = state.textValue === '';\n return [{\n loading: false,\n opened: true,\n items: action.items,\n requestStatus: ComboBoxRequestStatus.Success\n }, [shouldResetMenuHighlight ? Effect.resetHighlightedMenuItem : Effect.highlightMenuItem, Effect.reflow]];\n }\n\n case 'RequestFailure':\n {\n return [{\n loading: false,\n opened: true,\n items: null,\n requestStatus: ComboBoxRequestStatus.Failed,\n repeatRequest: action.repeatRequest\n }, [Effect.highlightMenuItem]];\n }\n\n case 'CancelRequest':\n {\n return {\n loading: false,\n requestStatus: ComboBoxRequestStatus.Unknown\n };\n }\n\n default:\n {\n never();\n }\n }\n\n return state;\n}","import _taggedTemplateLiteralLoose from \"@babel/runtime/helpers/esm/taggedTemplateLiteralLoose\";\n\nvar _templateObject, _templateObject2, _templateObject3;\n\nimport { css, memoizeStyle } from \"../../../lib/theming/Emotion\";\nexport var styles = memoizeStyle({\n root: function root() {\n return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"\\n display: inline-block;\\n position: relative;\\n line-height: normal;\\n \"])));\n },\n spinnerWrapper: function spinnerWrapper() {\n return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose([\"\\n display: inline-block;\\n margin-right: -5px;\\n \"])));\n },\n rightIconWrapper: function rightIconWrapper() {\n return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose([\"\\n display: inline-block;\\n margin-right: -3px;\\n \"])));\n }\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n\nvar _class, _class2, _temp;\n\nimport React from 'react';\nimport { getRandomID, isNonNullable } from \"../../../lib/utils\";\nimport { DropdownContainer } from \"../../DropdownContainer\";\nimport { Input } from \"../../../components/Input\";\nimport { InputLikeText } from \"../../InputLikeText\";\nimport { RenderLayer } from \"../../RenderLayer\";\nimport { Spinner } from \"../../../components/Spinner\";\nimport { ArrowChevronDownIcon } from \"../../icons/16px\";\nimport { CommonWrapper } from \"../../CommonWrapper\";\nimport { MobilePopup } from \"../../MobilePopup\";\nimport { responsiveLayout } from \"../../../components/ResponsiveLayout/decorator\";\nimport { rootNode, getRootNode } from \"../../../lib/rootNode\";\nimport { createPropsGetter } from \"../../../lib/createPropsGetter\";\nimport { isTheme2022 } from \"../../../lib/theming/ThemeHelpers\";\nimport { ThemeContext } from \"../../../lib/theming/ThemeContext\";\nimport { LoadingIcon } from \"../../icons2022/LoadingIcon\";\nimport { ArrowDownIcon } from \"../ArrowDownIcon\";\nimport { ComboBoxMenu } from \"../ComboBoxMenu\";\nimport { ComboBoxRequestStatus } from \"../CustomComboBoxTypes\";\nimport { styles } from \"../CustomComboBox.styles\";\nimport { CustomComboBoxDataTids } from \"../CustomComboBox\";\nimport { getComboBoxTheme } from \"../getComboBoxTheme\";\nexport var ComboBoxViewIds = {\n menu: 'ComboBoxView__menu'\n};\nexport var ComboBoxView = responsiveLayout(_class = rootNode(_class = (_temp = _class2 = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ComboBoxView, _React$Component);\n\n function ComboBoxView() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.getProps = createPropsGetter(ComboBoxView.defaultProps);\n _this.mobileInput = null;\n _this.dropdownContainerRef = /*#__PURE__*/React.createRef();\n _this.menuId = ComboBoxViewIds.menu + getRandomID();\n\n _this.getComboBoxMenu = function () {\n var _this$props = _this.props,\n items = _this$props.items,\n loading = _this$props.loading,\n opened = _this$props.opened,\n refMenu = _this$props.refMenu,\n maxMenuHeight = _this$props.maxMenuHeight,\n renderTotalCount = _this$props.renderTotalCount,\n renderNotFound = _this$props.renderNotFound,\n totalCount = _this$props.totalCount,\n size = _this$props.size;\n\n var _this$getProps = _this.getProps(),\n repeatRequest = _this$getProps.repeatRequest,\n requestStatus = _this$getProps.requestStatus,\n renderItem = _this$getProps.renderItem,\n itemWrapper = _this$getProps.itemWrapper;\n\n return /*#__PURE__*/React.createElement(ComboBoxMenu, {\n menuId: _this.menuId,\n items: items,\n loading: loading,\n maxMenuHeight: maxMenuHeight,\n onValueChange: _this.handleItemSelect,\n opened: opened,\n refMenu: refMenu,\n renderTotalCount: renderTotalCount,\n renderItem: renderItem,\n renderNotFound: renderNotFound,\n itemWrapper: itemWrapper,\n renderAddButton: _this.renderAddButton,\n repeatRequest: repeatRequest,\n requestStatus: requestStatus,\n totalCount: totalCount,\n isMobile: _this.isMobileLayout,\n size: size\n });\n };\n\n _this.renderMenu = function () {\n var _this$props2 = _this.props,\n menuAlign = _this$props2.menuAlign,\n opened = _this$props2.opened,\n menuPos = _this$props2.menuPos;\n return opened && /*#__PURE__*/React.createElement(DropdownContainer, {\n menuPos: menuPos,\n align: menuAlign,\n getParent: _this.getParent,\n disablePortal: _this.props.disablePortal,\n ref: _this.dropdownContainerRef\n }, _this.getComboBoxMenu());\n };\n\n _this.renderMobileMenu = function () {\n var rightIcon = null;\n var _this$props3 = _this.props,\n loading = _this$props3.loading,\n items = _this$props3.items,\n opened = _this$props3.opened,\n onFocus = _this$props3.onFocus,\n onInputValueChange = _this$props3.onInputValueChange,\n placeholder = _this$props3.placeholder,\n textValue = _this$props3.textValue;\n\n if (loading && items && !!items.length) {\n rightIcon = _this.renderSpinner();\n }\n\n var inputProps = {\n autoComplete: 'off',\n autoFocus: true,\n width: '100%',\n onFocus: onFocus,\n onValueChange: onInputValueChange,\n value: textValue,\n placeholder: placeholder,\n rightIcon: rightIcon\n };\n return opened && /*#__PURE__*/React.createElement(MobilePopup, {\n headerChildComponent: /*#__PURE__*/React.createElement(Input, _extends({\n ref: _this.refMobileInput\n }, inputProps)),\n onCloseRequest: _this.props.onMobileClose,\n opened: true\n }, _this.getComboBoxMenu());\n };\n\n _this.getParent = function () {\n return getRootNode(_assertThisInitialized(_this));\n };\n\n _this.renderAddButton = function () {\n return _this.getProps().renderAddButton(_this.props.textValue);\n };\n\n _this.handleMobileFocus = function () {\n var _this$mobileInput;\n\n _this.props.onInputClick == null ? void 0 : _this.props.onInputClick();\n (_this$mobileInput = _this.mobileInput) == null ? void 0 : _this$mobileInput.focus();\n };\n\n _this.handleItemSelect = function (item) {\n if (_this.props.onValueChange) {\n _this.props.onValueChange(item);\n }\n\n if (_this.isMobileLayout) {\n _this.props.onMobileClose == null ? void 0 : _this.props.onMobileClose();\n }\n };\n\n _this.refInput = function (input) {\n if (_this.props.refInput) {\n _this.props.refInput(input);\n }\n\n _this.input = input;\n };\n\n _this.renderSpinner = function () {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: styles.spinnerWrapper()\n }, /*#__PURE__*/React.createElement(Spinner, {\n type: \"mini\",\n caption: \"\",\n dimmed: true\n }));\n };\n\n _this.getRightIcon = function () {\n var _this$props4 = _this.props,\n loading = _this$props4.loading,\n items = _this$props4.items,\n drawArrow = _this$props4.drawArrow,\n rightIcon = _this$props4.rightIcon,\n size = _this$props4.size;\n\n if (loading && items && !!items.length) {\n if (isTheme2022(_this.theme)) {\n return /*#__PURE__*/React.createElement(LoadingIcon, {\n size: size\n });\n }\n\n return _this.renderSpinner();\n }\n\n if (rightIcon || drawArrow) {\n if (isTheme2022(_this.theme)) {\n return rightIcon || /*#__PURE__*/React.createElement(ArrowDownIcon, {\n size: size\n });\n }\n\n return /*#__PURE__*/React.createElement(\"span\", {\n className: styles.rightIconWrapper()\n }, rightIcon != null ? rightIcon : /*#__PURE__*/React.createElement(ArrowChevronDownIcon, null));\n }\n\n return null;\n };\n\n _this.refMobileInput = function (input) {\n _this.mobileInput = input;\n };\n\n return _this;\n }\n\n var _proto = ComboBoxView.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$dropdownContain;\n\n if (this.props.autoFocus && this.props.onFocus) {\n this.props.onFocus();\n }\n\n this.props.opened && ((_this$dropdownContain = this.dropdownContainerRef.current) == null ? void 0 : _this$dropdownContain.position());\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var input = this.input,\n props = this.props;\n\n if (props.editing && !prevProps.editing && input) {\n input.focus();\n }\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {\n _this2.theme = getComboBoxTheme(theme);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: _this2.theme\n }, _this2.renderMain());\n });\n };\n\n _proto.renderMain = function renderMain() {\n var _this$props5 = this.props,\n onMouseEnter = _this$props5.onMouseEnter,\n onMouseLeave = _this$props5.onMouseLeave,\n onMouseOver = _this$props5.onMouseOver,\n opened = _this$props5.opened;\n\n var _this$getProps2 = this.getProps(),\n onClickOutside = _this$getProps2.onClickOutside,\n onFocusOutside = _this$getProps2.onFocusOutside,\n width = _this$getProps2.width;\n\n var isMobile = this.isMobileLayout;\n var input = this.renderInput();\n return /*#__PURE__*/React.createElement(CommonWrapper, this.props, /*#__PURE__*/React.createElement(RenderLayer, {\n onClickOutside: onClickOutside,\n onFocusOutside: onFocusOutside,\n active: opened\n }, /*#__PURE__*/React.createElement(\"span\", {\n \"data-tid\": CustomComboBoxDataTids.comboBoxView,\n style: {\n width: width\n },\n className: styles.root(),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseOver: onMouseOver,\n ref: this.setRootNode\n }, input, isMobile ? this.renderMobileMenu() : this.renderMenu())));\n };\n\n _proto.renderInput = function renderInput() {\n var isMobile = this.isMobileLayout;\n var _this$props6 = this.props,\n align = _this$props6.align,\n borderless = _this$props6.borderless,\n disabled = _this$props6.disabled,\n editing = _this$props6.editing,\n error = _this$props6.error,\n onFocus = _this$props6.onFocus,\n onInputBlur = _this$props6.onInputBlur,\n onInputValueChange = _this$props6.onInputValueChange,\n onInputFocus = _this$props6.onInputFocus,\n onInputClick = _this$props6.onInputClick,\n onInputKeyDown = _this$props6.onInputKeyDown,\n placeholder = _this$props6.placeholder,\n textValue = _this$props6.textValue,\n value = _this$props6.value,\n warning = _this$props6.warning,\n refInputLikeText = _this$props6.refInputLikeText,\n leftIcon = _this$props6.leftIcon,\n inputMode = _this$props6.inputMode,\n size = _this$props6.size,\n ariaDescribedby = _this$props6['aria-describedby'],\n ariaLabel = _this$props6['aria-label'];\n\n var _this$getProps3 = this.getProps(),\n renderValue = _this$getProps3.renderValue;\n\n var rightIcon = this.getRightIcon();\n\n if (editing) {\n return /*#__PURE__*/React.createElement(Input, {\n align: align,\n borderless: borderless,\n disabled: disabled,\n error: error,\n maxLength: this.props.maxLength,\n onBlur: isMobile ? undefined : onInputBlur,\n onValueChange: onInputValueChange,\n onFocus: onInputFocus,\n onClick: isMobile ? this.handleMobileFocus : onInputClick,\n leftIcon: leftIcon,\n rightIcon: rightIcon,\n value: textValue || '',\n onKeyDown: onInputKeyDown,\n placeholder: placeholder,\n width: \"100%\",\n size: size,\n ref: this.refInput,\n warning: warning,\n inputMode: inputMode,\n autoComplete: \"off\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-controls\": this.menuId,\n \"aria-label\": ariaLabel\n });\n }\n\n return /*#__PURE__*/React.createElement(InputLikeText, {\n align: align,\n borderless: borderless,\n error: error,\n onFocus: onFocus,\n leftIcon: leftIcon,\n rightIcon: rightIcon,\n disabled: disabled,\n warning: warning,\n placeholder: placeholder,\n size: size,\n width: \"100%\",\n ref: refInputLikeText,\n \"aria-describedby\": ariaDescribedby,\n \"aria-controls\": this.menuId\n }, isNonNullable(value) && renderValue ? renderValue(value) : null);\n };\n\n return ComboBoxView;\n}(React.Component), _class2.__KONTUR_REACT_UI__ = 'ComboBoxView', _class2.displayName = 'ComboBoxView', _class2.defaultProps = {\n renderItem: function renderItem(item) {\n return item;\n },\n renderValue: function renderValue(item) {\n return item;\n },\n renderAddButton: function renderAddButton() {\n return null;\n },\n repeatRequest: function repeatRequest() {\n return undefined;\n },\n requestStatus: ComboBoxRequestStatus.Unknown,\n onClickOutside: function onClickOutside() {\n /**/\n },\n onFocusOutside: function onFocusOutside() {\n /**/\n },\n size: 'small',\n width: 250\n}, _temp)) || _class) || _class;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n\nvar _class, _class2, _temp;\n\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { globalObject } from '@skbkontur/global-object';\nimport { CancelationError, taskWithDelay } from \"../../../lib/utils\";\nimport { fixClickFocusIE } from \"../../../lib/events/fixClickFocusIE\";\nimport { CommonWrapper } from \"../../CommonWrapper\";\nimport { responsiveLayout } from \"../../../components/ResponsiveLayout/decorator\";\nimport { rootNode } from \"../../../lib/rootNode\";\nimport { ReactUIFeatureFlagsContext, getFullReactUIFlagsContext } from \"../../../lib/featureFlagsContext\";\nimport { ComboBoxRequestStatus } from \"../CustomComboBoxTypes\";\nimport { reducer } from \"../CustomComboBoxReducer\";\nimport { ComboBoxView } from \"../ComboBoxView\";\nexport var DELAY_BEFORE_SHOW_LOADER = 300;\nexport var LOADER_SHOW_TIME = 1000;\nexport var DefaultState = {\n inputChanged: false,\n editing: false,\n items: null,\n loading: false,\n opened: false,\n focused: false,\n textValue: '',\n repeatRequest: function repeatRequest() {\n return undefined;\n },\n requestStatus: ComboBoxRequestStatus.Unknown,\n size: 'small'\n};\nexport var CustomComboBoxDataTids = {\n comboBoxView: 'ComboBoxView__root'\n};\nexport var CustomComboBox = responsiveLayout(_class = rootNode(_class = (_temp = _class2 = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(CustomComboBox, _React$PureComponent);\n\n function CustomComboBox() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n _this.state = DefaultState;\n _this.requestId = 0;\n _this.focused = false;\n _this.cancelationToken = null;\n _this.reducer = reducer;\n\n _this.cancelLoaderDelay = function () {\n return null;\n };\n\n _this.focus = function () {\n if (_this.props.disabled) {\n return;\n }\n\n if (_this.input) {\n _this.input.focus();\n } else if (_this.inputLikeText) {\n _this.inputLikeText.focus();\n }\n };\n\n _this.selectInputText = function () {\n if (_this.props.disabled) {\n return;\n }\n\n if (_this.input) {\n _this.input.selectAll();\n }\n };\n\n _this.blur = function () {\n if (_this.props.disabled) {\n return;\n }\n\n _this.handleBlur();\n };\n\n _this.dispatch = function (action, sync) {\n if (sync === void 0) {\n sync = true;\n }\n\n var updateState = function updateState(action) {\n var effects;\n var nextState;\n\n _this.setState(function (state) {\n var stateAndEffect = _this.reducer(state, _this.props, action);\n\n var _ref = stateAndEffect instanceof Array ? stateAndEffect : [stateAndEffect, []];\n\n nextState = _ref[0];\n effects = _ref[1];\n return nextState;\n }, function () {\n effects.forEach(_this.handleEffect);\n });\n }; // Auto-batching React@18 creates problems that are fixed with flushSync\n // https://github.com/skbkontur/retail-ui/pull/3144#issuecomment-1535235366\n\n\n if (sync && React.version.search('18') === 0) {\n ReactDOM.flushSync(function () {\n return updateState(action);\n });\n } else {\n updateState(action);\n }\n };\n\n _this.handleEffect = function (effect) {\n effect(_this.dispatch, _this.getState, _this.getProps, function () {\n return _assertThisInitialized(_this);\n });\n };\n\n _this.getProps = function () {\n return _this.props;\n };\n\n _this.getState = function () {\n return _this.state;\n };\n\n _this.handleValueChange = function (value) {\n _this.dispatch({\n type: 'ValueChange',\n value: value,\n keepFocus: !_this.isMobileLayout\n });\n };\n\n _this.handleFocus = function () {\n if (_this.focused) {\n return;\n }\n\n _this.focused = true;\n\n _this.dispatch({\n type: 'Focus'\n });\n };\n\n _this.handleMobileClose = function () {\n _this.handleInputBlur();\n };\n\n _this.handleClickOutside = function (e) {\n fixClickFocusIE(e);\n\n _this.handleBlur();\n };\n\n _this.handleBlur = function () {\n if (!_this.focused) {\n if (_this.state.opened) {\n _this.close();\n }\n\n return;\n }\n\n _this.focused = false; // workaround for the similar bug with focusout\n // in Firefox, Chrome and IE\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1363964\n\n globalObject.setTimeout(function () {\n _this.dispatch({\n type: 'Blur'\n });\n }, 0);\n };\n\n _this.handleInputBlur = function () {\n // If menu opened, RenderLayer is active and\n // it would call handleFocusOutside\n // In that way handleBlur would be called\n if (_this.state.opened && !_this.isMobileLayout) {\n return;\n }\n\n _this.handleBlur();\n };\n\n _this.handleInputClick = function () {\n if (!_this.cancelationToken) {\n _this.dispatch({\n type: 'InputClick'\n });\n }\n };\n\n return _this;\n }\n\n var _proto = CustomComboBox.prototype;\n /**\n * @public\n */\n\n _proto.search = /*#__PURE__*/function () {\n var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(query) {\n var _this2 = this;\n\n var getItems, cancelPromise, expectingId, items;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (query === void 0) {\n query = this.state.textValue;\n }\n\n getItems = this.props.getItems;\n cancelPromise = new Promise(function (_, reject) {\n return _this2.cancelationToken = reject;\n });\n this.requestId += 1;\n expectingId = this.requestId;\n\n if (!this.loaderShowDelay) {\n this.loaderShowDelay = new Promise(function (resolve) {\n var cancelLoader = taskWithDelay(function () {\n _this2.dispatch({\n type: 'RequestItems'\n });\n\n globalObject.setTimeout(resolve, LOADER_SHOW_TIME);\n }, DELAY_BEFORE_SHOW_LOADER);\n cancelPromise[\"catch\"](function () {\n return cancelLoader();\n });\n\n _this2.cancelLoaderDelay = function () {\n cancelLoader();\n resolve();\n };\n });\n }\n\n _context.prev = 6;\n _context.next = 9;\n return Promise.race([getItems(query), cancelPromise]);\n\n case 9:\n items = _context.sent;\n\n if (!this.state.loading) {\n _context.next = 13;\n break;\n }\n\n _context.next = 13;\n return Promise.race([this.loaderShowDelay, cancelPromise]);\n\n case 13:\n if (expectingId === this.requestId) {\n this.dispatch({\n type: 'ReceiveItems',\n items: items\n });\n }\n\n _context.next = 19;\n break;\n\n case 16:\n _context.prev = 16;\n _context.t0 = _context[\"catch\"](6);\n\n if (_context.t0 && _context.t0.code === 'CancelationError') {\n this.dispatch({\n type: 'CancelRequest'\n });\n } else if (expectingId === this.requestId) {\n this.dispatch({\n type: 'RequestFailure',\n repeatRequest: function repeatRequest() {\n _this2.search(query);\n\n if (_this2.input) {\n _this2.input.focus();\n }\n }\n });\n }\n\n case 19:\n _context.prev = 19;\n\n if (expectingId === this.requestId) {\n if (!this.state.loading) {\n this.cancelLoaderDelay();\n }\n\n this.cancelationToken = null;\n this.loaderShowDelay = null;\n }\n\n return _context.finish(19);\n\n case 22:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[6, 16, 19, 22]]);\n }));\n\n function search(_x) {\n return _search.apply(this, arguments);\n }\n\n return search;\n }()\n /**\n * @public\n */\n ;\n\n _proto.cancelSearch = function cancelSearch() {\n if (this.cancelationToken) {\n this.cancelationToken(new CancelationError());\n }\n }\n /**\n * @public\n */\n ;\n\n _proto.open = function open() {\n this.dispatch({\n type: 'Open'\n });\n }\n /**\n * @public\n */\n ;\n\n _proto.close = function close() {\n this.dispatch({\n type: 'Close'\n });\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var viewProps = {\n align: this.props.align,\n borderless: this.props.borderless,\n disabled: this.props.disabled,\n disablePortal: this.props.disablePortal,\n editing: this.state.editing,\n error: this.props.error,\n items: this.state.items,\n loading: this.state.loading,\n menuAlign: this.props.menuAlign,\n opened: this.state.opened,\n drawArrow: this.props.drawArrow,\n menuPos: this.props.menuPos,\n placeholder: this.props.placeholder,\n size: this.props.size,\n textValue: this.state.textValue,\n totalCount: this.props.totalCount,\n value: this.props.value,\n warning: this.props.warning,\n 'aria-describedby': this.props['aria-describedby'],\n 'aria-label': this.props['aria-label'],\n width: this.props.width,\n maxLength: this.props.maxLength,\n maxMenuHeight: this.props.maxMenuHeight,\n leftIcon: this.props.leftIcon,\n rightIcon: this.props.rightIcon,\n inputMode: this.props.inputMode,\n onValueChange: this.handleValueChange,\n onClickOutside: this.handleClickOutside,\n onFocus: this.handleFocus,\n onMobileClose: this.handleMobileClose,\n onFocusOutside: this.handleBlur,\n onInputBlur: this.handleInputBlur,\n onInputValueChange: function onInputValueChange(value) {\n return _this3.dispatch({\n type: 'TextChange',\n value: value\n });\n },\n onInputFocus: this.handleFocus,\n onInputClick: this.handleInputClick,\n onInputKeyDown: function onInputKeyDown(event) {\n event.persist();\n\n _this3.dispatch({\n type: 'KeyPress',\n event: event\n });\n },\n onMouseEnter: this.props.onMouseEnter,\n onMouseOver: this.props.onMouseOver,\n onMouseLeave: this.props.onMouseLeave,\n renderItem: this.props.renderItem,\n renderNotFound: this.props.renderNotFound,\n itemWrapper: this.props.itemWrapper,\n renderValue: this.props.renderValue,\n renderTotalCount: this.props.renderTotalCount,\n renderAddButton: this.props.renderAddButton,\n repeatRequest: this.state.repeatRequest,\n requestStatus: this.state.requestStatus,\n refInput: function refInput(input) {\n _this3.input = input;\n },\n refMenu: function refMenu(menu) {\n _this3.menu = menu;\n },\n refInputLikeText: function refInputLikeText(inputLikeText) {\n _this3.inputLikeText = inputLikeText;\n }\n };\n return /*#__PURE__*/React.createElement(ReactUIFeatureFlagsContext.Consumer, null, function (flags) {\n _this3.featureFlags = getFullReactUIFlagsContext(flags);\n return /*#__PURE__*/React.createElement(CommonWrapper, _this3.props, /*#__PURE__*/React.createElement(ComboBoxView, _extends({}, viewProps, {\n size: _this3.props.size,\n ref: _this3.setRootNode\n })));\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.dispatch({\n type: 'Mount'\n }, false);\n\n if (this.props.autoFocus) {\n this.focus();\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.editing && !this.state.editing) {\n this.handleBlur();\n }\n\n this.dispatch({\n type: 'DidUpdate',\n prevProps: prevProps,\n prevState: prevState,\n fixValueChange: this.featureFlags.comboBoxAllowValueChangeInEditingState\n }, false);\n }\n /**\n * @public\n */\n ;\n\n _proto.reset = function reset() {\n this.dispatch({\n type: 'Reset'\n });\n };\n\n return CustomComboBox;\n}(React.PureComponent), _class2.__KONTUR_REACT_UI__ = 'CustomComboBox', _class2.displayName = 'CustomComboBox', _temp)) || _class) || _class;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n\nvar _class, _class2, _temp;\n\nimport React from 'react';\nimport { CustomComboBox } from \"../../../internal/CustomComboBox\";\nimport { rootNode } from \"../../../lib/rootNode\";\nimport { createPropsGetter } from \"../../../lib/createPropsGetter\";\nexport var ComboBox = rootNode(_class = (_temp = _class2 = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ComboBox, _React$Component);\n\n function ComboBox() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.getProps = createPropsGetter(ComboBox.defaultProps);\n _this.comboboxElement = null;\n\n _this.customComboBoxRef = function (element) {\n _this.setRootNode(element);\n\n _this.comboboxElement = element;\n };\n\n return _this;\n }\n\n var _proto = ComboBox.prototype;\n /**\n * @public\n */\n\n _proto.focus = function focus() {\n if (this.comboboxElement) {\n this.comboboxElement.focus();\n }\n }\n /**\n * @public\n */\n ;\n\n _proto.blur = function blur() {\n if (this.comboboxElement) {\n this.comboboxElement.blur();\n }\n }\n /**\n * Открывает выпадающий список и запускает поиск элементов\n *\n * @public\n * @param {string} [query] Текст поиска. По умолчанию берется\n * текст из инпута или результат `valueToString(value)`\n */\n ;\n\n _proto.search = function search(query) {\n if (this.comboboxElement) {\n this.comboboxElement.search(query);\n }\n }\n /**\n * @public\n */\n ;\n\n _proto.cancelSearch = function cancelSearch() {\n if (this.comboboxElement) {\n this.comboboxElement.cancelSearch();\n }\n }\n /**\n * @public Открывает выпадающий список\n */\n ;\n\n _proto.open = function open() {\n if (this.comboboxElement) {\n this.comboboxElement.open();\n }\n }\n /**\n * @public Закрывает выпадающий список\n */\n ;\n\n _proto.close = function close() {\n if (this.comboboxElement) {\n this.comboboxElement.close();\n }\n }\n /**\n * Выделяет текст внутри input\n * @public\n */\n ;\n\n _proto.selectInputText = function selectInputText() {\n if (this.comboboxElement) {\n this.comboboxElement.selectInputText();\n }\n }\n /**\n * Сбрасывает введенное пользователем значение\n * @public\n */\n ;\n\n _proto.reset = function reset() {\n if (this.comboboxElement) {\n this.comboboxElement.reset();\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(CustomComboBox, _extends({}, this.getProps(), {\n size: this.props.size,\n ref: this.customComboBoxRef\n }));\n };\n\n return ComboBox;\n}(React.Component), _class2.__KONTUR_REACT_UI__ = 'ComboBox', _class2.displayName = 'ComboBox', _class2.defaultProps = {\n itemToValue: function itemToValue(item) {\n return item.value;\n },\n valueToString: function valueToString(item) {\n return item.label;\n },\n renderValue: function renderValue(item) {\n return item.label;\n },\n renderItem: function renderItem(item) {\n return item.label;\n },\n menuAlign: 'left',\n searchOnFocus: true,\n drawArrow: true\n}, _temp)) || _class;","import cn from 'classnames';\nimport { FC, ReactNode } from 'react';\n\nimport { Null } from '../../utils/types';\nimport styles from './ColoredPad.module.css';\n\nexport enum PadStyles {\n Disabled = 'Disabled',\n Pale = 'Pale',\n White = 'White',\n}\nexport interface PadInfo {\n icon: Null;\n style: PadStyles;\n text: string;\n}\n\nexport const ColoredPad: FC<{ padInfo: PadInfo }> = ({ padInfo }) => {\n const { text, style = '', icon } = padInfo;\n return (\n \n {icon} {text}\n
    \n );\n};\n","/* eslint-disable react/display-name */\nimport React from 'react';\nimport { ArrowCDownIcon16Regular } from \"../../icons2022/ArrowCDownIcon/ArrowCDownIcon16Regular\";\nimport { ArrowCDownIcon20Regular } from \"../../icons2022/ArrowCDownIcon/ArrowCDownIcon20Regular\";\nimport { ArrowCDownIcon24Regular } from \"../../icons2022/ArrowCDownIcon/ArrowCDownIcon24Regular\";\nimport { iconSizer } from \"../../icons2022/iconSizer\";\nexport var ArrowDownIcon = iconSizer({\n small: function small() {\n return /*#__PURE__*/React.createElement(ArrowCDownIcon16Regular, null);\n },\n medium: function medium() {\n return /*#__PURE__*/React.createElement(ArrowCDownIcon20Regular, null);\n },\n large: function large() {\n return /*#__PURE__*/React.createElement(ArrowCDownIcon24Regular, null);\n }\n}, 'ArrowDownIcon');","import { ThemeFactory } from \"../../../lib/theming/ThemeFactory\";\nexport var getComboBoxTheme = function getComboBoxTheme(theme) {\n return ThemeFactory.create({\n menuOffsetY: theme.comboboxMenuOffsetY\n }, theme);\n};","// extracted by mini-css-extract-plugin\nexport default {\"hover\":\"AutocompleteSearch_hover__pHxt7\",\"clearSearchValue\":\"AutocompleteSearch_clearSearchValue__Ni5UR\",\"autocompleteSearchWrap\":\"AutocompleteSearch_autocompleteSearchWrap__iuJoR\"};","import { KonturColors } from '@skbkontur/colors';\nimport { SearchLoupeIcon20Light as Search } from '@skbkontur/icons/SearchLoupeIcon20Light';\nimport { XIcon20Light as XIcon } from '@skbkontur/icons/XIcon20Light';\nimport { ComboBox, ComboBoxExtendedItem } from '@skbkontur/react-ui';\nimport { FC, useContext, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport global from '../../index.module.css';\nimport { handleDefaultEvent } from '../../utils/common';\nimport styles from './AutocompleteSearch.module.css';\n\ninterface Props {\n className?: string;\n getItems: (\n query: string\n ) => Promise[]>;\n inputSearchValue?: { login: string };\n onClear: () => void;\n placeholder?: string;\n setInputSearchValue: (value: { login: string }) => void;\n size?: 'large' | 'medium' | 'small';\n width?: number;\n}\n\nexport const AutocompleteSearch: FC = ({\n setInputSearchValue,\n getItems,\n onClear,\n inputSearchValue = null,\n className,\n size = 'medium',\n width = 250,\n placeholder = '',\n}) => {\n const { tp } = useContext(ServiceCtx);\n const [inputValue, setInputValue] = useState();\n\n const comboboxRef = useRef>(null);\n\n const rightIcon = useMemo(\n () => (\n \n {\n handleDefaultEvent(e);\n inputSearchValue && onClear();\n setInputValue(undefined);\n comboboxRef.current?.reset();\n }}\n />\n \n ),\n [inputSearchValue, inputValue]\n );\n\n const leftIcon = useMemo(\n () => (\n \n ),\n [inputSearchValue]\n );\n\n const onValueChange = (value: { login: string }) => {\n setInputSearchValue(value);\n comboboxRef.current?.setState({ value });\n };\n\n useEffect(() => {\n setInputValue(inputSearchValue?.login);\n }, [inputSearchValue]);\n\n return (\n
    \n \n ref={comboboxRef}\n renderItem={(item) =>
    {item.login}
    }\n getItems={getItems}\n placeholder={tp.execute(placeholder)}\n onValueChange={onValueChange}\n onInputValueChange={setInputValue}\n value={inputSearchValue}\n leftIcon={leftIcon}\n renderValue={(item) => {item.login}}\n className={className}\n itemToValue={(item) => item.login}\n size={size}\n valueToString={(item) => item?.login}\n width={width}\n drawArrow={false}\n searchOnFocus={false}\n />\n {(inputValue || inputSearchValue) && rightIcon}\n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"bannerWrap\":\"Banner_bannerWrap__otIvQ\"};","import cn from 'classnames';\nimport { FC, ReactNode } from 'react';\n\nimport styles from './Banner.module.css';\n\ninterface Props {\n children: ReactNode;\n className?: string;\n}\n\nexport const Banner: FC = ({ className, children }) => {\n return
    {children}
    ;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"rowContent\":\"BlockWithDescription_rowContent__McjxZ\",\"textContent\":\"BlockWithDescription_textContent__YESVa\"};","import cn from 'classnames';\nimport { FC, ReactNode, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport global from '../../index.module.css';\nimport { Null } from '../../utils/types';\nimport { TableRow } from '..';\nimport styles from './BlockWithDescription.module.css';\n\ninterface Props {\n actionElement?: ReactNode;\n description?: Null;\n id: string;\n name?: string;\n onClick?: () => void;\n}\n\nexport const BlockWithDescription: FC = ({\n id,\n name,\n description,\n actionElement = null,\n onClick,\n}) => {\n const { tp } = useContext(ServiceCtx);\n const nameText = name || 'Без названия';\n const descriptionText = description || 'Без описания';\n\n return (\n \n
    \n {nameText}\n

    \n {tp.execute(descriptionText)}\n

    \n
    \n {actionElement}\n \n }\n />\n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"border\":\"Border_border__tRMOV\"};","import { FC } from 'react';\n\nimport styles from './Border.module.css';\n\nexport const Border: FC = () =>
    ;\n","// extracted by mini-css-extract-plugin\nexport default {\"caption\":\"Caption_caption__2Csmb\"};","import cn from 'classnames';\nimport { FC, ReactNode } from 'react';\n\nimport styles from './Caption.module.css';\n\ninterface Props {\n children: ReactNode;\n className?: string;\n}\n\nexport const Caption: FC = ({ children, className = {} }) => {\n const style = cn(styles.caption, className);\n return

    {children}

    ;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"pad\":\"ColoredPad_pad__y2QMV\",\"white\":\"ColoredPad_white__if3uW\",\"pale\":\"ColoredPad_pale__BI1Wh\",\"disabled\":\"ColoredPad_disabled__W+4Wo\"};","var _path, _circle, _rect, _path2;\nvar _excluded = [\"title\", \"titleId\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from \"react\";\nfunction SvgPeopleNotification(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 96,\n height: 96,\n viewBox: \"0 0 96 96\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.001 61.998C28.9187 61.998 3.19127 63.3943 0.27246 84.0024C-0.0373385 86.1897 1.79184 87.998 4.00098 87.998H80.001C82.2101 87.998 84.0393 86.1897 83.7295 84.0024C80.8107 63.3943 55.0832 61.998 42.001 61.998Z\",\n fill: \"#FE4C4C\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 41.8096,\n cy: 33,\n r: 24,\n fill: \"#FE4C4C\"\n })), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 68.001,\n y: 48.998,\n width: 28,\n height: 28,\n rx: 8,\n fill: \"#6C1D45\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M79.251 63.748C80.3555 63.748 81.251 64.6435 81.251 65.748V72.248C81.251 72.6623 81.5868 72.998 82.001 72.998C82.4152 72.998 82.751 72.6623 82.751 72.248V65.748C82.751 64.6435 83.6464 63.748 84.751 63.748H91.251C91.6652 63.748 92.001 63.4123 92.001 62.998C92.001 62.5838 91.6652 62.248 91.251 62.248H84.751C83.6464 62.248 82.751 61.3526 82.751 60.248V53.748C82.751 53.3338 82.4152 52.998 82.001 52.998C81.5868 52.998 81.251 53.3338 81.251 53.748V60.248C81.251 61.3526 80.3555 62.248 79.251 62.248H72.751C72.3368 62.248 72.001 62.5838 72.001 62.998C72.001 63.4123 72.3368 63.748 72.751 63.748H79.251Z\",\n fill: \"white\"\n })));\n}\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgPeopleNotification);\nexport default __webpack_public_path__ + \"static/media/PeopleNotification.f122eafe7e433442fb970d8d17964415.svg\";\nexport { ForwardRef as ReactComponent };","// extracted by mini-css-extract-plugin\nexport default {\"section\":\"ColoredSection_section__OXTee\"};","import { FC, PropsWithChildren } from 'react';\n\nimport styles from './ColoredSection.module.css';\nexport const ColoredSection: FC = ({ children }) => (\n
    {children}
    \n);\n","// extracted by mini-css-extract-plugin\nexport default {\"confirmationModalFooter\":\"ConfirmationModal_confirmationModalFooter__RAsdc\",\"confirmationModalButton\":\"ConfirmationModal_confirmationModalButton__8jmAW\"};","import { Button, Modal } from '@skbkontur/react-ui';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { DEFAULT_SMALL_MODAL_WIDTH } from '../../utils/constants';\nimport styles from './ConfirmationModal.module.css';\n\ninterface Props {\n contentText: string;\n headerText: string;\n onClose: () => void;\n onSubmit: () => void;\n submitText: string;\n}\n\nexport const ConfirmationModal: FC = ({\n headerText,\n contentText,\n submitText,\n onSubmit,\n onClose,\n}) => {\n const { tp } = useContext(ServiceCtx);\n return (\n \n {tp.execute(headerText)}\n \n

    {tp.execute(contentText)}

    \n
    \n \n
    \n \n {tp.execute(submitText)}\n \n \n Отменить\n \n
    \n
    \n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"detailsFormItem\":\"DetailsFormItem_detailsFormItem__+8Xx6\",\"detailsLabel\":\"DetailsFormItem_detailsLabel__oyQhH\",\"itemWithActionWrapper\":\"DetailsFormItem_itemWithActionWrapper__LQTuE\"};","import { Button } from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport isString from 'lodash/isString';\nimport { FC, ReactElement, ReactNode, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { BOUND_DASH } from '../../utils/constants';\nimport { Null } from '../../utils/types';\nimport styles from './DetailsFormItem.module.css';\n\ninterface FormItemAction {\n actionText: string;\n icon?: ReactElement;\n onClick: () => void;\n}\nexport interface DetailsFormItemProps {\n action?: FormItemAction;\n className?: string;\n id: string;\n item?: Null;\n label: ReactNode | string;\n}\n\nexport const DetailsFormItem: FC = ({\n id,\n label,\n item,\n action,\n className,\n}) => {\n const { tp } = useContext(ServiceCtx);\n const { actionText, onClick, icon } = action || {};\n const itemLabel = isString(label) ? tp.execute(label) : label;\n\n return (\n
    \n \n
    \n {!!item && isString(item) ? (\n {tp.execute(item)}\n ) : (\n item || BOUND_DASH\n )}\n {action && actionText && (\n \n )}\n
    \n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"expander\":\"Expander_expander__-fF8g\"};","import { FC } from 'react';\n\nimport styles from './Expander.module.css';\n\nexport const Expander: FC<{ height: string }> = ({ height }) => (\n
    \n);\n","export const MIN_DATE_TO_PICK = '01.02.2024';\n\nexport interface FromToFilters {\n endDate: string;\n startDate: string;\n}\n\nexport enum PeriodParts {\n end = 'end',\n start = 'start',\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"emptyList\":\"FailedResult_emptyList__Ptduo\"};","import { Button, ButtonProps } from '@skbkontur/react-ui';\nimport { FC, ReactElement, useContext } from 'react';\n\nimport { ReactComponent as PeopleNotification } from '../../components/Images/PeopleNotification.svg';\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport global from '../../index.module.css';\nimport styles from './FailedResult.module.css';\n\ninterface ActionButton {\n icon?: ReactElement;\n onClick: () => void;\n props?: ButtonProps;\n rightIcon?: ReactElement;\n text: string;\n}\n\ninterface Props {\n actionButton?: ActionButton;\n caption?: string;\n img?: ReactElement;\n text?: string;\n}\n\nexport const FailedResult: FC = ({\n img = ,\n caption,\n text,\n actionButton,\n}) => {\n const { tp } = useContext(ServiceCtx);\n return (\n
    \n {img}\n {caption &&

    {tp.execute(caption)}

    }\n {text &&

    {tp.execute(text)}

    }\n {actionButton && (\n \n {tp.execute(actionButton.text)}\n \n )}\n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"fileNameWrapper\":\"AddedFile_fileNameWrapper__UVzin\",\"fileNameIcon\":\"AddedFile_fileNameIcon__V9nOJ\"};","import { XIcon20Regular } from '@skbkontur/icons/XIcon20Regular';\n\nimport styles from './AddedFile.module.css';\n\nconst AddedFile = ({\n usersTableFile,\n onRemoveUsersTableFile,\n}: {\n onRemoveUsersTableFile: () => void;\n usersTableFile: File;\n}) => (\n
    \n \n {usersTableFile.name}\n
    \n);\n\nexport { AddedFile };\n","// extracted by mini-css-extract-plugin\nexport default {\"dropdownWrapper\":\"UploadFile_dropdownWrapper__xH7d-\",\"dropdownInput\":\"UploadFile_dropdownInput__JI5sl\",\"colored\":\"UploadFile_colored__1oCbl\"};","import { NetUploadIcon20Regular } from '@skbkontur/icons/NetUploadIcon20Regular';\n\nimport styles from './UploadFile.module.css';\n\nconst UploadFile = ({\n onUsersTableFileChange,\n multipleFiles = false,\n allowedFileFormats,\n}: {\n allowedFileFormats?: string;\n multipleFiles?: boolean;\n onUsersTableFileChange: (value: FileList | null) => void;\n}) => {\n return (\n
    \n \n Выберите файл{' '}\n или перетащите сюда\n \n onUsersTableFileChange(e.currentTarget.files)}\n type='file'\n className={styles.dropdownInput}\n />\n
    \n );\n};\n\nexport { UploadFile };\n","// extracted by mini-css-extract-plugin\nexport default {\"filterResultCaption\":\"FiltersResultCaption_filterResultCaption__XHiVl\",\"clearResultsButton\":\"FiltersResultCaption_clearResultsButton__3r92x\",\"emptyFilter\":\"FiltersResultCaption_emptyFilter__vrI1P\"};","import { KonturColors } from '@skbkontur/colors';\nimport { XIcon20Regular as X } from '@skbkontur/icons/XIcon20Regular';\nimport { Button, Gapped } from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport styles from './FiltersResultCaption.module.css';\n\nconst ClearButton: FC<{ onClick: () => void }> = ({ onClick }) => (\n }\n className={styles.clearResultsButton}\n >\n Сбросить фильтры\n \n);\n\ninterface Props {\n caption: string;\n emptyCaption: string;\n foundCount?: number;\n onClearFilters: () => void;\n}\n\nexport const FiltersResultCaption: FC = ({\n caption,\n emptyCaption,\n onClearFilters,\n foundCount = 0,\n}) => {\n const { tp } = useContext(ServiceCtx);\n\n return foundCount > 0 ? (\n \n

    {tp.execute(caption)}

    \n \n
    \n ) : (\n \n

    {tp.execute(emptyCaption)}

    \n \n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"fromToFilterBlock\":\"FromToFilter_fromToFilterBlock__6B3bx\",\"filterLabel\":\"FromToFilter_filterLabel__2sYJ0\",\"datePicker\":\"FromToFilter_datePicker__NoR1x\"};","import { DatePicker, Gapped } from '@skbkontur/react-ui';\nimport {\n ValidationContainer,\n ValidationInfo,\n ValidationWrapper,\n} from '@skbkontur/react-ui-validations';\nimport dayjs from 'dayjs';\nimport { FC, useEffect, useRef, useState } from 'react';\n\nimport { BOUND_DASH } from '../../utils/constants';\nimport { compareDates, formatDateDDMMYYYY } from '../../utils/time';\nimport { Null } from '../../utils/types';\nimport styles from './FromToFilter.module.css';\nimport { FromToFilters, MIN_DATE_TO_PICK, PeriodParts } from './util';\n\nconst DEFAULT_DATE_PICKER_WIDTH = '122px';\n\ninterface Props {\n clearFilters: boolean;\n datePickerWidth?: string;\n disabled?: boolean;\n filters: FromToFilters;\n onFiltersChange: (value: FromToFilters) => void;\n}\n\nexport const FromToFilter: FC = ({\n clearFilters,\n filters,\n onFiltersChange,\n datePickerWidth = DEFAULT_DATE_PICKER_WIDTH,\n disabled = false,\n}) => {\n const { startDate, endDate } = filters;\n\n const [fromValidationInfo, setFromValidationInfo] =\n useState>(null);\n const [toValidationInfo, setToValidationInfo] =\n useState>(null);\n\n const fromDateRef = useRef(null);\n const toDateRef = useRef(null);\n\n const clearValidations = () => {\n setToValidationInfo(null);\n setFromValidationInfo(null);\n };\n\n useEffect(() => {\n if (clearFilters) {\n clearValidations();\n }\n }, [clearFilters]);\n\n const checkValidation = (flag: PeriodParts, value?: string): boolean => {\n let dateToValidate = value || endDate;\n\n if (!dateToValidate) {\n return true;\n }\n\n let updateValidationInfo = setToValidationInfo;\n let pickerRef = toDateRef;\n\n if (flag === PeriodParts.start) {\n dateToValidate = value || startDate;\n updateValidationInfo = setFromValidationInfo;\n pickerRef = fromDateRef;\n }\n\n if (!DatePicker.validate(dateToValidate)) {\n updateValidationInfo({\n type: 'immediate',\n message: 'Неверная дата',\n });\n pickerRef.current?.focus();\n return false;\n }\n\n return true;\n };\n\n const onDateValueChange = (value: string, flag: PeriodParts) => {\n clearValidations();\n\n // если начальная дата больше конечной, выравниваем значения\n if (checkValidation(flag, value)) {\n const start = flag === PeriodParts.start ? value : startDate;\n const end = flag === PeriodParts.end ? value : endDate;\n const newDates =\n compareDates(start, end) === 1\n ? { startDate: value, endDate: value }\n : { startDate: start, endDate: end };\n onFiltersChange({ ...filters, ...newDates });\n }\n };\n\n return (\n \n \n Искать\n
    \n \n \n onDateValueChange(value, PeriodParts.start)\n }\n onBlur={() => checkValidation(PeriodParts.start)}\n ref={fromDateRef}\n size='medium'\n width={datePickerWidth}\n minDate={MIN_DATE_TO_PICK}\n maxDate={formatDateDDMMYYYY(new Date(Date.now()))}\n className={styles.datePicker}\n enableTodayLink\n disabled={disabled}\n />\n \n {BOUND_DASH}\n \n \n onDateValueChange(value, PeriodParts.end)\n }\n onBlur={() => checkValidation(PeriodParts.end)}\n ref={toDateRef}\n size='medium'\n width={datePickerWidth}\n minDate={MIN_DATE_TO_PICK}\n maxDate={formatDateDDMMYYYY(dayjs().toDate())}\n className={styles.datePicker}\n enableTodayLink\n disabled={disabled}\n />\n \n
    \n
    \n
    \n );\n};\n","import { ArrowCLeftIcon16Regular as ArrowLeft } from '@skbkontur/icons/ArrowCLeftIcon16Regular';\nimport { FC, ReactNode } from 'react';\nimport { Link } from 'react-router-dom';\n\ninterface Props {\n classNames?: string;\n linkText: ReactNode;\n onClick?: () => void;\n to: string;\n}\n\nexport const GoBackLink: FC = ({\n linkText,\n to,\n classNames,\n onClick,\n}) => {\n return (\n \n \n {linkText}\n \n );\n};\n","import { DetailedHTMLProps, FC, ImgHTMLAttributes } from 'react';\n\nimport { RESOURCES_IMG_WIDTH } from '../../utils/constants';\n\ninterface Props {\n image: string;\n width?: string;\n}\nexport const ImageWithProps: FC<\n Props &\n DetailedHTMLProps, HTMLImageElement>\n> = ({ image, width = RESOURCES_IMG_WIDTH, ...props }) => (\n \n);\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset)\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @return {Function} A new, throttled, function.\n */\nfunction throttle (delay, noTrailing, callback, debounceMode) {\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel() {\n clearExistingTimeout();\n cancelled = true;\n } // `noTrailing` defaults to falsy.\n\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n}\n\n/* eslint-disable no-undefined */\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @return {Function} A new, debounced function.\n */\n\nfunction debounce (delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n}\n\nexport { throttle, debounce };\n","// extracted by mini-css-extract-plugin\nexport default {\"preflightLoaderStyle\":\"InfiniteScrollable_preflightLoaderStyle__VQqTW\"};","import { Spinner } from '@skbkontur/react-ui';\nimport { ReactNode, useContext } from 'react';\nimport InfiniteScroll from 'react-infinite-scroll-component';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport styles from './InfiniteScrollable.module.css';\n\ninterface Props {\n children: ReactNode;\n getNext: () => void;\n list: T;\n totalCount: number;\n}\n\n/** Компонет-обертка над бесконечным скроллом. */\nexport const InfiniteScrollable = ({\n list,\n totalCount,\n getNext,\n children,\n}: Props) => {\n const { tp } = useContext(ServiceCtx);\n\n return (\n totalCount > 0 && getNext()}\n hasMore={totalCount > list.length}\n loader={\n
    \n \n
    \n }\n scrollableTarget='scrollableTable'\n >\n {children}\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"itemBlock\":\"Item_itemBlock__dQ+Bl\",\"iconWrapper\":\"Item_iconWrapper__akX6L\",\"itemText\":\"Item_itemText__KjfJs\"};","import { FC, ReactNode } from 'react';\n\nimport styles from './Item.module.css';\n\ninterface Props {\n button?: ReactNode;\n icon: ReactNode;\n text: string | ReactNode;\n title: string;\n}\n\nexport const Item: FC = ({ icon, title, text, button = <> }) => {\n return (\n
    \n
    {icon}
    \n

    {title}

    \n

    {text}

    \n {button}\n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"machinesPAMAddModal\":\"LabelForInput_machinesPAMAddModal__h36yI\",\"label\":\"LabelForInput_label__+2-4V\"};","import { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport styles from './LabelForInput.module.css';\n\ninterface Props {\n htmlFor: string;\n text: string;\n}\n\nexport const LabelForInput: FC = ({ htmlFor, text }) => {\n const { tp } = useContext(ServiceCtx);\n return (\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"line\":\"Line_line__eSru5\"};","import { FC } from 'react';\n\nimport styles from './Line.module.css';\n\ninterface Props {\n marginBottom?: number;\n marginLeft?: number;\n marginRight?: number;\n marginTop?: number;\n paddingBottom?: number;\n paddingLeft?: number;\n paddingRight?: number;\n}\n\nexport const Line: FC = ({\n marginTop = 16,\n marginBottom = 8,\n paddingRight = 24,\n paddingLeft = 24,\n marginRight = 0,\n marginLeft = 0,\n paddingBottom = 0,\n}) => {\n const lineStyle = {\n marginTop,\n marginBottom,\n paddingRight,\n paddingLeft,\n marginRight,\n marginLeft,\n paddingBottom,\n };\n return
    ;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"lbl\":\"LoginInputWithTip_lbl__MMZyk\",\"withButton\":\"LoginInputWithTip_withButton__DjWcZ\",\"clearLoginIcon\":\"LoginInputWithTip_clearLoginIcon__jPaSG\"};","import { XIcon20Light as XIcon } from '@skbkontur/icons/XIcon20Light';\nimport { Button, Gapped, Input } from '@skbkontur/react-ui';\nimport {\n ValidationInfo,\n ValidationWrapper,\n} from '@skbkontur/react-ui-validations';\nimport { forwardRef, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { Null } from '../../utils/types';\nimport { renderTextValidationMessage } from '../../utils/validationErrors';\nimport { Question } from '../Question/Question';\nimport styles from './LoginInputWithTip.module.css';\n\ninterface Props {\n actionButtonDisabled?: boolean;\n actionButtonText?: string;\n className?: string;\n loader?: boolean;\n multidomains: boolean;\n onAction?: () => void;\n onClear: () => void;\n onValueChange: (value: string) => void;\n validationInfo: Null;\n value: string;\n}\n/** Компонент поля ввода логина с подсказкой для использования на модалке. */\nexport const LoginInputWithTip = forwardRef(\n (\n {\n multidomains,\n value,\n onValueChange,\n validationInfo,\n onAction,\n onClear,\n actionButtonText,\n actionButtonDisabled = false,\n loader,\n className = '',\n },\n ref\n ) => {\n const { tp } = useContext(ServiceCtx);\n const clearIcon = value ? (\n \n ) : null;\n const showButton = onAction && !!actionButtonText;\n return (\n \n \n
    \n
    \n \n \n \n
    \n {showButton && (\n \n {actionButtonText}\n \n )}\n
    \n
    \n );\n }\n);\n\nLoginInputWithTip.displayName = 'LoginInputWithTip';\n","// extracted by mini-css-extract-plugin\nexport default {\"tooltip\":\"TooltipOverTruncated_tooltip__QcUt9\",\"cursor\":\"TooltipOverTruncated_cursor__B9DLE\",\"truncatedInnerText\":\"TooltipOverTruncated_truncatedInnerText__QmK-c\",\"innerText\":\"TooltipOverTruncated_innerText__nD-Q9\"};","import { Tooltip } from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport { FC, HTMLProps, useEffect, useRef } from 'react';\n\nimport { isEllipsisActive, notEmpty, truncate } from '../../utils/common';\nimport styles from './TooltipOverTruncated.module.css';\n\ninterface Props extends HTMLProps {\n customStyles?: string;\n id: string;\n max?: number; // для задания ширины\n value?: string;\n}\n\n/**\n * Компонет при необходимости обрезает значение и выводит тултип с полным\n * значением.\n */\nexport const TooltipOverTruncated: FC = ({\n id,\n max,\n value,\n customStyles,\n}) => {\n const tooltipRef = useRef(null);\n const anchorTooltipElement = useRef();\n\n useEffect(() => {\n if (value && !notEmpty(max)) {\n const asd = window.document.getElementById(`truncated-${id}`);\n const as = asd && isEllipsisActive(asd);\n as && (anchorTooltipElement.current = asd);\n }\n\n return () => (anchorTooltipElement.current = undefined);\n }, [id]);\n\n if (!value) {\n return <>;\n }\n\n // если передана максимальная длина, то обрезаем текст\n if (notEmpty(max)) {\n const truncated = truncate(value, max);\n\n return max > 0 && value.length > truncated.length ? (\n
    {value}
    }\n pos='top center'\n ref={tooltipRef}\n >\n tooltipRef.current?.show()}\n onMouseLeave={() => tooltipRef.current?.hide()}\n >\n {truncated}\n \n
    \n ) : (\n {value}\n );\n }\n\n return (\n \n anchorTooltipElement.current ? (\n
    {value}
    \n ) : null\n }\n trigger='hover'\n pos='top center'\n ref={tooltipRef}\n >\n \n {value}\n \n \n );\n};\n","import { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport global from '../../index.module.css';\nimport { getMaxLengthForTwo } from '../../utils/common';\nimport { BOUND_DASH, PERIOD } from '../../utils/constants';\nimport { Null } from '../../utils/types';\nimport { TooltipOverTruncated } from '../TooltipOverTruncated/TooltipOverTruncated';\n\nconst DEFAULT_MAX_LOGON_WIDTH = 22;\ninterface Props {\n domain?: Null;\n id?: string;\n // не обязательно id пользователя\n login?: Null;\n maxWidth?: number;\n}\n\nexport const LoginWithDomain: FC = ({\n id,\n login,\n domain,\n maxWidth = DEFAULT_MAX_LOGON_WIDTH,\n}) => {\n const { tp } = useContext(ServiceCtx);\n\n const max = getMaxLengthForTwo(\n login?.length ?? 0,\n domain?.length ?? 0,\n maxWidth\n );\n return (\n \n \n {BOUND_DASH}\n \n \n );\n};\n","import { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { BOUND_DASH } from '../../utils/constants';\nimport { Question } from '../Question/Question';\n\ninterface Props {\n iconTrack?: () => void;\n multidomains: boolean;\n}\n\nexport const LogonCaption: FC = ({ multidomains, iconTrack }) => {\n const { tp } = useContext(ServiceCtx);\n\n return (\n <>\n {multidomains ? `Логин${BOUND_DASH}Домен` : 'Логин'}\n {iconTrack && (\n \n {tp.execute(\n 'Для входа в организацию логин и домен можно ввести следующими способами: '\n )}\n логин@домен, логин@домен.ru, логин@домен.com и{' '}\n домен\\логин\n \n ) : (\n \n {tp.execute('Для входа в организацию можно ввести ')}\n логин@домен, домен\\логин, {tp.execute('либо только ')}\n логин.
    \n {tp.execute('Идентификация происходит по логину.')}\n
    \n )\n }\n track={iconTrack}\n />\n )}\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"icon\":\"LogonsList_icon__TSLSR\"};","import { KonturColors } from '@skbkontur/colors';\nimport { FC, HTMLProps, ReactElement, ReactNode } from 'react';\n\nimport global from '../../index.module.css';\nimport { LogonName } from '../../utils/types';\nimport { LoginWithDomain, TooltipOverTruncated, TrashIcon } from '..';\nimport styles from './LogonsList.module.css';\n\ninterface Props extends HTMLProps {\n deletion?: {\n loader?: string;\n onDelete: (value: LogonName) => void;\n };\n editElement?: ReactNode;\n listStyle?: string;\n logins: LogonName[];\n maxListLength?: number;\n maxWidth?: number;\n multidomains: boolean;\n replacer?: ReactElement | string;\n}\n\nconst DEFAULT_MAX_LOGIN_WIDTH = 22;\n\nexport const LogonsList: FC = ({\n multidomains,\n logins = [],\n maxListLength = 10,\n replacer = null,\n listStyle,\n deletion,\n editElement,\n maxWidth = DEFAULT_MAX_LOGIN_WIDTH,\n id,\n}) => {\n let list;\n\n if (logins.length > 0) {\n // показываем заданное количество логинов-доменов\n list = logins.slice(0, maxListLength).map(({ login, domain }, index) => {\n if (!login && !domain) {\n return replacer;\n }\n\n return (\n
  • \n {multidomains ? (\n \n ) : (\n \n )}\n {index === 0 && editElement}\n {deletion && (\n deletion.onDelete({ login, domain })}\n classNames={styles.icon}\n size={20}\n loader={deletion.loader === `${login}${domain}`}\n />\n )}\n
  • \n );\n });\n return (\n
      \n {list}\n
    \n );\n }\n\n return <>{replacer};\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"strategyBlockInput\":\"MultipleInput_strategyBlockInput__sAazZ\",\"trashBtn\":\"MultipleInput_trashBtn__mxvmE\"};","import { PlusIcon20Regular as Plus } from '@skbkontur/icons/PlusIcon20Regular';\nimport { TrashCanIcon20Regular as Trash } from '@skbkontur/icons/TrashCanIcon20Regular';\nimport { Button, Gapped, Input } from '@skbkontur/react-ui';\nimport { isEqual } from 'lodash';\nimport { FC, useContext, useEffect, useState } from 'react';\nimport { v4 as uuid } from 'uuid';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport styles from './MultipleInput.module.css';\n\ninterface Props {\n groups: string[];\n onAddNode?: (value: string) => void;\n onDeleteNode?: () => void;\n setFullValue: (value: string[]) => void;\n}\n\nexport const MultipleInput: FC = ({\n groups,\n setFullValue,\n onAddNode,\n onDeleteNode,\n}) => {\n const { tp } = useContext(ServiceCtx);\n const [items, setItems] = useState>({});\n const [newElementId, setNewElementId] = useState();\n\n const sendFullValue = (values: Record) => {\n const groupsList = Object.values(values);\n\n if (!isEqual(groups, groupsList)) {\n setFullValue(groupsList);\n }\n };\n\n useEffect(() => {\n if (newElementId) {\n const lastInput = document.getElementsByName(newElementId)?.[0];\n lastInput?.focus();\n }\n }, [newElementId]);\n\n useEffect(() => {\n const items =\n groups.length > 0\n ? groups.reduce(\n (acc, group) => {\n const itemId = uuid();\n acc[itemId] = group;\n return acc;\n },\n {} as Record\n )\n : { [uuid()]: '' };\n setItems(items);\n }, [groups]);\n\n const onDeleteClick = (id: string) => {\n const copy = { ...items };\n\n if (Object.keys(copy).length === 1) {\n copy[id] = '';\n } else {\n delete copy[id];\n }\n\n setItems(copy);\n sendFullValue(copy);\n onDeleteNode?.();\n };\n\n const onAddClick = () => {\n const newId = uuid();\n setItems({ ...items, [newId]: '' });\n setNewElementId(newId);\n onAddNode?.(newId);\n };\n\n const onChangeValue = (valueObject: Record) => {\n const { value, key } = valueObject;\n const copy = { ...items };\n copy[key] = value || '';\n setItems(copy);\n };\n\n // Используем onMouseDown вместо onClick, чтобы работало после onBlur\n // https://stackoverflow.com/questions/17769005/onclick-and-onblur-ordering-issue\n const renderItems = () =>\n Object.keys(items).map((key, index, arr) => {\n return (\n
    \n onChangeValue({ value, key })}\n onBlur={() => sendFullValue(items)}\n />\n }\n use='text'\n className={styles.trashBtn}\n onMouseDown={(e) => {\n e.preventDefault();\n onDeleteClick(key);\n }}\n />\n {/* К последнему элементу добавляем кнопку добавления поля. */}\n {index === arr.length - 1 && (\n }\n use='text'\n onMouseDown={(e) => {\n e.preventDefault();\n onAddClick();\n }}\n disabled={items[key] === ''}\n />\n )}\n
    \n );\n });\n\n return (\n \n {renderItems()}\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"tabs\":\"MultipleTabs_tabs__hvq-C\",\"unsavedMark\":\"MultipleTabs_unsavedMark__uQDKB\"};","import { PlusIcon20Regular as Plus } from '@skbkontur/icons/PlusIcon20Regular';\nimport { ShapeCircleIcon16Solid as Circle } from '@skbkontur/icons/ShapeCircleIcon16Solid';\nimport { Tabs } from '@skbkontur/react-ui';\nimport { FC, useContext, useEffect, useState } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport styles from './MultipleTabs.module.css';\n\nexport interface TabsType {\n id: string;\n name: string;\n unsaved: boolean;\n}\n\ninterface Props {\n active: TabsType;\n onAddTab: () => void;\n onClickTab: (value: TabsType) => void;\n tabs: TabsType[];\n}\n\nexport const MultipleTabs: FC = ({\n tabs,\n active,\n onAddTab,\n onClickTab,\n}) => {\n const { tp } = useContext(ServiceCtx);\n const EMPTY_TAB_NAME = tp.execute('...');\n const [tabItems, setTabsItems] = useState([]);\n\n useEffect(() => {\n setTabsItems(tabs);\n }, [tabs]);\n\n const circleIcon = ;\n\n const renderItems = () =>\n tabItems.map((key, index, arr) => {\n const tabName = active.id === key.id ? active.name : key.name;\n const unsavedMark = key.unsaved ? circleIcon : null;\n return (\n <>\n onClickTab(key)}>\n {tabName || EMPTY_TAB_NAME}\n {unsavedMark}\n \n {/* К последнему элементу добавляем кнопку добавления вкладки. */}\n {index === arr.length - 1 && (\n \n \n  Добавить\n \n )}\n \n );\n });\n\n return (\n \n {renderItems()}\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"progressChart\":\"ProgressChart_progressChart__5RHkF\",\"doughnut\":\"ProgressChart_doughnut__h1hdi\",\"bg\":\"ProgressChart_bg__ooyJs\",\"progress\":\"ProgressChart_progress__I+g3k\"};","import cn from 'classnames';\nimport { FC, ReactNode } from 'react';\n\nimport { calcNumberFromPercent } from '../../utils/common';\nimport styles from './ProgressChart.module.css';\n\ninterface Props {\n innerIcon?: ReactNode;\n percent: string;\n style?: string;\n}\n\nconst MAX_DASHARRAY_VALUE = 135;\n\nexport const ProgressChart: FC = ({ percent, innerIcon, style }) => {\n const dasharray = calcNumberFromPercent(MAX_DASHARRAY_VALUE, +percent, 2);\n\n return (\n
    \n {innerIcon}\n \n \n {dasharray !== '0' && (\n \n )}\n \n
    \n );\n};\n","import { FC, useEffect } from 'react';\nimport { useNavigate } from 'react-router';\n\nimport { useMetrics } from '../../utils/hooks';\nimport { METRICS_CATEGORIES } from '../../utils/metrics/constants';\nimport { IGlobalLoader } from '..';\n\nexport const Redirect: FC<{ route: string; state?: Record }> = ({\n route,\n state,\n}) => {\n const navigate = useNavigate();\n\n const { track } = useMetrics(METRICS_CATEGORIES.general);\n\n useEffect(() => {\n track('redirect', undefined, { route });\n navigate(route, state);\n }, []);\n\n return ;\n};\n","import { KonturColors } from '@skbkontur/colors';\nimport { SearchLoupeIcon20Light as SearchIcon } from '@skbkontur/icons/SearchLoupeIcon20Light';\nimport { XIcon20Light as XIcon } from '@skbkontur/icons/XIcon20Light';\nimport { Input } from '@skbkontur/react-ui';\nimport {\n FC,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport global from '../../index.module.css';\nimport { DEFAULT_TIME_DELAY } from '../../utils/constants';\nimport { useTimeDebounce } from '../../utils/hooks/useTimeDebounce';\n\ninterface Props {\n className?: string;\n disabled?: boolean;\n initial?: string;\n placeholder?: string;\n reset: boolean;\n setSearch: (value: string) => void;\n size?: 'large' | 'medium' | 'small';\n width?: number;\n}\n\nexport const Search: FC = ({\n reset,\n setSearch,\n initial = '',\n className,\n size = 'medium',\n width = 458,\n placeholder = '',\n disabled = false,\n}) => {\n const { tp } = useContext(ServiceCtx);\n\n const [inputSearchValue, setInputSearchValue] = useState(initial);\n const debounceValue = useTimeDebounce(inputSearchValue, DEFAULT_TIME_DELAY);\n\n const [clearIconMouseEnter, setClearIconMouseEnter] = useState(false);\n const [inputFocus, setInputFocus] = useState(false);\n\n const ref = useRef(null);\n\n useEffect(() => {\n if (reset) {\n setInputSearchValue('');\n }\n }, [reset]);\n\n useEffect(() => {\n if (!ref.current?.['state']['focused']) {\n return;\n }\n\n // не отправляем запрос без debounceValue\n if (debounceValue) {\n setSearch?.(debounceValue.trim());\n } else setSearch?.('');\n }, [debounceValue]);\n\n const onIconMouseEnter = useCallback(() => {\n setClearIconMouseEnter(true);\n }, []);\n\n const onIconMouseLeave = useCallback(() => {\n setClearIconMouseEnter(false);\n }, []);\n\n const onInputFocus = useCallback(() => {\n setInputFocus(true);\n }, []);\n\n const onInputBlur = useCallback(() => {\n setInputFocus(false);\n }, []);\n\n const leftIcon = useMemo(() => {\n if (inputSearchValue)\n return (\n setInputSearchValue('')}\n size={15}\n />\n );\n\n return (\n \n );\n }, [\n inputSearchValue,\n clearIconMouseEnter,\n inputFocus,\n onIconMouseEnter,\n onIconMouseLeave,\n ]);\n\n return (\n \n );\n};\n","import { Select } from '@skbkontur/react-ui';\nimport { FC } from 'react';\n\nimport { TIMEZONES_LIST } from '../../utils/constants';\nimport { getCurrentTimezone } from '../../utils/time';\n\ninterface Props {\n className?: string;\n selected?: string;\n setSelected: (value: string) => void;\n}\nexport const SelectTimezone: FC = ({\n setSelected,\n selected,\n className,\n}) => (\n value}\n renderValue={(value) => value}\n className={className}\n search\n />\n);\n","// extracted by mini-css-extract-plugin\nexport default {\"showMoreButton\":\"ShowMoreButton_showMoreButton__iECsQ\"};","import { ArrowCRightIcon16Regular as Arrow } from '@skbkontur/icons/ArrowCRightIcon16Regular';\nimport { Button } from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport { FC } from 'react';\n\nimport global from '../../index.module.css';\nimport styles from './ShowMoreButton.module.css';\n\ninterface Props {\n buttonStyle?: string;\n iconStyle?: string;\n onClick: () => void;\n restCount: number;\n withArrow?: boolean;\n}\nexport const ShowMoreButton: FC = ({\n restCount,\n onClick,\n withArrow,\n buttonStyle,\n iconStyle,\n}) => (\n \n ) : undefined\n }\n className={cn(styles.showMoreButton, buttonStyle)}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n onClick();\n }}\n use='link'\n >\n еще {restCount}\n \n);\n","import { SideMenu, SideMenuLinkProps } from '@skbkontur/side-menu';\nimport { FC } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\ninterface Props extends SideMenuLinkProps {\n href: string;\n}\n\nexport const SideMenuLink: FC = (props) => {\n const navigate = useNavigate();\n\n return (\n {\n e.preventDefault();\n navigate(props.href);\n }}\n />\n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"statisticsBlock\":\"StatisticsBlock_statisticsBlock__VEieZ\"};","import cn from 'classnames';\nimport { FC, PropsWithChildren } from 'react';\n\nimport styles from './StatisticsBlock.module.css';\n\ninterface Props {\n style?: string;\n}\n\nexport const StatisticsBlock: FC> = ({\n style,\n children,\n}) => {\n return (\n
    {children}
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"statisticsItem\":\"StatisticsItem_statisticsItem__jG1Q1\",\"mainStatText\":\"StatisticsItem_mainStatText__quIZd\",\"statSubText\":\"StatisticsItem_statSubText__xK8Nl\"};","import { FC, ReactNode } from 'react';\n\nimport styles from './StatisticsItem.module.css';\n\ninterface Props {\n icon?: ReactNode;\n main: ReactNode;\n text?: string;\n}\nexport const StatisticsItem: FC = ({ main, icon = null, text }) => (\n
    \n
    \n {icon}\n

    {main}

    \n
    \n {text &&

    {text}

    }\n
    \n);\n","// extracted by mini-css-extract-plugin\nexport default {\"dropdownHeader\":\"TableFilterMenu_dropdownHeader__ZZzFk\"};","import { ArrowCDownIcon16Regular as Arrow } from '@skbkontur/icons/ArrowCDownIcon16Regular';\nimport {\n Button,\n DropdownMenu,\n DropdownMenuProps,\n MenuItem,\n MenuSeparator,\n} from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport { FC, ReactElement, useEffect } from 'react';\n\nimport global from '../../index.module.css';\nimport styles from './TableFilterMenu.module.css';\n\ninterface Props {\n activeIcon?: ReactElement;\n caption: string;\n disabled?: boolean;\n filters?: Record;\n forwardClose?: boolean;\n menuWidth?: number;\n onCancel?: () => void;\n}\n\nexport const TableFilterMenu: FC<\n Props & Omit\n> = ({\n caption,\n activeIcon,\n filters,\n onCancel,\n menuWidth = 185,\n disabled = false,\n forwardClose = false,\n ...props\n}) => {\n const colorStyle = filters ? global.mainText : global.secondaryText;\n let close: () => void;\n let open: () => void;\n\n useEffect(() => {\n forwardClose && close();\n }, [forwardClose]);\n\n return (\n {\n close = closeMenu;\n open = openMenu;\n return (\n }\n onClick={open}\n disabled={disabled}\n borderless\n >\n {caption}\n \n );\n }}\n menuWidth={`${menuWidth}px`}\n className={cn(styles.dropdownHeader, colorStyle)}\n >\n {props.children}\n {onCancel && (\n <>\n \n {\n onCancel();\n close();\n }}\n >\n Сбросить\n \n \n )}\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"filtersPanelBlock\":\"TableFiltersPanel_filtersPanelBlock__zNWLl\"};","import { XCircleIcon16Light as XCircle } from '@skbkontur/icons/XCircleIcon16Light';\nimport { Button } from '@skbkontur/react-ui';\nimport { FC, useContext } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { FilterToken } from '../../ThemedWrapper/ThemedComponents';\nimport { UserSecondFactors } from '../../utils/types';\nimport styles from './TableFiltersPanel.module.css';\n\ninterface FilterResult {\n id: UserSecondFactors;\n title: string;\n}\n\ninterface Props {\n filters: FilterResult[];\n onCancel: () => void;\n onCloseToken: (id: UserSecondFactors) => void;\n}\n\nexport const TableFiltersPanel: FC = ({\n filters,\n onCloseToken,\n onCancel,\n}) => {\n const { tp } = useContext(ServiceCtx);\n return (\n
    \n {filters.map((el) => (\n onCloseToken(el.id)} key={el.id}>\n {tp.execute(el.title)}\n \n ))}\n \n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"row\":\"TableRow_row__-9KaZ\",\"hide\":\"TableRow_hide__eSoCp\",\"kebabWrapper\":\"TableRow_kebabWrapper__O1q0V\"};","import { KonturColors } from '@skbkontur/colors';\nimport { ArrowCRightIcon16Regular as Arrow } from '@skbkontur/icons/ArrowCRightIcon16Regular';\nimport { UiMenuDots3HIcon24Regular as Kebab } from '@skbkontur/icons/UiMenuDots3HIcon24Regular';\nimport { DropdownMenu, Spinner } from '@skbkontur/react-ui';\nimport cn from 'classnames';\nimport { FC, ReactNode } from 'react';\n\nimport { PermissionLevels, PermissionsGuard } from '../../utils/permissions';\nimport styles from './TableRow.module.css';\n\ninterface Props {\n action?: ReactNode[] | 'SidePage';\n className?: string;\n id: string;\n loader?: boolean;\n onClick?: () => void;\n requiredLevelForActions?: PermissionLevels;\n rowContent: ReactNode;\n}\nexport const TableRow: FC = ({\n id,\n rowContent,\n requiredLevelForActions = PermissionLevels.Admin,\n action,\n onClick,\n className,\n loader = false,\n}) => (\n \n {rowContent}\n {action === 'SidePage' && (\n \n )}\n {action !== 'SidePage' && action && (\n \n e.stopPropagation()}\n >\n {loader ? (\n \n ) : (\n \n }\n >\n {action}\n \n )}\n \n \n )}\n \n);\n","// extracted by mini-css-extract-plugin\nexport default {\"tabs\":\"TabsWrapper_tabs__Vvoj0\"};","import { Tabs } from '@skbkontur/react-ui';\nimport { FC, useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router';\n\nimport {\n MachinePAMTabs,\n MachinesPAMTabs,\n RolePAMTabs,\n UserDetailsPageTabs,\n UsersPageTabs,\n} from '../../utils/navigation/pageTabs';\nimport { getAllQueryParams } from '../../utils/urls';\nimport styles from './TabsWrapper.module.css';\n\nexport type PagesTabs =\n | UsersPageTabs\n | UserDetailsPageTabs\n | MachinesPAMTabs\n | MachinePAMTabs\n | RolePAMTabs;\n\nexport interface TabInfo {\n tab: PagesTabs;\n title: string;\n}\n\nexport interface TabsWrapperProps {\n initialTab: PagesTabs;\n keepQueries?: boolean;\n onChangeTab?: (value: PagesTabs) => void;\n tabs: TabInfo[];\n}\n\n/** Компонент содержит логику переключения между вкладками. */\nexport const TabsWrapper: FC = ({\n tabs,\n initialTab,\n onChangeTab,\n keepQueries = false,\n}) => {\n const navigate = useNavigate();\n const [activeTab, setActiveTab] = useState(initialTab);\n\n useEffect(() => {\n setActiveTab(initialTab);\n }, [initialTab]);\n\n useEffect(() => {\n const params = keepQueries ? getAllQueryParams(window.location.href) : '';\n onChangeTab?.(activeTab);\n navigate(`${activeTab.toLowerCase()}${params}`);\n }, [activeTab]);\n\n return (\n setActiveTab(id)}\n >\n {tabs.map(({ tab, title }) => (\n \n {title}\n \n ))}\n \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"timeIntervalWrapper\":\"TimeInterval_timeIntervalWrapper__GgkWl\",\"timeInputStyle\":\"TimeInterval_timeInputStyle__vEU3D\"};","import { Input } from '@skbkontur/react-ui';\nimport { FC } from 'react';\n\nimport {\n DEFAULT_TIME,\n DEFAULT_TIMETABLE_ROW,\n} from '../../components/Roles/EditRoleModal/util';\nimport { BOUND_DASH } from '../../utils/constants';\nimport { DAY_END } from '../../utils/time';\nimport { Null } from '../../utils/types';\nimport { TimetableRow } from '../../utils/types/rolesTypes';\nimport styles from './TimeInterval.module.css';\n\ninterface Props {\n disabled?: boolean;\n roundEnd?: boolean;\n setFullValue: (value: TimetableRow) => void;\n value?: Null;\n}\n\nexport const TimeInterval: FC = ({\n setFullValue,\n value,\n disabled,\n roundEnd,\n}) => {\n const { startTime, endTime } = value || {};\n\n const onValueChange = ({\n inputName,\n inputValue,\n }: {\n inputName: string;\n inputValue: string;\n }) => {\n const prevValue = value ? value : DEFAULT_TIMETABLE_ROW;\n\n // Сделал так для скорости, по хорошему здесь надо пересматривать подход к хранению времени\n prevValue.endTime = prevValue.endTime ?? DEFAULT_TIME;\n prevValue.startTime = prevValue.startTime ?? DEFAULT_TIME;\n\n const newValue = {\n ...prevValue,\n [inputName]: inputValue,\n };\n setFullValue(newValue);\n };\n\n return (\n
    \n \n onValueChange({ inputName: 'startTime', inputValue: value })\n }\n className={styles.timeInputStyle}\n disabled={disabled}\n />\n {BOUND_DASH}\n \n onValueChange({ inputName: 'endTime', inputValue: value })\n }\n className={styles.timeInputStyle}\n disabled={disabled}\n />\n
    \n );\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"trashIcon\":\"TrashIcon_trashIcon__SHQUk\",\"trashLoader\":\"TrashIcon_trashLoader__qHUd8\"};","import { TrashCanIcon16Regular as Trash16 } from '@skbkontur/icons/TrashCanIcon16Regular';\nimport { TrashCanIcon20Regular as Trash20 } from '@skbkontur/icons/TrashCanIcon20Regular';\nimport { Spinner } from '@skbkontur/react-ui';\nimport React from 'react';\n\nimport styles from './TrashIcon.module.css';\n\ninterface Props {\n classNames?: string;\n color?: string;\n loader: boolean;\n onClick?: () => void;\n size?: 16 | 20;\n}\n\nexport const TrashIcon: React.FC = ({\n loader,\n size = 16,\n classNames,\n color = '',\n onClick,\n}) => {\n const trashIcon = loader ? (\n \n ) : size === 16 ? (\n \n ) : (\n \n );\n return trashIcon;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"padWrapper\":\"UserPad_padWrapper__Ak5Jj\"};","import { PeopleCircle1Icon20Regular as Person } from '@skbkontur/icons/PeopleCircle1Icon20Regular';\nimport { FC, ReactNode } from 'react';\n\nimport { Null } from '../../utils/types/';\nimport styles from './UserPad.module.css';\n\ninterface Props {\n login: Null;\n}\nexport const UserPad: FC = ({ login }) => (\n
    \n {login}\n
    \n);\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n const pattern = '[object FormData]';\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) ||\n toString.call(thing) === pattern ||\n (isFunction(thing.toString) && thing.toString() === pattern)\n );\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self;\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[_-\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n if (reducer(descriptor, name, obj) !== false) {\n reducedDescriptors[name] = descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n toJSONObject\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","import FormData from 'form-data';\nexport default FormData;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport envFormData from '../env/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliant(thing) {\n return thing && utils.isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator];\n}\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (envFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && isSpecCompliant(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n (utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default FormData;\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst isStandardBrowserEnv = (() => {\n let product;\n if (typeof navigator !== 'undefined' && (\n (product = navigator.product) === 'ReactNative' ||\n product === 'NativeScript' ||\n product === 'NS')\n ) {\n return false;\n }\n\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n})();\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n isStandardBrowserEnv,\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\nconst DEFAULT_CONTENT_TYPE = {\n 'Content-Type': undefined\n};\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nfunction isValidHeaderName(str) {\n return /^[-_a-zA-Z]+$/.test(str.trim());\n}\n\nfunction matchHeaderValue(context, value, header, filter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear() {\n return Object.keys(this).forEach(this.delete.bind(this));\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent']);\n\nutils.freezeMethods(AxiosHeaders.prototype);\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.isStandardBrowserEnv ?\n\n// Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n const cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n// Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })();\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.isStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n const responseType = config.responseType;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData) && platform.isStandardBrowserEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (platform.isStandardBrowserEnv) {\n // Add xsrf header\n const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))\n && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if(fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n if((adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {\n break;\n }\n }\n\n if (!adapter) {\n if (adapter === false) {\n throw new AxiosError(\n `Adapter ${nameOrAdapter} is not supported by the environment`,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n throw new Error(\n utils.hasOwnProp(knownAdapters, nameOrAdapter) ?\n `Adapter '${nameOrAdapter}' is not available in the build` :\n `Unknown adapter '${nameOrAdapter}'`\n );\n }\n\n if (!utils.isFunction(adapter)) {\n throw new TypeError('adapter is not a function');\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.2.0\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer !== undefined) {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n let contextHeaders;\n\n // Flatten headers\n contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n contextHeaders && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","import { AxiosInstance } from 'axios';\n\nimport { Admin } from '../../types/adminTypes';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport { GetAdminsResponse } from './types';\n\nexport default class AdminsApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем информацию о залогиненном пользователе-админе (auth.sid) */\n public getCurrentUserInfo = async (): Promise => {\n const { data } = await this.axios.get('api/admins/current');\n return data;\n };\n\n /** Получаем список администраторов. */\n public getAdmins = async (\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER,\n query?: string\n ): Promise => {\n const { data } = await this.axios.get('api/admins', {\n params: { skip, take, searchString: query },\n withCredentials: true,\n });\n return data;\n };\n\n /** Удаляем администратора. */\n public deleteAdmin = async (userId: string) => {\n return await this.axios.delete(`api/admins/${userId}`);\n };\n\n /** Редактируем права администратора. */\n public patchAdmin = async (userId: string, isSuperAdmin: boolean) => {\n return await this.axios.patch(\n `api/admins/${userId}/?isSuperAdmin=${isSuperAdmin}`\n );\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { UserInvite } from '../../types';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport { GetAdminsInvitesResponse } from './types';\n\nexport default class AdminsInvitesApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем список инвайтов администраторам. */\n public getAdminsInvites = async (\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n 'api/admins/registration/invitation',\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /** Получаем информацию по конкретному инвайту администратору. */\n public getAdminInvite = async (inviteId: string): Promise => {\n const { data } = await this.axios.get(\n `api/admins/registration/invitation/${inviteId}`\n );\n return data;\n };\n\n /** Отправляем инвайт администратору. Метод возвращает inviteId. */\n public sendNewAdminInvite = async (address: string, isSuperAdmin = false) => {\n return this.axios.put<{ inviteId: string }>(\n 'api/admins/registration/invitation',\n {\n address,\n isSuperAdmin,\n }\n );\n };\n\n /** Удаляем инвайт администратору. */\n public deleteAdminInvite = async (inviteId: string) => {\n return await this.axios.delete(\n `api/admins/registration/invitation/${inviteId}`\n );\n };\n\n /** Переотправляем инвайт администратору. */\n public resendAdminInvite = async (inviteId: string) => {\n return await this.axios.post(\n `api/admins/registration/invitation/${inviteId}`\n );\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { ActiveSyncConfigurationResponse } from './types';\n\nexport default class ActiveSyncApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Удаление конфигурации ActiveSync. */\n public deleteConfiguration = async (configId: string): Promise => {\n return await this.axios\n .delete(`api/configurations/active-sync/${configId}`)\n .then((response) => response.data);\n };\n\n /** Создаем новую конфигурацию. */\n public saveActiveSyncConfiguration = async (\n config: ActiveSyncConfigurationResponse\n ): Promise => {\n return await this.axios\n .post('api/configurations/active-sync', config)\n .then((response) => response.data);\n };\n\n public getAllActiveSyncConfigurations = async (\n signal?: AbortSignal\n ): Promise => {\n const { data } = await this.axios.get(\n 'api/configurations/active-sync',\n { signal }\n );\n return data;\n };\n\n /**\n * Получаем файл для скачивания с конфигурацией ActiveSync.\n *\n * @param id Идентификатор конфигурации ActiveSync.\n */\n public getActiveSyncConfigFile = async (id: string) => {\n const res = await this.axios.get(`/api/configurations/active-sync/${id}`, {\n responseType: 'blob',\n });\n return new File([res.data], 'config-file');\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { SourceNames } from '../../types';\nimport { SourceTypes } from '../../types/sourceTypes';\n\n/** Общие для всех конфигураций эндпоинты. */\nexport default class ConfigurationsApi {\n private axios: AxiosInstance;\n\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /**\n * Удаляем конфигурацию по configurationId.\n *\n * @param sourceType Тип ресурса.\n * @param sourceName Имя текущего ресурса.\n * @param configurationId Идетификатор удаляемой конфигурации.\n */\n public deleteConfiguration = async (\n sourceType: SourceTypes,\n sourceName: SourceNames,\n configurationId: string\n ): Promise => {\n await this.axios.delete(\n `api/configurations/${sourceType}/${sourceName}/${configurationId}`\n );\n return;\n };\n\n /**\n * Получаем файл с конфигурацией для скачивания.\n *\n * @param sourceType Тип ресурса.\n * @param sourceName Имя текущего ресурса.\n * @param configurationId Идетификатор конфигурации.\n */\n public getConfigFileUrl = async (\n sourceType: SourceTypes,\n sourceName: SourceNames,\n configurationId: string\n ) => {\n const res = await this.axios.get(\n `/api/source/${sourceType}/${sourceName}/${configurationId}`,\n {\n responseType: 'blob',\n }\n );\n return new File([res.data], `${sourceName}-config-file`);\n };\n\n /** Получаем файл конфигурации OWA. */\n public getOWAAdapterUrl = async () => {\n const res = await this.axios.get('/api/configurations/Owa-Adapter', {\n responseType: 'blob',\n });\n return new File([res.data], 'Owa-config-file');\n };\n\n /** Получаем файл конфигурации ADFS. */\n public getADFSAdapterUrl = async () => {\n const res = await this.axios.get('/api/configurations/Adfs-Adapter', {\n responseType: 'blob',\n });\n return new File([res.data], 'Adfs-config-file');\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport {\n ParsedRadiusProxySourceConfiguration,\n Platforms,\n SourceConfiguration,\n SourceNames,\n SourceTypes,\n} from '../../types';\nimport { RadiusConfigurationResponse } from './types';\n\n/** Эндпоинты для работы с конфигурациями RDG в сервисе PAM. */\nexport default class PamRdgApi {\n private axios: AxiosInstance;\n\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /**\n * Получаем список конфигураций для текущего ресурса Pam Radius Rdg.\n *\n * @param sourceName Имя текущего ресурса.\n */\n public getConfigurations = async (\n sourceName: SourceNames\n ): Promise => {\n const { data } = await this.axios.get(\n `api/configurations/${SourceTypes.PamRadiusRdg}/${sourceName}`\n );\n return {\n resourceId: sourceName,\n configurations: data,\n };\n };\n\n /**\n * Сериализуем и сохраняем Pam Radius Rdg конфигурацию.\n *\n * @param sourceName Имя текущего ресурса Pam Radius Rdg.\n * @param configurationId Идетификатор сохраняемой конфигурации.\n * @param name Название сохраняемой конфигурации.\n * @param platform Платформа конфигурации.\n * @param config Поля сохраняемой конфигурации.\n */\n public saveConfiguration = async (\n sourceName: SourceNames,\n configurationId: string,\n name: string,\n platform: Platforms,\n config: ParsedRadiusProxySourceConfiguration\n ): Promise => {\n const serialized = {\n configuration: JSON.stringify(config, null, '\\t'),\n name,\n platform,\n };\n await this.axios.post(\n `api/configurations/${SourceTypes.PamRadiusRdg}/${sourceName}/${configurationId}`,\n JSON.stringify(serialized),\n {\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport {\n ParsedRadiusProxySourceConfiguration,\n Platforms,\n SourceConfiguration,\n SourceNames,\n SourceTypes,\n} from '../../types';\nimport {\n RadiusConfigurationResponse,\n RadiusSourceConfigurationResponse,\n} from './types';\n\n/** Эндпоинты для работы с конфигурациями RADIUS ресурсов. */\nexport default class RadiusApi {\n private axios: AxiosInstance;\n\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /**\n * Получаем список конфигураций для текущего ресурса RadiusProxy.\n *\n * @param sourceName Имя текущего ресурса.\n */\n public getConfigurations = async (\n sourceName: SourceNames\n ): Promise => {\n const { data } = await this.axios.get(\n `api/configurations/${SourceTypes.RadiusProxy}/${sourceName}`\n );\n return {\n resourceId: sourceName,\n configurations: data,\n };\n };\n\n /**\n * Сериализуем и сохраняем RadiusProxy конфигурацию.\n *\n * @param sourceName Имя текущего ресурса RadiusProxy.\n * @param configurationId Идетификатор сохраняемой конфигурации.\n * @param name Название сохраняемой конфигурации.\n * @param platform Платформа конфгурации.\n * @param config Поля сохраняемой конфигурации.\n */\n public saveConfiguration = async (\n sourceName: SourceNames,\n configurationId: string,\n name: string,\n platform: Platforms,\n config: ParsedRadiusProxySourceConfiguration\n ): Promise => {\n const serialized = {\n configuration: JSON.stringify(config, null, '\\t'),\n name,\n platform,\n };\n await this.axios.post(\n `api/configurations/${SourceTypes.RadiusProxy}/${sourceName}/${configurationId}`,\n JSON.stringify(serialized),\n {\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n };\n\n /**\n * Получаем конфигурацию для текущего RADIUS ресурса по configurationId.\n *\n * @param sourceType Тип ресурса.\n * @param sourceName Имя текущего ресурса RadiusProxy.\n * @param configurationId Идетификатор конфигурации.\n */\n public getConfiguration = async (\n sourceType: SourceTypes,\n sourceName: SourceNames,\n configurationId: string\n ): Promise => {\n const { data } = await this.axios.get(\n `api/configurations/${sourceType}/${sourceName}/${configurationId}`\n );\n return data;\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { SourceNames, SourceTypes } from '../../types';\nimport { SshSettingsRecord } from '../../types/sshConfigurationTypes';\nimport { SshConfigurationsResponse } from './types';\n\n/** Эндпоинты для работы с конфигурациями SSH. */\nexport default class SshApi {\n private axios: AxiosInstance;\n\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем список конфигураций для ресурса SSH. */\n public getConfigurations = async (): Promise => {\n const { data } = await this.axios.get(\n `api/settings/${SourceTypes.RadiusProxy}/${SourceNames.SSH}`\n );\n return data;\n };\n\n /**\n * Сериализуем и сохраняем SSH конфигурацию.\n *\n * @param configurationId Идетификатор сохраняемой конфигурации.\n * @param name Название сохраняемой конфигурации.\n * @param configurations Поля сохраняемой конфигурации.\n */\n public saveConfiguration = async (\n configurationId: string,\n name: string,\n configurations: SshSettingsRecord\n ): Promise => {\n await this.axios.post(\n `api/settings/${SourceTypes.RadiusProxy}/${SourceNames.SSH}/${configurationId}`,\n JSON.stringify({\n name,\n configurations,\n }),\n {\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n };\n\n /**\n * Удаляем конфигурацию SSH по settingsId.\n *\n * @param settingsId Идетификатор удаляемой конфигурации SSH.\n */\n public deleteConfiguration = async (settingsId: string): Promise => {\n await this.axios.delete(\n `api/settings/${SourceTypes.RadiusProxy}/${SourceNames.SSH}/${settingsId}`\n );\n return;\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { SourceNames, SourceTypes, WindowsSettingsRecord } from '../../types';\nimport { WindowsConfigurationResponse } from './types';\n\n/** Эндпоинты для работы с конфигурациями Windows. */\nexport default class WindowsApi {\n private axios: AxiosInstance;\n\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем список конфигураций для ресурса Windows. */\n public getConfigurations =\n async (): Promise => {\n const { data } = await this.axios.get(\n `api/settings/${SourceTypes.Windows}/${SourceNames.Windows}`\n );\n return data;\n };\n\n /**\n * Сериализуем и сохраняем Windows конфигурацию.\n *\n * @param configurationId Идетификатор сохраняемой конфигурации.\n * @param name Название сохраняемой конфигурации.\n * @param configurations Поля сохраняемой конфигурации.\n */\n public saveConfiguration = async (\n configurationId: string,\n name: string,\n configurations: WindowsSettingsRecord\n ): Promise => {\n await this.axios.post(\n `api/settings/${SourceTypes.Windows}/${SourceNames.Windows}/${configurationId}`,\n JSON.stringify({\n name,\n configurations,\n }),\n {\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n };\n\n /**\n * Удаляем конфигурацию Windows по settingsId.\n *\n * @param settingsId Идетификатор удаляемой конфигурации.\n */\n public deleteConfiguration = async (settingsId: string): Promise => {\n await this.axios.delete(\n `api/settings/${SourceTypes.Windows}/${SourceNames.Windows}/${settingsId}`\n );\n return;\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport Storage from '../../storage';\nimport { GetEnvironmentSettingsResponse } from './types';\n\nconst { localStorage } = new Storage();\n\nexport default class EnvironmentSettingsApi {\n private axios: AxiosInstance;\n\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n public getEnvironmentSettings =\n async (): Promise => {\n const { data } = await this.axios.get(\n 'api/environment/settings',\n {\n withCredentials: true,\n }\n );\n this.saveEnvironmentSettings(data);\n return data;\n };\n\n private saveEnvironmentSettings = (data: GetEnvironmentSettingsResponse) => {\n localStorage.setEnvironmentSettings(data);\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { EventsFilters } from '../../types';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport { GetEventsResponse, GetEventUsersResponse } from './types';\n\nexport default class EventsApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем список событий. */\n public getEvents = async (\n filters: EventsFilters,\n skip = DEFAULT_SKIP_NUMBER,\n take = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get('api/events', {\n params: { ...filters, skip, take },\n withCredentials: true,\n });\n return data;\n };\n\n /**\n * Получаем события по логину. Используется для отображения подсказки в поле\n * поиска.\n */\n public getEventLogins = async (\n loginPrefix: string,\n skip = DEFAULT_SKIP_NUMBER,\n take = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n 'api/events/logins',\n {\n params: { skip, take, loginPrefix },\n withCredentials: true,\n }\n );\n return data;\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { OnPremLicenseStatusResponse } from './types';\n\nexport default class LicenseApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем статус лицензии OnPrem инсталляции. */\n public getOnPremLicenseStatus =\n async (): Promise => {\n const { data } = await this.axios.get(\n 'api/license/status',\n { withCredentials: true }\n );\n return data;\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { MachineSettings, PamMachine } from '../../types/pamResourceTypes';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport { GetMachinesListResponse } from './types';\n\n/** Апи-контракт для работы с машинами PAM (ресурсами). */\nexport default class MachinesApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /**\n * Добавляем ресурс PAM.\n *\n * @param name Название ресурса.\n * @param description Описание ресурса.\n * @param settings Настройки ресурса.\n */\n public createPamResource = async (\n name: string,\n description = '',\n settings: MachineSettings\n ): Promise => {\n const { data } = await this.axios.post(\n 'api/resources',\n JSON.stringify({\n name,\n description,\n resourceType: settings.resourceType,\n settings,\n }),\n {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n return data;\n };\n\n /**\n * Обновляем информацию о ресурсе PAM.\n *\n * @param name Название ресурса.\n * @param description Описание ресурса.\n * @param settings Настройки ресурса.\n * @param id Идентификатор ресурса.\n */\n public updatePamResource = async (\n name: string,\n description: string | undefined,\n settings: MachineSettings,\n id: string\n ): Promise => {\n const { data } = await this.axios.put(\n 'api/resources',\n JSON.stringify({ name, description, settings, id }),\n {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n return data;\n };\n\n /**\n * Получаем список активных ресурсов PAM.\n *\n * @param skip Количество пропускаемых элементов в списке.\n * @param take Количество элементов из списка, которе необходимо\n * вернуть.\n * @param searchString Поисковая строка.\n */\n public getActivePamResourcesList = async (\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER,\n searchString?: string\n ): Promise => {\n const { data } = await this.axios.get(\n 'api/resources',\n {\n params: { skip, take, searchString },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /**\n * Получаем ресурс PAM по идентификатору.\n *\n * @param id Идентификатор ресурса.\n */\n public getPamResourceById = async (id: string): Promise => {\n const { data } = await this.axios.get(`api/resources/${id}`, {\n withCredentials: true,\n });\n return data;\n };\n\n /**\n * Удаляем ресурс PAM.\n *\n * @param id Идентификатор удаляемого ресурса.\n */\n public deletePamResource = async (id: string): Promise => {\n await this.axios.delete(`api/resources/${id}`, {\n withCredentials: true,\n });\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { Organization } from '../../types';\nimport { DEFAULT_ERRORS_TAKE_NUMBER, DEFAULT_SKIP_NUMBER } from '..';\nimport { GetBatchOperationsErrorsResponse } from './types';\n\nexport default class OrganizationsApi {\n private axios: AxiosInstance;\n\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем информацию об организации. */\n public getOrganization = async () => {\n const { data } = await this.axios.get('api/organization');\n return data;\n };\n\n public getOrganizationErrors = async ({\n take = DEFAULT_ERRORS_TAKE_NUMBER,\n skip = DEFAULT_SKIP_NUMBER,\n }): Promise => {\n const { data } = await this.axios.get(\n `api/organization/errors?take=${take}&skip=${skip}`\n );\n\n return data;\n };\n\n public deleteOrganizationErrors = async (): Promise => {\n await this.axios.delete(`api/organization/errors`);\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { Permission } from '../../types/permissionsTypes';\nimport {\n GetPermissionsByAgentResponse,\n GetPermissionsByRoleResponse,\n} from './types';\n\n/**\n * PAM. Апи-контракт для работы с разрешениями. Разрешения объединяют агентов\n * (ресурсы) и роли.\n */\nexport default class PermissionsApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /**\n * Создаем разрешение.\n *\n * @param roleId Идентификатор роли.\n * @param resourceId Идентификатор агента.\n */\n public createPermission = async (\n roleId: string,\n resourceId: string\n ): Promise => {\n const { data } = await this.axios.post(\n 'api/permissions',\n JSON.stringify({ roleId, resourceId }),\n {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n return data;\n };\n\n /**\n * Получаем все разрешения для конкретного агента с информацией о ролях.\n *\n * @param resourceId Идентификатор агента.\n */\n public getPermissionsByAgentId = async (\n resourceId: string\n ): Promise => {\n const { data } = await this.axios.get(\n `api/permissions/resource/${resourceId}`,\n { withCredentials: true }\n );\n return data;\n };\n\n /**\n * Получаем все разрешеня для конкретной роли с информацией о ресурсах.\n *\n * @param roleId Идентификатор роли.\n */\n public getPermissionsByRoleId = async (\n roleId: string\n ): Promise => {\n const { data } = await this.axios.get(\n `api/permissions/role/${roleId}`,\n { withCredentials: true }\n );\n return data;\n };\n\n /** Удаляем разрешение. */\n public deletePermission = async (\n roleId: string,\n resourceId: string\n ): Promise => {\n await this.axios.delete(`api/permissions`, {\n withCredentials: true,\n params: { roleId, resourceId },\n });\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport {\n BaseRoleInfo,\n ExpandedBaseRoleInfo,\n RoleInfo,\n} from '../../types/rolesTypes';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport {\n GetRolesInfoResponse,\n GetUserRolesResponse,\n PatchRolesToGroupsRequest,\n PatchRolesToUsersRequest,\n} from './types';\n\nexport default class RolesApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /**\n * Получаем список ролей организации.\n *\n * @param skip Количество пропускаемых элементов в списке.\n * @param take Количество элементов из списка, которе необходимо\n * вернуть.\n * @param searchString Поисковая строка.\n */\n public getRolesList = async (\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER,\n searchString?: string\n ): Promise => {\n const { data } = await this.axios.get('api/roles', {\n params: { skip, take, searchString },\n withCredentials: true,\n });\n return data;\n };\n\n /**\n * Получаем роль по id.\n *\n * @param id Идентификатор роли.\n */\n public getRoleById = async (id: string): Promise => {\n const { data } = await this.axios.get(`api/roles/${id}`, {\n withCredentials: true,\n });\n return data;\n };\n\n /**\n * Создаем роль.\n *\n * @param role Информация о создаваемой роли.\n */\n public createRole = async (role: BaseRoleInfo): Promise => {\n const { data } = await this.axios.post(\n 'api/roles',\n JSON.stringify(role),\n {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n return data;\n };\n\n /**\n * Обновляем роль.\n *\n * @param role Обновляемая роль.\n */\n public updateRole = async (role: ExpandedBaseRoleInfo): Promise => {\n const { data } = await this.axios.put(\n 'api/roles',\n JSON.stringify(role),\n {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n return data;\n };\n\n /**\n * Удаляем роль.\n *\n * @param id Идентификатор удаляемой роли.\n */\n public deleteRole = async (id: string): Promise => {\n await this.axios.delete(`api/roles/${id}`, {\n withCredentials: true,\n });\n };\n\n /** ## --------------------- Взаимодействие роли и пользователя */\n\n /**\n * Получаем список ролей пользователя.\n *\n * @param userId Идентификатор пользователя.\n * @param skip Количество пропускаемых элементов в списке.\n * @param take Количество элементов из списка, которе необходимо вернуть.\n */\n public getRolesByUserId = async (\n userId: string,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n `api/roles/user/${userId}`,\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /**\n * Добавляем и удаляем роли у пользователей.\n *\n * @param links Связки ролей и пользователей.\n */\n public patchRolesToUsersBindings = async (\n links: PatchRolesToUsersRequest\n ): Promise => {\n await this.axios.patch(\n 'api/roles/link/users',\n JSON.stringify(links),\n {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n );\n };\n\n /** ## --------------------- Взаимодействие роли и группы */\n\n /**\n * Добавляем и удаляем роли у групп.\n *\n * @param links Связки ролей и групп.\n */\n public patchRolesToGroupsBindings = async (\n links: PatchRolesToGroupsRequest\n ): Promise => {\n await this.axios.patch('api/roles/link/groups', links, {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json',\n },\n });\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { SessionsFilters } from '../../types/sessionsTypes';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport { GetSessionsByResourceResponse, GetSessionsResponse } from './types';\n\nexport default class SessionsApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем список всех сессий организации. */\n public getSessions = async (\n filters: SessionsFilters,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get('api/sessions', {\n params: { skip, take, ...filters },\n withCredentials: true,\n });\n return data;\n };\n\n /** Получаем список сессий пользователя. */\n public getSessionsByUserId = async (\n userId: string,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n `api/sessions/user/${userId}`,\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /** Получаем список сессий ресурса. */\n public getSessionsByResourceId = async (\n resourceId: string,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n `api/sessions/resource/${resourceId}`,\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /** Разрываем сессию. */\n public closeSession = async (sessionId: string): Promise => {\n await this.axios.patch(`api/sessions/${sessionId}/close`, null, {\n withCredentials: true,\n });\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport { GetGroupsResponse, GetUsersResponse } from './types';\n\nexport default class GroupsApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем список групп пользователей. */\n public getGroups = async (\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER,\n searchString?: string\n ): Promise => {\n const { data } = await this.axios.get('api/groups', {\n params: { skip, take, searchString },\n withCredentials: true,\n });\n return data;\n };\n\n /** Получаем состав группы по groupId. */\n public getGroupMembersById = async (\n groupId: string,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n `api/groups/${groupId}/members`,\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /** Получаем список групп для определенной роли. */\n public getGroupsByRoleId = async (\n roleId: string,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n `api/groups/role/${roleId}`,\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /** Получаем список групп для определенного пользователя. */\n public getGroupsByUserId = async (\n userId: string,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n `api/groups/user/${userId}`,\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n}\n","import { SecondFactorFilter } from '../../../components/Users/utils';\nimport { notEmpty } from '../../common';\n\n/**\n * Формируем объект для передачи в квери параметры для фильтрации пользователей\n * по второму фактору.\n *\n * @param filters Фильтры.\n */\nexport const get2FactorFiltersQuery = (\n filters?: SecondFactorFilter\n): Record => {\n if (!filters || !notEmpty(filters?.has2F)) {\n return {};\n }\n\n const { has2F, secondFactors } = filters;\n\n if (!has2F) {\n return { has2F: false };\n }\n\n return secondFactors?.length\n ? { has2F: true, secondFactors: secondFactors.join(',') }\n : { has2F: true };\n};\n","import { AxiosInstance } from 'axios';\n\nimport {\n SecondFactorFilter,\n UsersSorting,\n} from '../../../components/Users/utils';\nimport { IUser, LogonName } from '../../types';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport {\n GetRolesMembersResponse,\n GetUsersResponse,\n UsersBatchOperationsRequest,\n UsersStatisticsResponse,\n} from './types';\nimport { get2FactorFiltersQuery } from './utils';\n\nexport default class UsersApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n /** Получаем список пользователей. */\n public getUsers = async (\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER,\n query?: string,\n sorting?: UsersSorting,\n filters?: SecondFactorFilter,\n signal?: AbortSignal\n ): Promise => {\n const sort = sorting || {};\n const filter = get2FactorFiltersQuery(filters);\n const { data } = await this.axios.get('api/users', {\n params: { skip, take, searchString: query, ...sort, ...filter },\n withCredentials: true,\n signal,\n });\n return data;\n };\n\n /** Получаем список пользователей по id роли. */\n public getUsersByRoleId = async (\n roleId: string,\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n `api/roles/${roleId}/users`,\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /** Ищем пользователей по списку. */\n public getUsersBatch = async (userIdsList: string[]): Promise => {\n const { data } = await this.axios.post('api/users/batch', {\n userIds: userIdsList,\n });\n return data;\n };\n\n /** Создаем пользователя. */\n public createUser = async (login: string, email: string) => {\n return this.axios.post(`api/users/?login=${login}&email=${email}`);\n };\n\n /** Удаляем пользователя. */\n public deleteUser = async (userId: string) => {\n return await this.axios.delete(`api/users/${userId}`);\n };\n\n /**\n * Массовое удлаление пользователей KID-857.\n *\n * @param params Параметры удаления пользователей:\n *\n * - Список id пользователей на удаление либо:\n * - Список id пользователей, которых не нужно удалять, если удаление по\n * фильтрам.\n * - Фильтры для поиска пользователей.\n * - Параметры сортировки польхователей.\n */\n public deleteUsers = async (params: UsersBatchOperationsRequest) =>\n await this.axios.delete(`api/users/batch`, {\n data: JSON.stringify(params),\n });\n\n /** Удаляем логин-домен пользователя. */\n public deleteLogin = async (userId: string, login: string, domain = '') => {\n return await this.axios.delete(`api/users/${userId}/bindings`, {\n params: { login, domain },\n });\n };\n\n /** Добавляем пользователю логин-домен. */\n public addLogin = async (userId: string, logonName: string) => {\n const { data } = await this.axios.post(\n `api/users/${userId}/bindings`,\n null,\n {\n params: { logonName },\n }\n );\n return data;\n };\n\n /** Обновляем информацию у пользователях. */\n public patchUser = async (\n user: IUser,\n updates: Partial,\n deletes: string[] = []\n ) => {\n return await this.axios.patch(`api/users/${user.userId}`, {\n ...updates,\n deletes,\n });\n };\n\n /** Удаляем устройства ТОТП. */\n public deleteDevices = async (userId: string) => {\n return await this.axios.delete('api/devices', { params: { userId } });\n };\n\n /** Удаляем телефон пользователя. */\n public deletePhone = async (userId: string) => {\n return await this.axios.delete('api/phone', { params: { userId } });\n };\n\n /** Получаем статистику по пользователям. */\n public getUsersStatistics = async (): Promise => {\n const { data } = await this.axios.get('api/statistics/users');\n return data;\n };\n\n /** Получаем файл .csv со списком пользователей. */\n public getXlsFile = async (): Promise => {\n const res = await this.axios.get(`/api/statistics/users/report`, {\n responseType: 'blob',\n timeout: 600000,\n });\n return new File([res.data], 'users-list');\n };\n\n /** Блокируем пользователя. */\n public blockUser = async (userId: string): Promise => {\n await this.axios.patch(`api/users/${userId}/block`);\n };\n\n /** Разлокируем пользователя. */\n public unblockUser = async (userId: string): Promise => {\n await this.axios.patch(`api/users/${userId}/unblock`);\n };\n\n /** Получаем файл синхронизатора с ActiveDirectory. */\n public getADSynchronizerUrl = async () => {\n const res = await this.axios.get(\n '/api/ad-sync/ActiveDirectory-Synchronizer',\n {\n responseType: 'blob',\n }\n );\n return new File([res.data], 'AD-Synchronizer');\n };\n}\n","import { AxiosInstance } from 'axios';\n\nimport { UserInvite } from '../../types';\nimport { DEFAULT_SKIP_NUMBER, DEFAULT_TAKE_NUMBER } from '..';\nimport {\n GetInvitesBatchStatusResponse,\n GetUsersInvitesResponse,\n} from './types';\n\nexport default class UsersInvitesApi {\n private axios: AxiosInstance;\n public constructor(axios: AxiosInstance) {\n this.axios = axios;\n }\n\n public getUsersInvitationBatch = async (\n signal?: AbortSignal\n ): Promise => {\n const { data } = await this.axios.get(\n `api/registration/invitation/batch`,\n {\n withCredentials: true,\n signal,\n }\n );\n return data;\n };\n\n public sendUsersInvitationsBatch = async (file: File) => {\n return await this.axios.post(\n `api/registration/invitation/batch`,\n {\n file,\n },\n {\n withCredentials: true,\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n }\n );\n };\n\n /** Получаем список инвайтов пользователям. */\n public getUsersInvites = async (\n skip: number = DEFAULT_SKIP_NUMBER,\n take: number = DEFAULT_TAKE_NUMBER\n ): Promise => {\n const { data } = await this.axios.get(\n 'api/registration/invitation',\n {\n params: { skip, take },\n withCredentials: true,\n }\n );\n return data;\n };\n\n /** Получаем информацию по конкретному инвайту пользователю. */\n public getUserInvite = async (inviteId: string): Promise => {\n const { data } = await this.axios.get(\n `api/registration/invitation/${inviteId}`\n );\n return data;\n };\n\n /** Отправляем инвайт пользователю по почте. Метод возвращает inviteId. */\n public sendUserInviteByEmail = async (email: string, logonName: string) => {\n return await this.axios.put(\n `api/registration/invitation/email-invitation/${email}`,\n {\n logonName,\n }\n );\n };\n\n /** Отправляем инвайт пользователю по телефону. Метод возвращает inviteId. */\n public sendUserInviteByPhone = async (phone: string, logonName: string) => {\n return await this.axios.put(\n `api/registration/invitation/phone-invitation/${phone}`,\n {\n logonName,\n }\n );\n };\n\n /** Генерируем ссылку для регистрации пользователя. */\n public getUserRegistrationLink = async (logonName: string) => {\n const { data } = await this.axios.put<{ link: string }>(\n 'api/registration/link',\n {\n logonName,\n }\n );\n return data?.link;\n };\n\n /** Удаляем инвайт пользователю. */\n public deleteUserInvite = async (inviteId: string) => {\n return await this.axios.delete(\n `api/registration/invitation/${inviteId}`\n );\n };\n\n /** Переотправляем инвайт пользователю. */\n public resendUserInvite = async (inviteId: string) => {\n return await this.axios.post(\n `api/registration/invitation/${inviteId}`\n );\n };\n}\n","import axios, { AxiosInstance, AxiosResponse } from 'axios';\n\nimport { getAccessDeniedUrl, getLogInUrl } from '../urls';\nimport AdminsApi from './AdminsApi/AdminsApi';\nimport AdminsInvitesApi from './AdminsApi/AdminsInvitesApi';\nimport ActiveSyncApi from './ConfigurationsApi/ActiveSyncApi';\nimport ConfigurationsApi from './ConfigurationsApi/ConfigurationsApi';\nimport PamRdgApi from './ConfigurationsApi/PamRdgApi';\nimport RadiusApi from './ConfigurationsApi/RadiusApi';\nimport SshApi from './ConfigurationsApi/SshApi';\nimport WindowsApi from './ConfigurationsApi/WindowsApi';\nimport EnvironmentSettingsApi from './EnvironmentSettingsApi/EnvironmentSettingsApi';\nimport EventsApi from './EventsApi/EventsApi';\nimport LicenseApi from './LicenseApi/LicenseApi';\nimport MachinesApi from './MachinesApi/MachinesApi';\nimport OrganizationsApi from './OrganizationsApi/OrganizationsApi';\nimport PermissionsApi from './PermissionsApi/PermissionsApi';\nimport RolesApi from './RolesApi/RolesApi';\nimport SessionsApi from './SessionsApi/SessionsApi';\nimport GroupsApi from './UsersApi/GroupsApi';\nimport UsersApi from './UsersApi/UsersApi';\nimport UsersInvitesApi from './UsersApi/UsersInvitesApi';\nimport { ResponseStatuses } from './utils';\n\nconst DEFAULT_AJAX_TIMEOUT = 60000;\nexport const DEFAULT_TAKE_NUMBER = 30;\nexport const DEFAULT_SKIP_NUMBER = 0;\nexport const DEFAULT_ERRORS_TAKE_NUMBER = 50;\n\nexport interface ErrorResponse {\n error: {\n code: string;\n message: string;\n };\n statusCode: number;\n traceId: string;\n}\n\nexport class ApiError extends Error {\n public traceId: string;\n public code: string;\n public status: number | undefined;\n constructor(\n details: ErrorResponse,\n traceIdFromHeader?: string,\n status?: number\n ) {\n super(details?.error?.code);\n this.traceId = traceIdFromHeader || details.traceId;\n this.code = details?.error?.code;\n this.status = status;\n }\n}\n\nconst checkAuth = (response: AxiosResponse) => {\n if (response.status === ResponseStatuses.Unauthorized) {\n window.location.assign(getLogInUrl());\n }\n\n if (response.status === ResponseStatuses.Forbidden) {\n window.location.assign(getAccessDeniedUrl());\n }\n};\n\nconst handleError = (error: any) => {\n if (error.response) {\n const response = error.response as AxiosResponse;\n checkAuth(response);\n throw new ApiError(\n response.data,\n response.headers['x-kontur-trace-id'],\n response.status\n );\n } else {\n return error;\n }\n};\n\nexport default class Api {\n public Users: UsersApi;\n public Admins: AdminsApi;\n public UsersInvites: UsersInvitesApi;\n public AdminsInvites: AdminsInvitesApi;\n public Organizations: OrganizationsApi;\n public Configurations: ConfigurationsApi;\n public ActiveSync: ActiveSyncApi;\n public Radius: RadiusApi;\n public Windows: WindowsApi;\n public Ssh: SshApi;\n public Events: EventsApi;\n public EnvironmentSettings: EnvironmentSettingsApi;\n /** PAM. */\n public PamRdg: PamRdgApi;\n public Groups: GroupsApi;\n public Sessions: SessionsApi;\n public Roles: RolesApi;\n public PamResources: MachinesApi;\n public Permissions: PermissionsApi;\n /** OnPrem. */\n public License: LicenseApi;\n\n private readonly axios: AxiosInstance;\n\n public constructor() {\n // Создаем инстанс axios\n this.axios = axios.create({\n timeout: DEFAULT_AJAX_TIMEOUT,\n // отсутствие origin в ие11\n baseURL: new URL(window.location.href).origin,\n });\n\n // Дефолтные заголовки для всех запросов\n this.axios.defaults.headers.common['Content-Type'] = 'application/json';\n\n this.Users = new UsersApi(this.axios);\n this.Admins = new AdminsApi(this.axios);\n this.Organizations = new OrganizationsApi(this.axios);\n this.Configurations = new ConfigurationsApi(this.axios);\n this.ActiveSync = new ActiveSyncApi(this.axios);\n this.Radius = new RadiusApi(this.axios);\n this.Windows = new WindowsApi(this.axios);\n this.Ssh = new SshApi(this.axios);\n this.PamRdg = new PamRdgApi(this.axios);\n this.UsersInvites = new UsersInvitesApi(this.axios);\n this.AdminsInvites = new AdminsInvitesApi(this.axios);\n this.Events = new EventsApi(this.axios);\n this.EnvironmentSettings = new EnvironmentSettingsApi(this.axios);\n this.Groups = new GroupsApi(this.axios);\n this.Sessions = new SessionsApi(this.axios);\n this.Roles = new RolesApi(this.axios);\n this.PamResources = new MachinesApi(this.axios);\n this.Permissions = new PermissionsApi(this.axios);\n this.License = new LicenseApi(this.axios);\n\n // Добавляем проверку ответов на ошибки\n this.axios.interceptors.response.use(\n (response) => {\n return response;\n },\n (error) => {\n handleError(error);\n }\n );\n }\n}\n","export enum ResponseStatuses {\n Unauthorized = 401,\n Forbidden = 403,\n Conflict = 409,\n NotFound = 404,\n}\n\nexport const AccessErrors = [\n ResponseStatuses.Forbidden,\n ResponseStatuses.Unauthorized,\n];\n","import { SyntheticEvent } from 'react';\n\nimport { ApiError, DEFAULT_TAKE_NUMBER } from './api';\nimport { GetEnvironmentSettingsResponse } from './api/EnvironmentSettingsApi/types';\nimport {\n FORBIDDEN_SYMBOLS_REGEXP,\n VALID_EMAIL_REGEXP,\n VALID_IPV4_REGEXP,\n} from './constants';\nimport Storage from './storage';\nimport { InviteSource, Null, Policies } from './types';\n\nconst { localStorage } = new Storage();\n\nexport enum APP_MODES {\n KID = 'KID',\n PAM = 'PAM',\n}\n\nexport const isPAMMode = () =>\n (process.env.REACT_APP_MODE || APP_MODES.KID) === APP_MODES.PAM;\n\n/** Получаем с localStorage настройки окружения. */\nexport const getEnvironmentSettings =\n (): Null => {\n return localStorage.getEnvironmentSettings();\n };\n\n/**\n * Проверяем, выходит ди элемент за пределы родителя.\n *\n * @param el HTML элемент.\n */\nexport const isEllipsisActive = (el: HTMLElement): boolean =>\n el.offsetWidth < el.scrollWidth;\n\n/**\n * Type Guard. Проверяем, что переданное значение не null и не undefined.\n *\n * @param value Значение для проверки.\n */\nexport const notEmpty = (value: T | null | undefined): value is T =>\n value !== null && value !== undefined;\n\n/**\n * Обрезаем строку и добавляем в конец многоточие.\n *\n * @param str Строку, которую нужно обрезать.\n * @param max Максимально значение строки, после которого она обрезается.\n */\nexport const truncate = (str: string, max: number) => {\n return str.length > max ? `${str.slice(0, max - 3)}...` : str;\n};\n\n/**\n * Проверяем формат почты.\n *\n * @param value Проверяемая почта.\n */\nexport const hasValidEmailFormat = (value: string) => {\n return new RegExp(VALID_EMAIL_REGEXP).test(value);\n};\n\n/**\n * Проверяем формат IPv4.\n *\n * @param value Значение.\n */\nexport const hasValidIpv4Format = (value: string) => {\n return new RegExp(VALID_IPV4_REGEXP).test(value);\n};\n\n/**\n * Проверяем значение на содержание запрещенных символов.\n *\n * @param value Проверяемое значение.\n */\nexport const hasForbiddenSymbols = (value: string) => {\n return new RegExp(FORBIDDEN_SYMBOLS_REGEXP).test(value);\n};\n\n/**\n * Обрабатываем ошибки, приводим к единому виду.\n *\n * @param err Ошибка, которую нужно обработать.\n */\nexport const processError = (err: any): ApiError => {\n if (err instanceof ApiError) {\n return err;\n } else {\n const message = err?.message;\n const details = err?.details;\n const code = err && details?.error?.code;\n return new ApiError({\n error: {\n message: message || 'Unknown javascript error',\n code: code || 'unknown',\n },\n statusCode: 0,\n traceId: '',\n });\n }\n};\n\n/**\n * Скроллим страницу наверх. Из-за использования SideMenu сохраняется высота\n * предыдущей страницы.\n */\nexport const scrollToTopWindow = () => {\n window.scrollTo(0, 0);\n};\n\n/**\n * Ищем элемент массива по id.\n *\n * @param [arr] Массив, в котором ищем элемент по id.\n * @param [id] Идентификатор искомого элемента.\n */\nexport const findElementWithId = (\n arr: (any & { id: string })[] = [],\n id?: Null\n) => {\n if (!id) {\n return undefined;\n }\n\n return arr.find((el) => el.id === id);\n};\n\nconst MAX_SECURE_VALUE_LENGTH = 5;\n\n/**\n * Заменяем окончание строки звездочками. Независимо от длины строки количество\n * звездочек будет равно 3.\n *\n * @param [value] Значение, которое нужно сократить. Если работаем с почтой, то\n * убираем часть после \"@\".\n */\nexport const secureValue = (value = ''): string =>\n value\n ? value.split('@')[0].substring(0, MAX_SECURE_VALUE_LENGTH) + '*'.repeat(3)\n : '';\n\n/**\n * Парсим и стандартизируем источник инвайта.\n *\n * @param source Источник.\n */\nexport const parseInviteSource = (source: string) => {\n const lowCaseSource = source?.toLowerCase() || '';\n\n switch (true) {\n case lowCaseSource.includes('adfs'):\n return InviteSource.ADFSAdapter;\n case lowCaseSource.includes('owa'):\n return InviteSource.OWAAdapter;\n case lowCaseSource.includes('panel'):\n return InviteSource.ControlPanel;\n case lowCaseSource.includes('radius'):\n return InviteSource.RadiusProxy;\n case lowCaseSource.includes('synch'):\n return InviteSource.Synchronizer;\n default:\n return lowCaseSource;\n }\n};\n\n/**\n * Высчитываем максимальную длину для каждой строки.\n *\n * @param firstL Длина первой строки.\n * @param secondL Длина второй строки.\n * @param max Общая максимальная длина для обеих строк.\n */\nexport const getMaxLengthForTwo = (\n firstL: number,\n secondL: number,\n max: number\n): number[] => {\n if (firstL === 0) {\n return [0, max];\n }\n\n if (secondL === 0) {\n return [max, 0];\n }\n\n const half = Math.trunc(max / 2);\n return [half, half];\n};\n\n/**\n * Вычисляем процент по двум числам. Сокращаем число до заданного разряда.\n *\n * @param x Число, процент которого необходимо вычислить.\n * @param total Число, соответствующее 100%.\n * @param fixed Разряд, до которого сокращаем десятичную часть процента.\n */\nexport const calcPercentage = (x: number, total: number, fixed = 0) => {\n if (total === 0) {\n return '0';\n }\n\n const percent = (x / total) * 100;\n return percent.toFixed(fixed);\n};\n\n/**\n * Вычисляем число, соответствующее заданному проценту. Сокращаем число до\n * заданного разряда.\n *\n * @param total Число, соответствующее 100%.\n * @param percent Процент, по которому необходимо вычислить число.\n * @param fixed Разряд, до которого сокращаем десятичную часть числа.\n */\nexport const calcNumberFromPercent = (\n total: number,\n percent: number,\n fixed = 0\n) => {\n if (percent === 0) {\n return percent.toString();\n }\n\n const number = (total * percent) / 100;\n return number.toFixed(fixed);\n};\n\nexport interface IError {\n caption?: string;\n error: ApiError;\n isModal?: boolean;\n text?: string;\n}\n\n/**\n * Вычисляем страницу, на которую нужно переключиться после удаления элемента.\n * Зависит от количества элементов на странице (DEFAULT_TAKE_NUMBER)\n *\n * @param currentPage Текущая страница.\n * @param elementsCount Количество элементов на всех страницах.\n */\nexport const calcPageReducing = (\n currentPage: number,\n elementsCount: number\n) => {\n // если на последней странице оставался один элемент, и мы его удалили,\n // то переключаемся на предыдущую страницу\n const previousPage = Math.max(currentPage - 1, 1);\n return elementsCount % DEFAULT_TAKE_NUMBER === 1 ? previousPage : currentPage;\n};\n\n/**\n * Вычисляем, сколько элементов нужно пропустить. Результат метода передаем в\n * параметр ?skip=\n *\n * @param [page] Страница, для которой нужно запросить список элементов.\n */\nexport const skipCount = (page?: number) =>\n page ? DEFAULT_TAKE_NUMBER * Math.max(page - 1, 0) : 0;\n\nexport interface PolicyItems {\n label: string;\n value: Policies;\n}\n\nexport const policyItems: PolicyItems[] = [\n {\n label: 'У всех',\n value: Policies.AllUsers,\n },\n {\n label: 'У всех, кроме',\n value: Policies.AllUsersWithExceptions,\n },\n {\n label: 'Ни у кого, кроме',\n value: Policies.NoOneWithExceptions,\n },\n];\n\nexport const fetchTextFromFile = async (raw: string): Promise => {\n const rawText = await fetch(raw);\n return rawText.text();\n};\n\ninterface ArrayDifferences {\n additions: string[];\n deletions: string[];\n}\n\n/**\n * Вычисляем добавленные и удаленные элементы массива по сравнению со вторым.\n *\n * @param base Базовый массив.\n * @param current Новый массив.\n */\nexport const getAddingsAndDeletes = (\n base: T[],\n current: T[]\n): ArrayDifferences => {\n const deletions = base\n .filter((el) => !current.includes(el))\n .map((el) => el.id);\n const additions = current\n .filter((el) => !base.includes(el))\n .map((el) => el.id);\n\n return { additions, deletions };\n};\n\nexport const getLogUrlBySessionId = (sessionId: string) =>\n `${new URL(window.location.href).origin}/api/log/${sessionId}`;\n\nexport const handleDefaultEvent = (e: SyntheticEvent) => {\n e.preventDefault();\n e.stopPropagation();\n};\n","import { formatPhone } from '@skbkontur/ui-helpers';\nimport moment from 'moment-timezone';\n\nimport { UsersPageTabs } from './navigation/pageTabs';\nimport { Policies } from './types';\n\nexport const domain = window.location.hostname.split('.')[1];\n// Misc\nexport const BOUND_DASH = '\\u00A0—\\u00A0';\nexport const PERIOD = '…';\nexport const DEFAULT_RADIUS_PORT_1 = '1812';\nexport const DEFAULT_RADIUS_PORT_2 = '1813';\nexport const DEFAULT_IP = '0.0.0.0';\n\n// URLs\nexport const DOCUMENTATION =\n 'https://support.kontur.ru/pages/viewpage.action?pageId=93174021';\nexport const MANUAL_KID = 'https://support.kontur.ru/display/KID/Kontur.ID';\nexport const MANUAL_OPENVPN =\n 'https://support.kontur.ru/pages/viewpage.action?pageId=93174025';\nexport const MANUAL_USERGATE =\n 'https://support.kontur.ru/id/51687-nastrojka_usergate';\nexport const MANUAL_FORTIGATE =\n 'https://support.kontur.ru/id/51723-nastrojka_fortigate';\nexport const MANUAL_PALO_ALTO =\n 'https://support.kontur.ru/id/51725-nastrojka_palo_alto';\nexport const MANUAL_MIKROTIK =\n 'https://support.kontur.ru/id/53514-nastrojka_mikrotik_vpn';\nexport const MANUAL_OPENVPNAS =\n 'https://support.kontur.ru/id/51689-nastrojka_openvpn_access';\nexport const MANUAL_CHECKPOINT =\n 'https://support.kontur.ru/pages/viewpage.action?pageId=93174027';\nexport const MANUAL_IDECO =\n 'https://support.kontur.ru/id/51913-nastrojka_ideco_vpn';\nexport const MANUAL_WINDOWS_VPN =\n 'https://support.kontur.ru/id/51745-nastrojka_windows_vpn_s_rras';\nexport const MANUAL_WATCHGUARD =\n 'https://support.kontur.ru/id/51744-nastrojka_watchguard';\nexport const MANUAL_HORIZON =\n 'https://support.kontur.ru/id/51721-nastrojka_vmware_horizon';\nexport const MANUAL_CISCO =\n 'https://support.kontur.ru/id/42358-nastrojka_cisco_vpn';\nexport const MANUAL_CISCO_ISE =\n 'https://support.kontur.ru/id/54559-nastrojka_cisco_ise';\nexport const MANUAL_CISCO_FTD =\n 'https://support.kontur.ru/id/54560-nastrojka_cisco_ftd';\nexport const MANUAL_RDG =\n 'https://support.kontur.ru/pages/viewpage.action?pageId=102893451';\nexport const MANUAL_ADFS =\n 'https://support.kontur.ru/pages/viewpage.action?pageId=102899552';\nexport const MANUAL_RADIUS_PROXY =\n 'https://support.kontur.ru/pages/viewpage.action?pageId=93174023';\nexport const MANUAL_OWA =\n 'https://support.kontur.ru/pages/viewpage.action?pageId=107840461';\nexport const MANUAL_ACTIVESYNC =\n 'https://support.kontur.ru/id/44642-nastrojka_activesync';\nexport const MANUAL_WINDOWS =\n 'https://support.kontur.ru/id/51833-nastrojka_winlogon';\nexport const MANUAL_SSH = 'https://support.kontur.ru/id/53523-nastrojka_ssh';\nexport const CDN = 'https://s.kontur.ru/common-v2/icons-products/';\nexport const MANUAL_SYNCHRONIZER =\n 'https://support.kontur.ru/id/53756-nastrojka_sinxronizatora_active_directory';\nexport const PAM_ADS_LANDING_URL =\n 'https://kontur.ru/lp/pam?utm_source=pop-up-lk-id';\n\n// Arrays\nexport const CONFIG_UNITS = ['конфигурация', 'конфигурации', 'конфигураций'];\nexport const EVENT_UNITS = ['событие', 'события', 'событий'];\nexport const INVITATIONS_UNITS = ['приглашение', 'приглашения', 'приглашений'];\nexport const SESSION_UNITS = ['сессия', 'сессии', 'сессий'];\n\nexport const EXCEPTION_STRATEGIES = [\n Policies.AllUsersWithExceptions,\n Policies.NoOneWithExceptions,\n];\nexport const SHORT_MONTHS = [\n 'янв',\n 'фев',\n 'мар',\n 'апр',\n 'май',\n 'июн',\n 'июл',\n 'авг',\n 'сен',\n 'окт',\n 'ноя',\n 'дек',\n];\nexport const DEFAULT_USERS_PAGE_TABS = [\n { tab: UsersPageTabs.Active, title: 'Активные' },\n { tab: UsersPageTabs.Invited, title: 'Приглашенные' },\n];\nexport const WEEK = ['Пн–Пт', 'Сб–Вс'];\nexport const WEEK_DAYS = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'];\n\n// Images\nexport const PAM_RESOURCES_IMG_WIDTH = '40px';\nexport const RESOURCES_IMG_WIDTH = '32px';\nexport const DEFAULT_SMALL_MODAL_WIDTH = '400px';\nexport const DEFAULT_MODAL_WIDTH = '440px';\n\n// Regexps\nexport const FORBIDDEN_SYMBOLS_REGEXP = /['\",^<>#%*:;!/]/;\nexport const VALID_EMAIL_REGEXP = /^\\S+@\\S+\\.\\S+$/;\nexport const VALID_IPV4_REGEXP =\n /^((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)(\\.(?!$)|$)){4}$/;\n\n// Call number\nexport const CALL_NUMBER = '79091450012';\nexport const FORMATTED_CALL_NUMBER = formatPhone(CALL_NUMBER);\n\n// Support Center widget settings\nexport const SC_INTEGRATION_ID = 'kid';\n\n// Default values\nexport const DEFAULT_TIME_DELAY = 1000;\n\n// Метрики\nexport const METRICS_SITE_ID = 179;\n\n// Hints\nexport const SUPERADMIN_DESCRIPTION =\n 'Может редактировать список администраторов';\nexport const ADMIN_DESCRIPTION =\n 'Не может редактировать список администраторов';\n\n// Дефолтные урлы на случай, если из апи не получилось достать настройки окружения\nexport const DEFAULT_AUTH_URL = `https://wizard.${domain}.ru/kontur-id.control-panel`;\nexport const DEFAULT_LOGOUT_URL = `https://auth.${domain}.ru/logout`;\nexport const DEFAULT_ACCESS_DENIED_URL = `https://cabinet.${domain}.ru/credential-error/access-denied`;\nexport const DEFAULT_VERIFICATION_API_URL = `https://kid.${domain}.ru`;\nexport const DEFAULT_CABINET_URL = `https://kid.${domain}.ru/cabinet`;\n\n// Users\nexport const BACK_URL_QUERY_PARAMETER = 'backUrl';\nexport const TIMEOUT_MINUTES_SENDING_REQUESTS = 5;\n\nexport const TIMEZONES_LIST = moment.tz.names();\nexport const DEFAULT_ACTIVE_PAGE = 1;\n","import { useEffect } from 'react';\n\nimport { scrollToTopWindow } from '../common';\n\nexport const ScrollToTopOnMount = () => {\n useEffect(() => {\n scrollToTopWindow();\n }, []);\n\n return null;\n};\n","import { useCallback, useContext, useEffect, useState } from 'react';\n\nimport { AppContext, AppCtx } from '../../components/App/Content';\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\n\nexport const useCheckAuth = () => {\n const { api } = useContext(ServiceCtx);\n const { currentUserState } = useContext(AppCtx);\n const [isTabVisible, setIsTabVisible] = useState(true);\n\n const handleVisibilityChange = useCallback(() => {\n setIsTabVisible(document.visibilityState === 'visible');\n }, []);\n\n useEffect(() => {\n (async () => {\n try {\n if (isTabVisible) {\n const currentUser = await api.Admins.getCurrentUserInfo();\n currentUserState?.setCurrentUser(currentUser);\n }\n } catch (e) {\n console.log(e);\n }\n })();\n }, [isTabVisible]);\n\n useEffect(() => {\n document.addEventListener('visibilitychange', handleVisibilityChange);\n\n return () => {\n document.removeEventListener('visibilitychange', handleVisibilityChange);\n };\n }, []);\n};\n","import { ReactElement, useState } from 'react';\n\nimport { CustomError } from '../../components/Errors/CustomError/CustomError';\nimport { ErrorBlock } from '../../components/Errors/ErrorBlock';\nimport { IError } from '../common';\n\nexport const useError = (): {\n errorElement: ReactElement | null;\n errorInfo: IError | undefined;\n setErrorInfo: (value: IError) => void;\n} => {\n const [errorInfo, setErrorInfo] = useState();\n\n return {\n errorElement: errorInfo ? (\n errorInfo.isModal ? (\n setErrorInfo(undefined)}\n caption={errorInfo?.caption}\n errorText={errorInfo?.text}\n />\n ) : (\n \n )\n ) : null,\n errorInfo,\n setErrorInfo,\n };\n};\n","import { useEffect, useRef } from 'react';\n\n/**\n * Хук для работы с таймаутами.\n * https://www.geeksforgeeks.org/reactjs-usetimeout-custom-hook/\n *\n * @param callback Метод, который выполнится после окончания таймаута.\n * @param delay Продолжительность таймаута.\n */\nexport const useTimeout = (callback: () => void, delay: number) => {\n const savedCallback = useRef<() => void>();\n\n // Запоминаем последний коллбэк\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Устанавливаем и очищаем таймаут\n useEffect(() => {\n const func = () => {\n savedCallback.current?.();\n };\n\n if (delay !== null) {\n const id = setTimeout(func, delay);\n return () => clearTimeout(id);\n }\n }, [delay]);\n};\n","import { useEffect, useState } from 'react';\n\ninterface PropNames {\n listProp: L;\n totalCountProp: T;\n}\n\n/**\n * Хук обрабатывает получение данных для каждой страницы в компоненте\n * InfiniteSroll.\n *\n * @param propNames Свойства в передаваемом объекте.\n * @param chunk Объект данных, для которых используется InfiniteScroll.\n */\nexport const useUpdateInfiniteScroll = <\n L extends string,\n T extends string,\n Chunk extends { [K in L]: unknown[] } & { [K in T]: number },\n>(\n propNames: PropNames,\n chunk?: Chunk\n) => {\n const { listProp, totalCountProp } = propNames;\n const [list, setList] = useState();\n const [page, setPage] = useState(0);\n\n const refreshMembersList = () => {\n setList(chunk);\n setPage(1);\n };\n\n useEffect(() => {\n switch (true) {\n case !chunk:\n return;\n case !list:\n case chunk![totalCountProp] !== list?.[totalCountProp]:\n refreshMembersList();\n break;\n // Здесь и ниже list и chunk уже точно определены\n case list![listProp].length < list![totalCountProp]:\n setList({\n [listProp]: [...list![listProp], ...chunk![listProp]],\n [totalCountProp]: list![totalCountProp],\n } as Chunk);\n setPage(page + 1);\n break;\n default:\n refreshMembersList();\n }\n }, [chunk]);\n\n return {\n list,\n setList,\n page,\n setPage,\n } as const;\n};\n","import { useContext, useMemo, useRef } from 'react';\n\nimport { ServiceContext, ServiceCtx } from '../../context/ServiceContext';\nimport { METRICS_CATEGORIES } from '../metrics/constants';\n\nexport const useMetrics = (\n category: METRICS_CATEGORIES,\n customVariables?: Record\n) => {\n const { tracker } = useContext(ServiceCtx);\n const _category = useRef(category);\n const _customVariables = useRef({ ...customVariables });\n\n return useMemo(() => {\n const trackEvent = (action: string, label = '', customVariables = {}) => {\n try {\n tracker.trackEvent(_category.current, action, label, {\n ..._customVariables.current,\n ...customVariables,\n });\n } catch (e) {\n console.error(e);\n }\n };\n\n const pageLoaded = (\n page: string,\n label?: string,\n customVariables?: Record\n ) => trackEvent('pageLoaded', label, { ...customVariables, page });\n\n const requestStart = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('requestStart', label, customVariables);\n\n const requestSuccess = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('requestSuccess', label, customVariables);\n\n const requestError = (\n error: string,\n label?: string,\n customVariables?: Record\n ) => trackEvent('requestError', label, { ...customVariables, error });\n\n const changeClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('changeClick', label, { ...customVariables });\n\n const showTip = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('showTip', label, { ...customVariables });\n\n const deleteClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('deleteClick', label, { ...customVariables });\n\n const submitClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('submitClick', label, { ...customVariables });\n\n const addClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('addClick', label, { ...customVariables });\n\n const cancelClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('cancelClick', label, { ...customVariables });\n\n const clearValueClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('clearValueClick', label, { ...customVariables });\n\n const changeValueClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('changeValueClick', label, { ...customVariables });\n\n const fillFieldError = (\n error: string,\n field: string,\n label?: string,\n customVariables?: Record\n ) =>\n trackEvent('fillFieldError', label, { ...customVariables, error, field });\n\n const click = (\n clickedName: string,\n label?: string,\n customVariables?: Record\n ) =>\n trackEvent('click', label || clickedName, {\n ...customVariables,\n clickedName,\n });\n\n const sideMenuClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('sideMenuClick', label, { ...customVariables });\n\n const logoutClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('logoutClick', label, { ...customVariables });\n\n const returnClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('returnClick', label, { ...customVariables });\n\n const closeModalClick = (\n label?: string,\n customVariables?: Record\n ) => trackEvent('closeModalClick', label, { ...customVariables });\n\n const track = (\n action: string,\n label?: string,\n customVariables?: Record\n ) => trackEvent(action, label, { ...customVariables });\n\n return {\n track,\n returnClick,\n click,\n pageLoaded,\n changeClick,\n deleteClick,\n submitClick,\n addClick,\n cancelClick,\n changeValueClick,\n clearValueClick,\n fillFieldError,\n requestStart,\n requestError,\n requestSuccess,\n showTip,\n sideMenuClick,\n logoutClick,\n closeModalClick,\n };\n }, [tracker]);\n};\n","import { useResponsiveLayout as useResponsiveLayoutOrigin } from '@skbkontur/react-ui';\n\nconst customMediaQueries = {\n isTablet: '(min-width: 577px)',\n isDesktop: '(min-width: 1280px)',\n isNarrowScreen: '(max-width: 991.5px)',\n};\n\nexport const useResponsiveLayout = () => {\n return useResponsiveLayoutOrigin({ customMediaQueries });\n};\n","import { useEffect, useState } from 'react';\n\nexport const useTimeDebounce = (value: T, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(() => {\n const handler = window.setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n return () => {\n window.clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","export const METRICS_SITE_ID = 179;\n\n/** Категории логируемых событий. */\nexport enum METRICS_CATEGORIES {\n adminsManagement = 'adminsManagement',\n eventsManagement = 'eventsManagement',\n general = 'general',\n groupsManagement = 'groupsManagement',\n invitesManagement = 'invitesManagement',\n machinesManagement = 'machinesManagement',\n massSelection = 'massSelection',\n rolesManagement = 'rolesManagemet',\n sessionsManagement = 'sessionsManagement',\n sourcesManagement = 'sourcesManagement',\n statistics = 'statistics',\n usersManagement = 'usersManagement',\n}\n\n/** Описание логируемых событий. */\nexport enum METRICS_LABELS {\n addLogon = 'addLogon',\n autocompleteLogins = 'autocompleteLogins',\n blockUser = 'blockUser',\n changeConfiguration = 'changeConfiguration',\n changeFilters = 'changeFilters',\n changeLogon = 'changeLogon',\n clearFilters = 'clearFilters',\n createConfiguration = 'createConfiguration',\n createRole = 'createRole',\n deleteMachinePam = 'deleteMachinePam',\n editAdmin = 'editAdmin',\n editMachinePam = 'editMachinePam',\n editRole = 'editRole',\n error = 'error',\n getAdminsList = 'getAdminsList',\n getConfigFile = 'getConfigFile',\n getConfigsList = 'getConfigsList',\n getEvensList = 'getEventsList',\n getGroupInfo = 'getGroupInfo',\n getGroupMembers = 'getGroupMembers',\n getGroupsList = 'getGroupsList',\n getInvitesList = 'getInvitesList',\n getRegistrationLink = 'getRegistrationLink',\n getRequestsInfo = 'getRequestsInfo',\n getResourcePamInfo = 'getResourcePamInfo',\n getRolesList = 'getRolesList',\n getSessionsList = 'getSessionsList',\n getSynchronizer = 'getSynchronizer',\n getUserInfo = 'getUserInfo',\n getUsersInvitesErrors = 'getUsersInvitesErrors',\n getUsersList = 'getUsersList',\n getUsersListFile = 'getUsersListFile',\n massActionSelect = 'massActionSelect',\n openConfigurationsList = 'openConfigurationsList',\n removeAdmin = 'removeAdmin',\n removeConfiguration = 'removeConfiguration',\n removeDevice = 'removeDevice',\n removeLogon = 'removeLogon',\n removePhone = 'removePhone',\n removeRole = 'removeRole',\n removeUser = 'removeUser',\n removeUsers = 'removeUsers',\n removeUsersInvitesErrors = 'removeUsersInvitesErrors',\n resendInvite = 'resendInvite',\n revokeInvite = 'revokeInvite',\n saveConfiguration = 'saveConfiguration',\n saveLogon = 'saveLogon',\n send2Fa = 'send2Fa',\n sendInvite = 'sendInvite',\n sendInvitesFromTable = 'sendInvitesFromTable',\n showPamAds = 'showPamAds',\n usersSearch = 'usersSearch',\n}\n\nexport enum APP_PAGES {\n adminsListPage = 'adminsListPage',\n configurationPage = 'configurationPage',\n configurationsListPage = 'configurationsListPage',\n configurePage = 'configurePage',\n errorPage = 'errorPage',\n eventsPage = 'eventsPage',\n groupDetailsPage = 'groupDetailsPage',\n pamResourcesPage = 'pamResourcesPage',\n resourcesListPage = 'resourcesListPage',\n rolesListPage = 'rolesListPage',\n sessionsPage = 'sessionsPage',\n statisticsPage = 'statisticsPage',\n successPage = 'successPage',\n userDetailsPage = 'userDetailsPage',\n usersInvitationErrorsPage = 'userInvitationErrorsPage',\n usersListPage = 'usersListPage',\n}\n","export enum MachinesPAMTabs {\n Active = 'active',\n AwaitSettings = 'awaitSettings',\n}\n\nexport enum MachinePAMTabs {\n Details = 'details',\n Roles = 'roles',\n Sessions = 'sessions',\n}\n\nexport enum RolePAMTabs {\n Details = 'details',\n Groups = 'groups',\n Machines = 'machines',\n Members = 'members',\n}\n\nexport enum UsersPageTabs {\n Active = 'active',\n Groups = 'groups',\n Invited = 'invited',\n}\n\nexport enum UserDetailsPageTabs {\n Details = 'details',\n Groups = 'groups',\n Roles = 'roles',\n Sessions = 'sessions',\n}\n","export const BASE_ROUTES = {\n MAIN: '/',\n ERROR: 'error',\n};\n\n//TODO: надо бы навести потом красоту, а то не оч хорошо что какието урлы начинаются с слеша а какието нет\n//TODO: надо бы унести табы в enum'ы\n\nexport const ID_ROUTES = {\n ...BASE_ROUTES,\n RESOURCES: {\n LIST: '/resources',\n CONFIGURATIONS: {\n LIST: 'resources/:id/configurations',\n CONFIGURATION: 'resources/ActiveSync/configurations/:id',\n CONFIGURE: 'resources/:id/configure',\n },\n },\n USERS: {\n LIST: 'users',\n TABS: {\n ACTIVE: 'active',\n INVITED: 'invited',\n },\n INVITED_ERRORS: 'errors',\n },\n ADMINS: {\n LIST: 'admins',\n TABS: {\n ACTIVE: 'active',\n INVITED: 'invited',\n },\n },\n EVENTS: '/events',\n STATISTICS: '/statistics',\n};\n\nexport const PAM_ROUTES = {\n ...BASE_ROUTES,\n EVENTS: '/events',\n SESSIONS: '/sessions',\n USERS: {\n LIST: 'users',\n TABS: {\n ACTIVE: 'active',\n GROUPS: 'groups',\n },\n },\n GROUP: {\n MEMBERS: 'members',\n },\n ROLES: '/roles',\n ROLE_PAM: {\n LIST: '/rolePAM/:id',\n TABS: {\n MACHINES: 'machines',\n MEMBERS: 'members',\n GROUPS: 'groups',\n DETAILS: 'details',\n },\n },\n SETTINGS_GATEWAY: {\n LIST: '/resources',\n CONFIGURATIONS: {\n LIST: 'resources/:id/configurations',\n },\n },\n MACHINE_PAM: {\n LIST: '/machinePAM/:id',\n TABS: {\n SESSIONS: 'sessions',\n ROLES: 'roles',\n DETAILS: 'details',\n },\n },\n MACHINES_PAM: {\n LIST: 'machinesPAM',\n TABS: {\n ACTIVE: 'active',\n AWAIT_SETTINGS: 'awaitSettings',\n },\n },\n ADMINS: {\n LIST: 'admins',\n TABS: {\n ACTIVE: 'active',\n INVITED: 'invited',\n },\n },\n STATISTICS: '/statistics',\n};\n","import { FC, ReactElement, useContext } from 'react';\n\nimport { AppContext, AppCtx } from '../components/App/Content';\n\nexport enum PermissionLevels {\n Admin,\n Superadmin,\n}\n\ninterface Props {\n children: ReactElement;\n levelRequired: PermissionLevels;\n}\n\n/** Копмпонент-обертка проверяет наличие прав на просмотр элементов управления. */\nexport const PermissionsGuard: FC = ({ levelRequired, children }) => {\n const { currentUserState } = useContext(AppCtx);\n const userLevel = currentUserState.currentUser?.isSuperAdmin\n ? PermissionLevels.Superadmin\n : PermissionLevels.Admin;\n\n return userLevel < levelRequired ? null : children;\n};\n","import { GetEnvironmentSettingsResponse } from '../api/EnvironmentSettingsApi/types';\nimport { Null, Organization, SecondFactors } from '../types';\n\nconst MINUTE_MS = 60 * 1000;\nconst HOUR_MS = 60 * MINUTE_MS;\nconst EXPIRES_IN_24_HOURS = new Date(Date.now() + 24 * HOUR_MS);\nconst ENDLESS = new Date('9999-12-31');\n\nexport default class LocalStorage {\n private prefix: string;\n\n public constructor(prefix: string) {\n this.prefix = prefix;\n }\n\n private setLSItem(\n key: string,\n value: object | string | boolean,\n expires: Date = ENDLESS\n ) {\n try {\n localStorage.setItem(\n `${this.prefix}${key}`,\n JSON.stringify({ value, expires: expires.getTime() })\n );\n } catch (e) {\n console.error(e);\n }\n }\n\n private getLSItem(key: string) {\n try {\n const fullKey = `${this.prefix}${key}`;\n const rawValue = localStorage.getItem(fullKey);\n\n if (rawValue === null) {\n return null;\n }\n\n const parsedValue = JSON.parse(rawValue);\n\n if (\n !Object.hasOwn(parsedValue, 'value') ||\n !Object.hasOwn(parsedValue, 'expires')\n ) {\n localStorage.removeItem(fullKey);\n throw new Error(`Invalid format value ${rawValue}`);\n }\n\n if (parsedValue.expires !== 0 && parsedValue.expires < Date.now()) {\n localStorage.removeItem(fullKey);\n return null;\n }\n\n return parsedValue.value;\n } catch (e) {\n console.error(e);\n return null;\n }\n }\n\n /** Информация об организации. */\n private ORGANIZATION_KEY = 'organization';\n public setOrganization = (value: Organization) => {\n this.setLSItem(this.ORGANIZATION_KEY, value);\n };\n\n public getOrganization = (): Organization => {\n return this.getLSItem(this.ORGANIZATION_KEY);\n };\n\n /** Дефолтная Windows конфигурация. */\n private DEFAULT_WINDOWS_SETTINGS_KEY = 'defaultWindowsSettings_';\n public setDefaultWindowsSettings = (\n value: string,\n factor: SecondFactors\n ): void => {\n this.setLSItem(`${this.DEFAULT_WINDOWS_SETTINGS_KEY}${factor}`, value);\n };\n\n public getDefaultWindowsSettings = (factor: SecondFactors): Null => {\n return this.getLSItem(`${this.DEFAULT_WINDOWS_SETTINGS_KEY}${factor}`);\n };\n\n /** Храним флаг пропуска показа рекламы PAM. */\n private SKIP_PAM_ADS_KEY = 'skipPamAds';\n public setSkipPamAdsFlag = (): void => {\n this.setLSItem(this.SKIP_PAM_ADS_KEY, true);\n };\n\n public getSkipPamAdsFlag = (): Null =>\n this.getLSItem(this.SKIP_PAM_ADS_KEY);\n\n /** Настройки окружения приложения. */\n private ENVIRONMENT_SETTINGS_KEY = 'environmentSettings';\n public setEnvironmentSettings = (\n value: GetEnvironmentSettingsResponse\n ): void => {\n this.setLSItem(this.ENVIRONMENT_SETTINGS_KEY, value, EXPIRES_IN_24_HOURS);\n };\n\n public getEnvironmentSettings = (): Null => {\n return this.getLSItem(this.ENVIRONMENT_SETTINGS_KEY);\n };\n}\n","import {\n ParsedConfiguration,\n SimpleForm,\n} from '../../components/Configurations/util';\nimport { RadiusServerInfo } from '../../components/Configurations/Windows/WindowsForm/util';\nimport {\n Null,\n Policies,\n PolicyExceptions,\n PolicyWithExceptions,\n} from '../types';\nimport { SourceNames } from '../types/sourceTypes';\n\nexport default class SessionStorage {\n private prefix: string;\n\n public constructor(prefix: string) {\n this.prefix = prefix;\n }\n private setSSItem(key: string, value: object | string | boolean) {\n try {\n sessionStorage.setItem(`${this.prefix}${key}`, JSON.stringify({ value }));\n } catch (e) {\n console.error(e);\n }\n }\n\n private removeSSItem(key: string) {\n try {\n sessionStorage.removeItem(`${this.prefix}${key}`);\n } catch (e) {\n console.error(e);\n }\n }\n\n private getSSItem(key: string) {\n try {\n const fullKey = `${this.prefix}${key}`;\n const rawValue = sessionStorage.getItem(fullKey);\n\n if (rawValue === null) {\n return null;\n }\n\n const parsedValue = JSON.parse(rawValue);\n\n if (!Object.hasOwn(parsedValue, 'value')) {\n sessionStorage.removeItem(fullKey);\n throw new Error(`Invalid format value ${rawValue}`);\n }\n\n return parsedValue.value;\n } catch (e) {\n console.error(e);\n return null;\n }\n }\n\n /** Работа с политиками проверки второго фактора. */\n private STRATEGY_INFO_KEY = 'strategyBlockInfo';\n public setStrategyBlockInfo = (\n configId: string,\n info: PolicyWithExceptions\n ) => {\n const { Policy, Exceptions } = info;\n const prevInfo = this.getStrategyBlockInfo(configId);\n let newInfo = { [Policy]: Exceptions };\n\n if (prevInfo) {\n newInfo = { ...prevInfo, [Policy]: Exceptions };\n }\n\n this.setSSItem(`${this.STRATEGY_INFO_KEY}_${configId}`, newInfo);\n };\n\n public getStrategyBlockInfo = (\n configId: string\n ): Record => {\n return this.getSSItem(`${this.STRATEGY_INFO_KEY}_${configId}`);\n };\n\n /** Несохраненные изменения в Radius конфигах. */\n private UNSAVED_CONFIGS_KEY = 'unsavedConfigs';\n public setUnsavedConfig = (\n source: SourceNames,\n id: string,\n config: SimpleForm\n ) => {\n const prev = this.getUnsavedConfigs(source);\n let updated = { [id]: config };\n\n if (prev) {\n updated = {\n ...prev,\n [id]: config,\n };\n }\n\n this.setSSItem(`${source}_${this.UNSAVED_CONFIGS_KEY}`, updated);\n };\n\n public getUnsavedConfigs = (\n source: SourceNames\n ): Null> => {\n return this.getSSItem(`${source}_${this.UNSAVED_CONFIGS_KEY}`);\n };\n\n public removeUnsavedConfig = (source: SourceNames, id: string) => {\n const prev = this.getUnsavedConfigs(source);\n\n if (prev && Object.keys(prev).length > 1) {\n delete prev[id];\n this.setSSItem(`${source}_${this.UNSAVED_CONFIGS_KEY}`, prev);\n } else {\n this.removeSSItem(`${source}_${this.UNSAVED_CONFIGS_KEY}`);\n }\n };\n\n /** Флаг саморегистрации. */\n private SELF_REGISTRATION_KEY = 'selfRegistration';\n public setSelfRegistration = (\n source: SourceNames,\n id: string,\n value: boolean\n ) => {\n const prev = this.getSelfRegistration(source) || {};\n const prop = { [id]: value };\n\n this.setSSItem(`${source}_${this.SELF_REGISTRATION_KEY}`, {\n ...prev,\n ...prop,\n });\n };\n\n public getSelfRegistration = (\n source: SourceNames\n ): Record => {\n return this.getSSItem(`${source}_${this.SELF_REGISTRATION_KEY}`);\n };\n\n /** Несохраненные новые Radius формы. */\n private NEW_FORMS_KEY = 'newForms';\n public setNewForm = (\n source: SourceNames,\n id: string,\n value: Record\n ) => {\n const prev = this.getNewForms(source) || {};\n let prop = { [id]: value };\n\n if (prev) {\n prop = {\n ...prev,\n [id]: value,\n };\n }\n\n this.setSSItem(`${source}_${this.NEW_FORMS_KEY}`, prop);\n };\n\n public getNewForms = (\n source: SourceNames\n ): Null> => {\n return this.getSSItem(`${source}_${this.NEW_FORMS_KEY}`);\n };\n\n public removeNewForm = (source: SourceNames, id: string) => {\n const prev = this.getNewForms(source);\n\n if (prev && Object.keys(prev).length > 1) {\n delete prev[id];\n this.setSSItem(`${source}_${this.NEW_FORMS_KEY}`, prev);\n } else {\n this.removeSSItem(`${source}_${this.NEW_FORMS_KEY}`);\n }\n };\n\n /** Работа с блоком второго фактора в конфигах Windows. */\n private SECOND_FACTOR_BLOCK_KEY = 'secondFactorInfo';\n public setSecondFactorInfo = (configId: string, info: RadiusServerInfo) => {\n const prevInfo = this.getSecondFactorInfo(configId);\n let newInfo = info;\n\n if (prevInfo) {\n newInfo = { ...prevInfo, ...newInfo };\n }\n\n this.setSSItem(`${this.SECOND_FACTOR_BLOCK_KEY}_${configId}`, newInfo);\n };\n\n public getSecondFactorInfo = (configId: string): Null => {\n return this.getSSItem(`${this.SECOND_FACTOR_BLOCK_KEY}_${configId}`);\n };\n\n public removeSecondFactorInfo = (configId: string): void => {\n this.removeSSItem(`${this.SECOND_FACTOR_BLOCK_KEY}_${configId}`);\n };\n\n /** Несохраненные новые Radius конфигурации. */\n private NEW_CONFIGURATIONS_KEY = 'newConfigurations';\n public setNewConfiguration = (\n source: SourceNames,\n id: string,\n value: ParsedConfiguration\n ) => {\n const prev = this.getNewConfigurations(source) || {};\n let prop = { [id]: value };\n\n if (prev) {\n prop = {\n ...prev,\n [id]: value,\n };\n }\n\n this.setSSItem(`${source}_${this.NEW_CONFIGURATIONS_KEY}`, prop);\n };\n\n public getNewConfigurations = (\n source: SourceNames\n ): Null> => {\n return this.getSSItem(`${source}_${this.NEW_CONFIGURATIONS_KEY}`);\n };\n\n public removeNewConfiguration = (source: SourceNames, id: string): void => {\n const prev = this.getNewConfigurations(source);\n\n if (prev && Object.keys(prev).length > 1) {\n delete prev[id];\n this.setSSItem(`${source}_${this.NEW_CONFIGURATIONS_KEY}`, prev);\n } else {\n this.removeSSItem(`${source}_${this.NEW_CONFIGURATIONS_KEY}`);\n }\n };\n\n /**\n * Идентификатор текущей формы. Храним, чтобы при перезагрузке страницы\n * открывать текущую форму, а не первую.\n */\n private CURRENT_FORM_ID_KEY = 'currentFormId';\n public setCurrentFormId = (source: SourceNames, id: string) => {\n this.setSSItem(`${source}_${this.CURRENT_FORM_ID_KEY}`, id);\n };\n\n public getCurrentFormId = (source: SourceNames): Null => {\n return this.getSSItem(`${source}_${this.CURRENT_FORM_ID_KEY}`);\n };\n\n public removeCurrentFormId = (source: SourceNames): void => {\n this.removeSSItem(`${source}_${this.NEW_CONFIGURATIONS_KEY}`);\n };\n\n /** Флаг скрытия ошибки проверки лицензии onprem инсталляции. */\n private SKIP_ONPREM_ERROR_BANNER_FLAG = 'skipOnPremErrorBanner';\n public setSkipOnPremErrorBannerFlag = () => {\n this.setSSItem(this.SKIP_ONPREM_ERROR_BANNER_FLAG, true);\n };\n\n public getSkipOnPremErrorBannerFlag = (): Null => {\n return this.getSSItem(this.SKIP_ONPREM_ERROR_BANNER_FLAG);\n };\n}\n","import LocalStorage from './localStorage';\nimport SessionStorage from './sessionStorage';\n\nexport default class Storage {\n public localStorage: LocalStorage;\n public sessionStorage: SessionStorage;\n private prefix = 'KID_';\n public constructor() {\n this.localStorage = new LocalStorage(this.prefix);\n this.sessionStorage = new SessionStorage(this.prefix);\n }\n}\n","import 'dayjs/locale/ru';\n\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport isToday from 'dayjs/plugin/isToday';\nimport isYesterday from 'dayjs/plugin/isYesterday';\nimport timezone from 'dayjs/plugin/timezone';\nimport updateLocale from 'dayjs/plugin/updateLocale';\nimport utc from 'dayjs/plugin/utc';\n\nimport { FromToFilters } from '../shared/FromToFilter/util';\nimport { notEmpty } from './common';\nimport { SHORT_MONTHS } from './constants';\nimport { Null } from './types';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(updateLocale);\ndayjs.extend(isYesterday);\ndayjs.extend(isToday);\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\ndayjs.updateLocale('ru', { monthsShort: SHORT_MONTHS });\n\nexport const DAY_END = '23:59';\n\n/**\n * Форматируем дату, приводим к виду дд.мм.гггг.\n *\n * @param date Объект Date, который нужно форматировать.\n */\nexport const formatDateDDMMYYYY = (date: Date): string =>\n dayjs(date).locale('ru').format('DD.MM.YYYY');\n\n/**\n * Приводим время из объекта Date к строке hh:mm[:ss]. Результат возвращаем по\n * местному времени.\n *\n * @param date Объект Date.\n * @param needSec Флаг, включающий отображение секунд.\n */\nexport const formatTime = (date: Date, needSec = false): string => {\n const format = needSec ? 'HH:mm:ss' : 'HH:mm';\n return dayjs(date).locale('ru').format(format);\n};\n\n/**\n * Получаем дату и месяц в формате \"дд мес [гггг]\" из переданной даты.\n *\n * - Год показывает только в том случае, если заданная дата не в текущем году.\n * - Если дата указывает на сегодняшний день, возвращаем \"Сегодня\".\n * - Если дата указывает на вчерашний день, возвращаем \"Вчера\".\n *\n * @param date Объект даты, который нужно привести к виду \"дд мес [гггг]\".\n */\nexport const getExpandedDate = (date: Date): string => {\n const _date = dayjs(date);\n\n switch (true) {\n case _date.isToday():\n return 'Сегодня';\n case _date.isYesterday():\n return 'Вчера';\n }\n\n let format = 'D MMM';\n\n // показываем год, если он не совпадает с текущим\n if (!dayjs().isSame(date, 'year')) {\n format = 'D MMM YYYY';\n }\n\n return _date.locale('ru').format(format);\n};\n\n/**\n * Форматируем дату из строки вида DD.MM.YYYY в объект Date из js.\n *\n * @param date Строка с датой.\n * @param [flag] Флаг установки часов в начало или конец дня: end | start.\n */\nexport const parseDateDDMMYYYY = (\n date: string,\n flag?: 'end' | 'start'\n): Date => {\n if (notEmpty(flag)) {\n const hours = flag === 'start' ? 0 : 23;\n const minutes = flag === 'start' ? 0 : 59;\n return dayjs(\n `${date}T${hours}:${minutes}:00`,\n `DD.MM.YYYYTHH:mm:ss`\n ).toDate();\n }\n\n return dayjs(date, 'DD.MM.YYYY').toDate();\n};\n\n/**\n * Сравниваем даты в формате дд.мм.гггг. Если date1 > date2, возвращаем 1. Если\n * date1 < date2, возвращаем -1. Если даты равны, возвращаем 0.\n *\n * @param date1 Первая дата для сравнения.\n * @param date2 Вторая дата для сравнения.\n */\nexport const compareDates = (date1: string, date2: string): number => {\n const parsedDate1 = parseDateDDMMYYYY(date1);\n const parsedDate2 = parseDateDDMMYYYY(date2);\n\n switch (true) {\n case parsedDate1 > parsedDate2:\n return 1;\n case parsedDate1 < parsedDate2:\n return -1;\n default:\n return 0;\n }\n};\n\n/**\n * Меняем часовой пояс с UTC на локальный для клиента, возвращаем объект даты.\n *\n * @param dateString Строка с датой в UTC.\n */\nexport const ajustTimeZone = (dateString: string): Date => {\n const zoneMark =\n dateString[dateString.length - 1].toLocaleLowerCase() === 'z' ? '' : 'Z';\n return new Date(`${dateString}${zoneMark}`);\n};\n\n/**\n * Форматируем дату в формате \"2024-02-15T12:24:32Z\": приводим к виду \"дд мес\n * [гггг] в hh:mm:ss\" в текущем часовом поясе.\n *\n * @param dateString Строка с датой для форматирования.\n */\nexport const formatExpandedFullDate = (dateString: string): Null => {\n if (!dateString) {\n return null;\n }\n\n const date = ajustTimeZone(dateString);\n const datePart = getExpandedDate(date);\n const timePart = formatTime(date, true);\n\n return `${datePart} в ${timePart}`;\n};\n\n/**\n * Приводим дату к виду dd.mm.yyyy, hh:mm в текущем часовом поясе.\n *\n * @param [dateString] Строка с датой.\n */\nexport const getDateTime = (dateString?: string) => {\n if (!dateString) return '';\n\n const date = ajustTimeZone(dateString);\n return dayjs(date).locale('ru').format('DD.MM.YYYY, HH:mm');\n};\n\n/**\n * Вычитаем дни с сегодняшнего дня.\n *\n * @param daysNumber Количество дней, которые нужно вычесть.\n */\nexport const subtractDays = (daysNumber = 1): Date =>\n dayjs().subtract(daysNumber, 'day').toDate();\n\n/**\n * Парсим строку \"hh:mm\" в массив чисел.\n *\n * @param timeString Строка времени в формате \"hh:mm\".\n */\nexport const parseTimeString = (timeString: string): number[] => {\n const [hours, minutes] = timeString.split(':').map(Number);\n return [hours, minutes];\n};\n\n/** Получаем сдвиг часового пояса от UTC в часах. */\nexport const getOffsetTimezoneInHours = () => {\n const now = new Date();\n return now.getTimezoneOffset() / 60;\n};\n\nconst DEFAULT_DAY_END = 24;\n\n/**\n * Вычисляем локальное время на основе UTC и часового пояса.\n *\n * @param utcString Строка времени в UTC.\n */\nexport const utcToLocalTime = (utcString: string): string => {\n const [hours, minutes] = parseTimeString(utcString);\n const offsetHours = getOffsetTimezoneInHours();\n\n let localHours = hours - offsetHours;\n const absoluteOffset = Math.abs(offsetHours);\n\n // Обрабатываем ситуацию, когда локальное время - это вчера\n if (offsetHours > 0 && hours < absoluteOffset) {\n localHours = DEFAULT_DAY_END - (absoluteOffset - hours);\n }\n\n // Обрабатываем ситуацию, когда локальное время - это завтра\n const hoursToTomorrow = DEFAULT_DAY_END - hours;\n\n if (offsetHours < 0 && hoursToTomorrow < absoluteOffset) {\n localHours = absoluteOffset - hoursToTomorrow;\n }\n\n // Заменяем \"24\" на \"0\"\n const adjustedLocalHours = localHours === DEFAULT_DAY_END ? 0 : localHours;\n return `${adjustedLocalHours\n .toString()\n .padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;\n};\n\n/**\n * Вычисляем UTC время на основе локального и часового пояса.\n *\n * @param localString Строка времени в локальном часовом поясе.\n */\nexport const localToUtcTime = (localString: string): string => {\n const [hours, minutes] = parseTimeString(localString);\n const offsetHours = getOffsetTimezoneInHours();\n\n let utcHours = hours + offsetHours;\n const absoluteOffset = Math.abs(offsetHours);\n\n // Обрабатываем ситуацию, когда время по UTC - это вчера\n if (offsetHours < 0 && absoluteOffset > hours) {\n utcHours = DEFAULT_DAY_END - (absoluteOffset - hours);\n }\n\n // Обрабатываем ситуацию, когда время по UTC - это завтра\n const hoursToTomorrow = DEFAULT_DAY_END - hours;\n\n if (offsetHours > 0 && absoluteOffset > hoursToTomorrow) {\n utcHours = absoluteOffset - hoursToTomorrow;\n }\n\n // Заменяем \"24\" на \"0\"\n const adjustedUTCHours = utcHours === DEFAULT_DAY_END ? 0 : utcHours;\n return `${adjustedUTCHours\n .toString()\n .padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;\n};\n\n/**\n * Переводим строку в формате DD.MM.YYYY в строку YYYY-MM-DDTHH:mm:ss.SSSZ.\n *\n * @param dateString Строка в формате DD.MM.YYYY.\n */\nexport const parseToUTC = (dateString: string) => {\n const parsed = parseDateDDMMYYYY(dateString, 'end');\n const formatted = dayjs(parsed).format('YYYY-MM-DDTHH:mm:ss');\n return dayjs(formatted).toISOString();\n};\n\n// формат дат, принимаемых компонентом DatePicker (дд.мм.гггг)\n// и сервером (гггг-мм-ддTчч:мм), отличаются\nexport const prepareDateFilters = (filters: T): T => {\n const { startDate, endDate } = filters;\n return {\n ...filters,\n startDate: parseDateDDMMYYYY(startDate, 'start').toISOString(),\n endDate: parseDateDDMMYYYY(endDate, 'end').toISOString(),\n };\n};\n\n/**\n * Убираем миллисекунды из строки времени.\n *\n * @param time Строка в формате hh:mm:ss.ms.\n */\nexport const truncateMilliseconds = (time: string): string => {\n return time.split('.')[0];\n};\n\n// Определяем текущий часовой пояс.\nexport const getCurrentTimezone = () => dayjs.tz.guess();\n","import {\n ActiveSyncConfigurationResponse,\n RadiusConfigurationResponse,\n} from '../api/ConfigurationsApi/types';\nimport { FirstFactors, SecondFactors } from './factorTypes';\nimport { Null } from './globalTypes';\nimport { RadiusProxySettings } from './radiusConfigurationTypes';\nimport { SourceNames, SourceTypes } from './sourceTypes';\n\n/** Расширенная информация о конфигурациях, дополненная именем ресурса. */\nexport interface SourceConfiguration {\n configurations: RadiusConfigurationResponse[];\n resourceId: SourceNames;\n}\n\n/**\n * Расширенная информация об ActiveSync конфигурациях, дополненная именем\n * ресурса.\n */\nexport interface ActiveSyncConfigurations {\n configurations: ActiveSyncConfigurationResponse[];\n resourceId: SourceNames.ActiveSync;\n}\nexport type Configuration =\n | RadiusProxySettings\n | ActiveSyncConfigurationResponse;\n\n/** Базовые настройки Radius сервера. */\nexport interface BaseRadiusServerConfiguration {\n IpAddress: string;\n Localization: 'Ru' | 'En';\n Port: number;\n SharedSecret: string;\n SourceName: Null;\n}\n\n/**\n * Часть конфигурации, отвечающая за настройку Verification api. Настройка может\n * быть применена для ресурсов Radius Proxy и Windows.\n */\nexport interface VerificationApiConfiguration {\n ApiKey: string;\n PollingPeriodInSecond: number;\n TimeoutForWaiting2FaActionSeconds: number;\n VerificationApiUrl: string;\n}\n\n/**\n * Часть конфигурации, отвечающая за настройку факторов входа.\n *\n * @property FirstFactorSource Основные способы подтверждения входа.\n * @property SecondFactorSource Дополнительные способы подтверждения входа.\n */\n\nexport interface BaseAuthenticationConfiguration {\n FirstFactorSource: FirstFactors;\n SecondFactorSource: SecondFactors;\n}\n\n/**\n * Информация о домене текущей конфигурации.\n *\n * @property Name Домен.\n * @property [NetBiosName] NetBios имя домена.\n * @property [ServerAddress] - Адрес сервера для домена из Name. Используется в\n * конфигурациях Radius.\n */\nexport interface DomainSettings {\n Name: string;\n NetBiosName?: Null;\n ServerAddress?: Null;\n}\n\n/** Настройки домена в ActiveDirectory. */\nexport interface DomainConfiguration {\n DomainSettings: DomainSettings;\n}\n\n/** Часть конфигурации, отвечающая за настройку Active Directory. */\nexport interface ActiveDirectoryConfiguration {\n DomainConfigurations: DomainConfiguration[];\n}\n\n/** Платформы настроек. */\nexport enum Platforms {\n Linux = 'Linux',\n Windows = 'Windows',\n}\n\n/**\n * ----------------------- Общие типы для Win и Ssh, в raw виде, полученном из\n * апи ------------------------------\n */\n\n/**\n * Raw. Отдельная конфигурация из массива конфигураций ресурса, полученных из\n * ответа API.\n *\n * @property id Идентификатор конфигурации.\n * @property resourceSetting Настройки конкретной конфигурации ресурса из API.\n */\nexport interface SettingInfo {\n id: string;\n resourceSetting: ResourceSettings;\n}\n\n/**\n * Raw. Настройки конкретной конфигурации ресурса из API.\n *\n * @property configurations Объект с настройками конфигурации для разных типов\n * ресурсов.\n * @property name Название конфигурации.\n */\nexport interface ResourceSettings {\n configurations: SettingsRecord;\n name: string;\n}\n\n/**\n * Объект с настройками для разных типров ресурсов в одной конфигурации.\n *\n * Ключ объекта - название ресурса, для которого заданы настройки. Значение\n * объекта - сами настройки.\n */\nexport type SettingsRecord = Partial>;\n\n/**\n * Raw. Часть конфигурации с настройками в виде строки для каждого типа ресурса.\n *\n * У одной конфигурации могут быть заданы настройки для Radius и SSH\n * одновременно: \"Configurations\": { \"RadiusProxy\": { // часть настроек Radius\n * \"ConfigurationString\": \"...\", \"SourceType\": \"RadiusProxy\", \"Platform\": \"...\"\n * }, \"Ssh\": { // Часть настроек Ssh \"ConfigurationString\": \"...\", \"SourceType\":\n * \"Ssh\" } }\n *\n * @property configurationString JSON с настройками в виде строки.\n * @property sourceType Тип ресурса, для которого заданы настройки.\n * @property [platform] Платформа, для котрой заданы настройки.\n */\nexport interface ResourceConfiguration {\n configurationString: string;\n platform?: Null;\n sourceType: string | SourceTypes;\n}\n\n/**\n * Настройки конкретной конфигурации ресурса, дополненной идентификатором.\n * Настройки в configurations переданы в виде строки.\n */\nexport interface ConfigurationSettings {\n configurations: SettingsRecord;\n id: string;\n name: string;\n}\n\n/** ## ----------------------- Общие типы для Win и Ssh, распарсенные из типов АПИ */\n\n/**\n * Настройки конкретной конфигурации ресурса, дополненной идентификатором.\n * Настройки в configurations переданы в виде JSON.\n */\nexport interface ParsedConfigurationSettings {\n configurations: ParsedSettingsRecord;\n id: string;\n name: string;\n}\n\n/**\n * Объект с настройками для разных типров ресурсов в одной конфигурации.\n *\n * Ключ объекта - название ресурса, для которого заданы настройки. Значение\n * объекта - сами настройки.\n */\nexport type ParsedSettingsRecord = Partial<\n Record\n>;\n\n/**\n * Часть конфигурации с распарсенными настройками для каждого типа ресурса.\n *\n * @property configurationString JSON с настройками в распарсенном виде.\n * @property sourceType Тип ресурса, для которого заданы настройки.\n * @property platform Платформа, для котрой заданы настройки.\n */\nexport interface ParsedResourceConfiguration {\n configuration: Record | string;\n platform: Null;\n // конфигурация Windows остается строкой\n sourceType: SourceTypes | string;\n}\n","import { Nullable } from './globalTypes';\nimport { Policies } from './policyTypes';\nimport { SourceNames } from './sourceTypes';\n\nexport enum InitiatorEventTypes {\n Admin = 'Admin',\n Synchronizer = 'Synchronizer',\n User = 'User',\n}\n\nexport interface EventError {\n code: string; // todo сделать более уникальный тип\n message: string;\n}\n\nexport enum EventNames {\n AdminDropFactorEvent = 'AdminDropFactorEvent',\n Check1FAEvent = 'Check1FAEvent',\n Check2FAEvent = 'Check2FAEvent',\n EntryToPamResourceEvent = 'EntryToPamResourceEvent',\n EntryToResourceEvent = 'EntryToResourceEvent',\n Skip2FAEvent = 'Skip2FAEvent',\n UserAddFactorEvent = 'UserAddFactorEvent',\n UserDropFactorEvent = 'UserDropFactorEvent',\n}\n\nexport enum EventCategories {\n Authentication = 'Authentication',\n Authorization = 'Authorization',\n UserAccount = 'UserAccount',\n UserManagement = 'UserManagement',\n}\n\n/**\n * Базовый интерфейс события. Содержит все свойства, которые точно будут в\n * событии.\n *\n * @param eventId Уникальный идентификатор события.\n * @param date Время события по UTC в формате DateTime\n * 2024-02-15T12:24:32Z.\n * @param eventName Название события.\n * @param category Категория события.\n * @param initiatorEventType Источник события: Admin, User, Synchronizer.\n * @param isSuccess Состояние успешности события.\n * @param error Информация о неуспешном событии.\n */\nexport interface EventBase {\n category: EventCategories | string;\n date: string;\n error: Nullable;\n eventId: string;\n eventName: EventNames | string;\n initiatorEventType: InitiatorEventTypes;\n}\n\n/**\n * Информация о местоположении участника события.\n *\n * @param iP IP адрес участника события.\n * @param city Город, в котором произошло событие.\n */\nexport interface EventLocation {\n city: Nullable;\n ip: Nullable;\n}\n\n/**\n * Информация об участнике события (инициаторе или объекте).\n *\n * @param [DomainLogin] Логин участника события.\n * @param [DomainContext] Домен, в котором произошло событие у многодоменных\n * организаций.\n * @param [UserId] Идентификатор пользователя-участника события.\n * @param [Location] Местоположение (город) участника события.\n */\nexport interface EventUserInfo {\n domainContext?: string;\n domainLogin?: string;\n location?: Nullable;\n userId?: Nullable;\n}\n\n/** Типы 1 фактора в событии. */\nexport enum Types1FA {\n ActiveDirectory = 'ActiveDirectory',\n ExternalRadiusServer = 'ExternalRadiusServer',\n Ldap = 'Ldap',\n}\n\n/**\n * Интерфейс события входа \"Пользователь ввел логин и пароль, АД подтвердила,\n * что все верно\". Содержит уникальные свойства событий данного типа.\n *\n * @param initiator Информация об инициаторе события.\n * @param user Информация о пользователе-объекте события.\n * @param resourceType Название ресурса, в котором произошло событие.\n * @param typeFA Тип подтверждения основного фактора, при котором\n * произошло событие входа.\n */\nexport interface Check1FAEvent extends EventBase {\n eventName: EventNames.Check1FAEvent;\n initiator: EventUserInfo;\n resourceType: SourceNames;\n typeFA: Types1FA;\n user: EventUserInfo;\n}\n\n/** Типы 2 фактора в событии. */\nexport enum Types2FA {\n Call = 'Call',\n OTP = 'OTP',\n Push = 'Push',\n}\n\n/**\n * Интерфейс события входа \"Пользователь подтвердил второй фактор. KID пустил\n * пользователя в сеть организации.\". Содержит уникальные свойства событий\n * данного типа.\n *\n * @param initiator Информация об инициаторе события.\n * @param user Информация о пользователе-объекте события.\n * @param resourceType Название ресурса, в котором произошло событие.\n * @param typeFA Тип подтверждения второго фактора, при котором\n * произошло событие входа.\n * @param deviceLocation Местоположение девайса, с помощью которого был\n * подтвержден 2 фактор.\n */\nexport interface Check2FAEvent extends EventBase {\n deviceLocation: Nullable;\n eventName: EventNames.Check2FAEvent;\n initiator: EventUserInfo;\n resourceType: SourceNames;\n typeFA: Types2FA;\n user: EventUserInfo;\n}\n\n/**\n * Возможные причины, по которым мы не спрашиваем второй фактор.\n *\n * @param UsersExceptions Пользователь-объект события состоит в исключениях по\n * пользователям.\n * @param GroupExceptions Пользователь-объект события состоит в исключениях по\n * группам пользователей.\n * @param NotInExceptions Пользователь-объект события не состоит в исключениях.\n * @param AuthCache Подтверждение 2 фактора взято из кеша аутентификации.\n */\nexport enum Exceptions2FA {\n ApiUnreachable = 'ApiUnreachable',\n AuthCache = 'AuthCache',\n GroupExceptions = 'GroupExceptions',\n NotInExceptions = 'NotInExceptions',\n UsersExceptions = 'UsersExceptions',\n}\n\n/**\n * Интерфейс события входа \"Первый фактор подтвержден, но пользователь находится\n * в исключениях – у него не надо проверять 2FA. KID пропускает пользователя в\n * сеть организации.\". Содержит уникальные свойства событий данного типа. Error\n * отсутствует, поскольку событие всегда успешно.\n *\n * @param initiator Информация об инициаторе события.\n * @param user Информация о пользователе-объекте события.\n * @param resourceType Название ресурса, в котором произошло событие.\n * @param exception Причина, по которой у пользователя при входе не было\n * запрошено подтвержение 2 фактора.\n * @param groupExceptions Список групп пользователей, находящихся в исключениях.\n */\nexport interface Skip2FAEvent extends EventBase {\n authenticationPolicy: Nullable>;\n eventName: EventNames.Skip2FAEvent;\n exception: Exceptions2FA;\n groupExceptions: Nullable;\n initiator: EventUserInfo;\n resourceType: SourceNames;\n user: EventUserInfo;\n}\n\n/**\n * Интерфейс события входа на ресурс.\n *\n * @param initiator Информация об инициаторе события.\n * @param user Информация о пользователе-объекте события.\n * @param resourceType Название ресурса, в котором произошло событие.\n */\nexport interface EntryToResourceEvent extends EventBase {\n eventName: EventNames.EntryToResourceEvent;\n initiator: EventUserInfo;\n resourceType: SourceNames;\n user: EventUserInfo;\n}\n\n/**\n * Интерфейс события входа на машину PAM (\"ресурс PAM\").\n *\n * @param initiator Информация об инициаторе события.\n * @param user Информация о пользователе-объекте события.\n * @param resourceType Название ресурса, в котором произошло событие.\n * @param pamResourceName Доменное имя машины, на которую входил пользователь.\n */\nexport interface EntryToPamResourceEvent extends EventBase {\n eventName: EventNames.EntryToPamResourceEvent;\n initiator: EventUserInfo;\n pamResourceName: string;\n resourceType: SourceNames;\n user: EventUserInfo;\n}\n\n/** Действия с факторами входа. */\nexport enum FactorActionNames {\n AddConnect = 'AddConnect',\n AddPhone = 'AddPhone',\n DropConnect = 'DropConnect',\n DropPhone = 'DropPhone',\n}\n\n/**\n * Интерфейс события отвязки устройства пользователя админом.\n *\n * @param initiator Информация об инициаторе события.\n * @param user Информация о пользователе-объекте события.\n * @param actionName Название действия, совершенного в рамках события.\n * @param phoneNumber Номер телефона в случае действий DropPhone или AddPhone.\n * @param deviceId Привязанное устройство в случае действий DropConnect или\n * AddConnect.\n * @param deviceModel Модель привязанного устройства в случае действий\n * DropConnect или AddConnect.\n */\nexport interface AdminDropFactorEvent extends EventBase {\n actionName: FactorActionNames;\n deviceId?: string;\n deviceModel?: string;\n eventName: EventNames.AdminDropFactorEvent;\n initiator: EventUserInfo;\n phoneNumber?: string;\n user: EventUserInfo;\n}\n\n/** Интерфейс события отвязки своего устройства пользователем. */\nexport interface UserDropFactorEvent\n extends Omit {\n eventName: EventNames.UserDropFactorEvent;\n}\n\n/** Интерфейс события привязки нового устройства пользователем. */\nexport interface UserBindFactorEvent\n extends Omit {\n eventName: EventNames.UserAddFactorEvent;\n}\n\nexport type IEvent =\n | Skip2FAEvent\n | Check2FAEvent\n | Check1FAEvent\n | EntryToResourceEvent\n | EntryToPamResourceEvent\n | AdminDropFactorEvent\n | UserDropFactorEvent\n | UserBindFactorEvent;\n\n/**\n * Поля, по которым можно отфильтровать события.\n *\n * @param startDate Дата первого события в формате \"гггг-мм-ддTчч:мм:сс.мс\".\n * @param endDate Дата последнего события в формате\n * \"гггг-мм-ддTчч:мм:сс.мс\".\n * @param [isSuccess] Статус события. true - только успешные, false - только\n * неуспешные, нет - все.\n * @param [userLogin] Логин пользователя.\n * @param [userDomain] Домен почты пользователя.\n */\nexport interface EventsFilters {\n endDate: string;\n isSuccess?: boolean;\n startDate: string;\n userDomain?: string;\n userLogin?: string;\n}\n","/** Способы первого фактора входа. */\nexport enum FirstFactors {\n ActiveDirectory = 'ActiveDirectory',\n None = 'None',\n OTP = 'Verification.Api.OTP',\n Radius = 'ExternalRadius',\n}\n\n/** Способы второго фактора входа. */\nexport enum SecondFactors {\n None = 'None',\n OTP = 'Verification.Api.OTP',\n Push = 'Verification.Api.Notification',\n}\n\nexport type EnabledSecondFactors = SecondFactors.Push | SecondFactors.OTP;\n","/** Варианты окружений для приложения. */\nexport enum Environment {\n LOCAL = '__local_test__',\n PRODUCTION = 'prod',\n TEST = 'test',\n}\n","import { LogonName } from './userTypes';\n\n/** Источник отправки приглашения. */\nexport enum InviteSource {\n ADFSAdapter = 'ADFSAdapter',\n ControlPanel = 'ControlPanel',\n OWAAdapter = 'OWAAdapter',\n RadiusProxy = 'RadiusProxy',\n Synchronizer = 'Synchronizer',\n}\n\n/** Информация о типе инвайта. */\nexport enum InviteTypes {\n Email = 'Email',\n Files = 'Files',\n Link = 'Link',\n Phone = 'Phone',\n}\n\n/** Информация об инвайте пользователю. */\nexport interface UserInvite {\n address: string;\n creationDate: string;\n expirationDate: string;\n inviteId: string;\n inviteType: InviteTypes;\n logonName: LogonName;\n source: InviteSource | string;\n}\n\n/** Информация об инвайте администратору. */\nexport interface AdminInvite {\n address: string;\n creationDate: string;\n expirationDate: string;\n inviteId: string;\n inviteType: InviteTypes;\n isSuperAdmin: boolean;\n}\n","import { Null } from './globalTypes';\nimport { IUser } from './userTypes';\n\n/** Типы политик проверки второго фактора. */\nexport enum Policies {\n AllUsers = 'AllUsers',\n AllUsersWithExceptions = 'AllUsersWithExceptions',\n NoOneWithExceptions = 'NoOneWithExceptions',\n}\n\n/**\n * Исключения по группам, распределенным по доменам. (у каждого домена свои\n * группы исключений)\n *\n * Ключ - домен. Значение - Список названий групп пользователей.\n */\nexport type GroupsExceptions = Record;\n\n/**\n * Исключения политики проверки второго фактора в том виде, в которм они\n * хранятся в файле appsettings.json.\n *\n * @property [Users] Список идентификаторов пользователей.\n * @property [Domains] Список названий групп пользователей.\n */\nexport interface InitialExceptions {\n Domains?: Null;\n LocalUsers?: Null;\n Users?: Null;\n}\n\n/**\n * Часть RadiusProxy конфигурации, отвечающая за настройку политики проверки\n * второго фактора.\n *\n * @property [Policy] Политика исключений.\n * @property [Exceptions] Списки исключений для текущей политики.\n */\nexport interface PolicyConfiguration {\n Exceptions?: InitialExceptions;\n Policy: Null;\n}\n\n/** Список исключений, расширенный информацией о пользователях. */\nexport interface PolicyExceptions {\n /**\n * Пока всегда приходит один домен, а также нет прототипов на многодоменность,\n * поэтому на форме собираем только группы, при сохранении приводим к нужному\n * виду.\n *\n * Todo: вернуть после KID-420. Domains?: GroupsExceptions;\n */\n Domains: string[];\n LocalUsers?: string[];\n Users: IUser[];\n}\n\n/** Политики проверки второго фактора с исключениями. */\nexport interface PolicyWithExceptions {\n Exceptions?: PolicyExceptions;\n Policy: Policies;\n}\n","import {\n ActiveDirectoryConfiguration,\n BaseAuthenticationConfiguration,\n BaseRadiusServerConfiguration,\n Platforms,\n VerificationApiConfiguration,\n} from './configurationTypes';\nimport { Null } from './globalTypes';\nimport { PolicyConfiguration, PolicyWithExceptions } from './policyTypes';\nimport { PureRadiusSource } from './sourceTypes';\n\n/** Часть RadiusProxy конфигурации, отвечающая за настройку Radius сервера. */\nexport interface RadiusServerConfiguration\n extends BaseRadiusServerConfiguration {\n SourceId: Null;\n SourceName: PureRadiusSource;\n}\n\n/** Часть RadiusProxy конфигурации, отвечающая за настройку Radius клиента. */\nexport interface RadiusClientConfiguration {\n ClientEndpoint: string;\n ExternalRadiusEndpoint: Null;\n}\n\n/** Информация о конфигурации RadiusProxy, распарсенная с jsonа. */\nexport interface ParsedRadiusProxySourceConfiguration {\n ActiveDirectoryConfiguration?: ActiveDirectoryConfiguration;\n AuthenticationConfiguration: BaseAuthenticationConfiguration;\n PolicyConfiguration: PolicyConfiguration;\n RadiusServerConfiguration: RadiusServerConfiguration;\n VerificationApiConfiguration: VerificationApiConfiguration;\n}\n\n/**\n * Конфигурация RadiusProxy с расширенными настройками Политики проверки второго\n * фактора.\n */\nexport interface ExpandedRadiusProxyConfiguration {\n ActiveDirectoryConfiguration?: ActiveDirectoryConfiguration;\n AuthenticationConfiguration: BaseAuthenticationConfiguration;\n PolicyConfiguration: PolicyWithExceptions;\n RadiusClientConfiguration: RadiusClientConfiguration;\n RadiusServerConfiguration: RadiusServerConfiguration;\n VerificationApiConfiguration: VerificationApiConfiguration;\n}\n\n/** Конфигурация PamRadiusRdg. */\nexport interface ExpandedPamRadiusRdgConfiguration {\n ActiveDirectoryConfiguration?: ActiveDirectoryConfiguration;\n AuthenticationConfiguration: BaseAuthenticationConfiguration;\n PamApiConfiguration: {\n EnableSessionsListener: boolean;\n PamApiUrl: string;\n };\n PolicyConfiguration: PolicyWithExceptions;\n RadiusClientConfiguration: RadiusClientConfiguration;\n RadiusServerConfiguration: RadiusServerConfiguration;\n VerificationApiConfiguration: VerificationApiConfiguration;\n}\n\n/** Части RadiusProxy конфигурации. */\nexport type RadiusConfigurationParts =\n | RadiusServerConfiguration\n | RadiusClientConfiguration\n | VerificationApiConfiguration\n | (PolicyWithExceptions | PolicyConfiguration)\n | BaseAuthenticationConfiguration\n | ActiveDirectoryConfiguration;\n\n/**\n * Тип конфигурации для использования на фронте.\n *\n * @property id Идентификатор конфигурации.\n * @property name Название конфигурации.\n * @property platform Платформа.\n * @property configuration Конфигурация.\n */\nexport interface RadiusProxySettings {\n configuration: ExpandedRadiusProxyConfiguration;\n id: string;\n name: string;\n platform: Platforms;\n}\n\n/**\n * Тип конфигурации для использования на фронте.\n *\n * @property id Идентификатор конфигурации.\n * @property name Название конфигурации.\n * @property platform Платформа.\n * @property configuration Конфигурация.\n */\nexport interface PamRadiusRdgProxySettings {\n configuration: ExpandedPamRadiusRdgConfiguration;\n id: string;\n name: string;\n platform: Platforms.Windows;\n}\n\n/** Имена частей Radius конфигурации. */\nexport enum RadiusConfigurationPropsNames {\n ActiveDirectoryConfiguration = 'ActiveDirectoryConfiguration',\n AuthenticationConfiguration = 'AuthenticationConfiguration',\n PolicyConfiguration = 'PolicyConfiguration',\n RadiusClientConfiguration = 'RadiusClientConfiguration',\n RadiusServerConfiguration = 'RadiusServerConfiguration',\n SelfRegistrationConfiguration = 'SelfRegistrationConfiguration',\n VerificationApiConfiguration = 'VerificationApiConfiguration',\n}\n","import { SecondFactorFilter } from '../../components/Users/utils';\nimport { Null } from './globalTypes';\n\n/** Факторы входа в информации о сотруднике. */\nexport enum UserSecondFactors {\n Call = 'Call',\n Connect = 'Connect',\n}\n\nexport interface LogonName {\n domain?: string;\n login: string;\n}\n\n/** Информация о сотруднике. */\nexport interface IUser {\n devicesNames: string[];\n email: Null;\n fullName?: string;\n isBlocked?: boolean;\n /** PAM. */\n isPrivilege?: boolean;\n konturConnectExist: boolean;\n lastActivityAt: Null;\n loginAD?: string;\n logins: LogonName[];\n mfaIsNeed: boolean;\n phone: Null;\n secondFactor: Null;\n sid?: string;\n userId: string;\n}\n\n/** Фильтры пользователей. */\nexport interface UsersFilterParams extends SecondFactorFilter {\n searchString?: string;\n}\n","/** Ошибки при валидации полей ввода. */\nexport enum ValidationErrors {\n CONFLICT = 'Conflict',\n EMPTY = 'Empty',\n FORBIDDEN_SYMBOLS = 'ForbiddenSymbols',\n WRONG = 'Wrong',\n}\n","import {\n ActiveDirectoryConfiguration,\n BaseAuthenticationConfiguration,\n BaseRadiusServerConfiguration,\n ConfigurationSettings,\n ParsedConfigurationSettings,\n ParsedResourceConfiguration,\n Platforms,\n ResourceConfiguration,\n ResourceSettings,\n SettingInfo,\n VerificationApiConfiguration,\n} from './configurationTypes';\nimport { FirstFactors } from './factorTypes';\nimport { Null } from './globalTypes';\nimport { SourceNames, SourceTypes } from './sourceTypes';\n\n/** Информация о конфигурации Windows. */\nexport interface WindowsSettingInfo extends SettingInfo {\n id: string;\n resourceSetting: WindowsResourceSettings;\n}\n\n/** Заголовки настроек для Windows. */\nexport enum WindowsConfigurationsNames {\n CredentialProviderNotification = 'CredentialProviderNotification',\n CredentialProviderOTP = 'CredentialProviderOTP',\n}\n\n/** Заголовки настроек для Radius. */\nexport enum RadiusConfigurationsNames {\n RadiusNotification = 'RadiusNotification',\n RadiusOTP = 'RadiusOTP',\n}\n\n/** Названия настроек для конфигурации Windows. */\nexport type ConfigurationsNames =\n | WindowsConfigurationsNames\n | RadiusConfigurationsNames;\n\n/** Распарсенные настройки Radius для конфигурации Windows. */\nexport interface ParsedRadiusConfiguration extends ParsedResourceConfiguration {\n configuration: RadiusConfigurationForWindows;\n platform: Null;\n sourceType: SourceTypes.RadiusProxy;\n}\n\n/** Распарсенные настройки Windows для конфигурации Windows. */\nexport interface ParsedWindowsConfiguration\n extends ParsedResourceConfiguration {\n configuration: string;\n platform: Null;\n sourceType: WindowsConfigurationsNames;\n}\n\n/** Настройки фактора для Windows или Radius частей конфигурации Windows. */\nexport interface WindowsResourceConfiguration extends ResourceConfiguration {\n configurationString: string;\n platform?: Null;\n sourceType: WindowsConfigurationsNames | SourceTypes.RadiusProxy;\n}\n\n/** Объект с настройками Windows конфигурации, полученный с сервера. */\nexport type WindowsSettingsRecord = Partial<\n Record\n>;\n\n/** Информация о конкретной конфигурации ресурса Windows. */\nexport interface WindowsResourceSettings extends ResourceSettings {\n configurations: WindowsSettingsRecord;\n}\n\n/** Информация о конфигурации Windows, дополненная идентификатором. */\nexport interface WindowsSettings extends ConfigurationSettings {\n configurations: WindowsSettingsRecord;\n}\n\n/** Распарсенный объект с настройками Windows конфигурации. */\nexport type ParsedWindowsSettingsRecord = Partial<{\n [K in ConfigurationsNames]: K extends RadiusConfigurationsNames\n ? ParsedRadiusConfiguration\n : ParsedWindowsConfiguration;\n}>;\n\n/**\n * Информация о конфигурации Windows с идентификатором и распарсенными\n * настройками.\n */\nexport interface ParsedWindowsSettings extends ParsedConfigurationSettings {\n configurations: ParsedWindowsSettingsRecord;\n id: string;\n name: string;\n}\n\n/** Часть конфигурации Windows, отвечающая за настройки Radius сервера. */\nexport interface RadiusServerConfigurationForWindows\n extends BaseRadiusServerConfiguration {\n LoggingPacket: boolean;\n SourceName: SourceNames.Windows;\n}\n\n/** Способы саморегистрации. */\nexport enum SelfRegistrationTypes {\n ByPhone = 'ByPhone',\n None = 'None',\n}\n\n/** Часть конфигурации Windows, отвечающая за настройки саморегистрации. */\nexport interface SelfRegistrationConfiguration {\n RegistrationType: SelfRegistrationTypes;\n}\n\n/** Настройка пользовательского поведения. */\nexport interface LocalUserBehavior {\n SkipAd: boolean;\n}\n\n/** Часть конфигурации Windows, отвечающая за настройку аутентификации. */\nexport interface AuthenticationConfigurationForWindows\n extends BaseAuthenticationConfiguration {\n FirstFactorSource: FirstFactors.ActiveDirectory;\n LocalUserBehavior: LocalUserBehavior;\n}\n\n/** Полный список настроек Radius конфигурации Windows. */\nexport interface RadiusConfigurationForWindows {\n ActiveDirectoryConfiguration: ActiveDirectoryConfiguration;\n AuthenticationConfiguration: AuthenticationConfigurationForWindows;\n RadiusServerConfiguration: RadiusServerConfigurationForWindows;\n SelfRegistrationConfiguration: SelfRegistrationConfiguration;\n VerificationApiConfiguration: VerificationApiConfiguration;\n}\n","import { Null } from './globalTypes';\n\n/**\n * Периоды активности роли/\n *\n * @param NotActive - Роль неактивна в течение суток.\n * @param FullDay - Роль активна 24 часа.\n * @param DaySegment - Роль активна в указанный период времени (startTime -\n * endTime).\n */\nexport enum RoleActivityModes {\n DaySegment = 'DaySegment',\n FullDay = 'FullDay',\n NotActive = 'NotActive',\n}\n\n/**\n * Расписание роли.\n *\n * @property activityMode Время действия роли в течение суток.\n * @property startTime Время начала действия роли в формате 16:22:02. Не\n * может быть больше endTime.\n * @property endTime Время конца действия роли в формате 16:22:02. Не может\n * быть больше startTime.\n */\nexport interface TimetableRow {\n activityMode: RoleActivityModes;\n endTime: Null;\n startTime: Null;\n}\n\n/** Базовая информация о роли, дополненная id. */\nexport interface ExpandedBaseRoleInfo extends BaseRoleInfo {\n id: string;\n}\n\n// todo: переделать, когда узнаем, какие статусы могут прилетать из апишки\nexport enum RoleStatuses {\n Active = 'Active',\n Inactive = 'Inactive',\n}\n\n/** Информация о роли, расширенная статусом и данными о создании. */\nexport interface RoleInfo extends BaseRoleInfo {\n createdByUser?: string;\n creationDate: string;\n id: string;\n status?: RoleStatuses;\n}\n\n/**\n * Информация для создания роли.\n *\n * @property name Название роли.\n * @property timeZoneId Текущий часовой пояс.\n * @property [endDate] Срок жизни роли в формате \"2024-10-29T16:18:25.709Z\".\n * Если не указан, роль живет бессрочно.\n * @property [description] Описание роли.\n * @property [timetable] Расписание роли. Если не указано, доступ 24/7.\n */\nexport interface BaseRoleInfo {\n description?: string;\n endDate?: string | null;\n name: string;\n timeZone: string;\n // если в какой-то день роль недоступна, отправляем null\n timetable?: Null>;\n}\n\n/** Связка \"Роль - Пользователь\". */\nexport interface UserRoleBinding {\n roleId: string;\n userId: string;\n}\n\n/** Связка \"Роль - Группа\". */\nexport interface GroupRoleBinding {\n groupId: string;\n roleId: string;\n}\n\n/** Информация о роли и ресурсе (машине). */\nexport interface RoleWithResources {\n resourceNames?: string[];\n role: RoleInfo;\n}\n","/** Типы ресурсов. */\nexport enum SourceTypes {\n ADFSAdapter = 'ADFSAdapter',\n IISAdapter = 'IISAdapter',\n PamRadiusRdg = 'PamRadiusRdg',\n RadiusProxy = 'RadiusProxy',\n Ssh = 'Ssh',\n Windows = 'Windows',\n}\n\n/** Имена ресурсов для отправки запросов. Должны писаться слитно. */\nexport enum SourceNames {\n ADFS = 'ADFS',\n ActiveSync = 'ActiveSync',\n Checkpoint = 'Checkpoint',\n CiscoAnyConnect = 'CiscoAnyConnect',\n CiscoFTD = 'CiscoFTD',\n CiscoISE = 'CiscoISE',\n FortiGate = 'FortiGate',\n IdecoVPN = 'IdecoVPN',\n Mikrotik = 'Mikrotik',\n OWA = 'OWA',\n OpenVPN = 'OpenVPN',\n OpenVPNAS = 'OpenVPNAS',\n PaloAlto = 'PaloAlto',\n RDG = 'RDG',\n SSH = 'SSH',\n UserGate = 'UserGate',\n VMwareHorizon = 'VMwareHorizon',\n WatchGuard = 'WatchGuard',\n Windows = 'Windows',\n WindowsVPN = 'WindowsVPN',\n}\n\n/** Имена ресурсов RadiusProxy. */\nexport type PureRadiusSource = Extract<\n SourceNames,\n | SourceNames.Checkpoint\n | SourceNames.CiscoAnyConnect\n | SourceNames.CiscoISE\n | SourceNames.CiscoFTD\n | SourceNames.OpenVPN\n | SourceNames.RDG\n | SourceNames.UserGate\n | SourceNames.FortiGate\n | SourceNames.PaloAlto\n | SourceNames.Mikrotik\n | SourceNames.OpenVPNAS\n | SourceNames.IdecoVPN\n | SourceNames.WindowsVPN\n | SourceNames.WatchGuard\n | SourceNames.VMwareHorizon\n>;\n","const isNumber = (value: string) => {\n const parsed = parseFloat(value);\n return !isNaN(parsed) && isFinite(parsed);\n};\n\nconst isBoolean = (value: string) => {\n return value === 'false' || value === 'true';\n};\n\nexport const parseNumber = (value: string) => {\n return Number(value);\n};\n\nexport const parseBoolean = (value: string) => {\n return value === 'true';\n};\n\n/**\n * Парсим значения из строки.\n *\n * @param value Строка.\n */\nexport const parseFromStringToPrimitive = (value: string) => {\n switch (true) {\n case typeof value.toString() === 'undefined' || value === '':\n return null;\n case isBoolean(value):\n return parseBoolean(value);\n case isNumber(value):\n return parseNumber(value);\n default:\n return value;\n }\n};\n","import { isEmpty } from 'lodash';\n\nimport { UsersTabQueries } from '../components/Users/utils';\nimport { getEnvironmentSettings, notEmpty } from './common';\nimport {\n DEFAULT_ACCESS_DENIED_URL,\n DEFAULT_AUTH_URL,\n DEFAULT_CABINET_URL,\n DEFAULT_LOGOUT_URL,\n DEFAULT_VERIFICATION_API_URL,\n} from './constants';\nimport { parseFromStringToPrimitive } from './parseTypes';\nimport { Environment } from './types';\n\n/** Определение актуального окружения. */\nexport const detectEnvironment = (): Environment => {\n const host = window.location.host;\n\n switch (true) {\n case /\\.kontur\\.ru$/.test(host):\n return Environment.PRODUCTION;\n case /^localhost\\.testkontur\\.ru$/.test(host):\n return Environment.LOCAL;\n default:\n return Environment.TEST;\n }\n};\n\nexport const getLogInUrl = (): string => {\n return `${\n getEnvironmentSettings()?.adminLogInUrl || DEFAULT_AUTH_URL\n }?back=${encodeURIComponent(window.location.href)}`;\n};\n\nexport const getLogOutUrl = (): string => {\n return `${\n getEnvironmentSettings()?.logOutUrl || DEFAULT_LOGOUT_URL\n }?back=${encodeURIComponent(window.location.href)}`;\n};\n\nexport const getAccessDeniedUrl = (): string => {\n return `${\n getEnvironmentSettings()?.accessDeniedUrl || DEFAULT_ACCESS_DENIED_URL\n }?back=${encodeURIComponent(window.location.href)}`;\n};\n\nexport const getCabinetUrl = (): string => {\n return getEnvironmentSettings()?.cabinetUrl || DEFAULT_CABINET_URL;\n};\n\nexport const getVerificationApiUrl = (): string => {\n return (\n getEnvironmentSettings()?.verificationApiUrl || DEFAULT_VERIFICATION_API_URL\n );\n};\n\nexport const getCheckOnPremLicenseFlag = (): boolean => {\n return getEnvironmentSettings()?.isNeedToCheckLicense || false;\n};\n\n/**\n * Получаем значение параметра из урла по его названию.\n *\n * @param name Название параметра, значение которого ищем.\n * @param [defaultValue] Дефолтное значение, если по названию параметр не\n * найден.\n * @param [customParser] Парсер для значения параметра. Если нет, то парсим\n * дефолтным parseFromStringToPrimitive.\n */\nexport const getQueryParamValue = (\n name: UsersTabQueries,\n defaultValue?: T,\n customParser: (value: string) => unknown = parseFromStringToPrimitive\n) => {\n const parameter = new URLSearchParams(\n decodeURIComponent(window.location.search)\n ).get(name);\n\n let result = defaultValue;\n\n if (notEmpty(parameter)) {\n result = (customParser(parameter) as T) ?? defaultValue;\n }\n\n return result;\n};\n\n/**\n * Опции поиска параметра в урле.\n *\n * @property query Название параметра, который нужно найти в урле.\n * @property [defaultValue] Дефолтное значение, если по названию параметр не\n * найден.\n * @property [parser] Кастомный парсер найденного значения.\n */\ninterface SearchedParam {\n defaultValue?: T;\n parser?: (value: string) => T;\n query: UsersTabQueries;\n}\n\n/**\n * Получаем набор параметров из урла. Каждый параметр может иметь свой\n * собственный парсер, а также дефолтное значение.\n *\n * @param params Массив параметров поиска с опциями.\n */\nexport const getQueryParams = (params: SearchedParam[]) => {\n // получаем текущие квери параметры\n const currentQueries = window.location.search;\n\n if (!currentQueries) {\n return;\n }\n\n // парсим параметры\n const parsed = new URLSearchParams(decodeURIComponent(currentQueries));\n\n if (new Map(parsed).size === 0) {\n return;\n }\n\n const resultCollection: Partial> = {};\n // обрабатываем каждый искомый параметр, парсим, добавляем в конечный объект\n params.forEach(({ query, defaultValue, parser }) => {\n if (parsed.has(query)) {\n const value = parsed.get(query);\n\n // если параметр есть, но у него нет значения, выходим\n if (!value) {\n return;\n }\n\n const customParse = parser ?? parseFromStringToPrimitive;\n resultCollection[query] = customParse(value) ?? defaultValue;\n }\n });\n\n if (isEmpty(resultCollection)) {\n return;\n }\n\n return resultCollection;\n};\n\n/**\n * Получаем из урла строку с квери парметрами.\n *\n * @param url Урл, из которого нужно достать квери параметры.\n */\nexport const getAllQueryParams = (url: string): string => {\n return new URL(url).search;\n};\n","import { RenderErrorMessage } from '@skbkontur/react-ui-validations';\n\nimport global from '../index.module.css';\n\n/**\n * Кастомное отображение ошибки валидации из react-ui-validations в виде\n * красного текста.\n *\n * @param [maxWidth] Максимальная ширина.\n */\nexport const renderTextValidationMessage =\n (maxWidth?: number): RenderErrorMessage =>\n // eslint-disable-next-line react/display-name\n (control, hasError, validation) => {\n return (\n <>\n {control}\n {validation && (\n \n {validation.message || ''}\n
    \n )}\n \n );\n };\n\n/**\n * Кастомная функция text из react-ui-validations.\n *\n * @param [maxWidth] Максимальная ширина.\n */\nexport const customValidationText =\n (maxWidth?: number): RenderErrorMessage =>\n // eslint-disable-next-line react/display-name\n (control, hasError, validation) => {\n return (\n <>\n {control}\n {validation && (\n \n {validation.message || ''}\n
    \n )}\n \n );\n };\n","////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Actions represent the type of change to a location value.\n */\nexport enum Action {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Pop = \"POP\",\n\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n Push = \"PUSH\",\n\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n Replace = \"REPLACE\",\n}\n\n/**\n * The pathname, search, and hash values of a URL.\n */\nexport interface Path {\n /**\n * A URL pathname, beginning with a /.\n */\n pathname: string;\n\n /**\n * A URL search string, beginning with a ?.\n */\n search: string;\n\n /**\n * A URL fragment identifier, beginning with a #.\n */\n hash: string;\n}\n\n// TODO: (v7) Change the Location generic default from `any` to `unknown` and\n// remove Remix `useLocation` wrapper.\n\n/**\n * An entry in a history stack. A location contains information about the\n * URL path, as well as possibly some arbitrary state and a key.\n */\nexport interface Location extends Path {\n /**\n * A value of arbitrary data associated with this location.\n */\n state: State;\n\n /**\n * A unique string associated with this location. May be used to safely store\n * and retrieve data in some other storage API, like `localStorage`.\n *\n * Note: This value is always \"default\" on the initial location.\n */\n key: string;\n}\n\n/**\n * A change to the current location.\n */\nexport interface Update {\n /**\n * The action that triggered the change.\n */\n action: Action;\n\n /**\n * The new location.\n */\n location: Location;\n\n /**\n * The delta between this location and the former location in the history stack\n */\n delta: number | null;\n}\n\n/**\n * A function that receives notifications about location changes.\n */\nexport interface Listener {\n (update: Update): void;\n}\n\n/**\n * Describes a location that is the destination of some navigation, either via\n * `history.push` or `history.replace`. This may be either a URL or the pieces\n * of a URL path.\n */\nexport type To = string | Partial;\n\n/**\n * A history is an interface to the navigation stack. The history serves as the\n * source of truth for the current location, as well as provides a set of\n * methods that may be used to change it.\n *\n * It is similar to the DOM's `window.history` object, but with a smaller, more\n * focused API.\n */\nexport interface History {\n /**\n * The last action that modified the current location. This will always be\n * Action.Pop when a history instance is first created. This value is mutable.\n */\n readonly action: Action;\n\n /**\n * The current location. This value is mutable.\n */\n readonly location: Location;\n\n /**\n * Returns a valid href for the given `to` value that may be used as\n * the value of an attribute.\n *\n * @param to - The destination URL\n */\n createHref(to: To): string;\n\n /**\n * Returns a URL for the given `to` value\n *\n * @param to - The destination URL\n */\n createURL(to: To): URL;\n\n /**\n * Encode a location the same way window.history would do (no-op for memory\n * history) so we ensure our PUSH/REPLACE navigations for data routers\n * behave the same as POP\n *\n * @param to Unencoded path\n */\n encodeLocation(to: To): Path;\n\n /**\n * Pushes a new location onto the history stack, increasing its length by one.\n * If there were any entries in the stack after the current one, they are\n * lost.\n *\n * @param to - The new URL\n * @param state - Data to associate with the new location\n */\n push(to: To, state?: any): void;\n\n /**\n * Replaces the current location in the history stack with a new one. The\n * location that was replaced will no longer be available.\n *\n * @param to - The new URL\n * @param state - Data to associate with the new location\n */\n replace(to: To, state?: any): void;\n\n /**\n * Navigates `n` entries backward/forward in the history stack relative to the\n * current index. For example, a \"back\" navigation would use go(-1).\n *\n * @param delta - The delta in the stack index\n */\n go(delta: number): void;\n\n /**\n * Sets up a listener that will be called whenever the current location\n * changes.\n *\n * @param listener - A function that will be called when the location changes\n * @returns unlisten - A function that may be used to stop listening\n */\n listen(listener: Listener): () => void;\n}\n\ntype HistoryState = {\n usr: any;\n key?: string;\n idx: number;\n};\n\nconst PopStateEventType = \"popstate\";\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Memory History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A user-supplied object that describes a location. Used when providing\n * entries to `createMemoryHistory` via its `initialEntries` option.\n */\nexport type InitialEntry = string | Partial;\n\nexport type MemoryHistoryOptions = {\n initialEntries?: InitialEntry[];\n initialIndex?: number;\n v5Compat?: boolean;\n};\n\n/**\n * A memory history stores locations in memory. This is useful in stateful\n * environments where there is no web browser, such as node tests or React\n * Native.\n */\nexport interface MemoryHistory extends History {\n /**\n * The current index in the history stack.\n */\n readonly index: number;\n}\n\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nexport function createMemoryHistory(\n options: MemoryHistoryOptions = {}\n): MemoryHistory {\n let { initialEntries = [\"/\"], initialIndex, v5Compat = false } = options;\n let entries: Location[]; // Declare so we can access from createMemoryLocation\n entries = initialEntries.map((entry, index) =>\n createMemoryLocation(\n entry,\n typeof entry === \"string\" ? null : entry.state,\n index === 0 ? \"default\" : undefined\n )\n );\n let index = clampIndex(\n initialIndex == null ? entries.length - 1 : initialIndex\n );\n let action = Action.Pop;\n let listener: Listener | null = null;\n\n function clampIndex(n: number): number {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation(): Location {\n return entries[index];\n }\n function createMemoryLocation(\n to: To,\n state: any = null,\n key?: string\n ): Location {\n let location = createLocation(\n entries ? getCurrentLocation().pathname : \"/\",\n to,\n state,\n key\n );\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in memory history: ${JSON.stringify(\n to\n )}`\n );\n return location;\n }\n\n function createHref(to: To) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n let history: MemoryHistory = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref,\n createURL(to) {\n return new URL(createHref(to), \"http://localhost\");\n },\n encodeLocation(to: To) {\n let path = typeof to === \"string\" ? parsePath(to) : to;\n return {\n pathname: path.pathname || \"\",\n search: path.search || \"\",\n hash: path.hash || \"\",\n };\n },\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({ action, location: nextLocation, delta: 1 });\n }\n },\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({ action, location: nextLocation, delta: 0 });\n }\n },\n go(delta) {\n action = Action.Pop;\n let nextIndex = clampIndex(index + delta);\n let nextLocation = entries[nextIndex];\n index = nextIndex;\n if (listener) {\n listener({ action, location: nextLocation, delta });\n }\n },\n listen(fn: Listener) {\n listener = fn;\n return () => {\n listener = null;\n };\n },\n };\n\n return history;\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Browser History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A browser history stores the current location in regular URLs in a web\n * browser environment. This is the standard for most web apps and provides the\n * cleanest URLs the browser's address bar.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#browserhistory\n */\nexport interface BrowserHistory extends UrlHistory {}\n\nexport type BrowserHistoryOptions = UrlHistoryOptions;\n\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nexport function createBrowserHistory(\n options: BrowserHistoryOptions = {}\n): BrowserHistory {\n function createBrowserLocation(\n window: Window,\n globalHistory: Window[\"history\"]\n ) {\n let { pathname, search, hash } = window.location;\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n (globalHistory.state && globalHistory.state.usr) || null,\n (globalHistory.state && globalHistory.state.key) || \"default\"\n );\n }\n\n function createBrowserHref(window: Window, to: To) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n return getUrlBasedHistory(\n createBrowserLocation,\n createBrowserHref,\n null,\n options\n );\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Hash History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A hash history stores the current location in the fragment identifier portion\n * of the URL in a web browser environment.\n *\n * This is ideal for apps that do not control the server for some reason\n * (because the fragment identifier is never sent to the server), including some\n * shared hosting environments that do not provide fine-grained controls over\n * which pages are served at which URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#hashhistory\n */\nexport interface HashHistory extends UrlHistory {}\n\nexport type HashHistoryOptions = UrlHistoryOptions;\n\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nexport function createHashHistory(\n options: HashHistoryOptions = {}\n): HashHistory {\n function createHashLocation(\n window: Window,\n globalHistory: Window[\"history\"]\n ) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n } = parsePath(window.location.hash.substr(1));\n\n // Hash URL should always have a leading / just like window.location.pathname\n // does, so if an app ends up at a route like /#something then we add a\n // leading slash so all of our path-matching behaves the same as if it would\n // in a browser router. This is particularly important when there exists a\n // root splat route () since that matches internally against\n // \"/*\" and we'd expect /#something to 404 in a hash router app.\n if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n pathname = \"/\" + pathname;\n }\n\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n (globalHistory.state && globalHistory.state.usr) || null,\n (globalHistory.state && globalHistory.state.key) || \"default\"\n );\n }\n\n function createHashHref(window: Window, to: To) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n\n function validateHashLocation(location: Location, to: To) {\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in hash history.push(${JSON.stringify(\n to\n )})`\n );\n }\n\n return getUrlBasedHistory(\n createHashLocation,\n createHashHref,\n validateHashLocation,\n options\n );\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region UTILS\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * @private\n */\nexport function invariant(value: boolean, message?: string): asserts value;\nexport function invariant(\n value: T | null | undefined,\n message?: string\n): asserts value is T;\nexport function invariant(value: any, message?: string) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\nexport function warning(cond: any, message: string) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience, so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location: Location, index: number): HistoryState {\n return {\n usr: location.state,\n key: location.key,\n idx: index,\n };\n}\n\n/**\n * Creates a Location object with a unique key from the given Path\n */\nexport function createLocation(\n current: string | Location,\n to: To,\n state: any = null,\n key?: string\n): Readonly {\n let location: Readonly = {\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\",\n ...(typeof to === \"string\" ? parsePath(to) : to),\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: (to && (to as Location).key) || key || createKey(),\n };\n return location;\n}\n\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nexport function createPath({\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n}: Partial) {\n if (search && search !== \"?\")\n pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\")\n pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nexport function parsePath(path: string): Partial {\n let parsedPath: Partial = {};\n\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n\n let searchIndex = path.indexOf(\"?\");\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n\n if (path) {\n parsedPath.pathname = path;\n }\n }\n\n return parsedPath;\n}\n\nexport interface UrlHistory extends History {}\n\nexport type UrlHistoryOptions = {\n window?: Window;\n v5Compat?: boolean;\n};\n\nfunction getUrlBasedHistory(\n getLocation: (window: Window, globalHistory: Window[\"history\"]) => Location,\n createHref: (window: Window, to: To) => string,\n validateLocation: ((location: Location, to: To) => void) | null,\n options: UrlHistoryOptions = {}\n): UrlHistory {\n let { window = document.defaultView!, v5Compat = false } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener: Listener | null = null;\n\n let index = getIndex()!;\n // Index should only be null when we initialize. If not, it's because the\n // user called history.pushState or history.replaceState directly, in which\n // case we should log a warning as it will result in bugs.\n if (index == null) {\n index = 0;\n globalHistory.replaceState({ ...globalHistory.state, idx: index }, \"\");\n }\n\n function getIndex(): number {\n let state = globalHistory.state || { idx: null };\n return state.idx;\n }\n\n function handlePop() {\n action = Action.Pop;\n let nextIndex = getIndex();\n let delta = nextIndex == null ? null : nextIndex - index;\n index = nextIndex;\n if (listener) {\n listener({ action, location: history.location, delta });\n }\n }\n\n function push(to: To, state?: any) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n\n index = getIndex() + 1;\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n\n // try...catch because iOS limits us to 100 pushState calls :/\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // If the exception is because `state` can't be serialized, let that throw\n // outwards just like a replace call would so the dev knows the cause\n // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n if (error instanceof DOMException && error.name === \"DataCloneError\") {\n throw error;\n }\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n if (v5Compat && listener) {\n listener({ action, location: history.location, delta: 1 });\n }\n }\n\n function replace(to: To, state?: any) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n\n index = getIndex();\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n\n if (v5Compat && listener) {\n listener({ action, location: history.location, delta: 0 });\n }\n }\n\n function createURL(to: To): URL {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base =\n window.location.origin !== \"null\"\n ? window.location.origin\n : window.location.href;\n\n let href = typeof to === \"string\" ? to : createPath(to);\n invariant(\n base,\n `No window.location.(origin|href) available to create URL for href: ${href}`\n );\n return new URL(href, base);\n }\n\n let history: History = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window, globalHistory);\n },\n listen(fn: Listener) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref(window, to);\n },\n createURL,\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createURL(to);\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash,\n };\n },\n push,\n replace,\n go(n) {\n return globalHistory.go(n);\n },\n };\n\n return history;\n}\n\n//#endregion\n","import type { Location, Path, To } from \"./history\";\nimport { invariant, parsePath, warning } from \"./history\";\n\n/**\n * Map of routeId -> data returned from a loader/action/error\n */\nexport interface RouteData {\n [routeId: string]: any;\n}\n\nexport enum ResultType {\n data = \"data\",\n deferred = \"deferred\",\n redirect = \"redirect\",\n error = \"error\",\n}\n\n/**\n * Successful result from a loader or action\n */\nexport interface SuccessResult {\n type: ResultType.data;\n data: any;\n statusCode?: number;\n headers?: Headers;\n}\n\n/**\n * Successful defer() result from a loader or action\n */\nexport interface DeferredResult {\n type: ResultType.deferred;\n deferredData: DeferredData;\n statusCode?: number;\n headers?: Headers;\n}\n\n/**\n * Redirect result from a loader or action\n */\nexport interface RedirectResult {\n type: ResultType.redirect;\n status: number;\n location: string;\n revalidate: boolean;\n reloadDocument?: boolean;\n}\n\n/**\n * Unsuccessful result from a loader or action\n */\nexport interface ErrorResult {\n type: ResultType.error;\n error: any;\n headers?: Headers;\n}\n\n/**\n * Result from a loader or action - potentially successful or unsuccessful\n */\nexport type DataResult =\n | SuccessResult\n | DeferredResult\n | RedirectResult\n | ErrorResult;\n\ntype LowerCaseFormMethod = \"get\" | \"post\" | \"put\" | \"patch\" | \"delete\";\ntype UpperCaseFormMethod = Uppercase;\n\n/**\n * Users can specify either lowercase or uppercase form methods on
    ,\n * useSubmit(), , etc.\n */\nexport type HTMLFormMethod = LowerCaseFormMethod | UpperCaseFormMethod;\n\n/**\n * Active navigation/fetcher form methods are exposed in lowercase on the\n * RouterState\n */\nexport type FormMethod = LowerCaseFormMethod;\nexport type MutationFormMethod = Exclude;\n\n/**\n * In v7, active navigation/fetcher form methods are exposed in uppercase on the\n * RouterState. This is to align with the normalization done via fetch().\n */\nexport type V7_FormMethod = UpperCaseFormMethod;\nexport type V7_MutationFormMethod = Exclude;\n\nexport type FormEncType =\n | \"application/x-www-form-urlencoded\"\n | \"multipart/form-data\"\n | \"application/json\"\n | \"text/plain\";\n\n// Thanks https://github.com/sindresorhus/type-fest!\ntype JsonObject = { [Key in string]: JsonValue } & {\n [Key in string]?: JsonValue | undefined;\n};\ntype JsonArray = JsonValue[] | readonly JsonValue[];\ntype JsonPrimitive = string | number | boolean | null;\ntype JsonValue = JsonPrimitive | JsonObject | JsonArray;\n\n/**\n * @private\n * Internal interface to pass around for action submissions, not intended for\n * external consumption\n */\nexport type Submission =\n | {\n formMethod: FormMethod | V7_FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: FormData;\n json: undefined;\n text: undefined;\n }\n | {\n formMethod: FormMethod | V7_FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: undefined;\n json: JsonValue;\n text: undefined;\n }\n | {\n formMethod: FormMethod | V7_FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: undefined;\n json: undefined;\n text: string;\n };\n\n/**\n * @private\n * Arguments passed to route loader/action functions. Same for now but we keep\n * this as a private implementation detail in case they diverge in the future.\n */\ninterface DataFunctionArgs {\n request: Request;\n params: Params;\n context?: Context;\n}\n\n// TODO: (v7) Change the defaults from any to unknown in and remove Remix wrappers:\n// ActionFunction, ActionFunctionArgs, LoaderFunction, LoaderFunctionArgs\n// Also, make them a type alias instead of an interface\n\n/**\n * Arguments passed to loader functions\n */\nexport interface LoaderFunctionArgs\n extends DataFunctionArgs {}\n\n/**\n * Arguments passed to action functions\n */\nexport interface ActionFunctionArgs\n extends DataFunctionArgs {}\n\n/**\n * Loaders and actions can return anything except `undefined` (`null` is a\n * valid return value if there is no data to return). Responses are preferred\n * and will ease any future migration to Remix\n */\ntype DataFunctionValue = Response | NonNullable | null;\n\n/**\n * Route loader function signature\n */\nexport interface LoaderFunction {\n (args: LoaderFunctionArgs):\n | Promise\n | DataFunctionValue;\n}\n\n/**\n * Route action function signature\n */\nexport interface ActionFunction {\n (args: ActionFunctionArgs):\n | Promise\n | DataFunctionValue;\n}\n\n/**\n * Arguments passed to shouldRevalidate function\n */\nexport interface ShouldRevalidateFunctionArgs {\n currentUrl: URL;\n currentParams: AgnosticDataRouteMatch[\"params\"];\n nextUrl: URL;\n nextParams: AgnosticDataRouteMatch[\"params\"];\n formMethod?: Submission[\"formMethod\"];\n formAction?: Submission[\"formAction\"];\n formEncType?: Submission[\"formEncType\"];\n text?: Submission[\"text\"];\n formData?: Submission[\"formData\"];\n json?: Submission[\"json\"];\n actionResult?: any;\n defaultShouldRevalidate: boolean;\n}\n\n/**\n * Route shouldRevalidate function signature. This runs after any submission\n * (navigation or fetcher), so we flatten the navigation/fetcher submission\n * onto the arguments. It shouldn't matter whether it came from a navigation\n * or a fetcher, what really matters is the URLs and the formData since loaders\n * have to re-run based on the data models that were potentially mutated.\n */\nexport interface ShouldRevalidateFunction {\n (args: ShouldRevalidateFunctionArgs): boolean;\n}\n\n/**\n * Function provided by the framework-aware layers to set `hasErrorBoundary`\n * from the framework-aware `errorElement` prop\n *\n * @deprecated Use `mapRouteProperties` instead\n */\nexport interface DetectErrorBoundaryFunction {\n (route: AgnosticRouteObject): boolean;\n}\n\n/**\n * Function provided by the framework-aware layers to set any framework-specific\n * properties from framework-agnostic properties\n */\nexport interface MapRoutePropertiesFunction {\n (route: AgnosticRouteObject): {\n hasErrorBoundary: boolean;\n } & Record;\n}\n\n/**\n * Keys we cannot change from within a lazy() function. We spread all other keys\n * onto the route. Either they're meaningful to the router, or they'll get\n * ignored.\n */\nexport type ImmutableRouteKey =\n | \"lazy\"\n | \"caseSensitive\"\n | \"path\"\n | \"id\"\n | \"index\"\n | \"children\";\n\nexport const immutableRouteKeys = new Set([\n \"lazy\",\n \"caseSensitive\",\n \"path\",\n \"id\",\n \"index\",\n \"children\",\n]);\n\ntype RequireOne = Exclude<\n {\n [K in keyof T]: K extends Key ? Omit & Required> : never;\n }[keyof T],\n undefined\n>;\n\n/**\n * lazy() function to load a route definition, which can add non-matching\n * related properties to a route\n */\nexport interface LazyRouteFunction {\n (): Promise>>;\n}\n\n/**\n * Base RouteObject with common props shared by all types of routes\n */\ntype AgnosticBaseRouteObject = {\n caseSensitive?: boolean;\n path?: string;\n id?: string;\n loader?: LoaderFunction;\n action?: ActionFunction;\n hasErrorBoundary?: boolean;\n shouldRevalidate?: ShouldRevalidateFunction;\n handle?: any;\n lazy?: LazyRouteFunction;\n};\n\n/**\n * Index routes must not have children\n */\nexport type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {\n children?: undefined;\n index: true;\n};\n\n/**\n * Non-index routes may have children, but cannot have index\n */\nexport type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {\n children?: AgnosticRouteObject[];\n index?: false;\n};\n\n/**\n * A route object represents a logical route, with (optionally) its child\n * routes organized in a tree-like structure.\n */\nexport type AgnosticRouteObject =\n | AgnosticIndexRouteObject\n | AgnosticNonIndexRouteObject;\n\nexport type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {\n id: string;\n};\n\nexport type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {\n children?: AgnosticDataRouteObject[];\n id: string;\n};\n\n/**\n * A data route object, which is just a RouteObject with a required unique ID\n */\nexport type AgnosticDataRouteObject =\n | AgnosticDataIndexRouteObject\n | AgnosticDataNonIndexRouteObject;\n\nexport type RouteManifest = Record;\n\n// Recursive helper for finding path parameters in the absence of wildcards\ntype _PathParam =\n // split path into individual path segments\n Path extends `${infer L}/${infer R}`\n ? _PathParam | _PathParam\n : // find params after `:`\n Path extends `:${infer Param}`\n ? Param extends `${infer Optional}?`\n ? Optional\n : Param\n : // otherwise, there aren't any params present\n never;\n\n/**\n * Examples:\n * \"/a/b/*\" -> \"*\"\n * \":a\" -> \"a\"\n * \"/a/:b\" -> \"b\"\n * \"/a/blahblahblah:b\" -> \"b\"\n * \"/:a/:b\" -> \"a\" | \"b\"\n * \"/:a/b/:c/*\" -> \"a\" | \"c\" | \"*\"\n */\ntype PathParam =\n // check if path is just a wildcard\n Path extends \"*\" | \"/*\"\n ? \"*\"\n : // look for wildcard at the end of the path\n Path extends `${infer Rest}/*`\n ? \"*\" | _PathParam\n : // look for params in the absence of wildcards\n _PathParam;\n\n// Attempt to parse the given string segment. If it fails, then just return the\n// plain string type as a default fallback. Otherwise, return the union of the\n// parsed string literals that were referenced as dynamic segments in the route.\nexport type ParamParseKey =\n // if you could not find path params, fallback to `string`\n [PathParam] extends [never] ? string : PathParam;\n\n/**\n * The parameters that were parsed from the URL path.\n */\nexport type Params = {\n readonly [key in Key]: string | undefined;\n};\n\n/**\n * A RouteMatch contains info about how a route matched a URL.\n */\nexport interface AgnosticRouteMatch<\n ParamKey extends string = string,\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n /**\n * The names and values of dynamic parameters in the URL.\n */\n params: Params;\n /**\n * The portion of the URL pathname that was matched.\n */\n pathname: string;\n /**\n * The portion of the URL pathname that was matched before child routes.\n */\n pathnameBase: string;\n /**\n * The route object that was used to match.\n */\n route: RouteObjectType;\n}\n\nexport interface AgnosticDataRouteMatch\n extends AgnosticRouteMatch {}\n\nfunction isIndexRoute(\n route: AgnosticRouteObject\n): route is AgnosticIndexRouteObject {\n return route.index === true;\n}\n\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject's within the Router\nexport function convertRoutesToDataRoutes(\n routes: AgnosticRouteObject[],\n mapRouteProperties: MapRoutePropertiesFunction,\n parentPath: number[] = [],\n manifest: RouteManifest = {}\n): AgnosticDataRouteObject[] {\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(\n route.index !== true || !route.children,\n `Cannot specify children on an index route`\n );\n invariant(\n !manifest[id],\n `Found a route id collision on id \"${id}\". Route ` +\n \"id's must be globally unique within Data Router usages\"\n );\n\n if (isIndexRoute(route)) {\n let indexRoute: AgnosticDataIndexRouteObject = {\n ...route,\n ...mapRouteProperties(route),\n id,\n };\n manifest[id] = indexRoute;\n return indexRoute;\n } else {\n let pathOrLayoutRoute: AgnosticDataNonIndexRouteObject = {\n ...route,\n ...mapRouteProperties(route),\n id,\n children: undefined,\n };\n manifest[id] = pathOrLayoutRoute;\n\n if (route.children) {\n pathOrLayoutRoute.children = convertRoutesToDataRoutes(\n route.children,\n mapRouteProperties,\n treePath,\n manifest\n );\n }\n\n return pathOrLayoutRoute;\n }\n });\n}\n\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\nexport function matchRoutes<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n routes: RouteObjectType[],\n locationArg: Partial | string,\n basename = \"/\"\n): AgnosticRouteMatch[] | null {\n let location =\n typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n\n let pathname = stripBasename(location.pathname || \"/\", basename);\n\n if (pathname == null) {\n return null;\n }\n\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(\n branches[i],\n // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname)\n );\n }\n\n return matches;\n}\n\nexport interface UIMatch {\n id: string;\n pathname: string;\n params: AgnosticRouteMatch[\"params\"];\n data: Data;\n handle: Handle;\n}\n\nexport function convertRouteMatchToUiMatch(\n match: AgnosticDataRouteMatch,\n loaderData: RouteData\n): UIMatch {\n let { route, pathname, params } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle,\n };\n}\n\ninterface RouteMeta<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n relativePath: string;\n caseSensitive: boolean;\n childrenIndex: number;\n route: RouteObjectType;\n}\n\ninterface RouteBranch<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n path: string;\n score: number;\n routesMeta: RouteMeta[];\n}\n\nfunction flattenRoutes<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n routes: RouteObjectType[],\n branches: RouteBranch[] = [],\n parentsMeta: RouteMeta[] = [],\n parentPath = \"\"\n): RouteBranch[] {\n let flattenRoute = (\n route: RouteObjectType,\n index: number,\n relativePath?: string\n ) => {\n let meta: RouteMeta = {\n relativePath:\n relativePath === undefined ? route.path || \"\" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route,\n };\n\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(\n meta.relativePath.startsWith(parentPath),\n `Absolute route path \"${meta.relativePath}\" nested under path ` +\n `\"${parentPath}\" is not valid. An absolute child route path ` +\n `must start with the combined path of all its parent routes.`\n );\n\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n\n // Add the children before adding this route to the array, so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true,\n `Index routes must not have child routes. Please remove ` +\n `all child routes from route path \"${path}\".`\n );\n\n flattenRoutes(route.children, branches, routesMeta, path);\n }\n\n // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n if (route.path == null && !route.index) {\n return;\n }\n\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta,\n });\n };\n routes.forEach((route, index) => {\n // coarse-grain check for optional params\n if (route.path === \"\" || !route.path?.includes(\"?\")) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n\n return branches;\n}\n\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path: string): string[] {\n let segments = path.split(\"/\");\n if (segments.length === 0) return [];\n\n let [first, ...rest] = segments;\n\n // Optional path segments are denoted by a trailing `?`\n let isOptional = first.endsWith(\"?\");\n // Compute the corresponding required segment: `foo?` -> `foo`\n let required = first.replace(/\\?$/, \"\");\n\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, \"\"] : [required];\n }\n\n let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n\n let result: string[] = [];\n\n // All child paths with the prefix. Do this for all children before the\n // optional version for all children, so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explode _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n result.push(\n ...restExploded.map((subpath) =>\n subpath === \"\" ? required : [required, subpath].join(\"/\")\n )\n );\n\n // Then, if this is an optional value, add all child versions without\n if (isOptional) {\n result.push(...restExploded);\n }\n\n // for absolute paths, ensure `/` instead of empty segment\n return result.map((exploded) =>\n path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded\n );\n}\n\nfunction rankRouteBranches(branches: RouteBranch[]): void {\n branches.sort((a, b) =>\n a.score !== b.score\n ? b.score - a.score // Higher score first\n : compareIndexes(\n a.routesMeta.map((meta) => meta.childrenIndex),\n b.routesMeta.map((meta) => meta.childrenIndex)\n )\n );\n}\n\nconst paramRe = /^:\\w+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = (s: string) => s === \"*\";\n\nfunction computeScore(path: string, index: boolean | undefined): number {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n\n if (index) {\n initialScore += indexRouteValue;\n }\n\n return segments\n .filter((s) => !isSplat(s))\n .reduce(\n (score, segment) =>\n score +\n (paramRe.test(segment)\n ? dynamicSegmentValue\n : segment === \"\"\n ? emptySegmentValue\n : staticSegmentValue),\n initialScore\n );\n}\n\nfunction compareIndexes(a: number[], b: number[]): number {\n let siblings =\n a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n\n return siblings\n ? // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1]\n : // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\n\nfunction matchRouteBranch<\n ParamKey extends string = string,\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n branch: RouteBranch,\n pathname: string\n): AgnosticRouteMatch[] | null {\n let { routesMeta } = branch;\n\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches: AgnosticRouteMatch[] = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname =\n matchedPathname === \"/\"\n ? pathname\n : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath(\n { path: meta.relativePath, caseSensitive: meta.caseSensitive, end },\n remainingPathname\n );\n\n if (!match) return null;\n\n Object.assign(matchedParams, match.params);\n\n let route = meta.route;\n\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams as Params,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(\n joinPaths([matchedPathname, match.pathnameBase])\n ),\n route,\n });\n\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n\n return matches;\n}\n\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\nexport function generatePath(\n originalPath: Path,\n params: {\n [key in PathParam]: string | null;\n } = {} as any\n): string {\n let path: string = originalPath;\n if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n warning(\n false,\n `Route path \"${path}\" will be treated as if it were ` +\n `\"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must ` +\n `always follow a \\`/\\` in the pattern. To get rid of this warning, ` +\n `please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n );\n path = path.replace(/\\*$/, \"/*\") as Path;\n }\n\n // ensure `/` is added at the beginning if the path is absolute\n const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n\n const stringify = (p: any) =>\n p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n\n const segments = path\n .split(/\\/+/)\n .map((segment, index, array) => {\n const isLastSegment = index === array.length - 1;\n\n // only apply the splat if it's the last segment\n if (isLastSegment && segment === \"*\") {\n const star = \"*\" as PathParam;\n // Apply the splat\n return stringify(params[star]);\n }\n\n const keyMatch = segment.match(/^:(\\w+)(\\??)$/);\n if (keyMatch) {\n const [, key, optional] = keyMatch;\n let param = params[key as PathParam];\n invariant(optional === \"?\" || param != null, `Missing \":${key}\" param`);\n return stringify(param);\n }\n\n // Remove any optional markers from optional static segments\n return segment.replace(/\\?$/g, \"\");\n })\n // Remove empty segments\n .filter((segment) => !!segment);\n\n return prefix + segments.join(\"/\");\n}\n\n/**\n * A PathPattern is used to match on some portion of a URL pathname.\n */\nexport interface PathPattern {\n /**\n * A string to match against a URL pathname. May contain `:id`-style segments\n * to indicate placeholders for dynamic parameters. May also end with `/*` to\n * indicate matching the rest of the URL pathname.\n */\n path: Path;\n /**\n * Should be `true` if the static portions of the `path` should be matched in\n * the same case.\n */\n caseSensitive?: boolean;\n /**\n * Should be `true` if this pattern should match the entire URL pathname.\n */\n end?: boolean;\n}\n\n/**\n * A PathMatch contains info about how a PathPattern matched on a URL pathname.\n */\nexport interface PathMatch {\n /**\n * The names and values of dynamic parameters in the URL.\n */\n params: Params;\n /**\n * The portion of the URL pathname that was matched.\n */\n pathname: string;\n /**\n * The portion of the URL pathname that was matched before child routes.\n */\n pathnameBase: string;\n /**\n * The pattern that was used to match.\n */\n pattern: PathPattern;\n}\n\ntype Mutable = {\n -readonly [P in keyof T]: T[P];\n};\n\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\nexport function matchPath<\n ParamKey extends ParamParseKey,\n Path extends string\n>(\n pattern: PathPattern | Path,\n pathname: string\n): PathMatch | null {\n if (typeof pattern === \"string\") {\n pattern = { path: pattern, caseSensitive: false, end: true };\n }\n\n let [matcher, paramNames] = compilePath(\n pattern.path,\n pattern.caseSensitive,\n pattern.end\n );\n\n let match = pathname.match(matcher);\n if (!match) return null;\n\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params: Params = paramNames.reduce>(\n (memo, paramName, index) => {\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname\n .slice(0, matchedPathname.length - splatValue.length)\n .replace(/(.)\\/+$/, \"$1\");\n }\n\n memo[paramName] = safelyDecodeURIComponent(\n captureGroups[index] || \"\",\n paramName\n );\n return memo;\n },\n {}\n );\n\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern,\n };\n}\n\nfunction compilePath(\n path: string,\n caseSensitive = false,\n end = true\n): [RegExp, string[]] {\n warning(\n path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"),\n `Route path \"${path}\" will be treated as if it were ` +\n `\"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must ` +\n `always follow a \\`/\\` in the pattern. To get rid of this warning, ` +\n `please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n );\n\n let paramNames: string[] = [];\n let regexpSource =\n \"^\" +\n path\n .replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^$?{}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/\\/:(\\w+)/g, (_: string, paramName: string) => {\n paramNames.push(paramName);\n return \"/([^\\\\/]+)\";\n });\n\n if (path.endsWith(\"*\")) {\n paramNames.push(\"*\");\n regexpSource +=\n path === \"*\" || path === \"/*\"\n ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex, so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else {\n // Nothing to match for \"\" or \"/\"\n }\n\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n\n return [matcher, paramNames];\n}\n\nfunction safelyDecodeURI(value: string) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(\n false,\n `The URL path \"${value}\" could not be decoded because it is is a ` +\n `malformed URL segment. This is probably due to a bad percent ` +\n `encoding (${error}).`\n );\n\n return value;\n }\n}\n\nfunction safelyDecodeURIComponent(value: string, paramName: string) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(\n false,\n `The value for the URL param \"${paramName}\" will not be decoded because` +\n ` the string \"${value}\" is a malformed URL segment. This is probably` +\n ` due to a bad percent encoding (${error}).`\n );\n\n return value;\n }\n}\n\n/**\n * @private\n */\nexport function stripBasename(\n pathname: string,\n basename: string\n): string | null {\n if (basename === \"/\") return pathname;\n\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n\n // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n let startIndex = basename.endsWith(\"/\")\n ? basename.length - 1\n : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n\n return pathname.slice(startIndex) || \"/\";\n}\n\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\nexport function resolvePath(to: To, fromPathname = \"/\"): Path {\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\",\n } = typeof to === \"string\" ? parsePath(to) : to;\n\n let pathname = toPathname\n ? toPathname.startsWith(\"/\")\n ? toPathname\n : resolvePathname(toPathname, fromPathname)\n : fromPathname;\n\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash),\n };\n}\n\nfunction resolvePathname(relativePath: string, fromPathname: string): string {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n\n relativeSegments.forEach((segment) => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\n\nfunction getInvalidPathError(\n char: string,\n field: string,\n dest: string,\n path: Partial\n) {\n return (\n `Cannot include a '${char}' character in a manually specified ` +\n `\\`to.${field}\\` field [${JSON.stringify(\n path\n )}]. Please separate it out to the ` +\n `\\`to.${dest}\\` field. Alternatively you may provide the full path as ` +\n `a string in and the router will parse it for you.`\n );\n}\n\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * \n * \n * \n *\n * \n * \n * }> // <-- Does not contribute\n * // <-- Does not contribute\n * \n * \n */\nexport function getPathContributingMatches<\n T extends AgnosticRouteMatch = AgnosticRouteMatch\n>(matches: T[]) {\n return matches.filter(\n (match, index) =>\n index === 0 || (match.route.path && match.route.path.length > 0)\n );\n}\n\n/**\n * @private\n */\nexport function resolveTo(\n toArg: To,\n routePathnames: string[],\n locationPathname: string,\n isPathRelative = false\n): Path {\n let to: Partial;\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = { ...toArg };\n\n invariant(\n !to.pathname || !to.pathname.includes(\"?\"),\n getInvalidPathError(\"?\", \"pathname\", \"search\", to)\n );\n invariant(\n !to.pathname || !to.pathname.includes(\"#\"),\n getInvalidPathError(\"#\", \"pathname\", \"hash\", to)\n );\n invariant(\n !to.search || !to.search.includes(\"#\"),\n getInvalidPathError(\"#\", \"search\", \"hash\", to)\n );\n }\n\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n\n let from: string;\n\n // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n if (isPathRelative || toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n\n if (toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\");\n\n // Each leading .. segment means \"go up one route\" instead of \"go up one\n // URL segment\". This is a key difference from how works and a\n // major reason we call this a \"to\" value instead of a \"href\".\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n\n to.pathname = toSegments.join(\"/\");\n }\n\n // If there are more \"..\" segments than parent routes, resolve relative to\n // the root / URL.\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n\n let path = resolvePath(to, from);\n\n // Ensure the pathname has a trailing slash if the original \"to\" had one\n let hasExplicitTrailingSlash =\n toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n // Or if this was a link to the current path which has a trailing slash\n let hasCurrentTrailingSlash =\n (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n if (\n !path.pathname.endsWith(\"/\") &&\n (hasExplicitTrailingSlash || hasCurrentTrailingSlash)\n ) {\n path.pathname += \"/\";\n }\n\n return path;\n}\n\n/**\n * @private\n */\nexport function getToPathname(to: To): string | undefined {\n // Empty strings should be treated the same as / paths\n return to === \"\" || (to as Path).pathname === \"\"\n ? \"/\"\n : typeof to === \"string\"\n ? parsePath(to).pathname\n : to.pathname;\n}\n\n/**\n * @private\n */\nexport const joinPaths = (paths: string[]): string =>\n paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n\n/**\n * @private\n */\nexport const normalizePathname = (pathname: string): string =>\n pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n\n/**\n * @private\n */\nexport const normalizeSearch = (search: string): string =>\n !search || search === \"?\"\n ? \"\"\n : search.startsWith(\"?\")\n ? search\n : \"?\" + search;\n\n/**\n * @private\n */\nexport const normalizeHash = (hash: string): string =>\n !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n\nexport type JsonFunction = (\n data: Data,\n init?: number | ResponseInit\n) => Response;\n\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nexport const json: JsonFunction = (data, init = {}) => {\n let responseInit = typeof init === \"number\" ? { status: init } : init;\n\n let headers = new Headers(responseInit.headers);\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n return new Response(JSON.stringify(data), {\n ...responseInit,\n headers,\n });\n};\n\nexport interface TrackedPromise extends Promise {\n _tracked?: boolean;\n _data?: any;\n _error?: any;\n}\n\nexport class AbortedDeferredError extends Error {}\n\nexport class DeferredData {\n private pendingKeysSet: Set = new Set();\n private controller: AbortController;\n private abortPromise: Promise;\n private unlistenAbortSignal: () => void;\n private subscribers: Set<(aborted: boolean, settledKey?: string) => void> =\n new Set();\n data: Record;\n init?: ResponseInit;\n deferredKeys: string[] = [];\n\n constructor(data: Record, responseInit?: ResponseInit) {\n invariant(\n data && typeof data === \"object\" && !Array.isArray(data),\n \"defer() only accepts plain objects\"\n );\n\n // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n let reject: (e: AbortedDeferredError) => void;\n this.abortPromise = new Promise((_, r) => (reject = r));\n this.controller = new AbortController();\n let onAbort = () =>\n reject(new AbortedDeferredError(\"Deferred data aborted\"));\n this.unlistenAbortSignal = () =>\n this.controller.signal.removeEventListener(\"abort\", onAbort);\n this.controller.signal.addEventListener(\"abort\", onAbort);\n\n this.data = Object.entries(data).reduce(\n (acc, [key, value]) =>\n Object.assign(acc, {\n [key]: this.trackPromise(key, value),\n }),\n {}\n );\n\n if (this.done) {\n // All incoming values were resolved\n this.unlistenAbortSignal();\n }\n\n this.init = responseInit;\n }\n\n private trackPromise(\n key: string,\n value: Promise | unknown\n ): TrackedPromise | unknown {\n if (!(value instanceof Promise)) {\n return value;\n }\n\n this.deferredKeys.push(key);\n this.pendingKeysSet.add(key);\n\n // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n let promise: TrackedPromise = Promise.race([value, this.abortPromise]).then(\n (data) => this.onSettle(promise, key, undefined, data as unknown),\n (error) => this.onSettle(promise, key, error as unknown)\n );\n\n // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n promise.catch(() => {});\n\n Object.defineProperty(promise, \"_tracked\", { get: () => true });\n return promise;\n }\n\n private onSettle(\n promise: TrackedPromise,\n key: string,\n error: unknown,\n data?: unknown\n ): unknown {\n if (\n this.controller.signal.aborted &&\n error instanceof AbortedDeferredError\n ) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", { get: () => error });\n return Promise.reject(error);\n }\n\n this.pendingKeysSet.delete(key);\n\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n\n // If the promise was resolved/rejected with undefined, we'll throw an error as you\n // should always resolve with a value or null\n if (error === undefined && data === undefined) {\n let undefinedError = new Error(\n `Deferred data for key \"${key}\" resolved/rejected with \\`undefined\\`, ` +\n `you must resolve/reject with a value or \\`null\\`.`\n );\n Object.defineProperty(promise, \"_error\", { get: () => undefinedError });\n this.emit(false, key);\n return Promise.reject(undefinedError);\n }\n\n if (data === undefined) {\n Object.defineProperty(promise, \"_error\", { get: () => error });\n this.emit(false, key);\n return Promise.reject(error);\n }\n\n Object.defineProperty(promise, \"_data\", { get: () => data });\n this.emit(false, key);\n return data;\n }\n\n private emit(aborted: boolean, settledKey?: string) {\n this.subscribers.forEach((subscriber) => subscriber(aborted, settledKey));\n }\n\n subscribe(fn: (aborted: boolean, settledKey?: string) => void) {\n this.subscribers.add(fn);\n return () => this.subscribers.delete(fn);\n }\n\n cancel() {\n this.controller.abort();\n this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n this.emit(true);\n }\n\n async resolveData(signal: AbortSignal) {\n let aborted = false;\n if (!this.done) {\n let onAbort = () => this.cancel();\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise((resolve) => {\n this.subscribe((aborted) => {\n signal.removeEventListener(\"abort\", onAbort);\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n return aborted;\n }\n\n get done() {\n return this.pendingKeysSet.size === 0;\n }\n\n get unwrappedData() {\n invariant(\n this.data !== null && this.done,\n \"Can only unwrap data on initialized and settled deferreds\"\n );\n\n return Object.entries(this.data).reduce(\n (acc, [key, value]) =>\n Object.assign(acc, {\n [key]: unwrapTrackedPromise(value),\n }),\n {}\n );\n }\n\n get pendingKeys() {\n return Array.from(this.pendingKeysSet);\n }\n}\n\nfunction isTrackedPromise(value: any): value is TrackedPromise {\n return (\n value instanceof Promise && (value as TrackedPromise)._tracked === true\n );\n}\n\nfunction unwrapTrackedPromise(value: any) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n\n if (value._error) {\n throw value._error;\n }\n return value._data;\n}\n\nexport type DeferFunction = (\n data: Record,\n init?: number | ResponseInit\n) => DeferredData;\n\nexport const defer: DeferFunction = (data, init = {}) => {\n let responseInit = typeof init === \"number\" ? { status: init } : init;\n\n return new DeferredData(data, responseInit);\n};\n\nexport type RedirectFunction = (\n url: string,\n init?: number | ResponseInit\n) => Response;\n\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nexport const redirect: RedirectFunction = (url, init = 302) => {\n let responseInit = init;\n if (typeof responseInit === \"number\") {\n responseInit = { status: responseInit };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n\n return new Response(null, {\n ...responseInit,\n headers,\n });\n};\n\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nexport const redirectDocument: RedirectFunction = (url, init) => {\n let response = redirect(url, init);\n response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n return response;\n};\n\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n */\nexport class ErrorResponseImpl {\n status: number;\n statusText: string;\n data: any;\n private error?: Error;\n private internal: boolean;\n\n constructor(\n status: number,\n statusText: string | undefined,\n data: any,\n internal = false\n ) {\n this.status = status;\n this.statusText = statusText || \"\";\n this.internal = internal;\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n}\n\n// We don't want the class exported since usage of it at runtime is an\n// implementation detail, but we do want to export the shape so folks can\n// build their own abstractions around instances via isRouteErrorResponse()\nexport type ErrorResponse = InstanceType;\n\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nexport function isRouteErrorResponse(error: any): error is ErrorResponse {\n return (\n error != null &&\n typeof error.status === \"number\" &&\n typeof error.statusText === \"string\" &&\n typeof error.internal === \"boolean\" &&\n \"data\" in error\n );\n}\n","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","import type { History, Location, Path, To } from \"./history\";\nimport {\n Action as HistoryAction,\n createLocation,\n createPath,\n invariant,\n parsePath,\n warning,\n} from \"./history\";\nimport type {\n ActionFunction,\n AgnosticDataRouteMatch,\n AgnosticDataRouteObject,\n AgnosticRouteObject,\n DataResult,\n DeferredData,\n DeferredResult,\n DetectErrorBoundaryFunction,\n ErrorResult,\n FormEncType,\n FormMethod,\n HTMLFormMethod,\n ImmutableRouteKey,\n LoaderFunction,\n MapRoutePropertiesFunction,\n MutationFormMethod,\n RedirectResult,\n RouteData,\n RouteManifest,\n ShouldRevalidateFunctionArgs,\n Submission,\n SuccessResult,\n UIMatch,\n V7_FormMethod,\n V7_MutationFormMethod,\n} from \"./utils\";\nimport {\n ErrorResponseImpl,\n ResultType,\n convertRouteMatchToUiMatch,\n convertRoutesToDataRoutes,\n getPathContributingMatches,\n immutableRouteKeys,\n isRouteErrorResponse,\n joinPaths,\n matchRoutes,\n resolveTo,\n stripBasename,\n} from \"./utils\";\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A Router instance manages all navigation and data loading/mutations\n */\nexport interface Router {\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the basename for the router\n */\n get basename(): RouterInit[\"basename\"];\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the current state of the router\n */\n get state(): RouterState;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the routes for this router instance\n */\n get routes(): AgnosticDataRouteObject[];\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Initialize the router, including adding history listeners and kicking off\n * initial data fetches. Returns a function to cleanup listeners and abort\n * any in-progress loads\n */\n initialize(): Router;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Subscribe to router.state updates\n *\n * @param fn function to call with the new state\n */\n subscribe(fn: RouterSubscriber): () => void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Enable scroll restoration behavior in the router\n *\n * @param savedScrollPositions Object that will manage positions, in case\n * it's being restored from sessionStorage\n * @param getScrollPosition Function to get the active Y scroll position\n * @param getKey Function to get the key to use for restoration\n */\n enableScrollRestoration(\n savedScrollPositions: Record,\n getScrollPosition: GetScrollPositionFunction,\n getKey?: GetScrollRestorationKeyFunction\n ): () => void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Navigate forward/backward in the history stack\n * @param to Delta to move in the history stack\n */\n navigate(to: number): Promise;\n\n /**\n * Navigate to the given path\n * @param to Path to navigate to\n * @param opts Navigation options (method, submission, etc.)\n */\n navigate(to: To | null, opts?: RouterNavigateOptions): Promise;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Trigger a fetcher load/submission\n *\n * @param key Fetcher key\n * @param routeId Route that owns the fetcher\n * @param href href to fetch\n * @param opts Fetcher options, (method, submission, etc.)\n */\n fetch(\n key: string,\n routeId: string,\n href: string | null,\n opts?: RouterFetchOptions\n ): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Trigger a revalidation of all current route loaders and fetcher loads\n */\n revalidate(): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Utility function to create an href for the given location\n * @param location\n */\n createHref(location: Location | URL): string;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Utility function to URL encode a destination path according to the internal\n * history implementation\n * @param to\n */\n encodeLocation(to: To): Path;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Get/create a fetcher for the given key\n * @param key\n */\n getFetcher(key?: string): Fetcher;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Delete the fetcher for a given key\n * @param key\n */\n deleteFetcher(key?: string): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Cleanup listeners and abort any in-progress loads\n */\n dispose(): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Get a navigation blocker\n * @param key The identifier for the blocker\n * @param fn The blocker function implementation\n */\n getBlocker(key: string, fn: BlockerFunction): Blocker;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Delete a navigation blocker\n * @param key The identifier for the blocker\n */\n deleteBlocker(key: string): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * HMR needs to pass in-flight route updates to React Router\n * TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)\n */\n _internalSetRoutes(routes: AgnosticRouteObject[]): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Internal fetch AbortControllers accessed by unit tests\n */\n _internalFetchControllers: Map;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Internal pending DeferredData instances accessed by unit tests\n */\n _internalActiveDeferreds: Map;\n}\n\n/**\n * State maintained internally by the router. During a navigation, all states\n * reflect the the \"old\" location unless otherwise noted.\n */\nexport interface RouterState {\n /**\n * The action of the most recent navigation\n */\n historyAction: HistoryAction;\n\n /**\n * The current location reflected by the router\n */\n location: Location;\n\n /**\n * The current set of route matches\n */\n matches: AgnosticDataRouteMatch[];\n\n /**\n * Tracks whether we've completed our initial data load\n */\n initialized: boolean;\n\n /**\n * Current scroll position we should start at for a new view\n * - number -> scroll position to restore to\n * - false -> do not restore scroll at all (used during submissions)\n * - null -> don't have a saved position, scroll to hash or top of page\n */\n restoreScrollPosition: number | false | null;\n\n /**\n * Indicate whether this navigation should skip resetting the scroll position\n * if we are unable to restore the scroll position\n */\n preventScrollReset: boolean;\n\n /**\n * Tracks the state of the current navigation\n */\n navigation: Navigation;\n\n /**\n * Tracks any in-progress revalidations\n */\n revalidation: RevalidationState;\n\n /**\n * Data from the loaders for the current matches\n */\n loaderData: RouteData;\n\n /**\n * Data from the action for the current matches\n */\n actionData: RouteData | null;\n\n /**\n * Errors caught from loaders for the current matches\n */\n errors: RouteData | null;\n\n /**\n * Map of current fetchers\n */\n fetchers: Map;\n\n /**\n * Map of current blockers\n */\n blockers: Map;\n}\n\n/**\n * Data that can be passed into hydrate a Router from SSR\n */\nexport type HydrationState = Partial<\n Pick\n>;\n\n/**\n * Future flags to toggle new feature behavior\n */\nexport interface FutureConfig {\n v7_normalizeFormMethod: boolean;\n v7_prependBasename: boolean;\n}\n\n/**\n * Initialization options for createRouter\n */\nexport interface RouterInit {\n routes: AgnosticRouteObject[];\n history: History;\n basename?: string;\n /**\n * @deprecated Use `mapRouteProperties` instead\n */\n detectErrorBoundary?: DetectErrorBoundaryFunction;\n mapRouteProperties?: MapRoutePropertiesFunction;\n future?: Partial;\n hydrationData?: HydrationState;\n window?: Window;\n}\n\n/**\n * State returned from a server-side query() call\n */\nexport interface StaticHandlerContext {\n basename: Router[\"basename\"];\n location: RouterState[\"location\"];\n matches: RouterState[\"matches\"];\n loaderData: RouterState[\"loaderData\"];\n actionData: RouterState[\"actionData\"];\n errors: RouterState[\"errors\"];\n statusCode: number;\n loaderHeaders: Record;\n actionHeaders: Record;\n activeDeferreds: Record | null;\n _deepestRenderedBoundaryId?: string | null;\n}\n\n/**\n * A StaticHandler instance manages a singular SSR navigation/fetch event\n */\nexport interface StaticHandler {\n dataRoutes: AgnosticDataRouteObject[];\n query(\n request: Request,\n opts?: { requestContext?: unknown }\n ): Promise;\n queryRoute(\n request: Request,\n opts?: { routeId?: string; requestContext?: unknown }\n ): Promise;\n}\n\n/**\n * Subscriber function signature for changes to router state\n */\nexport interface RouterSubscriber {\n (state: RouterState): void;\n}\n\n/**\n * Function signature for determining the key to be used in scroll restoration\n * for a given location\n */\nexport interface GetScrollRestorationKeyFunction {\n (location: Location, matches: UIMatch[]): string | null;\n}\n\n/**\n * Function signature for determining the current scroll position\n */\nexport interface GetScrollPositionFunction {\n (): number;\n}\n\nexport type RelativeRoutingType = \"route\" | \"path\";\n\n// Allowed for any navigation or fetch\ntype BaseNavigateOrFetchOptions = {\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n};\n\n// Only allowed for navigations\ntype BaseNavigateOptions = BaseNavigateOrFetchOptions & {\n replace?: boolean;\n state?: any;\n fromRouteId?: string;\n};\n\n// Only allowed for submission navigations\ntype BaseSubmissionOptions = {\n formMethod?: HTMLFormMethod;\n formEncType?: FormEncType;\n} & (\n | { formData: FormData; body?: undefined }\n | { formData?: undefined; body: any }\n);\n\n/**\n * Options for a navigate() call for a normal (non-submission) navigation\n */\ntype LinkNavigateOptions = BaseNavigateOptions;\n\n/**\n * Options for a navigate() call for a submission navigation\n */\ntype SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;\n\n/**\n * Options to pass to navigate() for a navigation\n */\nexport type RouterNavigateOptions =\n | LinkNavigateOptions\n | SubmissionNavigateOptions;\n\n/**\n * Options for a fetch() load\n */\ntype LoadFetchOptions = BaseNavigateOrFetchOptions;\n\n/**\n * Options for a fetch() submission\n */\ntype SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;\n\n/**\n * Options to pass to fetch()\n */\nexport type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;\n\n/**\n * Potential states for state.navigation\n */\nexport type NavigationStates = {\n Idle: {\n state: \"idle\";\n location: undefined;\n formMethod: undefined;\n formAction: undefined;\n formEncType: undefined;\n formData: undefined;\n json: undefined;\n text: undefined;\n };\n Loading: {\n state: \"loading\";\n location: Location;\n formMethod: Submission[\"formMethod\"] | undefined;\n formAction: Submission[\"formAction\"] | undefined;\n formEncType: Submission[\"formEncType\"] | undefined;\n formData: Submission[\"formData\"] | undefined;\n json: Submission[\"json\"] | undefined;\n text: Submission[\"text\"] | undefined;\n };\n Submitting: {\n state: \"submitting\";\n location: Location;\n formMethod: Submission[\"formMethod\"];\n formAction: Submission[\"formAction\"];\n formEncType: Submission[\"formEncType\"];\n formData: Submission[\"formData\"];\n json: Submission[\"json\"];\n text: Submission[\"text\"];\n };\n};\n\nexport type Navigation = NavigationStates[keyof NavigationStates];\n\nexport type RevalidationState = \"idle\" | \"loading\";\n\n/**\n * Potential states for fetchers\n */\ntype FetcherStates = {\n Idle: {\n state: \"idle\";\n formMethod: undefined;\n formAction: undefined;\n formEncType: undefined;\n text: undefined;\n formData: undefined;\n json: undefined;\n data: TData | undefined;\n };\n Loading: {\n state: \"loading\";\n formMethod: Submission[\"formMethod\"] | undefined;\n formAction: Submission[\"formAction\"] | undefined;\n formEncType: Submission[\"formEncType\"] | undefined;\n text: Submission[\"text\"] | undefined;\n formData: Submission[\"formData\"] | undefined;\n json: Submission[\"json\"] | undefined;\n data: TData | undefined;\n };\n Submitting: {\n state: \"submitting\";\n formMethod: Submission[\"formMethod\"];\n formAction: Submission[\"formAction\"];\n formEncType: Submission[\"formEncType\"];\n text: Submission[\"text\"];\n formData: Submission[\"formData\"];\n json: Submission[\"json\"];\n data: TData | undefined;\n };\n};\n\nexport type Fetcher =\n FetcherStates[keyof FetcherStates];\n\ninterface BlockerBlocked {\n state: \"blocked\";\n reset(): void;\n proceed(): void;\n location: Location;\n}\n\ninterface BlockerUnblocked {\n state: \"unblocked\";\n reset: undefined;\n proceed: undefined;\n location: undefined;\n}\n\ninterface BlockerProceeding {\n state: \"proceeding\";\n reset: undefined;\n proceed: undefined;\n location: Location;\n}\n\nexport type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;\n\nexport type BlockerFunction = (args: {\n currentLocation: Location;\n nextLocation: Location;\n historyAction: HistoryAction;\n}) => boolean;\n\ninterface ShortCircuitable {\n /**\n * startNavigation does not need to complete the navigation because we\n * redirected or got interrupted\n */\n shortCircuited?: boolean;\n}\n\ninterface HandleActionResult extends ShortCircuitable {\n /**\n * Error thrown from the current action, keyed by the route containing the\n * error boundary to render the error. To be committed to the state after\n * loaders have completed\n */\n pendingActionError?: RouteData;\n /**\n * Data returned from the current action, keyed by the route owning the action.\n * To be committed to the state after loaders have completed\n */\n pendingActionData?: RouteData;\n}\n\ninterface HandleLoadersResult extends ShortCircuitable {\n /**\n * loaderData returned from the current set of loaders\n */\n loaderData?: RouterState[\"loaderData\"];\n /**\n * errors thrown from the current set of loaders\n */\n errors?: RouterState[\"errors\"];\n}\n\n/**\n * Cached info for active fetcher.load() instances so they can participate\n * in revalidation\n */\ninterface FetchLoadMatch {\n routeId: string;\n path: string;\n}\n\n/**\n * Identified fetcher.load() calls that need to be revalidated\n */\ninterface RevalidatingFetcher extends FetchLoadMatch {\n key: string;\n match: AgnosticDataRouteMatch | null;\n matches: AgnosticDataRouteMatch[] | null;\n controller: AbortController | null;\n}\n\n/**\n * Wrapper object to allow us to throw any response out from callLoaderOrAction\n * for queryRouter while preserving whether or not it was thrown or returned\n * from the loader/action\n */\ninterface QueryRouteResponse {\n type: ResultType.data | ResultType.error;\n response: Response;\n}\n\nconst validMutationMethodsArr: MutationFormMethod[] = [\n \"post\",\n \"put\",\n \"patch\",\n \"delete\",\n];\nconst validMutationMethods = new Set(\n validMutationMethodsArr\n);\n\nconst validRequestMethodsArr: FormMethod[] = [\n \"get\",\n ...validMutationMethodsArr,\n];\nconst validRequestMethods = new Set(validRequestMethodsArr);\n\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\n\nexport const IDLE_NAVIGATION: NavigationStates[\"Idle\"] = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n};\n\nexport const IDLE_FETCHER: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n};\n\nexport const IDLE_BLOCKER: BlockerUnblocked = {\n state: \"unblocked\",\n proceed: undefined,\n reset: undefined,\n location: undefined,\n};\n\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\nconst defaultMapRouteProperties: MapRoutePropertiesFunction = (route) => ({\n hasErrorBoundary: Boolean(route.hasErrorBoundary),\n});\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Create a router and listen to history POP navigations\n */\nexport function createRouter(init: RouterInit): Router {\n const routerWindow = init.window\n ? init.window\n : typeof window !== \"undefined\"\n ? window\n : undefined;\n const isBrowser =\n typeof routerWindow !== \"undefined\" &&\n typeof routerWindow.document !== \"undefined\" &&\n typeof routerWindow.document.createElement !== \"undefined\";\n const isServer = !isBrowser;\n\n invariant(\n init.routes.length > 0,\n \"You must provide a non-empty routes array to createRouter\"\n );\n\n let mapRouteProperties: MapRoutePropertiesFunction;\n if (init.mapRouteProperties) {\n mapRouteProperties = init.mapRouteProperties;\n } else if (init.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = init.detectErrorBoundary;\n mapRouteProperties = (route) => ({\n hasErrorBoundary: detectErrorBoundary(route),\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n\n // Routes keyed by ID\n let manifest: RouteManifest = {};\n // Routes in tree format for matching\n let dataRoutes = convertRoutesToDataRoutes(\n init.routes,\n mapRouteProperties,\n undefined,\n manifest\n );\n let inFlightDataRoutes: AgnosticDataRouteObject[] | undefined;\n let basename = init.basename || \"/\";\n // Config driven behavior flags\n let future: FutureConfig = {\n v7_normalizeFormMethod: false,\n v7_prependBasename: false,\n ...init.future,\n };\n // Cleanup function for history\n let unlistenHistory: (() => void) | null = null;\n // Externally-provided functions to call on all state changes\n let subscribers = new Set();\n // Externally-provided object to hold scroll restoration locations during routing\n let savedScrollPositions: Record | null = null;\n // Externally-provided function to get scroll restoration keys\n let getScrollRestorationKey: GetScrollRestorationKeyFunction | null = null;\n // Externally-provided function to get current scroll position\n let getScrollPosition: GetScrollPositionFunction | null = null;\n // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n // Set to true if we have `hydrationData` since we assume we were SSR'd and that\n // SSR did the initial scroll restoration.\n let initialScrollRestored = init.hydrationData != null;\n\n let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n let initialErrors: RouteData | null = null;\n\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname,\n });\n let { matches, route } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = { [route.id]: error };\n }\n\n let initialized =\n // All initialMatches need to be loaded before we're ready. If we have lazy\n // functions around still then we'll need to run them in initialize()\n !initialMatches.some((m) => m.route.lazy) &&\n // And we have to either have no loaders or have been provided hydrationData\n (!initialMatches.some((m) => m.route.loader) || init.hydrationData != null);\n\n let router: Router;\n let state: RouterState = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don't restore on initial updateState() if we were SSR'd\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: (init.hydrationData && init.hydrationData.loaderData) || {},\n actionData: (init.hydrationData && init.hydrationData.actionData) || null,\n errors: (init.hydrationData && init.hydrationData.errors) || initialErrors,\n fetchers: new Map(),\n blockers: new Map(),\n };\n\n // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n let pendingAction: HistoryAction = HistoryAction.Pop;\n\n // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n let pendingPreventScrollReset = false;\n\n // AbortController for the active navigation\n let pendingNavigationController: AbortController | null;\n\n // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n let isUninterruptedRevalidation = false;\n\n // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidator()\n // - X-Remix-Revalidate (from redirect)\n let isRevalidationRequired = false;\n\n // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n let cancelledDeferredRoutes: string[] = [];\n\n // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n let cancelledFetcherLoads: string[] = [];\n\n // AbortControllers for any in-flight fetchers\n let fetchControllers = new Map();\n\n // Track loads based on the order in which they started\n let incrementingLoadId = 0;\n\n // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n let pendingNavigationLoadId = -1;\n\n // Fetchers that triggered data reloads as a result of their actions\n let fetchReloadIds = new Map();\n\n // Fetchers that triggered redirect navigations\n let fetchRedirectIds = new Set();\n\n // Most recent href/match for fetcher.load calls for fetchers\n let fetchLoadMatches = new Map();\n\n // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n let activeDeferreds = new Map();\n\n // Store blocker functions in a separate Map outside of router state since\n // we don't need to update UI state if they change\n let blockerFunctions = new Map();\n\n // Flag to ignore the next history update, so we can revert the URL change on\n // a POP navigation that was blocked by the user without touching router state\n let ignoreNextHistoryUpdate = false;\n\n // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(\n ({ action: historyAction, location, delta }) => {\n // Ignore this event if it was just us resetting the URL from a\n // blocked POP navigation\n if (ignoreNextHistoryUpdate) {\n ignoreNextHistoryUpdate = false;\n return;\n }\n\n warning(\n blockerFunctions.size === 0 || delta != null,\n \"You are trying to use a blocker on a POP navigation to a location \" +\n \"that was not created by @remix-run/router. This will fail silently in \" +\n \"production. This can happen if you are navigating outside the router \" +\n \"via `window.history.pushState`/`window.location.hash` instead of using \" +\n \"router navigation APIs. This can also happen if you are using \" +\n \"createHashRouter and the user manually changes the URL.\"\n );\n\n let blockerKey = shouldBlockNavigation({\n currentLocation: state.location,\n nextLocation: location,\n historyAction,\n });\n\n if (blockerKey && delta != null) {\n // Restore the URL to match the current UI, but don't update router state\n ignoreNextHistoryUpdate = true;\n init.history.go(delta * -1);\n\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location,\n proceed() {\n updateBlocker(blockerKey!, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location,\n });\n // Re-do the same POP navigation we just blocked\n init.history.go(delta);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey!, IDLE_BLOCKER);\n updateState({ blockers });\n },\n });\n return;\n }\n\n return startNavigation(historyAction, location);\n }\n );\n\n // Kick off initial data load if needed. Use Pop to avoid modifying history\n // Note we don't do any handling of lazy here. For SPA's it'll get handled\n // in the normal navigation flow. For SSR it's expected that lazy modules are\n // resolved prior to router creation since we can't go into a fallbackElement\n // UI for SSR'd apps\n if (!state.initialized) {\n startNavigation(HistoryAction.Pop, state.location);\n }\n\n return router;\n }\n\n // Clean up a router and it's side effects\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n state.blockers.forEach((_, key) => deleteBlocker(key));\n }\n\n // Subscribe to state updates for the router\n function subscribe(fn: RouterSubscriber) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n\n // Update our state and notify the calling context of the change\n function updateState(newState: Partial): void {\n state = {\n ...state,\n ...newState,\n };\n subscribers.forEach((subscriber) => subscriber(state));\n }\n\n // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n function completeNavigation(\n location: Location,\n newState: Partial>\n ): void {\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a mutation submission\n // - We're past the submitting state and into the loading state\n // - The location being loaded is not the result of a redirect\n let isActionReload =\n state.actionData != null &&\n state.navigation.formMethod != null &&\n isMutationMethod(state.navigation.formMethod) &&\n state.navigation.state === \"loading\" &&\n location.state?._isRedirect !== true;\n\n let actionData: RouteData | null;\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n // Empty actionData -> clear prior actionData due to an action error\n actionData = null;\n }\n } else if (isActionReload) {\n // Keep the current data if we're wrapping up the action reload\n actionData = state.actionData;\n } else {\n // Clear actionData on any other completed navigations\n actionData = null;\n }\n\n // Always preserve any existing loaderData from re-used routes\n let loaderData = newState.loaderData\n ? mergeLoaderData(\n state.loaderData,\n newState.loaderData,\n newState.matches || [],\n newState.errors\n )\n : state.loaderData;\n\n // On a successful navigation we can assume we got through all blockers\n // so we can start fresh\n let blockers = state.blockers;\n if (blockers.size > 0) {\n blockers = new Map(blockers);\n blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n }\n\n // Always respect the user flag. Otherwise don't reset on mutation\n // submission navigations unless they redirect\n let preventScrollReset =\n pendingPreventScrollReset === true ||\n (state.navigation.formMethod != null &&\n isMutationMethod(state.navigation.formMethod) &&\n location.state?._isRedirect !== true);\n\n if (inFlightDataRoutes) {\n dataRoutes = inFlightDataRoutes;\n inFlightDataRoutes = undefined;\n }\n\n if (isUninterruptedRevalidation) {\n // If this was an uninterrupted revalidation then do not touch history\n } else if (pendingAction === HistoryAction.Pop) {\n // Do nothing for POP - URL has already been updated\n } else if (pendingAction === HistoryAction.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === HistoryAction.Replace) {\n init.history.replace(location, location.state);\n }\n\n updateState({\n ...newState, // matches, errors, fetchers go through as-is\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n restoreScrollPosition: getSavedScrollPosition(\n location,\n newState.matches || state.matches\n ),\n preventScrollReset,\n blockers,\n });\n\n // Reset stateful navigation vars\n pendingAction = HistoryAction.Pop;\n pendingPreventScrollReset = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n }\n\n // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n async function navigate(\n to: number | To | null,\n opts?: RouterNavigateOptions\n ): Promise {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n\n let normalizedPath = normalizeTo(\n state.location,\n state.matches,\n basename,\n future.v7_prependBasename,\n to,\n opts?.fromRouteId,\n opts?.relative\n );\n let { path, submission, error } = normalizeNavigateOptions(\n future.v7_normalizeFormMethod,\n false,\n normalizedPath,\n opts\n );\n\n let currentLocation = state.location;\n let nextLocation = createLocation(state.location, path, opts && opts.state);\n\n // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n nextLocation = {\n ...nextLocation,\n ...init.history.encodeLocation(nextLocation),\n };\n\n let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n\n let historyAction = HistoryAction.Push;\n\n if (userReplace === true) {\n historyAction = HistoryAction.Replace;\n } else if (userReplace === false) {\n // no-op\n } else if (\n submission != null &&\n isMutationMethod(submission.formMethod) &&\n submission.formAction === state.location.pathname + state.location.search\n ) {\n // By default on submissions to the current location we REPLACE so that\n // users don't have to double-click the back button to get to the prior\n // location. If the user redirects to a different location from the\n // action/loader this will be ignored and the redirect will be a PUSH\n historyAction = HistoryAction.Replace;\n }\n\n let preventScrollReset =\n opts && \"preventScrollReset\" in opts\n ? opts.preventScrollReset === true\n : undefined;\n\n let blockerKey = shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction,\n });\n\n if (blockerKey) {\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location: nextLocation,\n proceed() {\n updateBlocker(blockerKey!, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location: nextLocation,\n });\n // Send the same navigation through\n navigate(to, opts);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey!, IDLE_BLOCKER);\n updateState({ blockers });\n },\n });\n return;\n }\n\n return await startNavigation(historyAction, nextLocation, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace,\n });\n }\n\n // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n function revalidate() {\n interruptActiveLoads();\n updateState({ revalidation: \"loading\" });\n\n // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n if (state.navigation.state === \"submitting\") {\n return;\n }\n\n // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true,\n });\n return;\n }\n\n // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n startNavigation(\n pendingAction || state.historyAction,\n state.navigation.location,\n { overrideNavigation: state.navigation }\n );\n }\n\n // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n async function startNavigation(\n historyAction: HistoryAction,\n location: Location,\n opts?: {\n submission?: Submission;\n fetcherSubmission?: Submission;\n overrideNavigation?: Navigation;\n pendingError?: ErrorResponseImpl;\n startUninterruptedRevalidation?: boolean;\n preventScrollReset?: boolean;\n replace?: boolean;\n }\n ): Promise {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation =\n (opts && opts.startUninterruptedRevalidation) === true;\n\n // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(routesToUse, location, basename);\n\n // Short circuit with a 404 on the root error boundary if we match nothing\n if (!matches) {\n let error = getInternalRouterError(404, { pathname: location.pathname });\n let { matches: notFoundMatches, route } =\n getShortCircuitMatches(routesToUse);\n // Cancel all pending deferred on 404s since we don't keep any routes\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error,\n },\n });\n return;\n }\n\n // Short circuit if it's only a hash change and not a revalidation or\n // mutation submission.\n //\n // Ignore on initial page loads because since the initial load will always\n // be \"same hash\". For example, on /page#hash and submit a \n // which will default to a navigation to /page\n if (\n state.initialized &&\n !isRevalidationRequired &&\n isHashChangeOnly(state.location, location) &&\n !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))\n ) {\n completeNavigation(location, { matches });\n return;\n }\n\n // Create a controller/Request for this navigation\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(\n init.history,\n location,\n pendingNavigationController.signal,\n opts && opts.submission\n );\n let pendingActionData: RouteData | undefined;\n let pendingError: RouteData | undefined;\n\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError,\n };\n } else if (\n opts &&\n opts.submission &&\n isMutationMethod(opts.submission.formMethod)\n ) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(\n request,\n location,\n opts.submission,\n matches,\n { replace: opts.replace }\n );\n\n if (actionOutput.shortCircuited) {\n return;\n }\n\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n loadingNavigation = getLoadingNavigation(location, opts.submission);\n\n // Create a GET request for the loaders\n request = new Request(request.url, { signal: request.signal });\n }\n\n // Call loaders\n let { shortCircuited, loaderData, errors } = await handleLoaders(\n request,\n location,\n matches,\n loadingNavigation,\n opts && opts.submission,\n opts && opts.fetcherSubmission,\n opts && opts.replace,\n pendingActionData,\n pendingError\n );\n\n if (shortCircuited) {\n return;\n }\n\n // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n pendingNavigationController = null;\n\n completeNavigation(location, {\n matches,\n ...(pendingActionData ? { actionData: pendingActionData } : {}),\n loaderData,\n errors,\n });\n }\n\n // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n async function handleAction(\n request: Request,\n location: Location,\n submission: Submission,\n matches: AgnosticDataRouteMatch[],\n opts: { replace?: boolean } = {}\n ): Promise {\n interruptActiveLoads();\n\n // Put us in a submitting state\n let navigation = getSubmittingNavigation(location, submission);\n updateState({ navigation });\n\n // Call our action and get the result\n let result: DataResult;\n let actionMatch = getTargetMatch(matches, location);\n\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id,\n }),\n };\n } else {\n result = await callLoaderOrAction(\n \"action\",\n request,\n actionMatch,\n matches,\n manifest,\n mapRouteProperties,\n basename\n );\n\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n }\n\n if (isRedirectResult(result)) {\n let replace: boolean;\n if (opts && opts.replace != null) {\n replace = opts.replace;\n } else {\n // If the user didn't explicity indicate replace behavior, replace if\n // we redirected to the exact same location we're currently at to avoid\n // double back-buttons\n replace =\n result.location === state.location.pathname + state.location.search;\n }\n await startRedirectNavigation(state, result, { submission, replace });\n return { shortCircuited: true };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n\n // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n if ((opts && opts.replace) !== true) {\n pendingAction = HistoryAction.Push;\n }\n\n return {\n // Send back an empty object we can use to clear out any prior actionData\n pendingActionData: {},\n pendingActionError: { [boundaryMatch.route.id]: result.error },\n };\n }\n\n if (isDeferredResult(result)) {\n throw getInternalRouterError(400, { type: \"defer-action\" });\n }\n\n return {\n pendingActionData: { [actionMatch.route.id]: result.data },\n };\n }\n\n // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n async function handleLoaders(\n request: Request,\n location: Location,\n matches: AgnosticDataRouteMatch[],\n overrideNavigation?: Navigation,\n submission?: Submission,\n fetcherSubmission?: Submission,\n replace?: boolean,\n pendingActionData?: RouteData,\n pendingError?: RouteData\n ): Promise {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation =\n overrideNavigation || getLoadingNavigation(location, submission);\n\n // If this was a redirect from an action we don't have a \"submission\" but\n // we have it on the loading navigation so use that if available\n let activeSubmission =\n submission ||\n fetcherSubmission ||\n getSubmissionFromNavigation(loadingNavigation);\n\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(\n init.history,\n state,\n matches,\n activeSubmission,\n location,\n isRevalidationRequired,\n cancelledDeferredRoutes,\n cancelledFetcherLoads,\n fetchLoadMatches,\n fetchRedirectIds,\n routesToUse,\n basename,\n pendingActionData,\n pendingError\n );\n\n // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n cancelActiveDeferreds(\n (routeId) =>\n !(matches && matches.some((m) => m.route.id === routeId)) ||\n (matchesToLoad && matchesToLoad.some((m) => m.route.id === routeId))\n );\n\n pendingNavigationLoadId = ++incrementingLoadId;\n\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n let updatedFetchers = markFetchRedirectsDone();\n completeNavigation(location, {\n matches,\n loaderData: {},\n // Commit pending error if we're short circuiting\n errors: pendingError || null,\n ...(pendingActionData ? { actionData: pendingActionData } : {}),\n ...(updatedFetchers ? { fetchers: new Map(state.fetchers) } : {}),\n });\n return { shortCircuited: true };\n }\n\n // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n if (!isUninterruptedRevalidation) {\n revalidatingFetchers.forEach((rf) => {\n let fetcher = state.fetchers.get(rf.key);\n let revalidatingFetcher = getLoadingFetcher(\n undefined,\n fetcher ? fetcher.data : undefined\n );\n state.fetchers.set(rf.key, revalidatingFetcher);\n });\n let actionData = pendingActionData || state.actionData;\n updateState({\n navigation: loadingNavigation,\n ...(actionData\n ? Object.keys(actionData).length === 0\n ? { actionData: null }\n : { actionData }\n : {}),\n ...(revalidatingFetchers.length > 0\n ? { fetchers: new Map(state.fetchers) }\n : {}),\n });\n }\n\n revalidatingFetchers.forEach((rf) => {\n if (fetchControllers.has(rf.key)) {\n abortFetcher(rf.key);\n }\n if (rf.controller) {\n // Fetchers use an independent AbortController so that aborting a fetcher\n // (via deleteFetcher) does not abort the triggering navigation that\n // triggered the revalidation\n fetchControllers.set(rf.key, rf.controller);\n }\n });\n\n // Proxy navigation abort through to revalidation fetchers\n let abortPendingFetchRevalidations = () =>\n revalidatingFetchers.forEach((f) => abortFetcher(f.key));\n if (pendingNavigationController) {\n pendingNavigationController.signal.addEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n }\n\n let { results, loaderResults, fetcherResults } =\n await callLoadersAndMaybeResolveData(\n state.matches,\n matches,\n matchesToLoad,\n revalidatingFetchers,\n request\n );\n\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n\n // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n if (pendingNavigationController) {\n pendingNavigationController.signal.removeEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n }\n revalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key));\n\n // If any loaders returned a redirect Response, start a new REPLACE navigation\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey =\n revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n await startRedirectNavigation(state, redirect.result, { replace });\n return { shortCircuited: true };\n }\n\n // Process and commit output from loaders\n let { loaderData, errors } = processLoaderData(\n state,\n matches,\n matchesToLoad,\n loaderResults,\n pendingError,\n revalidatingFetchers,\n fetcherResults,\n activeDeferreds\n );\n\n // Wire up subscribers to update loaderData as promises settle\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe((aborted) => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n\n let updatedFetchers = markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n let shouldUpdateFetchers =\n updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n\n return {\n loaderData,\n errors,\n ...(shouldUpdateFetchers ? { fetchers: new Map(state.fetchers) } : {}),\n };\n }\n\n function getFetcher(key: string): Fetcher {\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n\n // Trigger a fetcher load/submit for the given fetcher key\n function fetch(\n key: string,\n routeId: string,\n href: string | null,\n opts?: RouterFetchOptions\n ) {\n if (isServer) {\n throw new Error(\n \"router.fetch() was called during the server render, but it shouldn't be. \" +\n \"You are likely calling a useFetcher() method in the body of your component. \" +\n \"Try moving it to a useEffect or a callback.\"\n );\n }\n\n if (fetchControllers.has(key)) abortFetcher(key);\n\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let normalizedPath = normalizeTo(\n state.location,\n state.matches,\n basename,\n future.v7_prependBasename,\n href,\n routeId,\n opts?.relative\n );\n let matches = matchRoutes(routesToUse, normalizedPath, basename);\n\n if (!matches) {\n setFetcherError(\n key,\n routeId,\n getInternalRouterError(404, { pathname: normalizedPath })\n );\n return;\n }\n\n let { path, submission, error } = normalizeNavigateOptions(\n future.v7_normalizeFormMethod,\n true,\n normalizedPath,\n opts\n );\n\n if (error) {\n setFetcherError(key, routeId, error);\n return;\n }\n\n let match = getTargetMatch(matches, path);\n\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, submission);\n return;\n }\n\n // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n fetchLoadMatches.set(key, { routeId, path });\n handleFetcherLoader(key, routeId, path, match, matches, submission);\n }\n\n // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n async function handleFetcherAction(\n key: string,\n routeId: string,\n path: string,\n match: AgnosticDataRouteMatch,\n requestMatches: AgnosticDataRouteMatch[],\n submission: Submission\n ) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n\n if (!match.route.action && !match.route.lazy) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId,\n });\n setFetcherError(key, routeId, error);\n return;\n }\n\n // Put this fetcher into it's submitting state\n let existingFetcher = state.fetchers.get(key);\n let fetcher = getSubmittingFetcher(submission, existingFetcher);\n state.fetchers.set(key, fetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n // Call the action for the fetcher\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(\n init.history,\n path,\n abortController.signal,\n submission\n );\n fetchControllers.set(key, abortController);\n\n let originatingLoadId = incrementingLoadId;\n let actionResult = await callLoaderOrAction(\n \"action\",\n fetchRequest,\n match,\n requestMatches,\n manifest,\n mapRouteProperties,\n basename\n );\n\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our action started, so that\n // should take precedence over this redirect navigation. We already\n // set isRevalidationRequired so all loaders for the new route should\n // fire unless opted out via shouldRevalidate\n let doneFetcher = getDoneFetcher(undefined);\n state.fetchers.set(key, doneFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n return;\n } else {\n fetchRedirectIds.add(key);\n let loadingFetcher = getLoadingFetcher(submission);\n state.fetchers.set(key, loadingFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n return startRedirectNavigation(state, actionResult, {\n fetcherSubmission: submission,\n });\n }\n }\n\n // Process any non-redirect errors thrown\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n\n if (isDeferredResult(actionResult)) {\n throw getInternalRouterError(400, { type: \"defer-action\" });\n }\n\n // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(\n init.history,\n nextLocation,\n abortController.signal\n );\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let matches =\n state.navigation.state !== \"idle\"\n ? matchRoutes(routesToUse, state.navigation.location, basename)\n : state.matches;\n\n invariant(matches, \"Didn't find any matches after fetcher action\");\n\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n\n let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n state.fetchers.set(key, loadFetcher);\n\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(\n init.history,\n state,\n matches,\n submission,\n nextLocation,\n isRevalidationRequired,\n cancelledDeferredRoutes,\n cancelledFetcherLoads,\n fetchLoadMatches,\n fetchRedirectIds,\n routesToUse,\n basename,\n { [match.route.id]: actionResult.data },\n undefined // No need to send through errors since we short circuit above\n );\n\n // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n revalidatingFetchers\n .filter((rf) => rf.key !== key)\n .forEach((rf) => {\n let staleKey = rf.key;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = getLoadingFetcher(\n undefined,\n existingFetcher ? existingFetcher.data : undefined\n );\n state.fetchers.set(staleKey, revalidatingFetcher);\n if (fetchControllers.has(staleKey)) {\n abortFetcher(staleKey);\n }\n if (rf.controller) {\n fetchControllers.set(staleKey, rf.controller);\n }\n });\n\n updateState({ fetchers: new Map(state.fetchers) });\n\n let abortPendingFetchRevalidations = () =>\n revalidatingFetchers.forEach((rf) => abortFetcher(rf.key));\n\n abortController.signal.addEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n\n let { results, loaderResults, fetcherResults } =\n await callLoadersAndMaybeResolveData(\n state.matches,\n matches,\n matchesToLoad,\n revalidatingFetchers,\n revalidationRequest\n );\n\n if (abortController.signal.aborted) {\n return;\n }\n\n abortController.signal.removeEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach((r) => fetchControllers.delete(r.key));\n\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey =\n revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n return startRedirectNavigation(state, redirect.result);\n }\n\n // Process and commit output from loaders\n let { loaderData, errors } = processLoaderData(\n state,\n state.matches,\n matchesToLoad,\n loaderResults,\n undefined,\n revalidatingFetchers,\n fetcherResults,\n activeDeferreds\n );\n\n // Since we let revalidations complete even if the submitting fetcher was\n // deleted, only put it back to idle if it hasn't been deleted\n if (state.fetchers.has(key)) {\n let doneFetcher = getDoneFetcher(actionResult.data);\n state.fetchers.set(key, doneFetcher);\n }\n\n let didAbortFetchLoads = abortStaleFetchLoads(loadId);\n\n // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n if (\n state.navigation.state === \"loading\" &&\n loadId > pendingNavigationLoadId\n ) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers),\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState({\n errors,\n loaderData: mergeLoaderData(\n state.loaderData,\n loaderData,\n matches,\n errors\n ),\n ...(didAbortFetchLoads || revalidatingFetchers.length > 0\n ? { fetchers: new Map(state.fetchers) }\n : {}),\n });\n isRevalidationRequired = false;\n }\n }\n\n // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n async function handleFetcherLoader(\n key: string,\n routeId: string,\n path: string,\n match: AgnosticDataRouteMatch,\n matches: AgnosticDataRouteMatch[],\n submission?: Submission\n ) {\n let existingFetcher = state.fetchers.get(key);\n // Put this fetcher into it's loading state\n let loadingFetcher = getLoadingFetcher(\n submission,\n existingFetcher ? existingFetcher.data : undefined\n );\n state.fetchers.set(key, loadingFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n // Call the loader for this fetcher route match\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(\n init.history,\n path,\n abortController.signal\n );\n fetchControllers.set(key, abortController);\n\n let originatingLoadId = incrementingLoadId;\n let result: DataResult = await callLoaderOrAction(\n \"loader\",\n fetchRequest,\n match,\n matches,\n manifest,\n mapRouteProperties,\n basename\n );\n\n // Deferred isn't supported for fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n if (isDeferredResult(result)) {\n result =\n (await resolveDeferredData(result, fetchRequest.signal, true)) ||\n result;\n }\n\n // We can delete this so long as we weren't aborted by our our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n if (fetchRequest.signal.aborted) {\n return;\n }\n\n // If the loader threw a redirect Response, start a new REPLACE navigation\n if (isRedirectResult(result)) {\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our loader started, so that\n // should take precedence over this redirect navigation\n let doneFetcher = getDoneFetcher(undefined);\n state.fetchers.set(key, doneFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n return;\n } else {\n fetchRedirectIds.add(key);\n await startRedirectNavigation(state, result);\n return;\n }\n }\n\n // Process any non-redirect errors thrown\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n state.fetchers.delete(key);\n // TODO: In remix, this would reset to IDLE_NAVIGATION if it was a catch -\n // do we need to behave any differently with our non-redirect errors?\n // What if it was a non-redirect Response?\n updateState({\n fetchers: new Map(state.fetchers),\n errors: {\n [boundaryMatch.route.id]: result.error,\n },\n });\n return;\n }\n\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\");\n\n // Put the fetcher back into an idle state\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n }\n\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n async function startRedirectNavigation(\n state: RouterState,\n redirect: RedirectResult,\n {\n submission,\n fetcherSubmission,\n replace,\n }: {\n submission?: Submission;\n fetcherSubmission?: Submission;\n replace?: boolean;\n } = {}\n ) {\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n\n let redirectLocation = createLocation(state.location, redirect.location, {\n _isRedirect: true,\n });\n invariant(\n redirectLocation,\n \"Expected a location on the redirect navigation\"\n );\n\n if (isBrowser) {\n let isDocumentReload = false;\n\n if (redirect.reloadDocument) {\n // Hard reload if the response contained X-Remix-Reload-Document\n isDocumentReload = true;\n } else if (ABSOLUTE_URL_REGEX.test(redirect.location)) {\n const url = init.history.createURL(redirect.location);\n isDocumentReload =\n // Hard reload if it's an absolute URL to a new origin\n url.origin !== routerWindow.location.origin ||\n // Hard reload if it's an absolute URL that does not match our basename\n stripBasename(url.pathname, basename) == null;\n }\n\n if (isDocumentReload) {\n if (replace) {\n routerWindow.location.replace(redirect.location);\n } else {\n routerWindow.location.assign(redirect.location);\n }\n return;\n }\n }\n\n // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n pendingNavigationController = null;\n\n let redirectHistoryAction =\n replace === true ? HistoryAction.Replace : HistoryAction.Push;\n\n // Use the incoming submission if provided, fallback on the active one in\n // state.navigation\n let { formMethod, formAction, formEncType } = state.navigation;\n if (\n !submission &&\n !fetcherSubmission &&\n formMethod &&\n formAction &&\n formEncType\n ) {\n submission = getSubmissionFromNavigation(state.navigation);\n }\n\n // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n let activeSubmission = submission || fetcherSubmission;\n if (\n redirectPreserveMethodStatusCodes.has(redirect.status) &&\n activeSubmission &&\n isMutationMethod(activeSubmission.formMethod)\n ) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: {\n ...activeSubmission,\n formAction: redirect.location,\n },\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset,\n });\n } else {\n // If we have a navigation submission, we will preserve it through the\n // redirect navigation\n let overrideNavigation = getLoadingNavigation(\n redirectLocation,\n submission\n );\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation,\n // Send fetcher submissions through for shouldRevalidate\n fetcherSubmission,\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset,\n });\n }\n }\n\n async function callLoadersAndMaybeResolveData(\n currentMatches: AgnosticDataRouteMatch[],\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n fetchersToLoad: RevalidatingFetcher[],\n request: Request\n ) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([\n ...matchesToLoad.map((match) =>\n callLoaderOrAction(\n \"loader\",\n request,\n match,\n matches,\n manifest,\n mapRouteProperties,\n basename\n )\n ),\n ...fetchersToLoad.map((f) => {\n if (f.matches && f.match && f.controller) {\n return callLoaderOrAction(\n \"loader\",\n createClientSideRequest(init.history, f.path, f.controller.signal),\n f.match,\n f.matches,\n manifest,\n mapRouteProperties,\n basename\n );\n } else {\n let error: ErrorResult = {\n type: ResultType.error,\n error: getInternalRouterError(404, { pathname: f.path }),\n };\n return error;\n }\n }),\n ]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n\n await Promise.all([\n resolveDeferredResults(\n currentMatches,\n matchesToLoad,\n loaderResults,\n loaderResults.map(() => request.signal),\n false,\n state.loaderData\n ),\n resolveDeferredResults(\n currentMatches,\n fetchersToLoad.map((f) => f.match),\n fetcherResults,\n fetchersToLoad.map((f) => (f.controller ? f.controller.signal : null)),\n true\n ),\n ]);\n\n return { results, loaderResults, fetcherResults };\n }\n\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true;\n\n // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n\n // Abort in-flight fetcher loads\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n\n function setFetcherError(key: string, routeId: string, error: any) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error,\n },\n fetchers: new Map(state.fetchers),\n });\n }\n\n function deleteFetcher(key: string): void {\n let fetcher = state.fetchers.get(key);\n // Don't abort the controller if this is a deletion of a fetcher.submit()\n // in it's loading phase since - we don't want to abort the corresponding\n // revalidation and want them to complete and land\n if (\n fetchControllers.has(key) &&\n !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))\n ) {\n abortFetcher(key);\n }\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n state.fetchers.delete(key);\n }\n\n function abortFetcher(key: string) {\n let controller = fetchControllers.get(key);\n invariant(controller, `Expected fetch controller: ${key}`);\n controller.abort();\n fetchControllers.delete(key);\n }\n\n function markFetchersDone(keys: string[]) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = getDoneFetcher(fetcher.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n function markFetchRedirectsDone(): boolean {\n let doneKeys = [];\n let updatedFetchers = false;\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n updatedFetchers = true;\n }\n }\n markFetchersDone(doneKeys);\n return updatedFetchers;\n }\n\n function abortStaleFetchLoads(landedId: number): boolean {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n\n function getBlocker(key: string, fn: BlockerFunction) {\n let blocker: Blocker = state.blockers.get(key) || IDLE_BLOCKER;\n\n if (blockerFunctions.get(key) !== fn) {\n blockerFunctions.set(key, fn);\n }\n\n return blocker;\n }\n\n function deleteBlocker(key: string) {\n state.blockers.delete(key);\n blockerFunctions.delete(key);\n }\n\n // Utility function to update blockers, ensuring valid state transitions\n function updateBlocker(key: string, newBlocker: Blocker) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n\n // Poor mans state machine :)\n // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n invariant(\n (blocker.state === \"unblocked\" && newBlocker.state === \"blocked\") ||\n (blocker.state === \"blocked\" && newBlocker.state === \"blocked\") ||\n (blocker.state === \"blocked\" && newBlocker.state === \"proceeding\") ||\n (blocker.state === \"blocked\" && newBlocker.state === \"unblocked\") ||\n (blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\"),\n `Invalid blocker state transition: ${blocker.state} -> ${newBlocker.state}`\n );\n\n let blockers = new Map(state.blockers);\n blockers.set(key, newBlocker);\n updateState({ blockers });\n }\n\n function shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction,\n }: {\n currentLocation: Location;\n nextLocation: Location;\n historyAction: HistoryAction;\n }): string | undefined {\n if (blockerFunctions.size === 0) {\n return;\n }\n\n // We ony support a single active blocker at the moment since we don't have\n // any compelling use cases for multi-blocker yet\n if (blockerFunctions.size > 1) {\n warning(false, \"A router only supports one blocker at a time\");\n }\n\n let entries = Array.from(blockerFunctions.entries());\n let [blockerKey, blockerFunction] = entries[entries.length - 1];\n let blocker = state.blockers.get(blockerKey);\n\n if (blocker && blocker.state === \"proceeding\") {\n // If the blocker is currently proceeding, we don't need to re-check\n // it and can let this navigation continue\n return;\n }\n\n // At this point, we know we're unblocked/blocked so we need to check the\n // user-provided blocker function\n if (blockerFunction({ currentLocation, nextLocation, historyAction })) {\n return blockerKey;\n }\n }\n\n function cancelActiveDeferreds(\n predicate?: (routeId: string) => boolean\n ): string[] {\n let cancelledRouteIds: string[] = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n }\n\n // Opt in to capturing and reporting scroll positions during navigations,\n // used by the component\n function enableScrollRestoration(\n positions: Record,\n getPosition: GetScrollPositionFunction,\n getKey?: GetScrollRestorationKeyFunction\n ) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey = getKey || null;\n\n // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered \n // and therefore have no savedScrollPositions available\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({ restoreScrollPosition: y });\n }\n }\n\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n\n function getScrollKey(location: Location, matches: AgnosticDataRouteMatch[]) {\n if (getScrollRestorationKey) {\n let key = getScrollRestorationKey(\n location,\n matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData))\n );\n return key || location.key;\n }\n return location.key;\n }\n\n function saveScrollPosition(\n location: Location,\n matches: AgnosticDataRouteMatch[]\n ): void {\n if (savedScrollPositions && getScrollPosition) {\n let key = getScrollKey(location, matches);\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n\n function getSavedScrollPosition(\n location: Location,\n matches: AgnosticDataRouteMatch[]\n ): number | null {\n if (savedScrollPositions) {\n let key = getScrollKey(location, matches);\n let y = savedScrollPositions[key];\n if (typeof y === \"number\") {\n return y;\n }\n }\n return null;\n }\n\n function _internalSetRoutes(newRoutes: AgnosticDataRouteObject[]) {\n manifest = {};\n inFlightDataRoutes = convertRoutesToDataRoutes(\n newRoutes,\n mapRouteProperties,\n undefined,\n manifest\n );\n }\n\n router = {\n get basename() {\n return basename;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: (to: To) => init.history.createHref(to),\n encodeLocation: (to: To) => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher,\n dispose,\n getBlocker,\n deleteBlocker,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds,\n // TODO: Remove setRoutes, it's temporary to avoid dealing with\n // updating the tree while validating the update algorithm.\n _internalSetRoutes,\n };\n\n return router;\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\n\nexport const UNSAFE_DEFERRED_SYMBOL = Symbol(\"deferred\");\n\nexport interface CreateStaticHandlerOptions {\n basename?: string;\n /**\n * @deprecated Use `mapRouteProperties` instead\n */\n detectErrorBoundary?: DetectErrorBoundaryFunction;\n mapRouteProperties?: MapRoutePropertiesFunction;\n}\n\nexport function createStaticHandler(\n routes: AgnosticRouteObject[],\n opts?: CreateStaticHandlerOptions\n): StaticHandler {\n invariant(\n routes.length > 0,\n \"You must provide a non-empty routes array to createStaticHandler\"\n );\n\n let manifest: RouteManifest = {};\n let basename = (opts ? opts.basename : null) || \"/\";\n let mapRouteProperties: MapRoutePropertiesFunction;\n if (opts?.mapRouteProperties) {\n mapRouteProperties = opts.mapRouteProperties;\n } else if (opts?.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = opts.detectErrorBoundary;\n mapRouteProperties = (route) => ({\n hasErrorBoundary: detectErrorBoundary(route),\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n\n let dataRoutes = convertRoutesToDataRoutes(\n routes,\n mapRouteProperties,\n undefined,\n manifest\n );\n\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n async function query(\n request: Request,\n { requestContext }: { requestContext?: unknown } = {}\n ): Promise {\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\") {\n let error = getInternalRouterError(405, { method });\n let { matches: methodNotAllowedMatches, route } =\n getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error,\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null,\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, { pathname: location.pathname });\n let { matches: notFoundMatches, route } =\n getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error,\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null,\n };\n }\n\n let result = await queryImpl(request, location, matches, requestContext);\n if (isResponse(result)) {\n return result;\n }\n\n // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n return { location, basename, ...result };\n }\n\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n */\n async function queryRoute(\n request: Request,\n {\n routeId,\n requestContext,\n }: { requestContext?: unknown; routeId?: string } = {}\n ): Promise {\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n throw getInternalRouterError(405, { method });\n } else if (!matches) {\n throw getInternalRouterError(404, { pathname: location.pathname });\n }\n\n let match = routeId\n ? matches.find((m) => m.route.id === routeId)\n : getTargetMatch(matches, location);\n\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId,\n });\n } else if (!match) {\n // This should never hit I don't think?\n throw getInternalRouterError(404, { pathname: location.pathname });\n }\n\n let result = await queryImpl(\n request,\n location,\n matches,\n requestContext,\n match\n );\n if (isResponse(result)) {\n return result;\n }\n\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n }\n\n // Pick off the right state value to return\n if (result.actionData) {\n return Object.values(result.actionData)[0];\n }\n\n if (result.loaderData) {\n let data = Object.values(result.loaderData)[0];\n if (result.activeDeferreds?.[match.route.id]) {\n data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n }\n return data;\n }\n\n return undefined;\n }\n\n async function queryImpl(\n request: Request,\n location: Location,\n matches: AgnosticDataRouteMatch[],\n requestContext: unknown,\n routeMatch?: AgnosticDataRouteMatch\n ): Promise | Response> {\n invariant(\n request.signal,\n \"query()/queryRoute() requests must contain an AbortController signal\"\n );\n\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(\n request,\n matches,\n routeMatch || getTargetMatch(matches, location),\n requestContext,\n routeMatch != null\n );\n return result;\n }\n\n let result = await loadRouteData(\n request,\n matches,\n requestContext,\n routeMatch\n );\n return isResponse(result)\n ? result\n : {\n ...result,\n actionData: null,\n actionHeaders: {},\n };\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error) {\n throw e.response;\n }\n return e.response;\n }\n // Redirects are always returned since they don't propagate to catch\n // boundaries\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n\n async function submit(\n request: Request,\n matches: AgnosticDataRouteMatch[],\n actionMatch: AgnosticDataRouteMatch,\n requestContext: unknown,\n isRouteRequest: boolean\n ): Promise | Response> {\n let result: DataResult;\n\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id,\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error,\n };\n } else {\n result = await callLoaderOrAction(\n \"action\",\n request,\n actionMatch,\n matches,\n manifest,\n mapRouteProperties,\n basename,\n { isStaticRequest: true, isRouteRequest, requestContext }\n );\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(\n `${method}() call aborted: ${request.method} ${request.url}`\n );\n }\n }\n\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location,\n },\n });\n }\n\n if (isDeferredResult(result)) {\n let error = getInternalRouterError(400, { type: \"defer-action\" });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error,\n };\n }\n\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: { [actionMatch.route.id]: result.data },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null,\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(\n request,\n matches,\n requestContext,\n undefined,\n {\n [boundaryMatch.route.id]: result.error,\n }\n );\n\n // action status codes take precedence over loader status codes\n return {\n ...context,\n statusCode: isRouteErrorResponse(result.error)\n ? result.error.status\n : 500,\n actionData: null,\n actionHeaders: {\n ...(result.headers ? { [actionMatch.route.id]: result.headers } : {}),\n },\n };\n }\n\n // Create a GET request for the loaders\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal,\n });\n let context = await loadRouteData(loaderRequest, matches, requestContext);\n\n return {\n ...context,\n // action status codes take precedence over loader status codes\n ...(result.statusCode ? { statusCode: result.statusCode } : {}),\n actionData: {\n [actionMatch.route.id]: result.data,\n },\n actionHeaders: {\n ...(result.headers ? { [actionMatch.route.id]: result.headers } : {}),\n },\n };\n }\n\n async function loadRouteData(\n request: Request,\n matches: AgnosticDataRouteMatch[],\n requestContext: unknown,\n routeMatch?: AgnosticDataRouteMatch,\n pendingActionError?: RouteData\n ): Promise<\n | Omit<\n StaticHandlerContext,\n \"location\" | \"basename\" | \"actionData\" | \"actionHeaders\"\n >\n | Response\n > {\n let isRouteRequest = routeMatch != null;\n\n // Short circuit if we have no loaders to run (queryRoute())\n if (\n isRouteRequest &&\n !routeMatch?.route.loader &&\n !routeMatch?.route.lazy\n ) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch?.route.id,\n });\n }\n\n let requestMatches = routeMatch\n ? [routeMatch]\n : getLoaderMatchesUntilBoundary(\n matches,\n Object.keys(pendingActionError || {})[0]\n );\n let matchesToLoad = requestMatches.filter(\n (m) => m.route.loader || m.route.lazy\n );\n\n // Short circuit if we have no loaders to run (query())\n if (matchesToLoad.length === 0) {\n return {\n matches,\n // Add a null for all matched routes for proper revalidation on the client\n loaderData: matches.reduce(\n (acc, m) => Object.assign(acc, { [m.route.id]: null }),\n {}\n ),\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {},\n activeDeferreds: null,\n };\n }\n\n let results = await Promise.all([\n ...matchesToLoad.map((match) =>\n callLoaderOrAction(\n \"loader\",\n request,\n match,\n matches,\n manifest,\n mapRouteProperties,\n basename,\n { isStaticRequest: true, isRouteRequest, requestContext }\n )\n ),\n ]);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(\n `${method}() call aborted: ${request.method} ${request.url}`\n );\n }\n\n // Process and commit output from loaders\n let activeDeferreds = new Map();\n let context = processRouteLoaderData(\n matches,\n matchesToLoad,\n results,\n pendingActionError,\n activeDeferreds\n );\n\n // Add a null for any non-loader matches for proper revalidation on the client\n let executedLoaders = new Set(\n matchesToLoad.map((match) => match.route.id)\n );\n matches.forEach((match) => {\n if (!executedLoaders.has(match.route.id)) {\n context.loaderData[match.route.id] = null;\n }\n });\n\n return {\n ...context,\n matches,\n activeDeferreds:\n activeDeferreds.size > 0\n ? Object.fromEntries(activeDeferreds.entries())\n : null,\n };\n }\n\n return {\n dataRoutes,\n query,\n queryRoute,\n };\n}\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nexport function getStaticContextFromError(\n routes: AgnosticDataRouteObject[],\n context: StaticHandlerContext,\n error: any\n) {\n let newContext: StaticHandlerContext = {\n ...context,\n statusCode: 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error,\n },\n };\n return newContext;\n}\n\nfunction isSubmissionNavigation(\n opts: RouterNavigateOptions\n): opts is SubmissionNavigateOptions {\n return (\n opts != null &&\n ((\"formData\" in opts && opts.formData != null) ||\n (\"body\" in opts && opts.body !== undefined))\n );\n}\n\nfunction normalizeTo(\n location: Path,\n matches: AgnosticDataRouteMatch[],\n basename: string,\n prependBasename: boolean,\n to: To | null,\n fromRouteId?: string,\n relative?: RelativeRoutingType\n) {\n let contextualMatches: AgnosticDataRouteMatch[];\n let activeRouteMatch: AgnosticDataRouteMatch | undefined;\n if (fromRouteId != null && relative !== \"path\") {\n // Grab matches up to the calling route so our route-relative logic is\n // relative to the correct source route. When using relative:path,\n // fromRouteId is ignored since that is always relative to the current\n // location path\n contextualMatches = [];\n for (let match of matches) {\n contextualMatches.push(match);\n if (match.route.id === fromRouteId) {\n activeRouteMatch = match;\n break;\n }\n }\n } else {\n contextualMatches = matches;\n activeRouteMatch = matches[matches.length - 1];\n }\n\n // Resolve the relative path\n let path = resolveTo(\n to ? to : \".\",\n getPathContributingMatches(contextualMatches).map((m) => m.pathnameBase),\n stripBasename(location.pathname, basename) || location.pathname,\n relative === \"path\"\n );\n\n // When `to` is not specified we inherit search/hash from the current\n // location, unlike when to=\".\" and we just inherit the path.\n // See https://github.com/remix-run/remix/issues/927\n if (to == null) {\n path.search = location.search;\n path.hash = location.hash;\n }\n\n // Add an ?index param for matched index routes if we don't already have one\n if (\n (to == null || to === \"\" || to === \".\") &&\n activeRouteMatch &&\n activeRouteMatch.route.index &&\n !hasNakedIndexQuery(path.search)\n ) {\n path.search = path.search\n ? path.search.replace(/^\\?/, \"?index&\")\n : \"?index\";\n }\n\n // If we're operating within a basename, prepend it to the pathname. If\n // this is a root navigation, then just use the raw basename which allows\n // the basename to have full control over the presence of a trailing slash\n // on root actions\n if (prependBasename && basename !== \"/\") {\n path.pathname =\n path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n return createPath(path);\n}\n\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(\n normalizeFormMethod: boolean,\n isFetcher: boolean,\n path: string,\n opts?: RouterNavigateOptions\n): {\n path: string;\n submission?: Submission;\n error?: ErrorResponseImpl;\n} {\n // Return location verbatim on non-submission navigations\n if (!opts || !isSubmissionNavigation(opts)) {\n return { path };\n }\n\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, { method: opts.formMethod }),\n };\n }\n\n let getInvalidBodyError = () => ({\n path,\n error: getInternalRouterError(400, { type: \"invalid-body\" }),\n });\n\n // Create a Submission on non-GET navigations\n let rawFormMethod = opts.formMethod || \"get\";\n let formMethod = normalizeFormMethod\n ? (rawFormMethod.toUpperCase() as V7_FormMethod)\n : (rawFormMethod.toLowerCase() as FormMethod);\n let formAction = stripHashFromPath(path);\n\n if (opts.body !== undefined) {\n if (opts.formEncType === \"text/plain\") {\n // text only support POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n\n let text =\n typeof opts.body === \"string\"\n ? opts.body\n : opts.body instanceof FormData ||\n opts.body instanceof URLSearchParams\n ? // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n Array.from(opts.body.entries()).reduce(\n (acc, [name, value]) => `${acc}${name}=${value}\\n`,\n \"\"\n )\n : String(opts.body);\n\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json: undefined,\n text,\n },\n };\n } else if (opts.formEncType === \"application/json\") {\n // json only supports POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n\n try {\n let json =\n typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json,\n text: undefined,\n },\n };\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n }\n\n invariant(\n typeof FormData === \"function\",\n \"FormData is not available in this environment\"\n );\n\n let searchParams: URLSearchParams;\n let formData: FormData;\n\n if (opts.formData) {\n searchParams = convertFormDataToSearchParams(opts.formData);\n formData = opts.formData;\n } else if (opts.body instanceof FormData) {\n searchParams = convertFormDataToSearchParams(opts.body);\n formData = opts.body;\n } else if (opts.body instanceof URLSearchParams) {\n searchParams = opts.body;\n formData = convertSearchParamsToFormData(searchParams);\n } else if (opts.body == null) {\n searchParams = new URLSearchParams();\n formData = new FormData();\n } else {\n try {\n searchParams = new URLSearchParams(opts.body);\n formData = convertSearchParamsToFormData(searchParams);\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n\n let submission: Submission = {\n formMethod,\n formAction,\n formEncType:\n (opts && opts.formEncType) || \"application/x-www-form-urlencoded\",\n formData,\n json: undefined,\n text: undefined,\n };\n\n if (isMutationMethod(submission.formMethod)) {\n return { path, submission };\n }\n\n // Flatten submission onto URLSearchParams for GET submissions\n let parsedPath = parsePath(path);\n // On GET navigation submissions we can drop the ?index param from the\n // resulting location since all loaders will run. But fetcher GET submissions\n // only run a single loader so we need to preserve any incoming ?index params\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n parsedPath.search = `?${searchParams}`;\n\n return { path: createPath(parsedPath), submission };\n}\n\n// Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\nfunction getLoaderMatchesUntilBoundary(\n matches: AgnosticDataRouteMatch[],\n boundaryId?: string\n) {\n let boundaryMatches = matches;\n if (boundaryId) {\n let index = matches.findIndex((m) => m.route.id === boundaryId);\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n return boundaryMatches;\n}\n\nfunction getMatchesToLoad(\n history: History,\n state: RouterState,\n matches: AgnosticDataRouteMatch[],\n submission: Submission | undefined,\n location: Location,\n isRevalidationRequired: boolean,\n cancelledDeferredRoutes: string[],\n cancelledFetcherLoads: string[],\n fetchLoadMatches: Map,\n fetchRedirectIds: Set,\n routesToUse: AgnosticDataRouteObject[],\n basename: string | undefined,\n pendingActionData?: RouteData,\n pendingError?: RouteData\n): [AgnosticDataRouteMatch[], RevalidatingFetcher[]] {\n let actionResult = pendingError\n ? Object.values(pendingError)[0]\n : pendingActionData\n ? Object.values(pendingActionData)[0]\n : undefined;\n\n let currentUrl = history.createURL(state.location);\n let nextUrl = history.createURL(location);\n\n // Pick navigation matches that are net-new or qualify for revalidation\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n\n let navigationMatches = boundaryMatches.filter((match, index) => {\n if (match.route.lazy) {\n // We haven't loaded this route yet so we don't know if it's got a loader!\n return true;\n }\n if (match.route.loader == null) {\n return false;\n }\n\n // Always call the loader on new route instances and pending defer cancellations\n if (\n isNewLoader(state.loaderData, state.matches[index], match) ||\n cancelledDeferredRoutes.some((id) => id === match.route.id)\n ) {\n return true;\n }\n\n // This is the default implementation for when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n let currentRouteMatch = state.matches[index];\n let nextRouteMatch = match;\n\n return shouldRevalidateLoader(match, {\n currentUrl,\n currentParams: currentRouteMatch.params,\n nextUrl,\n nextParams: nextRouteMatch.params,\n ...submission,\n actionResult,\n defaultShouldRevalidate:\n // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n isRevalidationRequired ||\n // Clicked the same link, resubmitted a GET form\n currentUrl.pathname + currentUrl.search ===\n nextUrl.pathname + nextUrl.search ||\n // Search params affect all loaders\n currentUrl.search !== nextUrl.search ||\n isNewRouteInstance(currentRouteMatch, nextRouteMatch),\n });\n });\n\n // Pick fetcher.loads that need to be revalidated\n let revalidatingFetchers: RevalidatingFetcher[] = [];\n fetchLoadMatches.forEach((f, key) => {\n // Don't revalidate if fetcher won't be present in the subsequent render\n if (!matches.some((m) => m.route.id === f.routeId)) {\n return;\n }\n\n let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n\n // If the fetcher path no longer matches, push it in with null matches so\n // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is\n // currently only a use-case for Remix HMR where the route tree can change\n // at runtime and remove a route previously loaded via a fetcher\n if (!fetcherMatches) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: null,\n match: null,\n controller: null,\n });\n return;\n }\n\n // Revalidating fetchers are decoupled from the route matches since they\n // load from a static href. They revalidate based on explicit revalidation\n // (submission, useRevalidator, or X-Remix-Revalidate)\n let fetcher = state.fetchers.get(key);\n let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n\n let shouldRevalidate = false;\n if (fetchRedirectIds.has(key)) {\n // Never trigger a revalidation of an actively redirecting fetcher\n shouldRevalidate = false;\n } else if (cancelledFetcherLoads.includes(key)) {\n // Always revalidate if the fetcher was cancelled\n shouldRevalidate = true;\n } else if (\n fetcher &&\n fetcher.state !== \"idle\" &&\n fetcher.data === undefined\n ) {\n // If the fetcher hasn't ever completed loading yet, then this isn't a\n // revalidation, it would just be a brand new load if an explicit\n // revalidation is required\n shouldRevalidate = isRevalidationRequired;\n } else {\n // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n // to explicit revalidations only\n shouldRevalidate = shouldRevalidateLoader(fetcherMatch, {\n currentUrl,\n currentParams: state.matches[state.matches.length - 1].params,\n nextUrl,\n nextParams: matches[matches.length - 1].params,\n ...submission,\n actionResult,\n defaultShouldRevalidate: isRevalidationRequired,\n });\n }\n\n if (shouldRevalidate) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: fetcherMatches,\n match: fetcherMatch,\n controller: new AbortController(),\n });\n }\n });\n\n return [navigationMatches, revalidatingFetchers];\n}\n\nfunction isNewLoader(\n currentLoaderData: RouteData,\n currentMatch: AgnosticDataRouteMatch,\n match: AgnosticDataRouteMatch\n) {\n let isNew =\n // [a] -> [a, b]\n !currentMatch ||\n // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id;\n\n // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n let isMissingData = currentLoaderData[match.route.id] === undefined;\n\n // Always load if this is a net-new route or we don't yet have data\n return isNew || isMissingData;\n}\n\nfunction isNewRouteInstance(\n currentMatch: AgnosticDataRouteMatch,\n match: AgnosticDataRouteMatch\n) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n (currentPath != null &&\n currentPath.endsWith(\"*\") &&\n currentMatch.params[\"*\"] !== match.params[\"*\"])\n );\n}\n\nfunction shouldRevalidateLoader(\n loaderMatch: AgnosticDataRouteMatch,\n arg: ShouldRevalidateFunctionArgs\n) {\n if (loaderMatch.route.shouldRevalidate) {\n let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n\n return arg.defaultShouldRevalidate;\n}\n\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(\n route: AgnosticDataRouteObject,\n mapRouteProperties: MapRoutePropertiesFunction,\n manifest: RouteManifest\n) {\n if (!route.lazy) {\n return;\n }\n\n let lazyRoute = await route.lazy();\n\n // If the lazy route function was executed and removed by another parallel\n // call then we can return - first lazy() to finish wins because the return\n // value of lazy is expected to be static\n if (!route.lazy) {\n return;\n }\n\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, \"No route found in manifest\");\n\n // Update the route in place. This should be safe because there's no way\n // we could yet be sitting on this route as we can't get there without\n // resolving lazy() first.\n //\n // This is different than the HMR \"update\" use-case where we may actively be\n // on the route being updated. The main concern boils down to \"does this\n // mutation affect any ongoing navigations or any current state.matches\n // values?\". If not, it should be safe to update in place.\n let routeUpdates: Record = {};\n for (let lazyRouteProperty in lazyRoute) {\n let staticRouteValue =\n routeToUpdate[lazyRouteProperty as keyof typeof routeToUpdate];\n\n let isPropertyStaticallyDefined =\n staticRouteValue !== undefined &&\n // This property isn't static since it should always be updated based\n // on the route updates\n lazyRouteProperty !== \"hasErrorBoundary\";\n\n warning(\n !isPropertyStaticallyDefined,\n `Route \"${routeToUpdate.id}\" has a static property \"${lazyRouteProperty}\" ` +\n `defined but its lazy function is also returning a value for this property. ` +\n `The lazy route property \"${lazyRouteProperty}\" will be ignored.`\n );\n\n if (\n !isPropertyStaticallyDefined &&\n !immutableRouteKeys.has(lazyRouteProperty as ImmutableRouteKey)\n ) {\n routeUpdates[lazyRouteProperty] =\n lazyRoute[lazyRouteProperty as keyof typeof lazyRoute];\n }\n }\n\n // Mutate the route with the provided updates. Do this first so we pass\n // the updated version to mapRouteProperties\n Object.assign(routeToUpdate, routeUpdates);\n\n // Mutate the `hasErrorBoundary` property on the route based on the route\n // updates and remove the `lazy` function so we don't resolve the lazy\n // route again.\n Object.assign(routeToUpdate, {\n // To keep things framework agnostic, we use the provided\n // `mapRouteProperties` (or wrapped `detectErrorBoundary`) function to\n // set the framework-aware properties (`element`/`hasErrorBoundary`) since\n // the logic will differ between frameworks.\n ...mapRouteProperties(routeToUpdate),\n lazy: undefined,\n });\n}\n\nasync function callLoaderOrAction(\n type: \"loader\" | \"action\",\n request: Request,\n match: AgnosticDataRouteMatch,\n matches: AgnosticDataRouteMatch[],\n manifest: RouteManifest,\n mapRouteProperties: MapRoutePropertiesFunction,\n basename: string,\n opts: {\n isStaticRequest?: boolean;\n isRouteRequest?: boolean;\n requestContext?: unknown;\n } = {}\n): Promise {\n let resultType;\n let result;\n let onReject: (() => void) | undefined;\n\n let runHandler = (handler: ActionFunction | LoaderFunction) => {\n // Setup a promise we can race against so that abort signals short circuit\n let reject: () => void;\n let abortPromise = new Promise((_, r) => (reject = r));\n onReject = () => reject();\n request.signal.addEventListener(\"abort\", onReject);\n return Promise.race([\n handler({\n request,\n params: match.params,\n context: opts.requestContext,\n }),\n abortPromise,\n ]);\n };\n\n try {\n let handler = match.route[type];\n\n if (match.route.lazy) {\n if (handler) {\n // Run statically defined handler in parallel with lazy()\n let handlerError;\n let values = await Promise.all([\n // If the handler throws, don't let it immediately bubble out,\n // since we need to let the lazy() execution finish so we know if this\n // route has a boundary that can handle the error\n runHandler(handler).catch((e) => {\n handlerError = e;\n }),\n loadLazyRouteModule(match.route, mapRouteProperties, manifest),\n ]);\n if (handlerError) {\n throw handlerError;\n }\n result = values[0];\n } else {\n // Load lazy route module, then run any returned handler\n await loadLazyRouteModule(match.route, mapRouteProperties, manifest);\n\n handler = match.route[type];\n if (handler) {\n // Handler still run even if we got interrupted to maintain consistency\n // with un-abortable behavior of handler execution on non-lazy or\n // previously-lazy-loaded routes\n result = await runHandler(handler);\n } else if (type === \"action\") {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(405, {\n method: request.method,\n pathname,\n routeId: match.route.id,\n });\n } else {\n // lazy() route has no loader to run. Short circuit here so we don't\n // hit the invariant below that errors on returning undefined.\n return { type: ResultType.data, data: undefined };\n }\n }\n } else if (!handler) {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(404, {\n pathname,\n });\n } else {\n result = await runHandler(handler);\n }\n\n invariant(\n result !== undefined,\n `You defined ${type === \"action\" ? \"an action\" : \"a loader\"} for route ` +\n `\"${match.route.id}\" but didn't return anything from your \\`${type}\\` ` +\n `function. Please return a value or \\`null\\`.`\n );\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n if (onReject) {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n }\n\n if (isResponse(result)) {\n let status = result.status;\n\n // Process redirects\n if (redirectStatusCodes.has(status)) {\n let location = result.headers.get(\"Location\");\n invariant(\n location,\n \"Redirects returned/thrown from loaders/actions must have a Location header\"\n );\n\n // Support relative routing in internal redirects\n if (!ABSOLUTE_URL_REGEX.test(location)) {\n location = normalizeTo(\n new URL(request.url),\n matches.slice(0, matches.indexOf(match) + 1),\n basename,\n true,\n location\n );\n } else if (!opts.isStaticRequest) {\n // Strip off the protocol+origin for same-origin + same-basename absolute\n // redirects. If this is a static request, we can let it go back to the\n // browser as-is\n let currentUrl = new URL(request.url);\n let url = location.startsWith(\"//\")\n ? new URL(currentUrl.protocol + location)\n : new URL(location);\n let isSameBasename = stripBasename(url.pathname, basename) != null;\n if (url.origin === currentUrl.origin && isSameBasename) {\n location = url.pathname + url.search + url.hash;\n }\n }\n\n // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n if (opts.isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null,\n reloadDocument: result.headers.get(\"X-Remix-Reload-Document\") !== null,\n };\n }\n\n // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n if (opts.isRouteRequest) {\n let queryRouteResponse: QueryRouteResponse = {\n type:\n resultType === ResultType.error ? ResultType.error : ResultType.data,\n response: result,\n };\n throw queryRouteResponse;\n }\n\n let data: any;\n let contentType = result.headers.get(\"Content-Type\");\n // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n data = await result.json();\n } else {\n data = await result.text();\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponseImpl(status, result.statusText, data),\n headers: result.headers,\n };\n }\n\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers,\n };\n }\n\n if (resultType === ResultType.error) {\n return { type: resultType, error: result };\n }\n\n if (isDeferredData(result)) {\n return {\n type: ResultType.deferred,\n deferredData: result,\n statusCode: result.init?.status,\n headers: result.init?.headers && new Headers(result.init.headers),\n };\n }\n\n return { type: ResultType.data, data: result };\n}\n\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(\n history: History,\n location: string | Location,\n signal: AbortSignal,\n submission?: Submission\n): Request {\n let url = history.createURL(stripHashFromPath(location)).toString();\n let init: RequestInit = { signal };\n\n if (submission && isMutationMethod(submission.formMethod)) {\n let { formMethod, formEncType } = submission;\n // Didn't think we needed this but it turns out unlike other methods, patch\n // won't be properly normalized to uppercase and results in a 405 error.\n // See: https://fetch.spec.whatwg.org/#concept-method\n init.method = formMethod.toUpperCase();\n\n if (formEncType === \"application/json\") {\n init.headers = new Headers({ \"Content-Type\": formEncType });\n init.body = JSON.stringify(submission.json);\n } else if (formEncType === \"text/plain\") {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.text;\n } else if (\n formEncType === \"application/x-www-form-urlencoded\" &&\n submission.formData\n ) {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = convertFormDataToSearchParams(submission.formData);\n } else {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.formData;\n }\n }\n\n return new Request(url, init);\n}\n\nfunction convertFormDataToSearchParams(formData: FormData): URLSearchParams {\n let searchParams = new URLSearchParams();\n\n for (let [key, value] of formData.entries()) {\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n searchParams.append(key, typeof value === \"string\" ? value : value.name);\n }\n\n return searchParams;\n}\n\nfunction convertSearchParamsToFormData(\n searchParams: URLSearchParams\n): FormData {\n let formData = new FormData();\n for (let [key, value] of searchParams.entries()) {\n formData.append(key, value);\n }\n return formData;\n}\n\nfunction processRouteLoaderData(\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n results: DataResult[],\n pendingError: RouteData | undefined,\n activeDeferreds: Map\n): {\n loaderData: RouterState[\"loaderData\"];\n errors: RouterState[\"errors\"] | null;\n statusCode: number;\n loaderHeaders: Record;\n} {\n // Fill in loaderData/errors from our loaders\n let loaderData: RouterState[\"loaderData\"] = {};\n let errors: RouterState[\"errors\"] | null = null;\n let statusCode: number | undefined;\n let foundError = false;\n let loaderHeaders: Record = {};\n\n // Process loader results into state.loaderData/state.errors\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(\n !isRedirectResult(result),\n \"Cannot handle redirect results in processLoaderData\"\n );\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error;\n // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n\n errors = errors || {};\n\n // Prefer higher error values if lower errors bubble to the same boundary\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n }\n\n // Clear our any prior loaderData for the throwing route\n loaderData[id] = undefined;\n\n // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error)\n ? result.error.status\n : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n if (isDeferredResult(result)) {\n activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data;\n } else {\n loaderData[id] = result.data;\n }\n\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (\n result.statusCode != null &&\n result.statusCode !== 200 &&\n !foundError\n ) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n });\n\n // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here. Also clear out any loaderData for the\n // throwing route\n if (pendingError) {\n errors = pendingError;\n loaderData[Object.keys(pendingError)[0]] = undefined;\n }\n\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders,\n };\n}\n\nfunction processLoaderData(\n state: RouterState,\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n results: DataResult[],\n pendingError: RouteData | undefined,\n revalidatingFetchers: RevalidatingFetcher[],\n fetcherResults: DataResult[],\n activeDeferreds: Map\n): {\n loaderData: RouterState[\"loaderData\"];\n errors?: RouterState[\"errors\"];\n} {\n let { loaderData, errors } = processRouteLoaderData(\n matches,\n matchesToLoad,\n results,\n pendingError,\n activeDeferreds\n );\n\n // Process results from our revalidating fetchers\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let { key, match, controller } = revalidatingFetchers[index];\n invariant(\n fetcherResults !== undefined && fetcherResults[index] !== undefined,\n \"Did not find corresponding fetcher result\"\n );\n let result = fetcherResults[index];\n\n // Process fetcher non-redirect errors\n if (controller && controller.signal.aborted) {\n // Nothing to do for aborted fetchers\n continue;\n } else if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match?.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = {\n ...errors,\n [boundaryMatch.route.id]: result.error,\n };\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n invariant(false, \"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n invariant(false, \"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n return { loaderData, errors };\n}\n\nfunction mergeLoaderData(\n loaderData: RouteData,\n newLoaderData: RouteData,\n matches: AgnosticDataRouteMatch[],\n errors: RouteData | null | undefined\n): RouteData {\n let mergedLoaderData = { ...newLoaderData };\n for (let match of matches) {\n let id = match.route.id;\n if (newLoaderData.hasOwnProperty(id)) {\n if (newLoaderData[id] !== undefined) {\n mergedLoaderData[id] = newLoaderData[id];\n } else {\n // No-op - this is so we ignore existing data if we have a key in the\n // incoming object with an undefined value, which is how we unset a prior\n // loaderData if we encounter a loader error\n }\n } else if (loaderData[id] !== undefined && match.route.loader) {\n // Preserve existing keys not included in newLoaderData and where a loader\n // wasn't removed by HMR\n mergedLoaderData[id] = loaderData[id];\n }\n\n if (errors && errors.hasOwnProperty(id)) {\n // Don't keep any loader data below the boundary\n break;\n }\n }\n return mergedLoaderData;\n}\n\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(\n matches: AgnosticDataRouteMatch[],\n routeId?: string\n): AgnosticDataRouteMatch {\n let eligibleMatches = routeId\n ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1)\n : [...matches];\n return (\n eligibleMatches.reverse().find((m) => m.route.hasErrorBoundary === true) ||\n matches[0]\n );\n}\n\nfunction getShortCircuitMatches(routes: AgnosticDataRouteObject[]): {\n matches: AgnosticDataRouteMatch[];\n route: AgnosticDataRouteObject;\n} {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.find((r) => r.index || !r.path || r.path === \"/\") || {\n id: `__shim-error-route__`,\n };\n\n return {\n matches: [\n {\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route,\n },\n ],\n route,\n };\n}\n\nfunction getInternalRouterError(\n status: number,\n {\n pathname,\n routeId,\n method,\n type,\n }: {\n pathname?: string;\n routeId?: string;\n method?: string;\n type?: \"defer-action\" | \"invalid-body\";\n } = {}\n) {\n let statusText = \"Unknown Server Error\";\n let errorMessage = \"Unknown @remix-run/router error\";\n\n if (status === 400) {\n statusText = \"Bad Request\";\n if (method && pathname && routeId) {\n errorMessage =\n `You made a ${method} request to \"${pathname}\" but ` +\n `did not provide a \\`loader\\` for route \"${routeId}\", ` +\n `so there is no way to handle the request.`;\n } else if (type === \"defer-action\") {\n errorMessage = \"defer() is not supported in actions\";\n } else if (type === \"invalid-body\") {\n errorMessage = \"Unable to encode submission body\";\n }\n } else if (status === 403) {\n statusText = \"Forbidden\";\n errorMessage = `Route \"${routeId}\" does not match URL \"${pathname}\"`;\n } else if (status === 404) {\n statusText = \"Not Found\";\n errorMessage = `No route matches URL \"${pathname}\"`;\n } else if (status === 405) {\n statusText = \"Method Not Allowed\";\n if (method && pathname && routeId) {\n errorMessage =\n `You made a ${method.toUpperCase()} request to \"${pathname}\" but ` +\n `did not provide an \\`action\\` for route \"${routeId}\", ` +\n `so there is no way to handle the request.`;\n } else if (method) {\n errorMessage = `Invalid request method \"${method.toUpperCase()}\"`;\n }\n }\n\n return new ErrorResponseImpl(\n status || 500,\n statusText,\n new Error(errorMessage),\n true\n );\n}\n\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(\n results: DataResult[]\n): { result: RedirectResult; idx: number } | undefined {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n if (isRedirectResult(result)) {\n return { result, idx: i };\n }\n }\n}\n\nfunction stripHashFromPath(path: To) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath({ ...parsedPath, hash: \"\" });\n}\n\nfunction isHashChangeOnly(a: Location, b: Location): boolean {\n if (a.pathname !== b.pathname || a.search !== b.search) {\n return false;\n }\n\n if (a.hash === \"\") {\n // /page -> /page#hash\n return b.hash !== \"\";\n } else if (a.hash === b.hash) {\n // /page#hash -> /page#hash\n return true;\n } else if (b.hash !== \"\") {\n // /page#hash -> /page#other\n return true;\n }\n\n // If the hash is removed the browser will re-perform a request to the server\n // /page#hash -> /page\n return false;\n}\n\nfunction isDeferredResult(result: DataResult): result is DeferredResult {\n return result.type === ResultType.deferred;\n}\n\nfunction isErrorResult(result: DataResult): result is ErrorResult {\n return result.type === ResultType.error;\n}\n\nfunction isRedirectResult(result?: DataResult): result is RedirectResult {\n return (result && result.type) === ResultType.redirect;\n}\n\nexport function isDeferredData(value: any): value is DeferredData {\n let deferred: DeferredData = value;\n return (\n deferred &&\n typeof deferred === \"object\" &&\n typeof deferred.data === \"object\" &&\n typeof deferred.subscribe === \"function\" &&\n typeof deferred.cancel === \"function\" &&\n typeof deferred.resolveData === \"function\"\n );\n}\n\nfunction isResponse(value: any): value is Response {\n return (\n value != null &&\n typeof value.status === \"number\" &&\n typeof value.statusText === \"string\" &&\n typeof value.headers === \"object\" &&\n typeof value.body !== \"undefined\"\n );\n}\n\nfunction isRedirectResponse(result: any): result is Response {\n if (!isResponse(result)) {\n return false;\n }\n\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\n\nfunction isQueryRouteResponse(obj: any): obj is QueryRouteResponse {\n return (\n obj &&\n isResponse(obj.response) &&\n (obj.type === ResultType.data || obj.type === ResultType.error)\n );\n}\n\nfunction isValidMethod(method: string): method is FormMethod | V7_FormMethod {\n return validRequestMethods.has(method.toLowerCase() as FormMethod);\n}\n\nfunction isMutationMethod(\n method: string\n): method is MutationFormMethod | V7_MutationFormMethod {\n return validMutationMethods.has(method.toLowerCase() as MutationFormMethod);\n}\n\nasync function resolveDeferredResults(\n currentMatches: AgnosticDataRouteMatch[],\n matchesToLoad: (AgnosticDataRouteMatch | null)[],\n results: DataResult[],\n signals: (AbortSignal | null)[],\n isFetcher: boolean,\n currentLoaderData?: RouteData\n) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n // If we don't have a match, then we can have a deferred result to do\n // anything with. This is for revalidating fetchers where the route was\n // removed during HMR\n if (!match) {\n continue;\n }\n\n let currentMatch = currentMatches.find(\n (m) => m.route.id === match!.route.id\n );\n let isRevalidatingLoader =\n currentMatch != null &&\n !isNewRouteInstance(currentMatch, match) &&\n (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n let signal = signals[index];\n invariant(\n signal,\n \"Expected an AbortSignal for revalidating fetcher deferred result\"\n );\n await resolveDeferredData(result, signal, isFetcher).then((result) => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\n\nasync function resolveDeferredData(\n result: DeferredResult,\n signal: AbortSignal,\n unwrap = false\n): Promise {\n let aborted = await result.deferredData.resolveData(signal);\n if (aborted) {\n return;\n }\n\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData,\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e,\n };\n }\n }\n\n return {\n type: ResultType.data,\n data: result.deferredData.data,\n };\n}\n\nfunction hasNakedIndexQuery(search: string): boolean {\n return new URLSearchParams(search).getAll(\"index\").some((v) => v === \"\");\n}\n\nfunction getTargetMatch(\n matches: AgnosticDataRouteMatch[],\n location: Location | string\n) {\n let search =\n typeof location === \"string\" ? parsePath(location).search : location.search;\n if (\n matches[matches.length - 1].route.index &&\n hasNakedIndexQuery(search || \"\")\n ) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n }\n // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\n\nfunction getSubmissionFromNavigation(\n navigation: Navigation\n): Submission | undefined {\n let { formMethod, formAction, formEncType, text, formData, json } =\n navigation;\n if (!formMethod || !formAction || !formEncType) {\n return;\n }\n\n if (text != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json: undefined,\n text,\n };\n } else if (formData != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData,\n json: undefined,\n text: undefined,\n };\n } else if (json !== undefined) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json,\n text: undefined,\n };\n }\n}\n\nfunction getLoadingNavigation(\n location: Location,\n submission?: Submission\n): NavigationStates[\"Loading\"] {\n if (submission) {\n let navigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n };\n return navigation;\n } else {\n let navigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n };\n return navigation;\n }\n}\n\nfunction getSubmittingNavigation(\n location: Location,\n submission: Submission\n): NavigationStates[\"Submitting\"] {\n let navigation: NavigationStates[\"Submitting\"] = {\n state: \"submitting\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n };\n return navigation;\n}\n\nfunction getLoadingFetcher(\n submission?: Submission,\n data?: Fetcher[\"data\"]\n): FetcherStates[\"Loading\"] {\n if (submission) {\n let fetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data,\n };\n return fetcher;\n } else {\n let fetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data,\n };\n return fetcher;\n }\n}\n\nfunction getSubmittingFetcher(\n submission: Submission,\n existingFetcher?: Fetcher\n): FetcherStates[\"Submitting\"] {\n let fetcher: FetcherStates[\"Submitting\"] = {\n state: \"submitting\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: existingFetcher ? existingFetcher.data : undefined,\n };\n return fetcher;\n}\n\nfunction getDoneFetcher(data: Fetcher[\"data\"]): FetcherStates[\"Idle\"] {\n let fetcher: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data,\n };\n return fetcher;\n}\n//#endregion\n","export var KonturColors = {\r\n red0Logo: '#fe4c4c',\r\n red10: '#ffebeb',\r\n red20: '#ffcbcb',\r\n red30: '#ffabab',\r\n red40: '#fe8c8c',\r\n redLightBasic50: '#fe6c6c',\r\n redBasic60: '#fe4c4c',\r\n red70: '#ed3f3f',\r\n red80: '#dd3333',\r\n red90: '#cc2626',\r\n red100: '#bb1919',\r\n red110: '#ab0d0d',\r\n redPromoAccent: '#6c1d45',\r\n orange0Logo: '#fc7630',\r\n orange10: '#ffe0c3',\r\n orange20: '#ffd1a0',\r\n orange30: '#ffc17d',\r\n orange40: '#ffb259',\r\n orangeLightBasic50: '#ffa236',\r\n orangeBasic60: '#ff8227',\r\n orange70: '#ea7324',\r\n orange80: '#d46421',\r\n orange90: '#bf561e',\r\n orange100: '#a9471b',\r\n orange110: '#943817',\r\n orangePromoAccent: '#661429',\r\n yellow0Logo: '#feca42',\r\n yellow10: '#ffeec2',\r\n yellow20: '#fde1a1',\r\n yellow30: '#fdd481',\r\n yellow40: '#fcc660',\r\n yellowLightBasic50: '#fcb73e',\r\n yellowBasic60: '#fda70c',\r\n yellow70: '#f69912',\r\n yellow80: '#ef8b17',\r\n yellow90: '#e77e1b',\r\n yellow100: '#de711e',\r\n yellow110: '#d46421',\r\n green0Logo: '#26ad50',\r\n green10: '#c7f9cc',\r\n green20: '#a7eeb3',\r\n green30: '#87e39a',\r\n green40: '#67d881',\r\n greenLightBasic50: '#46cd68',\r\n greenBasic60: '#26ad50',\r\n green70: '#23a14a',\r\n green80: '#209644',\r\n green90: '#1c8a3f',\r\n green100: '#197f39',\r\n green110: '#167333',\r\n greenGreen: '#144942',\r\n greenMint0Logo: '#00bea2',\r\n greenMint10: '#c6f5ec',\r\n greenMint20: '#a8eee2',\r\n greenMint30: '#8be7d8',\r\n greenMint40: '#6ddfcd',\r\n greenMintLightBasic50: '#4fd8c3',\r\n greenMintBasic60: '#00c5a8',\r\n greenMint70: '#00b59a',\r\n greenMint80: '#00a58d',\r\n greenMint90: '#00957f',\r\n greenMint100: '#008571',\r\n greenMint110: '#007564',\r\n greenMintPromoAccent: '#013f54',\r\n blue0Logo: '#2291ff',\r\n blue10: '#cdedff',\r\n blue20: '#aeddff',\r\n blue30: '#8fcdff',\r\n blue40: '#70bdff',\r\n blueLightBasic50: '#51adff',\r\n blueBasic60: '#2291ff',\r\n blue70: '#1f87ef',\r\n blue80: '#1c7edf',\r\n blue90: '#1874cf',\r\n blue100: '#156abe',\r\n blue110: '#1261ae',\r\n bluePromoAccent: '#153177',\r\n blueDark0Logo: '#366af3',\r\n blueDark10: '#dde6ff',\r\n blueDark20: '#becfff',\r\n blueDark30: '#9fb8ff',\r\n blueDark40: '#80a1ff',\r\n blueDarkLightBasic50: '#618aff',\r\n blueDarkBasic60: '#366af3',\r\n blueDark70: '#3365e8',\r\n blueDark80: '#3060dc',\r\n blueDark90: '#2e5ad1',\r\n blueDark100: '#2b55c5',\r\n blueDark110: '#2850ba',\r\n blueDarkPromoAccent: '#272567',\r\n purple0Logo: '#b750d1',\r\n purple10: '#f7d7ff',\r\n purple20: '#eabdf6',\r\n purple30: '#dea3ec',\r\n purple40: '#d189e3',\r\n purpleLightBasic50: '#c56fda',\r\n purpleBasic60: '#b750d1',\r\n purple70: '#aa49c3',\r\n purple80: '#9e43b5',\r\n purple90: '#913ca6',\r\n purple100: '#843698',\r\n purple110: '#782f8a',\r\n purplePromoAccent: '#452a78',\r\n mainLinkTextBlue90: '#1874cf',\r\n mainLinkShapeBlue60: '#2291ff',\r\n mainLinkBackgroundBlue10: '#cdedff',\r\n mainSuccessTextGreen90: '#1c8a3f',\r\n mainSuccessShapeGreen60: '#26ad50',\r\n mainSuccessBackgroundGreen10: '#c7f9cc',\r\n mainWarningTextYellow80: '#ef8b17',\r\n mainWarningShapeYellow50: '#fcb73e',\r\n mainWarningBackgroundYellow10: '#ffeec2',\r\n mainErrorTextRed90: '#cc2626',\r\n mainErrorShapeRed60: '#fe4c4c',\r\n mainErrorBackgroundRed10: '#ffebeb',\r\n grayscaleText: '#222222',\r\n grayscaleSecondaryText: '#757575',\r\n grayscaleDisabledText: '#adadad',\r\n grayscaleDarkBackground: '#d6d6d6',\r\n grayscaleBackground: '#e6e6e6',\r\n grayscaleLightBackground: '#f0f0f0',\r\n grayscale87Text: 'rgba(0, 0, 0, 0.87)',\r\n grayscale54SecondaryText: 'rgba(0, 0, 0, 0.54)',\r\n grayscale32DisabledText: 'rgba(0, 0, 0, 0.32)',\r\n grayscale16DarkBackground: 'rgba(0, 0, 0, 0.16)',\r\n grayscale10Background: 'rgba(0, 0, 0, 0.1)',\r\n grayscale6LightBackground: 'rgba(0, 0, 0, 0.06)',\r\n grayscale87TextWhite: 'rgba(255, 255, 255, 0.87)',\r\n grayscale54SecondaryWhite: 'rgba(255, 255, 255, 0.54)',\r\n grayscale32DisabledWhite: 'rgba(255, 255, 255, 0.32)',\r\n grayscale16White: 'rgba(255, 255, 255, 0.16)',\r\n grayscale10White: 'rgba(255, 255, 255, 0.1)',\r\n grayscale6White: 'rgba(255, 255, 255, 0.06)',\r\n grayscaleBlack000: '#000000',\r\n grayscaleWhiteFFF: '#ffffff',\r\n primaryDefault: '#3d3d3d',\r\n primaryHover: '#292929',\r\n primaryPressed: '#141414',\r\n linkStatesTextHoverBlue100: '#156abe',\r\n linkStatesTextPressedBlue110: '#1260ae',\r\n linkStatesShapeHoverBlue70: '#1f87ef',\r\n linkStatesShapePressedBlue80: '#1c7edf',\r\n successStatesTextHoverGreen100: '#197f39',\r\n successStatesTextPressedGreen110: '#167333',\r\n successStatesShapeHoverGreen70: '#23a14a',\r\n successStatesShapePressedGreen80: '#209644',\r\n warningStatesTextHoverYellow90: '#e77e1b',\r\n warningStatesTextPressedYellow100: '#de711e',\r\n warningStatesShapeHoverYellow60: '#fda70c',\r\n warningStatesShapePressedYellow70: '#f69912',\r\n errorStatesTextHoverRed100: '#bb1919',\r\n errorStatesTextPressedRed110: '#ab0d0d',\r\n errorStatesShapeHoverRed70: '#ed3f3f',\r\n errorStatesShapePressedRed80: '#dd3333',\r\n shade16Black: 'rgba(0, 0, 0, 0.16)',\r\n shade80White: 'rgba(255, 255, 255, 0.8)',\r\n elementsExceptionsHint: 'rgba(0, 0, 0, 0.76)',\r\n elementsExceptionsToastRed: 'rgba(210, 15, 0, 0.76)',\r\n};\r\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isInstanceOf = exports.isBrowser = exports.setWindow = exports.globalObject = void 0;\nexports.globalObject = (typeof window === 'object' && window) ||\n (typeof globalThis === 'object' && globalThis) ||\n (typeof global === 'object' && global) ||\n Function('return this')();\nvar setWindow = function (win) { return (exports.globalObject = win); };\nexports.setWindow = setWindow;\nvar isBrowser = function (obj) {\n return typeof window !== 'undefined' && obj === exports.globalObject;\n};\nexports.isBrowser = isBrowser;\nfunction isInstanceOf(instance, constructor) {\n return typeof constructor === 'function' && instance instanceof constructor;\n}\nexports.isInstanceOf = isInstanceOf;\n__exportStar(require(\"./types\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ArrowALeftIcon20Regular_1 = require(\"./icons/ArrowALeftIcon/ArrowALeftIcon20Regular\");\r\nObject.defineProperty(exports, \"ArrowALeftIcon20Regular\", { enumerable: true, get: function () { return ArrowALeftIcon20Regular_1.ArrowALeftIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ArrowCDownIcon16Regular_1 = require(\"./icons/ArrowCDownIcon/ArrowCDownIcon16Regular\");\r\nObject.defineProperty(exports, \"ArrowCDownIcon16Regular\", { enumerable: true, get: function () { return ArrowCDownIcon16Regular_1.ArrowCDownIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ArrowCLeftIcon16Regular_1 = require(\"./icons/ArrowCLeftIcon/ArrowCLeftIcon16Regular\");\r\nObject.defineProperty(exports, \"ArrowCLeftIcon16Regular\", { enumerable: true, get: function () { return ArrowCLeftIcon16Regular_1.ArrowCLeftIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ArrowCRightIcon16Regular_1 = require(\"./icons/ArrowCRightIcon/ArrowCRightIcon16Regular\");\r\nObject.defineProperty(exports, \"ArrowCRightIcon16Regular\", { enumerable: true, get: function () { return ArrowCRightIcon16Regular_1.ArrowCRightIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ArrowRoundSyncForwardIcon16Light_1 = require(\"./icons/ArrowRoundSyncForwardIcon/ArrowRoundSyncForwardIcon16Light\");\r\nObject.defineProperty(exports, \"ArrowRoundSyncForwardIcon16Light\", { enumerable: true, get: function () { return ArrowRoundSyncForwardIcon16Light_1.ArrowRoundSyncForwardIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ArrowUiCornerOutUpRightIcon16Regular_1 = require(\"./icons/ArrowUiCornerOutUpRightIcon/ArrowUiCornerOutUpRightIcon16Regular\");\r\nObject.defineProperty(exports, \"ArrowUiCornerOutUpRightIcon16Regular\", { enumerable: true, get: function () { return ArrowUiCornerOutUpRightIcon16Regular_1.ArrowUiCornerOutUpRightIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ArrowUiCornerOutUpRightIcon20Regular_1 = require(\"./icons/ArrowUiCornerOutUpRightIcon/ArrowUiCornerOutUpRightIcon20Regular\");\r\nObject.defineProperty(exports, \"ArrowUiCornerOutUpRightIcon20Regular\", { enumerable: true, get: function () { return ArrowUiCornerOutUpRightIcon20Regular_1.ArrowUiCornerOutUpRightIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar AttachLinkIcon20Regular_1 = require(\"./icons/AttachLinkIcon/AttachLinkIcon20Regular\");\r\nObject.defineProperty(exports, \"AttachLinkIcon20Regular\", { enumerable: true, get: function () { return AttachLinkIcon20Regular_1.AttachLinkIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BagBriefcaseIcon24Regular_1 = require(\"./icons/BagBriefcaseIcon/BagBriefcaseIcon24Regular\");\r\nObject.defineProperty(exports, \"BagBriefcaseIcon24Regular\", { enumerable: true, get: function () { return BagBriefcaseIcon24Regular_1.BagBriefcaseIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BlockIcon16Light_1 = require(\"./icons/BlockIcon/BlockIcon16Light\");\r\nObject.defineProperty(exports, \"BlockIcon16Light\", { enumerable: true, get: function () { return BlockIcon16Light_1.BlockIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BlockIcon16Regular_1 = require(\"./icons/BlockIcon/BlockIcon16Regular\");\r\nObject.defineProperty(exports, \"BlockIcon16Regular\", { enumerable: true, get: function () { return BlockIcon16Regular_1.BlockIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BlockIcon20Regular_1 = require(\"./icons/BlockIcon/BlockIcon20Regular\");\r\nObject.defineProperty(exports, \"BlockIcon20Regular\", { enumerable: true, get: function () { return BlockIcon20Regular_1.BlockIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BlockIcon24Regular_1 = require(\"./icons/BlockIcon/BlockIcon24Regular\");\r\nObject.defineProperty(exports, \"BlockIcon24Regular\", { enumerable: true, get: function () { return BlockIcon24Regular_1.BlockIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BookClosedHelpIcon24Regular_1 = require(\"./icons/BookClosedHelpIcon/BookClosedHelpIcon24Regular\");\r\nObject.defineProperty(exports, \"BookClosedHelpIcon24Regular\", { enumerable: true, get: function () { return BookClosedHelpIcon24Regular_1.BookClosedHelpIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BookNotepadIcon20Regular_1 = require(\"./icons/BookNotepadIcon/BookNotepadIcon20Regular\");\r\nObject.defineProperty(exports, \"BookNotepadIcon20Regular\", { enumerable: true, get: function () { return BookNotepadIcon20Regular_1.BookNotepadIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BookNotepadIcon24Regular_1 = require(\"./icons/BookNotepadIcon/BookNotepadIcon24Regular\");\r\nObject.defineProperty(exports, \"BookNotepadIcon24Regular\", { enumerable: true, get: function () { return BookNotepadIcon24Regular_1.BookNotepadIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar CheckSquareIcon20Regular_1 = require(\"./icons/CheckSquareIcon/CheckSquareIcon20Regular\");\r\nObject.defineProperty(exports, \"CheckSquareIcon20Regular\", { enumerable: true, get: function () { return CheckSquareIcon20Regular_1.CheckSquareIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar CopyIcon16Light_1 = require(\"./icons/CopyIcon/CopyIcon16Light\");\r\nObject.defineProperty(exports, \"CopyIcon16Light\", { enumerable: true, get: function () { return CopyIcon16Light_1.CopyIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar CopyIcon20Regular_1 = require(\"./icons/CopyIcon/CopyIcon20Regular\");\r\nObject.defineProperty(exports, \"CopyIcon20Regular\", { enumerable: true, get: function () { return CopyIcon20Regular_1.CopyIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar DataChartBarsAIcon24Regular_1 = require(\"./icons/DataChartBarsAIcon/DataChartBarsAIcon24Regular\");\r\nObject.defineProperty(exports, \"DataChartBarsAIcon24Regular\", { enumerable: true, get: function () { return DataChartBarsAIcon24Regular_1.DataChartBarsAIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar FaceAHappyIcon24Regular_1 = require(\"./icons/FaceAHappyIcon/FaceAHappyIcon24Regular\");\r\nObject.defineProperty(exports, \"FaceAHappyIcon24Regular\", { enumerable: true, get: function () { return FaceAHappyIcon24Regular_1.FaceAHappyIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar FileFormatCsvIcon20Light_1 = require(\"./icons/FileFormatCsvIcon/FileFormatCsvIcon20Light\");\r\nObject.defineProperty(exports, \"FileFormatCsvIcon20Light\", { enumerable: true, get: function () { return FileFormatCsvIcon20Light_1.FileFormatCsvIcon20Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar JewelCrownIcon24Regular_1 = require(\"./icons/JewelCrownIcon/JewelCrownIcon24Regular\");\r\nObject.defineProperty(exports, \"JewelCrownIcon24Regular\", { enumerable: true, get: function () { return JewelCrownIcon24Regular_1.JewelCrownIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar MailArrowOutIcon16Light_1 = require(\"./icons/MailArrowOutIcon/MailArrowOutIcon16Light\");\r\nObject.defineProperty(exports, \"MailArrowOutIcon16Light\", { enumerable: true, get: function () { return MailArrowOutIcon16Light_1.MailArrowOutIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar MailIcon16Light_1 = require(\"./icons/MailIcon/MailIcon16Light\");\r\nObject.defineProperty(exports, \"MailIcon16Light\", { enumerable: true, get: function () { return MailIcon16Light_1.MailIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar NetDownloadIcon16Light_1 = require(\"./icons/NetDownloadIcon/NetDownloadIcon16Light\");\r\nObject.defineProperty(exports, \"NetDownloadIcon16Light\", { enumerable: true, get: function () { return NetDownloadIcon16Light_1.NetDownloadIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar NetDownloadIcon16Regular_1 = require(\"./icons/NetDownloadIcon/NetDownloadIcon16Regular\");\r\nObject.defineProperty(exports, \"NetDownloadIcon16Regular\", { enumerable: true, get: function () { return NetDownloadIcon16Regular_1.NetDownloadIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar NetDownloadIcon24Regular_1 = require(\"./icons/NetDownloadIcon/NetDownloadIcon24Regular\");\r\nObject.defineProperty(exports, \"NetDownloadIcon24Regular\", { enumerable: true, get: function () { return NetDownloadIcon24Regular_1.NetDownloadIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar NetUploadIcon20Regular_1 = require(\"./icons/NetUploadIcon/NetUploadIcon20Regular\");\r\nObject.defineProperty(exports, \"NetUploadIcon20Regular\", { enumerable: true, get: function () { return NetUploadIcon20Regular_1.NetUploadIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar People2Icon24Regular_1 = require(\"./icons/People2Icon/People2Icon24Regular\");\r\nObject.defineProperty(exports, \"People2Icon24Regular\", { enumerable: true, get: function () { return People2Icon24Regular_1.People2Icon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar PeopleCircle1Icon20Regular_1 = require(\"./icons/PeopleCircle1Icon/PeopleCircle1Icon20Regular\");\r\nObject.defineProperty(exports, \"PeopleCircle1Icon20Regular\", { enumerable: true, get: function () { return PeopleCircle1Icon20Regular_1.PeopleCircle1Icon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar PlusIcon16Regular_1 = require(\"./icons/PlusIcon/PlusIcon16Regular\");\r\nObject.defineProperty(exports, \"PlusIcon16Regular\", { enumerable: true, get: function () { return PlusIcon16Regular_1.PlusIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar PlusIcon20Light_1 = require(\"./icons/PlusIcon/PlusIcon20Light\");\r\nObject.defineProperty(exports, \"PlusIcon20Light\", { enumerable: true, get: function () { return PlusIcon20Light_1.PlusIcon20Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar PlusIcon20Regular_1 = require(\"./icons/PlusIcon/PlusIcon20Regular\");\r\nObject.defineProperty(exports, \"PlusIcon20Regular\", { enumerable: true, get: function () { return PlusIcon20Regular_1.PlusIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar PlusIcon24Regular_1 = require(\"./icons/PlusIcon/PlusIcon24Regular\");\r\nObject.defineProperty(exports, \"PlusIcon24Regular\", { enumerable: true, get: function () { return PlusIcon24Regular_1.PlusIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar QuestionCircleIcon16Regular_1 = require(\"./icons/QuestionCircleIcon/QuestionCircleIcon16Regular\");\r\nObject.defineProperty(exports, \"QuestionCircleIcon16Regular\", { enumerable: true, get: function () { return QuestionCircleIcon16Regular_1.QuestionCircleIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar SearchLoupeIcon20Light_1 = require(\"./icons/SearchLoupeIcon/SearchLoupeIcon20Light\");\r\nObject.defineProperty(exports, \"SearchLoupeIcon20Light\", { enumerable: true, get: function () { return SearchLoupeIcon20Light_1.SearchLoupeIcon20Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar SecurityLockOpenIcon24Regular_1 = require(\"./icons/SecurityLockOpenIcon/SecurityLockOpenIcon24Regular\");\r\nObject.defineProperty(exports, \"SecurityLockOpenIcon24Regular\", { enumerable: true, get: function () { return SecurityLockOpenIcon24Regular_1.SecurityLockOpenIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar SettingsGearIcon24Regular_1 = require(\"./icons/SettingsGearIcon/SettingsGearIcon24Regular\");\r\nObject.defineProperty(exports, \"SettingsGearIcon24Regular\", { enumerable: true, get: function () { return SettingsGearIcon24Regular_1.SettingsGearIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar SettingsSlidersH2Icon20Light_1 = require(\"./icons/SettingsSlidersH2Icon/SettingsSlidersH2Icon20Light\");\r\nObject.defineProperty(exports, \"SettingsSlidersH2Icon20Light\", { enumerable: true, get: function () { return SettingsSlidersH2Icon20Light_1.SettingsSlidersH2Icon20Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ShapeCircleIcon16Solid_1 = require(\"./icons/ShapeCircleIcon/ShapeCircleIcon16Solid\");\r\nObject.defineProperty(exports, \"ShapeCircleIcon16Solid\", { enumerable: true, get: function () { return ShapeCircleIcon16Solid_1.ShapeCircleIcon16Solid; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar StarIcon20Regular_1 = require(\"./icons/StarIcon/StarIcon20Regular\");\r\nObject.defineProperty(exports, \"StarIcon20Regular\", { enumerable: true, get: function () { return StarIcon20Regular_1.StarIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TechPcDesktopIcon24Regular_1 = require(\"./icons/TechPcDesktopIcon/TechPcDesktopIcon24Regular\");\r\nObject.defineProperty(exports, \"TechPcDesktopIcon24Regular\", { enumerable: true, get: function () { return TechPcDesktopIcon24Regular_1.TechPcDesktopIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TechPhoneClassicIcon16Solid_1 = require(\"./icons/TechPhoneClassicIcon/TechPhoneClassicIcon16Solid\");\r\nObject.defineProperty(exports, \"TechPhoneClassicIcon16Solid\", { enumerable: true, get: function () { return TechPhoneClassicIcon16Solid_1.TechPhoneClassicIcon16Solid; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TechServerIcon24Regular_1 = require(\"./icons/TechServerIcon/TechServerIcon24Regular\");\r\nObject.defineProperty(exports, \"TechServerIcon24Regular\", { enumerable: true, get: function () { return TechServerIcon24Regular_1.TechServerIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TimeClockIcon20Solid_1 = require(\"./icons/TimeClockIcon/TimeClockIcon20Solid\");\r\nObject.defineProperty(exports, \"TimeClockIcon20Solid\", { enumerable: true, get: function () { return TimeClockIcon20Solid_1.TimeClockIcon20Solid; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ToolPencilLineIcon16Light_1 = require(\"./icons/ToolPencilLineIcon/ToolPencilLineIcon16Light\");\r\nObject.defineProperty(exports, \"ToolPencilLineIcon16Light\", { enumerable: true, get: function () { return ToolPencilLineIcon16Light_1.ToolPencilLineIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ToolPencilLineIcon16Regular_1 = require(\"./icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular\");\r\nObject.defineProperty(exports, \"ToolPencilLineIcon16Regular\", { enumerable: true, get: function () { return ToolPencilLineIcon16Regular_1.ToolPencilLineIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TrashCanIcon16Light_1 = require(\"./icons/TrashCanIcon/TrashCanIcon16Light\");\r\nObject.defineProperty(exports, \"TrashCanIcon16Light\", { enumerable: true, get: function () { return TrashCanIcon16Light_1.TrashCanIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TrashCanIcon16Regular_1 = require(\"./icons/TrashCanIcon/TrashCanIcon16Regular\");\r\nObject.defineProperty(exports, \"TrashCanIcon16Regular\", { enumerable: true, get: function () { return TrashCanIcon16Regular_1.TrashCanIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TrashCanIcon20Regular_1 = require(\"./icons/TrashCanIcon/TrashCanIcon20Regular\");\r\nObject.defineProperty(exports, \"TrashCanIcon20Regular\", { enumerable: true, get: function () { return TrashCanIcon20Regular_1.TrashCanIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TrashCanIcon24Regular_1 = require(\"./icons/TrashCanIcon/TrashCanIcon24Regular\");\r\nObject.defineProperty(exports, \"TrashCanIcon24Regular\", { enumerable: true, get: function () { return TrashCanIcon24Regular_1.TrashCanIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TrashCanIcon64Regular_1 = require(\"./icons/TrashCanIcon/TrashCanIcon64Regular\");\r\nObject.defineProperty(exports, \"TrashCanIcon64Regular\", { enumerable: true, get: function () { return TrashCanIcon64Regular_1.TrashCanIcon64Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar UiFilterFunnelIcon16Light_1 = require(\"./icons/UiFilterFunnelIcon/UiFilterFunnelIcon16Light\");\r\nObject.defineProperty(exports, \"UiFilterFunnelIcon16Light\", { enumerable: true, get: function () { return UiFilterFunnelIcon16Light_1.UiFilterFunnelIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar UiFilterSortAHighToLowIcon16Regular_1 = require(\"./icons/UiFilterSortAHighToLowIcon/UiFilterSortAHighToLowIcon16Regular\");\r\nObject.defineProperty(exports, \"UiFilterSortAHighToLowIcon16Regular\", { enumerable: true, get: function () { return UiFilterSortAHighToLowIcon16Regular_1.UiFilterSortAHighToLowIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar UiFilterSortALowToHighIcon16Regular_1 = require(\"./icons/UiFilterSortALowToHighIcon/UiFilterSortALowToHighIcon16Regular\");\r\nObject.defineProperty(exports, \"UiFilterSortALowToHighIcon16Regular\", { enumerable: true, get: function () { return UiFilterSortALowToHighIcon16Regular_1.UiFilterSortALowToHighIcon16Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar UiMenuDots3HIcon24Regular_1 = require(\"./icons/UiMenuDots3HIcon/UiMenuDots3HIcon24Regular\");\r\nObject.defineProperty(exports, \"UiMenuDots3HIcon24Regular\", { enumerable: true, get: function () { return UiMenuDots3HIcon24Regular_1.UiMenuDots3HIcon24Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar WarningTriangleIcon20Regular_1 = require(\"./icons/WarningTriangleIcon/WarningTriangleIcon20Regular\");\r\nObject.defineProperty(exports, \"WarningTriangleIcon20Regular\", { enumerable: true, get: function () { return WarningTriangleIcon20Regular_1.WarningTriangleIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XCircleIcon16Light_1 = require(\"./icons/XCircleIcon/XCircleIcon16Light\");\r\nObject.defineProperty(exports, \"XCircleIcon16Light\", { enumerable: true, get: function () { return XCircleIcon16Light_1.XCircleIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XCircleIcon16Solid_1 = require(\"./icons/XCircleIcon/XCircleIcon16Solid\");\r\nObject.defineProperty(exports, \"XCircleIcon16Solid\", { enumerable: true, get: function () { return XCircleIcon16Solid_1.XCircleIcon16Solid; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XCircleIcon20Solid_1 = require(\"./icons/XCircleIcon/XCircleIcon20Solid\");\r\nObject.defineProperty(exports, \"XCircleIcon20Solid\", { enumerable: true, get: function () { return XCircleIcon20Solid_1.XCircleIcon20Solid; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XCircleIcon64Regular_1 = require(\"./icons/XCircleIcon/XCircleIcon64Regular\");\r\nObject.defineProperty(exports, \"XCircleIcon64Regular\", { enumerable: true, get: function () { return XCircleIcon64Regular_1.XCircleIcon64Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XIcon16Light_1 = require(\"./icons/XIcon/XIcon16Light\");\r\nObject.defineProperty(exports, \"XIcon16Light\", { enumerable: true, get: function () { return XIcon16Light_1.XIcon16Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XIcon20Light_1 = require(\"./icons/XIcon/XIcon20Light\");\r\nObject.defineProperty(exports, \"XIcon20Light\", { enumerable: true, get: function () { return XIcon20Light_1.XIcon20Light; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XIcon20Regular_1 = require(\"./icons/XIcon/XIcon20Regular\");\r\nObject.defineProperty(exports, \"XIcon20Regular\", { enumerable: true, get: function () { return XIcon20Regular_1.XIcon20Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar XIcon32Regular_1 = require(\"./icons/XIcon/XIcon32Regular\");\r\nObject.defineProperty(exports, \"XIcon32Regular\", { enumerable: true, get: function () { return XIcon32Regular_1.XIcon32Regular; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.forwardRef = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nfunction forwardNameAndTag(name, render) {\r\n render.displayName = name;\r\n render.__KONTUR_REACT_UI__ = name;\r\n render.__KONTUR_ICON__ = true;\r\n return render;\r\n}\r\nfunction forwardRef(name, render) {\r\n return forwardNameAndTag(name, react_1.default.forwardRef(render));\r\n}\r\nexports.forwardRef = forwardRef;\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrowALeftIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ArrowALeftIcon20Regular = forwardRef_1.forwardRef('ArrowALeftIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M8.812 16.032a.75.75 0 1 1-1.06 1.06l-5.238-5.236a2.625 2.625 0 0 1 0-3.712l5.237-5.237a.75.75 0 1 1 1.06 1.06L3.576 9.205c-.015.015-.03.03-.043.046H17.5a.75.75 0 0 1 0 1.5H3.532l.043.045 5.237 5.237Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrowCDownIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ArrowCDownIcon16Regular = forwardRef_1.forwardRef('ArrowCDownIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.97 5.47a.75.75 0 0 1 1.06 0l3.793 3.793a.25.25 0 0 0 .354 0L11.97 5.47a.75.75 0 1 1 1.06 1.06l-3.793 3.793a1.75 1.75 0 0 1-2.474 0L2.97 6.53a.75.75 0 0 1 0-1.06Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrowCLeftIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ArrowCLeftIcon16Regular = forwardRef_1.forwardRef('ArrowCLeftIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M10.534 13.027a.75.75 0 0 1-1.06.007L5.63 9.24a1.75 1.75 0 0 1-.008-2.483L9.41 2.97a.75.75 0 0 1 1.06 1.06L6.685 7.82a.25.25 0 0 0 0 .354l3.843 3.793a.75.75 0 0 1 .007 1.06Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrowCRightIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ArrowCRightIcon16Regular = forwardRef_1.forwardRef('ArrowCRightIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M5.466 2.973a.75.75 0 0 1 1.06-.007L10.37 6.76a1.75 1.75 0 0 1 .008 2.483L6.59 13.03a.75.75 0 0 1-1.06-1.06L9.316 8.18a.25.25 0 0 0-.002-.354L5.473 4.034a.75.75 0 0 1-.007-1.06Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrowRoundSyncForwardIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ArrowRoundSyncForwardIcon16Light = forwardRef_1.forwardRef('ArrowRoundSyncForwardIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M6.954 2.027A5.5 5.5 0 0 1 12.4 5H10.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5V2.252a.5.5 0 0 0-1 0v1.784A6.5 6.5 0 0 0 1.09 6.42a.5.5 0 1 0 .986.166 5.5 5.5 0 0 1 4.878-4.56Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M4.608 12.178a5.5 5.5 0 0 0 8.313-3.75.5.5 0 1 1 .986.17A6.5 6.5 0 0 1 2 10.963v1.784a.5.5 0 1 1-1 0V9.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1H2.601a5.5 5.5 0 0 0 2.007 2.178Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrowUiCornerOutUpRightIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ArrowUiCornerOutUpRightIcon16Regular = forwardRef_1.forwardRef('ArrowUiCornerOutUpRightIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M4.5 2.75A1.75 1.75 0 0 0 2.75 4.5v7c0 .966.784 1.75 1.75 1.75h7a1.75 1.75 0 0 0 1.75-1.75V10a.75.75 0 0 1 1.5 0v1.5a3.25 3.25 0 0 1-3.25 3.25h-7a3.25 3.25 0 0 1-3.25-3.25v-7A3.25 3.25 0 0 1 4.5 1.25H6a.75.75 0 0 1 0 1.5H4.5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M13.25 3.81V6.5a.75.75 0 1 0 1.5 0v-4c0-.69-.56-1.25-1.25-1.25h-4a.75.75 0 1 0 0 1.5h2.69L7.47 7.47a.75.75 0 0 0 1.06 1.06l4.72-4.72Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrowUiCornerOutUpRightIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ArrowUiCornerOutUpRightIcon20Regular = forwardRef_1.forwardRef('ArrowUiCornerOutUpRightIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M6 3.75A2.25 2.25 0 0 0 3.75 6v8A2.25 2.25 0 0 0 6 16.25h8A2.25 2.25 0 0 0 16.25 14v-2a.75.75 0 0 1 1.5 0v2A3.75 3.75 0 0 1 14 17.75H6A3.75 3.75 0 0 1 2.25 14V6A3.75 3.75 0 0 1 6 2.25h2a.75.75 0 0 1 0 1.5H6Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M16.25 4.81V8a.75.75 0 0 0 1.5 0V3.5c0-.69-.56-1.25-1.25-1.25H12a.75.75 0 0 0 0 1.5h3.19L9.47 9.47a.75.75 0 1 0 1.06 1.06l5.72-5.72Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AttachLinkIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.AttachLinkIcon20Regular = forwardRef_1.forwardRef('AttachLinkIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M.25 10A5.75 5.75 0 0 1 6 4.25h1.75a.75.75 0 0 1 0 1.5H6a4.25 4.25 0 0 0 0 8.5h1.75a.75.75 0 0 1 0 1.5H6A5.75 5.75 0 0 1 .25 10Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M19.75 10A5.75 5.75 0 0 0 14 4.25h-1.75a.75.75 0 0 0 0 1.5H14a4.25 4.25 0 0 1 0 8.5h-1.75a.75.75 0 0 0 0 1.5H14A5.75 5.75 0 0 0 19.75 10Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M6 9.25a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H6Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BagBriefcaseIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BagBriefcaseIcon24Regular = forwardRef_1.forwardRef('BagBriefcaseIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M9.5 2.25A2.25 2.25 0 0 0 7.25 4.5v1.75H3.875A2.625 2.625 0 0 0 1.25 8.875v1.304c0 .825.384 1.576 1 2.062V18A3.75 3.75 0 0 0 6 21.75h12A3.75 3.75 0 0 0 21.75 18v-5.76c.616-.485 1-1.236 1-2.061V8.875a2.625 2.625 0 0 0-2.625-2.625H16.75V4.5a2.25 2.25 0 0 0-2.25-2.25h-5Zm5.75 4V4.5a.75.75 0 0 0-.75-.75h-5a.75.75 0 0 0-.75.75v1.75h6.5Zm4.875 1.5c.621 0 1.125.504 1.125 1.125v1.304c0 .523-.36.977-.87 1.095l-6.676 1.558a7.5 7.5 0 0 1-3.408 0l-6.677-1.558a1.125 1.125 0 0 1-.869-1.095V8.875c0-.621.504-1.125 1.125-1.125h16.25Zm-6.08 6.543 6.205-1.448V18A2.25 2.25 0 0 1 18 20.25H6A2.25 2.25 0 0 1 3.75 18v-5.155l6.205 1.448a9 9 0 0 0 4.09 0Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BlockIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BlockIcon16Light = forwardRef_1.forwardRef('BlockIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M7.5 1a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM3.98 3.273a5.5 5.5 0 0 1 7.746 7.746L3.98 3.274Zm-.707.707a5.5 5.5 0 0 0 7.746 7.746L3.274 3.98Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BlockIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BlockIcon16Regular = forwardRef_1.forwardRef('BlockIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM4.677 3.617a5.5 5.5 0 0 1 7.706 7.706L4.677 3.617Zm-1.06 1.06a5.5 5.5 0 0 0 7.706 7.706L3.617 4.677Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BlockIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BlockIcon20Regular = forwardRef_1.forwardRef('BlockIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M10 2.001A7.999 7.999 0 1 0 10 18 7.999 7.999 0 0 0 10 2ZM5.966 4.905a6.499 6.499 0 0 1 9.13 9.13l-9.13-9.13Zm-1.06 1.06a6.499 6.499 0 0 0 9.13 9.13l-9.13-9.13Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BlockIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BlockIcon24Regular = forwardRef_1.forwardRef('BlockIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM6.72 5.66a8.25 8.25 0 0 1 11.62 11.62L6.72 5.66ZM5.66 6.72a8.25 8.25 0 0 0 11.62 11.62L5.66 6.72Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BookClosedHelpIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BookClosedHelpIcon24Regular = forwardRef_1.forwardRef('BookClosedHelpIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M13 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M10.09 8.083c0-.765.752-1.56 1.91-1.56s1.91.795 1.91 1.56c0 .377-.107.596-.243.759-.157.19-.386.345-.715.537l-.129.074c-.276.158-.635.364-.916.622-.372.343-.657.816-.657 1.472a.75.75 0 0 0 1.5 0c0-.16.048-.253.174-.369.146-.134.334-.243.62-.408l.164-.095c.336-.197.772-.464 1.113-.875.363-.437.589-.996.589-1.717 0-1.785-1.63-3.06-3.41-3.06-1.78 0-3.41 1.275-3.41 3.06a.75.75 0 1 0 1.5 0Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M3.25 5A3.75 3.75 0 0 1 7 1.25h11.5a2.25 2.25 0 0 1 2.25 2.25v13a2.25 2.25 0 0 1-2.25 2.25H6a1.25 1.25 0 1 0 0 2.5h14a.75.75 0 0 1 0 1.5H6A2.75 2.75 0 0 1 3.25 20V5Zm1.5 12.55c.375-.192.8-.3 1.25-.3h12.5a.75.75 0 0 0 .75-.75v-13a.75.75 0 0 0-.75-.75H7A2.25 2.25 0 0 0 4.75 5v12.55Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BookNotepadIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BookNotepadIcon20Regular = forwardRef_1.forwardRef('BookNotepadIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M10 5a.75.75 0 0 0 0 1.5h4A.75.75 0 0 0 14 5h-4Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M9.25 8.75A.75.75 0 0 1 10 8h4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.75-.75Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M10 11a.75.75 0 0 0 0 1.5h4a.75.75 0 0 0 0-1.5h-4Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M3.25 4.5A3.25 3.25 0 0 1 6.5 1.25h8a3.25 3.25 0 0 1 3.25 3.25v11a3.25 3.25 0 0 1-3.25 3.25h-8a3.25 3.25 0 0 1-3.25-3.25v-11Zm1.5 0a1.75 1.75 0 0 1 1.5-1.732v14.464a1.75 1.75 0 0 1-1.5-1.732v-11Zm3-1.75v14.5h6.75a1.75 1.75 0 0 0 1.75-1.75v-11a1.75 1.75 0 0 0-1.75-1.75H7.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BookNotepadIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.BookNotepadIcon24Regular = forwardRef_1.forwardRef('BookNotepadIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M10.5 7a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5h-5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M9.75 10.75a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M10.5 13a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5h-5Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M3.25 6A3.75 3.75 0 0 1 7 2.25h9A3.75 3.75 0 0 1 19.75 6v12A3.75 3.75 0 0 1 16 21.75H7A3.75 3.75 0 0 1 3.25 18V6Zm1.5 0c0-.98.626-1.813 1.5-2.122v16.244A2.251 2.251 0 0 1 4.75 18V6Zm3-2.25v16.5H16A2.25 2.25 0 0 0 18.25 18V6A2.25 2.25 0 0 0 16 3.75H7.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CheckSquareIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.CheckSquareIcon20Regular = forwardRef_1.forwardRef('CheckSquareIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M14.329 7.992a.75.75 0 0 0-1.06-1.06l-4.175 4.173a.5.5 0 0 1-.707 0L6.732 9.45a.75.75 0 1 0-1.061 1.061l1.655 1.655a2 2 0 0 0 2.829 0l4.174-4.174Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M6 2.25A3.75 3.75 0 0 0 2.25 6v8A3.75 3.75 0 0 0 6 17.75h8A3.75 3.75 0 0 0 17.75 14V6A3.75 3.75 0 0 0 14 2.25H6ZM3.75 6A2.25 2.25 0 0 1 6 3.75h8A2.25 2.25 0 0 1 16.25 6v8A2.25 2.25 0 0 1 14 16.25H6A2.25 2.25 0 0 1 3.75 14V6Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CopyIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.CopyIcon16Light = forwardRef_1.forwardRef('CopyIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M4.5 1A2.5 2.5 0 0 0 2 3.5v8A2.5 2.5 0 0 0 4.5 14h5a2.5 2.5 0 0 0 2.5-2.5v-8A2.5 2.5 0 0 0 9.5 1h-5ZM3 3.5A1.5 1.5 0 0 1 4.5 2h5A1.5 1.5 0 0 1 11 3.5v8A1.5 1.5 0 0 1 9.5 13h-5A1.5 1.5 0 0 1 3 11.5v-8Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M14 6.5a.5.5 0 0 0-1 0V12a3 3 0 0 1-3 3H5.5a.5.5 0 0 0 0 1H10a4 4 0 0 0 4-4V6.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CopyIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.CopyIcon20Regular = forwardRef_1.forwardRef('CopyIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M6.249 1.001a3.25 3.25 0 0 0-3.25 3.25v9.5a3.25 3.25 0 0 0 3.25 3.25h5.5a3.25 3.25 0 0 0 3.25-3.25v-9.5a3.25 3.25 0 0 0-3.25-3.25h-5.5Zm-1.75 3.25c0-.966.783-1.75 1.75-1.75h5.5c.966 0 1.75.784 1.75 1.75v9.5a1.75 1.75 0 0 1-1.75 1.75h-5.5a1.75 1.75 0 0 1-1.75-1.75v-9.5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M17.563 7.5a.75.75 0 0 0-1.5 0v6.781a3.75 3.75 0 0 1-3.75 3.75H7.5a.75.75 0 0 0 0 1.5h4.813c2.899 0 5.25-2.35 5.25-5.25V7.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DataChartBarsAIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.DataChartBarsAIcon24Regular = forwardRef_1.forwardRef('DataChartBarsAIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M19.75 5a.75.75 0 0 0-1.5 0v15a.75.75 0 0 0 1.5 0V5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M9.75 8.5a.75.75 0 0 0-1.5 0V20a.75.75 0 0 0 1.5 0V8.5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M4.75 15.5a.75.75 0 0 0-1.5 0V20a.75.75 0 0 0 1.5 0v-4.5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M14 11.25a.75.75 0 0 1 .75.75v8a.75.75 0 0 1-1.5 0v-8a.75.75 0 0 1 .75-.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.FaceAHappyIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.FaceAHappyIcon24Regular = forwardRef_1.forwardRef('FaceAHappyIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M17.333 13.429a.75.75 0 1 0-1.45-.388 4.02 4.02 0 0 1-7.767 0 .75.75 0 0 0-1.449.388 5.521 5.521 0 0 0 10.666 0Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.FileFormatCsvIcon20Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.FileFormatCsvIcon20Light = forwardRef_1.forwardRef('FileFormatCsvIcon20Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M6 3a2 2 0 0 0-2 2v2H3V5a3 3 0 0 1 3-3h5.622a1.5 1.5 0 0 1 1.06.44l3.879 3.877c.19.19.324.427.39.683H15.83l-3.854-3.854A.5.5 0 0 0 11.623 3H6Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M3 15h1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2h1a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M5.727 8.385c-.3-.125-.65-.188-1.05-.188-.555 0-1.035.12-1.44.36-.4.24-.705.573-.915.998-.21.42-.315.892-.315 1.417 0 .535.108 1.015.323 1.44.215.425.522.76.922 1.005.405.24.878.36 1.418.36.405 0 .767-.07 1.087-.21.325-.14.655-.367.99-.682l-.615-.713c-.3.25-.555.428-.765.533-.205.1-.442.15-.712.15a1.5 1.5 0 0 1-.833-.233 1.533 1.533 0 0 1-.547-.652 2.364 2.364 0 0 1-.195-.99c0-.37.065-.695.195-.975a1.46 1.46 0 0 1 .555-.653c.24-.155.52-.232.84-.232.24 0 .462.042.667.127.21.085.448.243.713.473l.615-.728a3.42 3.42 0 0 0-.938-.607Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M10.877 8.392c-.315-.125-.69-.187-1.125-.187-.4 0-.755.07-1.065.21-.305.14-.542.332-.712.577-.17.24-.255.508-.255.803 0 .285.055.522.165.712.11.19.297.355.562.495.265.135.635.26 1.11.375l.255.06c.28.06.49.115.63.165.14.045.253.11.338.195.085.08.127.19.127.33 0 .23-.097.41-.292.54-.19.13-.44.195-.75.195-.32 0-.605-.057-.855-.172-.245-.115-.545-.328-.9-.638l-.63.743c.4.36.775.615 1.125.765.355.145.767.217 1.237.217.425 0 .798-.072 1.118-.217.32-.15.565-.355.735-.615a1.63 1.63 0 0 0 .255-.9c0-.3-.068-.545-.203-.735-.135-.19-.337-.345-.607-.465-.265-.125-.628-.243-1.088-.353-.36-.085-.622-.152-.787-.202a1.093 1.093 0 0 1-.383-.203.422.422 0 0 1-.127-.322c0-.19.087-.345.262-.465.18-.125.418-.188.713-.188.29 0 .542.045.757.135.215.09.475.263.78.518l.615-.735c-.35-.3-.685-.513-1.005-.638Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M17.573 8.325h-1.088l-.81 2.565a56.05 56.05 0 0 0-.51 1.71c-.19-.69-.36-1.265-.51-1.725l-.817-2.55h-1.102l1.762 5.325h1.313l1.762-5.325Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.JewelCrownIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.JewelCrownIcon24Regular = forwardRef_1.forwardRef('JewelCrownIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12.611 3.143a.75.75 0 0 0-1.223 0L7.97 7.957 3.184 4.52a.75.75 0 0 0-1.18.714l1.38 9.825a2.25 2.25 0 0 0 2.229 1.937H18.36a2.25 2.25 0 0 0 2.227-1.931l1.41-9.83a.75.75 0 0 0-1.18-.715L16.03 7.957l-3.419-4.814ZM8.756 9.441 12 4.873l3.244 4.567a.75.75 0 0 0 1.05.175l3.968-2.85-1.16 8.086a.75.75 0 0 1-.742.644H5.613a.75.75 0 0 1-.743-.646L3.733 6.761l3.974 2.854a.75.75 0 0 0 1.049-.175Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M4.5 19.25a.75.75 0 0 0 0 1.5h15a.75.75 0 0 0 0-1.5h-15Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.MailArrowOutIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.MailArrowOutIcon16Light = forwardRef_1.forwardRef('MailArrowOutIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M2.5 3A2.5 2.5 0 0 0 0 5.5v5A2.5 2.5 0 0 0 2.5 13h3a.5.5 0 0 0 0-1h-3A1.5 1.5 0 0 1 1 10.5v-5A1.5 1.5 0 0 1 2.5 4h8A1.5 1.5 0 0 1 12 5.5v1a.5.5 0 0 0 1 0v-1A2.5 2.5 0 0 0 10.5 3h-8Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M2.8 5.6a.5.5 0 0 0-.6.8L5 8.5a2.5 2.5 0 0 0 3 0l2.8-2.1a.5.5 0 0 0-.6-.8L7.4 7.7a1.5 1.5 0 0 1-1.8 0L2.8 5.6Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M11.45 12A3.45 3.45 0 0 0 8 15.45v.05a.5.5 0 1 1-1 0v-.05A4.45 4.45 0 0 1 11.45 11h3.11l-1.886-1.62a.5.5 0 0 1 .652-.76l2.026 1.742a1.5 1.5 0 0 1 0 2.276l-2.026 1.741a.5.5 0 0 1-.652-.758L14.56 12h-3.11Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.MailIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.MailIcon16Light = forwardRef_1.forwardRef('MailIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M3.8 5.6a.5.5 0 0 0-.6.8L6 8.5a2.5 2.5 0 0 0 3 0l2.8-2.1a.5.5 0 0 0-.6-.8L8.4 7.7a1.5 1.5 0 0 1-1.8 0L3.8 5.6Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M3.5 3A2.5 2.5 0 0 0 1 5.5v5A2.5 2.5 0 0 0 3.5 13h8a2.5 2.5 0 0 0 2.5-2.5v-5A2.5 2.5 0 0 0 11.5 3h-8ZM2 5.5A1.5 1.5 0 0 1 3.5 4h8A1.5 1.5 0 0 1 13 5.5v5a1.5 1.5 0 0 1-1.5 1.5h-8A1.5 1.5 0 0 1 2 10.5v-5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.NetDownloadIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.NetDownloadIcon16Light = forwardRef_1.forwardRef('NetDownloadIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M7.5 1a.5.5 0 0 1 .5.5v8.373c.056-.032.109-.07.159-.114l3.012-2.635a.5.5 0 1 1 .658.752l-3.012 2.636a2 2 0 0 1-2.634 0L3.171 7.876a.5.5 0 1 1 .658-.752l3.013 2.635c.05.044.102.082.158.114V1.5a.5.5 0 0 1 .5-.5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M1 13.5a.5.5 0 0 1 .5-.5h12a.5.5 0 0 1 0 1h-12a.5.5 0 0 1-.5-.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.NetDownloadIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.NetDownloadIcon16Regular = forwardRef_1.forwardRef('NetDownloadIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M8 .675a.75.75 0 0 1 .75.75V9.13l3.252-2.89a.75.75 0 0 1 .996 1.12l-3.503 3.115a2.25 2.25 0 0 1-2.99 0L3.002 7.36a.75.75 0 1 1 .996-1.122L7.25 9.13V1.426A.75.75 0 0 1 8 .675Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M1.75 13a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11a.75.75 0 0 1-.75-.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.NetDownloadIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.NetDownloadIcon24Regular = forwardRef_1.forwardRef('NetDownloadIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M12 1.75a.75.75 0 0 1 .75.75v13.589c.086-.05.17-.11.246-.178l5.256-4.672a.75.75 0 0 1 .996 1.122l-5.255 4.67a3 3 0 0 1-3.986 0l-5.255-4.67a.75.75 0 0 1 .996-1.122l5.256 4.672c.077.069.16.128.246.178V2.5a.75.75 0 0 1 .75-.75Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M2.75 21a.75.75 0 0 1 .75-.75h17a.75.75 0 0 1 0 1.5h-17a.75.75 0 0 1-.75-.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.NetUploadIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.NetUploadIcon20Regular = forwardRef_1.forwardRef('NetUploadIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M4.873 7.06a.75.75 0 1 1-.996-1.12l4.379-3.893a2.625 2.625 0 0 1 3.488 0l4.38 3.892a.75.75 0 0 1-.997 1.122L10.75 3.17v10.08a.75.75 0 0 1-1.5 0V3.17L4.873 7.06Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M2.25 17a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H3a.75.75 0 0 1-.75-.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.People2Icon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.People2Icon24Regular = forwardRef_1.forwardRef('People2Icon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M8.5 4.25a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Zm-3 4.5a3 3 0 1 1 6 0 3 3 0 0 1-6 0Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M17.875 7.25a3.25 3.25 0 1 0 0 6.5 3.25 3.25 0 0 0 0-6.5Zm-1.75 3.25a1.75 1.75 0 1 1 3.5 0 1.75 1.75 0 0 1-3.5 0Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M17.5 16.75c-.278 0-.592.007-.918.034a5.088 5.088 0 0 0-.866-1.403 10.656 10.656 0 0 1 1.784-.131c.751 0 2.01.04 3.1.502.557.236 1.103.595 1.509 1.144.412.557.641 1.258.641 2.104v1a.75.75 0 0 1-1.5 0v-1c0-.563-.147-.942-.347-1.212-.205-.278-.505-.492-.888-.654-.788-.334-1.779-.384-2.515-.384Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M3.309 17.326c-.332.431-.559 1.019-.559 1.852V20a.75.75 0 0 1-1.5 0v-.822c0-1.13.317-2.046.868-2.765.545-.71 1.28-1.18 2.043-1.49 1.503-.614 3.258-.673 4.339-.673 1.08 0 2.836.059 4.34.673.762.31 1.497.78 2.042 1.49.551.719.868 1.635.868 2.765V20a.75.75 0 0 1-1.5 0v-.822c0-.833-.227-1.42-.559-1.852-.338-.442-.825-.772-1.419-1.015-1.21-.493-2.705-.561-3.772-.561-1.067 0-2.563.068-3.772.561-.594.243-1.08.573-1.42 1.015Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PeopleCircle1Icon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.PeopleCircle1Icon20Regular = forwardRef_1.forwardRef('PeopleCircle1Icon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M10 5a3.001 3.001 0 1 0 0 6.003A3.001 3.001 0 0 0 10 5ZM8.499 8a1.501 1.501 0 1 1 3.002 0 1.501 1.501 0 0 1-3.002 0Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.001 10A7.999 7.999 0 1 1 18 10 7.999 7.999 0 0 1 2 10ZM10 3.501a6.499 6.499 0 0 0-4.905 10.762c.096-.226.216-.435.359-.627.402-.54.942-.892 1.49-1.123 1.076-.452 2.316-.492 3.056-.492.74 0 1.98.04 3.055.492.55.231 1.09.583 1.491 1.123.143.192.263.4.36.627A6.499 6.499 0 0 0 10 3.502ZM10 16.5a6.469 6.469 0 0 1-3.66-1.129c.045-.367.166-.635.317-.838.2-.27.494-.478.87-.636.774-.326 1.748-.375 2.473-.375.725 0 1.7.049 2.474.375.375.158.669.367.869.636.151.203.272.471.318.838A6.469 6.469 0 0 1 10 16.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PlusIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.PlusIcon16Regular = forwardRef_1.forwardRef('PlusIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M8 2.25a.75.75 0 0 1 .75.75v4.25H13a.75.75 0 0 1 0 1.5H8.75V13a.75.75 0 0 1-1.5 0V8.75H3a.75.75 0 0 1 0-1.5h4.25V3A.75.75 0 0 1 8 2.25Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PlusIcon20Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.PlusIcon20Light = forwardRef_1.forwardRef('PlusIcon20Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M9.5 1.917a.5.5 0 0 1 .5.5V9h6.583a.5.5 0 1 1 0 1H10v6.584a.5.5 0 1 1-1 0V10H2.417a.5.5 0 0 1 0-1H9V2.417a.5.5 0 0 1 .5-.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PlusIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.PlusIcon20Regular = forwardRef_1.forwardRef('PlusIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M10 2.25a.75.75 0 0 1 .75.75v6.25H17a.75.75 0 0 1 0 1.5h-6.25V17a.75.75 0 0 1-1.5 0v-6.25H3a.75.75 0 0 1 0-1.5h6.25V3a.75.75 0 0 1 .75-.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PlusIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.PlusIcon24Regular = forwardRef_1.forwardRef('PlusIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M12 2.25a.75.75 0 0 1 .75.75v8.25H21a.75.75 0 0 1 0 1.5h-8.25V21a.75.75 0 0 1-1.5 0v-8.25H3a.75.75 0 0 1 0-1.5h8.25V3a.75.75 0 0 1 .75-.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.QuestionCircleIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.QuestionCircleIcon16Regular = forwardRef_1.forwardRef('QuestionCircleIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M6.76 6.348c0-.48.47-1.018 1.24-1.018s1.24.537 1.24 1.018c0 .359-.242.73-.695.913-.525.214-1.045.606-1.23 1.258a.75.75 0 1 0 1.444.409c.013-.046.07-.163.35-.277.92-.374 1.63-1.234 1.63-2.303C10.74 4.877 9.428 3.83 8 3.83c-1.427 0-2.74 1.047-2.74 2.518a.75.75 0 0 0 1.5 0Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8Zm7-5.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SearchLoupeIcon20Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.SearchLoupeIcon20Light = forwardRef_1.forwardRef('SearchLoupeIcon20Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M9.504 2.256a7.248 7.248 0 1 0 4.759 12.714l3.375 3.376a.5.5 0 0 0 .708-.707l-3.376-3.376A7.248 7.248 0 0 0 9.504 2.256ZM3.256 9.504a6.248 6.248 0 1 1 12.495 0 6.248 6.248 0 0 1-12.495 0Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SecurityLockOpenIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.SecurityLockOpenIcon24Regular = forwardRef_1.forwardRef('SecurityLockOpenIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M11.65 14.1a1.65 1.65 0 0 1-.9 1.47V17a.75.75 0 0 1-1.5 0v-1.43a1.65 1.65 0 1 1 2.4-1.47Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M13.25 6.5a5.25 5.25 0 1 1 10.5 0V7a.75.75 0 0 1-1.5 0v-.5a3.75 3.75 0 1 0-7.5 0v1.75H15A3.75 3.75 0 0 1 18.75 12v6A3.75 3.75 0 0 1 15 21.75H5A3.75 3.75 0 0 1 1.25 18v-6A3.75 3.75 0 0 1 5 8.25h8.25V6.5ZM5 9.75h10A2.25 2.25 0 0 1 17.25 12v6A2.25 2.25 0 0 1 15 20.25H5A2.25 2.25 0 0 1 2.75 18v-6A2.25 2.25 0 0 1 5 9.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SettingsGearIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.SettingsGearIcon24Regular = forwardRef_1.forwardRef('SettingsGearIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12 7.623a4.377 4.377 0 1 0 0 8.754 4.377 4.377 0 0 0 0-8.754ZM9.123 12a2.877 2.877 0 1 1 5.754 0 2.877 2.877 0 0 1-5.754 0Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M11.165 2a2.2 2.2 0 0 0-2.194 2.03l-.041.522c-.02.256-.199.529-.523.702-.154.082-.305.17-.452.261-.311.195-.637.213-.869.103l-.474-.227a2.2 2.2 0 0 0-2.854.886l-.835 1.446a2.2 2.2 0 0 0 .66 2.915l.434.298c.211.145.358.436.346.802a7.792 7.792 0 0 0 0 .524c.012.366-.135.657-.346.802l-.434.298a2.2 2.2 0 0 0-.66 2.915l.835 1.445a2.2 2.2 0 0 0 2.854.886l.474-.226c.232-.11.558-.092.87.102.146.092.297.18.45.261.325.174.504.447.524.702l.041.523A2.2 2.2 0 0 0 11.165 22h1.67a2.2 2.2 0 0 0 2.194-2.03l.04-.523c.02-.255.2-.528.524-.701.154-.083.305-.17.452-.262.311-.194.637-.213.869-.102l.474.226a2.2 2.2 0 0 0 2.854-.886l.835-1.445a2.2 2.2 0 0 0-.66-2.915l-.434-.298c-.211-.146-.358-.436-.346-.802a7.86 7.86 0 0 0 0-.524c-.012-.366.135-.657.346-.802l.434-.298a2.2 2.2 0 0 0 .66-2.915l-.835-1.446a2.2 2.2 0 0 0-2.854-.886l-.474.227c-.232.11-.558.092-.869-.103a7.62 7.62 0 0 0-.452-.26c-.324-.174-.503-.447-.523-.703l-.041-.523A2.201 2.201 0 0 0 12.835 2h-1.67Zm-.698 2.147a.7.7 0 0 1 .698-.647h1.67a.7.7 0 0 1 .698.647l.042.523c.068.871.638 1.548 1.312 1.907.123.066.245.136.363.21.648.406 1.52.562 2.31.185l.474-.227a.7.7 0 0 1 .91.282l.834 1.446a.7.7 0 0 1-.21.928l-.434.299c-.72.494-1.022 1.325-.996 2.089a6.178 6.178 0 0 1 0 .422c-.026.764.276 1.595.996 2.09l.434.297a.7.7 0 0 1 .21.929l-.835 1.446a.7.7 0 0 1-.909.282l-.474-.227c-.79-.377-1.662-.221-2.31.184-.118.074-.24.144-.363.21-.674.36-1.244 1.036-1.313 1.908l-.04.523a.7.7 0 0 1-.7.646h-1.669a.7.7 0 0 1-.698-.646l-.042-.523c-.068-.872-.638-1.548-1.312-1.908a6.158 6.158 0 0 1-.363-.21c-.648-.405-1.52-.56-2.31-.184l-.474.227a.7.7 0 0 1-.91-.282l-.834-1.446a.7.7 0 0 1 .21-.929l.434-.298c.72-.494 1.022-1.325.996-2.089a6.268 6.268 0 0 1 0-.423c.026-.763-.276-1.594-.996-2.089l-.434-.298a.7.7 0 0 1-.21-.928l.835-1.446a.7.7 0 0 1 .909-.282l.474.227c.79.377 1.662.22 2.31-.185a6.14 6.14 0 0 1 .363-.21c.674-.359 1.244-1.036 1.312-1.907l.041-.523Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SettingsSlidersH2Icon20Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.SettingsSlidersH2Icon20Light = forwardRef_1.forwardRef('SettingsSlidersH2Icon20Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M9.798 7H2.5a.5.5 0 0 1 0-1h7.298a2.748 2.748 0 0 1 5.404 0H17.5a.5.5 0 0 1 0 1h-2.298a2.748 2.748 0 0 1-5.404 0Zm.954-.5a1.748 1.748 0 1 1 3.496 0 1.748 1.748 0 0 1-3.496 0Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2 13.5a.5.5 0 0 1 .5-.5h2.295a2.75 2.75 0 0 1 5.41 0H17.5a.5.5 0 1 1 0 1h-7.296a2.75 2.75 0 0 1-5.408 0H2.5a.5.5 0 0 1-.5-.5Zm5.5-1.752a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ShapeCircleIcon16Solid = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ShapeCircleIcon16Solid = forwardRef_1.forwardRef('ShapeCircleIcon16Solid', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.StarIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.StarIcon20Regular = forwardRef_1.forwardRef('StarIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M10.861 1.7c-.325-.756-1.397-.756-1.722 0l-2.03 4.713L2 6.887C1.18 6.963.85 7.98 1.467 8.524l3.856 3.387-1.129 5.006c-.18.803.686 1.433 1.394 1.013L10 15.31l4.412 2.62c.708.42 1.574-.21 1.394-1.013l-1.129-5.006 3.856-3.387c.618-.542.287-1.561-.533-1.637l-5.11-.474L10.862 1.7Zm1.891 6.206a1.5 1.5 0 0 1-1.239-.9L10 3.492 8.487 7.006a1.5 1.5 0 0 1-1.24.9L3.44 8.26l2.874 2.524a1.5 1.5 0 0 1 .473 1.457l-.841 3.732 3.29-1.953a1.5 1.5 0 0 1 1.53 0l3.29 1.953-.84-3.732a1.5 1.5 0 0 1 .472-1.457l2.874-2.524-3.809-.354Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TechPcDesktopIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TechPcDesktopIcon24Regular = forwardRef_1.forwardRef('TechPcDesktopIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M12.5 2.25a2.25 2.25 0 0 0-2.25 2.25V5a.75.75 0 0 0 1.5 0v-.5a.75.75 0 0 1 .75-.75h8a.75.75 0 0 1 .75.75v15a.75.75 0 0 1-.75.75H16a.75.75 0 0 0 0 1.5h4.5a2.25 2.25 0 0 0 2.25-2.25v-15a2.25 2.25 0 0 0-2.25-2.25h-8Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1.25 10.25a3 3 0 0 1 3-3h9.5a3 3 0 0 1 3 3v5.5a3 3 0 0 1-3 3h-2v1.5H13a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1 0-1.5h1.25v-1.5h-2a3 3 0 0 1-3-3v-5.5Zm12.5 7h-9.5a1.5 1.5 0 0 1-1.5-1.5v-5.5a1.5 1.5 0 0 1 1.5-1.5h9.5a1.5 1.5 0 0 1 1.5 1.5v5.5a1.5 1.5 0 0 1-1.5 1.5Zm-3.5 3v-1.5h-2.5v1.5h2.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TechPhoneClassicIcon16Solid = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TechPhoneClassicIcon16Solid = forwardRef_1.forwardRef('TechPhoneClassicIcon16Solid', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M1.331 6.026c.336 1.53 1.15 3.357 3.222 5.429s3.898 2.886 5.429 3.221c1.698.372 3.409-.432 4.638-1.661a1.11 1.11 0 0 0 0-1.57l-1.681-1.68a1.117 1.117 0 0 0-1.58 0c-.748.748-1.772 1.393-2.726.935-.53-.255-1.13-.712-1.871-1.454-.742-.742-1.2-1.341-1.454-1.871-.459-.954.187-1.978.935-2.726a1.117 1.117 0 0 0 0-1.58l-1.68-1.681a1.11 1.11 0 0 0-1.57 0C1.763 2.617.959 4.328 1.33 6.026Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TechServerIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TechServerIcon24Regular = forwardRef_1.forwardRef('TechServerIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M7.873 14.25a1.123 1.123 0 1 1-2.246 0 1.123 1.123 0 0 1 2.246 0Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M6.75 7.876a1.126 1.126 0 1 0 0-2.252 1.126 1.126 0 0 0 0 2.252Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.25 5.625A3.375 3.375 0 0 1 5.625 2.25h12.75a3.375 3.375 0 0 1 3.375 3.375v2.25c0 1.06-.489 2.006-1.253 2.625a3.369 3.369 0 0 1 1.253 2.625v2.25a3.375 3.375 0 0 1-3.375 3.375H12.75V22h6a.75.75 0 0 1 0 1.5H5.25a.75.75 0 0 1 0-1.5h6v-3.25H5.625a3.375 3.375 0 0 1-3.375-3.375v-2.25c0-1.06.489-2.006 1.253-2.625A3.369 3.369 0 0 1 2.25 7.875v-2.25ZM18.375 17.25c1.035 0 1.875-.84 1.875-1.875v-2.25c0-1.036-.84-1.875-1.875-1.875H5.625c-1.036 0-1.875.84-1.875 1.875v2.25c0 1.035.84 1.875 1.875 1.875h12.75ZM5.625 3.75c-1.036 0-1.875.84-1.875 1.875v2.25c0 1.036.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875v-2.25c0-1.036-.84-1.875-1.875-1.875H5.625Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TimeClockIcon20Solid = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TimeClockIcon20Solid = forwardRef_1.forwardRef('TimeClockIcon20Solid', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.48-12.182a.75.75 0 0 0-1.5 0v3.507a2 2 0 0 0 1.085 1.78l3.026 1.554a.75.75 0 1 0 .685-1.334L10.751 9.77a.5.5 0 0 1-.272-.445V5.818Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ToolPencilLineIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ToolPencilLineIcon16Light = forwardRef_1.forwardRef('ToolPencilLineIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M10.354 1.439a1.5 1.5 0 0 1 2.122 0l1.085 1.086a1.5 1.5 0 0 1 0 2.121L4.646 13.56a1.5 1.5 0 0 1-1.06.44H1.5a.5.5 0 0 1-.5-.5v-2.087c0-.397.158-.779.44-1.06l8.914-8.915Zm1.414.707a.5.5 0 0 0-.707 0L9.957 3.25l1.793 1.793 1.104-1.104a.5.5 0 0 0 0-.707l-1.086-1.086Zm-9.622 8.915L9.25 3.957l1.793 1.793-7.104 7.104a.5.5 0 0 1-.353.146H2v-1.586a.5.5 0 0 1 .146-.353Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M7.5 13a.5.5 0 1 0 0 1h7a.5.5 0 0 0 0-1h-7Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ToolPencilLineIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.ToolPencilLineIcon16Regular = forwardRef_1.forwardRef('ToolPencilLineIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M9.882 1.515a1.75 1.75 0 0 1 2.475 0l1.128 1.127a1.75 1.75 0 0 1-.002 2.476l-8.386 8.369a1.75 1.75 0 0 1-1.236.511h-2.11a.75.75 0 0 1-.749-.75V11.12c0-.464.184-.91.513-1.238l8.367-8.367Zm1.415 1.06a.25.25 0 0 0-.354 0L9.938 3.581l1.48 1.48 1.006-1.005a.25.25 0 0 0 0-.353l-1.127-1.128Zm-8.722 8.368 6.302-6.302 1.479 1.48-6.318 6.304a.25.25 0 0 1-.177.073h-1.36l.001-1.378a.25.25 0 0 1 .073-.177Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M8.5 12.25a.75.75 0 0 0 0 1.5H15a.75.75 0 1 0 0-1.5H8.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TrashCanIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TrashCanIcon16Light = forwardRef_1.forwardRef('TrashCanIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M6 7.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M7.5 7a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1 .5-.5Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M10 7.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M4 2.75V4H1a.5.5 0 0 0 0 1h1.048l.82 8.199A2 2 0 0 0 4.857 15h5.285a2 2 0 0 0 1.99-1.801L12.953 5H14a.5.5 0 0 0 0-1h-3V2.75A1.75 1.75 0 0 0 9.25 1h-3.5A1.75 1.75 0 0 0 4 2.75ZM5.75 2a.75.75 0 0 0-.75.75V4h5V2.75A.75.75 0 0 0 9.25 2h-3.5Zm6.197 3-.81 8.1a1 1 0 0 1-.995.9H4.857a1 1 0 0 1-.995-.9L3.052 5h8.895Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TrashCanIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TrashCanIcon16Regular = forwardRef_1.forwardRef('TrashCanIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M6.5 6.194c.345 0 .625.28.625.625v4.362a.625.625 0 1 1-1.25 0V6.819c0-.345.28-.625.625-.625Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M10.125 6.82a.625.625 0 1 0-1.25 0v4.36a.625.625 0 1 0 1.25 0V6.82Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M4.25 3.25v-1a2 2 0 0 1 2-2h3.5a2 2 0 0 1 2 2v1h2.5a.75.75 0 0 1 0 1.5h-.571l-.798 7.974a2.25 2.25 0 0 1-2.239 2.026H5.357a2.25 2.25 0 0 1-2.238-2.026L2.32 4.75H1.75a.75.75 0 1 1 0-1.5h2.5Zm1.5-1a.5.5 0 0 1 .5-.5h3.5a.5.5 0 0 1 .5.5v1h-4.5v-1Zm-1.921 2.5.782 7.825a.75.75 0 0 0 .746.675h5.285a.75.75 0 0 0 .747-.675l.782-7.825H3.83Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TrashCanIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TrashCanIcon20Regular = forwardRef_1.forwardRef('TrashCanIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M8.5 7.375c.345 0 .625.28.625.625v6.36a.625.625 0 1 1-1.25 0V8c0-.345.28-.625.625-.625Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M12.125 8a.625.625 0 1 0-1.25 0v6.36a.625.625 0 1 0 1.25 0V8Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M6 4.25v-.99a2.25 2.25 0 0 1 2.25-2.25h3.5A2.25 2.25 0 0 1 14 3.26v.99h3.5a.75.75 0 0 1 0 1.5h-.82l-.957 9.771a2.75 2.75 0 0 1-2.737 2.482H7.014a2.75 2.75 0 0 1-2.737-2.482L3.32 5.75H2.5a.75.75 0 0 1 0-1.5H6Zm1.5-.99a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v.99h-5v-.99ZM5.77 15.374 4.827 5.75h10.346l-.943 9.625a1.25 1.25 0 0 1-1.244 1.128H7.014a1.25 1.25 0 0 1-1.244-1.128Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TrashCanIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TrashCanIcon24Regular = forwardRef_1.forwardRef('TrashCanIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M9.348 9.665a.75.75 0 0 0-1.496.108l.537 7.468a.75.75 0 0 0 1.496-.107l-.537-7.469Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M15.454 8.97a.75.75 0 0 1 .694.803l-.536 7.468a.75.75 0 0 1-1.497-.107l.537-7.469a.75.75 0 0 1 .802-.694Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M12.75 9.719a.75.75 0 0 0-1.5 0v7.469a.75.75 0 0 0 1.5 0V9.719Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M7.007 3.627V4.5H3.21a.75.75 0 0 0 0 1.5h.783l1.153 12.63a3.75 3.75 0 0 0 3.735 3.408h6.239a3.75 3.75 0 0 0 3.734-3.409L20.008 6h.782a.75.75 0 0 0 0-1.5h-3.786v-.873a2.625 2.625 0 0 0-2.625-2.625H9.632a2.625 2.625 0 0 0-2.625 2.625Zm2.625-1.125c-.622 0-1.125.504-1.125 1.125V4.5h6.997v-.873c0-.621-.504-1.125-1.125-1.125H9.632ZM5.499 6 6.64 18.493a2.25 2.25 0 0 0 2.24 2.045h6.24a2.25 2.25 0 0 0 2.24-2.045L18.502 6H5.5Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TrashCanIcon64Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.TrashCanIcon64Regular = forwardRef_1.forwardRef('TrashCanIcon64Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 64 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M19 10.5V13H7.5a1.5 1.5 0 0 0 0 3h49a1.5 1.5 0 0 0 0-3H45v-2.5A6.5 6.5 0 0 0 38.5 4h-13a6.5 6.5 0 0 0-6.5 6.5ZM25.5 7a3.5 3.5 0 0 0-3.5 3.5V13h20v-2.5A3.5 3.5 0 0 0 38.5 7h-13Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M13.49 21.334a1.5 1.5 0 1 0-2.98.332l3.208 28.883A9.5 9.5 0 0 0 23.16 59h17.68a9.5 9.5 0 0 0 9.442-8.45l3.209-28.884a1.5 1.5 0 1 0-2.982-.332L47.3 50.218A6.5 6.5 0 0 1 40.84 56H23.16a6.5 6.5 0 0 1-6.46-5.782l-3.21-28.884Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M23.995 27.382a1.5 1.5 0 1 0-2.99.236l1.5 19a1.5 1.5 0 1 0 2.99-.236l-1.5-19Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M41.618 26.005a1.5 1.5 0 0 1 1.377 1.613l-1.5 19a1.5 1.5 0 1 1-2.99-.236l1.5-19a1.5 1.5 0 0 1 1.613-1.377Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M33.5 27.5a1.5 1.5 0 0 0-3 0v19a1.5 1.5 0 0 0 3 0v-19Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.UiFilterFunnelIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.UiFilterFunnelIcon16Light = forwardRef_1.forwardRef('UiFilterFunnelIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1 3.25C1 2.56 1.56 2 2.25 2h11.5c.69 0 1.25.56 1.25 1.25v1.708a1.5 1.5 0 0 1-.636 1.226L10 9.259v3.473a1 1 0 0 1-.445.833l-2 1.333A1 1 0 0 1 6 14.066V9.259L1.636 6.184A1.5 1.5 0 0 1 1 4.958V3.25ZM2.25 3a.25.25 0 0 0-.25.25v1.708a.5.5 0 0 0 .212.408l4.364 3.076A1 1 0 0 1 7 9.259v4.807l2-1.334V9.26a1 1 0 0 1 .424-.817l4.364-3.076A.5.5 0 0 0 14 4.958V3.25a.25.25 0 0 0-.25-.25H2.25Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.UiFilterSortAHighToLowIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.UiFilterSortAHighToLowIcon16Regular = forwardRef_1.forwardRef('UiFilterSortAHighToLowIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M3 3.25a.75.75 0 0 0 0 1.5h10a.75.75 0 0 0 0-1.5H3Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M2.25 8A.75.75 0 0 1 3 7.25h6a.75.75 0 0 1 0 1.5H3A.75.75 0 0 1 2.25 8Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M2.25 12a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5H3a.75.75 0 0 1-.75-.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.UiFilterSortALowToHighIcon16Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.UiFilterSortALowToHighIcon16Regular = forwardRef_1.forwardRef('UiFilterSortALowToHighIcon16Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M2.25 4A.75.75 0 0 1 3 3.25h2.5a.75.75 0 0 1 0 1.5H3A.75.75 0 0 1 2.25 4Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M2.25 8A.75.75 0 0 1 3 7.25h6a.75.75 0 0 1 0 1.5H3A.75.75 0 0 1 2.25 8Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M3 11.25a.75.75 0 0 0 0 1.5h10a.75.75 0 0 0 0-1.5H3Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.UiMenuBars3HIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.UiMenuBars3HIcon24Regular = forwardRef_1.forwardRef('UiMenuBars3HIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M3.75 4.25a.75.75 0 0 0 0 1.5h16.5a.75.75 0 0 0 0-1.5H3.75Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M3 19a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 19Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.UiMenuDots3HIcon24Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.UiMenuDots3HIcon24Regular = forwardRef_1.forwardRef('UiMenuDots3HIcon24Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 24 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M2.62 12.002a1.875 1.875 0 1 0 3.75 0 1.875 1.875 0 0 0-3.75 0Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M11.998 13.877a1.875 1.875 0 1 1 0-3.75 1.875 1.875 0 0 1 0 3.75Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M19.5 13.878a1.875 1.875 0 1 1 0-3.75 1.875 1.875 0 0 1 0 3.75Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.WarningTriangleIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.WarningTriangleIcon20Regular = forwardRef_1.forwardRef('WarningTriangleIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" }),\r\n react_1.default.createElement(\"path\", { d: \"M10.75 6.51a.75.75 0 0 0-1.5 0v3.589a.75.75 0 0 0 1.5 0v-3.59Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M7.91 2.32c.954-1.565 3.226-1.565 4.181 0l6.535 10.702c.997 1.632-.178 3.726-2.09 3.726H3.465c-1.914 0-3.089-2.094-2.092-3.726L7.91 2.319Zm2.901.781a.95.95 0 0 0-1.622 0L2.654 13.803a.95.95 0 0 0 .811 1.445h13.07a.95.95 0 0 0 .811-1.445L10.811 3.101Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XCircleIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XCircleIcon16Light = forwardRef_1.forwardRef('XCircleIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M5.68 4.973a.5.5 0 1 0-.707.707l1.82 1.82-1.82 1.82a.5.5 0 0 0 .707.707l1.82-1.82 1.82 1.82a.5.5 0 1 0 .707-.707L8.207 7.5l1.82-1.82a.5.5 0 0 0-.707-.707L7.5 6.793l-1.82-1.82Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M7.5 1a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM2 7.5a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XCircleIcon16Solid = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XCircleIcon16Solid = forwardRef_1.forwardRef('XCircleIcon16Solid', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.232 4.818a1 1 0 0 0-1.414 1.414L6.586 8 4.818 9.768a1 1 0 0 0 1.414 1.414L8 9.414l1.768 1.768a1 1 0 0 0 1.414-1.414L9.414 8l1.768-1.768a1 1 0 0 0-1.414-1.414L8 6.586 6.232 4.818Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XCircleIcon20Solid = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XCircleIcon20Solid = forwardRef_1.forwardRef('XCircleIcon20Solid', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM7.818 6.404a1 1 0 0 0-1.414 1.414L8.586 10l-2.182 2.182a1 1 0 1 0 1.414 1.414L10 11.414l2.182 2.182a1 1 0 0 0 1.414-1.414L11.414 10l2.182-2.182a1 1 0 0 0-1.414-1.414L10 8.586 7.818 6.404Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XCircleIcon64Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XCircleIcon64Regular = forwardRef_1.forwardRef('XCircleIcon64Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 64 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M22.576 20.455a1.5 1.5 0 1 0-2.121 2.121L29.879 32l-9.424 9.424a1.5 1.5 0 1 0 2.121 2.121L32 34.121l9.424 9.424a1.5 1.5 0 1 0 2.121-2.121L34.121 32l9.424-9.424a1.5 1.5 0 1 0-2.121-2.121L32 29.879l-9.424-9.424Z\" }),\r\n react_1.default.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M32 6C17.64 6 6 17.64 6 32s11.64 26 26 26 26-11.64 26-26S46.36 6 32 6ZM9 32C9 19.297 19.297 9 32 9s23 10.297 23 23-10.297 23-23 23S9 44.703 9 32Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XIcon16Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XIcon16Light = forwardRef_1.forwardRef('XIcon16Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 16 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M3.145 3.148a.5.5 0 0 1 .707 0l3.645 3.645 3.646-3.645a.5.5 0 1 1 .707.707L8.205 7.5l3.645 3.645a.5.5 0 1 1-.707.707L7.497 8.207l-3.645 3.645a.5.5 0 1 1-.707-.707L6.79 7.5 3.145 3.855a.5.5 0 0 1 0-.707Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XIcon20Light = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XIcon20Light = forwardRef_1.forwardRef('XIcon20Light', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M4.146 4.146a.5.5 0 0 1 .708 0L10 9.293l5.146-5.147a.5.5 0 1 1 .707.708L10.707 10l5.146 5.146a.5.5 0 1 1-.707.707L10 10.707l-5.146 5.146a.5.5 0 1 1-.708-.707L9.293 10 4.146 4.854a.5.5 0 0 1 0-.708Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XIcon20Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XIcon20Regular = forwardRef_1.forwardRef('XIcon20Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 20 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M3.981 3.981a.75.75 0 0 1 1.061 0L10 8.94l4.958-4.958a.75.75 0 0 1 1.06 1.061L11.062 10l4.958 4.958a.75.75 0 0 1-1.06 1.06L10 11.062l-4.958 4.958a.75.75 0 1 1-1.06-1.06L8.938 10 3.981 5.042a.75.75 0 0 1 0-1.06Z\" })));\r\n});\r\n","\"use strict\";\r\n/* eslint-disable react/display-name */\r\n// * You should NOT edit this file directly. Read CONTRIBUTING.md for more information on creating icons\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.XIcon32Regular = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importDefault(require(\"react\"));\r\nvar forwardRef_1 = require(\"../../helpers/forwardRef\");\r\nvar BaseIcon_1 = require(\"../../internal/BaseIcon\");\r\nexports.XIcon32Regular = forwardRef_1.forwardRef('XIcon32Regular', function (props, ref) {\r\n return (react_1.default.createElement(BaseIcon_1.BaseIcon, tslib_1.__assign({ ref: ref, viewBoxSize: 32 }, props),\r\n react_1.default.createElement(\"path\", { d: \"M5.747 5.747a1 1 0 0 1 1.414 0L16 14.586l8.84-8.84a1 1 0 1 1 1.413 1.415L17.414 16l8.84 8.84a1 1 0 0 1-1.415 1.413L16 17.414l-8.84 8.84a1 1 0 0 1-1.413-1.415L14.586 16l-8.84-8.84a1 1 0 0 1 0-1.413Z\" })));\r\n});\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BaseIcon = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\n/* eslint-disable react/display-name */\r\nvar react_1 = tslib_1.__importStar(require(\"react\"));\r\nvar Icon_1 = require(\"./Icon\");\r\nvar forwardRef_1 = require(\"../helpers/forwardRef\");\r\nvar utils_1 = require(\"./utils\");\r\nvar injectCss_1 = require(\"./injectCss\");\r\nexports.BaseIcon = forwardRef_1.forwardRef('BaseIcon', function (_a, ref) {\r\n var color = _a.color, size = _a.size, style = _a.style, _b = _a[\"aria-hidden\"], ariaHidden = _b === void 0 ? true : _b, _c = _a.viewBoxSize, viewBoxSize = _c === void 0 ? 16 : _c, _d = _a.align, align = _d === void 0 ? 'center' : _d, children = _a.children, rest = tslib_1.__rest(_a, [\"color\", \"size\", \"style\", 'aria-hidden', \"viewBoxSize\", \"align\", \"children\"]);\r\n var innerRef = react_1.useRef(null);\r\n react_1.useEffect(function () {\r\n var element = innerRef.current;\r\n if (!element) {\r\n return;\r\n }\r\n injectCss_1.injectCss(element);\r\n }, [innerRef.current]);\r\n var icon = (react_1.default.createElement(\"svg\", tslib_1.__assign({ \"data-tid\": Icon_1.IconDataTids.root, ref: utils_1.mergeRefs([innerRef, ref]), width: size || viewBoxSize, height: size || viewBoxSize, className: \"ui-parking-icon-base\", style: Object.assign({\r\n fill: color !== null && color !== void 0 ? color : 'currentColor',\r\n marginBottom: align === 'none' || align === 'center' ? 0 : '-0.1875em',\r\n flexShrink: 0,\r\n }, align !== 'center' ? style : undefined), xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 \" + viewBoxSize + \" \" + viewBoxSize, \"aria-hidden\": ariaHidden }, rest), children));\r\n if (align === 'center') {\r\n return (react_1.default.createElement(\"span\", { className: \"ui-parking-icon-centered\", \"aria-hidden\": ariaHidden, style: style }, icon));\r\n }\r\n return icon;\r\n});\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Icon = exports.IconDataTids = exports.DEFAULT_ICON_WEIGHT = exports.DEFAULT_ICON_SIZE = exports.MAX_SOLID_POSITION = exports.MAX_REGULAR_POSITION = exports.MAX_LIGHT_POSITION = exports.weights = exports.breakpoints = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar react_1 = tslib_1.__importStar(require(\"react\"));\r\nvar getIconPosition_1 = require(\"./getIconPosition\");\r\nvar correctIconPosition_1 = require(\"./correctIconPosition\");\r\nexports.breakpoints = [16, 20, 24, 32, 64];\r\nexports.weights = ['light', 'regular', 'solid'];\r\nexports.MAX_LIGHT_POSITION = 1;\r\nexports.MAX_REGULAR_POSITION = 4;\r\nexports.MAX_SOLID_POSITION = 2;\r\nexports.DEFAULT_ICON_SIZE = 16;\r\nexports.DEFAULT_ICON_WEIGHT = 'regular';\r\nexports.IconDataTids = {\r\n root: 'Icon__root',\r\n};\r\nexports.Icon = react_1.forwardRef(function (_a, ref) {\r\n var sizes = _a.sizes, style = _a.style, _b = _a.size, size = _b === void 0 ? exports.DEFAULT_ICON_SIZE : _b, _c = _a.weight, weight = _c === void 0 ? exports.DEFAULT_ICON_WEIGHT : _c, _d = _a.align, align = _d === void 0 ? 'center' : _d, color = _a.color, rest = tslib_1.__rest(_a, [\"sizes\", \"style\", \"size\", \"weight\", \"align\", \"color\"]);\r\n var iconPosition = getIconPosition_1.getIconPosition(size, exports.breakpoints);\r\n var correctedPosition = correctIconPosition_1.correctIconPosition(iconPosition, weight);\r\n var viewBoxSize = exports.breakpoints[correctedPosition];\r\n var Icon = sizes[viewBoxSize][weight];\r\n return (react_1.default.createElement(Icon, tslib_1.__assign({ ref: ref, style: style, size: size, viewBoxSize: viewBoxSize, weight: weight, color: color, align: align }, rest)));\r\n});\r\nexports.Icon.displayName = 'Icon';\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.correctIconPosition = void 0;\r\nvar Icon_1 = require(\"./Icon\");\r\nexports.correctIconPosition = function (position, weight) {\r\n if (weight === 'light' && position > Icon_1.MAX_LIGHT_POSITION) {\r\n return Icon_1.MAX_LIGHT_POSITION;\r\n }\r\n if (weight === 'solid' && position > Icon_1.MAX_SOLID_POSITION) {\r\n return Icon_1.MAX_SOLID_POSITION;\r\n }\r\n return position;\r\n};\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CSSRules = void 0;\r\nexports.CSSRules = [\r\n \".ui-parking-icon-centered { \\n display: -webkit-inline-box;\\n display: inline-flex;\\n -webkit-box-align: center;\\n align-items: center; \\n }\",\r\n \".ui-parking-icon-centered::before {\\n /*\\n * ZERO WIDTH SPACE\\n *\\n * Symbol to align to baseline\\n *\\n * @see https://www.fileformat.info/info/unicode/char/200b/index.htm\\n */\\n content: '\\\\200B';\\n }\",\r\n \".ui-parking-icon-base { \\n outline: none; \\n }\",\r\n \".ui-parking-icon-base:focus-visible { \\n outline: blue auto 5px; \\n }\",\r\n];\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getIconPosition = void 0;\r\nexports.getIconPosition = function (size, breakpoints) {\r\n // If the size is already in the list we return its position.\r\n var exactMatch = breakpoints.indexOf(size);\r\n if (exactMatch !== -1) {\r\n return exactMatch;\r\n }\r\n var biggerIndex = breakpoints.findIndex(function (item) { return item >= size; });\r\n var smallerIndex = biggerIndex - 1;\r\n // If the size is located between two numbers we return the position of smaller number.\r\n if (biggerIndex !== -1 && smallerIndex !== -1) {\r\n return smallerIndex;\r\n }\r\n var lastIndex = breakpoints.length - 1;\r\n // If the size is bigger than the biggest number in the list we return the position of the last number in the list.\r\n if (size > breakpoints[lastIndex]) {\r\n return lastIndex;\r\n }\r\n // In all other cases we return 0 as fallback.\r\n return 0;\r\n};\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.injectCss = void 0;\r\nvar tslib_1 = require(\"tslib\");\r\nvar cssRules_1 = require(\"./cssRules\");\r\nfunction checkRuleExists(rootNodeStyles, cssText) {\r\n return rootNodeStyles.some(function (cssRules) { return Array.from(cssRules).some(function (r) { return r.cssText === cssText; }); });\r\n}\r\n/**\r\n * ponyfill for old browsers aka ie11, delete after drop support\r\n */\r\nfunction getRootNode(node) {\r\n return typeof Node === 'function' && Object.prototype.hasOwnProperty.call(Node.prototype, 'getRootNode')\r\n ? node.getRootNode()\r\n : node.ownerDocument;\r\n}\r\n/**\r\n * Whether the current browser supports `adoptedStyleSheets`.\r\n * https://github.com/lit/lit-element/blob/master/src/lib/css-tag.ts#L14\r\n */\r\nvar supportsAdoptingStyleSheets = Boolean(typeof window !== 'undefined' &&\r\n window.ShadowRoot &&\r\n (window.ShadyCSS === undefined || window.ShadyCSS.nativeShadow) &&\r\n 'adoptedStyleSheets' in Document.prototype &&\r\n 'replace' in CSSStyleSheet.prototype);\r\nfunction injectCss(element) {\r\n var _a;\r\n var rootNode = getRootNode(element);\r\n if (!rootNode) {\r\n return;\r\n }\r\n if (supportsAdoptingStyleSheets) {\r\n var currentWindow = element.ownerDocument.defaultView;\r\n if (!currentWindow) {\r\n return;\r\n }\r\n var typedRootNode = rootNode;\r\n var rootNodeStyles_1 = typedRootNode.adoptedStyleSheets.map(function (item) { return item.cssRules; });\r\n var cssRulesStyleSheet_1 = new currentWindow.CSSStyleSheet();\r\n cssRules_1.CSSRules.forEach(function (rule) { return cssRulesStyleSheet_1.insertRule(rule); });\r\n var filteredStyleSheet_1 = new currentWindow.CSSStyleSheet();\r\n Array.from(cssRulesStyleSheet_1.cssRules).forEach(function (cssRule) {\r\n if (!checkRuleExists(rootNodeStyles_1, cssRule.cssText)) {\r\n filteredStyleSheet_1.insertRule(cssRule.cssText);\r\n }\r\n });\r\n if (filteredStyleSheet_1.cssRules.length > 0) {\r\n try {\r\n typedRootNode.adoptedStyleSheets.push(filteredStyleSheet_1);\r\n }\r\n catch (e) {\r\n // fix for old chrome https://chromestatus.com/feature/5638996492288000 , but slow performance\r\n typedRootNode.adoptedStyleSheets = tslib_1.__spreadArrays(typedRootNode.adoptedStyleSheets, [filteredStyleSheet_1]);\r\n }\r\n }\r\n }\r\n else {\r\n var styleId = 'ui-parking-icons-style';\r\n var isShadowRoot = !!rootNode.host;\r\n var rootElement = isShadowRoot ? rootNode.firstElementChild : rootNode;\r\n var hasInsertStyles = (_a = rootElement) === null || _a === void 0 ? void 0 : _a.querySelector(\"#\" + styleId);\r\n var elementForStyle = isShadowRoot ? rootElement : rootElement.getElementsByTagName('head')[0];\r\n if (!hasInsertStyles) {\r\n var style = element.ownerDocument.createElement('style');\r\n style.id = styleId;\r\n style.innerHTML = cssRules_1.CSSRules.join('');\r\n elementForStyle === null || elementForStyle === void 0 ? void 0 : elementForStyle.appendChild(style);\r\n }\r\n }\r\n}\r\nexports.injectCss = injectCss;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.mergeRefs = exports.isNonNullable = void 0;\r\n/**\r\n * Проверяет, не является ли переданный аргумент null или undefined и исключает типы null и undefined из типа аргумента\r\n *\r\n * @param value Значение, которое нужно проверить и исключить из него типы\r\n * @returns Возвращает true, если переданный аргумент не является null или undefined иначе false\r\n */\r\nexports.isNonNullable = function (value) {\r\n return value !== null && value !== undefined;\r\n};\r\n/**\r\n * Merges two or more refs into one.\r\n *\r\n * @param refs Array of refs.\r\n * @returns A single ref composing all the refs passed.\r\n *\r\n * @example\r\n * const SomeComponent = forwardRef((props, ref) => {\r\n * const localRef = useRef();\r\n *\r\n * return
    ;\r\n * });\r\n */\r\nfunction mergeRefs(refs) {\r\n return function (value) {\r\n refs.forEach(function (ref) {\r\n if (typeof ref === 'function') {\r\n return ref(value);\r\n }\r\n else if (exports.isNonNullable(ref)) {\r\n return (ref.current = value);\r\n }\r\n });\r\n };\r\n}\r\nexports.mergeRefs = mergeRefs;\r\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],t):\"object\"==typeof exports?exports.Tracker=t(require(\"react\")):e.Tracker=t(e.react)}(self,(function(e){return function(){var t={745:function(e,t,n){\"use strict\";n.r(t),n.d(t,{componentsToDebugString:function(){return ue},default:function(){return me},getFullscreenElement:function(){return _},getScreenFrame:function(){return B},hashComponents:function(){return le},isAndroid:function(){return F},isChromium:function(){return P},isDesktopSafari:function(){return A},isEdgeHTML:function(){return M},isGecko:function(){return j},isTrident:function(){return x},isWebKit:function(){return R},load:function(){return pe},loadSources:function(){return E},murmurX64Hash128:function(){return ve},prepareForSources:function(){return de},sources:function(){return ae},transformSource:function(){return C}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=r+n?(r=a,[4,s(0)]):[3,3]):[3,4];case 2:i.sent(),i.label=3;case 3:return++o,[3,1];case 4:return[2]}}))}))}function f(e){e.then(void 0,(function(){}))}function p(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function m(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function v(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function h(e,t){return 0==(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=y(e=m(e,[4283543511,3981806797]),[0,e[0]>>>1]),y(e=m(e,[3301882366,444984403]),[0,e[0]>>>1])}function b(e,t){t=t||0;var n,r=(e=e||\"\").length%16,o=e.length-r,i=[0,t],a=[0,t],c=[0,0],s=[0,0],u=[2277735313,289559509],l=[1291169091,658871167];for(n=0;n>>0).toString(16)).slice(-8)+(\"00000000\"+(i[1]>>>0).toString(16)).slice(-8)+(\"00000000\"+(a[0]>>>0).toString(16)).slice(-8)+(\"00000000\"+(a[1]>>>0).toString(16)).slice(-8)}function w(e){return parseInt(e)}function k(e){return parseFloat(e)}function S(e,t){return\"number\"==typeof e&&isNaN(e)?t:e}function T(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function L(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var n=1/t;return Math.round(e*n)/n}function V(e){return e&&\"object\"==typeof e&&\"message\"in e?e:{message:e}}function I(e){return\"function\"!=typeof e}function E(e,t,n){var r=Object.keys(e).filter((function(e){return!function(e,t){for(var n=0,r=e.length;n=4}function M(){var e=window,t=navigator;return T([\"msWriteProfilerMark\"in e,\"MSStream\"in e,\"msLaunchUri\"in t,\"msSaveBlob\"in t])>=3&&!x()}function P(){var e=window,t=navigator;return T([\"webkitPersistentStorage\"in t,\"webkitTemporaryStorage\"in t,0===t.vendor.indexOf(\"Google\"),\"webkitResolveLocalFileSystemURL\"in e,\"BatteryManager\"in e,\"webkitMediaStream\"in e,\"webkitSpeechGrammar\"in e])>=5}function R(){var e=window,t=navigator;return T([\"ApplePayError\"in e,\"CSSPrimitiveValue\"in e,\"Counter\"in e,0===t.vendor.indexOf(\"Apple\"),\"getStorageUpdates\"in t,\"WebKitMediaKeys\"in e])>=4}function A(){var e=window;return T([\"safari\"in e,!(\"DeviceMotionEvent\"in e),!(\"ongestureend\"in e),!(\"standalone\"in navigator)])>=3}function j(){var e,t,n=window;return T([\"buildID\"in navigator,\"MozAppearance\"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),\"onmozfullscreenchange\"in n,\"mozInnerScreenX\"in n,\"CSSMozDocumentRule\"in n,\"CanvasCaptureMediaStream\"in n])>=4}function _(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function F(){var e=P(),t=j();if(!e&&!t)return!1;var n=window;return T([\"onorientationchange\"in n,\"orientation\"in n,e&&!(\"SharedWorker\"in n),t&&/android/i.test(navigator.appVersion)])>=2}function O(e){var t=new Error(e);return t.name=e,t}function W(e,t,n){var r,a,c;return void 0===n&&(n=50),o(this,void 0,void 0,(function(){var o,u;return i(this,(function(i){switch(i.label){case 0:o=document,i.label=1;case 1:return o.body?[3,3]:[4,s(n)];case 2:return i.sent(),[3,1];case 3:u=o.createElement(\"iframe\"),i.label=4;case 4:return i.trys.push([4,,10,11]),[4,new Promise((function(e,n){var r=!1,i=function(){r=!0,e()};u.onload=i,u.onerror=function(e){r=!0,n(e)};var a=u.style;a.setProperty(\"display\",\"block\",\"important\"),a.position=\"absolute\",a.top=\"0\",a.left=\"0\",a.visibility=\"hidden\",t&&\"srcdoc\"in u?u.srcdoc=t:u.src=\"about:blank\",o.body.appendChild(u);var c=function(){var e,t;r||(\"complete\"===(null===(t=null===(e=u.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?i():setTimeout(c,10))};c()}))];case 5:i.sent(),i.label=6;case 6:return(null===(a=null===(r=u.contentWindow)||void 0===r?void 0:r.document)||void 0===a?void 0:a.body)?[3,8]:[4,s(n)];case 7:return i.sent(),[3,6];case 8:return[4,e(u,u.contentWindow)];case 9:return[2,i.sent()];case 10:return null===(c=u.parentNode)||void 0===c||c.removeChild(u),[7];case 11:return[2]}}))}))}function D(e){for(var t=function(e){for(var t,n,r=\"Unexpected syntax '\".concat(e,\"'\"),o=/^\\s*([a-z-]*)(.*)$/i.exec(e),i=o[1]||void 0,a={},c=/([.:#][\\w-]+|\\[.+?\\])/gi,s=function(e,t){a[e]=a[e]||[],a[e].push(t)};;){var u=c.exec(o[2]);if(!u)break;var l=u[0];switch(l[0]){case\".\":s(\"class\",l.slice(1));break;case\"#\":s(\"id\",l.slice(1));break;case\"[\":var d=/^\\[([\\w-]+)([~|^$*]?=(\"(.*?)\"|([\\w-]+)))?(\\s+[is])?\\]$/.exec(l);if(!d)throw new Error(r);s(d[1],null!==(n=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==n?n:\"\");break;default:throw new Error(r)}}return[i,a]}(e),n=t[0],r=t[1],o=document.createElement(null!=n?n:\"div\"),i=0,a=Object.keys(r);i.6*n.length}))).sort(),[2,o]}var c}))}))},fontPreferences:function(){return void 0===e&&(e=4e3),W((function(t,n){var r=n.document,o=r.body,i=o.style;i.width=\"\".concat(e,\"px\"),i.webkitTextSizeAdjust=i.textSizeAdjust=\"none\",P()?o.style.zoom=\"\".concat(1/n.devicePixelRatio):R()&&(o.style.zoom=\"reset\");var c=r.createElement(\"div\");return c.textContent=a([],Array(e/20<<0),!0).map((function(){return\"word\"})).join(\" \"),o.appendChild(c),function(e,t){for(var n={},r={},o=0,i=Object.keys(ie);o');var e},audio:function(){var e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(R()&&!A()&&!function(){var e=window;return T([\"DOMRectList\"in e,\"RTCPeerConnectionIceEvent\"in e,\"SVGGeometryElement\"in e,\"ontransitioncancel\"in e])>=3}())return-1;var n=new t(1,5e3,44100),r=n.createOscillator();r.type=\"triangle\",r.frequency.value=1e4;var o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);var i=function(e){var t=function(){};return[new Promise((function(n,r){var o=!1,i=0,a=0;e.oncomplete=function(e){return n(e.renderedBuffer)};var c=function(){setTimeout((function(){return r(O(\"timeout\"))}),Math.min(500,a+5e3-Date.now()))},s=function(){try{var t=e.startRendering();switch(u(t)&&f(t),e.state){case\"running\":a=Date.now(),o&&c();break;case\"suspended\":document.hidden||i++,o&&i>=3?r(O(\"suspended\")):setTimeout(s,500)}}catch(e){r(e)}};s(),t=function(){o||(o=!0,a>0&&c())}})),t]}(n),a=i[0],c=i[1],s=a.then((function(e){return function(e){for(var t=0,n=0;n=3||n.push(t.languages);else if(\"string\"==typeof t.languages){var o=t.languages;o&&n.push(o.split(\",\"))}return n},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return S(k(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(e){return S(w(e),null)},n=[t(e.width),t(e.height)];return n.sort().reverse(),n},hardwareConcurrency:function(){return S(w(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var n=(new t).resolvedOptions().timeZone;if(n)return n}var r,o=(r=(new Date).getFullYear(),-Math.max(k(new Date(r,0,1).getTimezoneOffset()),k(new Date(r,6,1).getTimezoneOffset())));return\"UTC\".concat(o>=0?\"+\":\"\").concat(Math.abs(o))},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!x()&&!M())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return\"MacIntel\"===e&&R()&&!A()?function(){if(\"iPad\"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return T([\"MediaSource\"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?\"iPad\":\"iPhone\":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],n=0;n=.001))try{var e=new XMLHttpRequest;e.open(\"get\",\"https://m1.openfpcdn.io/fingerprintjs/v\".concat(c,\"/npm-monitoring\"),!0),e.send()}catch(e){console.error(e)}}(),[4,de(n)];case 1:return e.sent(),[2,fe(E(ae,{debug:r},[]),r)]}}))}))}var me={load:pe,hashComponents:le,componentsToDebugString:ue},ve=b},433:function(e,t){\"use strict\";function n(){if(!(e=document.createElement(\"canvas\")).getContext||!e.getContext(\"2d\"))return!1;var e,t,n=document.createElement(\"canvas\");try{t=n.getContext&&(n.getContext(\"webgl\")||n.getContext(\"experimental-webgl\"))}catch(e){t=!1}return!!window.WebGLRenderingContext&&!!t}function r(){try{if(!n)return\"unsupported\";var e=function(){var e,t=document.createElement(\"canvas\");try{e=t.getContext(\"webgl\")||t.getContext(\"experimental-webgl\")}catch(e){}return e||(e=null),e}();if(null==e)return\"unsupported\";var t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);var r=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW),t.itemSize=3,t.numItems=3;var o=e.createProgram(),i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,\"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}\"),e.compileShader(i);var a=e.createShader(e.FRAGMENT_SHADER);if(e.shaderSource(a,\"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}\"),e.compileShader(a),e.attachShader(o,i),e.attachShader(o,a),e.linkProgram(o),e.useProgram(o),o.vertexPosAttrib=e.getAttribLocation(o,\"attrVertex\"),o.offsetUniform=e.getUniformLocation(o,\"uniformOffset\"),e.enableVertexAttribArray(o.vertexPosArray),e.vertexAttribPointer(o.vertexPosAttrib,t.itemSize,e.FLOAT,!1,0,0),e.uniform2f(o.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,t.numItems),null!=e.canvas)return e.canvas.toDataURL()}catch(e){null===console||void 0===console||console.log(e)}return\"failedcollect\"}Object.defineProperty(t,\"__esModule\",{value:!0}),t.getWebGlFingerprint=void 0,t.getWebGlFingerprint=r,t.default=r},995:function(e,t,n){\"use strict\";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=1)&&(t(\"done\"),clearInterval(r))}),10)})).then((function(){e.sendRequestWithProps({category:t,action:n,label:r,customVariables:o})})):e.sendRequestWithProps({category:t,action:n,label:r,customVariables:o})},this.sendRequestWithProps=function(t,n,o){o&&e.setUseType(o),t&&e.contextVariables&&(void 0===t.customVariables?t.customVariables=e.contextVariables:\"object\"!=typeof t.customVariables||null===t.customVariables||t.customVariables instanceof Array||(t.customVariables=r(r({},e.contextVariables),t.customVariables))),e.sendRequest(t,e.trackerProps,n,e.options&&e.options.enableHashSending,e.fp,e.platformVersion,e.ngToken),e.resetUseType()},this.onDocumentLoaded=function(e){Array.isArray(e)&&(\"complete\"===document.readyState||\"interactive\"===document.readyState?e.forEach((function(e){return e()})):document.addEventListener(\"DOMContentLoaded\",(function(){e.forEach((function(e){return e()}))})))},this.trackWebVitalsMetric=function(t){e.trackEvent(\"auto\",\"web-vitals\",t.name,{value:t.value,id:t.id,delta:t.delta})}}return e.prototype.initialize=function(e){var t=e.siteID,n=e.trackerENV,r=e.devMode,o=e.options;return this.throwIfIncorrectProps(t,n),this.ID=t,this.ENV=n,r?this.enableDevMode():this.enableProdMode(),this.setUpTimer(),this.setFPAndCH(),this.setNgToken(),this.options=o||this.defaultOptions,this.setOptions(this.options),this},e.prototype.setFPAndCH=function(){this.setFP(),this.setCH()},e.prototype.setFP=function(){var e=this;try{var t=(0,u.getCookie)(this.fpCookie);if(t&&(40===t.length||this.devMode))this.fp=t;else if(this.devMode)this.fp=\"\";else{var n=d.fingerprintEndpoints[this.ENV],r=(0,c.getFingerprintAsync)({serverUrl:n});o(e,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,r];case 1:return(e=n.sent()).IsSuccessful&&e.KonturVisitorId?(this.fp=e.KonturVisitorId,t=(0,u.getDomainForSessionCookie)(),(0,u.setCookie)(this.fpCookie,e.KonturVisitorId,{isSession:!0,domain:t})):this.fp=\"\",[2]}}))})).catch((function(){e.fp=\"\"}))}}catch(e){this.fp=\"\",console.error(\"Couldn't generate FP\")}},e.prototype.setCH=function(){var e=this;if(window.navigator){var t=window.navigator.userAgentData;if(t&&\"string\"==typeof t.platform){var n=t.getHighEntropyValues([\"platformVersion\"]);!n||\"object\"!=typeof n&&\"function\"!=typeof n||\"function\"!=typeof n.then||n.then((function(t){t.platformVersion&&t.platformVersion.length&&(e.platformVersion=t.platformVersion)}))}}},e.prototype.trackPageVisit=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){return this.resetTrackerProps(),this.trackEvent(\"auto\",\"visitPage\",e||document.title),this.setUpTimer(),[2]}))}))},e.prototype.trackElement=function(e,t,n){var r=this;void 0!==e.addEventListener?e.addEventListener(t,(function(){r.sendRequestWithProps(n,e,\"HTMLElement\")})):console.error(\"Element doesn't have 'addEventListener' property\")},e.prototype.setUseType=function(e){this.useType=e},e.prototype.resetUseType=function(){this.useType=this.initialUseType},e.prototype.validateHTML=function(e){var t,n=this;return t=this.DOMInteraction.getElements(e).reduce((function(e,t){var r=[],o=n.DOMInteraction.extractParamsFromElement(t);void 0===o.category&&r.push(\"empty category\");var i={element:t,params:o,errors:r};return e.push(i),r.length&&console.error('element \"'.concat(o.category,'\": \"').concat(o.action,'\" contain errors: ').concat(r.map((function(e){return'\"'+e+'\"'})).join(\", \")),i),e}),[]),console.log(t),t},e.prototype.enableDevMode=function(){this.devMode=!0,this.throwIfIncorrectProps(this.ID,this.ENV),this.sendRequest=(0,f.getSendRequest)(\"dev\",this.ID,this.ENV)},e.prototype.enableHTMLTracking=function(){if(!this.isHTMLTracking){this.isHTMLTracking=!0;var e=this.options&&this.options.root,t=this.DOMInteraction.getElements(e);if(t.length){for(var n=0;n0?\"-\":\"+\",r=Math.abs(e),o=Math.floor(r/60),i=r%60;return\"GMT\".concat(t).concat(n(o),\":\").concat(n(i))};var n=function(e){return\"\".concat(e<10?\"0\"+e:e)}},277:function(e,t){\"use strict\";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&(o||n)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},f=-1,p=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){u((function(e){var t=e.timeStamp;f=t}),!0)},v=function(){return f<0&&(f=p(),m(),l((function(){setTimeout((function(){f=p(),m()}),0)}))),{get firstHiddenTime(){return f}}},h=function(e,t){var n,r=v(),o=c(\"FCP\"),i=function(e){\"first-contentful-paint\"===e.name&&(u&&u.disconnect(),e.startTime-1&&e(t)},o=c(\"CLS\",0),i=0,a=[],f=function(e){if(!e.hadRecentInput){var t=a[0],r=a[a.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]),i>o.value&&(o.value=i,o.entries=a,n())}},p=s(\"layout-shift\",f);p&&(n=d(r,o,t),u((function(){p.takeRecords().map(f),n(!0)})),l((function(){i=0,g=-1,o=c(\"CLS\",0),n=d(r,o,t)})))},w={passive:!0,capture:!0},k=new Date,S=function(e,t){r||(r=t,o=e,i=new Date,V(removeEventListener),T())},T=function(){if(o>=0&&o1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){S(e,t),o()},r=function(){o()},o=function(){removeEventListener(\"pointerup\",n,w),removeEventListener(\"pointercancel\",r,w)};addEventListener(\"pointerup\",n,w),addEventListener(\"pointercancel\",r,w)}(t,e):S(t,e)}},V=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,L,w)}))},I=function(e,t){var n,i=v(),f=c(\"FID\"),p=function(e){e.startTimeperformance.now())return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"pageshow\",t)}},156:function(t){\"use strict\";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}return r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r(303)}()}));","/** @license React v16.14.0\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var l=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cQ.length&&Q.push(a)}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k;\n 'data-tid'?: string;\n}\n\nexport const ValidationText = ({ pos, children, validation, 'data-tid': dataTid }: ValidationTextProps) => {\n if (pos === 'right') {\n return (\n \n {children}\n \n {(validation && validation.message) || ''}\n \n \n );\n }\n\n return (\n \n {children}\n \n \n {(validation && validation.message) || ''}\n \n \n \n );\n};\n","/**\n * Проверяет, не является ли переданный аргумент null или undefined и исключает типы null и undefined из типа аргумента\n *\n * @param value Значение, которое нужно проверить и исключить из него типы\n * @returns Возвращает true, если переданный аргумент не является null или undefined иначе false\n */\nexport const isNonNullable = (value: T): value is NonNullable => {\n return value !== null && value !== undefined;\n};\n","import { isNonNullable } from '../src/utils/isNonNullable';\n\ndeclare function require(name: string): any;\n\nconst defaultOrNamed = (module: any, component: string) =>\n module && module.__esModule && module.default ? module.default : module[component];\n\nconst Tooltip = defaultOrNamed(require('__REACT_UI_PACKAGE__/components/Tooltip'), 'Tooltip');\n\nexport { Tooltip };\n\nexport class ReactUiDetection {\n public static isDatePicker(childrenArray: any): boolean {\n return isNonNullable(childrenArray) && childrenArray.type?.__KONTUR_REACT_UI__ === 'DatePicker';\n }\n\n public static isRadioGroup(childrenArray: any): boolean {\n return isNonNullable(childrenArray) && childrenArray.type?.__KONTUR_REACT_UI__ === 'RadioGroup';\n }\n\n public static isTokenInput(childrenArray: any): boolean {\n return isNonNullable(childrenArray) && childrenArray.type?.__KONTUR_REACT_UI__ === 'TokenInput';\n }\n\n public static isSwitcher(childrenArray: any): boolean {\n return isNonNullable(childrenArray) && childrenArray.type?.__KONTUR_REACT_UI__ === 'Switcher';\n }\n public static isComboBox(childrenArray: any): boolean {\n return isNonNullable(childrenArray) && childrenArray.type?.__KONTUR_REACT_UI__ === 'ComboBox';\n }\n}\n","import React from 'react';\n\nimport { ReactUiDetection, Tooltip } from './ReactUiDetection';\n\nexport type TooltipPosition =\n | 'top left'\n | 'top center'\n | 'top right'\n | 'bottom left'\n | 'bottom center'\n | 'bottom right'\n | 'left top'\n | 'left middle'\n | 'left bottom'\n | 'right top'\n | 'right middle'\n | 'right bottom';\n\nexport interface ValidationTooltipProps {\n children: React.ReactElement;\n error: boolean;\n pos?: TooltipPosition;\n render?: () => React.ReactNode;\n 'data-tid'?: string;\n}\n\nexport class ValidationTooltip extends React.Component {\n public render() {\n const { children, pos, error, render, ...rest } = this.props;\n\n const onlyChild = React.Children.only(children);\n const child = onlyChild && onlyChild.props ? onlyChild.props.children : null;\n\n if (\n ReactUiDetection.isRadioGroup(child) ||\n ReactUiDetection.isTokenInput(child) ||\n ReactUiDetection.isSwitcher(child)\n ) {\n return (\n \n {child}\n \n );\n }\n\n return (\n \n {children}\n \n );\n }\n}\n","/* eslint-disable react/display-name */\nimport React from 'react';\n\nimport { ValidationText } from './ValidationText';\nimport { TooltipPosition, ValidationTooltip } from './ValidationTooltip';\nimport { RenderErrorMessage, TextPosition } from './ValidationWrapperInternal';\n\nexport function tooltip(pos: TooltipPosition): RenderErrorMessage {\n return (control, hasError, validation) => {\n return (\n {\n if (!validation || !validation.message) {\n return null;\n }\n return (validation && validation.message) || '';\n }}\n >\n {control}\n \n );\n };\n}\n\nexport function text(pos: TextPosition = 'right'): RenderErrorMessage {\n return (control, _hasError, validation) => {\n return (\n \n {control}\n \n );\n };\n}\n","const env: NodeJS.ProcessEnv = (typeof process === 'object' && process && process.env) || {};\nconst { enableReactTesting, NODE_ENV, REACT_UI_TEST, REACT_APP_REACT_UI_TEST, STORYBOOK_REACT_UI_TEST } = env;\n\nconst isReactUITestEnv =\n Boolean(REACT_UI_TEST) || // for cases when NODE_ENV is not usable (dev/prod)\n Boolean(REACT_APP_REACT_UI_TEST) || // for usage with CRA\n Boolean(STORYBOOK_REACT_UI_TEST) || // for usage with storybook\n Boolean(enableReactTesting); // deprecated, legacy variable\n\nexport const isTestEnv = NODE_ENV === 'test' || isReactUITestEnv;\n\nexport const isBrowser = typeof window !== 'undefined';\n\nexport const canUseDOM = isBrowser && window.document && window.document.createElement;\n\nexport function isElement(el: unknown): el is Element {\n if (isBrowser) {\n return el instanceof Element;\n }\n\n return false;\n}\n\nexport function isNode(node: unknown): node is Node {\n if (isBrowser) {\n return node instanceof Node;\n }\n\n return false;\n}\n","/**\n * Checks if the value `null` or `undefined`.\n *\n * @param value Value to check for `null` and `undefined`.\n * @returns Returns `true` if `value` is `null` or `undefined`, else `false`.\n */\n// @ts-expect-error: TypeScript doesn't consider the check inside of the function.\nexport const isNullable = (value: T): value is null | undefined => {\n return value === null || value === undefined;\n};\n","import React from 'react';\n\nimport { ValidationWrapperInternal } from './ValidationWrapperInternal';\nimport { FocusMode, ScrollOffset, ValidateArgumentType } from './ValidationContainer';\nimport { isNullable } from './utils/isNullable';\n\nexport interface ValidationContextSettings {\n scrollOffset: ScrollOffset;\n disableSmoothScroll: boolean;\n}\n\nexport interface ValidationContextWrapperProps {\n children?: React.ReactNode;\n onValidationUpdated?: (isValid?: boolean) => void;\n scrollOffset?: number | ScrollOffset;\n disableSmoothScroll: boolean;\n}\n\nexport interface ValidationContextType {\n register: (wrapper: ValidationWrapperInternal) => void;\n unregister: (wrapper: ValidationWrapperInternal) => void;\n instanceProcessBlur: (wrapper: ValidationWrapperInternal) => void;\n onValidationUpdated: (wrapper: ValidationWrapperInternal, isValid: boolean) => void;\n getSettings: () => ValidationContextSettings;\n isAnyWrapperInChangingMode: () => boolean;\n}\n\nexport const ValidationContext = React.createContext({\n register: () => undefined,\n unregister: () => undefined,\n instanceProcessBlur: () => undefined,\n onValidationUpdated: () => undefined,\n getSettings: () => ({\n scrollOffset: {},\n disableSmoothScroll: false,\n }),\n isAnyWrapperInChangingMode: () => false,\n});\n\nValidationContext.displayName = 'ValidationContext';\n\nexport class ValidationContextWrapper extends React.Component {\n public childWrappers: ValidationWrapperInternal[] = [];\n\n public getSettings(): ValidationContextSettings {\n let scrollOffset: ScrollOffset = {};\n\n if (typeof this.props.scrollOffset === 'number') {\n scrollOffset = { top: this.props.scrollOffset };\n } else {\n scrollOffset = isNullable(this.props.scrollOffset) ? {} : this.props.scrollOffset;\n }\n\n const { top = 50, bottom = 0 } = scrollOffset;\n return {\n scrollOffset: {\n top,\n bottom,\n },\n disableSmoothScroll: this.props.disableSmoothScroll,\n };\n }\n\n public register(wrapper: ValidationWrapperInternal) {\n this.childWrappers.push(wrapper);\n }\n\n public unregister(wrapper: ValidationWrapperInternal) {\n this.childWrappers.splice(this.childWrappers.indexOf(wrapper), 1);\n this.onValidationRemoved();\n }\n\n public instanceProcessBlur(instance: ValidationWrapperInternal) {\n for (const wrapper of this.childWrappers.filter((x) => x !== instance && !x.isIndependent())) {\n wrapper.processBlur();\n }\n }\n\n public onValidationUpdated(wrapper: ValidationWrapperInternal, isValid?: boolean) {\n const { onValidationUpdated } = this.props;\n if (onValidationUpdated) {\n const isValidResult = !this.childWrappers.find((x) => {\n if (x === wrapper) {\n return !isValid;\n }\n return x.hasError();\n });\n onValidationUpdated(isValidResult);\n }\n }\n\n public isAnyWrapperInChangingMode(): boolean {\n return this.childWrappers.some((x) => x.isChanging);\n }\n\n public onValidationRemoved() {\n const { onValidationUpdated } = this.props;\n if (onValidationUpdated) {\n const isValidResult = !this.childWrappers.find((x) => x.hasError());\n onValidationUpdated(isValidResult);\n }\n }\n\n public getChildWrappersSortedByPosition(): ValidationWrapperInternal[] {\n const wrappersWithPosition = [...this.childWrappers].map((x) => ({\n target: x,\n position: x.getControlPosition(),\n }));\n wrappersWithPosition.sort((x, y) => {\n const xPosition = x.position;\n const yPosition = y.position;\n if (isNullable(xPosition) && isNullable(yPosition)) {\n return 0;\n }\n\n if (isNullable(xPosition)) {\n return 1;\n }\n if (isNullable(yPosition)) {\n return -1;\n }\n if (Math.sign(xPosition.x - yPosition.x) !== 0) {\n return Math.sign(xPosition.x - yPosition.x);\n }\n return Math.sign(xPosition.y - yPosition.y);\n });\n return wrappersWithPosition.map((x) => x.target);\n }\n\n public async validate(withoutFocusOrValidationSettings: ValidateArgumentType): Promise {\n const focusMode = ValidationContextWrapper.getFocusMode(withoutFocusOrValidationSettings);\n\n await Promise.all(this.childWrappers.map((x) => x.processSubmit()));\n\n const childrenWrappersSortedByPosition = this.getChildWrappersSortedByPosition();\n const firstError = childrenWrappersSortedByPosition.find((x) => x.hasError());\n if (focusMode === FocusMode.ErrorsAndWarnings) {\n childrenWrappersSortedByPosition.find((x) => x.hasError() || x.hasWarning())?.focus();\n }\n if (focusMode === FocusMode.Errors) {\n firstError?.focus();\n }\n if (this.props.onValidationUpdated) {\n this.props.onValidationUpdated(!firstError);\n }\n return !firstError;\n }\n\n private static getFocusMode(withoutFocusOrValidationSettings: ValidateArgumentType) {\n if (typeof withoutFocusOrValidationSettings === 'object' && 'focusMode' in withoutFocusOrValidationSettings) {\n return withoutFocusOrValidationSettings.focusMode;\n } else if (!withoutFocusOrValidationSettings) {\n return FocusMode.Errors;\n }\n return FocusMode.None;\n }\n\n public render() {\n return (\n \n {this.props.children}\n \n );\n }\n}\n","import React from 'react';\n\nimport { Nullable } from '../typings/Types';\n\nimport { createPropsGetter } from './utils/createPropsGetter';\nimport { isTestEnv } from './utils/utils';\nimport { ValidationContextWrapper } from './ValidationContextWrapper';\n\nexport interface ScrollOffset {\n top?: number;\n bottom?: number;\n}\n\nexport enum FocusMode {\n 'Errors',\n 'ErrorsAndWarnings',\n 'None',\n}\n\nexport interface ValidationSettings {\n focusMode: FocusMode;\n}\n\nexport type ValidateArgumentType = boolean | ValidationSettings;\n\nexport interface ValidationContainerProps {\n children?: React.ReactNode;\n onValidationUpdated?: (isValid?: Nullable) => void;\n scrollOffset?: number | ScrollOffset;\n disableSmoothScroll?: boolean;\n}\n\ntype DefaultProps = Required>;\n\nexport class ValidationContainer extends React.Component {\n public static __KONTUR_REACT_UI__ = 'ValidationContainer';\n\n public static defaultProps: DefaultProps = {\n disableSmoothScroll: isTestEnv,\n };\n\n private getProps = createPropsGetter(ValidationContainer.defaultProps);\n\n public static propTypes = {\n scrollOffset(props: ValidationContainerProps, propName: keyof ValidationContainerProps, componentName: string) {\n const { scrollOffset } = props;\n if (typeof scrollOffset === 'number') {\n return new Error(\n `[${componentName}]: scrollOffset as a number type has been deprecated, now use object { top?: number; bottom?: number; }`,\n );\n }\n },\n };\n\n private childContext: ValidationContextWrapper | null = null;\n\n public async submit(withoutFocus?: boolean): Promise;\n public async submit(validationSettings?: ValidationSettings): Promise;\n\n public async submit(\n withoutFocusOrValidationSettings: ValidateArgumentType = { focusMode: FocusMode.Errors },\n ): Promise {\n if (!this.childContext) {\n throw new Error('childContext is not defined');\n }\n await this.childContext.validate(withoutFocusOrValidationSettings);\n }\n\n public async validate(withoutFocus?: boolean): Promise;\n public async validate(validationSettings?: ValidationSettings): Promise;\n\n public validate(\n withoutFocusOrValidationSettings: ValidateArgumentType = { focusMode: FocusMode.Errors },\n ): Promise {\n if (!this.childContext) {\n throw new Error('childContext is not defined');\n }\n return this.childContext.validate(withoutFocusOrValidationSettings);\n }\n\n public render() {\n return (\n \n {this.props.children}\n \n );\n }\n\n private refChildContext = (el: ValidationContextWrapper | null) => (this.childContext = el);\n}\n","import React from 'react';\n\nexport type DefaultizedProps = P & DP;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function createPropsGetter(defaultProps: DP) {\n return function >(this: T) {\n return this.props as DefaultizedProps;\n };\n}\n","/* eslint-disable react/no-find-dom-node */\nimport { findDOMNode } from 'react-dom';\nimport React from 'react';\nimport warning from 'warning';\n\nimport { Nullable } from '../../../typings/Types';\nimport { isElement, isNode, canUseDOM } from '../utils';\n\ninterface InstanceWithRootNode {\n getRootNode: () => Nullable;\n}\n\nconst isInstanceWithRootNode = (instance: unknown): instance is InstanceWithRootNode => {\n return Boolean(instance) && Object.prototype.hasOwnProperty.call(instance, 'getRootNode');\n};\n\n/**\n * Temporary duplicates @skbkontur/react-ui/lib/rootNode/getRootNode.ts\n * */\n\nexport const getRootNode = (instance: Nullable): Nullable => {\n /**\n * Options of what instance can be:\n * 1. null or undefined\n * 2. DOM Element\n * 3. class Component instance (object)\n * 4. literally anything, returned from useImperativeHandle\n */\n\n if (!canUseDOM || !instance) {\n // instance can be `null` if component was unmounted\n // also checking undefined for convenient usage\n return null;\n }\n\n if (isElement(instance)) {\n // instance can be an Element already if its coming\n // from Refs of intrinsic elements (
    ,