@clickview/curator 1.0.14 → 1.0.15-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/curator-app.css +10 -2
- package/dist/curator-app.js +17 -1
- package/dist/en.json +1 -1
- package/dist/libs/analytics/src/enums/RegionName.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +236 -0
- package/dist/libs/analytics/src/interfaces/Config.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Folder.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/HashObject.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Owner.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Playlist.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Rating.d.ts +4 -0
- package/dist/libs/analytics/src/interfaces/Region.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/RegionalUrl.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/Resource.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/Series.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Subtitle.d.ts +4 -0
- package/dist/libs/analytics/src/interfaces/User.d.ts +6 -0
- package/dist/libs/analytics/src/interfaces/Video.d.ts +16 -0
- package/dist/libs/analytics/src/interfaces/index.d.ts +15 -0
- package/dist/libs/analytics/src/interfaces/primitives/BaseObject.d.ts +7 -0
- package/dist/libs/common/src/backbone/constants/Caches.d.ts +3 -0
- package/dist/libs/common/src/backbone/constants/CommonChannels.d.ts +5 -0
- package/dist/libs/common/src/backbone/constants/CommonServices.d.ts +5 -0
- package/dist/libs/common/src/backbone/constants/DataProviders.d.ts +4 -0
- package/dist/libs/common/src/backbone/core/AppLink.d.ts +37 -0
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +95 -0
- package/dist/libs/common/src/backbone/core/BaseApplication.d.ts +76 -0
- package/dist/libs/common/src/backbone/core/BaseBehavior.d.ts +6 -0
- package/dist/libs/common/src/backbone/core/BaseCollection.d.ts +7 -0
- package/dist/libs/common/src/backbone/core/BaseCollectionView.d.ts +16 -0
- package/dist/libs/common/src/backbone/core/BaseError.d.ts +18 -0
- package/dist/libs/common/src/backbone/core/BaseLayoutView.d.ts +11 -0
- package/dist/libs/common/src/backbone/core/BaseModel.d.ts +27 -0
- package/dist/libs/common/src/backbone/core/BaseNestedModel.d.ts +21 -0
- package/dist/libs/common/src/backbone/core/BaseService.d.ts +10 -0
- package/dist/libs/common/src/backbone/core/BaseView.d.ts +127 -0
- package/dist/libs/common/src/backbone/core/EventNames.d.ts +16 -0
- package/dist/libs/common/src/backbone/core/LayoutService.d.ts +31 -0
- package/dist/libs/common/src/backbone/core/ListenToRadio.d.ts +3 -0
- package/dist/libs/common/src/backbone/core/LocationUtils.d.ts +23 -0
- package/dist/libs/common/src/backbone/core/Middleware.d.ts +10 -0
- package/dist/libs/common/src/backbone/core/Shell.d.ts +79 -0
- package/dist/libs/common/src/backbone/core/Types.d.ts +12 -0
- package/dist/libs/common/src/backbone/core/index.d.ts +18 -0
- package/dist/libs/common/src/backbone/enums/DataServiceErrorType.d.ts +8 -0
- package/dist/libs/common/src/backbone/enums/HttpStatus.d.ts +10 -0
- package/dist/libs/common/src/backbone/enums/HttpVerbs.d.ts +6 -0
- package/dist/libs/common/src/backbone/errors/DevError.d.ts +4 -0
- package/dist/libs/common/src/backbone/index.d.ts +2 -0
- package/dist/libs/common/src/backbone/interfaces/BaseCollectionIdentifier.d.ts +18 -0
- package/dist/libs/common/src/backbone/interfaces/ChainableDataService.d.ts +9 -0
- package/dist/libs/common/src/backbone/interfaces/DataCache.d.ts +8 -0
- package/dist/libs/common/src/backbone/interfaces/DataProvider.d.ts +15 -0
- package/dist/libs/common/src/backbone/interfaces/DataServiceError.d.ts +7 -0
- package/dist/libs/common/src/backbone/interfaces/DataServiceRequests.d.ts +218 -0
- package/dist/libs/common/src/backbone/interfaces/Pagination.d.ts +33 -0
- package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +38 -0
- package/dist/libs/common/src/backbone/interfaces/Xhr.d.ts +9 -0
- package/dist/libs/common/src/backbone/interfaces/index.d.ts +9 -0
- package/dist/libs/common/src/backbone/services/BaseAlertService.d.ts +69 -0
- package/dist/libs/common/src/backbone/services/BaseDataService.d.ts +82 -0
- package/dist/libs/common/src/backbone/services/EnvironmentVariables.d.ts +13 -0
- package/dist/libs/common/src/backbone/services/InstanceManager.d.ts +33 -0
- package/dist/libs/common/src/backbone/services/LanguageService.d.ts +22 -0
- package/dist/libs/common/src/backbone/services/caches/FifoMemoryCache.d.ts +20 -0
- package/dist/libs/common/src/backbone/services/data-providers/AjaxDataProvider.d.ts +31 -0
- package/dist/libs/common/src/backbone/utils/ConcurrencyHelper.d.ts +13 -0
- package/dist/libs/common/src/backbone/utils/DataServiceErrorHelper.d.ts +2 -0
- package/dist/libs/common/src/backbone/utils/FunctionHelper.d.ts +8 -0
- package/dist/libs/common/src/backbone/utils/UrlHelper.d.ts +13 -0
- package/dist/libs/common/src/react/core/ReactApplication.d.ts +9 -0
- package/dist/libs/common/src/react/core/ReactLayoutView.d.ts +13 -0
- package/dist/libs/common/src/react/flight/FlightHelpers.d.ts +13 -0
- package/dist/libs/common/src/react/flight/FlightMiddleware.d.ts +11 -0
- package/dist/libs/common/src/react/flight/FlightReducer.d.ts +2 -0
- package/dist/libs/common/src/react/flight/FlightSimulator.d.ts +24 -0
- package/dist/libs/common/src/react/flight/constants/Actions.d.ts +7 -0
- package/dist/libs/common/src/react/flight/constants/index.d.ts +1 -0
- package/dist/libs/common/src/react/flight/data-layers/AjaxRequest.d.ts +2 -0
- package/dist/libs/common/src/react/flight/data-layers/index.d.ts +1 -0
- package/dist/libs/common/src/react/flight/enums/RequestStatus.d.ts +6 -0
- package/dist/libs/common/src/react/flight/enums/index.d.ts +1 -0
- package/dist/libs/common/src/react/flight/index.d.ts +9 -0
- package/dist/libs/common/src/react/flight/interfaces/Action.d.ts +28 -0
- package/dist/libs/common/src/react/flight/interfaces/Dispatch.d.ts +3 -0
- package/dist/libs/common/src/react/flight/interfaces/FlightState.d.ts +22 -0
- package/dist/libs/common/src/react/flight/interfaces/HttpRequest.d.ts +24 -0
- package/dist/libs/common/src/react/flight/interfaces/NormalizeOptions.d.ts +4 -0
- package/dist/libs/common/src/react/flight/interfaces/NormalizedData.d.ts +7 -0
- package/dist/libs/common/src/react/flight/interfaces/Request.d.ts +29 -0
- package/dist/libs/common/src/react/flight/interfaces/Response.d.ts +9 -0
- package/dist/libs/common/src/react/flight/interfaces/UpdateStateOptions.d.ts +15 -0
- package/dist/libs/common/src/react/flight/interfaces/index.d.ts +9 -0
- package/dist/libs/common/src/react/flight/normalizer/Denormalizer.d.ts +3 -0
- package/dist/libs/common/src/react/flight/normalizer/Normalizer.d.ts +8 -0
- package/dist/libs/common/src/react/flight/normalizer/index.d.ts +2 -0
- package/dist/libs/common/src/react/flight/utils/SimulatorHelper.d.ts +5 -0
- package/dist/libs/common/src/react/flight/utils/StateHelper.d.ts +11 -0
- package/dist/libs/common/src/react/flight/utils/index.d.ts +2 -0
- package/dist/libs/common/src/react/hooks/UseBulkFetch.d.ts +10 -0
- package/dist/libs/common/src/react/hooks/UseFetch.d.ts +10 -0
- package/dist/libs/common/src/react/hooks/UseInstance.d.ts +6 -0
- package/dist/libs/common/src/react/hooks/UseService.d.ts +2 -0
- package/dist/libs/common/src/react/index.d.ts +2 -0
- package/dist/libs/common/src/react/interfaces/ApplicationData.d.ts +3 -0
- package/dist/libs/common/src/react/interfaces/ApplicationState.d.ts +8 -0
- package/dist/libs/common/src/react/interfaces/BaseReducerActions.d.ts +4 -0
- package/dist/libs/common/src/react/interfaces/HashObject.d.ts +3 -0
- package/dist/libs/common/src/react/interfaces/index.d.ts +4 -0
- package/dist/libs/common/src/react/utils/ArrayHelper.d.ts +39 -0
- package/dist/libs/common/src/react/utils/FetchHelper.d.ts +50 -0
- package/dist/libs/common/src/react/utils/ObjectHelper.d.ts +10 -0
- package/dist/libs/common/src/react/utils/RandomHelper.d.ts +3 -0
- package/dist/libs/common/src/react/utils/TimeHelper.d.ts +7 -0
- package/dist/libs/common/src/react/utils/TypeHelper.d.ts +5 -0
- package/dist/libs/shared/src/apps/notifications/enums/NotificationType.d.ts +16 -0
- package/dist/libs/shared/src/apps/playlists/enums/PlaylistSortType.d.ts +5 -0
- package/dist/libs/shared/src/apps/playlists/interfaces/data-requests/CreateOrUpdatePlaylistRequest.d.ts +7 -0
- package/dist/libs/shared/src/apps/playlists/interfaces/data-requests/index.d.ts +1 -0
- package/dist/libs/shared/src/apps/playlists/interfaces/identifiers/PlaylistCollectionIdentifier.d.ts +5 -0
- package/dist/libs/shared/src/apps/playlists/interfaces/identifiers/PlaylistVideoCollectionIdentifier.d.ts +4 -0
- package/dist/libs/shared/src/apps/playlists/interfaces/identifiers/index.d.ts +2 -0
- package/dist/libs/shared/src/apps/playlists/interfaces/index.d.ts +2 -0
- package/dist/libs/shared/src/components/actions/ActionButton.d.ts +7 -0
- package/dist/libs/shared/src/components/actions/Actions.d.ts +21 -0
- package/dist/libs/shared/src/components/actions/ActionsDropdown.d.ts +14 -0
- package/dist/libs/shared/src/components/alert/Alert.d.ts +7 -0
- package/dist/libs/shared/src/components/alert/AlertContent.d.ts +8 -0
- package/dist/libs/shared/src/components/alert/AlertList.d.ts +8 -0
- package/dist/libs/shared/src/components/app-link/AppLink.d.ts +9 -0
- package/dist/libs/shared/src/components/confirmation-popup/ConfirmationPopup.d.ts +17 -0
- package/dist/libs/shared/src/components/div-button/DivButton.d.ts +10 -0
- package/dist/libs/shared/src/components/forms/form-buttons/FormButtons.d.ts +7 -0
- package/dist/libs/shared/src/components/forms/form-checkbox/FormCheckbox.d.ts +7 -0
- package/dist/libs/shared/src/components/forms/form-field/CharacterCounter.d.ts +7 -0
- package/dist/libs/shared/src/components/forms/form-field/FormField.d.ts +16 -0
- package/dist/libs/shared/src/components/forms/form-wrapper/FormWrapper.d.ts +20 -0
- package/dist/libs/shared/src/components/icon-button/IconButton.d.ts +15 -0
- package/dist/libs/shared/src/components/pagination/Pagination.d.ts +28 -0
- package/dist/libs/shared/src/components/popup/Popup.d.ts +10 -0
- package/dist/libs/shared/src/components/popup/PopupButtons.d.ts +14 -0
- package/dist/libs/shared/src/components/popup/PopupLoadingSpinner.d.ts +2 -0
- package/dist/libs/shared/src/components/search-bar/SearchBar.d.ts +134 -0
- package/dist/libs/shared/src/components/search-bar/SearchInput.d.ts +8 -0
- package/dist/libs/shared/src/components/search-bar/SearchUtils.d.ts +44 -0
- package/dist/libs/shared/src/components/spinner-button/SpinnerButton.d.ts +7 -0
- package/dist/libs/shared/src/components/svg-container/SvgContainer.d.ts +20 -0
- package/dist/libs/shared/src/components/text/Text.d.ts +13 -0
- package/dist/libs/shared/src/components/tooltip/Tooltip.d.ts +16 -0
- package/dist/libs/shared/src/constants/AppVariables.d.ts +4 -0
- package/dist/libs/shared/src/constants/CacheDurations.d.ts +4 -0
- package/dist/libs/shared/src/constants/DataPrefixes.d.ts +12 -0
- package/dist/libs/shared/src/constants/ImageSizes.d.ts +8 -0
- package/dist/libs/shared/src/constants/LayoutRegions.d.ts +7 -0
- package/dist/libs/shared/src/constants/RadioChannels.d.ts +20 -0
- package/dist/libs/shared/src/constants/SharedServices.d.ts +25 -0
- package/dist/libs/shared/src/enums/ClassificationType.d.ts +4 -0
- package/dist/libs/shared/src/enums/CountryCode.d.ts +5 -0
- package/dist/libs/shared/src/enums/CustomerType.d.ts +11 -0
- package/dist/libs/shared/src/enums/GlanceFormat.d.ts +3 -0
- package/dist/libs/shared/src/enums/Images.d.ts +26 -0
- package/dist/libs/shared/src/enums/MasterType.d.ts +59 -0
- package/dist/libs/shared/src/enums/MediaQueries.d.ts +18 -0
- package/dist/libs/shared/src/enums/ThemeType.d.ts +3 -0
- package/dist/libs/shared/src/enums/UserRole.d.ts +15 -0
- package/dist/libs/shared/src/enums/WidgetContents.d.ts +7 -0
- package/dist/libs/shared/src/hooks/UseAlerts.d.ts +6 -0
- package/dist/libs/shared/src/hooks/UseCanSubmitForm.d.ts +10 -0
- package/dist/libs/shared/src/hooks/UseMediaQuery.d.ts +1 -0
- package/dist/libs/shared/src/hooks/UseReorderedItems.d.ts +9 -0
- package/dist/libs/shared/src/images/svg/ImportedSvgs.d.ts +81 -0
- package/dist/libs/shared/src/images/svg/actions/index.d.ts +21 -0
- package/dist/libs/shared/src/images/svg/arrows/index.d.ts +9 -0
- package/dist/libs/shared/src/images/svg/index.d.ts +2 -0
- package/dist/libs/shared/src/images/svg/objects/index.d.ts +33 -0
- package/dist/libs/shared/src/images/svg/player/index.d.ts +14 -0
- package/dist/libs/shared/src/images/svg/settings.d.ts +1 -0
- package/dist/libs/shared/src/images/svg/status/index.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/AppLinkWithLabel.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/DialogOptions.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/ImageUrls.d.ts +16 -0
- package/dist/libs/shared/src/interfaces/QueryParams.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/RegionalUrl.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/WidgetContext.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/app-variables/BaseNotificationsAppVariables.d.ts +16 -0
- package/dist/libs/shared/src/interfaces/app-variables/BaseSearchAppVariables.d.ts +14 -0
- package/dist/libs/shared/src/interfaces/app-variables/index.d.ts +2 -0
- package/dist/libs/shared/src/interfaces/collections/AudienceCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/CategoryCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/ClipCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/CompanyCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/CustomerCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/FolderCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/InteractiveCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/LibraryCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/LinkCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/PersonCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/PlaylistCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/PresentationAudienceCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/ResourceCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/SeriesCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/TagCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/UserCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/VideoCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/WidgetCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/index.d.ts +20 -0
- package/dist/libs/shared/src/interfaces/collections/primitives/BasePaginatedCollection.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/collections/primitives/index.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/index.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/models/Audience.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Banner.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Category.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Channel.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Classification.d.ts +21 -0
- package/dist/libs/shared/src/interfaces/models/Clip.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/Company.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +11 -0
- package/dist/libs/shared/src/interfaces/models/Cover.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Customer.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/Folder.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/Following.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/Glance.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/HeroBanner.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Image.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/Interactive.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/LanguageConfig.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/Library.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Link.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Organisation.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Person.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Playlist.d.ts +10 -0
- package/dist/libs/shared/src/interfaces/models/Poster.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Presentation.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/PresentationAudience.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/Rating.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/Resource.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/models/Restriction.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/Season.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/Series.d.ts +10 -0
- package/dist/libs/shared/src/interfaces/models/Share.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/models/Subject.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/models/Tag.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/TallPoster.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Theme.d.ts +10 -0
- package/dist/libs/shared/src/interfaces/models/Thumbnail.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/User.d.ts +53 -0
- package/dist/libs/shared/src/interfaces/models/UserChannel.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/Video.d.ts +26 -0
- package/dist/libs/shared/src/interfaces/models/VideoWithRestrictions.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/Widget.d.ts +15 -0
- package/dist/libs/shared/src/interfaces/models/index.d.ts +43 -0
- package/dist/libs/shared/src/interfaces/models/primitives/BaseObject.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/primitives/index.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/props/ViewProps.d.ts +8 -0
- package/dist/libs/shared/src/interfaces/props/index.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/requests/ReorderRequest.d.ts +12 -0
- package/dist/libs/shared/src/interfaces/requests/UpdateVideoRequest.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/requests/index.d.ts +2 -0
- package/dist/libs/shared/src/interfaces/services/BaseLibraryDataService.d.ts +10 -0
- package/dist/libs/shared/src/interfaces/services/BaseSeriesDataService.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/services/BaseVideoDataService.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/services/BaseVideoUploadDataService.d.ts +8 -0
- package/dist/libs/shared/src/interfaces/services/index.d.ts +4 -0
- package/dist/libs/shared/src/services/UserDataService.d.ts +22 -0
- package/dist/libs/shared/src/utils/CollectionHelper.d.ts +9 -0
- package/dist/libs/shared/src/utils/FormHelper.d.ts +4 -0
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +30 -0
- package/dist/libs/shared/src/utils/ReorderHelper.d.ts +15 -0
- package/dist/libs/shared/src/utils/StateHelper.d.ts +13 -0
- package/dist/libs/shared/src/utils/SvgHelper.d.ts +19 -0
- package/dist/projects/curator/src/apps/companies/CompaniesApplication.d.ts +13 -0
- package/dist/projects/curator/src/apps/companies/components/edit-company/EditCompany.d.ts +9 -0
- package/dist/projects/curator/src/apps/companies/components/edit-company/EditCompanyForm.d.ts +6 -0
- package/dist/projects/curator/src/apps/companies/components/edit-company/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/companies/components/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/companies/flight-requests/CompanyRequests.d.ts +8 -0
- package/dist/projects/curator/src/apps/companies/flight-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/companies/interfaces/CreateOrUpdateCompanyRequest.d.ts +3 -0
- package/dist/projects/curator/src/apps/companies/interfaces/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/companies/utils/CompanyValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/companies/utils/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/companies/views/companies/CompaniesView.d.ts +6 -0
- package/dist/projects/curator/src/apps/companies/views/companies/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/companies/views/edit-company/EditCompanyView.d.ts +6 -0
- package/dist/projects/curator/src/apps/companies/views/edit-company/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/companies/views/index.d.ts +3 -0
- package/dist/projects/curator/src/apps/companies/views/new-company/NewCompanyView.d.ts +2 -0
- package/dist/projects/curator/src/apps/companies/views/new-company/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/DomainOptionsApplication.d.ts +16 -0
- package/dist/projects/curator/src/apps/domain-options/components/edit-domain-option-details/DefaultValueField.d.ts +8 -0
- package/dist/projects/curator/src/apps/domain-options/components/edit-domain-option-details/EditDomainOptionDetails.d.ts +8 -0
- package/dist/projects/curator/src/apps/domain-options/components/edit-domain-option-details/EditDomainOptionDetailsForm.d.ts +6 -0
- package/dist/projects/curator/src/apps/domain-options/components/edit-domain-option-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/components/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/data-requests/DomainOptionRequests.d.ts +9 -0
- package/dist/projects/curator/src/apps/domain-options/data-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/interfaces/data-requests/CreateOrUpdateDomainOptionRequest.d.ts +2 -0
- package/dist/projects/curator/src/apps/domain-options/interfaces/data-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/interfaces/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/domain-options/interfaces/models/DomainOption.d.ts +24 -0
- package/dist/projects/curator/src/apps/domain-options/interfaces/models/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/utils/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/utils/validation/DomainOptionValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/domain-options/utils/validation/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/views/delete-domain-option/DeleteDomainOptionView.d.ts +7 -0
- package/dist/projects/curator/src/apps/domain-options/views/delete-domain-option/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/views/domain-options/DomainOptionsView.d.ts +2 -0
- package/dist/projects/curator/src/apps/domain-options/views/domain-options/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/views/edit-domain-option/EditDomainOptionView.d.ts +6 -0
- package/dist/projects/curator/src/apps/domain-options/views/edit-domain-option/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/domain-options/views/index.d.ts +4 -0
- package/dist/projects/curator/src/apps/domain-options/views/new-domain-option/NewDomainOptionView.d.ts +2 -0
- package/dist/projects/curator/src/apps/domain-options/views/new-domain-option/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/PeopleApplication.d.ts +13 -0
- package/dist/projects/curator/src/apps/people/components/edit-person/EditPerson.d.ts +9 -0
- package/dist/projects/curator/src/apps/people/components/edit-person/EditPersonForm.d.ts +6 -0
- package/dist/projects/curator/src/apps/people/components/edit-person/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/components/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/flight-requests/PersonRequests.d.ts +8 -0
- package/dist/projects/curator/src/apps/people/flight-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/interfaces/CreateOrUpdatePersonRequest.d.ts +3 -0
- package/dist/projects/curator/src/apps/people/interfaces/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/utils/PersonValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/people/utils/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/views/edit-person/EditPersonView.d.ts +6 -0
- package/dist/projects/curator/src/apps/people/views/edit-person/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/views/index.d.ts +3 -0
- package/dist/projects/curator/src/apps/people/views/new-person/NewPersonView.d.ts +2 -0
- package/dist/projects/curator/src/apps/people/views/new-person/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/people/views/people/PeopleView.d.ts +6 -0
- package/dist/projects/curator/src/apps/people/views/people/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/PlaylistsApplication.d.ts +27 -0
- package/dist/projects/curator/src/apps/playlists/components/edit-playlist/EditPlaylistDetails.d.ts +9 -0
- package/dist/projects/curator/src/apps/playlists/components/edit-playlist/EditPlaylistDetailsForm.d.ts +8 -0
- package/dist/projects/curator/src/apps/playlists/components/edit-playlist/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/components/edit-playlist-nav/EditPlaylistNav.d.ts +7 -0
- package/dist/projects/curator/src/apps/playlists/components/edit-playlist-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/components/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/playlists/components/playlist-search/PlaylistSearch.d.ts +6 -0
- package/dist/projects/curator/src/apps/playlists/components/playlist-search/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/context/PlaylistsAppContext.d.ts +4 -0
- package/dist/projects/curator/src/apps/playlists/context/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/flight-requests/CuratorPlaylistRequests.d.ts +17 -0
- package/dist/projects/curator/src/apps/playlists/interfaces/data-requests/Playlist.d.ts +7 -0
- package/dist/projects/curator/src/apps/playlists/interfaces/data-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/interfaces/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/utils/PlaylistNavHelper.d.ts +4 -0
- package/dist/projects/curator/src/apps/playlists/utils/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/playlists/utils/validation/PlaylistValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/playlists/utils/validation/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/delete-playlist/DeletePlaylistView.d.ts +7 -0
- package/dist/projects/curator/src/apps/playlists/views/delete-playlist/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist/EditPlaylistView.d.ts +6 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist-audiences/EditPlaylistAudiencesView.d.ts +6 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist-audiences/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist-subjects/EditPlaylistSubjectsView.d.ts +6 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist-subjects/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist-videos/EditPlaylistVideosView.d.ts +6 -0
- package/dist/projects/curator/src/apps/playlists/views/edit-playlist-videos/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/index.d.ts +7 -0
- package/dist/projects/curator/src/apps/playlists/views/new-playlist/NewPlaylistView.d.ts +2 -0
- package/dist/projects/curator/src/apps/playlists/views/new-playlist/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/playlist-search-results/PlaylistSearchResultsView.d.ts +7 -0
- package/dist/projects/curator/src/apps/playlists/views/playlist-search-results/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/playlists/PlaylistsView.d.ts +6 -0
- package/dist/projects/curator/src/apps/playlists/views/playlists/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/playlists/views/remove-video/RemoveVideoView.d.ts +8 -0
- package/dist/projects/curator/src/apps/playlists/views/remove-video/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/SeriesApplication.d.ts +21 -0
- package/dist/projects/curator/src/apps/series/components/edit-series-details/EditSeriesDetails.d.ts +10 -0
- package/dist/projects/curator/src/apps/series/components/edit-series-details/EditSeriesDetailsForm.d.ts +10 -0
- package/dist/projects/curator/src/apps/series/components/edit-series-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/components/edit-series-nav/EditSeriesNav.d.ts +7 -0
- package/dist/projects/curator/src/apps/series/components/edit-series-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/components/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/series/context/SeriesAppContext.d.ts +4 -0
- package/dist/projects/curator/src/apps/series/context/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/flight-requests/CuratorSeriesRequests.d.ts +11 -0
- package/dist/projects/curator/src/apps/series/interfaces/data-requests/Series.d.ts +9 -0
- package/dist/projects/curator/src/apps/series/interfaces/data-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/interfaces/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/utils/SeriesNavHelper.d.ts +4 -0
- package/dist/projects/curator/src/apps/series/utils/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/series/utils/validation/SeriesValidation.d.ts +4 -0
- package/dist/projects/curator/src/apps/series/utils/validation/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/views/edit-series/EditSeriesView.d.ts +6 -0
- package/dist/projects/curator/src/apps/series/views/edit-series/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/views/edit-series-audiences/EditSeriesAudiencesView.d.ts +6 -0
- package/dist/projects/curator/src/apps/series/views/edit-series-audiences/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/views/edit-series-subjects/EditSeriesSubjectsView.d.ts +6 -0
- package/dist/projects/curator/src/apps/series/views/edit-series-subjects/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/views/index.d.ts +4 -0
- package/dist/projects/curator/src/apps/series/views/new-series/NewSeriesView.d.ts +2 -0
- package/dist/projects/curator/src/apps/series/views/new-series/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/SubjectsApplication.d.ts +53 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/audience-levels/AudienceLevels.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/audience-levels/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/edit-audience-details/EditAudienceDetails.d.ts +11 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/edit-audience-details/EditAudienceDetailsForm.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/edit-audience-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/edit-object-audiences/EditObjectAudiences.d.ts +18 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/edit-object-audiences/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/index.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/select-audiences/SelectAudiences.d.ts +12 -0
- package/dist/projects/curator/src/apps/subjects/components/audiences/select-audiences/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/classification-member-list/ClassificationMemberItem.d.ts +13 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/classification-member-list/ClassificationMemberList.d.ts +15 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/classification-member-list/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/classification-member-list/usePinnedVideo.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/edit-classification-details/EditClassificationDetails.d.ts +13 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/edit-classification-details/EditClassificationDetailsForm.d.ts +10 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/edit-classification-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/edit-classification-nav/EditClassificationNav.d.ts +10 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/edit-classification-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/index.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/select-classifications/SelectClassifications.d.ts +14 -0
- package/dist/projects/curator/src/apps/subjects/components/classifications/select-classifications/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/index.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/components/levels/edit-level-details/EditLevelDetails.d.ts +12 -0
- package/dist/projects/curator/src/apps/subjects/components/levels/edit-level-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/levels/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/components/levels/select-levels/SelectLevels.d.ts +15 -0
- package/dist/projects/curator/src/apps/subjects/components/levels/select-levels/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/presentations/edit-presentation-details/EditPresentationDetails.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/components/presentations/edit-presentation-details/EditPresentationDetailsForm.d.ts +8 -0
- package/dist/projects/curator/src/apps/subjects/components/presentations/edit-presentation-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/presentations/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/components/presentations/presentation-select/PresentationSelect.d.ts +15 -0
- package/dist/projects/curator/src/apps/subjects/components/presentations/presentation-select/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/add-subject-members/AddSubjectMembers.d.ts +12 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/add-subject-members/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/edit-object-subjects/EditObjectSubjects.d.ts +20 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/edit-object-subjects/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/edit-subject-details/EditSubjectDetails.d.ts +11 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/edit-subject-details/EditSubjectDetailsForm.d.ts +8 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/edit-subject-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/edit-subject-nav/EditSubjectNav.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/edit-subject-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/index.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/select-subjects/SelectSubjects.d.ts +18 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/select-subjects/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/subject-classifications/SubjectClassifications.d.ts +11 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/subject-classifications/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/subject-member-list/SubjectMemberItem.d.ts +12 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/subject-member-list/SubjectMemberList.d.ts +25 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/subject-member-list/SubjectMemberListHeader.d.ts +14 -0
- package/dist/projects/curator/src/apps/subjects/components/subjects/subject-member-list/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/components/top-nav/TopNav.d.ts +8 -0
- package/dist/projects/curator/src/apps/subjects/components/top-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/context/PresentationContext.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/context/SubjectsAppContext.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/context/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/enums/OwnerType.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/enums/SubjectMemberType.d.ts +5 -0
- package/dist/projects/curator/src/apps/subjects/enums/SubjectNodeType.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/enums/index.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/hooks/UseSetDefaultPresentation.d.ts +8 -0
- package/dist/projects/curator/src/apps/subjects/hooks/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/data-requests/Audience.d.ts +5 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/data-requests/Classification.d.ts +17 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/data-requests/Level.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/data-requests/Presentation.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/data-requests/Subject.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/data-requests/index.d.ts +5 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/models/ClassificationTree.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/models/Level.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/models/Presentation.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/models/SubjectTree.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/interfaces/models/index.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/services/SubjectDataService.d.ts +68 -0
- package/dist/projects/curator/src/apps/subjects/services/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/utils/SubjectMemberHelper.d.ts +8 -0
- package/dist/projects/curator/src/apps/subjects/utils/SubjectsNavHelper.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/utils/index.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/utils/validation/AudienceValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/utils/validation/ClassificationValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/utils/validation/LevelValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/utils/validation/PresentationValidation.d.ts +5 -0
- package/dist/projects/curator/src/apps/subjects/utils/validation/SubjectValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/utils/validation/index.d.ts +5 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/delete-audience/DeleteAudienceView.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/delete-audience/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/edit-audience/EditAudienceView.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/edit-audience/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/edit-audiences-list/EditAudiencesListView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/edit-audiences-list/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/index.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/new-audience/NewAudienceView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/audiences/new-audience/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/classification-nav/ClassificationNavUtils.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/classification-nav/ClassificationNavView.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/classification-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/delete-classification/DeleteClassificationView.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/delete-classification/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/edit-classification/EditClassificationView.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/edit-classification/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/edit-classification-members/EditClassificationMembersView.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/edit-classification-members/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/index.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/new-classification/NewClassificationView.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/new-classification/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/remove-classification-member/RemoveClassificationMemberView.d.ts +11 -0
- package/dist/projects/curator/src/apps/subjects/views/classifications/remove-classification-member/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/index.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-level/EditLevelView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-level/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-levels-list/EditLevelsListView.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-levels-list/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/levels/index.d.ts +3 -0
- package/dist/projects/curator/src/apps/subjects/views/levels/new-level/NewLevelView.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/views/levels/new-level/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/edit-presentation/EditPresentationView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/edit-presentation/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/edit-presentations-list/EditPresentationsListView.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/edit-presentations-list/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/index.d.ts +4 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/new-presentation/NewPresentationView.d.ts +2 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/new-presentation/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/select-presentation/SelectPresentationView.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/views/presentations/select-presentation/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/add-subject-members/AddSubjectMembersUtils.d.ts +14 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/add-subject-members/AddSubjectMembersView.d.ts +15 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/add-subject-members/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/delete-subject/DeleteSubjectView.d.ts +9 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/delete-subject/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/edit-subject/EditSubjectView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/edit-subject/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/edit-subject-members/EditSubjectMembersUtils.d.ts +16 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/edit-subject-members/EditSubjectMembersView.d.ts +16 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/edit-subject-members/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/index.d.ts +8 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/new-subject/NewSubjectView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/new-subject/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/remove-subject-member/RemoveSubjectMemberView.d.ts +11 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/remove-subject-member/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/subject-classifications/SubjectClassificationsView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/subject-classifications/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/subject-nav/SubjectNavView.d.ts +6 -0
- package/dist/projects/curator/src/apps/subjects/views/subjects/subject-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/subjects/views/top-nav/TopNavView.d.ts +7 -0
- package/dist/projects/curator/src/apps/subjects/views/top-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/themes/ThemesApplication.d.ts +16 -0
- package/dist/projects/curator/src/apps/themes/components/edit-theme/EditTheme.d.ts +11 -0
- package/dist/projects/curator/src/apps/themes/components/edit-theme/ThemeValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/themes/components/edit-theme/edit-data/EditGlanceData.d.ts +2 -0
- package/dist/projects/curator/src/apps/themes/components/edit-theme/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/themes/context/ThemesAppContext.d.ts +4 -0
- package/dist/projects/curator/src/apps/themes/flight-requests/ThemeRequests.d.ts +11 -0
- package/dist/projects/curator/src/apps/themes/interfaces/CreateOrUpdateThemeRequest.d.ts +7 -0
- package/dist/projects/curator/src/apps/themes/interfaces/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/themes/views/delete-theme/DeleteThemeView.d.ts +7 -0
- package/dist/projects/curator/src/apps/themes/views/delete-theme/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/themes/views/edit-theme/EditThemeView.d.ts +6 -0
- package/dist/projects/curator/src/apps/themes/views/edit-theme/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/themes/views/new-theme/NewThemeView.d.ts +2 -0
- package/dist/projects/curator/src/apps/themes/views/new-theme/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/themes/views/themes/ThemesView.d.ts +2 -0
- package/dist/projects/curator/src/apps/themes/views/themes/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/VideosApplication.d.ts +18 -0
- package/dist/projects/curator/src/apps/videos/components/edit-video-details/EditGlance.d.ts +7 -0
- package/dist/projects/curator/src/apps/videos/components/edit-video-details/EditVideoDetails.d.ts +13 -0
- package/dist/projects/curator/src/apps/videos/components/edit-video-details/VideoDetailsForm.d.ts +12 -0
- package/dist/projects/curator/src/apps/videos/components/edit-video-details/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/components/edit-video-nav/EditVideoNav.d.ts +7 -0
- package/dist/projects/curator/src/apps/videos/components/edit-video-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/context/VideosAppContext.d.ts +4 -0
- package/dist/projects/curator/src/apps/videos/context/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/flight-requests/CuratorVideoRequests.d.ts +10 -0
- package/dist/projects/curator/src/apps/videos/interfaces/RightslineVideo.d.ts +4 -0
- package/dist/projects/curator/src/apps/videos/interfaces/data-requests/UpdateVideoRequest.d.ts +13 -0
- package/dist/projects/curator/src/apps/videos/interfaces/data-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/interfaces/index.d.ts +2 -0
- package/dist/projects/curator/src/apps/videos/utils/VideoNavHelper.d.ts +4 -0
- package/dist/projects/curator/src/apps/videos/utils/VideoValidation.d.ts +3 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video/EditVideoView.d.ts +6 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video-aliases/EditVideoAliasesView.d.ts +6 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video-aliases/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video-audiences/EditVideoAudiencesView.d.ts +6 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video-audiences/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video-subjects/EditVideoSubjectsView.d.ts +6 -0
- package/dist/projects/curator/src/apps/videos/views/edit-video-subjects/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/views/index.d.ts +4 -0
- package/dist/projects/curator/src/index.d.ts +55 -0
- package/dist/projects/curator/src/shared/components/aliases/AddAlias.d.ts +7 -0
- package/dist/projects/curator/src/shared/components/aliases/AliasList.d.ts +13 -0
- package/dist/projects/curator/src/shared/components/aliases/Aliases.d.ts +9 -0
- package/dist/projects/curator/src/shared/components/aliases/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/back-button/BackButton.d.ts +8 -0
- package/dist/projects/curator/src/shared/components/back-button/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/checkbox/Checkbox.d.ts +8 -0
- package/dist/projects/curator/src/shared/components/checkbox/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/forms/file-select/FileSelect.d.ts +11 -0
- package/dist/projects/curator/src/shared/components/forms/file-select/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/forms/image-select/ImageSelect.d.ts +14 -0
- package/dist/projects/curator/src/shared/components/forms/image-select/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/forms/index.d.ts +2 -0
- package/dist/projects/curator/src/shared/components/image-cropper/ImageCropper.d.ts +10 -0
- package/dist/projects/curator/src/shared/components/image-cropper/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/index.d.ts +14 -0
- package/dist/projects/curator/src/shared/components/object-collection/ObjectCollection.d.ts +12 -0
- package/dist/projects/curator/src/shared/components/object-collection/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/object-header/ObjectHeader.d.ts +9 -0
- package/dist/projects/curator/src/shared/components/object-header/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/object-list/ObjectList.d.ts +11 -0
- package/dist/projects/curator/src/shared/components/object-list/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/object-list-nav/ObjectListNav.d.ts +15 -0
- package/dist/projects/curator/src/shared/components/object-list-nav/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/rating-select/RatingSelect.d.ts +12 -0
- package/dist/projects/curator/src/shared/components/rating-select/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/tabs/Tabs.d.ts +13 -0
- package/dist/projects/curator/src/shared/components/tabs/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/tree/Tree.d.ts +14 -0
- package/dist/projects/curator/src/shared/components/tree/TreeNode.d.ts +19 -0
- package/dist/projects/curator/src/shared/components/tree/TreeNodeLink.d.ts +13 -0
- package/dist/projects/curator/src/shared/components/tree/index.d.ts +2 -0
- package/dist/projects/curator/src/shared/components/tree-select/TreeSelect.d.ts +15 -0
- package/dist/projects/curator/src/shared/components/tree-select/TreeSelectHelper.d.ts +17 -0
- package/dist/projects/curator/src/shared/components/tree-select/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/components/video-list/SortableVideoList.d.ts +12 -0
- package/dist/projects/curator/src/shared/components/video-list/VideoItem.d.ts +15 -0
- package/dist/projects/curator/src/shared/components/video-list/VideoList.d.ts +19 -0
- package/dist/projects/curator/src/shared/components/video-list/index.d.ts +2 -0
- package/dist/projects/curator/src/shared/constants/CuratorActions.d.ts +87 -0
- package/dist/projects/curator/src/shared/constants/DataPrefixes.d.ts +45 -0
- package/dist/projects/curator/src/shared/constants/FileExtensions.d.ts +3 -0
- package/dist/projects/curator/src/shared/constants/Layouts.d.ts +3 -0
- package/dist/projects/curator/src/shared/constants/RadioChannels.d.ts +16 -0
- package/dist/projects/curator/src/shared/constants/Services.d.ts +6 -0
- package/dist/projects/curator/src/shared/constants/index.d.ts +6 -0
- package/dist/projects/curator/src/shared/context/ImageStorageContext.d.ts +45 -0
- package/dist/projects/curator/src/shared/context/UserContext.d.ts +4 -0
- package/dist/projects/curator/src/shared/context/index.d.ts +2 -0
- package/dist/projects/curator/src/shared/enums/CurationStatus.d.ts +8 -0
- package/dist/projects/curator/src/shared/enums/CuratorGroup.d.ts +11 -0
- package/dist/projects/curator/src/shared/enums/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/flight-requests/AliasRequests.d.ts +7 -0
- package/dist/projects/curator/src/shared/flight-requests/RatingRequests.d.ts +4 -0
- package/dist/projects/curator/src/shared/flight-requests/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/interfaces/collections/AliasCollection.d.ts +4 -0
- package/dist/projects/curator/src/shared/interfaces/collections/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/interfaces/data-requests/CreateAliasRequest.d.ts +3 -0
- package/dist/projects/curator/src/shared/interfaces/data-requests/UpdateObjectPermissionsRequest.d.ts +4 -0
- package/dist/projects/curator/src/shared/interfaces/data-requests/UpdateObjectRating.d.ts +3 -0
- package/dist/projects/curator/src/shared/interfaces/data-requests/index.d.ts +3 -0
- package/dist/projects/curator/src/shared/interfaces/index.d.ts +4 -0
- package/dist/projects/curator/src/shared/interfaces/models/Alias.d.ts +3 -0
- package/dist/projects/curator/src/shared/interfaces/models/CuratorUser.d.ts +5 -0
- package/dist/projects/curator/src/shared/interfaces/models/Group.d.ts +3 -0
- package/dist/projects/curator/src/shared/interfaces/models/Permission.d.ts +4 -0
- package/dist/projects/curator/src/shared/interfaces/models/index.d.ts +5 -0
- package/dist/projects/curator/src/shared/interfaces/models/primitives/BaseTree.d.ts +8 -0
- package/dist/projects/curator/src/shared/interfaces/models/primitives/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/interfaces/view-models/NavItem.d.ts +6 -0
- package/dist/projects/curator/src/shared/interfaces/view-models/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/layouts/curator-layout/CuratorLayoutView.d.ts +28 -0
- package/dist/projects/curator/src/shared/layouts/curator-layout/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/layouts/index.d.ts +2 -0
- package/dist/projects/curator/src/shared/layouts/primitives/LayoutComponent.d.ts +17 -0
- package/dist/projects/curator/src/shared/layouts/primitives/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/services/CuratorAppNavService.d.ts +17 -0
- package/dist/projects/curator/src/shared/services/ImageUploadDataService.d.ts +8 -0
- package/dist/projects/curator/src/shared/services/LanguageDataService.d.ts +11 -0
- package/dist/projects/curator/src/shared/services/UserDataService.d.ts +11 -0
- package/dist/projects/curator/src/shared/services/index.d.ts +4 -0
- package/dist/projects/curator/src/shared/utils/CuratorCollectionHelper.d.ts +10 -0
- package/dist/projects/curator/src/shared/utils/ImageSelectHelper.d.ts +6 -0
- package/dist/projects/curator/src/shared/utils/NavHelper.d.ts +5 -0
- package/dist/projects/curator/src/shared/utils/PermissionsHelper.d.ts +5 -0
- package/dist/projects/curator/src/shared/utils/PropHelper.d.ts +3 -0
- package/dist/projects/curator/src/shared/utils/StringHelper.d.ts +5 -0
- package/dist/projects/curator/src/shared/utils/TreeHelper.d.ts +7 -0
- package/dist/projects/curator/src/shared/utils/UserHelper.d.ts +4 -0
- package/dist/projects/curator/src/shared/utils/index.d.ts +7 -0
- package/dist/projects/curator/src/shared/views/image-upload/ImageUploadView.d.ts +8 -0
- package/dist/projects/curator/src/shared/views/image-upload/index.d.ts +1 -0
- package/dist/projects/curator/src/shared/views/index.d.ts +1 -0
- package/package.json +45 -46
- package/tooling/externals.js +0 -3
package/dist/curator-app.js
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("Yup"),require("Formik"),require("ReactBootstrap"),require("ReactRedux"),require("Backbone"),require("SortableHOC"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","@clickview/shared","@clickview/common","Yup","Formik","ReactBootstrap","ReactRedux","Backbone","SortableHOC","Cropper","Handlebars"],t):"object"==typeof exports?exports["@clickview/curator"]=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("Yup"),require("Formik"),require("ReactBootstrap"),require("ReactRedux"),require("Backbone"),require("SortableHOC"),require("Cropper"),require("Handlebars")):e["@clickview/curator"]=t(e.React,e["@clickview/shared"],e["@clickview/common"],e.Yup,e.Formik,e.ReactBootstrap,e.ReactRedux,e.Backbone,e.SortableHOC,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,a,o,c,s,u,l){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";var r=n(13);n.o(r,"DomainOptionKind")&&n.d(t,"DomainOptionKind",(function(){return r.DomainOptionKind})),n.o(r,"DomainOptionType")&&n.d(t,"DomainOptionType",(function(){return r.DomainOptionType}));var i=n(15);n.d(t,"DomainOptionKind",(function(){return i.a})),n.d(t,"DomainOptionType",(function(){return i.b}))},function(e,t){e.exports=o},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t){e.exports=c},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t){e.exports=s},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t,n){"use strict";var r=n(14);n.o(r,"DomainOptionKind")&&n.d(t,"DomainOptionKind",(function(){return r.DomainOptionKind})),n.o(r,"DomainOptionType")&&n.d(t,"DomainOptionType",(function(){return r.DomainOptionType}))},function(e,t){},function(e,t,n){"use strict";var r,i;!function(e){e.Boolean="System.Boolean",e.String="System.String",e.StaffRequest="ClickView.DomainApi.Models.Options.Enums.StaffRequestOption, ClickView.DomainApi.Models, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null",e.Long="System.Int64"}(r||(r={})),function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(i||(i={})),n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}))},function(e,t,n){var r=n(21);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t){e.exports=u},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e){e.exports=JSON.parse("{}")},function(e,t){e.exports=l},function(e,t,n){"use strict";n.r(t);n(20);var r={UPLOAD_IMAGE:"upload:image"},i={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",SUBJECT_CLASSIFICATIONS:"subject:classifications",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},r),Playlists:Object.assign({PLAYLISTS:"index",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",EDIT_PLAYLIST_AUDIENCES:"edit:playlist:audiences",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",REMOVE_FROM_SUBJECT:"remove:from:subject"},r),Series:Object.assign({EDIT_SERIES:"edit:series",EDIT_SERIES_VIDEOS:"edit:series:videos",EDIT_SERIES_SUBJECTS:"edit:series:subjects",EDIT_SERIES_AUDIENCES:"edit:series:audiences"},r),Videos:{EDIT_VIDEO:"edit:video",EDIT_VIDEO_AUDIENCES:"edit:video:audiences",EDIT_VIDEO_SUBJECTS:"edit:video:subjects"},DomainOptions:{DOMAIN_OPTIONS:"domain:options",NEW_DOMAIN_OPTION:"new:domain:option",EDIT_DOMAIN_OPTION:"edit:domain:option",DELETE_DOMAIN_OPTION:"delete:domain:option"},People:{PEOPLE:"people",NEW_PERSON:"new:person",EDIT_PERSON:"edit:person"},Companies:{COMPANIES:"companies",NEW_COMPANY:"new:company",EDIT_COMPANY:"edit:company"}},a={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",UPDATE_OBJECT_SUBJECTS:"update:object:subjects",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",UPDATE_OBJECT_CLASSIFICATIONS:"update:object:classifications",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",ADD_TO_LEVEL:"add:to:level",REMOVE_FROM_LEVEL:"remove:from:level",UPDATE_OBJECT_LEVELS:"update:object:levels",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",UPDATE_OBJECT_AUDIENCES:"update:object:audiences",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",SERIES_BY_ID:"series:by:id",UPDATE_SERIES:"update:series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image",LOCALE:"locale",PHRASES:"PHRASES"},o={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},c={CURATOR_LAYOUT:"CuratorLayout"},s={COMPANIES:"companies:application",DOMAIN_OPTIONS:"domain:options:application",PEOPLE:"people:application",PLAYLISTS:"playlists:application",SERIES:"series:application",SUBJECTS:"subjects:application",VIDEOS:"videos:application"},u={IMAGE_UPLOAD:"image:upload:data:service",PLAYLIST:"playlist:data:service",SERIES:"series:data:service",SUBJECT:"subject:data:service",USER:"user:data:service",VIDEO:"video:data:service",LANGUAGE:"language:data:service"},l={IMAGE_UPLOAD:"ImageUploadDataService",PLAYLIST:"PlaylistDataService",SUBJECT:"SubjectDataService",USER:"UserDataService",VIDEO:"VideoDataService",SERIES:"SeriesDataService",LANGUAGE:"LanguageDataService"},p=n(0),f=n(2),m=n(1),d=n(16),b=n.n(d),y=n(12),v=n.n(y);function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=h(this,O(t).call(this,e))).childComponents={},n}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(t,e),n=t,i=[{key:"getCacheKey",value:function(e){var t="".concat(this.name),n=[];return Object.keys(e).forEach((function(t){n.push("".concat(t,":").concat(e[t]))})),n.length&&(n.sort(),t+=":".concat(n.join(":"))),t}}],(r=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[m.LayoutRegions.TOP_NAV],className:v.a.topNavRegion},leftNav:{component:this.childComponents[m.LayoutRegions.LEFT_NAV],className:"py-3 ".concat(v.a.leftNavRegion)},content:{component:this.childComponents[m.LayoutRegions.CONTENT],className:"position-relative container py-3"},popup:{component:this.childComponents[m.LayoutRegions.POPUP]},alert:{component:this.childComponents[m.LayoutRegions.ALERT]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){f.FunctionHelper.isFunction(this.options.getTopNavView)&&(this.childComponents[m.LayoutRegions.TOP_NAV]=this.options.getTopNavView(f.Core.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(m.LayoutRegions.LEFT_NAV)}},{key:"closePopup",value:function(){this.unsetRegion(m.LayoutRegions.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());g(O(t.prototype),"showChildView",this).call(this,"layout",this.wrapWithStore(p.createElement(P,Object.assign({},e))))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return b.a}},{key:"className",get:function(){return"container-fluid ".concat(v.a.curatorLayout)}}])&&E(n.prototype,r),i&&E(n,i),t}(f.ReactLayoutView),C=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},I=function(e){var t=e.className,n=e.children;return p.createElement("div",{className:t},n)},A=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},L=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,a=e.alert;return p.createElement(p.Fragment,null,p.createElement("div",{className:"position-relative"},!!t.component&&p.createElement(I,{className:A("top-nav-region",t.className)},t.component),!!n.component&&p.createElement(I,{className:A("left-nav-region",n.className)},n.component),!!r.component&&p.createElement("div",{className:"content-container"},p.createElement(I,{className:A("content-region",r.className)},r.component))),!!i.component&&p.createElement(I,{className:A("popup-region",i.className)},i.component),!!a.component&&p.createElement(I,{className:A("alert-region",a.className)},a.component))},P=function(e){var t=e.provider,n=C(e,["provider"]);return t?p.createElement(t,null,p.createElement(L,Object.assign({},n))):p.createElement(L,Object.assign({},n))};function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=function(e){function t(){return w(this,t),F(this,_(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.listenTo(f.CommonChannels.SHELL,f.Core.EventNames.ROUTING_END,this.updateNav)}},{key:"updateNav",value:function(){var e=this,t=f.Core.AppLinkHelper.getCurrentAppLink().application;if(t!==this.currentApplication){this.currentApplication=t;var n=this.options.navItemMappings[t];if(n){var r=document.querySelector(this.options.navSelector);r&&r.children&&k(r.children).forEach((function(t){var r=t.querySelector("a");r&&(r.classList.remove(e.options.currentItemClassName),r.text===n&&r.classList.add(e.options.currentItemClassName))}))}}}},{key:"name",get:function(){return"CuratorAppNavService"}}])&&D(n.prototype,r),i&&D(n,i),t}(f.Core.Service);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Y=function(e){function t(){return V(this,t),J(this,M(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&H(e,t)}(t,e),n=t,(r=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:a.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return l.IMAGE_UPLOAD}},{key:"channelName",get:function(){return u.IMAGE_UPLOAD}}])&&B(n.prototype,r),i&&B(n,i),t}(f.BaseDataService);function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return!t||"object"!==q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Q=function(e){function t(){return K(this,t),W(this,G(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Z(e,t)}(t,e),n=t,(r=[{key:"getCurrentUser",value:function(e,t){return this.get({resource:"/api/currentuser",eventPrefix:a.CURRENT_USER,expiryTime:m.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"name",get:function(){return l.USER}},{key:"channelName",get:function(){return u.USER}}])&&z(n.prototype,r),i&&z(n,i),t}(f.BaseDataService),X={dataServiceName:l.USER,dataChannelName:u.USER},$={getCurrentUserFetchOptions:function(e,t){return Object.assign(Object.assign({},X),{eventPrefix:a.CURRENT_USER,fetchData:function(e){return e.getCurrentUser()},setData:e,onError:t})}};function ee(e){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t){return!t||"object"!==ee(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ie(e){return(ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oe=function(e){function t(){return te(this,t),re(this,ie(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ae(e,t)}(t,e),n=t,(r=[{key:"getLanguageConfig",value:function(e){var t={locale:"en",phrases:{}},n=new f.ConcurrencyHelper(3),r=function(){n.decrement(),n.getValue()>0||e(t)};this.get({resource:"/api/locale",eventPrefix:a.LOCALE,expiryTime:m.CacheDurations.STANDARD,callback:function(e){t.locale=e,r()}}),this.get({resource:"/api/phrases/shared",eventPrefix:"".concat(a.PHRASES,":shared"),expiryTime:m.CacheDurations.STANDARD,callback:function(e){null===e.shared&&(e.shared={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}}),this.get({resource:"/api/phrases/subjects",eventPrefix:"".concat(a.PHRASES,":subjects"),expiryTime:m.CacheDurations.STANDARD,callback:function(e){null===e.subjects&&(e.subjects={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}})}},{key:"name",get:function(){return l.LANGUAGE}},{key:"channelName",get:function(){return u.LANGUAGE}}])&&ne(n.prototype,r),i&&ne(n,i),t}(f.BaseDataService),ce=n(7),se=function(e){var t="/api/master/v2/companies";return e?"".concat(t,"?cursor=").concat(e):t},ue=function(e){return"/api/master/v2/objects/".concat(e)},le=function(){return"/api/master/v2/companies"},pe=function(e){return"/api/master/v2/objects/".concat(e)},fe="companies",me="company",de="update:company",be=function(e){return{key:"".concat(fe).concat(e?":".concat(e):""),url:se(e)}},ye=function(e){return{key:"".concat(me,":").concat(e),url:ue(e)}},ve=function(e,t,n){return{key:me,url:le(),data:e,type:f.HttpVerbs.POST,success:t,error:n,invalidationKeys:[fe]}},Se=function(e,t,n){return{key:"".concat(de,":").concat(e),url:pe(e),data:t,type:f.HttpVerbs.PUT,always:n}},Ee=n(3),he=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),ge=n(4);function Oe(e){var t=Object(ge.useFormikContext)();return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this company",autoFocus:!0}),p.createElement(m.FormButtons,{isNew:e.isNew}))}function je(e){return p.createElement(m.FormWrapper,{initialValues:e.company,validationSchema:he,onSubmit:e.saveCompany},p.createElement(Oe,{isNew:!(e.company&&e.company.id)}))}function Te(e){var t=Object(ce.useDispatch)(),n=f.Flight.useBasicFetch(ye(e.id));return p.createElement(p.Fragment,null,!!n.data&&p.createElement(je,{company:n.data,saveCompany:function(n,r){return f.Flight.fetch(t,Se(e.id,n,r))}}))}function Ce(){var e=Object(ce.useDispatch)();return p.createElement(je,{saveCompany:function(t,n){f.Flight.fetch(e,ve(t,(function(e){n(),f.Core.AppLinkHelper.trigger({application:s.PEOPLE,action:i.Companies.EDIT_COMPANY,args:[e.id]})}),n))}})}function Ie(e){var t=e.backToName,n=e.appLink;return p.createElement(m.AppLink,{appLink:n,className:"d-inline-flex align-items-center"},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.ArrowLeft,size:m.SvgContainerSize.Small}),p.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}var Ae=n(5);function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Pe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Ne(e){var t=e.selected,n=e.onToggle,r=Pe(e,["selected","onToggle"]),i=Le(p.useState(t),2),a=i[0],o=i[1];p.useEffect((function(){return o(t)}),[t]);return p.createElement(Ae.Form.Check,Object.assign({type:"checkbox",id:"checkbox-".concat(f.RandomHelper.getRandomInt()),checked:a,onChange:function(){o(!a),n(!a)}},r))}var ke=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function we(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,a=e.error,o=e.touched,c=ke(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),s="custom-file-input cursor-pointer";a&&o&&(s+=" is-invalid");var u=Object.assign({type:"file",className:s,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&f.FunctionHelper.isFunction(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return p.createElement("div",{className:"form-group"},p.createElement("div",{className:"custom-file"},p.createElement(ge.Field,Object.assign({},u,c),e.children),p.createElement(Ae.Form.Label,{className:"custom-file-label",htmlFor:c.id},i)))}var De,Fe={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return Fe.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=m.ImageMinDimensions[t].width,a=m.ImageMinDimensions[t].height;r.addEventListener("load",(function(){Fe.isImageValid(t,r)&&f.FunctionHelper.isFunction(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(a))}))},isImageValid:function(e,t){var n=m.ImageMinDimensions[e].width,r=m.ImageMinDimensions[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}},_e={isItemActive:function(e,t){return t||(t=f.Core.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)}};!function(e){e.Developer="Curator Devs",e.Curator="Curators",e.Support="Support",e.SalesSupport="Sales Support"}(De||(De={}));var Re=function(){return[{value:"protected",access:"r"}]},xe=function(e){return He.getGroupNames(e).includes(De.Developer)},Ue=function(e){return Object.values(e).every((function(e){return!!e}))},Ve=function(e,t){return!!e&&!!t&&e.toString()===t.toString()},Be=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function Je(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Me={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(Ve(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var a=e(r[i]);if(a)return a}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var a=Me.find(e,i);a&&(n=[a].concat(Je(n))),i=a?r(a):null}return n}},He={getGroupNames:function(e){return e&&e.groups?e.groups.map((function(e){return e.name})):[]}};function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var qe=p.createContext(void 0),Ke=function(e){var t=e.children,n=Ye(p.useState(),2),r=n[0],i=n[1],a=Ye(p.useState(!1),2),o=a[0],c=a[1],s=Ye(p.useState(),2),u=s[0],l=s[1],f={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:o,getImage:function(){var e=u;return l(null),c(!1),e},setImage:function(e){l(e),c(!0)}};return p.createElement(qe.Provider,{value:f},t)};function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var We,Ge=p.createContext(void 0);function Ze(e){var t=e.children,n=ze(p.useState(),2),r=n[0],i=n[1];return Object(f.useFetch)(m.UserDataServiceHelper.getCurrentUserFetchOptions(i),[]),p.createElement(Ge.Provider,{value:r},t)}function Qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $e=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},et=(Xe(We={},m.ImageType.Thumbnails,"Thumbnail"),Xe(We,m.ImageType.Banners,"Banner"),Xe(We,m.ImageType.Avatars,"Avatar"),Xe(We,m.ImageType.Logos,"Logo"),Xe(We,m.ImageType.Covers,"Cover"),Xe(We,m.ImageType.Posters,"Poster"),Xe(We,m.ImageType.TallPosters,"Poster"),We);function tt(e){var t=e.imageType,n=e.currentImage,r=e.setNewImage,i=e.application,a=e.uploadAction,c=$e(e,["imageType","currentImage","setNewImage","application","uploadAction"]),s=p.useContext(qe),u=s.setDataUrl,l=s.getImage,d=s.imageUploaded,b=Qe(p.useState(!1),2),y=b[0],v=b[1],S=Qe(p.useState(n),2),E=S[0],h=S[1],g=Qe(p.useState(!1),2),O=g[0],j=g[1],T=function(e){v(!0),u(e.src),f.Core.AppLinkHelper.trigger({application:i,action:a,args:[t]})};return p.useEffect((function(){if(y){var e=l();e&&(v(!1),h(e),r({fileId:e.id,fileIdType:m.FileIdType.ImageAPIv2}))}}),[d]),p.createElement("div",{className:"form-group"},p.createElement("div",{className:"form-control h-auto py-2"},p.createElement("label",null,et[t]),p.createElement("em",{className:"ml-1 text-muted"},"(Minimum dimensions are ".concat(m.ImageMinDimensions[t].width,"px")+" x ".concat(m.ImageMinDimensions[t].height,"px)")),p.createElement(we,Object.assign({label:"Choose a ".concat(et[t].toLowerCase()),name:"image",mimeType:o.IMAGES,onFileSelect:function(e){return Fe.onFileSelect(t,e,T)}},c)),!!E&&!!E.url&&p.createElement(p.Fragment,null,!O&&p.createElement("div",{className:"pb-2 ".concat(t===m.ImageType.Banners?"w-100":"w-50")},p.createElement("img",{src:m.ImageHelper.createUrl(E.url),className:"img img-fluid"})),p.createElement("div",{className:"d-flex justify-content-center"},p.createElement(m.SvgContainer,{svgName:O?m.cvSvgLibrary.ChevronDown:m.cvSvgLibrary.ChevronUp,size:m.SvgContainerSize.Large,className:"svg-container cursor-pointer",onClick:function(){return j(!O)},title:O?"Show image":"Hide image",tooltipPlacement:"top"})))))}var nt,rt=n(17),it=n.n(rt);function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(nt||(nt={}));var ot=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function ct(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,a=e.onCancel,o=p.useRef(),c=p.useRef(),s=at(p.useState(!1),2),u=s[0],l=s[1],d=at(p.useState(!1),2),b=d[0],y=d[1];return p.useEffect((function(){var e=new Image;e.src=t;var i=o.current.offsetWidth/e.width;return c.current=new it.a(o.current,{viewMode:nt.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return l(!0)}}),function(){return c.current.destroy()}}),[]),p.createElement(p.Fragment,null,p.createElement("div",{className:"pb-3"},p.createElement("img",{ref:o,src:t,className:"img img-fluid mw-100"})),p.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},p.createElement(Ae.Button,{variant:"link",onClick:a},"Cancel"),p.createElement(m.SpinnerButton,{onClick:function(){if(u){y(!0);var e=c.current.getCroppedCanvas().toDataURL(function(e){var t=e.match(ot);if(t)return t[1]}(t));f.FunctionHelper.isFunction(i)&&i(e)}},disabled:!u,showSpinner:b},"Crop")))}function st(e){if(!e.collection)return p.createElement(p.Fragment,null);var t=e.collection,n=t.data,r=t.pagination;return p.createElement(p.Fragment,null,!!n&&p.createElement(pt,{objects:n,getObjectAppLink:e.getObjectAppLink,newObjectAppLink:e.newObjectAppLink,objectName:e.objectName}),!!r&&!!r.cursors&&p.createElement(m.Pagination,{cursors:r.cursors,appLink:e.collectionAppLink}))}function ut(e){var t=e.object,n=e.actions;return p.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&p.createElement("h5",null,t.name),!!n&&p.createElement("span",null,p.createElement(m.Actions,{actions:n})))}function lt(e){return p.createElement("tr",null,p.createElement("td",null,p.createElement(m.AppLink,{appLink:e.appLink},e.object.name)),p.createElement("td",null))}function pt(e){return p.createElement(Ae.Table,{responsive:!0},p.createElement("thead",null,p.createElement("tr",null,p.createElement("th",null,"Name"),p.createElement("th",null,p.createElement("div",{className:"d-flex justify-content-end"},p.createElement(m.AppLink,{appLink:e.newObjectAppLink},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.Plus,size:m.SvgContainerSize.Small}),p.createElement("span",null,"New ".concat(e.objectName))))))),p.createElement("tbody",null,e.objects.map((function(t){return p.createElement(lt,{key:t.id,object:t,appLink:e.getObjectAppLink(t)})}))))}function ft(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?p.createElement("ul",{className:"list-unstyled"},t.map((function(e,t){return p.createElement("li",{key:t,className:"border rounded mb-3"},p.createElement(m.AppLink,{appLink:n(e),className:"d-block p-3"},e.name))}))):p.createElement("div",{className:"py-3"},p.createElement("p",null,r)):p.createElement(p.Fragment,null)}ft.defaultProps={emptyMessage:"There is nothing here."};function mt(e){var t=Object(ge.useFormikContext)();return p.createElement(m.FormField,{as:"select",label:"Rating",name:"rating",id:"rating",value:t.values.rating&&t.values.rating.id,onChange:function(e){return t.setFieldValue("rating",e.target.value?{id:e.target.value}:{})}},p.createElement(p.Fragment,null,p.createElement("option",{value:""},"Please select a rating"),e.ratings.map((function(e,t){return p.createElement("option",{key:t,value:e.id},function(e){return"".concat(e.name).concat(e.code?" (".concat(e.code,")"):"")}(e))}))))}function dt(e){var t=e.tabs,n=e.isItemActive;return p.createElement(Ae.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return p.createElement(Ae.Nav.Item,{key:t},p.createElement(Ae.Nav.Link,{as:m.AppLink,appLink:e.appLink,active:n(e)},e.label))})))}dt.defaultProps={isItemActive:_e.isItemActive};var bt=n(8),yt=n.n(bt);function vt(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,a=e.className,o=e.actions,c=yt.a.text;return a&&(c+=" ".concat(a)),i?p.createElement("a",{className:"".concat(c," text-muted ").concat(yt.a.disabled)},t):p.createElement(p.Fragment,null,n?p.createElement(m.AppLink,{appLink:n,className:c},t):p.createElement("a",{onClick:r,className:c},t),!!o&&p.createElement(m.Actions,{className:yt.a.actions,actions:o}))}function St(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Et(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,a=e.isDisabled,o=e.actions,c=Array.isArray(n)&&n.some((function(e){return Ve(t.id,e)})),s=p.useMemo((function(){return Array.isArray(n)&&n.some((function(e){return Me.find(t,e)}))}),[t,n]),u=St(p.useState(s),2),l=u[0],d=u[1],b=!!t.children&&!!t.children.length,y={name:t.name,appLink:f.FunctionHelper.isFunction(r)?r(t):null,onSelect:f.FunctionHelper.isFunction(i)?function(){return i(t)}:null,isDisabled:!!f.FunctionHelper.isFunction(a)&&a(t),className:c&&yt.a.selected||s&&yt.a.parentOfSelected,actions:!!o&&o.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return p.createElement("li",{className:"position-relative".concat(l?"":" ".concat(yt.a.collapsed))},p.createElement("div",{className:"position-relative"},p.createElement("span",{className:yt.a.node},b&&p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.ChevronDown,size:m.SvgContainerSize.Small,className:"svg-container ".concat(yt.a.chevron),onClick:function(){return d(!l)}}),p.createElement(vt,Object.assign({},y))),l&&p.createElement(gt,Object.assign({},e))))}var ht=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function gt(e){var t=e.tree,n=ht(e,["tree"]);return t&&t.children?p.createElement("ul",{className:"m-0 p-0 ".concat(yt.a.tree)},t.children.map((function(e){return p.createElement(Et,Object.assign({key:e.id,tree:e},n))}))):p.createElement(p.Fragment,null)}var Ot={getChord:function(e,t){return Me.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,a,o=Me.find(t,e);o&&(n=Object.assign((r={},i=e,a=Ot.getChord(t,o),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),n))})),n}};function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Tt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Ct(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,a=e.noSelectionMessage,o=e.isNodeDisabled,c=e.getSelectedItemAppLink,s=Tt(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","isNodeDisabled","getSelectedItemAppLink"]),u=s.tree,l=s.selectedIds,d=jt(p.useState(Ot.getState(l,u)),2),b=d[0],y=d[1];p.useEffect((function(){return y(Ot.getState(l,u))}),[l,u]);var v=jt(p.useState(!!i),2),S=v[0],E=v[1];p.useEffect((function(){return E(!!i)}),[i]);var h=!r||!!n;return p.createElement(p.Fragment,null,h&&p.createElement("div",{className:"pb-2"},!!n&&p.createElement("label",{className:"m-0"},n),!r&&p.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return E(!S)}},S?"Expand":"Collapse")),!S&&p.createElement("div",{className:"py-2 border-top"},p.createElement(gt,Object.assign({onSelect:function(e){return f.FunctionHelper.isFunction(t)&&t(e)},isDisabled:o},s))),(!f.ObjectHelper.isEmpty(b)||!!a)&&p.createElement("div",{className:"py-2 border-top"},p.createElement("label",null,"Selected:"),p.createElement("ul",{className:"m-0"},f.ObjectHelper.isEmpty(b)?p.createElement("li",null,a):Object.keys(b).map((function(e,t){return p.createElement("li",{key:t},f.FunctionHelper.isFunction(c)?p.createElement(m.AppLink,{appLink:c(e)},b[e]):b[e])})))))}var It=n(11),At=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function Lt(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,a=void 0===i?"":i,o=e.itemNumber,c=f.FunctionHelper.isFunction(n)&&n(t);return p.createElement("tr",{className:At(a)},!!o&&p.createElement("td",null,p.createElement("span",null,o)),p.createElement("td",null,c?p.createElement(m.AppLink,{appLink:c},t.name):t.name),f.FunctionHelper.isFunction(r)&&p.createElement("td",null,p.createElement("span",{className:"d-flex justify-content-end"},p.createElement(m.Actions,{actions:r(t)}))))}var Pt=Object(It.SortableElement)((function(e){return p.createElement(Lt,Object.assign({sortable:!0},e))})),Nt=n(10),kt=n.n(Nt),wt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Dt=function(e){var t=e.sortable,n=e.getVideoActions;return p.createElement("thead",null,p.createElement("tr",null,!!t&&p.createElement("th",null,"#"),p.createElement("th",null,"Name"),!!n&&p.createElement("th",null)))},Ft=p.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=wt(e,["videos","sortable"]);return p.createElement("tbody",{ref:t},!m.CollectionHelper.isEmpty(n)&&n.data.map((function(e,t){return r?p.createElement(Pt,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:kt.a.draggableVideoItem},i)):p.createElement(Lt,Object.assign({video:e},i))})))}));var _t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Rt=Object(It.SortableContainer)((function(e){var t=e.forwardedRef,n=_t(e,["forwardedRef"]);return p.createElement(Ft,Object.assign({sortable:!0,ref:t},n))})),xt=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(kt.a.sortingContainer);var i=r.querySelector(".".concat(kt.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},Ut=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(kt.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function Vt(e){var t=e.onSortEnd,n=e.emptyMessage,r=_t(e,["onSortEnd","emptyMessage"]),i=p.useRef();return m.CollectionHelper.isEmpty(e.videos)?p.createElement("div",null,n):p.createElement(Ae.Table,{responsive:!0},p.createElement(Dt,Object.assign({sortable:!0},e)),p.createElement(Rt,Object.assign({forwardedRef:i,onSortStart:xt(i),onSortEnd:Ut(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:kt.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}Vt.defaultProps={emptyMessage:"There are no videos in this list."};var Bt=s.COMPANIES,Jt=function(e){return{application:Bt,action:i.Companies.EDIT_COMPANY,args:[e.id]}},Mt=function(e){return f.Core.AppLinkHelper.trigger(Jt(e))};function Ht(e){var t=f.Flight.useBasicFetch(be(e.cursor));return p.createElement(p.Fragment,null,p.createElement("div",{className:"pb-3 w-50"},p.createElement(m.SearchBar,{placeholder:"Search for a company",onSuggestionSelected:Mt,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/companies/instant/raw","?q=").concat(e)},activationLength:2})),p.createElement(st,{collection:t&&t.data,collectionAppLink:{application:Bt,action:i.Companies.COMPANIES},newObjectAppLink:{application:Bt,action:i.Companies.NEW_COMPANY},getObjectAppLink:Jt,objectName:"Company"}))}function Yt(e){return(Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zt(e,t,n){return t&&Kt(e.prototype,t),n&&Kt(e,n),e}function Wt(e,t){return!t||"object"!==Yt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gt(e){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qt(e,t)}function Qt(e,t){return(Qt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Xt=function(e){function t(){return qt(this,t),Wt(this,Gt(t).apply(this,arguments))}return Zt(t,e),zt(t,[{key:"channelName",get:function(){return s.COMPANIES}},{key:"appRoutes",get:function(){return{"manage/companies(/)":"companies","manage/companies/new(/)":"newCompany","manage/companies/:id(/)":"editCompany"}}}]),t}(f.Core.AppRouter),$t=function(e){function t(){return qt(this,t),Wt(this,Gt(t).apply(this,arguments))}return Zt(t,e),zt(t,[{key:"companies",value:function(e){var t=e.cursor;this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Ht,{cursor:t}))}},{key:"newCompany",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Ce,null))}},{key:"editCompany",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Te,{id:e}))}},{key:"name",get:function(){return"Companies Application"}},{key:"channelName",get:function(){return s.COMPANIES}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Xt}}]),t}(f.Core.Application),en=n(9),tn=n(6),nn={namespace:"domain_options"},rn=function(){return"/api/domain/v3/settings/types"},an=function(e){return"/api/domain/v3/settings/types/".concat(e)},on=function(){return"/api/domain/v3/settings/types"},cn=function(e){return"/api/domain/v3/settings/types/".concat(e)},sn=function(e){return"/api/domain/v3/settings/types/".concat(e)},un="domain:options",ln="domain:option",pn="update:domain:option",fn="delete:domain:option",mn=function(){return{key:un,url:rn(),normalizeOptions:nn}},dn=function(e){return{key:"".concat(ln,":").concat(e),url:an(e),normalizeOptions:nn}},bn=function(e,t,n){return e.type===tn.DomainOptionType.String&&(e=Sn(e)),{key:ln,url:on(),data:e,type:f.HttpVerbs.POST,success:t,error:n,invalidationKeys:[un],normalizeOptions:nn}},yn=function(e,t){return e.type===tn.DomainOptionType.String&&(e=Sn(e)),{key:"".concat(pn,":").concat(e.id),url:cn(e.id),data:e,type:f.HttpVerbs.PUT,always:t,formatData:function(){return e},normalizeOptions:nn}},vn=function(e,t){return{key:"".concat(fn,":").concat(e),url:sn(e),type:f.HttpVerbs.DELETE,invalidationKeys:[un],normalizeOptions:nn,success:t}};function Sn(e){var t=e.defaultValue;if('"'===t)return Object.assign(Object.assign({},e),{defaultValue:'"'.concat(t,'"')});var n=t.charAt(0),r=t.charAt(t.length-1);return'"'!==n&&(t='"'.concat(t)),'"'!==r&&(t="".concat(t,'"')),Object.assign(Object.assign({},e),{defaultValue:t})}function En(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function hn(e){var t=En(p.useState(!1),2),n=t[0],r=t[1],a=f.Flight.useBasicFetch(dn(e.optionId)),o=Object(ce.useDispatch)(),c=function(){e.closePopup(),f.Core.AppLinkHelper.trigger({application:s.DOMAIN_OPTIONS,action:i.DomainOptions.DOMAIN_OPTIONS})};return p.createElement(m.Popup,{title:"Delete Domain Option",closePopup:e.closePopup,showLoadingSpinner:!a.data},a.data&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to delete ",p.createElement("strong",null,a.data.name),"?")),p.createElement(m.PopupButtons,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){r(!0),f.Flight.fetch(o,vn(e.optionId,c))},buttonText:"Yes, delete this domain option",isSpinnerButton:!0,showSpinner:n}]})))}var gn=function(e){return{application:s.DOMAIN_OPTIONS,action:i.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]}},On={application:s.DOMAIN_OPTIONS,action:i.DomainOptions.NEW_DOMAIN_OPTION};function jn(){var e=f.Flight.useBasicFetch(mn());if(!e.data)return p.createElement(p.Fragment,null);var t=e.data.map((function(e){return e.displayName&&(e.name=e.displayName),e}));return p.createElement(p.Fragment,null,p.createElement("div",{className:"d-flex justify-content-between mb-2"},p.createElement("h5",{className:"d-inline-block m-0"},"Select a domain option type to edit:"),p.createElement(m.AppLink,{appLink:On,className:"d-block"},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.Plus,size:m.SvgContainerSize.Small}),p.createElement("span",null,"New Domain Option"))),p.createElement(ft,{objects:t,getAppLink:gn}))}var Tn=Ee.object().shape({id:Ee.string(),name:Ee.string().trim().max(64,"Name is too long").required("Name is required").default(""),displayName:Ee.string().trim().max(255,"Display name is too long").required("Display name is required").default(""),type:Ee.mixed().required("Type is required").default(tn.DomainOptionType.Boolean),entityType:Ee.mixed().required("Entity type is required").default(m.MasterType.Customer),kind:Ee.mixed().required("Kind is required").default(tn.DomainOptionKind.Temporary),defaultValue:Ee.mixed().required("Default value is required").default("false")}).noUnknown();function Cn(e){var t=e.type,n=e.defaultValue;if(!t)return p.createElement(p.Fragment,null);var r={label:"Default Value",name:"defaultValue",id:"defaultValue",value:n};return t===tn.DomainOptionType.Boolean?p.createElement(m.FormField,Object.assign({as:"select"},r),p.createElement("option",{value:"true"},"True"),p.createElement("option",{value:"false"},"False")):t===tn.DomainOptionType.Long||t===tn.DomainOptionType.StaffRequest?p.createElement(m.FormField,Object.assign({as:"input",type:"number"},r)):t===tn.DomainOptionType.String?p.createElement(m.FormField,Object.assign({as:"input"},r)):void 0}var In=[m.MasterType.Customer,m.MasterType.User];function An(e){var t=null===e.id||void 0===e.id,n=Object(ge.useFormikContext)(),r=Object(m.useCanSubmitForm)(n);return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name (snake_case)",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this domain option",autoFocus:!0}),p.createElement(m.FormField,{label:"Display Name",type:"text",name:"displayName",id:"displayName",value:n.values.displayName,placeholder:"Enter a display name for this domain option"}),p.createElement(m.FormField,{as:"select",label:"Kind",name:"kind",id:"kind",value:n.values.kind},f.ObjectHelper.getEnumKeys(tn.DomainOptionKind).map((function(e){return p.createElement("option",{key:e,value:tn.DomainOptionKind[e]},e)}))),p.createElement(m.FormField,{as:"select",label:"Entity",name:"entityType",id:"entityType",value:n.values.entityType},f.ObjectHelper.getEnumKeys(m.MasterType).filter((function(e){return In.includes(m.MasterType[e])})).map((function(e){return p.createElement("option",{key:e,value:m.MasterType[e]},e)}))),p.createElement(m.FormField,{as:"select",label:"Type",name:"type",id:"type",value:n.values.type},f.ObjectHelper.getEnumKeys(tn.DomainOptionType).map((function(e){return p.createElement("option",{key:e,value:tn.DomainOptionType[e]},e)}))),p.createElement(Cn,{type:n.values.type,defaultValue:n.values.defaultValue}),p.createElement("div",{className:"d-flex justify-content-between"},p.createElement(m.SpinnerButton,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&p.createElement(Ae.Button,{as:m.AppLink,variant:"danger",appLink:{application:s.DOMAIN_OPTIONS,action:i.DomainOptions.DELETE_DOMAIN_OPTION,args:[e.id]}},"Delete")))}function Ln(e){return p.createElement(m.FormWrapper,{initialValues:e.domainOption,validationSchema:Tn,onSubmit:e.saveDomainOption},p.createElement(An,{id:e.domainOption&&e.domainOption.id}))}function Pn(){var e=Object(ce.useDispatch)();return p.createElement(p.Fragment,null,p.createElement("h4",{className:"py-2"},"Create New Domain Option"),p.createElement(Ln,{saveDomainOption:function(t,n){f.Flight.fetch(e,bn(t,(function(e){n(),f.Core.AppLinkHelper.trigger({application:s.DOMAIN_OPTIONS,action:i.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]})}),n))}}))}function Nn(e){var t=e.optionId,n=f.Flight.useBasicFetch(dn(t)),r=Object(ce.useDispatch)();return p.createElement(p.Fragment,null,p.createElement("h4",{className:"py-2"},"Edit Domain Option"),n.data&&p.createElement(Ln,{domainOption:n.data,saveDomainOption:function(e,t){return f.Flight.fetch(r,yn(e,t))}}))}function kn(e){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fn(e,t,n){return t&&Dn(e.prototype,t),n&&Dn(e,n),e}function _n(e,t){return!t||"object"!==kn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rn(e){return(Rn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Un(e,t)}function Un(e,t){return(Un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Vn=function(e){function t(){return wn(this,t),_n(this,Rn(t).apply(this,arguments))}return xn(t,e),Fn(t,[{key:"channelName",get:function(){return s.DOMAIN_OPTIONS}},{key:"appRoutes",get:function(){return{"developer/options(/)":"domainOptions","developer/options/new(/)":"newDomainOption","developer/options/:id(/)":"editDomainOption"}}},{key:"appLinks",get:function(){return["deleteDomainOption"]}}]),t}(f.Core.AppRouter),Bn=function(e){function t(){return wn(this,t),_n(this,Rn(t).apply(this,arguments))}return xn(t,e),Fn(t,[{key:"domainOptions",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(jn,null))}},{key:"newDomainOption",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Pn,null))}},{key:"editDomainOption",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Nn,{optionId:e}))}},{key:"deleteDomainOption",value:function(e){this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(hn,Object.assign({optionId:e},this.getPopupProps())))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return en.Radio.channel(f.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(m.LayoutRegions.ALERT,p.createElement(m.AlertList,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Domain Options Application"}},{key:"channelName",get:function(){return s.DOMAIN_OPTIONS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Vn}}]),t}(f.Core.Application),Jn=function(e){return e?"".concat("/api/master/v2/people","?cursor=").concat(e):"/api/master/v2/people"},Mn=function(e){return"/api/master/v2/objects/".concat(e)},Hn=function(){return"/api/master/v2/people"},Yn=function(e){return"/api/master/v2/objects/".concat(e)},qn="people",Kn="person",zn="update:person",Wn=function(e){return{key:"".concat(qn).concat(e?":".concat(e):""),url:Jn(e)}},Gn=function(e){return{key:"".concat(Kn,":").concat(e),url:Mn(e)}},Zn=function(e,t,n){return{key:Kn,url:Hn(),data:e,type:f.HttpVerbs.POST,success:t,error:n,invalidationKeys:[qn]}},Qn=function(e,t,n){return{key:"".concat(zn,":").concat(e),url:Yn(e),data:t,type:f.HttpVerbs.PUT,always:n}},Xn=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown();function $n(e){var t=Object(ge.useFormikContext)();return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this person",autoFocus:!0}),p.createElement(m.FormButtons,{isNew:e.isNew}))}function er(e){return p.createElement(m.FormWrapper,{initialValues:e.person,validationSchema:Xn,onSubmit:e.savePerson},p.createElement($n,{isNew:!(e.person&&e.person.id)}))}function tr(e){var t=Object(ce.useDispatch)(),n=f.Flight.useBasicFetch(Gn(e.id));return p.createElement(p.Fragment,null,!!n.data&&p.createElement(er,{person:n.data,savePerson:function(n,r){return f.Flight.fetch(t,Qn(e.id,n,r))}}))}function nr(){var e=Object(ce.useDispatch)();return p.createElement(er,{savePerson:function(t,n){f.Flight.fetch(e,Zn(t,(function(e){n(),f.Core.AppLinkHelper.trigger({application:s.PEOPLE,action:i.People.EDIT_PERSON,args:[e.id]})}),n))}})}var rr=s.PEOPLE,ir=function(e){return{application:rr,action:i.People.EDIT_PERSON,args:[e.id]}},ar=function(e){return f.Core.AppLinkHelper.trigger(ir(e))};function or(e){var t=f.Flight.useBasicFetch(Wn(e.cursor));return p.createElement(p.Fragment,null,p.createElement("div",{className:"pb-3 w-50"},p.createElement(m.SearchBar,{placeholder:"Search for a person",onSuggestionSelected:ar,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/people/instant/raw","?q=").concat(e)},activationLength:2})),p.createElement(st,{collection:t&&t.data,collectionAppLink:{application:rr,action:i.People.PEOPLE},newObjectAppLink:{application:rr,action:i.People.NEW_PERSON},getObjectAppLink:ir,objectName:"Person"}))}function cr(e){return(cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ur(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lr(e,t,n){return t&&ur(e.prototype,t),n&&ur(e,n),e}function pr(e,t){return!t||"object"!==cr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fr(e){return(fr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dr(e,t)}function dr(e,t){return(dr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var br=function(e){function t(){return sr(this,t),pr(this,fr(t).apply(this,arguments))}return mr(t,e),lr(t,[{key:"channelName",get:function(){return s.PEOPLE}},{key:"appRoutes",get:function(){return{"manage/people(/)":"people","manage/people/new(/)":"newPerson","manage/people/:id(/)":"editPerson"}}}]),t}(f.Core.AppRouter),yr=function(e){function t(){return sr(this,t),pr(this,fr(t).apply(this,arguments))}return mr(t,e),lr(t,[{key:"people",value:function(e){var t=e.cursor;this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(or,{cursor:t}))}},{key:"newPerson",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(nr,null))}},{key:"editPerson",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(tr,{id:e}))}},{key:"name",get:function(){return"People Application"}},{key:"channelName",get:function(){return s.PEOPLE}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return br}}]),t}(f.Core.Application);function vr(e){return(vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Er(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return!t||"object"!==vr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gr(e){return(gr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Or(e,t){return(Or=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var jr,Tr=function(e){return"/api/master/v2/objects/".concat(e,"?query=cover,banner")},Cr=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},Ir=function(e){return"/api/master/v2/objects/".concat(e,"/playlists")},Ar=function(e){return"/api/master/v2/objects/".concat(e)},Lr=function(e){return"/api/master/v1/playlists/".concat(e)},Pr=function(e,t,n){var r="/api/master/v2/objects/".concat(e,"/").concat(t);return n&&(r+="?query=".concat(n)),r},Nr=function(e){return"/api/master/v1/objects/".concat(e,"/videos/reorder")},kr=function(e,t){return"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t)};!function(e){e.Videos="videos"}(jr||(jr={}));var wr=function(e){function t(){return Sr(this,t),hr(this,gr(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Or(e,t)}(t,e),n=t,(r=[{key:"getPlaylist",value:function(e,t,n){return this.get({resource:Tr(e),eventPrefix:"".concat(a.PLAYLIST,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getPlaylistsById",value:function(e,t,n){return this.get({resource:Cr(e),eventPrefix:"".concat(a.PLAYLISTS,":").concat(e.join(",")),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createPlaylist",value:function(e,t,n,r){return this.create({resource:Ir(t),data:Object.assign(Object.assign({},e),{permissions:Re()}),callback:n,errorCallback:r,eventPrefix:a.PLAYLIST,expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created playlist."),errorHandler:this.alertService.error("Failed to create playlist.")})}},{key:"updatePlaylist",value:function(e,t,n,r){return this.update({resource:Ar(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_PLAYLIST,":").concat(e),invalidationKeys:["".concat(a.PLAYLIST,":").concat(e),a.PLAYLISTS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated playlist"),errorHandler:this.alertService.error("Failed to update playlist")})}},{key:"deletePlaylist",value:function(e,t,n){return this.delete({resource:Lr(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_PLAYLIST,invalidationKeys:["".concat(a.PLAYLIST,":").concat(e)],successHandler:this.alertService.success("Successfully deleted playlist"),errorHandler:this.alertService.error("Failed to delete playlist.")})}},{key:"getPlaylistVideos",value:function(e,t,n){return this.get({resource:Pr(e,jr.Videos,"{orderBy:orderindex,limit:100}"),callback:t,errorCallback:n,eventPrefix:"".concat(a.PLAYLIST,":").concat(e,":").concat(jr.Videos),expiryTime:m.CacheDurations.STANDARD})}},{key:"reorderVideos",value:function(e,t,n){return this.update({resource:Nr(e),data:Object.assign({ownerId:e},t),eventPrefix:a.REORDER_PLAYLIST_VIDEOS,expiryTime:m.CacheDurations.STANDARD,invalidationKeys:["".concat(a.PLAYLIST,":").concat(e,":videos")],callback:n,errorHandler:this.alertService.error("Failed to update playlist order.")})}},{key:"removeVideoFromPlaylist",value:function(e,t,n,r){return this.delete({resource:kr(e,t),eventPrefix:"".concat(a.REMOVE_PLAYLIST_VIDEO,":").concat(e,":").concat(t),invalidationKeys:["".concat(a.PLAYLIST,":").concat(e,":videos")],callback:n,errorCallback:r})}},{key:"name",get:function(){return l.PLAYLIST}},{key:"channelName",get:function(){return u.PLAYLIST}}])&&Er(n.prototype,r),i&&Er(n,i),t}(f.BaseDataService),Dr={dataServiceName:l.PLAYLIST,dataChannelName:u.PLAYLIST},Fr={getPlaylistFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Dr),{eventPrefix:"".concat(a.PLAYLIST,":").concat(e),fetchData:function(t){return t.getPlaylist(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_PLAYLIST})},getPlaylistsByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Dr),{eventPrefix:"".concat(a.PLAYLISTS,":").concat(e.join(",")),fetchData:function(t){return t.getPlaylistsById(e)},setData:t,onError:n})},getPlaylistVideosFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Dr),{eventPrefix:"".concat(a.PLAYLIST,":").concat(e,":").concat(jr.Videos),fetchData:function(t){return t.getPlaylistVideos(e)},setData:t,onError:n})}};function _r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Rr(e){var t=e.imageType,n=e.closePopup,r=p.useContext(qe),i=r.getDataUrl,a=r.setImage,o=_r(p.useState(i()),1)[0],c=_r(p.useState(!1),2),s=c[0],u=c[1],d=Object(f.useService)(l.IMAGE_UPLOAD),b=function(e){a(e),n()},y={dataUrl:o,imageType:t,minWidth:m.ImageMinDimensions[t].width,minHeight:m.ImageMinDimensions[t].height,onCrop:function(e){return d.uploadBase64Image(e,t,b,n)},onCancel:n};return p.createElement(m.Popup,{title:"Crop Image",closePopup:n,onEntered:function(){return u(!0)}},s&&p.createElement(ct,Object.assign({},y)))}var xr=function(e){var t=e.children;return p.createElement(Ze,null,p.createElement(Ke,null,t))};function Ur(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Vr(e){var t=e.playlistId,n=e.closePopup,r=Ur(p.useState(),2),a=r[0],o=r[1],c=Ur(p.useState(!1),2),u=c[0],d=c[1],b=Object(f.useService)(l.PLAYLIST);Object(f.useFetch)(Fr.getPlaylistFetchOptions(t,o),[t]);var y=p.useCallback((function(){n(),f.Core.AppLinkHelper.trigger({application:s.PLAYLISTS,action:i.Playlists.PLAYLISTS})}),[]),v=p.useCallback((function(){d(!0),b.deletePlaylist(t,y,n)}),[t]),S=[{variant:"link",onClick:n,buttonText:"Cancel"},{variant:"danger",onClick:v,buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:u}],E=!!a;return p.createElement(m.Popup,{title:"Delete Playlist",closePopup:n,showLoadingSpinner:!E},E&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to delete ",p.createElement("strong",null,a.name),"?"),p.createElement("p",null,"Please ensure it is not being used in any widgets.")),p.createElement(m.PopupButtons,{buttons:S})))}var Br=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:Ee.string().trim().max(65535,"Description is too long").default(""),cover:Ee.object().shape({fileId:Ee.string(),fileIdType:Ee.mixed(),url:Ee.string()}).default({}).noUnknown(),banner:Ee.object().shape({fileId:Ee.string(),fileIdType:Ee.mixed(),url:Ee.string()}).default({}).noUnknown()}).noUnknown(),Jr=function(e,t){var n=s.PLAYLISTS,r=i.Playlists,a=[{label:"Edit Playlist Details",appLink:{application:n,action:r.EDIT_PLAYLIST,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_PLAYLIST_VIDEOS,args:[t]}}];return xe(e)&&a.push.apply(a,[{label:"Subjects",appLink:{application:n,action:r.EDIT_PLAYLIST_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_PLAYLIST_AUDIENCES,args:[t]}}]),a};function Mr(e){var t=Object(ge.useFormikContext)(),n=Object(m.useCanSubmitForm)(t);return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this playlist",autoFocus:!0}),p.createElement(m.FormField,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this playlist here"}),p.createElement(tt,{imageType:m.ImageType.Covers,currentImage:t.values.cover,setNewImage:function(e){return t.setFieldValue("cover",e)},application:s.PLAYLISTS,uploadAction:i.Playlists.UPLOAD_IMAGE}),p.createElement(tt,{imageType:m.ImageType.Banners,currentImage:t.values.banner,setNewImage:function(e){return t.setFieldValue("banner",e)},application:s.PLAYLISTS,uploadAction:i.Playlists.UPLOAD_IMAGE}),p.createElement("div",{className:"d-flex justify-content-between align-items-center"},p.createElement(m.SpinnerButton,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&p.createElement(m.Actions,{actions:e.actions})))}function Hr(e){var t,n=e.playlist&&e.playlist.id;return p.createElement(m.FormWrapper,{initialValues:e.playlist,validationSchema:Br,onSubmit:e.savePlaylist},p.createElement(Mr,{id:n,actions:!!n&&(t=n,[{label:"Delete playlist",appLink:{application:s.PLAYLISTS,action:i.Playlists.DELETE_PLAYLIST,args:[t]},className:"text-danger"}])}))}var Yr,qr,Kr,zr,Wr=function(e){return function(t){return t.appLink.action===e}};function Gr(e){var t=e.playlistId,n=e.activeAction,r=p.useContext(Ge);return p.createElement("div",{className:"py-2"},!!r&&p.createElement(dt,{tabs:Jr(r,t),isItemActive:Wr(n)}))}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Qr(e){var t=e.playlistId,n=Zr(p.useState(),2),r=n[0],a=n[1],o=Object(f.useService)(l.PLAYLIST);Object(f.useFetch)(Fr.getPlaylistFetchOptions(t,a),[t]);return p.createElement(p.Fragment,null,p.createElement(Gr,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST}),!!r&&p.createElement(Hr,{playlist:r,savePlaylist:function(e,n){return o.updatePlaylist(t,e,n,n)}}))}!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(Yr||(Yr={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(qr||(qr={})),function(e){e.Root="0"}(Kr||(Kr={})),function(e){e.Root="root"}(zr||(zr={}));var Xr=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default(""),levelIds:Ee.array().of(Ee.string()).required("A level is required").default([])}).noUnknown(),$r=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentIds:Ee.array().of(Ee.string()).default([zr.Root]),subjectIds:Ee.array().of(Ee.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject").default([]),type:Ee.mixed().required("Type is required").default(m.ClassificationType.Subject),emphasize:Ee.boolean().default(!1),comingSoon:Ee.boolean().default(!0),cover:Ee.object().shape({fileId:Ee.string(),fileIdType:Ee.mixed(),url:Ee.string()}).default({}).noUnknown(),banner:Ee.object().shape({fileId:Ee.string(),fileIdType:Ee.mixed(),url:Ee.string()}).default({}).noUnknown()}).noUnknown(),ei=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),ti=Ee.object().shape({name:Ee.string().max(255,"Name is too long").required("Name is required"),description:Ee.string().max(65535,"Description is too long").required("Description is required")}),ni=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentId:Ee.string().default(Kr.Root)}).noUnknown(),ri={singularizeMemberType:function(e){switch(e){case qr.Playlists:return"playlist";case qr.Series:return"series";case qr.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case qr.Playlists:return{application:s.PLAYLISTS,action:i.Playlists.EDIT_PLAYLIST,args:n};case qr.Series:return{application:s.SERIES,action:i.Series.EDIT_SERIES,args:n};case qr.Videos:return{application:s.VIDEOS,action:i.Videos.EDIT_VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{label:"Remove ".concat(ri.singularizeMemberType(n)),appLink:{application:s.SUBJECTS,action:t===Yr.Subject?i.Subjects.REMOVE_SUBJECT_MEMBER:i.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},ii=function(){var e=s.SUBJECTS,t=i.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.SUBJECT_CLASSIFICATIONS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},ai=function(e){var t=s.SUBJECTS,n=i.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Classifications",appLink:{application:t,action:n.SUBJECT_CLASSIFICATIONS,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},oi=function(e,t){var n=s.SUBJECTS,r=i.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]};function ci(e){return(ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function si(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function li(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pi(e,t){return!t||"object"!==ci(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fi(e){return(fi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mi(e,t){return(mi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var di=function(){return"/api/subjects/v1/subjects/tree"},bi=function(e){return"/api/subjects/v1/subjects/".concat(e)},yi=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},vi=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},Si=function(){return"/api/subjects/v1/subjects"},Ei=function(e){return"/api/subjects/v1/subjects/".concat(e)},hi=function(e){return"/api/subjects/v1/subjects/".concat(e)},gi=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},Oi=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/subjects?addToClassifications=").concat(!!t)},ji=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},Ti=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},Ci=function(){return"/api/subjects/v1/presentations"},Ii=function(e){return"/api/subjects/v1/presentations/".concat(e)},Ai=function(){return"/api/subjects/v1/presentations"},Li=function(e){return"/api/subjects/v1/presentations/".concat(e)},Pi=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},Ni=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=cover,banner")},ki=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},wi=function(){return"/api/subjects/v1/classifications"},Di=function(e){return"/api/subjects/v1/classifications/".concat(e)},Fi=function(e){return"/api/subjects/v1/classifications/".concat(e)},_i=function(e){return"/api/subjects/v1/objects/".concat(e,"/classifications")},Ri=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/classifications?presentationId=").concat(t)},xi=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},Ui=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},Vi=function(){return"/api/subjects/v1/levels"},Bi=function(e){return"/api/subjects/v1/levels/".concat(e)},Ji=function(){return"/api/subjects/v1/levels"},Mi=function(e){return"/api/subjects/v1/levels/".concat(e)},Hi=function(e){return"/api/subjects/v1/objects/".concat(e,"/levels")},Yi=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/levels?addToAudiences=").concat(!!t)},qi=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},Ki=function(e){return"/api/subjects/v1/audiences/".concat(e)},zi=function(){return"/api/subjects/v1/audiences"},Wi=function(e){return"/api/subjects/v1/audiences/".concat(e)},Gi=function(e){return"/api/subjects/v1/audiences/".concat(e)},Zi=function(e){return"/api/subjects/v1/objects/".concat(e,"/audiences")},Qi=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/audiences?presentationId=").concat(t)},Xi=function(e,t,n){var r="".concat(a.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(a.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},$i=function(e){function t(){return ui(this,t),pi(this,fi(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mi(e,t)}(t,e),n=t,(r=[{key:"getPresentations",value:function(e,t){return this.get({resource:Ci(),eventPrefix:a.PRESENTATIONS,expiryTime:m.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:Ii(e),eventPrefix:"".concat(a.PRESENTATION,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:Ai(),data:e,callback:t,errorCallback:n,eventPrefix:a.PRESENTATION,invalidationKeys:[a.PRESENTATIONS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:Li(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(a.PRESENTATION,":").concat(e),a.PRESENTATIONS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getSubjectTree",value:function(e,t){return this.get({resource:di(),formatData:function(e){return{children:e,name:Kr.Root,id:null}},eventPrefix:a.SUBJECTS,expiryTime:m.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:bi(e),eventPrefix:"".concat(a.SUBJECT,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:yi(e,t),eventPrefix:"".concat(a.SUBJECT,":").concat(e,":").concat(t),expiryTime:m.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:vi(e,t,n),eventPrefix:Xi(e,t,n),expiryTime:m.CacheDurations.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:Si(),data:e,callback:t,errorCallback:n,eventPrefix:a.SUBJECT,invalidationKeys:[a.SUBJECTS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:Ei(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(a.SUBJECT,":").concat(e),a.SUBJECTS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){return this.delete({resource:hi(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_SUBJECT,invalidationKeys:["".concat(a.SUBJECT,":").concat(e),a.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject"),errorHandler:this.alertService.error("Failed to delete subject")})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:gi(e),eventPrefix:"".concat(t,":").concat(e,":").concat(a.SUBJECTS),expiryTime:m.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectSubjects",value:function(e,t,n,r,i,o){var c=ri.singularizeMemberType(n),s=["".concat(n,":").concat(e,":").concat(a.SUBJECTS)];return r&&s.push("".concat(n,":").concat(e,":").concat(a.CLASSIFICATIONS)),s.push.apply(s,si(t.map((function(e){return"".concat(a.SUBJECTS,":").concat(e,":").concat(n)})))),this.update({resource:Oi(e,r),data:t,callback:i,errorCallback:o,eventPrefix:"".concat(a.UPDATE_OBJECT_SUBJECTS,":").concat(e),invalidationKeys:s,successHandler:this.alertService.success("Successfully updated ".concat(c," subjects.")),errorHandler:this.alertService.error("Failed to update ".concat(c," subjects."))})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,o){var c=1===t.length?ri.singularizeMemberType(n):n,s=["".concat(a.SUBJECT,":").concat(e,":").concat(n)].concat(si(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.SUBJECTS)}))),si(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.CLASSIFICATIONS)}))));return this.create({resource:ji(e,r),data:t,callback:i,errorCallback:o,eventPrefix:"".concat(a.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:s,expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(c," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(c," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var o=1===t.length?ri.singularizeMemberType(n):n,c=["".concat(a.SUBJECT,":").concat(e,":").concat(n)].concat(si(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.SUBJECTS)}))));return this.delete({resource:Ti(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(a.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:c,expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(o," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(o," from subject."))})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:Pi(e),formatData:function(e){return{children:e,name:zr.Root,id:null}},eventPrefix:"".concat(a.CLASSIFICATIONS,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:Ni(e),eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:ki(e,t),eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:m.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:wi(),data:e,callback:t,errorCallback:n,eventPrefix:a.CLASSIFICATION,invalidationKeys:[a.CLASSIFICATIONS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:Di(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(a.CLASSIFICATION,":").concat(e),a.CLASSIFICATIONS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:Fi(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_CLASSIFICATION,invalidationKeys:["".concat(a.CLASSIFICATION,":").concat(e),a.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"getObjectClassifications",value:function(e,t,n,r){return this.get({resource:_i(e),eventPrefix:"".concat(t,":").concat(e,":").concat(a.CLASSIFICATIONS),expiryTime:m.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectClassifications",value:function(e,t,n,r,i,o){var c=ri.singularizeMemberType(r),s=["".concat(r,":").concat(e,":").concat(a.CLASSIFICATIONS)];return s.push.apply(s,si(n.map((function(e){return"".concat(a.CLASSIFICATION,":").concat(e,":").concat(r)})))),this.update({resource:Ri(e,t),data:n,callback:i,errorCallback:o,eventPrefix:"".concat(a.UPDATE_OBJECT_CLASSIFICATIONS,":").concat(e),invalidationKeys:s,successHandler:this.alertService.success("Successfully updated ".concat(c," classifications.")),errorHandler:this.alertService.error("Failed to update ".concat(c," classifications."))})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,o,c){var s=1===t.length?ri.singularizeMemberType(n):n,u=["".concat(a.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&u.push(Xi(r,i,n)),u.push.apply(u,si(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.CLASSIFICATIONS)})))),this.create({resource:xi(e),data:t,callback:o,errorCallback:c,eventPrefix:"".concat(a.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:u,expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(s," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(s," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,o,c){var s=1===t.length?ri.singularizeMemberType(n):n,u=["".concat(a.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&u.push(Xi(r,i,n)),u.push.apply(u,si(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.CLASSIFICATIONS)})))),this.delete({resource:Ui(e,t),callback:o,errorCallback:c,eventPrefix:"".concat(a.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:u,expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(s," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(s," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:Vi(),eventPrefix:a.LEVELS,expiryTime:m.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:Bi(e),eventPrefix:"".concat(a.LEVEL,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:Ji(),data:e,callback:t,errorCallback:n,eventPrefix:a.LEVEL,invalidationKeys:[a.LEVELS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:Mi(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(a.LEVEL,":").concat(e),a.LEVELS],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getObjectLevels",value:function(e,t,n,r){return this.get({resource:Hi(e),eventPrefix:"".concat(t,":").concat(e,":").concat(a.LEVELS),expiryTime:m.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectLevels",value:function(e,t,n,r,i,o){var c=ri.singularizeMemberType(n),s=["".concat(n,":").concat(e,":").concat(a.LEVELS)];return r&&s.push("".concat(n,":").concat(e,":").concat(a.AUDIENCES)),this.update({resource:Yi(e,r),data:t,callback:i,errorCallback:o,eventPrefix:"".concat(a.UPDATE_OBJECT_LEVELS,":").concat(e),invalidationKeys:s,successHandler:this.alertService.success("Successfully updated ".concat(c," levels.")),errorHandler:this.alertService.error("Failed to update ".concat(c," levels."))})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:qi(e),callback:t,errorCallback:n,eventPrefix:"".concat(a.AUDIENCES,":").concat(e),expiryTime:m.CacheDurations.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:Ki(e),callback:t,errorCallback:n,eventPrefix:"".concat(a.AUDIENCE,":").concat(e),expiryTime:m.CacheDurations.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:zi(),data:e,callback:t,errorCallback:n,eventPrefix:a.AUDIENCE,invalidationKeys:[a.AUDIENCES],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:Wi(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(a.AUDIENCE,":").concat(e),a.AUDIENCES],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:Gi(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_AUDIENCE,invalidationKeys:["".concat(a.AUDIENCE,":").concat(e),a.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"getObjectAudiences",value:function(e,t,n,r){return this.get({resource:Zi(e),eventPrefix:"".concat(t,":").concat(e,":").concat(a.AUDIENCES),expiryTime:m.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectAudiences",value:function(e,t,n,r,i,o){var c=ri.singularizeMemberType(r);return this.update({resource:Qi(e,t),data:n,callback:i,errorCallback:o,eventPrefix:"".concat(a.UPDATE_OBJECT_AUDIENCES,":").concat(e),invalidationKeys:["".concat(r,":").concat(e,":").concat(a.AUDIENCES)],successHandler:this.alertService.success("Successfully updated ".concat(c," audiences.")),errorHandler:this.alertService.error("Failed to update ".concat(c," audiences."))})}},{key:"name",get:function(){return l.SUBJECT}},{key:"channelName",get:function(){return u.SUBJECT}}])&&li(n.prototype,r),i&&li(n,i),t}(f.BaseDataService),ea={dataServiceName:l.SUBJECT,dataChannelName:u.SUBJECT},ta={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},ea),{eventPrefix:a.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},ea),{eventPrefix:Xi(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(t,":").concat(e,":").concat(a.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},ea),{eventPrefix:a.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getObjectClassificationsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(t,":").concat(e,":").concat(a.CLASSIFICATIONS),fetchData:function(n){return n.getObjectClassifications(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},ea),{eventPrefix:a.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getObjectLevelsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(t,":").concat(e,":").concat(a.LEVELS),fetchData:function(n){return n.getObjectLevels(e,t)},setData:n,onError:r})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(a.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})},getObjectAudiencesFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},ea),{eventPrefix:"".concat(t,":").concat(e,":").concat(a.AUDIENCES),fetchData:function(n){return n.getObjectAudiences(e,t)},setData:n,onError:r})}},na=function(e){return{application:s.SUBJECTS,action:i.Subjects.EDIT_LEVEL,args:[e.id]}},ra=function(e,t){var n=e.levelIds;return t.filter((function(e){return n.includes(e.id)}))};function ia(e){var t=e.showLevels;return p.createElement("thead",null,p.createElement("tr",null,p.createElement("th",null,"Audiences"),!!t&&p.createElement("th",null,"Mapped Level(s)")))}function aa(e){var t,n=e.audience,r=e.levels;return p.createElement("tr",null,p.createElement("td",null,p.createElement(m.AppLink,{appLink:(t=n,{application:s.SUBJECTS,action:i.Subjects.EDIT_AUDIENCE,args:[t.presentationId,t.masterId]})},n.name)),p.createElement("td",null,r.map((function(e){return p.createElement(m.AppLink,{key:e.id,appLink:na(e),className:"mr-2"},e.name)}))))}function oa(e){var t=e.audiences,n=e.levels;return p.createElement(Ae.Table,{responsive:!0,bordered:!0},p.createElement(ia,{showLevels:!!t.length}),p.createElement("tbody",null,t.length?t.map((function(e){return p.createElement(aa,{key:e.masterId,audience:e,levels:ra(e,n)})})):p.createElement("tr",null,p.createElement("td",null,"This presentation has no audiences."))))}function ca(e){var t=null===e.masterId||void 0===e.masterId,n=Object(ge.useFormikContext)(),r=Object(m.useCanSubmitForm)(n);return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this audience",autoFocus:!0}),p.createElement(m.FormField,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return p.createElement("option",{key:e.id,value:e.id},e.name)}))),p.createElement("div",{className:"d-flex justify-content-between"},p.createElement(m.SpinnerButton,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&p.createElement(Ae.Button,{as:m.AppLink,variant:"danger",appLink:{application:s.SUBJECTS,action:i.Subjects.DELETE_AUDIENCE,args:[e.presentationId,e.masterId]}},"Delete")))}function sa(e){return p.createElement(m.FormWrapper,{initialValues:e.audience,validationSchema:Xr,onSubmit:e.saveAudience},p.createElement(ca,{masterId:e.audience&&e.audience.masterId,presentationId:e.presentationId,levels:e.levels}))}function ua(e){var t=e.objectAudiences,n=e.presentationAudiences;return t.filter((function(e){return n.some((function(t){return t.masterId===e.masterId}))}))}function la(e){var t,n,r,i,a,o=ri.singularizeMemberType(e.memberType),c=(n=(t=e).presentationAudiences,r=t.objectLevels,i=t.objectAudiences,a=r.map((function(e){return e.id})),n.filter((function(e){return f.ArrayHelper.intersection(e.levelIds,a).length||i.some((function(t){return t.masterId===e.masterId}))})));return p.createElement(p.Fragment,null,p.createElement("div",{className:"border-bottom pb-3 mb-3"},p.createElement("h6",null,"Levels"),p.createElement("p",null,"Select which levels this ".concat(o," is mapped to.")),p.createElement("p",null,"To see how levels correspond to audiences, scroll down to the audience-level mappings table."),p.createElement(La,{initialValues:{levelIds:e.objectLevels.map((function(e){return e.id})),addToAudiences:!0},saveLevels:e.saveLevels,levels:e.levels,memberType:e.memberType})),p.createElement("h6",null,"Audiences"),p.createElement("p",null,"Select a presentation to view its audiences and map them to this ".concat(o,".")),p.createElement("div",{className:"w-50 pb-3"},p.createElement(ka,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),p.createElement("p",null,"Audience to level mappings for this presentation are displayed below."),p.createElement(oa,{levels:e.levels,audiences:e.presentationAudiences}),p.createElement("p",null,"Only the audiences which are mapped to a level that this"+" ".concat(o," is mapped to are displayed below.")),!!c.length&&p.createElement(fa,{initialValues:{audienceIds:ua(e).map((function(e){return e.masterId}))},saveAudiences:e.saveAudiences,audiences:c}))}function pa(e){var t=Object(ge.useFormikContext)(),n=Object(m.useCanSubmitForm)(t);return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Audience(s)",as:"select",name:"audienceIds",id:"audience-ids",multiple:!0,size:e.audiences.length,value:t.values.audienceIds},e.audiences.map((function(e){return p.createElement("option",{key:e.masterId,value:e.masterId},e.name)}))),p.createElement("div",{className:"d-flex justify-content-end"},p.createElement(m.SpinnerButton,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Audiences")))}function fa(e){return p.createElement(m.FormWrapper,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.audienceIds;return e.saveAudiences(r,n)},enableReinitialize:!0},p.createElement(pa,{audiences:e.audiences}))}function ma(e){var t=e.item,n=e.getItemAppLink,r=e.actions,i=e.pinState;return p.createElement("tr",null,p.createElement("td",null,p.createElement(m.AppLink,{appLink:n(t)},t.name)),i.isPinnable&&p.createElement("td",null,p.createElement(Ne,{selected:parseInt(t.id)===parseInt(i.currentPinnedVideo),onToggle:function(e){return i.onChange(e,t.id)},id:t.id})),r&&p.createElement("td",null,p.createElement("span",{className:"d-flex justify-content-end"},p.createElement(m.Actions,{actions:r}))))}function da(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ba(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ya(e){var t=e.items,n=e.memberType,r=e.classification,i=e.getItemAppLink,a=e.getActions,o=e.updatePinnedVideo,c=ba(p.useState(!1),2),s=c[0],u=c[1],l=function(e,t){var n=e.pinnedVideoMasterId||null,r=da(p.useState(n),2),i=r[0],a=r[1];return{currentPinnedVideo:i,onChange:function(e,t){a(e?t:null)},canSubmit:n!==i,isPinnable:t===qr.Videos}}(r,n);if(!t.length)return p.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var d="".concat(Be(ri.singularizeMemberType(n))," Name");return p.createElement(p.Fragment,null,p.createElement(Ae.Table,{responsive:!0},p.createElement("thead",null,p.createElement("tr",null,p.createElement("th",null,d),l.isPinnable&&p.createElement("th",null,"Pinned"),f.FunctionHelper.isFunction(a)&&p.createElement("th",null))),p.createElement("tbody",null,t.map((function(e){return p.createElement(ma,{item:e,key:e.id,getItemAppLink:i,actions:f.FunctionHelper.isFunction(a)&&a(e),pinState:l})})))),l.isPinnable&&p.createElement(m.SpinnerButton,{showSpinner:s,onClick:function(){u(!0),o(l.currentPinnedVideo,(function(){return u(!1)}))},disabled:!l.canSubmit||s},"Save"))}function va(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Sa=function(e){return{application:s.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e]}};function Ea(e){var t=Object(ge.useFormikContext)(),n=Object(m.useCanSubmitForm)(t),r=null===e.id||void 0===e.id,a=!r||!(!t.values.parentIds||!t.values.parentIds.length),o=va(p.useState(a),2),c=o[0],u=o[1];p.useEffect((function(){return u(a)}),[e.id,t.values.parentIds]),p.useEffect((function(){t.values.subjectIds.length&&!t.touched.subjectIds&&t.setFieldTouched("subjectIds",!0)}),[t.values.subjectIds]);var l=function(e){return t.setFieldValue("parentIds",f.ArrayHelper.addOrRemove(t.values.parentIds.map((function(e){return e.toString()})),e.id.toString()))},d=function(e){return t.setFieldValue("subjectIds",f.ArrayHelper.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),e.id.toString()))},b=function(e){return"".concat(m.FormHelper.getCustomFormControlClassName(t.errors,t.touched,e)," h-auto py-2")};return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this classification",autoFocus:!0}),p.createElement(m.FormField,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},f.ObjectHelper.getEnumKeys(m.ClassificationType).map((function(e){return p.createElement("option",{key:e,value:m.ClassificationType[e]},e)}))),p.createElement(m.FormField,{label:"Coming Soon",name:"comingSoon",id:"comingSoon",type:"checkbox",checked:t.values.comingSoon}),p.createElement(m.FormField,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:t.values.emphasize}),p.createElement(m.FormField,{name:"parentIds"},(function(){return p.createElement("div",{className:b("parentIds")},p.createElement(Ct,{label:"Parent Classification(s)",tree:e.classificationTree,selectedIds:t.values.parentIds,onSelect:l,collapse:c,noSelectionMessage:"No parent selected, this will be a root classification.",isNodeDisabled:(n=e.classificationTree,r=e.id,function(e){if(e.id===r)return!0;var t=Me.find(n,r);return!!Me.find(t,e.id)})}));var n,r})),p.createElement(m.FormField,{name:"subjectIds"},(function(){return p.createElement("div",{className:b("subjectIds")},p.createElement(Ct,{label:"Mapped Subject(s)",tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:d,collapse:!r,getSelectedItemAppLink:Sa}))})),p.createElement(tt,{imageType:m.ImageType.Covers,currentImage:t.values.cover,setNewImage:function(e){return t.setFieldValue("cover",e)},application:s.SUBJECTS,uploadAction:i.Subjects.UPLOAD_IMAGE}),p.createElement(tt,{imageType:m.ImageType.Banners,currentImage:t.values.banner,setNewImage:function(e){return t.setFieldValue("banner",e)},application:s.SUBJECTS,uploadAction:i.Subjects.UPLOAD_IMAGE}),p.createElement("div",{className:"d-flex justify-content-between"},p.createElement(m.SpinnerButton,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},r?"Create":"Save"),!r&&p.createElement(Ae.Button,{as:m.AppLink,variant:"danger",appLink:{application:s.SUBJECTS,action:i.Subjects.DELETE_CLASSIFICATION,args:[e.presentationId,e.id]}},"Delete")))}function ha(e){return p.createElement(m.FormWrapper,{initialValues:e.classification,validationSchema:$r,onSubmit:e.saveClassification},p.createElement(Ea,{id:e.classification&&e.classification.id,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree}))}var ga=function(e){return function(t){if(!e)return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION;switch(e){case qr.Playlists:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case qr.Series:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_SERIES;case qr.Videos:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function Oa(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?p.createElement(p.Fragment,null,p.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),p.createElement("div",{className:"py-2"},p.createElement(dt,{tabs:oi(t.id,n),isItemActive:ga(r)}))):p.createElement(p.Fragment,null)}function ja(e){var t=Object(ge.useFormikContext)(),n=Object(m.useCanSubmitForm)(t),r=function(e){return t.setFieldValue("classificationIds",f.ArrayHelper.addOrRemove(t.values.classificationIds.map((function(e){return e.toString()})),e.id.toString()))},a="".concat(m.FormHelper.getCustomFormControlClassName(t.errors,t.touched,"classificationIds")," h-auto py-2");return p.createElement(ge.Form,null,p.createElement(m.FormField,{name:"classificationIds"},(function(){return p.createElement("div",{className:a},p.createElement(Ct,{label:"Mapped Classification(s)",tree:e.classificationTree,selectedIds:t.values.classificationIds,onSelect:r,getSelectedItemAppLink:(n=e.presentationId,function(e){return{application:s.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[n,e]}}),isNodeDisabled:e.isClassificationDisabled}));var n})),p.createElement("div",{className:"d-flex justify-content-end"},p.createElement(m.SpinnerButton,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Classifications")))}function Ta(e){return p.createElement(m.FormWrapper,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.classificationIds;return e.saveClassifications(r,n)},enableReinitialize:!0},p.createElement(ja,{presentationId:e.presentationId,classificationTree:e.classificationTree,isClassificationDisabled:e.isClassificationDisabled}))}function Ca(e){var t=null===e.id||void 0===e.id,n=Object(ge.useFormikContext)(),r=Object(m.useCanSubmitForm)(n);return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this level",autoFocus:!0}),p.createElement(m.SpinnerButton,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"))}function Ia(e){return p.createElement(m.FormWrapper,{initialValues:e.level,validationSchema:ei,onSubmit:e.saveLevel},p.createElement(Ca,{id:e.level&&e.level.id}))}function Aa(e){var t=ri.singularizeMemberType(e.memberType),n=Object(ge.useFormikContext)(),r=Object(m.useCanSubmitForm)(n);return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return p.createElement("option",{key:e.id,value:e.id},e.name)}))),p.createElement(m.FormField,{label:"Automatically add to audiences*",name:"addToAudiences",id:"add-to-audiences",type:"checkbox",checked:n.values.addToAudiences}),p.createElement("p",null,p.createElement("em",null,"*If selected, when adding a ".concat(t," to a level, all of that level's")+" audiences across all presentations will also be added to.")),p.createElement("p",null,p.createElement("strong",null,"Note:")," When removing a ".concat(t," from a level, that level's audiences "),p.createElement("strong",null,"will not")," be automatically removed from."),p.createElement("div",{className:"d-flex justify-content-end"},p.createElement(m.SpinnerButton,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},"Save Levels")))}function La(e){return p.createElement(m.FormWrapper,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.levelIds,i=t.addToAudiences;return e.saveLevels(r,i,n)}},p.createElement(Aa,{levels:e.levels,memberType:e.memberType}))}function Pa(e){var t=e.values,n=t.name,r=t.description,i=e.id,a=e.isSubmitting,o=!i;return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),p.createElement(m.FormField,{label:"Description",as:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),p.createElement(m.SpinnerButton,{showSpinner:a,type:"submit"},o?"Create":"Save"))}function Na(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.description,c=void 0===o?"":o,s=e.savePresentation;return p.createElement(ge.Formik,{initialValues:{name:a,description:c},validationSchema:ti,onSubmit:s},(function(e){return p.createElement(Pa,Object.assign({id:r},e))}))}function ka(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label,a=function(e){var n,i,a=(n=e,i=t,f.ArrayHelper.first(i.filter((function(e){return e.id.toString()===n.toString()}))));r(a)};return p.useEffect((function(){t&&!n&&r(t[0])}),[t]),p.createElement(p.Fragment,null,!!n&&p.createElement(p.Fragment,null,p.createElement(Ae.Form.Label,null,i),p.createElement(Ae.Form.Control,{as:"select",value:n.id,onChange:function(e){return a(e.target.value)},className:"cursor-pointer"},t.map((function(e){return p.createElement("option",{value:e.id,key:e.id},e.name)})))))}function wa(e){return p.createElement(p.Fragment,null,p.createElement("h4",null,"".concat(Be(e.memberType))),p.createElement(Ae.Table,{responsive:!0},p.createElement("tbody",null,e.objects&&e.objects.map((function(t){return p.createElement("tr",{key:t.id},p.createElement("td",null,p.createElement(m.AppLink,{appLink:ri.getMemberAppLink(e.memberType,t.id)},t.name)))})))),p.createElement(Ma,{initialValues:{subjectIds:[],addToClassifications:!0},subjectTree:e.subjectTree,saveSubjects:e.onClickAddToSubject,memberType:e.memberType,saveBtnText:"Add to subject",subjectRequired:!0}))}function Da(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Fa(e){var t=ri.singularizeMemberType(e.memberType),n=[].concat(Da(e.objectClassifications),Da(e.objectSubjectClassifications)).map((function(e){return e.id}));return p.createElement(p.Fragment,null,p.createElement("div",{className:"border-bottom pb-3 mb-3"},p.createElement("h6",null,"Subjects"),p.createElement("p",null,"Select which subjects this ".concat(t," is mapped to.")),p.createElement(Ma,{initialValues:{subjectIds:e.objectSubjects.map((function(e){return e.id}))},subjectTree:e.subjectTree,saveSubjects:e.saveSubjects,memberType:e.memberType,saveBtnText:"Save Subjects",allowMultiple:!0})),p.createElement("h6",null,"Classifications"),p.createElement("p",null,"Select a presentation to view its classifications and map them to this ".concat(t,".")),p.createElement("div",{className:"w-50 pb-3"},p.createElement(ka,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),e.currentPresentation&&e.classificationTree&&e.classificationTree.children.length?p.createElement(p.Fragment,null,p.createElement("p",null,"Only classifications which are mapped to one of the subjects selected above can be selected."),p.createElement(Ta,{initialValues:{classificationIds:e.objectClassifications.map((function(e){return e.id}))},presentationId:e.currentPresentation.id,classificationTree:e.classificationTree,saveClassifications:e.saveClassifications,isClassificationDisabled:function(e){return!n.includes(e.id)}})):p.createElement("p",null,"This presentation has no classifications."))}function _a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}ka.defaultProps={label:"Presentation"};function Ra(e){var t=!e.id,n=Object(ge.useFormikContext)(),r=Object(m.useCanSubmitForm)(n),a=!t||!!n.values.parentId,o=_a(p.useState(a),2),c=o[0],u=o[1];p.useEffect((function(){return u(a)}),[e.id,n.values.parentId]);var l=function(e){var t=e.id===n.values.parentId?null:e.id;n.setFieldValue("parentId",t)},f="".concat(m.FormHelper.getCustomFormControlClassName(n.errors,n.touched,"parentId")," h-auto py-2");return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this subject",autoFocus:!0}),p.createElement(m.FormField,{name:"parentId"},(function(){return p.createElement("div",{className:f},p.createElement(Ct,{label:"Parent Subject",tree:e.subjectTree,selectedIds:[n.values.parentId],onSelect:l,collapse:c,noSelectionMessage:"No parent selected, this will be a root subject.",isNodeDisabled:(t=e.subjectTree,r=e.id,function(e){if(e.id===r)return!0;var n=Me.find(t,r);return!!Me.find(n,e.id)})}));var t,r})),p.createElement("div",{className:"d-flex justify-content-between"},p.createElement(m.SpinnerButton,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&p.createElement(Ae.Button,{as:m.AppLink,variant:"danger",appLink:{application:s.SUBJECTS,action:i.Subjects.DELETE_SUBJECT,args:[e.id]}},"Delete")))}function xa(e){return p.createElement(m.FormWrapper,{initialValues:e.subject,validationSchema:ni,onSubmit:e.saveSubject},p.createElement(Ra,{id:e.subject&&e.subject.id,subjectTree:e.subjectTree}))}var Ua=function(e){return function(t){return t.appLink.action===e}};function Va(e){var t=e.subjectId,n=e.activeAction;return p.createElement(p.Fragment,null,p.createElement(Ae.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),p.createElement("div",{className:"py-2"},p.createElement(dt,{tabs:ai(t),isItemActive:Ua(n)})))}var Ba=function(e){return{application:s.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e]}};function Ja(e){var t=Object(ge.useFormikContext)(),n=Object(m.useCanSubmitForm)(t),r=function(n){var r=e.allowMultiple?f.ArrayHelper.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),n.id.toString()):[n.id];t.setFieldValue("subjectIds",r)},i=ri.singularizeMemberType(e.memberType),a="".concat(m.FormHelper.getCustomFormControlClassName(t.errors,t.touched,"subjectIds")," h-auto py-2");return p.createElement(ge.Form,null,p.createElement(m.FormField,{name:"subjectIds"},(function(){return p.createElement("div",{className:a},p.createElement(Ct,{label:"Mapped Subject".concat(e.allowMultiple?"(s)":""),tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:r,collapse:!!t.initialValues.subjectIds.length,getSelectedItemAppLink:Ba}))})),p.createElement(m.FormField,{label:"Automatically add to classifications*",name:"addToClassifications",id:"add-to-classifications",type:"checkbox",checked:t.values.addToClassifications}),p.createElement("p",null,p.createElement("em",null,"*If selected, when adding a ".concat(i," to a subject, all of that subject's")+" mapped classifications across all presentations will also be added to.")),p.createElement("div",{className:"d-flex justify-content-end"},p.createElement(m.SpinnerButton,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.saveBtnText)))}function Ma(e){var t;return p.createElement(m.FormWrapper,{initialValues:e.initialValues,validationSchema:(t=e.subjectRequired,Ee.object().shape({subjectIds:t?Ee.array().of(Ee.string()).min(1,"A subject is required").required("A subject is required"):Ee.array().of(Ee.string()),addToClassifications:Ee.boolean().default(!0)}).noUnknown()),onSubmit:function(t,n){var r=t.subjectIds,i=t.addToClassifications;return e.saveSubjects(r,i,n)}},p.createElement(Ja,{subjectTree:e.subjectTree,memberType:e.memberType,allowMultiple:e.allowMultiple,saveBtnText:e.saveBtnText}))}Ja.defaultProps={saveBtnText:"Save"};var Ha=function(e){return p.createElement("div",{className:"border rounded p-2 mb-3"},p.createElement("h6",{className:"border-bottom pb-1"},e.presentation.name),e.classifications&&e.classifications.length?p.createElement("ul",{className:"list-unstyled mb-0"},e.classifications.map((function(t){return p.createElement("li",{key:t.id,className:"py-1"},p.createElement(m.AppLink,{appLink:(n=e.presentation.id,r=t.id,{application:s.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[n,r]})},t.name));var n,r}))):p.createElement("p",null,p.createElement("em",null,"There are no classifications mapped to this subject in this presentation.")))},Ya=function(e){return p.createElement(p.Fragment,null,!!e.presentations&&!!e.classificationDictionary&&e.presentations.map((function(t){return p.createElement(Ha,{key:t.id,presentation:t,classifications:e.classificationDictionary[t.id]})})))},qa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Ka(e){return p.createElement(p.Fragment,null,e.classifications.map((function(t){return p.createElement("th",{key:t.id},p.createElement("span",{className:"d-inline-block"},p.createElement(Ne,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),p.createElement(m.AppLink,{appLink:e.getClassificationAppLink(t.id)},function(e,t){return t?e.name:"Classification: ".concat(e.name)}(t,e.showClassificationSubHeader)))})))}function za(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=qa(e,["memberType","hasActions","classifications"]),a="".concat(Be(ri.singularizeMemberType(t))," Name"),o=!!r&&!!r.length,c=o&&r.length>1,s=o?2:1,u=Object.assign({classifications:r,showClassificationSubHeader:c},i);return p.createElement("thead",null,p.createElement("tr",null,p.createElement("th",{rowSpan:s},a),o&&(c?p.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):p.createElement(Ka,Object.assign({},u))),n&&p.createElement("th",{rowSpan:s})),o&&c&&p.createElement("tr",null,p.createElement(Ka,Object.assign({},u))))}function Wa(e){var t=e.member,n=t.id,r=t.name,i=t.classifications,a=void 0===i?[]:i,o=e.getMemberAppLink,c=e.onToggleClassification,s=e.actions,u=f.FunctionHelper.isFunction(o)&&o(n);return a.length&&!f.FunctionHelper.isFunction(c)&&f.Core.ErrorHelper.throw(new f.DevError("onToggleClassification must be passed to SubjectMemberItem")),p.createElement("tr",null,p.createElement("td",null,u?p.createElement(m.AppLink,{appLink:o(n)},r):r),!!a.length&&a.map((function(e){return p.createElement("td",{key:e.id},p.createElement(Ne,{selected:e.selected,onToggle:function(t){return c(e.id,t,n)}}))})),s&&p.createElement("td",null,p.createElement("span",{className:"d-flex justify-content-end"},p.createElement(m.Actions,{actions:s}))))}var Ga=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Za(e,t){return function(n){var r=n[e],i=m.CollectionHelper.length(r);return!!i&&i===t.length}}function Qa(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,a=e.getClassificationAppLink,o=e.onToggleClassification,c=Ga(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return p.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var s=f.FunctionHelper.isFunction(r),u={memberType:n,classifications:i,getClassificationAppLink:a,getIsClassificationSelected:Za(n,t),onToggleClassification:o,hasActions:s};return p.createElement(Ae.Table,{responsive:!0,bordered:!0},p.createElement(za,Object.assign({},u)),p.createElement("tbody",null,t.map((function(e,t){return p.createElement(Wa,Object.assign({key:t,member:e,actions:s&&r(e.id),onToggleClassification:o},c))}))))}function Xa(e){var t=e.navItems,n=e.currentAppLink;return p.createElement(Ae.Container,null,p.createElement(Ae.Navbar,{className:"justify-content-between align-items-center"},p.createElement(Ae.Nav,null,!!t&&t.map((function(e,t){return p.createElement(Ae.Nav.Item,{key:t},p.createElement(Ae.Nav.Link,{as:m.AppLink,appLink:e.appLink,active:_e.isItemActive(e,n),className:_e.isItemActive(e,n)?"text-primary":""},e.label))})))))}function $a(e,t){p.useEffect((function(){e.presentations&&!e.currentPresentation&&m.StateHelper.getSetStateByKey(t,"currentPresentation")(f.ArrayHelper.first(e.presentations))}),[e.presentations])}function eo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function to(e){var t=e.playlistId,n=eo(p.useState({}),2),r=n[0],a=n[1],o=Object(f.useService)(l.SUBJECT);!function(e,t,n){var r=function(e){return m.StateHelper.getSetStateByKey(n,e)};Object(f.useBulkFetch)([Fr.getPlaylistFetchOptions(e,r("playlist")),ta.getObjectLevelsFetchOptions(e,qr.Playlists,r("playlistLevels"))],[e]),Object(f.useFetch)(ta.getObjectAudiencesFetchOptions(e,qr.Playlists,r("playlistAudiences")),[e,t.playlistLevels]),Object(f.useBulkFetch)([ta.getPresentationsFetchOptions(r("presentations")),ta.getLevelsFetchOptions(r("levels"))],[]),Object(f.useFetch)(!!t.currentPresentation&&ta.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(t,r,a),$a(r,a);var c=!!(r.presentations&&r.levels&&r.presentationAudiences&&r.playlistLevels&&r.playlistAudiences);return p.createElement(p.Fragment,null,p.createElement(Gr,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST_AUDIENCES}),p.createElement(ut,{object:r.playlist}),!!c&&p.createElement(la,{objectLevels:r.playlistLevels,objectAudiences:r.playlistAudiences,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:m.StateHelper.getSetStateByKey(a,"currentPresentation"),levels:r.levels,presentationAudiences:r.presentationAudiences,memberType:qr.Playlists,saveLevels:function(e,n,r){return o.updateObjectLevels(t,e,qr.Playlists,n,r,r)},saveAudiences:function(e,n){return o.updateObjectAudiences(t,r.currentPresentation.id,e,qr.Playlists,n,n)}}))}function no(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ro(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function io(e){var t=e.playlistId,n=no(p.useState({}),2),r=n[0],a=n[1],o=Object(f.useService)(l.SUBJECT);!function(e,t,n){var r=function(e){return m.StateHelper.getSetStateByKey(n,e)};Object(f.useBulkFetch)([ta.getSubjectTreeFetchOptions(r("subjectTree")),ta.getPresentationsFetchOptions(r("presentations"))],[]),Object(f.useBulkFetch)([Fr.getPlaylistFetchOptions(e,r("playlist")),ta.getObjectSubjectsFetchOptions(e,qr.Playlists,r("playlistSubjects"))],[e]),Object(f.useFetch)(!!t.currentPresentation&&ta.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),p.useEffect((function(){return r("subjectClassifications")([])}),[t.playlistSubjects]);var i=function(e,t){return[].concat(ro(t.subjectClassifications||[]),ro(e))},a=t.playlistSubjects&&t.playlistSubjects.map((function(e){return ta.getSubjectClassificationFetchOptions(e.id,m.StateHelper.getSetStateByKey(n,"subjectClassifications",i))}));Object(f.useBulkFetch)(a,[t.playlistSubjects],!!a),Object(f.useFetch)(ta.getObjectClassificationsFetchOptions(e,qr.Playlists,r("playlistClassifications")),[e,t.playlistSubjects])}(t,r,a),$a(r,a);var c=!!(r.playlistSubjects&&r.subjectTree&&r.presentations&&r.classificationTree&&r.playlistClassifications&&r.subjectClassifications);return p.createElement(p.Fragment,null,p.createElement(Gr,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST_SUBJECTS}),p.createElement(ut,{object:r.playlist}),c&&p.createElement(Fa,{objectSubjects:r.playlistSubjects,subjectTree:r.subjectTree,memberType:qr.Playlists,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:m.StateHelper.getSetStateByKey(a,"currentPresentation"),objectClassifications:r.playlistClassifications,objectSubjectClassifications:r.subjectClassifications,classificationTree:r.classificationTree,saveSubjects:function(e,n,r){return o.updateObjectSubjects(t,e,qr.Playlists,n,r,r)},saveClassifications:function(e,n){return o.updateObjectClassifications(t,r.currentPresentation.id,e,qr.Playlists,n,n)}}))}function ao(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var oo=function(e){return function(t){return[{label:"Remove video",appLink:{application:s.PLAYLISTS,action:i.Playlists.REMOVE_VIDEO,args:[e.toString(),t.id.toString()]},className:"text-danger"}]}},co=function(e){return{application:s.VIDEOS,action:i.Videos.EDIT_VIDEO,args:[e.id]}};function so(e){var t=e.playlistId,n=ao(p.useState(),2),r=n[0],a=n[1],o=ao(p.useState(),2),c=o[0],s=o[1],u=Object(f.useService)(l.PLAYLIST);!function(e,t,n){Object(f.useBulkFetch)([Fr.getPlaylistFetchOptions(e,t),Fr.getPlaylistVideosFetchOptions(e,n)],[e])}(t,a,s);return p.createElement(p.Fragment,null,p.createElement(Gr,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST_VIDEOS}),p.createElement(ut,{object:r}),!!c&&p.createElement(Vt,{onSortEnd:function(e,n){if(e!==n&&(c.data&&c.data[e])){var r=m.ReorderHelper.reorder(c.data,e,n),i=r.reorderedItems,a=r.reorderRequest;u.reorderVideos(t,a),s((function(e){return{data:i,pagination:e.pagination}}))}},videos:c,getVideoAppLink:co,getVideoActions:oo(t),emptyMessage:"There are no videos in this playlist."}))}function uo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function lo(){var e=uo(p.useState(),2),t=e[0],n=e[1],r=Object(f.useService)(l.PLAYLIST);Object(f.useFetch)($.getCurrentUserFetchOptions(n),[]);return p.createElement(p.Fragment,null,!!t&&p.createElement(Hr,{savePlaylist:function(e,n){return r.createPlaylist(e,t.id,function(e){return function(t){e(),t&&t.id&&f.Core.AppLinkHelper.trigger({application:s.PLAYLISTS,action:i.Playlists.EDIT_PLAYLIST,args:[t.id]})}}(n),n)}}))}function po(e){return(po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bo(e,t){return!t||"object"!==po(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yo(e){return(yo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vo(e,t){return(vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var So=function(e){return"/api/master/v2/objects/".concat(e)},Eo=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},ho=function(e){function t(){return fo(this,t),bo(this,yo(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vo(e,t)}(t,e),n=t,(r=[{key:"getVideo",value:function(e,t,n){return this.get({resource:So(e),eventPrefix:"".concat(a.VIDEO,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getVideosById",value:function(e,t,n){return this.get({resource:Eo(e),eventPrefix:"".concat(a.VIDEO,":").concat(e.join(",")),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"name",get:function(){return l.VIDEO}},{key:"channelName",get:function(){return u.VIDEO}}])&&mo(n.prototype,r),i&&mo(n,i),t}(f.BaseDataService),go={dataServiceName:l.VIDEO,dataChannelName:u.VIDEO},Oo={getVideoFetchOptions:function(e,t,n){return Object.assign(Object.assign({},go),{eventPrefix:"".concat(a.VIDEO,":").concat(e),fetchData:function(t){return t.getVideo(e)},setData:t,onError:n})},getVideosByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},go),{eventPrefix:"".concat(a.VIDEO,":").concat(e.join(",")),fetchData:function(t){return t.getVideosById(e)},setData:t,onError:n})}};function jo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function To(e){var t=e.videoId,n=e.playlistId,r=e.closePopup,i=jo(p.useState(),2),a=i[0],o=i[1],c=jo(p.useState(),2),s=c[0],u=c[1],d=jo(p.useState(!1),2),b=d[0],y=d[1],v=Object(f.useService)(l.PLAYLIST);Object(f.useFetch)(Oo.getVideoFetchOptions(t,o),[t]),Object(f.useFetch)(Fr.getPlaylistFetchOptions(n,u),[n]);var S=p.useCallback((function(){y(!0),v.removeVideoFromPlaylist(n,t,r,r)}),[t,n]),E=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:S,buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:b}],h=s&&a;return p.createElement(m.Popup,{title:"Remove Video",closePopup:r,showLoadingSpinner:!h},!!h&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to remove ",p.createElement("strong",null,a.name)," from ",p.createElement("strong",null,s.name),"?")),p.createElement(m.PopupButtons,{buttons:E})))}function Co(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Io=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function Ao(e){var t=e.id,n=e.routeToOnDelete,r=e.closePopup,i=Co(p.useState(),2),a=i[0],o=i[1],c=Co(p.useState(!1),2),s=c[0],u=c[1],d=Object(f.useService)(l.SUBJECT);Object(f.useFetch)(ta.getAudienceFetchOptions(t,o),[t]);return p.createElement(m.Popup,{title:"Delete Audience",closePopup:r,showLoadingSpinner:!a},!!a&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to delete ",p.createElement("strong",null,a.name),"?")),p.createElement(m.PopupButtons,{buttons:Io((function(){u(!0);d.deleteAudience(t,(function(){r(),n&&f.Core.AppLinkHelper.trigger(n)}),r)}),r,s)})))}function Lo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Po=function(e){return{application:s.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function No(e){var t=e.presentationId,n=e.audienceId,r=Lo(p.useState(),2),i=r[0],a=r[1],o=Lo(p.useState(),2),c=o[0],s=o[1],u=Lo(p.useState(),2),m=u[0],d=u[1],b=Object(f.useService)(l.SUBJECT);Object(f.useFetch)(ta.getAudienceFetchOptions(n,a),[n]),Object(f.useFetch)(ta.getLevelsFetchOptions(s),[]),Object(f.useFetch)(ta.getPresentationFetchOptions(t,d),[t]);return p.createElement(p.Fragment,null,p.createElement("div",{className:"pb-3"},p.createElement(Ie,{appLink:Po(t),backToName:"audiences"})),!!m&&p.createElement("h6",null,"Presentation: ".concat(m.name)),!!i&&!!c&&p.createElement(sa,{audience:i,levels:c,saveAudience:function(e,r){return b.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),r,r)},presentationId:t}))}function ko(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var wo=function(e){return function(t){return{application:s.SUBJECTS,action:i.Subjects.EDIT_AUDIENCE,args:[e,t.masterId]}}},Do=function(e){return{application:s.SUBJECTS,action:i.Subjects.NEW_AUDIENCE,args:[e]}},Fo={application:s.SUBJECTS,action:i.Subjects.AUDIENCES};function _o(e){var t=e.presentationId,n=ko(p.useState(),2),r=n[0],i=n[1];return Object(f.useFetch)(ta.getAudiencesFetchOptions(t,i),[]),p.createElement(p.Fragment,null,p.createElement("div",{className:"pb-3"},p.createElement(Ie,{appLink:Fo,backToName:"presentations"})),p.createElement("div",{className:"d-flex justify-content-between mb-2"},p.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),p.createElement(m.AppLink,{appLink:Do(t),className:"d-block"},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.Plus,size:m.SvgContainerSize.Small}),p.createElement("span",null,"New Audience"))),p.createElement(ft,{objects:r,getAppLink:wo(e.presentationId),emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function Ro(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var xo=function(e){return{application:s.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function Uo(e){var t=e.presentationId,n=Ro(p.useState(),2),r=n[0],a=n[1],o=Ro(p.useState(),2),c=o[0],u=o[1],m=Object(f.useService)(l.SUBJECT);Object(f.useFetch)(ta.getLevelsFetchOptions(a),[]),Object(f.useFetch)(ta.getPresentationFetchOptions(t,u),[t]);return p.createElement(p.Fragment,null,p.createElement("div",{className:"pb-2"},p.createElement(Ie,{appLink:xo(t),backToName:"audiences"})),!!c&&p.createElement("h6",null,"Presentation: ".concat(c.name)),!!r&&p.createElement(sa,{levels:r,presentationId:t,saveAudience:function(e,n){return m.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.EDIT_AUDIENCE,args:[e,n.masterId]})}}(t,n),n)}}))}function Vo(e){return{application:s.SUBJECTS,action:i.Subjects.NEW_CLASSIFICATION,args:[e]}}function Bo(e){return[{label:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},Vo(e)),{args:[e],params:{parentId:t.id}})}},{label:"Delete classification",getAppLink:function(t){return{application:s.SUBJECTS,action:i.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var Jo=n(18),Mo=n.n(Jo);function Ho(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Yo(e){var t=e.presentationId,n=e.selectedClassificationId,r=Ho(p.useState(),2),a=r[0],o=r[1],c=Ho(p.useState(),2),u=c[0],l=c[1];return function(e,t,n){var r=ta.getClassificationTreeFetchOptions(e,t),i=ta.getPresentationFetchOptions(e,n);Object(f.useBulkFetch)([r,i],[e])}(t,o,l),p.createElement("div",{className:"".concat(Mo.a.navContainer," h-auto pr-2 border-right")},!!u&&p.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(u.name,")")),p.createElement(m.AppLink,{appLink:Vo(t),className:"d-inline-block pb-2"},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.Plus,size:m.SvgContainerSize.Small}),p.createElement("span",null,"New Classification")),!!a&&p.createElement("div",{className:"border-top pt-1"},p.createElement(gt,{tree:a,getAppLink:function(e){return function(e,t){return{application:s.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:Bo(t)})))}function qo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ko(e){var t=e.classificationId,n=e.routeToOnDelete,r=e.closePopup,i=qo(p.useState(),2),a=i[0],o=i[1],c=qo(p.useState(!1),2),s=c[0],u=c[1];Object(f.useFetch)(ta.getClassificationFetchOptions(t,o),[]);var d=Object(f.useService)(l.SUBJECT),b=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);d.deleteClassification(t,(function(){r(),n&&f.Core.AppLinkHelper.trigger(n)}),r)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:s}];return p.createElement(m.Popup,{title:"Delete Classification",closePopup:r,showLoadingSpinner:!a},!!a&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to delete ",p.createElement("strong",null,a.name),"?")),p.createElement(m.PopupButtons,{buttons:b})))}function zo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Wo(e){var t=e.presentationId,n=e.classificationId,r=zo(p.useState(),2),i=r[0],a=r[1],o=zo(p.useState(),2),c=o[0],s=o[1],u=zo(p.useState(),2),m=u[0],d=u[1],b=zo(p.useState(),2),y=b[0],v=b[1],S=Object(f.useService)(l.SUBJECT),E=ta.getClassificationFetchOptions(n,a),h=ta.getPresentationFetchOptions(t,s),g=ta.getClassificationTreeFetchOptions(t,d),O=ta.getSubjectTreeFetchOptions(v);Object(f.useFetch)(O,[]),Object(f.useFetch)(E,[n]),Object(f.useBulkFetch)([h,g],[t]);return p.createElement("div",null,p.createElement(Oa,{presentation:c,classificationId:n}),!!i&&!!m&&!!y&&p.createElement(ha,{classification:i,presentationId:t,subjectTree:y,classificationTree:m,saveClassification:function(e,t){return S.updateClassification(n,e,t,t)}}))}function Go(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Zo(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=Go(p.useState(),2),a=i[0],o=i[1],c=Go(p.useState(),2),s=c[0],u=c[1],m=Go(p.useState(),2),d=m[0],b=m[1];Object(f.useFetch)(ta.getPresentationFetchOptions(t,o),[]),Object(f.useFetch)(ta.getClassificationFetchOptions(n,u),[n]),Object(f.useFetch)(ta.getClassificationMembersFetchOptions(n,r,b),[n,r]);var y=Object(f.useService)(l.SUBJECT),v={items:d&&d.data,memberType:r,classification:s,updatePinnedVideo:function(e,t){var r=Object.assign(Object.assign({},s),{pinnedVideoMasterId:e});y.updateClassification(n,r,t)},getItemAppLink:function(e){return ri.getMemberAppLink(r,e.id)},getActions:function(e){return ri.getMemberActions(n,Yr.Classification,r,e.id)}},S={presentation:a,classificationId:n},E=Ue(v);return p.createElement(p.Fragment,null,p.createElement(Oa,Object.assign({},S,{memberType:r})),E&&p.createElement(ya,Object.assign({},v)))}function Qo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Xo(e){var t=e.presentationId,n=e.parentId,r=Qo(p.useState(),2),a=r[0],o=r[1],c=Qo(p.useState(),2),u=c[0],m=c[1],d=Object(f.useService)(l.SUBJECT),b=ta.getClassificationTreeFetchOptions(t,o),y=ta.getSubjectTreeFetchOptions(m);Object(f.useFetch)(y,[]),Object(f.useFetch)(b,[t]);return p.createElement("div",null,p.createElement("h4",{className:"py-2"},"Create New Classification"),!!u&&!!a&&p.createElement(ha,{classification:n?{parentIds:[n]}:{},presentationId:t,subjectTree:u,classificationTree:a,saveClassification:function(e,n){return d.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),n&&n.id&&f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]})}}(t,n),n)}}))}function $o(e){return($o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nc(e,t){return!t||"object"!==$o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rc(e){return(rc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ic(e,t){return(ic=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ac=function(e){return"/api/master/v2/objects/".concat(e,"?query=thumbnail,poster,banner,rating")},oc=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},cc=function(){return"/api/master/v2/series"},sc=function(e){return"/api/master/v2/objects/".concat(e)},uc=function(e){function t(){return ec(this,t),nc(this,rc(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ic(e,t)}(t,e),n=t,(r=[{key:"getSeries",value:function(e,t,n){return this.get({resource:ac(e),eventPrefix:"".concat(a.SERIES,":").concat(e),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getSeriesById",value:function(e,t,n){return this.get({resource:oc(e),eventPrefix:"".concat(a.SERIES_BY_ID,":").concat(e.join(",")),expiryTime:m.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createSeries",value:function(e,t,n){var r,i=this;this.chain().create({resource:cc(),data:e,callback:function(e){return r=e},errorCallback:n,eventPrefix:a.SERIES,expiryTime:m.CacheDurations.STANDARD,errorHandler:this.alertService.error("Failed to create series.")}).func((function(){r&&r.id&&i.update({resource:sc(r.id),data:{permissions:Re()},callback:t,eventPrefix:a.SERIES,successHandler:i.alertService.success("Successfully created series")})})).run()}},{key:"updateSeries",value:function(e,t,n,r){this.update({resource:sc(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_SERIES,":").concat(e),invalidationKeys:["".concat(a.SERIES,":").concat(e),a.SERIES_BY_ID],expiryTime:m.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated series"),errorHandler:this.alertService.error("Failed to update series")})}},{key:"name",get:function(){return l.SERIES}},{key:"channelName",get:function(){return u.SERIES}}])&&tc(n.prototype,r),i&&tc(n,i),t}(f.BaseDataService),lc={dataServiceName:l.SERIES,dataChannelName:u.SERIES},pc={getSeriesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},lc),{eventPrefix:"".concat(a.SERIES,":").concat(e),fetchData:function(t){return t.getSeries(e)},setData:t,onError:n})},getSeriesByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},lc),{eventPrefix:"".concat(a.SERIES_BY_ID,":").concat(e.join(",")),fetchData:function(t){return t.getSeriesById(e)},setData:t,onError:n})}};function fc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var mc=function(e,t,n,r){return[{variant:"link",onClick:e,buttonText:"Cancel"},{variant:"danger",onClick:t,buttonText:"Yes, remove this ".concat(ri.singularizeMemberType(n)),isSpinnerButton:!0,showSpinner:r}]};function dc(e){var t=e.classificationId,n=e.memberId,r=e.memberType,i=e.closePopup,a=fc(p.useState(),2),o=a[0],c=a[1],s=fc(p.useState(),2),u=s[0],d=s[1],b=fc(p.useState(!1),2),y=b[0],v=b[1],S=Object(f.useService)(l.SUBJECT);Object(f.useFetch)(function(e,t,n){switch(e){case qr.Playlists:return Fr.getPlaylistFetchOptions(t,n);case qr.Series:return pc.getSeriesFetchOptions(t,n);case qr.Videos:return Oo.getVideoFetchOptions(t,n)}}(r,n,d),[n]),Object(f.useFetch)(ta.getClassificationFetchOptions(t,c),[t]);var E=!!o&&!!u,h="Remove ".concat(Be(ri.singularizeMemberType(r)));return p.createElement(m.Popup,{title:h,closePopup:i,showLoadingSpinner:!E},E&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to remove ",p.createElement("strong",null,u.name)," from ",p.createElement("strong",null,o.name),"?"),p.createElement("p",null,"This will not remove it from the backbone subject.")),p.createElement(m.PopupButtons,{buttons:mc(i,(function(){v(!0),S.removeObjectsFromClassification(t,[n],r,null,null,i,i),o.pinnedVideoMasterId===n&&S.updateClassification(t,Object.assign(Object.assign({},o),{pinnedVideoMasterId:null}))}),r,y)})))}function bc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function yc(e){var t=e.id,n=bc(p.useState(),2),r=n[0],i=n[1],a=Object(f.useService)(l.SUBJECT);Object(f.useFetch)(ta.getLevelFetchOptions(t,i),[t]);return p.createElement(p.Fragment,null,p.createElement("h4",{className:"py-2"},"Edit Level"),!!r&&p.createElement(Ia,{level:r,saveLevel:function(e,n){return a.updateLevel(t,e,n,n)}}))}function vc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Sc=function(e){return{application:s.SUBJECTS,action:i.Subjects.EDIT_LEVEL,args:[e.id]}},Ec={application:s.SUBJECTS,action:i.Subjects.NEW_LEVEL};function hc(){var e=vc(p.useState(),2),t=e[0],n=e[1];return Object(f.useFetch)(ta.getLevelsFetchOptions(n),[]),p.createElement("div",null,p.createElement("div",{className:"d-flex justify-content-between mb-2"},p.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),p.createElement(m.AppLink,{appLink:Ec,className:"d-block"},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.Plus,size:m.SvgContainerSize.Small}),p.createElement("span",null,"New Level"))),p.createElement(ft,{objects:t,getAppLink:Sc}))}function gc(){var e=Object(f.useService)(l.SUBJECT);return p.createElement(p.Fragment,null,p.createElement("h4",{className:"py-2"},"Create New Level"),p.createElement(Ia,{saveLevel:function(t,n){return e.createLevel(t,function(e){return function(t){e(),t&&t.id&&f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.EDIT_LEVEL,args:[t.id]})}}(n),n)}}))}function Oc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function jc(e){var t=e.id,n=Oc(p.useState(),2),r=n[0],i=n[1],a=Object(f.useService)(l.SUBJECT);Object(f.useFetch)(ta.getPresentationFetchOptions(t,i),[t]);var o={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return a.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},c=Ue(o);return p.createElement(p.Fragment,null,p.createElement("h4",{className:"py-2"},"Edit Presentation"),!!c&&p.createElement(Na,Object.assign({},o)))}function Tc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Cc=function(e){return{application:s.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e.id]}},Ic={application:s.SUBJECTS,action:i.Subjects.NEW_PRESENTATION};function Ac(){var e=Tc(p.useState(),2),t=e[0],n=e[1];return Object(f.useFetch)(ta.getPresentationsFetchOptions(n),[]),p.createElement("div",null,p.createElement("div",{className:"d-flex justify-content-between mb-2"},p.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),p.createElement(m.AppLink,{appLink:Ic,className:"d-block"},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.Plus,size:m.SvgContainerSize.Small}),p.createElement("span",null,"New Presentation"))),p.createElement(ft,{objects:t,getAppLink:Cc}))}function Lc(){var e=Object(f.useService)(l.SUBJECT);return p.createElement(p.Fragment,null,p.createElement("h4",{className:"py-2"},"Create New Presentation"),p.createElement(Na,{savePresentation:function(t,n){var r=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,r)}),(function(){return r(!1)}))}}))}function Pc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Nc(e){var t=e.objectType,n=e.getAppLink,r=Pc(p.useState(),2),i=r[0],a=r[1];return Object(f.useFetch)(ta.getPresentationsFetchOptions(a),[]),p.createElement("div",null,p.createElement("h5",null,p.createElement(m.Text,{namespace:"subjects.selectPresentation",phrase:"heading",options:{objectType:t}})),p.createElement(ft,{objects:i,getAppLink:n}))}function kc(e,t){return m.StateHelper.getSetStateByKey(e,t)}function wc(e,t){var n=e.memberType,r=e.objectIds,i=ta.getSubjectTreeFetchOptions(kc(t,"subjectTree"));Object(f.useFetch)(i,[]);var a=function(e,t,n){switch(e){case qr.Playlists:return Fr.getPlaylistsByIdFetchOptions(t,n);case qr.Series:return pc.getSeriesByIdFetchOptions(t,n);case qr.Videos:return Oo.getVideosByIdFetchOptions(t,n)}}(n,r,kc(t,"objects"));Object(f.useFetch)(a,[n,r])}function Dc(e,t,n,r){var a=n.selectedSubject,o=n.objects,c=function(){return kc(r,"showConfirmationPopup")(!1)};e.addObjectsToSubject(a.id,o.map((function(e){return e.id})),t.memberType,n.addToClassifications,(function(){c(),f.Core.AppLinkHelper.trigger(function(e,t){var n={application:s.SUBJECTS,args:[e]};switch(t){case qr.Playlists:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_PLAYLISTS});case qr.Series:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_SERIES});case qr.Videos:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_VIDEOS})}}(a.id,t.memberType))}),c)}function Fc(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(ri.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function _c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Rc=function(e,t){return function(n,r,i){i(),kc(t,"selectedSubject")(Me.find(e.subjectTree,f.ArrayHelper.first(n))),kc(t,"addToClassifications")(r),kc(t,"showConfirmationPopup")(!0)}};function xc(e){var t=_c(p.useState({}),2),n=t[0],r=t[1],i=Object(f.useService)(l.SUBJECT);wc(e,r);var a;return p.createElement(p.Fragment,null,!!n.objects&&!!n.subjectTree&&p.createElement(wa,{memberType:e.memberType,objects:n.objects,subjectTree:n.subjectTree,onClickAddToSubject:Rc(n,r)}),n.showConfirmationPopup&&p.createElement(m.ConfirmationPopup,{title:Fc(e.memberType,n.objects,n.selectedSubject),onClickConfirm:function(){return Dc(i,e,n,r)},closePopup:function(){return e=!1,kc(r,"showConfirmationPopup")(e);var e}},p.createElement("p",null,"The following ".concat(e.memberType," will be added to "),p.createElement("strong",null,n.selectedSubject.name),n.addToClassifications?" and its mapped classifications:":":"),p.createElement("ul",null,n.objects.map((function(e){return p.createElement("li",{key:e.id},e.name)}))),!n.addToClassifications&&p.createElement("p",null,"".concat(1===n.objects.length?"It":"They"," will not be added to its mapped classifications.")),p.createElement("p",null,"".concat((a=e.memberType,Be(ri.singularizeMemberType(a)))," to classification mappings can be managed from the "),p.createElement("strong",null,"Edit Subject ".concat(Be(e.memberType)," ")),"page.")))}function Uc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Vc(e){var t=e.subjectId,n=e.routeToOnDelete,r=e.closePopup,i=Uc(p.useState(),2),a=i[0],o=i[1],c=Uc(p.useState(!1),2),s=c[0],u=c[1];Object(f.useFetch)(ta.getSubjectFetchOptions(t,o),[]);var d=Object(f.useService)(l.SUBJECT),b=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);d.deleteSubject(t,(function(){r(),n&&f.Core.AppLinkHelper.trigger(n)}),r)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:s}];return p.createElement(m.Popup,{title:"Delete Subject",closePopup:r,showLoadingSpinner:!a},!!a&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to delete ",p.createElement("strong",null,a.name),"?"),p.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),p.createElement(m.PopupButtons,{buttons:b})))}function Bc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Jc(e){var t=e.subjectId,n=Bc(p.useState(),2),r=n[0],a=n[1],o=Bc(p.useState(),2),c=o[0],s=o[1],u=Object(f.useService)(l.SUBJECT),m=ta.getSubjectFetchOptions(t,a),d=ta.getSubjectTreeFetchOptions(s);Object(f.useFetch)(d,[]),Object(f.useFetch)(m,[t]);return p.createElement(p.Fragment,null,p.createElement(Va,{subjectId:t,activeAction:i.Subjects.EDIT_SUBJECT}),!!r&&!!c&&p.createElement(xa,{subject:r,subjectTree:c,saveSubject:function(e,n){return u.updateSubject(t,e,n,n)}}))}function Mc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Hc=p.createContext(void 0);function Yc(e){var t=e.children,n=Mc(p.useState(),2),r=n[0],i=n[1];return p.createElement(Hc.Provider,{value:[r,i]},t)}var qc=function(e){var t=e.children;return p.createElement(Ze,null,p.createElement(Yc,null,p.createElement(Ke,null,t)))};function Kc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function zc(e,t){return m.StateHelper.getSetStateByKey(e,t)}function Wc(e,t,n){var r=e.subjectId,i=e.memberType,a=t.memberIds,o=Kc(p.useContext(Hc),1)[0];Object(f.useFetch)(ta.getPresentationsFetchOptions(zc(n,"presentations")),[]),Object(f.useFetch)(ta.getSubjectMemberIdsFetchOptions(r,i,zc(n,"memberIds")),[r,i]),Object(f.useFetch)(function(e,t,n){if(!t||!t.length)return;switch(e){case qr.Playlists:return Fr.getPlaylistsByIdFetchOptions(t,n);case qr.Series:return pc.getSeriesByIdFetchOptions(t,n);case qr.Videos:return Oo.getVideosByIdFetchOptions(t,n)}}(i,a,zc(n,"members")),[i,a],!!a&&!!a.length),Object(f.useFetch)(!!o&&ta.getSubjectClassificationFetchOptions(r,zc(n,"classifications"),o.id,i),[r,i,o],!!o)}var Gc=function(e,t){return function(n){var r,a=s.SUBJECTS,o=[t,n];switch(e){case qr.Playlists:r=i.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case qr.Series:r=i.Subjects.EDIT_CLASSIFICATION_SERIES;break;case qr.Videos:r=i.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:a,action:r,args:o}}};function Zc(e){switch(e){case qr.Playlists:return i.Subjects.EDIT_SUBJECT_PLAYLISTS;case qr.Series:return i.Subjects.EDIT_SUBJECT_SERIES;case qr.Videos:return i.Subjects.EDIT_SUBJECT_VIDEOS}}function Qc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Xc(e){var t=e.subjectId,n=e.memberType,r=Qc(p.useState({}),2),i=r[0],a=r[1],o=i.presentations,c=i.classifications,s=i.memberIds,u=i.membersWithClassifications,m=Qc(p.useContext(Hc),2),d=m[0],b=m[1],y=Object(f.useService)(l.SUBJECT);Wc(e,i,a),function(e,t,n){var r=t.memberIds,i=t.members,a=t.classifications;p.useEffect((function(){zc(n,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(e.memberType,i,a))}),[i,a]),p.useEffect((function(){i&&i.length&&r&&!r.length&&zc(n,"members")([])}),[r])}(e,i,a);var v={presentations:o,currentPresentation:d,setCurrentPresentation:b},S={members:u||[],memberType:n,getMemberAppLink:function(e){return ri.getMemberAppLink(n,e)},getActions:function(e){return ri.getMemberActions(t,Yr.Subject,n,e)},classifications:c,getClassificationAppLink:d&&Gc(n,d.id),onToggleClassification:function(e,r,i){return function(e,t,n,r,i,a,o){(o?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(a,n,t,r,i)}(y,n,i?[i]:s,t,d&&d.id,e,r)}},E=!!d&&!!c;return p.createElement(p.Fragment,null,p.createElement(Va,{subjectId:t,activeAction:Zc(n)}),p.createElement(Ae.Alert,{variant:"info",className:"m-0"},"Select which ".concat(n," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),p.createElement("div",{className:"w-50 py-2"},!!o&&p.createElement(ka,Object.assign({},v))),E&&p.createElement(Qa,Object.assign({},S)))}function $c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function es(e){var t=e.parentId,n=$c(p.useState(),2),r=n[0],a=n[1],o=Object(f.useService)(l.SUBJECT),c=ta.getSubjectTreeFetchOptions(a);Object(f.useFetch)(c,[]);var u={application:s.SUBJECTS,action:i.Subjects.PRESENTATIONS};return p.createElement(p.Fragment,null,p.createElement("div",{className:"pb-2 border-bottom"},p.createElement(Ie,{backToName:"Presentations",appLink:u})),p.createElement("h4",{className:"py-2"},"Create New Subject"),!!r&&p.createElement(xa,{subject:{parentId:t},subjectTree:r,saveSubject:function(e,t){return o.createSubject(e,function(e){return function(t){e(),t&&t.id&&f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[t.id]})}}(t),t)}}))}function ts(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ns=function(e,t,n,r){return[{variant:"link",onClick:e,buttonText:"Cancel"},{variant:"danger",onClick:t,buttonText:"Yes, remove this ".concat(ri.singularizeMemberType(n)),isSpinnerButton:!0,showSpinner:r}]};function rs(e){var t=e.subjectId,n=e.memberId,r=e.memberType,i=e.closePopup,a=ts(p.useState(),2),o=a[0],c=a[1],s=ts(p.useState(),2),u=s[0],d=s[1],b=ts(p.useState(!1),2),y=b[0],v=b[1],S=Object(f.useService)(l.SUBJECT);Object(f.useFetch)(function(e,t,n){switch(e){case qr.Playlists:return Fr.getPlaylistFetchOptions(t,n);case qr.Series:return pc.getSeriesFetchOptions(t,n);case qr.Videos:return Oo.getVideoFetchOptions(t,n)}}(r,n,d),[n]),Object(f.useFetch)(ta.getSubjectFetchOptions(t,c),[t]);var E=!!o&&!!u,h="Remove ".concat(Be(ri.singularizeMemberType(r)));return p.createElement(m.Popup,{title:h,closePopup:i,showLoadingSpinner:!E},E&&p.createElement(p.Fragment,null,p.createElement("div",null,p.createElement("p",null,"Are you sure you want to remove ",p.createElement("strong",null,u.name)," from ",p.createElement("strong",null,o.name),"?"),p.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),p.createElement(m.PopupButtons,{buttons:ns(i,(function(){v(!0),S.removeObjectsFromSubject(t,[n],r,i,i)}),r,y)})))}function is(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function as(e){var t=e.subjectId,n=is(p.useState({}),2),r=n[0];return function(e,t){var n=function(e){return m.StateHelper.getSetStateByKey(t,e)};Object(f.useFetch)(ta.getSubjectClassificationFetchOptions(e,n("classifications")),[e]),Object(f.useFetch)(ta.getPresentationsFetchOptions(n("presentations")),[])}(t,n[1]),p.createElement(p.Fragment,null,p.createElement(Va,{subjectId:t,activeAction:i.Subjects.SUBJECT_CLASSIFICATIONS}),p.createElement(Ya,{presentations:r.presentations,classificationDictionary:f.ArrayHelper.groupBy(r.classifications,"presentationId")}))}var os=n(19),cs=n.n(os);function ss(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function us(e){var t=e.selectedSubjectId,n=ss(p.useState(),2),r=n[0],a=n[1];Object(f.useFetch)(ta.getSubjectTreeFetchOptions(a),[]);var o=p.useCallback((function(e){return{application:s.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),c={application:s.SUBJECTS,action:i.Subjects.NEW_SUBJECT},u=[{label:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},c),{params:{parentId:e.id}})}},{label:"Delete subject",getAppLink:function(e){return{application:s.SUBJECTS,action:i.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return p.createElement("div",{className:"".concat(cs.a.navContainer," h-auto pr-2 border-right")},p.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),p.createElement(m.AppLink,{appLink:c,className:"d-inline-block pb-2"},p.createElement(m.SvgContainer,{svgName:m.cvSvgLibrary.Plus,size:m.SvgContainerSize.Small}),p.createElement("span",null,"New Subject")),!!r&&p.createElement("div",{className:"border-top pt-1"},p.createElement(gt,{tree:r,getAppLink:o,selectedIds:[t],actions:u})))}function ls(e){var t=e.currentAppLink;return p.createElement(Xa,{navItems:ii(),currentAppLink:t})}function ps(e){return(ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ds(e,t,n){return t&&ms(e.prototype,t),n&&ms(e,n),e}function bs(e,t){return!t||"object"!==ps(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ys(e){return(ys=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ss(e,t)}function Ss(e,t){return(Ss=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Es=function(e){function t(){return fs(this,t),bs(this,ys(t).apply(this,arguments))}return vs(t,e),ds(t,[{key:"channelName",get:function(){return s.PLAYLISTS}},{key:"appRoutes",get:function(){return{"manage/playlists(/)":"index","manage/playlists/new(/)":"newPlaylist","manage/playlists/:id(/)":"editPlaylist","manage/playlists/:id/videos(/)":"editPlaylistVideos","manage/playlists/:id/subjects(/)":"editPlaylistSubjects","manage/playlists/:id/audiences(/)":"editPlaylistAudiences"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","removeFromSubject"]}}]),t}(f.Core.AppRouter),hs=function(e){function t(){return fs(this,t),bs(this,ys(t).apply(this,arguments))}return vs(t,e),ds(t,[{key:"initialize",value:function(){var e=this;f.ObjectHelper.values(l).forEach((function(t){return f.InstanceManager.getInstance(t,e)}))}},{key:"index",value:function(){this.navigate("/dashboards/playlists")}},{key:"newPlaylist",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(lo,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Qr,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(so,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(io,{key:e,playlistId:e}))}},{key:"editPlaylistAudiences",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(to,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(Vr,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(To,Object.assign({},n)))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:qr.Playlists},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(rs,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(Rr,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return en.Radio.channel(f.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(m.LayoutRegions.ALERT,p.createElement(m.AlertList,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"navigate",value:function(e){f.Core.LocationUtils.PageLoad(e)}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return s.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:xr}}}}],[{key:"router",get:function(){return Es}}]),t}(f.Core.Application),gs=function(e){var t=e.children;return p.createElement(Ze,null,p.createElement(Ke,null,t))},Os=function(){return"/api/domain/v2/me/ratings"},js="ratings",Ts=function(){return{url:Os(),key:js}},Cs=Ee.object().shape({name:Ee.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:Ee.string().trim().max(350,"Description is too long").default(""),rating:Ee.object().shape({id:Ee.string()}).default({}).noUnknown(),poster:Ee.object().shape({fileId:Ee.string(),fileIdType:Ee.mixed(),url:Ee.string()}).default({}).noUnknown(),banner:Ee.object().shape({fileId:Ee.string(),fileIdType:Ee.mixed(),url:Ee.string()}).default({}).noUnknown()}).noUnknown(),Is=function(e,t){var n=s.SERIES,r=i.Series,a=[{label:"Edit Series Details",appLink:{application:n,action:r.EDIT_SERIES,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_SERIES_VIDEOS,args:[t]}}];return xe(e)&&a.push.apply(a,[{label:"Subjects",appLink:{application:n,action:r.EDIT_SERIES_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_SERIES_AUDIENCES,args:[t]}}]),a};function As(e){var t=Object(ge.useFormikContext)(),n=Object(m.useCanSubmitForm)(t);return p.createElement(ge.Form,null,p.createElement(m.FormField,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this series",autoFocus:!0}),p.createElement(m.FormField,{label:"Description",as:"textarea",name:"description",id:"description",maxLength:350,value:t.values.description,placeholder:"Describe this series here",showCharacterCounter:!0}),p.createElement(mt,{ratings:e.ratings}),p.createElement(tt,{imageType:m.ImageType.TallPosters,currentImage:t.values.poster,setNewImage:function(e){return t.setFieldValue("poster",e)},application:s.SERIES,uploadAction:i.Series.UPLOAD_IMAGE}),p.createElement(tt,{imageType:m.ImageType.Banners,currentImage:t.values.banner,setNewImage:function(e){return t.setFieldValue("banner",e)},application:s.SERIES,uploadAction:i.Playlists.UPLOAD_IMAGE}),p.createElement("div",{className:"d-flex justify-content-between align-items-center"},p.createElement(m.SpinnerButton,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&p.createElement(m.Actions,{actions:e.actions})))}function Ls(e){return p.createElement(m.FormWrapper,{initialValues:e.series,validationSchema:Cs,onSubmit:e.saveSeries},p.createElement(As,{id:e.series&&e.series.id,ratings:e.ratings}))}var Ps=function(e){return function(t){return t.appLink.action===e}};function Ns(e){var t=e.seriesId,n=e.activeAction,r=p.useContext(Ge);return p.createElement("div",{className:"py-2"},!!r&&p.createElement(dt,{tabs:Is(r,t),isItemActive:Ps(n)}))}function ks(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ws(e){var t=e.seriesId,n=ks(p.useState(),2),r=n[0],a=n[1],o=f.Flight.useBasicFetch(Ts()),c=Object(f.useService)(l.SERIES);Object(f.useFetch)(pc.getSeriesFetchOptions(t,a),[t]);return p.createElement(p.Fragment,null,p.createElement(Ns,{seriesId:t,activeAction:i.Series.EDIT_SERIES}),!!r&&!!o.data&&p.createElement(Ls,{series:r,saveSeries:function(e,n){return c.updateSeries(t,e,n,n)},ratings:o.data}))}function Ds(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Fs(e){var t=e.seriesId,n=Ds(p.useState({}),2),r=n[0],a=n[1],o=Object(f.useService)(l.SUBJECT);!function(e,t,n){var r=function(e){return m.StateHelper.getSetStateByKey(n,e)};Object(f.useBulkFetch)([pc.getSeriesFetchOptions(e,r("series")),ta.getObjectLevelsFetchOptions(e,qr.Series,r("seriesLevels"))],[e]),Object(f.useFetch)(ta.getObjectAudiencesFetchOptions(e,qr.Series,r("seriesAudiences")),[e,t.seriesLevels]),Object(f.useBulkFetch)([ta.getPresentationsFetchOptions(r("presentations")),ta.getLevelsFetchOptions(r("levels"))],[]),Object(f.useFetch)(!!t.currentPresentation&&ta.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(t,r,a),$a(r,a);var c=!!(r.presentations&&r.levels&&r.presentationAudiences&&r.seriesLevels&&r.seriesAudiences);return p.createElement(p.Fragment,null,p.createElement(Ns,{seriesId:t,activeAction:i.Series.EDIT_SERIES_AUDIENCES}),p.createElement(ut,{object:r.series}),!!c&&p.createElement(la,{objectLevels:r.seriesLevels,objectAudiences:r.seriesAudiences,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:m.StateHelper.getSetStateByKey(a,"currentPresentation"),levels:r.levels,presentationAudiences:r.presentationAudiences,memberType:qr.Series,saveLevels:function(e,n,r){return o.updateObjectLevels(t,e,qr.Series,n,r,r)},saveAudiences:function(e,n){return o.updateObjectAudiences(t,r.currentPresentation.id,e,qr.Series,n,n)}}))}function _s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Rs(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function xs(e){var t=e.seriesId,n=_s(p.useState({}),2),r=n[0],a=n[1],o=Object(f.useService)(l.SUBJECT);!function(e,t,n){var r=function(e){return m.StateHelper.getSetStateByKey(n,e)};Object(f.useBulkFetch)([ta.getSubjectTreeFetchOptions(r("subjectTree")),ta.getPresentationsFetchOptions(r("presentations"))],[]),Object(f.useBulkFetch)([pc.getSeriesFetchOptions(e,r("series")),ta.getObjectSubjectsFetchOptions(e,qr.Series,r("seriesSubjects"))],[e]),Object(f.useFetch)(!!t.currentPresentation&&ta.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),p.useEffect((function(){return r("subjectClassifications")([])}),[t.seriesSubjects]);var i=function(e,t){return[].concat(Rs(t.subjectClassifications||[]),Rs(e))},a=t.seriesSubjects&&t.seriesSubjects.map((function(e){return ta.getSubjectClassificationFetchOptions(e.id,m.StateHelper.getSetStateByKey(n,"subjectClassifications",i))}));Object(f.useBulkFetch)(a,[t.seriesSubjects],!!a),Object(f.useFetch)(ta.getObjectClassificationsFetchOptions(e,qr.Series,r("seriesClassifications")),[e,t.seriesSubjects])}(t,r,a),$a(r,a);var c=!!(r.seriesSubjects&&r.subjectTree&&r.presentations&&r.classificationTree&&r.seriesClassifications&&r.subjectClassifications);return p.createElement(p.Fragment,null,p.createElement(Ns,{seriesId:t,activeAction:i.Series.EDIT_SERIES_SUBJECTS}),p.createElement(ut,{object:r.series}),c&&p.createElement(Fa,{objectSubjects:r.seriesSubjects,subjectTree:r.subjectTree,memberType:qr.Series,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:m.StateHelper.getSetStateByKey(a,"currentPresentation"),objectClassifications:r.seriesClassifications,objectSubjectClassifications:r.subjectClassifications,classificationTree:r.classificationTree,saveSubjects:function(e,n,r){return o.updateObjectSubjects(t,e,qr.Series,n,r,r)},saveClassifications:function(e,n){return o.updateObjectClassifications(t,r.currentPresentation.id,e,qr.Series,n,n)}}))}function Us(){var e=f.Flight.useBasicFetch(Ts()),t=Object(f.useService)(l.SERIES);return p.createElement(p.Fragment,null,!!e.data&&p.createElement(Ls,{saveSeries:function(e,n){return t.createSeries(e,function(e){return function(t){e(),t&&t.id&&f.Core.AppLinkHelper.trigger({application:s.SERIES,action:i.Series.EDIT_SERIES,args:[t.id]})}}(n),n)},ratings:e.data}))}function Vs(e){return(Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Js(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ms(e,t,n){return t&&Js(e.prototype,t),n&&Js(e,n),e}function Hs(e,t){return!t||"object"!==Vs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ys(e){return(Ys=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ks(e,t)}function Ks(e,t){return(Ks=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zs=function(e){function t(){return Bs(this,t),Hs(this,Ys(t).apply(this,arguments))}return qs(t,e),Ms(t,[{key:"channelName",get:function(){return s.SERIES}},{key:"appRoutes",get:function(){return{"manage/series/new(/)":"newSeries","manage/series/:id(/)":"editSeries","manage/series/:id/videos(/)":"editSeriesVideos","manage/series/:id/subjects(/)":"editSeriesSubjects","manage/series/:id/audiences(/)":"editSeriesAudiences"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),t}(f.Core.AppRouter),Ws=function(e){function t(){return Bs(this,t),Hs(this,Ys(t).apply(this,arguments))}return qs(t,e),Ms(t,[{key:"initialize",value:function(){var e=this;f.ObjectHelper.values(l).forEach((function(t){return f.InstanceManager.getInstance(t,e)}))}},{key:"newSeries",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Us,null))}},{key:"editSeries",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(ws,{seriesId:e}))}},{key:"editSeriesVideos",value:function(e){f.Core.LocationUtils.Redirect("/manage/legacy/series/".concat(e),!0)}},{key:"editSeriesSubjects",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(xs,{seriesId:e}))}},{key:"editSeriesAudiences",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Fs,{seriesId:e}))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(Rr,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return en.Radio.channel(f.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(m.LayoutRegions.ALERT,p.createElement(m.AlertList,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Series Application"}},{key:"channelName",get:function(){return s.SERIES}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:gs}}}}],[{key:"router",get:function(){return zs}}]),t}(f.Core.Application);function Gs(e){return(Gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xs(e,t,n){return t&&Qs(e.prototype,t),n&&Qs(e,n),e}function $s(e,t){return!t||"object"!==Gs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function eu(e){return(eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nu(e,t)}function nu(e,t){return(nu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ru=function(e){function t(){return Zs(this,t),$s(this,eu(t).apply(this,arguments))}return tu(t,e),Xs(t,[{key:"channelName",get:function(){return s.SUBJECTS}},{key:"appRoutes",get:function(){return{"manage/subjects(/)":"subjects","manage/subjects/add-objects(/)":"addSubjectMembers","manage/subjects/new(/)":"newSubject","manage/subjects/:id/edit(/)":"editSubject","manage/subjects/:id/edit/playlists(/)":"editSubjectPlaylists","manage/subjects/:id/edit/series(/)":"editSubjectSeries","manage/subjects/:id/edit/videos(/)":"editSubjectVideos","manage/subjects/:id/classifications(/)":"subjectClassifications","manage/subjects/classifications(/)":"classifications","manage/subjects/presentations/:id/classifications(/)":"presentationClassifications","manage/subjects/presentations/:id/classifications/new(/)":"newClassification","manage/subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","manage/subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","manage/subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","manage/subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","manage/subjects/levels(/)":"levels","manage/subjects/levels/new(/)":"newLevel","manage/subjects/levels/:id(/)":"editLevel","manage/subjects/audiences(/)":"audiences","manage/subjects/presentations/:id/audiences(/)":"presentationAudiences","manage/subjects/presentations/:id/audiences/new(/)":"newAudience","manage/subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","manage/subjects/presentations(/)":"presentations","manage/subjects/presentations/new":"newPresentation","manage/subjects/presentations/:id(/)":"editPresentation"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),t}(f.Core.AppRouter),iu=function(e){function t(){return Zs(this,t),$s(this,eu(t).apply(this,arguments))}return tu(t,e),Xs(t,[{key:"initialize",value:function(){var e=this;this.subjectDataService=f.InstanceManager.getInstance(l.SUBJECT,this),f.ObjectHelper.values(l).forEach((function(t){return f.InstanceManager.getInstance(t,e)}))}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(es,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Jc,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:qr.Playlists};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Xc,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:qr.Series};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Xc,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:qr.Videos};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Xc,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"subjectClassifications",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(as,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(xc,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(rs,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e.toString()===this.currentLeftNavId.toString()?{application:s.SUBJECTS,action:i.Subjects.NEW_SUBJECT}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(Vc,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:s.SUBJECTS,action:i.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e.id]}}};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Nc,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):f.Core.AppLinkHelper.trigger({application:s.SUBJECTS,action:i.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Xo,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Wo,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:qr.Playlists};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Zo,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:qr.Series};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Zo,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:qr.Videos};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Zo,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(dc,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:s.SUBJECTS,action:i.Subjects.NEW_CLASSIFICATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(Ko,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(hc,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(gc,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(yc,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:s.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e.id]}}};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Nc,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(_o,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Uo,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(No,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:s.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(Ao,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Ac,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(Lc,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(jc,{key:e,id:e})),this.hideLeftNav()}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(m.LayoutRegions.POPUP,p.createElement(Rr,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return en.Radio.channel(f.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(m.LayoutRegions.ALERT,p.createElement(m.AlertList,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(m.LayoutRegions.LEFT_NAV,p.createElement(Yo,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(m.LayoutRegions.LEFT_NAV,p.createElement(us,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return p.createElement(ls,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return s.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:qc,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return ru}}]),t}(f.Core.Application),au=function(e){var t=e.children;return p.createElement(Ze,null,p.createElement(Ke,null,t))},ou=function(e){var t=s.VIDEOS,n=i.Videos;return[{label:"Edit Video Details",appLink:{application:t,action:n.EDIT_VIDEO,args:[e]}},{label:"Subjects",appLink:{application:t,action:n.EDIT_VIDEO_SUBJECTS,args:[e]}},{label:"Audiences",appLink:{application:t,action:n.EDIT_VIDEO_AUDIENCES,args:[e]}}]},cu=function(e){return function(t){return t.appLink.action===e}};function su(e){var t=e.videoId,n=e.activeAction;return p.createElement("div",{className:"py-2"},p.createElement(dt,{tabs:ou(t),isItemActive:cu(n)}))}function uu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function lu(e){var t=e.videoId,n=uu(p.useState({}),2),r=n[0],a=n[1],o=Object(f.useService)(l.SUBJECT);!function(e,t,n){var r=function(e){return m.StateHelper.getSetStateByKey(n,e)};Object(f.useBulkFetch)([Oo.getVideoFetchOptions(e,r("video")),ta.getObjectLevelsFetchOptions(e,qr.Videos,r("videoLevels"))],[e]),Object(f.useFetch)(ta.getObjectAudiencesFetchOptions(e,qr.Videos,r("videoAudiences")),[e,t.videoLevels]),Object(f.useBulkFetch)([ta.getPresentationsFetchOptions(r("presentations")),ta.getLevelsFetchOptions(r("levels"))],[]),Object(f.useFetch)(!!t.currentPresentation&&ta.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(t,r,a),$a(r,a);var c=!!(r.presentations&&r.levels&&r.presentationAudiences&&r.videoLevels&&r.videoAudiences);return p.createElement(p.Fragment,null,p.createElement(su,{videoId:t,activeAction:i.Videos.EDIT_VIDEO_AUDIENCES}),p.createElement(ut,{object:r.video}),!!c&&p.createElement(la,{objectLevels:r.videoLevels,objectAudiences:r.videoAudiences,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:m.StateHelper.getSetStateByKey(a,"currentPresentation"),levels:r.levels,presentationAudiences:r.presentationAudiences,memberType:qr.Videos,saveLevels:function(e,n,r){return o.updateObjectLevels(t,e,qr.Videos,n,r,r)},saveAudiences:function(e,n){return o.updateObjectAudiences(t,r.currentPresentation.id,e,qr.Videos,n,n)}}))}function pu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function fu(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function mu(e){var t=e.videoId,n=pu(p.useState({}),2),r=n[0],a=n[1],o=Object(f.useService)(l.SUBJECT);!function(e,t,n){var r=function(e){return m.StateHelper.getSetStateByKey(n,e)};Object(f.useBulkFetch)([ta.getSubjectTreeFetchOptions(r("subjectTree")),ta.getPresentationsFetchOptions(r("presentations"))],[]),Object(f.useBulkFetch)([Oo.getVideoFetchOptions(e,r("video")),ta.getObjectSubjectsFetchOptions(e,qr.Videos,r("videoSubjects"))],[e]),Object(f.useFetch)(!!t.currentPresentation&&ta.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),p.useEffect((function(){return r("subjectClassifications")([])}),[t.videoSubjects]);var i=function(e,t){return[].concat(fu(t.subjectClassifications||[]),fu(e))},a=t.videoSubjects&&t.videoSubjects.map((function(e){return ta.getSubjectClassificationFetchOptions(e.id,m.StateHelper.getSetStateByKey(n,"subjectClassifications",i))}));Object(f.useBulkFetch)(a,[t.videoSubjects],!!a),Object(f.useFetch)(ta.getObjectClassificationsFetchOptions(e,qr.Videos,r("videoClassifications")),[e,t.videoSubjects])}(t,r,a),$a(r,a);var c=!!(r.videoSubjects&&r.subjectTree&&r.presentations&&r.classificationTree&&r.videoClassifications&&r.subjectClassifications);return p.createElement(p.Fragment,null,p.createElement(su,{videoId:t,activeAction:i.Videos.EDIT_VIDEO_SUBJECTS}),p.createElement(ut,{object:r.video}),c&&p.createElement(Fa,{objectSubjects:r.videoSubjects,subjectTree:r.subjectTree,memberType:qr.Videos,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:m.StateHelper.getSetStateByKey(a,"currentPresentation"),objectClassifications:r.videoClassifications,objectSubjectClassifications:r.subjectClassifications,classificationTree:r.classificationTree,saveSubjects:function(e,n,r){return o.updateObjectSubjects(t,e,qr.Videos,n,r,r)},saveClassifications:function(e,n){return o.updateObjectClassifications(t,r.currentPresentation.id,e,qr.Videos,n,n)}}))}function du(e){return(du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vu(e,t,n){return t&&yu(e.prototype,t),n&&yu(e,n),e}function Su(e,t){return!t||"object"!==du(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Eu(e){return(Eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gu(e,t)}function gu(e,t){return(gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ou=function(e){function t(){return bu(this,t),Su(this,Eu(t).apply(this,arguments))}return hu(t,e),vu(t,[{key:"channelName",get:function(){return s.VIDEOS}},{key:"appRoutes",get:function(){return{"manage/videos/:id(/)":"editVideo","manage/videos/:id/audiences(/)":"editVideoAudiences","manage/videos/:id/subjects(/)":"editVideoSubjects"}}}]),t}(f.Core.AppRouter),ju=function(e){function t(){return bu(this,t),Su(this,Eu(t).apply(this,arguments))}return hu(t,e),vu(t,[{key:"initialize",value:function(){var e=this;f.ObjectHelper.values(l).forEach((function(t){return f.InstanceManager.getInstance(t,e)}))}},{key:"editVideo",value:function(e){f.Core.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"editVideoAudiences",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(lu,{videoId:e}))}},{key:"editVideoSubjects",value:function(e){this.layout.showChildView(m.LayoutRegions.CONTENT,p.createElement(mu,{videoId:e}))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return en.Radio.channel(f.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(m.LayoutRegions.ALERT,p.createElement(m.AlertList,{alerts:n,removeAlert:r}))}},{key:"name",get:function(){return"Videos Application"}},{key:"channelName",get:function(){return s.VIDEOS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:au}}}}],[{key:"router",get:function(){return Ou}}]),t}(f.Core.Application);n.d(t,"Actions",(function(){return i})),n.d(t,"DataPrefixes",(function(){return a})),n.d(t,"FileExtensions",(function(){return o})),n.d(t,"Layouts",(function(){return c})),n.d(t,"AppChannels",(function(){return s})),n.d(t,"DataChannels",(function(){return u})),n.d(t,"DataServices",(function(){return l})),n.d(t,"CuratorLayoutView",(function(){return T})),n.d(t,"LayoutComponent",(function(){return P})),n.d(t,"CuratorAppNavService",(function(){return x})),n.d(t,"ImageUploadDataService",(function(){return Y})),n.d(t,"UserDataService",(function(){return Q})),n.d(t,"UserDataServiceHelper",(function(){return $})),n.d(t,"LanguageDataService",(function(){return oe})),n.d(t,"CompaniesApplication",(function(){return $t})),n.d(t,"DomainOptionsApplication",(function(){return Bn})),n.d(t,"PeopleApplication",(function(){return yr})),n.d(t,"PlaylistDataService",(function(){return wr})),n.d(t,"PlaylistDataServiceHelper",(function(){return Fr})),n.d(t,"PlaylistsApplication",(function(){return hs})),n.d(t,"SeriesDataService",(function(){return uc})),n.d(t,"SeriesDataServiceHelper",(function(){return pc})),n.d(t,"SeriesApplication",(function(){return Ws})),n.d(t,"SubjectDataService",(function(){return $i})),n.d(t,"SubjectDataServiceHelper",(function(){return ta})),n.d(t,"SubjectsApplication",(function(){return iu})),n.d(t,"VideoDataService",(function(){return ho})),n.d(t,"VideoDataServiceHelper",(function(){return Oo})),n.d(t,"VideosApplication",(function(){return ju}))}])}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","_","Yup","ReactBootstrap","Backbone","ReactRedux","Marionette","FontAwesome","DOMPurify","SortableHOC","ReactDOM","ReactTransitionGroup","Polyglot","Cropper","Handlebars"],t):"object"==typeof exports?exports["@clickview/curator"]=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):e["@clickview/curator"]=t(e.React,e._,e.Yup,e.ReactBootstrap,e.Backbone,e.ReactRedux,e.Marionette,e.FontAwesome,e.DOMPurify,e.SortableHOC,e.ReactDOM,e.ReactTransitionGroup,e.Polyglot,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,a,o,s,c,l,u,p,f,d,m){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=182)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";var r=n(19),i="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||i||Function("return this")();t.a=a},function(e,t){e.exports=o},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t,n){e.exports={alertItem:"_3ppPT",alertBox:"_2gPqV",alertList:"_1_wrK",icon:"_2gpnl",alertContent:"_1akpi",heading:"_3jnJY"}},function(e,t,n){"use strict";(function(e){var r=n(19),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.a.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();t.a=s}).call(this,n(26)(e))},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,a=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var s,c,l,u=r(t),p=r(n);if(u&&p){if((c=t.length)!=n.length)return!1;for(s=c;0!=s--;)if(!e(t[s],n[s]))return!1;return!0}if(u!=p)return!1;var f=t instanceof Date,d=n instanceof Date;if(f!=d)return!1;if(f&&d)return t.getTime()==n.getTime();var m=t instanceof RegExp,h=n instanceof RegExp;if(m!=h)return!1;if(m&&h)return t.toString()==n.toString();var y=i(t);if((c=y.length)!==i(n).length)return!1;for(s=c;0!=s--;)if(!a.call(n,y[s]))return!1;if(o&&t instanceof Element&&n instanceof Element)return t===n;for(s=c;0!=s--;)if(!("_owner"===(l=y[s])&&t.$$typeof||e(t[l],n[l])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function l(e){return e.replace(c,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const p=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const d={},m=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function g(e,t){d[" "+e]||(m.test(e)?d[" "+e]=e+"/":d[" "+e]=v(e,"/",!0));const n=-1===(e=d[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(h,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(y,"$1")+t:e+t}function v(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,s)}else if(i.test(e))return e.replace(a,s);return e},unescape:l,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(l(n)).replace(p,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(n)&&(n=g(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:g,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:v,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},function(e,t,n){e.exports={input:"_3MysI",suggestionsContainerOpen:"ahMdW",sectionContainer:"xstWL",suggestionHighlighted:"_3YTCa"}},function(e,t){e.exports=s},function(e,t,n){e.exports=n(168)()},function(e,t){function n(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1},getDefaults:n,changeDefaults:function(t){e.exports.defaults=t}}},function(e,t,n){e.exports={svg:"_3OUhC",iconButton:"_3t3VL",iconWithText:"_2KLHo",iconOnly:"_2rQWb"}},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(166))},function(e,t,n){"use strict";(function(e){var r=n(6),i=n(122),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||i.a;t.a=c}).call(this,n(26)(e))},function(e,t){e.exports=c},function(e,t,n){e.exports={buttonList:"_2v9CT",dropdownToggle:"AYBvQ"}},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!0;var o={},s=void 0,c=void 0;for(s=0,c=n.length;s<c;s++)o[n[s]]=!0;for(s=0,c=i.length;s<c;s++){var l=i[s],u=e[l],p=t[l];if(u!==p){if(!o[l]||null===u||null===p||"object"!==(void 0===u?"undefined":r(u))||"object"!==(void 0===p?"undefined":r(p)))return!0;var f=Object.keys(u),d=Object.keys(p);if(f.length!==d.length)return!0;for(var m=0,h=f.length;m<h;m++){var y=f[m];if(u[y]!==p[y])return!0}}}return!1}},function(e,t,n){const{defaults:r}=n(17),{cleanUrl:i,escape:a}=n(13);e.exports=class{constructor(e){this.options=e||r}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return r?'<pre><code class="'+this.options.langPrefix+a(r,!0)+'">'+(n?e:a(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:a(e,!0))+"</code></pre>"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+a(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}},function(e,t,n){"use strict";e.exports=n(163)},function(e,t,n){"use strict";var r=n(164),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=d(n);i&&i!==m&&e(t,i,r)}var o=u(n);p&&(o=o.concat(p(n)));for(var s=c(t),h=c(n),y=0;y<o.length;++y){var g=o[y];if(!(a[g]||r&&r[g]||h&&h[g]||s&&s[g])){var v=f(n,g);try{l(t,g,v)}catch(e){}}}}return t}},function(e,t){e.exports=p},function(e,t){e.exports={prefix:"cv",iconName:"add-to-playlist",icon:["24","24",[],"","M20.1 16.4h1.8a.6.6 0 1 1 0 1.2h-1.8v1.8a.6.6 0 1 1-1.2 0v-1.8h-1.8a.6.6 0 1 1 0-1.2h1.8v-1.8a.6.6 0 0 1 1.2 0v1.8zM10.5 9a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm5.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V12a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16zm-8-2.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close",icon:["24","24",[],"","M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"]}},function(e,t){e.exports={prefix:"cv",iconName:"delete",icon:["24","24",[],"","M14.5 7h4a.5.5 0 1 1 0 1h-1.14a1 1 0 0 1-.005.09l-.909 10a1 1 0 0 1-.996.91h-6.9a1 1 0 0 1-.996-.91l-.91-10A1.013 1.013 0 0 1 6.64 8H5.5a.5.5 0 0 1 0-1h4A1.5 1.5 0 0 1 11 5.5h2A1.5 1.5 0 0 1 14.5 7zm-1 0a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5h3zm-4 3a.463.463 0 0 0-.462.499L9.462 16a.54.54 0 0 0 .574.498.463.463 0 0 0 .426-.498l-.424-5.502A.54.54 0 0 0 9.5 10zm2.5 0a.5.5 0 0 0-.5.5V16a.5.5 0 1 0 1 0v-5.5a.5.5 0 0 0-.5-.5zm2.5 0a.54.54 0 0 0-.538.499L13.538 16a.463.463 0 0 0 .462.5.54.54 0 0 0 .538-.499l.424-5.502A.463.463 0 0 0 14.5 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit",icon:["24","24",[],"","M7.636 17.834l8.746-8.745-1.414-1.414-8.8 8.8 1.468 1.36zm-2.42.973c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zm2.614-1.906l.707.707a1.5 1.5 0 0 1 0 2.121L7.45 19.435c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L16.167 5.06a1.5 1.5 0 0 1 2.122 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"expand",icon:["24","24",[],"","M14.06 21.28l-.353.354-.707-.707.354-.354 7.22-7.22.353-.353.707.707-.354.354-7.22 7.22zm4 .465l-.353.353-.707-.707.354-.353 3.684-3.684.353-.354.707.707-.353.354-3.684 3.684z"]}},function(e,t){e.exports={prefix:"cv",iconName:"minus",icon:["24","24",[],"",""]}},function(e,t){e.exports={prefix:"cv",iconName:"more",icon:["24","24",[],"","M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"new-window",icon:["24","24",[],"","M17.395 5.526h-3.244a.763.763 0 0 1 0-1.526h5.086a.76.76 0 0 1 .763.763v5.086a.763.763 0 0 1-1.526 0V6.605l-5.172 5.172a.763.763 0 1 1-1.079-1.08l5.172-5.171zM8.5 5.5a.75.75 0 0 1 0 1.5H6.75a.25.25 0 0 0-.25.25v10c0 .138.112.25.25.25h10a.25.25 0 0 0 .25-.25V15.5a.75.75 0 1 1 1.5 0v1.75A1.75 1.75 0 0 1 16.75 19h-10A1.75 1.75 0 0 1 5 17.25v-10c0-.966.784-1.75 1.75-1.75H8.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"plus",icon:["24","24",[],"","M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2H11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"preview",icon:["24","24",[],"","M17.278 17.333a3.056 3.056 0 1 0 0-6.11 3.056 3.056 0 0 0 0 6.11zm3.53-.637c.03.022.06.048.087.076l1.729 1.728a.794.794 0 1 1-1.124 1.124l-1.728-1.729a.801.801 0 0 1-.076-.088 4.278 4.278 0 1 1 1.112-1.112zM7.713 9C7.32 9 7 8.776 7 8.5s.32-.5.714-.5h8.572c.394 0 .714.224.714.5s-.32.5-.714.5H7.714zm-.357 3.5C7.16 12.5 7 12.276 7 12s.16-.5.357-.5h4.286c.197 0 .357.224.357.5s-.16.5-.357.5H7.357zM7.5 16a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm8.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V9a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"search",icon:["24","24",[],"","M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"]}},function(e,t){e.exports={prefix:"cv",iconName:"share",icon:["24","24",[],"","M15.091 15.463a2.187 2.187 0 1 1-.392.782L8.91 13.35a2.187 2.187 0 1 1-.1-2.82l5.88-2.812a2.187 2.187 0 1 1 .378.79l-5.811 2.778a2.184 2.184 0 0 1 .045 1.281l5.79 2.896z"]}},function(e,t){e.exports={prefix:"cv",iconName:"upload",icon:["24","24",[],"","M5.5 18.5h13v-2.75a.75.75 0 1 1 1.5 0V19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3.25a.75.75 0 1 1 1.5 0v2.75zm7.249-11.796v8.57c0 .401-.35.726-.781.726-.432 0-.781-.325-.781-.725V6.704L7.89 9.658a.869.869 0 0 1-1.145 0 .692.692 0 0 1-.009-1.05l4.66-4.174a.869.869 0 0 1 1.144 0l4.66 4.174a.69.69 0 0 1 0 1.042.871.871 0 0 1-1.155.008L12.75 6.704z"]}},function(e,t){e.exports={prefix:"cv",iconName:"down",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"right",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"up-down",icon:["24","24",[],"","M8 14l8 .014L12 18l-4-4zm0-4l4-4 4 3.986L8 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"no-edit",icon:["24","24",[],"","M11.321 14.15l.707.707-4.578 4.578c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L9.2 12.028l.707.707-3.739 3.74 1.468 1.36 3.685-3.685zm2.828-2.829l2.233-2.232-1.414-1.414-2.233 2.232-.707-.707 4.14-4.14a1.5 1.5 0 0 1 2.12 0l.708.708a1.5 1.5 0 0 1 0 2.121l-4.14 4.14-.707-.708zm-8.933 7.486c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zM4.646 5.355a.5.5 0 0 1 .708-.708L19.496 18.79a.5.5 0 1 1-.707.707L4.646 5.354z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit-clickview",icon:["20","20",[],"","M17.6404852,5.71727477 L18.2297408,6.30653042 C18.7178962,6.79468579 18.7178962,7.58614201 18.2297408,8.07429738 L8.60812289,17.6959153 C6.71135346,18.0295451 5.75309028,18.1864816 5.73333333,18.1667246 C5.71357639,18.1469677 5.88616537,17.2043571 6.25110029,15.3388927 L15.8727182,5.71727477 C16.3608736,5.22911941 17.1523298,5.22911941 17.6404852,5.71727477 Z M8.7636789,16.361848 L16.05144,9.07408693 L14.8729287,7.89557563 L7.54002172,15.2284826 L8.7636789,16.361848 Z M6.74626541,17.1725049 C7.12145752,17.1092038 7.58975231,17.0283895 8.15085565,16.9301078 L6.99799308,15.862313 C6.89682248,16.3819093 6.8128974,16.8187273 6.74626541,17.1725049 Z M15.4621843,7.30631998 L16.6406956,8.48483128 L17.6404852,7.48504173 C17.8032036,7.32232327 17.8032036,7.05850453 17.6404852,6.89578608 L17.0512295,6.30653042 C16.8885111,6.14381197 16.6246923,6.14381197 16.4619739,6.30653042 L15.4621843,7.30631998 Z M6.33566019,14.9908489 C6.2812423,14.9851574 6.22594201,14.9756491 6.16991424,14.9622805 C5.78045547,14.8577915 5.5109401,14.5829916 5.41684139,14.197065 L5.16924027,13.2272939 L4.21481414,13.4992408 C3.82064978,13.614606 3.44283804,13.5120571 3.186267,13.236167 C2.88681965,12.9560388 2.78427075,12.578227 2.89864522,12.187493 L3.17158282,11.2296365 L2.20423564,10.9826478 C1.82188543,10.8870603 1.55144636,10.6218219 1.4331146,10.2152085 C1.34005988,9.82437875 1.44481708,9.45772856 1.72601896,9.19546209 L2.43808286,8.49887783 L1.73450689,7.81040417 C1.44481706,7.54002697 1.34005989,7.17337687 1.439649,6.75790801 C1.55144635,6.37593371 1.82188539,6.11069542 2.20181175,6.01572028 L3.17158282,5.76811916 L2.89963593,4.81369299 C2.78427075,4.41952863 2.88681965,4.04171689 3.16270985,3.78514587 C3.442838,3.48569854 3.82064974,3.38314964 4.2113838,3.49752411 L5.16924027,3.77046171 L5.41554008,2.80590417 C5.51183431,2.41109782 5.78619407,2.13673807 6.15902913,2.0463353 C6.55319349,1.93097012 6.93100525,2.03351902 7.20467421,2.32619001 L7.89999894,3.04211696 L8.594506,2.32703389 C8.87243071,2.03952554 9.24209506,1.93918808 9.61899753,2.04044384 C10.0138038,2.13673809 10.2881636,2.41109789 10.3831565,2.80069064 L10.6307576,3.77046171 L11.5851838,3.49851482 C11.9793481,3.38314964 12.3571599,3.48569854 12.6137309,3.76158875 C12.9131782,4.04171689 13.0157271,4.41952857 12.9013527,4.8102627 L12.6284151,5.76811916 L13.5957624,6.01510789 C13.9781125,6.11069542 14.2485515,6.37593369 14.3668833,6.78254721 C14.3761095,6.82129727 14.3833912,6.85980963 14.3887491,6.89800613 L12.4311686,8.86525019 C12.2885501,8.50246788 12.3664513,8.07377489 12.6626209,7.7840438 L13.3831727,7.07934901 C13.4057811,7.05824779 13.4051218,7.06055538 13.4006115,7.03880681 C13.3874896,6.9939735 13.3872742,6.99376225 13.3508029,6.98463799 L12.3810318,6.73703687 L12.3543769,6.72983797 C11.8232342,6.57849086 11.5153491,6.0252236 11.6666962,5.49408097 L11.9406245,4.53279433 C11.9501787,4.50015106 11.9538346,4.51362027 11.9070166,4.46830299 C11.8852565,4.44504217 11.8987257,4.44869811 11.8626522,4.45924293 L10.9047957,4.73218053 L10.8781408,4.73937942 C10.3430223,4.87600541 9.79846586,4.55296343 9.66183987,4.01784495 L9.41293742,3.04286026 C9.40513226,3.0108591 9.4140425,3.01976934 9.37095513,3.00912543 C9.33213613,2.99871057 9.33745796,2.99726608 9.31267674,3.02289983 L8.61735201,3.73882678 L8.59670876,3.75947002 C8.2005256,4.14425223 7.56742808,4.13500994 7.18264587,3.73882678 L6.48086195,3.01612347 C6.45910183,2.99286265 6.4725711,2.9965186 6.4179566,3.01196417 C6.38595535,3.01976935 6.39486559,3.01085911 6.3857591,3.04807388 L6.13815798,4.01784495 L6.13095909,4.04449986 C5.97961199,4.5756425 5.42634475,4.88352762 4.89520211,4.73218053 L3.93391535,4.45825223 C3.90127212,4.44869811 3.91474139,4.44504217 3.86942412,4.49186014 C3.84616328,4.51362028 3.84981922,4.50015102 3.86036404,4.53622453 L4.13330164,5.494081 L4.14050053,5.52073591 C4.27712653,6.05585439 3.95408454,6.60041087 3.41896607,6.73703687 L2.44677117,6.98525039 C2.41272371,6.99376225 2.41250834,6.99397349 2.40592081,7.01416766 C2.3948761,7.06055542 2.39421677,7.05824776 2.42531312,7.08745955 L3.13737702,7.78404381 L3.15291688,7.79958367 C3.53912638,8.1943756 3.53216895,8.82750235 3.13737702,9.21371185 L2.41682511,9.91840678 C2.39421677,9.93950789 2.3948761,9.93720022 2.3993864,9.95894886 C2.41250834,10.0037822 2.41272371,10.0039934 2.44919499,10.0131176 L3.41896606,10.2607188 L3.44562098,10.2679177 C3.97676362,10.4192648 4.28464874,10.972532 4.13330164,11.5036746 L3.85937334,12.4649614 C3.84981922,12.4976046 3.84616328,12.4841354 3.89298124,12.5294526 C3.91474137,12.5527135 3.90127209,12.5490575 3.93734565,12.5385127 L4.89520212,12.2655751 L4.92185702,12.2583762 C5.4569755,12.1217502 6.00153199,12.4447922 6.13815798,12.9799107 L6.38706042,13.9548953 C6.3957598,13.9905628 6.39169395,13.9864172 6.41528883,13.9929559 C6.46167656,14.0040006 6.45936885,14.00466 6.48858067,13.9735636 L7.18516493,13.2614997 L7.20070477,13.2459599 C7.4952939,12.9577749 7.92258715,12.888504 8.28097421,13.0359319 L6.33566019,14.9908489 Z M6.70489207,8.77616163 L9.31429327,6.16676041 C9.44212761,6.03892605 9.65593967,6.03389908 9.78471434,6.16267377 L10.2815938,6.65955323 C10.4116803,6.78963968 10.4085388,6.9989426 10.2775071,7.12997428 L6.95925927,10.4482222 C6.89767261,10.5098088 6.81613041,10.5428917 6.73375541,10.5462414 C6.63512454,10.5601257 6.53103126,10.5287286 6.45266973,10.450367 L4.80169873,8.79939603 C4.67185163,8.66954896 4.66967053,8.4612063 4.79975698,8.33111983 L5.29663643,7.83424043 C5.42541113,7.7054657 5.63211299,7.70338256 5.76491261,7.83618216 L6.70489207,8.77616163 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"caret",icon:["24","24",[],"","M8 10 16 10.0136253 12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-up",icon:["24","24",[],"","M12.733 8.305l5.963 5.906a1.046 1.046 0 0 1 0 1.473l-.01.011a1.034 1.034 0 0 1-1.467 0L12 10.526l-5.22 5.17a1.034 1.034 0 0 1-1.465 0l-.011-.012a1.046 1.046 0 0 1 0-1.473l5.963-5.906a1.034 1.034 0 0 1 1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-down",icon:["24","24",[],"","M11.267 15.695L5.304 9.79a1.046 1.046 0 0 1 0-1.473l.01-.011a1.034 1.034 0 0 1 1.467 0L12 13.474l5.22-5.17a1.034 1.034 0 0 1 1.465 0l.011.012a1.046 1.046 0 0 1 0 1.473l-5.963 5.906a1.034 1.034 0 0 1-1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-left",icon:["24","24",[],"","M8.305 11.267l5.906-5.963a1.046 1.046 0 0 1 1.473 0l.011.01a1.034 1.034 0 0 1 0 1.467L10.526 12l5.17 5.22c.406.41.406 1.055 0 1.465l-.012.011a1.046 1.046 0 0 1-1.473 0l-5.906-5.963a1.034 1.034 0 0 1 0-1.466z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-right",icon:["24","24",[],"","M15.695 11.267c.407.41.407 1.056 0 1.466L9.79 18.696a1.046 1.046 0 0 1-1.474 0l-.01-.01a1.034 1.034 0 0 1 0-1.467L13.474 12l-5.17-5.22a1.034 1.034 0 0 1 0-1.465l.012-.011a1.046 1.046 0 0 1 1.474 0l5.905 5.963z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-left",icon:["24","24",[],"","M7.182 11h11.89c.512 0 .928.448.928 1s-.416 1-.929 1H7.181l3.781 4.22a1.11 1.11 0 0 1 0 1.465c-.36.403-.943.418-1.311.045a.952.952 0 0 1-.032-.034l-5.343-5.963a1.112 1.112 0 0 1 0-1.466l5.343-5.963a.883.883 0 0 1 1.333 0c.378.421.378 1.066.01 1.477L7.182 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-right",icon:["24","24",[],"","M16.818 11H4.928C4.417 11 4 11.448 4 12s.416 1 .929 1h11.89l-3.781 4.22a1.112 1.112 0 0 0 0 1.465c.36.403.943.418 1.311.045a.952.952 0 0 0 .032-.034l5.343-5.963a1.112 1.112 0 0 0 0-1.466l-5.343-5.963a.883.883 0 0 0-1.333 0 1.115 1.115 0 0 0-.01 1.477L16.818 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"enter",icon:["24","24",[],"","M5.613 13.959a.599.599 0 0 1-.213-.46c0-.155.058-.309.176-.426l3.75-3.75a.6.6 0 0 1 .848.848L7.446 12.9H13.5A3.9 3.9 0 0 0 17.4 9V6.747a.6.6 0 0 1 1.2 0V9a5.1 5.1 0 0 1-5.1 5.1H7.452l2.722 2.723a.6.6 0 0 1-.848.848L5.613 13.96z"]}},function(e,t){e.exports={prefix:"cv",iconName:"archive",icon:["24","24",[],"","M19.64 10.28a.55.55 0 1 1 1.1 0v6.878c0 1.582-1.386 2.842-3.07 2.842H6.33c-1.684 0-3.07-1.26-3.07-2.842V10.28a.55.55 0 1 1 1.1 0v6.877c0 .95.87 1.742 1.97 1.742h11.34c1.1 0 1.97-.793 1.97-1.742V10.28zM20.19 4c.99 0 1.81.747 1.81 1.696V7.99a.55.55 0 0 1-.55.55H2.55A.55.55 0 0 1 2 7.99V5.696C2 4.747 2.821 4 3.81 4h16.38zm.71 1.696c0-.317-.307-.596-.71-.596H3.81c-.403 0-.71.28-.71.596v1.742h17.8V5.696zm-5.83 5.73c0 .95-.821 1.697-1.81 1.697h-2.52c-.989 0-1.81-.747-1.81-1.696 0-.95.821-1.696 1.81-1.696h2.52c.989 0 1.81.747 1.81 1.696zm-1.1 0c0-.316-.307-.595-.71-.595h-2.52c-.403 0-.71.28-.71.596 0 .317.307.596.71.596h2.52c.403 0 .71-.28.71-.596z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bell",icon:["24","24",[],"","M9.588 17.995H6.152c-.636 0-1.152-.53-1.152-1.182 0-.221.06-.438.175-.626l2.128-2.92V9.722c0-2.187 1.447-4.027 3.411-4.567v-.012A1.143 1.143 0 0 1 13 5.128c2.017.502 3.515 2.369 3.515 4.594v3.545l2.303 2.92a1.2 1.2 0 0 1-.366 1.628 1.13 1.13 0 0 1-.61.18h-3.716a2.286 2.286 0 0 1-4.538 0zm1.161 0a1.143 1.143 0 0 0 2.216 0H10.75zm4.615-4.31V9.723c0-1.958-1.547-3.546-3.455-3.546-1.908 0-3.454 1.588-3.454 3.546v3.939l-.23.314-2.073 2.838H17.83l-2.467-3.127z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bookmark",icon:["24","24",[],"","M8.5 5h7A1.5 1.5 0 0 1 17 6.5v12.131a.2.2 0 0 1-.309.168L12 15.75 7.309 18.8A.2.2 0 0 1 7 18.63V6.5A1.5 1.5 0 0 1 8.5 5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"broadcast",icon:["24","24",[],"","M4.571 19C4.256 19 4 18.776 4 18.5s.256-.5.571-.5H19.43c.315 0 .571.224.571.5s-.256.5-.571.5H4.57zM4.125 5h15.75C20.496 5 21 5.537 21 6.2v9.6c0 .663-.504 1.2-1.125 1.2H4.125C3.504 17 3 16.463 3 15.8V6.2C3 5.537 3.504 5 4.125 5zM4 6v10h16V6H4zm6 2.35a.192.192 0 0 1 .295-.162l4.164 2.65a.192.192 0 0 1 0 .324l-4.164 2.65A.192.192 0 0 1 10 13.65v-5.3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"calendar",icon:["24","24",[],"","M6.2 10.2V17a.8.8 0 0 0 .8.8h10a.8.8 0 0 0 .8-.8v-6.8H6.2zM16 5.5h2a1 1 0 0 1 1 1V17a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6.5a1 1 0 0 1 1-1h2v-.875a.625.625 0 1 1 1.25 0V5.5h5.5v-.875a.625.625 0 1 1 1.25 0V5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"cog",icon:["24","24",[],"","M18.458 12c0 .944.514 1.722 1.542 2.333a10.98 10.98 0 0 1-.667 1.584c-.944-.223-1.805.055-2.583.833-.694.694-.917 1.556-.667 2.583A10.98 10.98 0 0 1 14.5 20c-.611-1.028-1.444-1.542-2.5-1.542s-1.889.514-2.5 1.542c-.5-.167-1.042-.389-1.625-.667.25-1.055.042-1.916-.625-2.583-.667-.667-1.528-.875-2.583-.625C4.389 15.542 4.167 15 4 14.5c1.028-.611 1.542-1.444 1.542-2.5 0-.944-.514-1.722-1.542-2.333a8.484 8.484 0 0 1 .667-1.584c.944.223 1.805-.055 2.583-.833.667-.667.875-1.528.625-2.583C8.458 4.389 9 4.167 9.5 4c.611 1.028 1.444 1.542 2.5 1.542S13.889 5.028 14.5 4c.5.167 1.042.389 1.625.667-.25 1.055-.042 1.916.625 2.583.778.778 1.639 1.056 2.583.833.306.611.528 1.14.667 1.584-1.028.61-1.542 1.389-1.542 2.333zM12 16.083c1.111 0 2.07-.402 2.875-1.208.806-.806 1.208-1.764 1.208-2.875s-.402-2.07-1.208-2.875c-.806-.806-1.764-1.208-2.875-1.208s-2.07.402-2.875 1.208c-.806.806-1.208 1.764-1.208 2.875s.402 2.07 1.208 2.875c.806.806 1.764 1.208 2.875 1.208z"]}},function(e,t){e.exports={prefix:"cv",iconName:"folder",icon:["24","24",[],"","M12.685 6H18.5A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18.5v-13A1.5 1.5 0 0 1 5.5 4h4.66a1.5 1.5 0 0 1 1.095.474L12.685 6zM5.5 5a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-6.248l-1.727-1.842A.5.5 0 0 0 10.161 5H5.5zM5 10V9h14v1H5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"handle",icon:["16","16",[],"","M1 0h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7.4a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1V15a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-1.2a1 1 0 0 1 1-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c4.001-4.053 1.158-11.055-4.532-11.055-3.417 0-4.985 2.511-5.596 2.98-.614-.471-2.172-2.98-5.596-2.98-5.672 0-8.55 6.984-4.531 11.055z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart-outline",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c2.491-2.523 2.491-6.63 0-9.154-1.21-1.226-2.819-1.901-4.532-1.901s-3.321.675-4.531 1.9l-1.065 1.08-1.065-1.079c-1.21-1.226-2.819-1.901-4.531-1.901-1.713 0-3.322.675-4.532 1.901-2.491 2.524-2.491 6.631 0 9.153zm-8.527-17.822c.926-.937 2.157-1.454 3.464-1.454 1.308 0 2.538.517 3.463 1.455l1.599 1.62c.281.285.786.285 1.067 0l1.599-1.621c.928-.937 2.158-1.454 3.465-1.454 1.308 0 2.538.517 3.464 1.454 1.917 1.943 1.917 5.104 0 7.048l-9.06 9.181-9.061-9.182c-1.917-1.942-1.917-5.104 0-7.047z"]}},function(e,t){e.exports={prefix:"cv",iconName:"interactive",icon:["24","24",[],"","M5.978 13.65l7.525-9.99a.2.2 0 0 1 .357.154l-1.289 7.5 5.194-1.04a.2.2 0 0 1 .198.318l-7.447 9.733a.2.2 0 0 1-.355-.16l1.268-6.566-5.277.37a.2.2 0 0 1-.174-.32z"]}},function(e,t){e.exports={prefix:"cv",iconName:"link",icon:["24","24",[],"","M17 10c2.2 0 4 1.8 4 4s-1.8 4-4 4h-5a3.99 3.99 0 0 1-3-1.367v-.028a4.447 4.447 0 0 1-.889-2.679c0-.698.162-1.356.443-1.94A4 4 0 0 1 12 10h1.872v.098c0 .573-.322 1.081-.818 1.402H12c-.722 0-1.368.316-1.824.811-.453.418-.732.976-.732 1.591v.196c0 .575.244 1.1.645 1.508.46.545 1.146.894 1.911.894h5c1.375 0 2.5-1.125 2.5-2.5s-1.125-2.5-2.5-2.5h-.686a5.22 5.22 0 0 0 .24-1.5H17zm-9.556 3.926l.002.074H7c-2.2 0-4-1.8-4-4s1.8-4 4-4h5c1.462 0 2.743.797 3.441 1.975a4.48 4.48 0 0 1-.44 4.63v.024a3.982 3.982 0 0 1-3 1.37h-1.873v-.096c0-.574.322-1.082.817-1.403H12c.722 0 1.368-.316 1.824-.811.452-.418.731-.976.731-1.591v-.195c0-.576-.244-1.101-.645-1.51A2.496 2.496 0 0 0 12 7.5H7A2.507 2.507 0 0 0 4.5 10c0 1.375 1.125 2.5 2.5 2.5h.642c-.128.452-.198.93-.198 1.426z"]}},function(e,t){e.exports={prefix:"cv",iconName:"playlist",icon:["24","24",[],"","M4,19.0049107 C4,19.5548349 4.44525903,20 4.99508929,20 L19.0049107,20 C19.5548349,20 20,19.554741 20,19.0049107 L20,4.99508929 C20,4.44516513 19.554741,4 19.0049107,4 L4.99508929,4 C4.44516513,4 4,4.44525903 4,4.99508929 L4,19.0049107 Z M4.99508929,3 L19.0049107,3 C20.1067681,3 21,3.8926228 21,4.99508929 L21,19.0049107 C21,20.1067681 20.1073772,21 19.0049107,21 L4.99508929,21 C3.8932319,21 3,20.1073772 3,19.0049107 L3,4.99508929 C3,3.8932319 3.8926228,3 4.99508929,3 Z M17.5,17.3 C17.7761424,17.3 18,17.0761424 18,16.8 C18,16.5238576 17.7761424,16.3 17.5,16.3 L9.5,16.3 C9.22385763,16.3 9,16.5238576 9,16.8 C9,17.0761424 9.22385763,17.3 9.5,17.3 L17.5,17.3 Z M17.5,12.7 C17.7761424,12.7 18,12.4761424 18,12.2 C18,11.9238576 17.7761424,11.7 17.5,11.7 L9.5,11.7 C9.22385763,11.7 9,11.9238576 9,12.2 C9,12.4761424 9.22385763,12.7 9.5,12.7 L17.5,12.7 Z M8.07195299,7.22930174 L6.86542219,6.50538326 C6.38401051,6.21653625 6,6.43413716 6,6.98678206 L6,8.51032805 C6,9.06455544 6.38746271,9.27850253 6.86542219,8.99172685 L8.07195299,8.26780837 C8.55336467,7.97896136 8.54991246,7.51607743 8.07195299,7.22930174 Z M8.07195299,11.7293017 L6.86542219,11.0053833 C6.38401051,10.7165363 6,10.9341372 6,11.4867821 L6,13.010328 C6,13.5645554 6.38746271,13.7785025 6.86542219,13.4917268 L8.07195299,12.7678084 C8.55336467,12.4789614 8.54991246,12.0160774 8.07195299,11.7293017 Z M8.07195299,16.2293017 L6.86542219,15.5053833 C6.38401051,15.2165363 6,15.4341372 6,15.9867821 L6,17.510328 C6,18.0645554 6.38746271,18.2785025 6.86542219,17.9917268 L8.07195299,17.2678084 C8.55336467,16.9789614 8.54991246,16.5160774 8.07195299,16.2293017 Z M17.5,8.3 C17.7761424,8.3 18,8.07614237 18,7.8 C18,7.52385763 17.7761424,7.3 17.5,7.3 L9.5,7.3 C9.22385763,7.3 9,7.52385763 9,7.8 C9,8.07614237 9.22385763,8.3 9.5,8.3 L17.5,8.3 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"publisher-archive",icon:["24","24",[],"","M19.6403207,10.2808023 C19.6403207,9.97696656 19.8864872,9.73065903 20.1901489,9.73065903 C20.4938106,9.73065903 20.7399771,9.97696656 20.7399771,10.2808023 L20.7399771,17.1575931 C20.7399771,18.7397289 19.3544729,20 17.6701031,20 L6.32989691,20 C4.64552709,20 3.26002291,18.7397289 3.26002291,17.1575931 L3.26002291,10.2808023 C3.26002291,9.97696656 3.50618937,9.73065903 3.80985109,9.73065903 C4.11351281,9.73065903 4.35967927,9.97696656 4.35967927,10.2808023 L4.35967927,17.1575931 C4.35967927,18.1074218 5.23070097,18.8997135 6.32989691,18.8997135 L17.6701031,18.8997135 C18.769299,18.8997135 19.6403207,18.1074218 19.6403207,17.1575931 L19.6403207,10.2808023 Z M20.1901489,4 C21.1786273,4 22,4.74713037 22,5.69627507 L22,7.98853868 C22,8.29237442 21.7538335,8.53868195 21.4501718,8.53868195 L2.54982818,8.53868195 C2.24616646,8.53868195 2,8.29237442 2,7.98853868 L2,5.69627507 C2,4.74713037 2.82137271,4 3.80985109,4 L20.1901489,4 Z M20.9003436,5.69627507 C20.9003436,5.37943754 20.5934534,5.10028653 20.1901489,5.10028653 L3.80985109,5.10028653 C3.40654659,5.10028653 3.09965636,5.37943754 3.09965636,5.69627507 L3.09965636,7.43839542 L20.9003436,7.43839542 L20.9003436,5.69627507 Z M15.069874,11.4269341 C15.069874,12.3760788 14.2485013,13.1232092 13.2600229,13.1232092 L10.7399771,13.1232092 C9.75149871,13.1232092 8.930126,12.3760788 8.930126,11.4269341 C8.930126,10.4777894 9.75149871,9.73065903 10.7399771,9.73065903 L13.2600229,9.73065903 C14.2485013,9.73065903 15.069874,10.4777894 15.069874,11.4269341 Z M13.9702176,11.4269341 C13.9702176,11.1100966 13.6633274,10.8309456 13.2600229,10.8309456 L10.7399771,10.8309456 C10.3366726,10.8309456 10.0297824,11.1100966 10.0297824,11.4269341 C10.0297824,11.7437716 10.3366726,12.0229226 10.7399771,12.0229226 L13.2600229,12.0229226 C13.6633274,12.0229226 13.9702176,11.7437716 13.9702176,11.4269341 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"resources",icon:["24","24",[],"","M4 6.83c0-.523.423-.948.948-.948H17.17c.524 0 .949.423.949.949v12.22a.947.947 0 0 1-.949.949H4.95a.947.947 0 0 1-.95-.948V6.83zm.941 12.222c0 .005 12.228.007 12.228.007.005 0 .007-12.228.007-12.228 0-.005-12.228-.007-12.228-.007-.005 0-.007 12.228-.007 12.228zm2.353-9.405a.47.47 0 1 1 0-.941h7.588a.47.47 0 1 1 0 .941H7.294zm0 2.824a.47.47 0 1 1 0-.942h7.588a.47.47 0 1 1 0 .942H7.294zm0 2.823a.47.47 0 1 1 0-.941h2.88a.47.47 0 1 1 0 .941h-2.88zM6.353 4.941a.47.47 0 1 1 0-.941h11.766C19.155 4 20 4.848 20 5.88v12.232a.47.47 0 1 1-.941 0V5.88a.945.945 0 0 0-.94-.938H6.353z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star-o",icon:["24","24",[],"","M11.64 16.055a.768.768 0 0 1 .72 0l3.767 1.998-.806-4.602 3.357-3.249-4.626-.654L12 5.35 9.948 9.548l-4.626.654 3.357 3.25-.807 4.601 3.768-1.998zm-3.75 3.148a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star",icon:["24","24",[],"","M7.89 19.203a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"tag",icon:["24","24",[],"","M9.85651379,4 C10.5597673,4 11.2342681,4.27911643 11.7318501,4.77635695 L11.7318501,4.77635695 L19.5192508,12.5634018 C20.1602555,13.2045708 20.1602555,14.2439177 19.5192159,14.8851217 L19.5192159,14.8851217 L14.8855145,19.5192848 C14.2443321,20.1602442 13.2049876,20.1602442 12.5637184,19.519198 L12.5637184,19.519198 L4.7762613,11.7314233 C4.27913559,11.2340016 4,10.5595161 4,9.85635067 L4,9.85635067 L4,5.64191268 C4,4.7351029 4.73513649,4 5.64195885,4 L5.64195885,4 L9.85651379,4 Z M9.85658948,5.26315824 L5.64195885,5.26315824 C5.4327466,5.26315824 5.26315823,5.43273884 5.26315823,5.64191268 L5.26315823,5.64191268 L5.26315823,9.85642637 C5.26315823,10.2247328 5.40935021,10.5779817 5.66959105,10.8383776 L5.66959105,10.8383776 L13.4568376,18.6259418 C13.6047616,18.7738142 13.8445582,18.7738142 13.9923822,18.6260417 L13.9923822,18.6260417 L18.6259486,13.9920135 C18.7738119,13.8441123 18.7738119,13.6043763 18.6260161,13.4565426 L18.6260161,13.4565426 L10.8388259,5.6697082 C10.5782887,5.40934993 10.2250082,5.26315824 9.85658948,5.26315824 L9.85658948,5.26315824 Z M7.78947471,6.10526373 C8.71963876,6.10526373 9.4736857,6.85931068 9.4736857,7.78947472 C9.4736857,8.71963876 8.71963876,9.4736857 7.78947471,9.4736857 C6.85931067,9.4736857 6.10526373,8.71963876 6.10526373,7.78947472 C6.10526373,6.85931068 6.85931067,6.10526373 7.78947471,6.10526373 Z M7.78947471,7.36842197 C7.5569337,7.36842197 7.36842197,7.55693371 7.36842197,7.78947472 C7.36842197,8.02201573 7.5569337,8.21052747 7.78947471,8.21052747 C8.02201572,8.21052747 8.21052746,8.02201573 8.21052746,7.78947472 C8.21052746,7.55693371 8.02201572,7.36842197 7.78947471,7.36842197 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"time",icon:["24","24",[],"","M12 4c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 1.077a6.88 6.88 0 0 0-4.896 2.027A6.877 6.877 0 0 0 5.077 12c0 1.85.72 3.588 2.027 4.896A6.877 6.877 0 0 0 12 18.923a6.88 6.88 0 0 0 4.896-2.027A6.877 6.877 0 0 0 18.923 12a6.88 6.88 0 0 0-2.027-4.896A6.877 6.877 0 0 0 12 5.077zm2.524 9.599a.6.6 0 0 1-.848.848l-2.5-2.5A.6.6 0 0 1 11 12.6V8.624a.6.6 0 0 1 1.2 0v3.727l2.324 2.325z"]}},function(e,t){e.exports={prefix:"cv",iconName:"video",icon:["24","24",[],"","M4.5 6a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm0-1h15A1.5 1.5 0 0 1 21 6.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5v-11A1.5 1.5 0 0 1 4.5 5zM10 9.26v5.48a.256.256 0 0 0 .39.218l4.482-2.74a.256.256 0 0 0 0-.436l-4.483-2.74a.256.256 0 0 0-.389.219z"]}},function(e,t){e.exports={prefix:"cv",iconName:"subject",icon:["24","24",[],"","M19.15,21.08H5.1c-1.09,0-1.98-0.89-1.98-1.98V5.06c0-1.09,0.89-1.98,1.98-1.98h14.04c1.09,0,1.98,0.89,1.98,1.98V19.1 C21.12,20.19,20.24,21.08,19.15,21.08z M20.12,19.16V5c0-0.51-0.41-0.92-0.92-0.92H7.04C6.54,4.08,6.12,4.49,6.12,5v14.16 c0,0.51,0.41,0.92,0.92,0.92h12.16C19.71,20.08,20.12,19.67,20.12,19.16z M19.12,6.95V6.81c0-0.36-0.29-0.65-0.65-0.65H8.78 c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69C18.83,7.6,19.12,7.31,19.12,6.95z M19.12,9.95V9.81 c0-0.36-0.29-0.65-0.65-0.65H8.78c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69 C18.83,10.6,19.12,10.31,19.12,9.95z"]}},function(e,t){e.exports={prefix:"cv",iconName:"series",icon:["24","24",[],"","M20.49,3.51c0.97,0,1.76,0.79,1.76,1.76v9.27c0,0.77-0.49,1.42-1.18,1.66l0.09-10.84c0-0.39-0.3-0.7-0.68-0.7l-14.27,0 C6.46,3.99,7.1,3.51,7.85,3.51H20.49z M18.38,5.56c0.97,0,1.76,0.79,1.76,1.75v9.27c0.01,0.77-0.49,1.42-1.17,1.66l0.09-10.86 c0-0.38-0.3-0.68-0.68-0.68l-14.28,0c0.25-0.67,0.89-1.14,1.64-1.14H18.38z M16.15,7.7c0.97,0,1.75,0.79,1.75,1.76v9.27 c0,0.97-0.79,1.75-1.75,1.75H3.5c-0.97,0-1.75-0.79-1.75-1.75V9.46c0-0.97,0.79-1.76,1.75-1.76H16.15z M16.14,8.85H3.51 c-0.38,0-0.68,0.3-0.68,0.68l0,0v9.13c0,0.38,0.3,0.68,0.68,0.68l0,0h12.62c0.38,0,0.68-0.3,0.68-0.68l0,0V9.53 C16.82,9.15,16.52,8.85,16.14,8.85L16.14,8.85z M8.46,12.41v3.37c0,0.18,0.21,0.28,0.35,0.18l2.31-1.69c0.12-0.09,0.12-0.27,0-0.35 L8.8,12.23C8.66,12.13,8.46,12.23,8.46,12.41"]}},function(e,t){e.exports={prefix:"cv",iconName:"white-wave",icon:["1200","244",[],"","M1104.19651,33.5198863 C1084.14716,45.4511816 1067.10689,82.9623447 1047.23647,124.40502 C1023.86518,173.149287 924.725009,160.996474 830.060105,199.668011 C735.395201,238.339548 706.121292,249.351671 618.615175,241.737466 C531.109058,234.12326 495.404437,207.34459 432.2827,199.668011 C370.933901,192.207048 283.214734,200.240922 234.995453,186.264588 C153.311618,162.588569 167.948341,80.4093241 122.421855,59.9864363 C102.62311,51.1048469 61.8158253,37.3273576 0,18.6539685 L0,0 L1200,0 C1161.79495,7.07406031 1129.86046,18.2473557 1104.19651,33.5198863 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"compass",icon:["24","24",[],"","M12,-1.71862524e-13 C13.3893905,-1.71862524e-13 14.5197317,1.12166968 14.5197317,2.50040137 C14.5197317,2.8215332 14.4594938,3.13263028 14.3442115,3.42156921 C16.2349366,3.84633285 17.9748233,4.78862459 19.3866372,6.17539419 L19.4316433,6.22680193 C21.3267651,8.11265804 22.5,10.713205 22.5,13.5805516 C22.5,19.3258216 17.7897333,24 12,24 L12,24 C6.21026669,24 1.5,19.3258216 1.5,13.5805516 L1.50006052,13.5243182 C1.50002021,13.5212739 1.5,13.5182249 1.5,13.5151711 L1.501,13.503 L1.50378159,13.2988768 C1.57785421,10.543134 2.73548466,8.05071265 4.56835673,6.22680193 L4.61336276,6.17539419 C6.02517671,4.78862459 7.76506343,3.84633285 9.65748913,3.42018903 C9.54056383,3.13263028 9.48031555,2.8215332 9.48031555,2.50040137 C9.48031555,1.12166968 10.6106095,-1.71862524e-13 12,-1.71862524e-13 Z M12,4.52624116 L11.6809164,4.53170146 C11.6454989,4.53291535 11.610132,4.53433052 11.5748169,4.53594584 L11.6816694,4.53162088 C11.5883913,4.53477816 11.4953516,4.53932139 11.4025747,4.54524062 L11.5748169,4.53594584 C11.4679256,4.54083509 11.3615084,4.54755809 11.2555967,4.55608379 L11.4025747,4.54524062 C11.3068176,4.55134999 11.2113405,4.55892518 11.1161702,4.56795525 L11.2555967,4.55608379 C11.095392,4.56897997 10.9363438,4.5860008 10.7785603,4.60703883 C10.7467123,4.6104578 10.7154515,4.61475211 10.6842289,4.61920452 L10.7785603,4.60703883 C10.6768565,4.62059949 10.5756781,4.63582921 10.4750543,4.65269924 L10.6842289,4.61920452 C10.600263,4.63117821 10.5165735,4.64429522 10.4331795,4.65854779 L10.4750543,4.65269924 C9.11485909,4.88074187 7.85598275,5.40850943 6.77005357,6.16492738 L8.00490498,7.39068924 C8.27354347,7.65726684 8.27354347,8.0894535 8.00490498,8.35612485 C7.87046765,8.48939021 7.69450873,8.55604633 7.5184081,8.55604633 C7.34230747,8.55604633 7.16634856,8.48943709 7.03200569,8.35612485 L5.70204148,7.03485023 C4.13204115,8.52299364 3.09475895,10.5601022 2.90659433,12.8322227 L4.30759576,12.8325787 C4.68743083,12.8325787 4.99546522,13.1382031 4.99546522,13.5151711 C4.99546522,13.892186 4.68747807,14.1977635 4.30764299,14.1977635 L2.89670934,14.1976473 C3.02371908,16.0609257 3.72135566,17.7714185 4.81716961,19.1579915 L4.97167812,19.3482139 C5.26113447,19.6949337 5.57609243,20.0199666 5.91367078,20.3204536 L7.03200569,19.2111609 C7.30069142,18.9445833 7.73612479,18.9445833 8.00490498,19.2111609 C8.27354347,19.4777385 8.27354347,19.9099252 8.00490498,20.1765497 L7.01386949,21.160078 C8.44796715,22.0922041 10.1613427,22.6346745 12,22.6346745 L12,22.6346745 C13.8583409,22.6346745 15.5887033,22.0805272 17.0320921,21.1300078 L16.0701299,20.1765497 C15.8014914,19.909972 15.8014914,19.4777854 16.0701299,19.2111609 C16.3388156,18.9445833 16.774249,18.9445833 17.042982,19.2111609 L18.1252566,20.2856043 C18.4481451,19.9948825 18.7500205,19.681572 19.0283219,19.3482139 L19.1828304,19.1579915 C20.2466397,17.8119151 20.9351906,16.1605635 21.0907063,14.3605101 L21.1032907,14.1976527 L21.1032907,14.1976527 L19.4302507,14.1977635 C19.0504157,14.1977635 18.7423813,13.8921391 18.7423813,13.5151711 C18.7423813,13.1381562 19.0504157,12.8325787 19.4302507,12.8325787 L21.0934057,12.8322227 C20.9067892,10.5787961 19.8849698,8.55653016 18.3366017,7.07169263 L17.0430292,8.35607798 C16.9085919,8.48943709 16.732633,8.55604633 16.5565323,8.55604633 C16.3804317,8.55604633 16.2044728,8.48943709 16.0701299,8.35612485 C15.8014914,8.08954725 15.8014914,7.65736059 16.0701299,7.39068924 L17.2742569,6.19598696 C16.1894526,5.4308071 14.9295636,4.89482891 13.5669368,4.65983993 C13.5528409,4.65615858 13.538853,4.65380129 13.5248569,4.65147595 L13.5669368,4.65983993 C13.4834378,4.64544029 13.3995531,4.63217086 13.3152992,4.62004816 L13.5248569,4.65147595 C13.4243139,4.63477151 13.3233471,4.61971567 13.2219896,4.60632197 L13.3152992,4.62004816 C13.1723723,4.59948341 13.0283832,4.58221861 12.8834131,4.56833442 C12.8374466,4.56355426 12.7909906,4.55949885 12.7444647,4.55579028 L12.8834131,4.56833442 C12.7886701,4.55926062 12.6935082,4.5516307 12.5979499,4.54546716 L12.7444647,4.55579028 C12.6381278,4.54731418 12.5314263,4.5406499 12.4243976,4.53581255 L12.5979499,4.54546716 C12.5053597,4.53949506 12.4123973,4.53489967 12.3190836,4.53170146 L12.4243976,4.53581255 C12.2834709,4.52944313 12.1419768,4.52624116 12,4.52624116 Z M12.2098775,18.4456908 C12.3524617,18.4551964 12.4902931,18.464702 12.6328773,18.4884661 C12.6851582,18.4932189 12.7421919,18.5074773 12.7944727,18.5169829 C12.8039783,18.5169829 12.813484,18.5169829 12.8229896,18.5217357 C12.8990345,18.5692638 12.984585,18.5740166 13.0701355,18.5930278 C13.0938996,18.5977806 13.1224164,18.6025334 13.1509332,18.612039 C13.1746973,18.6215447 13.1984613,18.6310503 13.2174725,18.6500615 C13.2364838,18.6690727 13.255495,18.6833311 13.2887647,18.688084 C13.3172815,18.6928368 13.3362927,18.7213536 13.3362927,18.7546232 C13.3362927,18.7831401 13.3315399,18.8116569 13.3267871,18.835421 C13.3077759,18.9304771 13.2887647,19.030286 13.2650006,19.1253422 C13.2602478,19.153859 13.2507422,19.1823759 13.2412366,19.2108927 C13.2174725,19.277432 13.2127197,19.3487241 13.1937085,19.4152634 C13.1794501,19.4532859 13.1746973,19.4960611 13.1556861,19.5340836 C13.1414276,19.5673532 13.131922,19.6006229 13.1034052,19.6386453 C13.0891468,19.6529038 13.084394,19.6766678 13.0796411,19.7004318 C13.0606299,19.7527127 13.0321131,19.7717239 12.9750794,19.7622183 L12.9750794,19.7622183 L12.960821,19.7622183 C12.8562592,19.7384543 12.7564503,19.7194431 12.6566413,19.6909262 C12.5473268,19.6624094 12.4380122,19.6529038 12.3286977,19.6576566 C12.3001808,19.6576566 12.271664,19.6671622 12.2431471,19.6766678 C12.2051247,19.6909262 12.1956191,19.7194431 12.1956191,19.7574655 C12.1956191,19.7764767 12.2003719,19.7907352 12.2193831,19.795488 C12.2811696,19.8287576 12.3382033,19.8620273 12.419001,19.8762857 C12.442765,19.8810385 12.4617762,19.8952969 12.4807875,19.9048025 C12.5045515,19.9190609 12.5235627,19.9285666 12.542574,19.9380722 C12.689911,20.0093643 12.8467536,20.0711508 12.9798322,20.1709597 C13.084394,20.2422518 13.1604389,20.3325551 13.2032141,20.4513753 L13.2032141,20.4513753 L13.3077759,20.7745662 C13.3410455,20.8933864 13.3362927,21.0217122 13.3315399,21.1452851 C13.3267871,21.2403413 13.3125287,21.3401502 13.279259,21.4304535 C13.2745062,21.4352064 13.2745062,21.4399592 13.2745062,21.4494648 C13.2840118,21.5587793 13.2507422,21.6585883 13.1889557,21.7441388 C13.084394,21.8962286 12.9513154,22.0293072 12.7897199,22.1291162 C12.6851582,22.1956555 12.5710908,22.2336779 12.4475178,22.257442 C12.3239448,22.281206 12.1956191,22.3144756 12.0672933,22.3287341 C11.9579787,22.3429925 11.8486642,22.3429925 11.7441024,22.3382397 C11.6157766,22.3239812 11.4922036,22.3002172 11.3638778,22.2764532 C11.3448666,22.2764532 11.3258554,22.2669476 11.3068442,22.2621948 C11.2165408,22.2194195 11.1262375,22.2051611 11.0311814,22.1956555 C10.9076084,22.1766442 10.7887882,22.1481274 10.6652152,22.1243634 C10.6366984,22.1196106 10.6081815,22.0958465 10.6081815,22.0625769 C10.6081815,21.9675207 10.5844175,21.8677118 10.5986759,21.7726556 C10.6129344,21.6015546 10.62244,21.4257007 10.6414512,21.2545997 C10.6509568,21.1642964 10.6747208,21.073993 10.6984849,20.9789369 C10.7127433,20.9219032 10.7507658,20.8981392 10.8125522,20.902892 C10.9028556,20.9123976 10.9931589,20.9171504 11.0787094,20.9314088 C11.188024,20.9456672 11.2925857,20.9599257 11.3971475,20.9931953 C11.4541812,21.0074537 11.5112149,21.0169593 11.5682485,21.0217122 C11.6633047,21.026465 11.753608,21.026465 11.8439113,21.026465 C11.8866866,21.026465 11.9294619,20.9836897 11.9342147,20.9456672 C11.9389675,20.9123976 11.9152034,20.8696223 11.8724282,20.8553639 C11.8391585,20.8458583 11.7963833,20.8363527 11.7583608,20.8315999 C11.7345968,20.8268471 11.7108328,20.8220943 11.6870687,20.8220943 C11.6015182,20.8173415 11.5254733,20.7935774 11.4446756,20.7650606 C11.3638778,20.7317909 11.2783273,20.7127797 11.1975296,20.6795101 C11.088215,20.6414876 10.9884061,20.5797011 10.8981028,20.508409 C10.817305,20.4466225 10.7792826,20.361072 10.7507658,20.2707687 C10.7079905,20.1234316 10.6937321,19.9713418 10.7127433,19.819252 C10.7270017,19.7051846 10.7317545,19.5911173 10.7507658,19.4818027 C10.793541,19.2441624 10.8885972,19.030286 11.0596982,18.859185 C11.2070352,18.711848 11.3876419,18.612039 11.5920126,18.5550054 C11.7060799,18.5217357 11.8249001,18.4932189 11.9437203,18.4694548 C12.0340236,18.4551964 12.124327,18.4551964 12.2098775,18.4456908 Z M14.7328664,9.61765309 C15.1590885,9.61765309 15.5675493,9.84298078 15.7988231,10.2056519 C16.0296718,10.5678544 16.0563136,11.0171504 15.8699625,11.4074308 L14.1147664,15.0838768 C13.9903906,15.3443138 13.7774449,15.5556727 13.5149472,15.6790944 L9.80998461,17.4209191 C9.63676546,17.5022939 9.45419332,17.5435907 9.2670864,17.5435907 C8.84086431,17.5435907 8.43240343,17.3182631 8.20112965,16.9555919 C7.97028099,16.5933895 7.94363916,16.1440935 8.12999028,15.753813 L9.88518638,12.077367 C10.0095622,11.81693 10.2225079,11.6055242 10.4850055,11.4821494 L14.1899681,9.74032473 C14.3631873,9.65894988 14.5457594,9.61765309 14.7328664,9.61765309 Z M14.4894526,11.1101033 L11.1110414,12.6984127 L9.51045294,16.050953 L12.8888641,14.4626436 L14.4894526,11.1101033 Z M13.0226075,6.1644377 C13.0938996,6.1691905 13.1651917,6.1691905 13.2364838,6.1691905 L13.2364838,6.1691905 L13.5121466,6.18344892 C13.5596746,6.18344892 13.5929443,6.21196577 13.5976971,6.26424664 C13.6309667,6.56842629 13.6547308,6.87260593 13.6357196,7.17678557 C13.5976971,7.72335837 13.6262139,8.27468397 13.6167083,8.82125677 C13.6167083,9.03513308 13.6214611,9.24900939 13.6452252,9.46763851 L13.6452252,9.46763851 L13.6452252,9.59121149 C13.6404724,9.6625036 13.6024499,9.69102044 13.5359106,9.68626763 C13.526405,9.68626763 13.5121466,9.69102044 13.502641,9.69102044 C13.4836297,9.69577324 13.4598657,9.70527886 13.4408545,9.70052605 C13.3695624,9.68626763 13.2935175,9.69102044 13.2222254,9.69102044 C13.1414276,9.68626763 13.0606299,9.69577324 12.9798322,9.70052605 C12.837248,9.71003166 12.689911,9.71953728 12.542574,9.72429009 C12.4997987,9.72904289 12.4760347,9.70527886 12.4570234,9.6672564 L12.4570234,9.6672564 L12.271664,9.34881834 C12.1195741,9.07315554 11.9532259,8.81175116 11.8201473,8.52658274 L11.8201473,8.52658274 L11.8011361,8.49331309 L11.8011361,8.53608835 C11.7916305,8.81650396 11.777372,9.09216676 11.7821249,9.37258237 C11.7821249,9.4628857 11.777372,9.55318904 11.7726192,9.64349237 C11.7678664,9.71478447 11.729844,9.75280693 11.6585519,9.76231254 L11.6585519,9.76231254 L11.5112149,9.77657096 C11.4066531,9.78607658 11.3068442,9.76231254 11.2070352,9.75280693 L11.2070352,9.75280693 L10.8077994,9.75280693 C10.7555186,9.75280693 10.6747208,9.78132377 10.6557096,9.72429009 C10.646204,9.70527886 10.6414512,9.69102044 10.646204,9.61972833 C10.646204,9.58170588 10.6509568,9.56269465 10.6509568,9.51991939 L10.6509568,9.51991939 L10.6604624,9.31079588 L10.6794736,8.66441414 C10.6889793,8.33171766 10.7032377,7.99902117 10.6937321,7.66632469 C10.6889793,7.45720118 10.6794736,7.24807768 10.669968,7.04370698 C10.669968,7.03420136 10.669968,7.01994294 10.6652152,7.01043733 C10.6319456,6.81081944 10.6366984,6.60644874 10.6557096,6.40207804 C10.6604624,6.39257243 10.6557096,6.37831401 10.6604624,6.36405559 C10.6604624,6.32603313 10.6984849,6.28801068 10.7365073,6.28325787 C10.769777,6.28325787 10.8077994,6.28801068 10.8410691,6.28801068 L10.8410691,6.28801068 L10.8838443,6.28801068 C11.0216757,6.26424664 11.1595071,6.24048261 11.3020914,6.24523541 L11.3020914,6.24523541 L11.458934,6.2357298 C11.5444845,6.23097699 11.630035,6.22622419 11.7155856,6.22622419 C11.729844,6.22622419 11.7488552,6.23097699 11.7631136,6.24048261 C11.7821249,6.25474103 11.8011361,6.25949384 11.8249001,6.25474103 C11.877181,6.24523541 11.9056978,6.25949384 11.9247091,6.30702191 C11.9864956,6.47812295 12.0767989,6.63971839 12.171855,6.79180821 C12.2478999,6.91538119 12.3001808,7.04370698 12.3477089,7.17678557 C12.3952369,7.29085294 12.4475178,7.4001675 12.5093043,7.50948206 L12.5093043,7.50948206 L12.5235627,7.52849329 C12.5235627,7.52849329 12.5283155,7.52849329 12.5330683,7.52374048 L12.5330683,7.52374048 L12.5330683,7.50472925 C12.5330683,7.28134733 12.5330683,7.0579654 12.5283155,6.83458347 C12.5283155,6.69199927 12.5188099,6.55416787 12.5188099,6.41633646 L12.5188099,6.41633646 L12.5188099,6.38781962 C12.5093043,6.30702191 12.5473268,6.24998822 12.6091133,6.20721296 C12.6328773,6.18344892 12.6613941,6.17394331 12.689911,6.17869612 C12.8039783,6.18344892 12.9132929,6.1644377 13.0226075,6.1644377 Z M12,1.36518483 C11.3691932,1.36518483 10.8560545,1.87443384 10.8560545,2.50035449 C10.8560545,2.7121822 10.9139202,2.91435368 11.0223297,3.09018146 C11.3472278,3.06046277 11.6746768,3.04536905 12,3.04536905 C12.3250871,3.04536905 12.6524415,3.06046277 12.977623,3.09027521 C13.0860798,2.91444743 13.1439455,2.7121822 13.1439455,2.50035449 C13.1439455,1.87438696 12.6308068,1.36518483 12,1.36518483 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"history",icon:["24","24",[],"","M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M12,2.05714286 C6.50871163,2.05714286 2.05714286,6.50871163 2.05714286,12 C2.05714286,17.4912884 6.50871163,21.9428571 12,21.9428571 C17.4912884,21.9428571 21.9428571,17.4912884 21.9428571,12 C21.9428571,6.50871163 17.4912884,2.05714286 12,2.05714286 Z M12,5.82857143 C12.5680643,5.82857143 13.0285714,6.28907854 13.0285714,6.85714286 L13.0285714,11.5739518 L17.0130241,15.5584045 C17.4147062,15.9600866 17.4147062,16.611342 17.0130241,17.0130241 C16.611342,17.4147062 15.9600866,17.4147062 15.5584045,17.0130241 L11.2726902,12.7273098 C11.0797956,12.5344153 10.9714286,12.2727941 10.9714286,12 L10.9714286,6.85714286 C10.9714286,6.28907854 11.4319357,5.82857143 12,5.82857143 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file",icon:["24","24",[],"","M6 4h7l6 5v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm6.586 1H6v14h12V9.414L12.586 5zM13 10h3.5a.5.5 0 1 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 1 1 1 0V10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-pdf",icon:["24","24",[],"","M9.833 15.006c-.328.765-.657 1.316-.997 1.619-.35.312-.762.394-1.138.15a1.345 1.345 0 0 1-.358-.322c-.298-.402-.194-.843.165-1.2.228-.227.563-.433.983-.63.226-.106.466-.204.706-.292.142-.358.286-.762.43-1.205a41.787 41.787 0 0 0 .866-3.123c-.435-.563-.75-1.057-.924-1.473-.28-.67-.211-1.242.372-1.494.56-.24 1.047-.086 1.307.391.17.312.234.736.231 1.26a7.96 7.96 0 0 1-.086 1.088c.158.195.33.398.513.606a30.903 30.903 0 0 0 1.73 1.81 14.011 14.011 0 0 0 .863.761c.464-.07.87-.106 1.213-.105.947.002 1.554.319 1.415 1.079-.107.585-.514.888-1.06.834-.365-.036-.781-.224-1.259-.532a8.753 8.753 0 0 1-.538-.38 21.15 21.15 0 0 0-.944.191c-.39.087-.798.188-1.22.3a45.345 45.345 0 0 0-2.27.667zM6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm4.43 8.39c-.07.21-.138.412-.207.606l.055-.016a46.181 46.181 0 0 1 1.608-.459 33.869 33.869 0 0 1 1.538-.37 15.994 15.994 0 0 1-.378-.35 31.732 31.732 0 0 1-1.882-1.98l-.083.32a38.471 38.471 0 0 1-.652 2.248zm-2.157 2.603c.12-.107.248-.279.382-.51a2.35 2.35 0 0 0-.553.37c-.092.092-.09.086-.083.096a.54.54 0 0 0 .138.116c.017.01.025.01.116-.072zm7.434-2.3c-.047 0-.095 0-.146.002.242.132.443.209.585.223.11.011.118.005.146-.145.005-.027-.095-.079-.585-.08zm-5.36-5.49c.065.156.16.334.283.53v-.05c.003-.393-.044-.696-.128-.85-.046-.086-.063-.091-.23-.02-.04.018-.05.092.075.39z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-img",icon:["24","24",[],"","M5 6v12h14V6H5zm0-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm2.4 10.3a.5.5 0 0 1-.8-.6l3-4a.5.5 0 0 1 .754-.054l.579.58 1.765-2.513a.5.5 0 0 1 .83.015l3.891 6a.5.5 0 0 1-.838.544l-3.49-5.379-1.682 2.394a.5.5 0 0 1-.763.067l-.592-.593L7.4 15.3zm.6-4.8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-ppt",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.07 6.96h1.22c.18 0 .353-.013.52-.04a1.21 1.21 0 0 0 .44-.155.844.844 0 0 0 .305-.325c.077-.14.115-.323.115-.55 0-.227-.038-.41-.115-.55a.844.844 0 0 0-.305-.325 1.21 1.21 0 0 0-.44-.155 3.288 3.288 0 0 0-.52-.04h-1.22v2.14zM9.5 8.6h3.22c.447 0 .827.065 1.14.195.313.13.568.302.765.515.197.213.34.457.43.73a2.715 2.715 0 0 1 0 1.695c-.09.277-.233.522-.43.735a2.133 2.133 0 0 1-.765.515c-.313.13-.693.195-1.14.195h-1.65v2.56H9.5V8.6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-word",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm8.77 10.74h-1.56L12 10.88h-.02l-1.19 4.86H9.2L7.31 8.6h1.57l1.13 4.86h.02l1.24-4.86h1.47l1.22 4.92h.02l1.17-4.92h1.54l-1.92 7.14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-zip",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5 0h1v1h-1V5zm1 1h1v1h-1V6zm-1 1h1v1h-1V7zm1 1h1v1h-1V8zm-1 1h1v1h-1V9zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-excel",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.09 7l-2.3-3.4h1.82l1.4 2.28 1.45-2.28h1.72l-2.29 3.41 2.49 3.73h-1.87l-1.56-2.47-1.59 2.47H8.6L11.09 12z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-240",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm1 4.818C4 9.644 4.94 8.8 6.261 8.8c1.272 0 2.182.777 2.182 1.81 0 .76-.45 1.334-1.285 2.178L5.58 14.347v.022h2.96v.932H4.062v-.769L6.407 12.2c.724-.737.923-1.064.923-1.54 0-.526-.473-.946-1.104-.946-.663 0-1.157.468-1.157 1.1v.017H4v-.013zm8.426 4.483v-1.206h-3.18v-.98c.553-1.043 1.264-2.178 2.646-4.187h1.62v4.235h.857v.932h-.856v1.206h-1.087zm-2.146-2.142v.03h2.164V9.773h-.018c-1.029 1.492-1.638 2.433-2.146 3.387zm7.234 2.27c-1.564 0-2.496-1.277-2.496-3.321 0-2.036.941-3.308 2.496-3.308 1.55 0 2.486 1.263 2.486 3.303s-.927 3.326-2.486 3.326zm0-.932c.843 0 1.333-.888 1.333-2.39 0-1.488-.499-2.375-1.333-2.375-.84 0-1.347.896-1.347 2.371 0 1.502.499 2.394 1.347 2.394z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-480",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm3.964 9.269v-1.2H3.8v-.976c.55-1.037 1.257-2.166 2.632-4.166h1.613v4.215h.853v.927h-.853v1.2h-1.08zm-2.136-2.132v.031h2.154V9.767h-.018c-1.024 1.485-1.63 2.421-2.136 3.37zm7.185 2.26c-1.467 0-2.47-.761-2.47-1.842 0-.822.58-1.468 1.442-1.63v-.022c-.72-.185-1.19-.743-1.19-1.433 0-.962.926-1.67 2.218-1.67 1.297 0 2.215.703 2.215 1.674 0 .681-.466 1.235-1.186 1.429v.022c.861.167 1.446.813 1.446 1.63 0 1.085-1.016 1.841-2.475 1.841zm0-.867c.76 0 1.297-.448 1.297-1.059 0-.62-.536-1.063-1.297-1.063-.76 0-1.296.448-1.296 1.063 0 .611.536 1.06 1.296 1.06zm0-2.988c.638 0 1.095-.395 1.095-.94 0-.55-.453-.945-1.095-.945-.646 0-1.098.395-1.098.945 0 .545.452.94 1.098.94zm5.709 3.854c-1.556 0-2.483-1.27-2.483-3.304 0-2.026.936-3.292 2.483-3.292 1.542 0 2.474 1.257 2.474 3.287 0 2.03-.923 3.31-2.474 3.31zm0-.927c.84 0 1.327-.883 1.327-2.377 0-1.481-.497-2.365-1.327-2.365-.835 0-1.34.892-1.34 2.36 0 1.494.496 2.382 1.34 2.382z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-hd",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm2 2.25h1.31v2.976h3.406V8.25h1.31v7.482h-1.31v-3.374H6.31v3.374H5V8.25zm7.597 0H15.7c.573 0 1.069.098 1.488.293.42.196.762.463 1.027.802.266.339.463.735.592 1.19.13.454.194.939.194 1.456a5.3 5.3 0 0 1-.194 1.457 3.43 3.43 0 0 1-.592 1.189 2.765 2.765 0 0 1-1.027.802c-.419.195-.915.293-1.488.293h-3.102V8.25zm1.31 6.413h1.29c.51 0 .927-.068 1.251-.204.325-.136.58-.325.765-.566.185-.241.311-.524.378-.849.066-.325.1-.676.1-1.053 0-.377-.034-.728-.1-1.053a2.043 2.043 0 0 0-.378-.849 1.832 1.832 0 0 0-.765-.566c-.324-.136-.742-.204-1.252-.204h-1.289v5.344z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm5.486 9.759c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C6.635 8.337 7.548 8 8.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397zm7 0c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C13.635 8.337 14.548 8 15.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397z"]}},function(e,t){e.exports={prefix:"cv",iconName:"contract",icon:["24","24",[],"","M8.5 8.5V5H10v5H5V8.5h3.5zm0 7H5V14h5v5H8.5v-3.5zm7-7H19V10h-5V5h1.5v3.5zm0 7V19H14v-5h5v1.5h-3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"full-screen",icon:["24","24",[],"","M6.5 6.5V10H5V5h5v1.5H6.5zm0 11H10V19H5v-5h1.5v3.5zm11-11H14V5h5v5h-1.5V6.5zm0 11V14H19v5h-5v-1.5h3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"mute",icon:["24","24",[],"","M16.733 12.018l-1.57-1.57a.555.555 0 1 1 .785-.785l1.57 1.57 1.57-1.57a.555.555 0 1 1 .785.785l-1.57 1.57 1.57 1.57a.555.555 0 1 1-.785.785l-1.57-1.57-1.57 1.57a.555.555 0 1 1-.785-.785l1.57-1.57zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"next",icon:["24","24",[],"","M16 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11zm-10.86.005a.5.5 0 0 1 .761-.427l9.003 5.5a.5.5 0 0 1 0 .853l-9.003 5.5a.5.5 0 0 1-.76-.426v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play",icon:["24","24",[],"","M7.5 6.505v11l9.002-5.5-9.002-5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play-circle",icon:["24","24",[],"","M0,12 C0,5.372583 5.372583,0 12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 Z M23,12 C23,5.92486775 18.0751322,1 12,1 C5.92486775,1 1,5.92486775 1,12 C1,18.0751322 5.92486775,23 12,23 C18.0751322,23 23,18.0751322 23,12 Z M9,7.49836245 C9,6.94698209 9.38671875,6.74169922 9.84669815,7.02918634 L17.1533018,11.5958137 C17.6209203,11.8880752 17.6132812,12.3666992 17.1533018,12.6541863 L9.84669815,17.2208137 C9.37907967,17.5130752 9,17.2950531 9,16.7516375 L9,7.49836245 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"pause",icon:["24","24",[],"","M8 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 8 17.5v-11zm6 0c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"previous",icon:["24","24",[],"","M5 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 5 17.5v-11zm13.602.005v11a.5.5 0 0 1-.76.426l-9.003-5.5a.5.5 0 0 1 0-.853l9.002-5.5a.5.5 0 0 1 .761.427z"]}},function(e,t){e.exports={prefix:"cv",iconName:"volume",icon:["24","24",[],"","M15.8 11.25c-.137-.815-.44-1.549-.727-2.009a.48.48 0 0 1 .167-.67.507.507 0 0 1 .687.163c.35.56.7 1.41.86 2.359.24 1.439.001 2.866-.866 4.183a.508.508 0 0 1-.691.147.48.48 0 0 1-.15-.674c.724-1.1.922-2.285.72-3.5zm1.86 5.959c1.856-3.7 1.676-7.108 0-10.416a.558.558 0 0 1 .201-.728.483.483 0 0 1 .678.215c1.828 3.61 2.028 7.398.001 11.438a.483.483 0 0 1-.677.218.557.557 0 0 1-.203-.727zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm3.186 5.646l-4.723 5.18-1.683-1.615a.772.772 0 0 0-1.06 0 .7.7 0 0 0 0 1.018l2.25 2.16a.771.771 0 0 0 1.094-.035l5.25-5.76a.7.7 0 0 0-.07-1.016.772.772 0 0 0-1.058.068z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle-o",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm0 1.212a7.737 7.737 0 0 0-5.508 2.28A7.737 7.737 0 0 0 4.212 12c0 2.081.809 4.037 2.28 5.508A7.737 7.737 0 0 0 12 19.788a7.737 7.737 0 0 0 5.508-2.28A7.737 7.737 0 0 0 19.788 12a7.737 7.737 0 0 0-2.28-5.508A7.737 7.737 0 0 0 12 4.212zm3.186 4.434a.772.772 0 0 1 1.058-.068.7.7 0 0 1 .07 1.016l-5.25 5.76a.771.771 0 0 1-1.094.035l-2.25-2.16a.7.7 0 0 1 0-1.018.772.772 0 0 1 1.06 0l1.683 1.616 4.723-5.181z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check",icon:["24","24",[],"","M16.247 7.341a1 1 0 0 1 1.506 1.318l-7 8a1 1 0 0 1-1.46.048l-3-3a1 1 0 0 1 1.414-1.414l2.244 2.244 6.296-7.196z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption-badge",icon:["24","24",[],"","M7.5 5A2.5 2.5 0 0 0 5 7.5v9A2.5 2.5 0 0 0 7.5 19h9a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16.5 5h-9zm0-1h9A3.5 3.5 0 0 1 20 7.5v9a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-9A3.5 3.5 0 0 1 7.5 4zM11 9a.5.5 0 1 1 0 1H9.5A1.5 1.5 0 0 0 8 11.5v1A1.5 1.5 0 0 0 9.5 14H11a.5.5 0 1 1 0 1H9.5A2.5 2.5 0 0 1 7 12.5v-1A2.5 2.5 0 0 1 9.5 9H11zm5 0a.5.5 0 1 1 0 1h-1.5a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 1.5 1.5H16a.5.5 0 1 1 0 1h-1.5a2.5 2.5 0 0 1-2.5-2.5v-1A2.5 2.5 0 0 1 14.5 9H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"question",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zM8.142 9.17c0 .247.103.476.309.687.206.212.46.318.76.318.508 0 .854-.303 1.036-.908.193-.579.428-1.017.707-1.314.278-.297.712-.446 1.302-.446.503 0 .914.147 1.233.442.319.294.478.656.478 1.085 0 .22-.052.423-.157.61a2.305 2.305 0 0 1-.385.51c-.153.153-.4.38-.744.68-.39.342-.701.638-.932.887-.23.25-.415.539-.554.868-.14.33-.209.72-.209 1.17 0 .358.095.629.285.81.19.183.425.274.703.274.536 0 .855-.279.956-.836a12.2 12.2 0 0 1 .133-.55c.03-.104.071-.209.125-.313.053-.105.135-.22.245-.346.11-.126.255-.272.438-.438a48.078 48.078 0 0 0 1.37-1.257c.254-.25.474-.545.658-.888.185-.343.278-.742.278-1.197a2.87 2.87 0 0 0-.486-1.608c-.325-.492-.784-.882-1.378-1.169-.595-.286-1.28-.43-2.057-.43-.836 0-1.567.172-2.194.515s-1.104.775-1.43 1.297c-.327.523-.49 1.038-.49 1.547zm3.868 9.579c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797a1.073 1.073 0 0 0-.793-.324c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"info",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zm-10-.38V15a2.5 2.5 0 0 0 2.5 2.5h.75a1 1 0 0 0 0-2h-.75a.5.5 0 0 1-.5-.5v-3.75a1.75 1.75 0 0 0-1.75-1.75h-.75a1 1 0 1 0 0 2h.5zm.636-3.25c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797A1.073 1.073 0 0 0 11.636 6c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"lock",icon:["24","24",[],"","M7.01 9.5C7.156 5.97 8.87 4 12 4s4.844 1.97 4.99 5.5h1.51a.5.5 0 0 1 .5.5v9.5a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5V10a.5.5 0 0 1 .5-.5h1.51zm2 0h5.98C14.88 7.037 13.932 6 12 6c-1.933 0-2.88 1.037-2.99 3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"verified",icon:["24","24",[],"","M10.407 12.368l-1.22-1.22a.49.49 0 0 0-.698.004l-.583.583a.494.494 0 0 0-.004.697l2.135 2.135c.107.108.25.154.388.142a.488.488 0 0 0 .352-.143l4.362-4.362a.494.494 0 0 0-.004-.698l-.582-.582a.495.495 0 0 0-.698-.004l-3.448 3.448zm7.922-.37l1.437 1.406c.208.194.277.437.208.728a.716.716 0 0 1-.541.531l-1.957.5.551 1.936a.671.671 0 0 1-.197.729.671.671 0 0 1-.73.198l-1.935-.552-.5 1.957a.716.716 0 0 1-.53.541 1.28 1.28 0 0 1-.199.021.686.686 0 0 1-.53-.229L12 18.328l-1.405 1.436c-.195.208-.437.278-.729.208a.696.696 0 0 1-.53-.541l-.5-1.957-1.937.552a.671.671 0 0 1-.728-.198.671.671 0 0 1-.198-.729l.551-1.936-1.957-.5a.716.716 0 0 1-.54-.53c-.07-.292 0-.535.207-.73l1.437-1.405-1.437-1.405c-.208-.194-.277-.437-.208-.729a.716.716 0 0 1 .541-.53l1.957-.5-.551-1.936a.671.671 0 0 1 .198-.73.671.671 0 0 1 .728-.197l1.936.552.5-1.957a.675.675 0 0 1 .531-.531.671.671 0 0 1 .729.198L12 5.68l1.405-1.447a.697.697 0 0 1 .73-.198c.284.07.46.246.53.53l.5 1.958L17.1 5.97a.671.671 0 0 1 .729.198.671.671 0 0 1 .197.729l-.551 1.936 1.957.5a.715.715 0 0 1 .541.53c.07.292 0 .535-.208.73l-1.437 1.404z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning-o",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 5L3.5 19h17L12 5zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm.75-3.677a.689.689 0 0 1-.7.677.689.689 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677.387 0 .7.303.7.677v5.646z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm.75-3.677V8.677a.689.689 0 0 0-.7-.677c-.387 0-.7.303-.7.677v5.646c0 .374.313.677.7.677.387 0 .7-.303.7-.677z"]}},function(e,t,n){const{noopTest:r,edit:i,merge:a}=n(13),o={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};o.def=i(o.def).replace("label",o._label).replace("title",o._title).getRegex(),o.bullet=/(?:[*+-]|\d{1,9}\.)/,o.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,o.item=i(o.item,"gm").replace(/bull/g,o.bullet).getRegex(),o.list=i(o.list).replace(/bull/g,o.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+o.def.source+")").getRegex(),o._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",o._comment=/<!--(?!-?>)[\s\S]*?-->/,o.html=i(o.html,"i").replace("comment",o._comment).replace("tag",o._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),o.paragraph=i(o._paragraph).replace("hr",o.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",o._tag).getRegex(),o.blockquote=i(o.blockquote).replace("paragraph",o.paragraph).getRegex(),o.normal=a({},o),o.gfm=a({},o.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),o.pedantic=a({},o.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",o._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:i(o.normal._paragraph).replace("hr",o.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",o.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const s={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~"};s.em=i(s.em).replace(/punctuation/g,s._punctuation).getRegex(),s._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,s._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,s._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,s.autolink=i(s.autolink).replace("scheme",s._scheme).replace("email",s._email).getRegex(),s._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,s.tag=i(s.tag).replace("comment",o._comment).replace("attribute",s._attribute).getRegex(),s._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,s._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,s._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,s.link=i(s.link).replace("label",s._label).replace("href",s._href).replace("title",s._title).getRegex(),s.reflink=i(s.reflink).replace("label",s._label).getRegex(),s.normal=a({},s),s.pedantic=a({},s.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",s._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",s._label).getRegex()}),s.gfm=a({},s.normal,{escape:i(s.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),s.gfm.url=i(s.gfm.url,"i").replace("email",s.gfm._extended_email).getRegex(),s.breaks=a({},s.gfm,{br:i(s.br).replace("{2,}","*").getRegex(),text:i(s.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:o,inline:s}},function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(28),{defaults:i}=n(17),{inline:a}=n(117),{findClosingBracket:o,escape:s}=n(13);e.exports=class e{constructor(e,t){if(this.options=t||i,this.links=e,this.rules=a.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=a.pedantic:this.options.gfm&&(this.options.breaks?this.rules=a.breaks:this.rules=a.gfm)}static get rules(){return a}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,i,a,c,l,u="";for(;t;)if(c=this.rules.escape.exec(t))t=t.substring(c[0].length),u+=s(c[1]);else if(c=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(c[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(c[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(c[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(c[0])&&(this.inRawBlock=!1),t=t.substring(c[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0];else if(c=this.rules.link.exec(t)){const r=o(c[2],"()");if(r>-1){const e=(0===c[0].indexOf("!")?5:4)+c[1].length+r;c[2]=c[2].substring(0,r),c[0]=c[0].substring(0,e).trim(),c[3]=""}t=t.substring(c[0].length),this.inLink=!0,i=c[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),n?(i=n[1],a=n[3]):a=""):a=c[3]?c[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(c,{href:e.escapes(i),title:e.escapes(a)}),this.inLink=!1}else if((c=this.rules.reflink.exec(t))||(c=this.rules.nolink.exec(t))){if(t=t.substring(c[0].length),n=(c[2]||c[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){u+=c[0].charAt(0),t=c[0].substring(1)+t;continue}this.inLink=!0,u+=this.outputLink(c,n),this.inLink=!1}else if(c=this.rules.strong.exec(t))t=t.substring(c[0].length),u+=this.renderer.strong(this.output(c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.em.exec(t))t=t.substring(c[0].length),u+=this.renderer.em(this.output(c[6]||c[5]||c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.code.exec(t))t=t.substring(c[0].length),u+=this.renderer.codespan(s(c[2].trim(),!0));else if(c=this.rules.br.exec(t))t=t.substring(c[0].length),u+=this.renderer.br();else if(c=this.rules.del.exec(t))t=t.substring(c[0].length),u+=this.renderer.del(this.output(c[1]));else if(c=this.rules.autolink.exec(t))t=t.substring(c[0].length),"@"===c[2]?(r=s(this.mangle(c[1])),i="mailto:"+r):(r=s(c[1]),i=r),u+=this.renderer.link(i,null,r);else if(this.inLink||!(c=this.rules.url.exec(t))){if(c=this.rules.text.exec(t))t=t.substring(c[0].length),this.inRawBlock?u+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]):u+=this.renderer.text(s(this.smartypants(c[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===c[2])r=s(c[0]),i="mailto:"+r;else{do{l=c[0],c[0]=this.rules._backpedal.exec(c[0])[0]}while(l!==c[0]);r=s(c[0]),i="www."===c[1]?"http://"+r:r}t=t.substring(c[0].length),u+=this.renderer.link(i,null,r)}return u}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",i=0;for(;i<t;i++)n=e.charCodeAt(i),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},function(e,t,n){var r=n(162);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){"use strict";(function(e){var r=n(6),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(26)(e))},function(e,t){e.exports=f},function(e,t,n){"use strict";e.exports=n(167).default},function(e,t){e.exports=d},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e,t,n){const r=n(180),i=n(181),a=n(28),o=n(120),s=n(119),c=n(118),{merge:l,checkSanitizeDeprecation:u,escape:p}=n(13),{getDefaults:f,changeDefaults:d,defaults:m}=n(17);function h(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=l({},h.defaults,t||{}),u(t);const a=t.highlight;let o,s,c=0;try{o=r.lex(e,t)}catch(e){return n(e)}s=o.length;const p=function(e){if(e)return t.highlight=a,n(e);let r;try{r=i.parse(o,t)}catch(t){e=t}return t.highlight=a,e?n(e):n(null,r)};if(!a||a.length<3)return p();if(delete t.highlight,!s)return p();for(;c<o.length;c++)!function(e){"code"!==e.type?--s||p():a(e.text,e.lang,(function(t,n){return t?p(t):null==n||n===e.text?--s||p():(e.text=n,e.escaped=!0,void(--s||p()))}))}(o[c])}else try{return t=l({},h.defaults,t||{}),u(t),i.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||h.defaults).silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}h.options=h.setOptions=function(e){return l(h.defaults,e),d(h.defaults),h},h.getDefaults=f,h.defaults=m,h.Parser=i,h.parser=i.parse,h.Renderer=a,h.TextRenderer=o,h.Lexer=r,h.lexer=r.lex,h.InlineLexer=s,h.inlineLexer=s.output,h.Slugger=c,h.parse=h,e.exports=h},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t){e.exports=m},function(e,t,n){"use strict";
|
|
2
|
+
/** @license React v0.17.0
|
|
3
|
+
* scheduler.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var r,i,a,o,s;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,l=null,u=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(u,0),e}},p=Date.now();t.unstable_now=function(){return Date.now()-p},r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(u,0))},i=function(e,t){l=setTimeout(e,t)},a=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,m=window.setTimeout,h=window.clearTimeout,y=window.requestAnimationFrame,g=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var b=!1,S=null,E=-1,C=5,O=0;o=function(){return t.unstable_now()>=O},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):C=0<e?Math.floor(1e3/e):33.33};var j=new MessageChannel,I=j.port2;j.port1.onmessage=function(){if(null!==S){var e=t.unstable_now();O=e+C;try{S(!0,e)?I.postMessage(null):(b=!1,S=null)}catch(e){throw I.postMessage(null),e}}else b=!1},r=function(e){S=e,b||(b=!0,I.postMessage(null))},i=function(e,n){E=m((function(){e(t.unstable_now())}),n)},a=function(){h(E),E=-1}}function A(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(!(void 0!==i&&0<k(i,t)))break e;e[r]=t,e[n]=i,n=r}}function T(e){return void 0===(e=e[0])?null:e}function w(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,c=e[s];if(void 0!==o&&0>k(o,n))void 0!==c&&0>k(c,o)?(e[r]=c,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==c&&0>k(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var L=[],x=[],P=1,N=null,_=3,D=!1,R=!1,F=!1;function M(e){for(var t=T(x);null!==t;){if(null===t.callback)w(x);else{if(!(t.startTime<=e))break;w(x),t.sortIndex=t.expirationTime,A(L,t)}t=T(x)}}function U(e){if(F=!1,M(e),!R)if(null!==T(L))R=!0,r(V);else{var t=T(x);null!==t&&i(U,t.startTime-e)}}function V(e,n){R=!1,F&&(F=!1,a()),D=!0;var r=_;try{for(M(n),N=T(L);null!==N&&(!(N.expirationTime>n)||e&&!o());){var s=N.callback;if(null!==s){N.callback=null,_=N.priorityLevel;var c=s(N.expirationTime<=n);n=t.unstable_now(),"function"==typeof c?N.callback=c:N===T(L)&&w(L),M(n)}else w(L);N=T(L)}if(null!==N)var l=!0;else{var u=T(x);null!==u&&i(U,u.startTime-n),l=!1}return l}finally{N=null,_=r,D=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=s;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=_;_=e;try{return t()}finally{_=n}},t.unstable_next=function(e){switch(_){case 1:case 2:case 3:var t=3;break;default:t=_}var n=_;_=t;try{return e()}finally{_=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var c=o.delay;c="number"==typeof c&&0<c?s+c:s,o="number"==typeof o.timeout?o.timeout:z(e)}else o=z(e),c=s;return e={id:P++,callback:n,priorityLevel:e,startTime:c,expirationTime:o=c+o,sortIndex:-1},c>s?(e.sortIndex=c,A(x,e),null===T(L)&&e===T(x)&&(F?a():F=!0,i(U,c-s))):(e.sortIndex=o,A(L,e),R||D||(R=!0,r(V))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=_;return function(){var n=_;_=t;try{return e.apply(this,arguments)}finally{_=n}}},t.unstable_getCurrentPriorityLevel=function(){return _},t.unstable_shouldYield=function(){var e=t.unstable_now();M(e);var n=T(L);return n!==N&&null!==N&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<N.expirationTime||o()},t.unstable_requestPaint=B,t.unstable_continueExecution=function(){R||D||(R=!0,r(V))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return T(L)},t.unstable_Profiling=null},function(e,t,n){"use strict";e.exports=n(165)},function(e,t,n){"use strict";
|
|
10
|
+
/** @license React v16.13.1
|
|
11
|
+
* react-is.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,S=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case f:case o:case c:case s:case m:return e;default:switch(e=e&&e.$$typeof){case u:case d:case g:case y:case l:return e;default:return t}}case a:return t}}}function O(e){return C(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=i,t.ForwardRef=d,t.Fragment=o,t.Lazy=g,t.Memo=y,t.Portal=a,t.Profiler=c,t.StrictMode=s,t.Suspense=m,t.isAsyncMode=function(e){return O(e)||C(e)===p},t.isConcurrentMode=O,t.isContextConsumer=function(e){return C(e)===u},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return C(e)===d},t.isFragment=function(e){return C(e)===o},t.isLazy=function(e){return C(e)===g},t.isMemo=function(e){return C(e)===y},t.isPortal=function(e){return C(e)===a},t.isProfiler=function(e){return C(e)===c},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===f||e===c||e===s||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===y||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===b||e.$$typeof===S||e.$$typeof===E||e.$$typeof===v)},t.typeOf=C},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=p(a),s=p(n(16)),c=p(n(170)),l=p(n(171)),u=n(179);function p(e){return e&&e.__esModule?e:{default:e}}var f=function(){return!0},d=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return m.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,c.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,i=n.onSuggestionHighlighted,a=n.highlightFirstSuggestion;if(!(0,c.default)(r,e.suggestions)&&r.length>0&&a)this.highlightFirstSuggestion();else if(i){var o=this.getHighlightedSuggestion();o!=t.highlightedSuggestion&&i({suggestion:o})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(i){var a=i.valueBeforeUpDown;return null===t?a=null:null===a&&void 0!==n&&(a=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:a}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,i=n.multiSection,a=n.getSectionSuggestions;return i?a(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,i=r.value,a=r.onChange;t!==i&&a(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,i=n.value;return t.length>0&&r(i)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,a=t.onSuggestionsFetchRequested,s=t.renderSuggestion,c=t.inputProps,p=t.multiSection,d=t.renderSectionTitle,m=t.id,h=t.getSectionSuggestions,y=t.theme,g=t.getSuggestionValue,v=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,S=this.state,E=S.isFocused,C=S.isCollapsed,O=S.highlightedSectionIndex,j=S.highlightedSuggestionIndex,I=S.valueBeforeUpDown,A=v?f:this.props.shouldRenderSuggestions,T=c.value,w=c.onFocus,k=c.onKeyDown,L=this.willRenderSuggestions(this.props),x=v||E&&!C&&L,P=x?n:[],N=r({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=A(T);e.setState({isFocused:!0,isCollapsed:!n}),w&&w(t),n&&a({value:T,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,i=A(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},b?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!i})),i?a({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var i=t.keyCode;switch(i){case 40:case 38:if(C)A(T)&&(a({value:T,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var o=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex,c=void 0;c=null===s?null===I?T:I:e.getSuggestionValueByIndex(o,s),e.updateHighlightedSuggestion(o,s,T),e.maybeCallOnChange(t,c,40===i?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var l=e.getHighlightedSuggestion();if(x&&!v&&e.closeSuggestions(),null!=l){var u=g(l);e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:u,suggestionIndex:j,sectionIndex:O,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:x&&t.preventDefault();var p=x&&!v;if(null===I){if(!p){e.maybeCallOnChange(t,"","escape"),A("")?a({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,I,"escape");p?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}k&&k(t)}}),_={query:this.getQuery()};return o.default.createElement(l.default,{multiSection:p,items:P,renderInputComponent:i,renderItemsContainer:this.renderSuggestionsContainer,renderItem:s,renderItemData:_,renderSectionTitle:d,getSectionItems:h,highlightedSectionIndex:O,highlightedItemIndex:j,inputProps:N,itemProps:this.itemProps,theme:(0,u.mapToAutowhateverTheme)(y),id:m,ref:this.storeAutowhateverRef})}}]),t}(a.Component);d.propTypes={suggestions:s.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:s.default.func,onSuggestionHighlighted:s.default.func,renderInputComponent:s.default.func,renderSuggestionsContainer:s.default.func,getSuggestionValue:s.default.func.isRequired,renderSuggestion:s.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:s.default.func,alwaysRenderSuggestions:s.default.bool,multiSection:s.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:s.default.bool,highlightFirstSuggestion:s.default.bool,theme:s.default.object,id:s.default.string},d.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return o.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:u.defaultTheme,id:"1"};var m=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,i=n.itemIndex;e.updateHighlightedSuggestion(r,i),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,i=r.alwaysRenderSuggestions,a=r.onSuggestionSelected,o=r.onSuggestionsFetchRequested;a&&a(t,n),i?o({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,i=n.focusInputOnSuggestionClick,a=e.getSuggestionIndices(e.findSuggestionElement(t.target)),o=a.sectionIndex,s=a.suggestionIndex,c=e.getSuggestion(o,s),l=e.props.getSuggestionValue(c);e.maybeCallOnChange(t,l,"click"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:l,suggestionIndex:s,sectionIndex:o,method:"click"}),r||e.closeSuggestions(),!0===i?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,i=n.value,a=n.onBlur,o=e.getHighlightedSuggestion(),s=r(i);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),a&&a(e.blurEvent,{highlightedSuggestion:o})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=d},function(e,t,n){"use strict";var r=n(169);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";e.exports=n(172).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=d(o),c=d(n(16)),l=d(n(173)),u=d(n(174)),p=d(n(176)),f=d(n(177));function d(e){return e&&e.__esModule?e:{default:e}}var m={},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,a=t.highlightedSectionIndex,o=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var s="ArrowDown"===e.key?"next":"prev",c=n.sectionIterator[s]([a,o]),l=i(c,2),u=l[0],p=l[1];r.onKeyDown(e,{newHighlightedSectionIndex:u,newHighlightedItemIndex:p});break;default:r.onKeyDown(e,{highlightedSectionIndex:a,highlightedItemIndex:o})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,l.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,i=n.items,a=n.renderItem,o=n.renderItemData,c=n.renderSectionTitle,l=n.highlightedSectionIndex,u=n.highlightedItemIndex,d=n.itemProps;return i.map((function(n,i){var m="react-autowhatever-"+r+"-",h=m+"section-"+i+"-",y=0===i;return s.default.createElement("div",t(h+"container","sectionContainer",y&&"sectionContainerFirst"),s.default.createElement(p.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:h}),s.default.createElement(f.default,{items:e.sectionsItems[i],itemProps:d,renderItem:a,renderItemData:o,sectionIndex:i,highlightedItemIndex:l===i?u:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:m,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,i=n.renderItem,a=n.renderItemData,o=n.highlightedSectionIndex,c=n.highlightedItemIndex,l=n.itemProps;return s.default.createElement(f.default,{items:e,itemProps:l,renderItem:i,renderItemData:a,highlightedItemIndex:null===o?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,i=t.multiSection,a=t.renderInputComponent,o=t.renderItemsContainer,c=t.highlightedSectionIndex,l=t.highlightedItemIndex,u=this.state.isInputFocused,p=i?this.renderSections():this.renderItems(),f=null!==p,d=this.getItemId(c,l),m="react-autowhatever-"+n,h=r({role:"combobox","aria-haspopup":"listbox","aria-owns":m,"aria-expanded":f},e("react-autowhatever-"+n+"-container","container",f&&"containerOpen"),this.props.containerProps),y=a(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":d},e("react-autowhatever-"+n+"-input","input",f&&"inputOpen",u&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),g=o({containerProps:r({id:m,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:p});return s.default.createElement("div",h,y,g)}}]),t}(o.Component);h.propTypes={id:c.default.string,multiSection:c.default.bool,renderInputComponent:c.default.func,renderItemsContainer:c.default.func,items:c.default.array.isRequired,renderItem:c.default.func,renderItemData:c.default.object,renderSectionTitle:c.default.func,getSectionItems:c.default.func,containerProps:c.default.object,inputProps:c.default.object,itemProps:c.default.oneOfType([c.default.object,c.default.func]),highlightedSectionIndex:c.default.number,highlightedItemIndex:c.default.number,theme:c.default.oneOfType([c.default.object,c.default.array])},h.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return s.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return s.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:m,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:m,inputProps:m,itemProps:m,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=h},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var t=e.data,n=e.multiSection;function i(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||o===t[a]-1?null===(a=function(e){for(null===e?e=0:e++;e<t.length&&0===t[e];)e++;return e===t.length?null:e}(a))?[null,null]:[a,0]:[a,o+1]:0===t||o===t-1?[null,null]:null===o?[null,0]:[null,o+1]}return{next:i,prev:function(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||0===o?null===(a=function(e){for(null===e?e=t.length-1:e--;e>=0&&0===t[e];)e--;return-1===e?null:e}(a))?[null,null]:[a,t[a]-1]:[a,o-1]:0===t||0===o?[null,null]:null===o?[null,t-1]:[null,o-1]},isLast:function(e){return null===i(e)[1]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a,o=n(175),s=(a=o)&&a.__esModule?a:{default:a},c=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),a=n[0],o=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var l=n.map((function(e){return a[e]})).filter(c);return"string"==typeof l[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,i(l)):l.join(" ")}:{key:e,style:s.default.apply(void 0,[{}].concat(i(l)))}}},e.exports=t.default},function(e,t,n){"use strict";var r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function a(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter((function(t){return r.call(e,t)}))}e.exports=Object.assign||function(e,t){for(var n,r,o=i(e),s=1;s<arguments.length;s++){n=arguments[s],r=a(Object(n));for(var c=0;c<r.length;c++)o[r[c]]=n[r[c]]}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=c(i),o=c(n(16)),s=c(n(27));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,i=e.sectionKeyPrefix,o=n(t);return o?a.default.createElement("div",r(i+"title","sectionTitle"),o):null}}]),t}(i.Component);p.propTypes={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=u(a),s=u(n(16)),c=u(n(178)),l=u(n(27));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;p(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,i=t.itemProps,a=t.renderItem,s=t.renderItemData,l=t.sectionIndex,u=t.highlightedItemIndex,p=t.getItemId,f=t.theme,d=t.keyPrefix,m=null===l?d:d+"section-"+l+"-",h="function"==typeof i;return o.default.createElement("ul",r({role:"listbox"},f(m+"items-list","itemsList")),n.map((function(t,n){var d=0===n,y=n===u,g=m+"item-"+n,v=h?i({sectionIndex:l,itemIndex:n}):i,b=r({id:p(l,n),"aria-selected":y},f(g,"item",d&&"itemFirst",y&&"itemHighlighted"),v);return y&&(b.ref=e.storeHighlightedItemReference),o.default.createElement(c.default,r({},b,{sectionIndex:l,isHighlighted:y,itemIndex:n,item:t,renderItem:a,renderItemData:s}))})))}}]),t}(a.Component);d.propTypes={items:s.default.array.isRequired,itemProps:s.default.oneOfType([s.default.object,s.default.func]),renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,sectionIndex:s.default.number,highlightedItemIndex:s.default.number,onHighlightedItemChange:s.default.func.isRequired,getItemId:s.default.func.isRequired,theme:s.default.func.isRequired,keyPrefix:s.default.string.isRequired},d.defaultProps={sectionIndex:null},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=l(a),s=l(n(16)),c=l(n(27));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){var e,n,r;u(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:i})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:i})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:i})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:i})},p(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,c.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,i=e.renderItem,a=e.renderItemData,s=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete s.sectionIndex,delete s.itemIndex,"function"==typeof s.onMouseEnter&&(s.onMouseEnter=this.onMouseEnter),"function"==typeof s.onMouseLeave&&(s.onMouseLeave=this.onMouseLeave),"function"==typeof s.onMouseDown&&(s.onMouseDown=this.onMouseDown),"function"==typeof s.onClick&&(s.onClick=this.onClick),o.default.createElement("li",r({role:"option"},s,{ref:this.storeItemReference}),i(n,r({isHighlighted:t},a)))}}]),t}(a.Component);f.propTypes={sectionIndex:s.default.number,isHighlighted:s.default.bool.isRequired,itemIndex:s.default.number.isRequired,item:s.default.any.isRequired,renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,onMouseEnter:s.default.func,onMouseLeave:s.default.func,onMouseDown:s.default.func,onClick:s.default.func},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},function(e,t,n){const{defaults:r}=n(17),{block:i}=n(117),{rtrim:a,splitCells:o,escape:s}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=i.normal,this.options.pedantic?this.rules=i.pedantic:this.options.gfm&&(this.rules=i.gfm)}static get rules(){return i}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,c,l,u,p,f,d,m,h,y,g,v,b,S,E;for(e=e.replace(/^ +$/gm,"");e;)if((c=this.rules.newline.exec(e))&&(e=e.substring(c[0].length),c[0].length>1&&this.tokens.push({type:"space"})),c=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(c[0].length),t&&"paragraph"===t.type?t.text+="\n"+c[0].trimRight():(c=c[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?c:a(c,"\n")}))}else if(c=this.rules.fences.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"code",lang:c[2]?c[2].trim():c[2],text:c[3]||""});else if(c=this.rules.heading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:c[1].length,text:c[2]});else if((c=this.rules.nptable.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),y=0;y<p.align.length;y++)/^ *-+: *$/.test(p.align[y])?p.align[y]="right":/^ *:-+: *$/.test(p.align[y])?p.align[y]="center":/^ *:-+ *$/.test(p.align[y])?p.align[y]="left":p.align[y]=null;for(y=0;y<p.cells.length;y++)p.cells[y]=o(p.cells[y],p.header.length);this.tokens.push(p)}else if(c=this.rules.hr.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"hr"});else if(c=this.rules.blockquote.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"blockquote_start"}),c=c[0].replace(/^ *> ?/gm,""),this.token(c,t),this.tokens.push({type:"blockquote_end"});else if(c=this.rules.list.exec(e)){for(e=e.substring(c[0].length),l=c[2],b=l.length>1,f={type:"list_start",ordered:b,start:b?+l:"",loose:!1},this.tokens.push(f),c=c[0].match(this.rules.item),d=[],n=!1,v=c.length,y=0;y<v;y++)p=c[y],h=p.length,p=p.replace(/^ *([*+-]|\d+\.) */,""),~p.indexOf("\n ")&&(h-=p.length,p=this.options.pedantic?p.replace(/^ {1,4}/gm,""):p.replace(new RegExp("^ {1,"+h+"}","gm"),"")),y!==v-1&&(u=i.bullet.exec(c[y+1])[0],(l.length>1?1===u.length:u.length>1||this.options.smartLists&&u!==l)&&(e=c.slice(y+1).join("\n")+e,y=v-1)),r=n||/\n\n(?!\s*$)/.test(p),y!==v-1&&(n="\n"===p.charAt(p.length-1),r||(r=n)),r&&(f.loose=!0),S=/^\[[ xX]\] /.test(p),E=void 0,S&&(E=" "!==p[1],p=p.replace(/^\[[ xX]\] +/,"")),m={type:"list_item_start",task:S,checked:E,loose:r},d.push(m),this.tokens.push(m),this.token(p,!1),this.tokens.push({type:"list_item_end"});if(f.loose)for(v=d.length,y=0;y<v;y++)d[y].loose=!0;this.tokens.push({type:"list_end"})}else if(c=this.rules.html.exec(e))e=e.substring(c[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===c[1]||"script"===c[1]||"style"===c[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]});else if(t&&(c=this.rules.def.exec(e)))e=e.substring(c[0].length),c[3]&&(c[3]=c[3].substring(1,c[3].length-1)),g=c[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[g]||(this.tokens.links[g]={href:c[2],title:c[3]});else if((c=this.rules.table.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),y=0;y<p.align.length;y++)/^ *-+: *$/.test(p.align[y])?p.align[y]="right":/^ *:-+: *$/.test(p.align[y])?p.align[y]="center":/^ *:-+ *$/.test(p.align[y])?p.align[y]="left":p.align[y]=null;for(y=0;y<p.cells.length;y++)p.cells[y]=o(p.cells[y].replace(/^ *\| *| *\| *$/g,""),p.header.length);this.tokens.push(p)}else if(c=this.rules.lheading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:"="===c[2].charAt(0)?1:2,text:c[1]});else if(t&&(c=this.rules.paragraph.exec(e)))e=e.substring(c[0].length),this.tokens.push({type:"paragraph",text:"\n"===c[1].charAt(c[1].length-1)?c[1].slice(0,-1):c[1]});else if(c=this.rules.text.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"text",text:c[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens}}},function(e,t,n){const r=n(28),i=n(118),a=n(119),o=n(120),{defaults:s}=n(17),{merge:c,unescape:l}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.token=null,this.options=e||s,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new i}static parse(t,n){return new e(n).parse(t)}parse(e){this.inline=new a(e.links,this.options),this.inlineText=new a(e.links,c({},this.options,{renderer:new o})),this.tokens=e.reverse();let t="";for(;this.next();)t+=this.tok();return t}next(){return this.token=this.tokens.pop(),this.token}peek(){return this.tokens[this.tokens.length-1]||0}parseText(){let e=this.token.text;for(;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)}tok(){let e="";switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{let t,n,r,i,a="";for(r="",t=0;t<this.token.header.length;t++)r+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(a+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=this.token.cells[t],r="",i=0;i<n.length;i++)r+=this.renderer.tablecell(this.inline.output(n[i]),{header:!1,align:this.token.align[i]});e+=this.renderer.tablerow(r)}return this.renderer.table(a,e)}case"blockquote_start":for(e="";"blockquote_end"!==this.next().type;)e+=this.tok();return this.renderer.blockquote(e);case"list_start":{e="";const t=this.token.ordered,n=this.token.start;for(;"list_end"!==this.next().type;)e+=this.tok();return this.renderer.list(e,t,n)}case"list_item_start":{e="";const t=this.token.loose,n=this.token.checked,r=this.token.task;if(this.token.task)if(t)if("text"===this.peek().type){const e=this.peek();e.text=this.renderer.checkbox(n)+" "+e.text}else this.tokens.push({type:"text",text:this.renderer.checkbox(n)});else e+=this.renderer.checkbox(n);for(;"list_item_end"!==this.next().type;)e+=t||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(e,r,n)}case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:{const e='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(e);console.log(e)}}}}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"AppLinkHelper",(function(){return I})),n.d(r,"AppLinkUtility",(function(){return O})),n.d(r,"Application",(function(){return N})),n.d(r,"AppRouter",(function(){return F})),n.d(r,"Behavior",(function(){return M})),n.d(r,"Collection",(function(){return U})),n.d(r,"CollectionView",(function(){return V})),n.d(r,"ComponentCollection",(function(){return V})),n.d(r,"Error",(function(){return k})),n.d(r,"ErrorHelper",(function(){return P})),n.d(r,"SilentError",(function(){return L})),n.d(r,"LayoutView",(function(){return J})),n.d(r,"NestedModel",(function(){return Y})),n.d(r,"Service",(function(){return G})),n.d(r,"Model",(function(){return K})),n.d(r,"View",(function(){return H})),n.d(r,"Component",(function(){return q})),n.d(r,"EventNames",(function(){return y})),n.d(r,"LayoutService",(function(){return W})),n.d(r,"Middleware",(function(){return _})),n.d(r,"LocationUtils",(function(){return v})),n.d(r,"Shell",(function(){return Q}));var i={};n.r(i),n.d(i,"emptyResponse",(function(){return It})),n.d(i,"getResponse",(function(){return At})),n.d(i,"getFetch",(function(){return Tt})),n.d(i,"fetch",(function(){return wt})),n.d(i,"useGetFetch",(function(){return kt})),n.d(i,"useGetResponse",(function(){return Lt})),n.d(i,"useBasicFetch",(function(){return xt})),n.d(i,"createMiddleware",(function(){return Rt})),n.d(i,"FlightReducer",(function(){return Ut})),n.d(i,"Simulator",(function(){return qt})),n.d(i,"Actions",(function(){return nt})),n.d(i,"RequestStatus",(function(){return rt})),n.d(i,"ajaxRequest",(function(){return st})),n.d(i,"normalize",(function(){return ft})),n.d(i,"denormalize",(function(){return ht}));n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161);var a={UPLOAD_IMAGE:"upload:image"},o={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",SUBJECT_CLASSIFICATIONS:"subject:classifications",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},a),Playlists:Object.assign({PLAYLISTS:"index",SEARCH_PLAYLISTS:"search:playlists",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",EDIT_PLAYLIST_AUDIENCES:"edit:playlist:audiences",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",REMOVE_FROM_SUBJECT:"remove:from:subject"},a),Series:Object.assign({EDIT_SERIES:"edit:series",EDIT_SERIES_VIDEOS:"edit:series:videos",EDIT_SERIES_SUBJECTS:"edit:series:subjects",EDIT_SERIES_AUDIENCES:"edit:series:audiences",LEGACY_EDIT_SERIES:"legacy:edit:series"},a),Videos:Object.assign({EDIT_VIDEO:"edit:video",EDIT_VIDEO_AUDIENCES:"edit:video:audiences",EDIT_VIDEO_SUBJECTS:"edit:video:subjects",EDIT_VIDEO_ALIASES:"edit:video:aliases",LEGACY_EDIT_VIDEO:"legacy:edit:video"},a),DomainOptions:{DOMAIN_OPTIONS:"domain:options",NEW_DOMAIN_OPTION:"new:domain:option",EDIT_DOMAIN_OPTION:"edit:domain:option",DELETE_DOMAIN_OPTION:"delete:domain:option"},People:{PEOPLE:"people",NEW_PERSON:"new:person",EDIT_PERSON:"edit:person"},Companies:{COMPANIES:"companies",NEW_COMPANY:"new:company",EDIT_COMPANY:"edit:company"},Themes:Object.assign({THEMES:"themes",NEW_THEME:"new:theme",EDIT_THEME:"edit:theme",DELETE_THEME:"delete:theme"},a)},s={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",UPDATE_OBJECT_SUBJECTS:"update:object:subjects",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",UPDATE_OBJECT_CLASSIFICATIONS:"update:object:classifications",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",ADD_TO_LEVEL:"add:to:level",REMOVE_FROM_LEVEL:"remove:from:level",UPDATE_OBJECT_LEVELS:"update:object:levels",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",UPDATE_OBJECT_AUDIENCES:"update:object:audiences",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",SERIES_BY_ID:"series:by:id",UPDATE_SERIES:"update:series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image",LOCALE:"locale",PHRASES:"PHRASES"},c={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},l={CURATOR_LAYOUT:"CuratorLayout"},u={COMPANIES:"companies:application",DOMAIN_OPTIONS:"domain:options:application",PEOPLE:"people:application",PLAYLISTS:"playlists:application",SERIES:"series:application",SUBJECTS:"subjects:application",THEMES:"themes:application",VIDEOS:"videos:application"},p={IMAGE_UPLOAD:"image:upload:data:service",SUBJECT:"subject:data:service",USER:"user:data:service",LANGUAGE:"language:data:service"},f={IMAGE_UPLOAD:"ImageUploadDataService",SUBJECT:"SubjectDataService",USER:"UserDataService",LANGUAGE:"LanguageDataService"},d=n(0),m=n(1),h=n(4);const y={SHOW_POPUP:"show:popup",ROUTE:"route",LOCK_NAV:"lock:nav",UNLOCK_NAV:"unlock:nav",NAV_IS_LOCKED:"navigation:islocked",NAV_UNLOCKED_BY_USER:"navigation:unlocked:by:user",ROUTING_START:"routing:start",ROUTING_END:"routing:end",HAS_ACTIVE_ROUTE:"has:active:route",ROUTE_LOOKUP:"route:look:up",URL_CHANGE:"url:change",ERROR:"error",CURRENT_ROUTE:"route:current"},g={SHELL:"global:shell",ALERT:"global:alert",POPUP:"global:popup"},v={GetQuery:()=>v.DeserializeQueryParams(window.location.search.substring(1)),UpdateQuery(e){if(!e)return;const t=v.GetQuery();let n=v.SerializeQueryParams(m.extend(t,e));n&&(n="?"+n),v.UpdateUrl(`${v.GetCurrentPath()}${n}`,null,{replace:!0,trigger:!1})},UpdateUrl(e,t,n){const r=I.buildRoute(e,t);h.history.navigate(r,n),h.Radio.channel(g.SHELL).trigger(y.URL_CHANGE,t,n)},SerializeQueryParams:e=>e?"string"==typeof e?e:$.param(e,!0):"",DeserializeQueryParams:e=>e?m.reduce(e.split("&"),(e,t)=>{const n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)},{}):{},StartHistory(){h.History.started&&h.history.stop(),h.history.start({pushState:!0})},PageLoad(e,t=!1){t?window.open(e,"_blank"):window.location.href=e},Redirect(e,t=!0){const n=()=>t?window.location.replace(e):window.location.href=e;O.hasActiveRoute()?h.Radio.channel(g.SHELL).once("routing:end",n):n()},Reload(e=!0){window.location.reload(e)},GetCurrentPath:()=>window.location.pathname,GetCurrentQueryString:()=>window.location.search,GetCurrentUrl:()=>window.location.href,GetCurrentReferrer:()=>document.referrer,SetPageTitle(e){document.title=e}},b=/((\(\?)?:\w+)|(\*\w+)/,S=/[\(\)]/g,E=/\(\/\)/g,C=/\/$/,O={routingStarted(){h.Radio.channel(g.SHELL).trigger(y.ROUTING_START)},routingEnded(){if(!O.hasActiveRoute())return;h.Radio.channel(g.SHELL).trigger(y.ROUTING_END)},hasActiveRoute:()=>h.Radio.channel(g.SHELL).request(y.HAS_ACTIVE_ROUTE)},j=(e,t={})=>{t.usedHelper=!0;const{application:n,action:r}=e;h.Radio.channel(n).trigger(r,e,t)},I={getHref(e){if(!e)return"";const{application:t,action:n,args:r,params:i}=e;return"/"+h.Radio.channel(g.SHELL).request(y.ROUTE_LOOKUP,`${t}:${n}`,r,i)},buildRoute(e,t){if(!t)return e;let n=t.args,r=t.params;if(m.each(n,t=>{e=e.replace(b,t||"")}),e=(e=(e=e.replace(E,"")).replace(S,"")).replace(C,""),!r)return e;const i=v.SerializeQueryParams(r);return i.length?`${e}?${i}`:e},trigger(e,t){if(!e)return;if(!O.hasActiveRoute())return void j(e,t);h.Radio.channel(g.SHELL).once("routing:end",()=>{j(e,t)})},getCurrentAppLink:()=>h.Radio.channel(g.SHELL).request(y.CURRENT_ROUTE)};var A=n(7);function T(e,t,n,r){let i=e;return"string"==typeof e&&(i=h.Radio.channel(e)),r.call(this,i,t,n)}const w=class{constructor(){this.variables={}}static get Instance(){return this.instance||(this.instance=new this)}get name(){return"EnvironmentVariables"}get isDevelopment(){return this.variables.isDevelopment}get(e){return this.variables[e]}setUpVariables(e){this.variables=e}}.Instance;class k extends Error{constructor(e){super(e)}}class L extends k{get name(){return"SilentError"}}class x extends Error{get name(){return"CoreError"}}const P={throw(e){if(h.Radio.channel(g.SHELL).trigger(y.ERROR,e),!(e instanceof L||w.isDevelopment))throw e}};class N extends A.Application{constructor(e){super(e),this.mergeOptions(e,[...this.defaultProps,...this.props||[]]),m.result(this,"name")||P.throw(new x("BaseApplication must define a name")),m.result(this,"channelName")||P.throw(new x("BaseApplication must define a channelName")),this.listenTo(this.getGlobalRadioChannel("popup"),y.SHOW_POPUP,this.onShowPopup),this.listenTo(this.getGlobalRadioChannel("alert"),"show:alert",this.onShowAlert)}get defaultProps(){return["shell","layoutService"]}getGlobalRadioChannel(e){const t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||P.throw(new x(`Global channel ${t} does not exist`)),h.Radio.channel(t)}onLoadLayout(){if(this.layoutOptions&&this.layoutOptions.name){var e=m.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(m.extend(this.layoutOptions,{options:e})),this.layout||P.throw(new x(`Layout: ${this.layoutOptions.name} does not exist or was not registered`)),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}onShowPopup(e){this.layout.getRegion("popup")||P.throw(new x("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}onShowAlert(e){const{ctor:t,collection:n}=e,r=this.layout.getRegion("alert");r||P.throw(new x("Your application layout must define an alert region")),r.hasView()||this.layout.showChildView("alert",new t({collection:n}))}setDefaultQueryParams(e){this.defaultQueryParams&&(e=m.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}getAndClearDefaultQueryParams(){const e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class _{use(e){var t;this.go=(t=this.go,(n,r)=>t(n,()=>e(n,r)))}go(e,t){t(e)}}const D=/([A-Z])/g,R=/(^|:)(\w)/gi;class F extends A.AppRouter{constructor(e){super(e),this.bindDisposal(),this.processAppEvents()}bindDisposal(){this.listenTo(g.SHELL,y.ROUTE,e=>{e.application!==this.channelName&&this.destroyApp()})}processAppEvents(){this.appRoutes&&m.keys(this.appRoutes).length||P.throw(new x("Implementations of Core.AppRouter must define at least 1 appRoute")),m.each(m.keys(this.appRoutes),e=>{const t=this.appRoutes[e],n=this.toEventName(t);this.options.shell.addRouteLookup(`${this.channelName}:${n}`,(t,r)=>I.buildRoute(e,{application:this.channelName,action:n,args:t,params:r})),this.listenTo(this.channelName,n,(t,n)=>{n&&n.usedHelper||P.throw(new x("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(t,{isAppRoute:!0},()=>{const r=m.extend({},this.controller.getAndClearDefaultQueryParams(),t.params);t.params=r,v.UpdateUrl(e,t,n)})})}),this.appLinks&&m.each(this.appLinks,e=>{const t=this.toEventName(e);this.listenTo(this.channelName,t,(e,t)=>{t&&t.usedHelper||P.throw(new x("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(e,{isAppRoute:!1})})})}executeRoute(e,t,n){this.validateAppLink(e);const r=this.toMethodName(e.action);O.routingStarted();const i=h.Radio.channel(g.SHELL);if(this.options.shell.isNavLocked())return i.trigger(y.NAV_IS_LOCKED,e),void O.routingEnded();const a=new _;m.each(this.filters,e=>a.use(e)),a.go(e,()=>{i.trigger(y.ROUTE,e,t),this.createApp();const a=this.controller;if(m.isFunction(a[r])||(O.routingEnded(),P.throw(new x(`${r} does not exist on the ${m.result(a,"name")}.`))),!1===a.triggerMethod("before:action"))return a.triggerMethod("action:cancelled"),void O.routingEnded();a.triggerMethod("load:layout"),a[r].apply(a,[...e.args||[],e.params||{}]),m.isFunction(n)&&n(),O.routingEnded()})}createApp(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}destroyApp(){if(!this.controller)return;this.controller.destroy(),delete this.controller}_addAppRoute(e,t,n){this.route(t,n,(...e)=>{const t={application:this.channelName,action:this.toEventName(n),args:e.slice(0,e.length-1),params:v.DeserializeQueryParams(e[e.length-1])};this.executeRoute(t,{isAppRoute:!0},()=>{v.UpdateQuery(m.extend(this.controller.getAndClearDefaultQueryParams(),t.params))})})}toEventName(e){return e.replace(D,":$1").toLowerCase()}toMethodName(e){const t=e.replace(R,(e,t,n)=>n.toUpperCase());return t[0].toLowerCase()+t.slice(1,t.length)}validateAppLink(e){e.application&&e.action||(O.routingEnded(),P.throw(new x("Invalid AppLink")))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class M extends A.Behavior{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class U extends h.Collection{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class V extends A.CollectionView{constructor(e){super(e),m.result(this,"name")||P.throw(new x(`Error: View with cid:${this.cid} requires a name.`))}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class z extends k{get name(){return"DevError"}}class B extends A.View{constructor(e){super(e);const t=[...this.defaultProps,...this.props||[]];this.mergeOptions(e,t),m.result(this,"name")||P.throw(new x(`Error: View with cid:${this.cid} requires a name.`))}get defaultProps(){return["shell","layoutService"]}_setOptions(e){this.options=m.extend({},m.result(this,"defaults"),e)}_setAttributes(e){w.isDevelopment&&m.extend(e,{"cv-classname":this.name}),this.$el.attr(e)}get ui(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage}set ui(e){this.uiStorage=e}get elements(){return null}static AddViewDataExtension(e){B.ViewDataExtensions.push(e)}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}resetClassName(){this.$el.attr("class",m.result(this,"className"))}serializeData(){const e=super.serializeData(),t=m.result(this,"viewOptions"),n=m.extend({},e,{options:t});return B.ViewDataExtensions.length?m.extend(n,...m.map(B.ViewDataExtensions,e=>e instanceof Function?e(this):e)):n}viewOptions(){return this.options}undelegateAppLinks(){this.$el&&this.$el.off(".appLinks"+this.cid)}renderAppLinks(){let e=this.appLinks;e&&(e=this.normalizeUIKeys(e),this.undelegateAppLinks(),m.each(m.keys(e),t=>{let n=t;const r=e[t],i=I.getHref(r);"[this]"===n&&(n=null);const a=n?this.$el.find(t):this.$el;(a.is("a")||a.is("button"))&&(i&&"/"!==i&&a.attr("href",i),this.delegate("click.appLinks"+this.cid,n,(function(e){e.preventDefault(),I.trigger(r)})))}))}hasPartialLoadingRegions(){const e=this;return void 0!==e._hasPartialLoadingRegions||(e._hasPartialLoadingRegions=m.some(e.regions,e=>m.has(e,"partialLoading"))),e._hasPartialLoadingRegions}renderPartialLoading(e){h.Radio.channel(g.SHELL).trigger("render:partial:loading",this,e)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}render(){const e=this;if(e._isDestroyed)return this;let t=this.processRequriedResources(!0);return t&&(t=e.triggerMethod("before:render",this)),!1!==t&&(t=!0),t=t&&this.processRequriedResources(!1),!1===t?(e._partialLoadingRendered||!e.hasPartialLoadingRegions()||(e._partialLoadingRendered=!0,e._reInitRegions(),e._renderTemplate(),e.renderPartialLoading()),this):((e._isRendered||e._partialLoadingRendered)&&e._reInitRegions(),this.setTitle(),e._renderTemplate(),e.bindUIElements(),this.renderAppLinks(),e._partialLoadingRendered=!1,e._isRendered=!0,e.triggerMethod("render",this),this)}processRequriedResources(e){return!0}setTitle(){}}B.ViewDataExtensions=[];class H extends B{constructor(e){super(e),this.boundListeners={},this.resourceInstances={}}processRequriedResources(e){const t=m.keys(this.requiredResources);if(!t.length)return!0;const n=this;let r=!0;return m.each(t,t=>{const i=this.requiredResources[t];if(i.beforeOnBeforeRender!==e)return;const a=i.dataServiceName;this.resourceInstances[a]||(this.resourceInstances[a]=i.getInstance(this)),this.boundListeners[`${a}:${i.eventName}`]||(this.listenTo(this.resourceInstances[a].channelName,i.eventName,this.render),this.boundListeners[`${a}:${i.eventName}`]=!0),n[t]=i.getData(this.resourceInstances[a]),r=r&&!!n[t]}),r}setTitle(){m.isString(this.title)||!1===this.title||P.throw(new z(`Must define a title for ${this.name}.`));h.Radio.channel(g.SHELL).trigger("set:page:title",this.title)}}class q extends B{}class J extends H{constructor(e){super(e)}static getCacheKey(e){P.throw(new z(`Must define getCacheKey for ${this.name}.`))}unmountRegion(e){this.trigger("unmount:"+e)}}class K extends h.Model{mixin(e){const t=this;for(let n in e){if(t.hasOwnProperty(n)){const r=t[n];return void(t[n]=m.extend({},r,e[n]))}t[n]=e[n]}}addValidation(e){this.mixin({validation:e})}validate(e,t){super.validate.call(this,e,t)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Y extends K{set(e,t,n){let r,i;if(null===e)return this;for(r in"object"==typeof e?(i=e,n=t):(i={},i[e]=t),n||(n={}),i)m.has(this.associations,r)&&(i[r]=this.setAssociation(r,i[r],n));return super.set.call(this,i,n)}get(e){var t=e.indexOf(".");if(-1===t)return super.get.call(this,e);const n=e.substr(0,t),r=this.attributes[n];if(!r||!m.isFunction(r.get))return super.get.call(this,e);const i=e.substr(t+1);return r.get(i)}setAssociation(e,t,n){const r=this.associations[e],i=this.attributes[e];if(!m.isFunction(r))return t;if(n.unset)return i&&delete i.parent,delete this[e],i;if(i)return i instanceof K&&i.set(t,n),i instanceof U&&i.set(t,n),n.silent||this.trigger("change:"+e,this,t,n),i;const a=t instanceof K?t:new r(t,{parse:!0});return a.parent=this,this[e]=a,a}toJSON(...e){const t=super.toJSON.apply(this,e);return m.each(this.associations,(e,n)=>{m.has(t,n)&&m.isFunction(t[n].toJSON)?t[n]=t[n].toJSON():t[n]=(new e).toJSON()}),t}toFlatJSON(...e){return m.omit(super.toJSON.apply(this,e),m.keys(this.associations))}}class G extends A.Object{constructor(e){super(e),this.name||P.throw(new x("Your service must be named."))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class W extends A.Object{constructor(e){super(e),this.layouts={},this.requiredRegions=e.requiredRegions}clearLayout(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}registerLayout(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}getLayout(e){const{name:t,options:n={}}=e;this.layouts[t]||P.throw(new x(t+" was not registered as a template."));const r=this.layouts[t].getCacheKey(n);return this.currentLayoutCacheKey===r&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",n),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=r,this.currentLayout=new this.layouts[t](n),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}checkRequiredRegions(e){m.each(this.requiredRegions,t=>{m.has(m.result(e.prototype,"regions"),t)||P.throw(new x(`Layout: ${e.prototype.name} must define an ${t} region.`))})}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Z{constructor(e,t){this.application=e,this.options=t||{}}get Application(){return this.application}get Options(){return this.options}}class Q extends A.Application{initialize(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}bindListeners(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}bindNavLockListeners(){this.listenTo(g.SHELL,y.LOCK_NAV,()=>this.shellState.navLock=!0),this.listenTo(g.SHELL,y.UNLOCK_NAV,()=>this.shellState.navLock=!1)}bindAppLinkListeners(){this.listenTo(g.SHELL,y.ROUTING_START,()=>this.shellState.activeRoute=!0),this.listenTo(g.SHELL,y.ROUTING_END,()=>this.shellState.activeRoute=!1),this.listenTo(g.SHELL,y.ROUTE,e=>this.shellState.currentAppLink=e);const e=h.Radio.channel(g.SHELL);e.reply(y.HAS_ACTIVE_ROUTE,m.bind(this.hasActiveRoute,this)),e.reply(y.CURRENT_ROUTE,()=>this.shellState.currentAppLink)}bindErrorHandlers(){window.addEventListener("error",()=>{O.routingEnded()})}bindErrorListener(){const e=h.Radio.channel(g.SHELL);this.listenTo(e,y.ERROR,this.handleError)}bindRouteLookup(){h.Radio.channel(g.SHELL).reply(y.ROUTE_LOOKUP,(e,t,n)=>this.routeLookup[e]?this.routeLookup[e](t,n):"",this)}addRouteLookup(e,t){this.routeLookup[e]=t}registerApplication(e,t){return this.applications.push(new Z(e,t)),this}getGlobalRadioChannels(){return g}isNavLocked(){return this.shellState.navLock}start(e){e||(e={}),this.runInitializationSteps(this,(t,n)=>{this.runStartUpSteps(this,e,(t,n,r)=>{super.start(e)})})}hasActiveRoute(){return this.shellState.activeRoute}onStart(){m.each(this.applications,e=>{const t={appConstructor:e.Application,shell:this,appOptions:Object.assign({region:"",shell:this,layoutService:this.layoutService},e.Options)};new e.Application.router(t)}),this.bindListeners(),v.StartHistory()}addInitializationStep(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,(n,r)=>t(n,()=>e(n,r))),this}runInitializationSteps(e,t){t(e)}addStartUpStep(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,(n,r,i)=>t(n,r,()=>e(n,r,i))),this}runStartUpSteps(e,t,n){n(e,t)}registerLayout(e,t){return this.layoutService.registerLayout(e,t),this}registerErrorHandler(e,t){return e||P.throw(new x("An error must have a name in order to register a handler for it.")),m.any(this.errorHandlers,t=>t.errorType===e)&&P.throw(new x(`An error handler for ${e.prototype.name} has already been defined.`)),this.errorHandlers.push({errorType:e,handler:t}),this}handleError(e){const t=m.find(this.errorHandlers,t=>e instanceof t.errorType);t&&t.handler&&t.handler(e)}registerStore(e){this.store=e}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}const X={debounce:(e,t,n)=>m.debounce(e,t,n),throttle:(e,t,n)=>m.throttle(e,t,n),isFunction:e=>m.isFunction(e),useIdentity:()=>m.identity,memoize:(e,t)=>m.memoize(e,t)};var ee=n(24),te=n(5);class ne extends J{isReactComponent(e){return d&&d.isValidElement(e)}showChildView(e,t){this.isReactComponent(t)&&this.showChildReactComponent(e,t)}showChildReactComponent(e,t){this.isAttached()?this.renderChildReactComponent(e,t):this.listenToOnce(this,"attach",()=>this.renderChildReactComponent(e,t))}renderChildReactComponent(e,t){const n=this.getRegion(e),r=this.$el.find(n.el);r&&r.length&&(n.trigger("before:show"),ee.render(t,r[0],()=>n.trigger("show")),this.listenToOnce(this,"unmount:"+e,()=>ee.unmountComponentAtNode(r[0])),this.listenToOnce(this,"before:destroy",()=>ee.unmountComponentAtNode(r[0])))}wrapWithStore(e){return d.createElement(te.Provider,{store:this.options.store},e)}}const re="top:nav",ie="left:nav",ae="content",oe="popup",se="alert";var ce=n(121),le=n.n(ce),ue=n(25),pe=n.n(ue);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function me(e,t,n){return(me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ve(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ve(e);if(t){var i=ve(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ge(this,n)}}function ge(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(o,e);var t,n,i,a=ye(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).childComponents={},t}return t=o,i=[{key:"getCacheKey",value:function(e){var t="".concat(this.name),n=[];return Object.keys(e).forEach((function(t){n.push("".concat(t,":").concat(e[t]))})),n.length&&(n.sort(),t+=":".concat(n.join(":"))),t}}],(n=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[re],className:pe.a.topNavRegion},leftNav:{component:this.childComponents[ie],className:"py-3 ".concat(pe.a.leftNavRegion)},content:{component:this.childComponents[ae],className:"position-relative container py-3"},popup:{component:this.childComponents[oe]},alert:{component:this.childComponents[se]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){X.isFunction(this.options.getTopNavView)&&(this.childComponents[re]=this.options.getTopNavView(r.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(ie)}},{key:"closePopup",value:function(){this.unsetRegion(oe)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());me(ve(o.prototype),"showChildView",this).call(this,"layout",this.wrapWithStore(d.createElement(je,Object.assign({},e))))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return le.a}},{key:"className",get:function(){return"container-fluid ".concat(pe.a.curatorLayout)}}])&&de(t.prototype,n),i&&de(t,i),o}(ne),Se=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ee=function(e){var t=e.className,n=e.children;return d.createElement("div",{className:t},n)},Ce=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},Oe=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,a=e.alert;return d.createElement(d.Fragment,null,d.createElement("div",{className:"position-relative"},!!t.component&&d.createElement(Ee,{className:Ce("top-nav-region",t.className)},t.component),!!n.component&&d.createElement(Ee,{className:Ce("left-nav-region",n.className)},n.component),!!r.component&&d.createElement("div",{className:"content-container"},d.createElement(Ee,{className:Ce("content-region",r.className)},r.component))),!!i.component&&d.createElement(Ee,{className:Ce("popup-region",i.className)},i.component),!!a.component&&d.createElement(Ee,{className:Ce("alert-region",a.className)},a.component))},je=function(e){var t=e.provider,n=Se(e,["provider"]);return t?d.createElement(t,null,d.createElement(Oe,Object.assign({},n))):d.createElement(Oe,Object.assign({},n))};function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ae(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ne(e);if(t){var i=Ne(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Le(e,t)}(o,e);var t,n,i,a=xe(o);function o(){return we(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"initialize",value:function(){this.listenTo(g.SHELL,r.EventNames.ROUTING_END,this.updateNav)}},{key:"updateNav",value:function(){var e=this,t=r.AppLinkHelper.getCurrentAppLink().application;if(t!==this.currentApplication){this.currentApplication=t;var n=this.options.navItemMappings[t];if(n){var i=document.querySelector(this.options.navSelector);i&&i.children&&Ae(i.children).forEach((function(t){var r=t.querySelector("a");r&&(r.classList.remove(e.options.currentItemClassName),r.text===n&&r.classList.add(e.options.currentItemClassName))}))}}}},{key:"name",get:function(){return"CuratorAppNavService"}}])&&ke(t.prototype,n),i&&ke(t,i),o}(r.Service);class De extends G{constructor(e){super(e),m.result(this,"name")||P.throw(new z("Must provide a name when extending BaseDataService")),m.result(this,"channelName")||P.throw(new z("Must provide a channelName for "+m.result(this,"name")));const t=[...this.defaultProps,...this.props||[]];this.dataRequestSignatures={},this.mergeOptions(e,t)}get defaultProps(){return["dataProvider","cache","bootstrapData","defaultErrorHandler","alertService"]}getCursors(e){const t=this.cache.get(e);return t?t.cursors:{}}clearCacheAndGet(e){const{callback:t,errorCallback:n,eventPrefix:r}=e,{syncEvent:i,errorEvent:a}=this.getEventNames(r),o=this.cache.get(r);if(o&&o.openRequest){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),a,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),i,t),m.isFunction(n)&&n()};return this.listenToOnce(this.getChannel(),i,e),void this.listenToOnce(this.getChannel(),a,r)}this.cache.remove(e.eventPrefix),this.get(e)}get(e){const{callback:t,errorCallback:n,eventPrefix:r,resource:i,formatData:a,expiryTime:o,successHandler:s,errorHandler:c,bootstrapName:l}=e,{syncEvent:u,requestEvent:p,successEvent:f,errorEvent:d}=this.getEventNames(r),h=this.getChannel(),y=this.currentTimestamp();this.bootstrapData&&this.bootstrapData[l]&&(this.cacheData(r,this.bootstrapData[l],a,{openRequest:!1,timestamp:y}),delete this.bootstrapData[l]);const g=this.cache.get(r);let v;g&&(v=g.data);const b=g&&g.openRequest,S=this.isExpired(r,o);if(b){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),d,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),u,t),m.isFunction(n)&&n()};this.listenToOnce(h,u,e),this.listenToOnce(h,d,r)}if(this.cache.has(r)&&!S||(h.trigger(p),this.listenToResponse({eventPrefix:r,formatData:a,cacheOptions:{timestamp:y},callback:t,errorCallback:n,successHandler:s,errorHandler:c}),this.cacheData(r,null,null,{openRequest:!0,timestamp:y}),this.dataProvider.read(i,{channel:this.getTransportChannel(),successEvent:f,errorEvent:d})),v&&m.isFunction(t)&&!S&&t(v),v)return v}create(e){const{eventPrefix:t,resource:n,data:r,formatData:i,callback:a,errorCallback:o,invalidationKeys:s,successHandler:c,errorHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:t,formatData:i,invalidationKeys:s,callback:a,errorCallback:o,successHandler:c,errorHandler:l}),this.dataProvider.create(n,r,{channel:m,successEvent:p,errorEvent:f})}update(e){const{data:t,callback:n,errorCallback:r,resource:i,formatData:a,eventPrefix:o,invalidationKeys:s,errorHandler:c,successHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:o,formatData:a,invalidationKeys:s,callback:n,errorCallback:r,successHandler:l,errorHandler:c}),this.dataProvider.update(i,t,{channel:m,successEvent:p,errorEvent:f})}delete(e){const{eventPrefix:t,resource:n,callback:r,errorCallback:i,invalidationKeys:a,successHandler:o,errorHandler:s}=e,{successEvent:c,errorEvent:l}=this.getEventNames(t),u=this.getTransportChannel();this.listenToResponse({eventPrefix:t,invalidationKeys:a,callback:r,errorCallback:i,cacheOptions:{noCache:!0,clearCacheKey:!0},successHandler:o,errorHandler:s}),this.dataProvider.delete(n,{channel:u,successEvent:c,errorEvent:l})}listenToResponse(e){const{eventPrefix:t,formatData:n,callback:r,errorCallback:i,successHandler:a,errorHandler:o,invalidationKeys:s,cacheOptions:c={}}=e,{syncEvent:l,requestEvent:u,successEvent:p,errorEvent:f,successAlertEvent:d,errorAlertEvent:h}=this.getEventNames(t),y=this.getChannel(),g=this.getTransportChannel(),v=this.getAlertChannel();if(m.isFunction(r)&&this.listenToOnce(y,l,r),m.isFunction(i)&&this.listenToOnce(y,f,i),this.stopListening(v,d),this.stopListening(v,h),m.isFunction(a)&&this.listenToOnce(v,d,a),m.isFunction(o)&&this.listenToOnce(v,h,o),!m.isFunction(o)&&!1!==o&&m.isFunction(this.defaultErrorHandler)&&this.listenToOnce(v,h,this.defaultErrorHandler),this.hasRequestSignature(t))return;this.setRequestSignature(t);this.listenTo(g,p,(e,...r)=>{this.stopListening(y,f,i),v.trigger(d,e,...r);const a=c.noCache?this.formatData(e,n):this.cacheData(t,e,n);c.clearCacheKey&&this.cache.remove(t),y.trigger(l,a),s&&s.length&&this.cache.invalidate(s,e=>y.trigger(e+":invalidate"))}),this.listenTo(g,f,(...e)=>{this.stopListening(y,l,r);const n=this.dataProvider.parseError(...e);v.trigger(h,n),y.trigger(f,n),c.noCache||this.cacheData(t,null,null)})}cacheData(e,t,n,r={}){let{openRequest:i=!1,timestamp:a}=r;a||(a=this.currentTimestamp());const o=this.processPagination(t),s=this.formatData(t,n);return this.cache.set(e,{data:s,timestamp:a,cursors:o,openRequest:i}),s}processPagination(e){if(!e)return;const{pagination:t}=e;return t?t.cursors?t.cursors:m.isUndefined(t.offset)||m.isUndefined(t.pageSize)?t.page?this.convertLegacyPaginationToCursors(t):void 0:this.convertOffsetPaginationToCursors(t):void 0}formatData(e,t){return m.isFunction(t)?t(e):e}chain(){const e=[],t=(e,t)=>{m.isFunction(e)&&e(t)},n=(n,i)=>(e.push(()=>{const r=n.callback;n.callback=n=>{t(r,n),t(e.shift())},this[i](n)}),r),r={func:t=>(e.push(()=>{t(e.shift()||(()=>{}))}),r),get:e=>n(e,"get"),create:e=>n(e,"create"),update:e=>n(e,"update"),delete:e=>n(e,"delete"),run(){t(e.shift())}};return r}invalidateCache(e){e&&e.length&&this.cache.invalidate(e)}currentTimestamp(){return(new Date).valueOf()}isExpired(e,t){if(!t)return!1;const n=this.cache.get(e);if(!n||!n.timestamp)return!0;const r=1e3*t;return n.timestamp<this.currentTimestamp()-r}getEventNames(e){return{syncEvent:e+":sync",requestEvent:e+":request",successEvent:e+":success",errorEvent:e+":error",successAlertEvent:e+":success:alert",errorAlertEvent:e+":error:alert"}}getTransportChannel(){return h.Radio.channel(this.channelName+":transport")}getAlertChannel(){return h.Radio.channel(this.channelName+":alert")}setRequestSignature(e){this.dataRequestSignatures[e]=e}hasRequestSignature(e){return!!this.dataRequestSignatures[e]}convertOffsetPaginationToCursors(e){const{offset:t,pageSize:n,totalItems:r}=e,i=r>0&&t<r&&t+n,a=r>0&&t>0&&Math.max(t-n,0);let o={};if(i&&i<r&&(o.next=i.toString()),m.isNumber(a)&&(o.previous=a.toString()),!m.isEmpty(o))return o}convertLegacyPaginationToCursors(e){const{page:t,totalPages:n}=e,r=m.isNumber(t)&&t>0&&t<n&&t+1,i=m.isNumber(t)&&t>1&&t-1;let a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!m.isEmpty(a))return a}}function Re(e){return(Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Be(e);if(t){var i=Be(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ze(this,n)}}function ze(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Be(e){return(Be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var He=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ue(e,t)}(a,e);var t,n,r,i=Ve(a);function a(){return Fe(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:s.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return f.IMAGE_UPLOAD}},{key:"channelName",get:function(){return p.IMAGE_UPLOAD}}])&&Me(t.prototype,n),r&&Me(t,r),a}(De);const qe={SHORT:120,STANDARD:600};var Je={dataServiceName:f.USER,dataChannelName:p.USER},$e={getCurrentUserFetchOptions:function(e,t){return Object.assign(Object.assign({},Je),{eventPrefix:s.CURRENT_USER,fetchData:function(e){return e.getCurrentUser()},setData:e,onError:t})}};class Ke{constructor(e){this.value=e}increment(){this.value+=1}decrement(){this.value-=1}getValue(){return this.value}}function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ze(e,t){return(Ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=et(e);if(t){var i=et(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xe(this,n)}}function Xe(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ze(e,t)}(a,e);var t,n,r,i=Qe(a);function a(){return Ge(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getLanguageConfig",value:function(e){var t={locale:"en",phrases:{}},n=new Ke(3),r=function(){n.decrement(),n.getValue()>0||e(t)};this.get({resource:"/api/locale",eventPrefix:s.LOCALE,expiryTime:qe.STANDARD,callback:function(e){t.locale=e,r()}}),this.get({resource:"/api/phrases/shared",eventPrefix:"".concat(s.PHRASES,":shared"),expiryTime:qe.STANDARD,callback:function(e){null===e.shared&&(e.shared={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}}),this.get({resource:"/api/phrases/subjects",eventPrefix:"".concat(s.PHRASES,":subjects"),expiryTime:qe.STANDARD,callback:function(e){null===e.subjects&&(e.subjects={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}})}},{key:"name",get:function(){return f.LANGUAGE}},{key:"channelName",get:function(){return p.LANGUAGE}}])&&We(t.prototype,n),r&&We(t,r),a}(De);const nt={API_REQUEST:"API_REQUEST",API_REPONSE:"API_RESPONSE",API_ERROR:"API_ERROR",INVALIDATE:"INVALIDATE",UPDATE:"UPDATE"};var rt,it;function at(e){const{getResponseHeader:t,responseJSON:n,status:r}=e;return{getResponseHeader:t,responseJSON:n,status:r}}!function(e){e.None="None",e.Fetching="Fetching",e.Success="Success",e.Error="Error"}(rt||(rt={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(it||(it={}));const ot=[it.POST,it.PUT];function st(e){const{resource:t,type:n,success:r,error:i,always:a}=e,o={url:t,method:n};ot.includes(n)&&e.data&&(o.data=JSON.stringify(e.data)),$.ajax(o).done((e,t,n)=>{r&&r(e,at(n))}).fail((e,t,n)=>{i&&i(at(e))}).always(()=>{a&&a()})}const ct="id";function lt(e,t={}){const{idAttribute:n=ct,namespace:r=""}=t;return e[n]||P.throw(new z("There was an issue during normalization. Object did not have an id attribute.")),`${r}__${e[n]}`}function ut(e,t,n={}){const{idAttribute:r=ct}=n,i=[];return e.forEach(e=>{e[r]&&i.push(lt(e,n)),pt(e,t,n)}),i}function pt(e,t,n={}){if(e)return Array.isArray(e)?ut(e,t,n):"object"==typeof e?function e(t,n,r={}){const{idAttribute:i=ct}=r,a=Object.assign({},t);if(Object.keys(t).forEach(o=>{const s=t[o];if(s)if(Array.isArray(s)){var c=ut(s,n,r);c.length&&(a[o]=c)}else if("object"==typeof s){var l=e(s,n,r);s[i]?a[o]=lt(s,r):a[o]=l}}),t[i]){const e=lt(t,r);return n[e]=a,e}return a}(e,t,n):e}function ft(e,t){const n={};return{result:pt(e,n,t),entities:n}}const dt={isEmpty:e=>m.isEmpty(e),values:e=>m.values(e),keys:e=>m.keys(e),deepClone:e=>(m.isArray(e)?m.map:m.mapObject)(e,e=>m.isObject(e)||m.isArray(e)?dt.deepClone(e):e),getEnumKeys:e=>Object.keys(e).filter(e=>!(parseInt(e)>=0)),isObject:e=>m.isObject(e),isEqual:(e,t)=>m.isEqual(e,t),omit:(e,t)=>m.omit(e,t)};function mt(e,t,n){if(e){if("string"==typeof e)return function(e,t,n){if(n[e])return n[e];n[e]={};const r=mt(t[e],t,n);return Object.assign(n[e],r),dt.isEmpty(n[e])&&delete n[e],n[e]}(e,t,n);if(Array.isArray(e))return e.map(e=>mt(e,t,n));if("object"==typeof e){const r={};return Object.keys(e).forEach(i=>{r[i]=mt(e[i],t,n)||e[i]}),r}}}function ht(e,t){return mt(e,t,{})}function yt(e,t){return e===t}function gt(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function vt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yt,n=null,r=null;return function(){return gt(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}function bt(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function St(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=0,o=r.pop(),s=bt(r),c=e.apply(void 0,[function(){return a++,o.apply(null,arguments)}].concat(n)),l=e((function(){for(var e=[],t=s.length,n=0;n<t;n++)e.push(s[n].apply(null,arguments));return c.apply(null,e)}));return l.resultFunc=o,l.dependencies=s,l.recomputations=function(){return a},l.resetRecomputations=function(){return a=0},l}}var Et=St(vt);const Ct={currentTimestamp:()=>(new Date).valueOf(),isExpired(e,t){if(!t)return!1;const n=1e3*t;return e<Ct.currentTimestamp()-n},currentTimeOfDay(e){e||(e=new Date);const t=e.getHours();return t>=12&&t<18?"afternoon":t>=18?"evening":"morning"}};class Ot{constructor(e){this.status=e.status,this.requestTime=e.requestTime,this.cacheDuration=e.cacheDuration,this.data=e.data,this.statusCode=e.statusCode}get shouldFetch(){return this.status===rt.None||this.isExpired}get isExpired(){return Ct.isExpired(this.requestTime,this.cacheDuration)}get isFetching(){return this.status===rt.Fetching}get hasError(){return this.status===rt.Error}get isComplete(){return this.status===rt.Success||this.status===rt.Error}}function jt(e,t,n){if(!e||!t)return It();let r=t.response;return!1!==t.request.normalize&&(r=ht(t.response,n)),new Ot({status:t.status,statusCode:t.statusCode,requestTime:t.timestamp,cacheDuration:t.request.expiryTime,data:r})}function It(){return new Ot({status:rt.None})}function At(e,t){return jt(t,e.flightData.resources[t],e.flightData.entities)}function Tt(e,t){return()=>{wt(e,t)}}function wt(e,t){e({type:nt.API_REQUEST,request:t})}function kt(e){return Tt(Object(te.useDispatch)(),e)}function Lt(e,t){const n=Object(d.useMemo)(()=>{var n;return(null===(n=t)||void 0===n?void 0:n.optimize)?function(e){return St(vt,(e,t)=>{const n=["response","request"];return dt.isEqual(dt.omit(e,n),dt.omit(t,n))})(t=>t.flightData.resources[e],t=>{var n;const r=t.flightData.resources[e];return(null===(n=r)||void 0===n?void 0:n.entityIds)?r.entityIds.reduce((e,n)=>(e[n]=t.flightData.entities[n],e),{}):{}},(t,n)=>jt(e,t,n))}(e):function(e){return Et(t=>t.flightData.resources[e],e=>e.flightData.entities,(t,n)=>jt(e,t,n))}(e)},[e]);return Object(te.useSelector)(e=>n(e))}function xt(e,t){const n=Object(te.useDispatch)(),r=Lt(e&&e.key,t),i=Tt(n,e);return e&&r.shouldFetch&&i(),r}const Pt={getMatchingKeyMap(e,t,n){const r=Array.isArray(t)?t:[t];let i=[];return r.forEach(t=>{const n=new RegExp(t,"i"),r=Object.keys(e.resources).filter(e=>n.test(e));i.push(...r)}),n&&(i=i.filter(e=>e!==n)),i.reduce((e,t)=>(e[t]=!0,e),{})}};var Nt;!function(e){e[e.Ok=200]="Ok",e[e.NoContent=204]="NoContent",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.Conflict=409]="Conflict",e[e.InternalServer=500]="InternalServer"}(Nt||(Nt={}));const _t={isSimulated(e){const t=e;return!!(t.successResponse||t.errorResponse||t.noResponse)},simulateFetchData(e,t){const{success:n,error:r,always:i}=e,a=t;window.setTimeout(()=>{a.noResponse||(a.successResponse?n(a.successResponse(),{status:Nt.Ok,getResponseHeader:e=>""}):a.errorResponse&&r(a.errorResponse()),i())},function(e){const t=e.timeout||300;return t/2+(Math.floor(Math.random()*t/2)+1)}(t))}};var Dt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Rt(e){const{fetchData:t,bootstrappedData:n,defaultExpiryTime:r}=e,i=Object.freeze({key:null,url:null,type:it.GET,normalize:!0,formatData:e=>e,expiryTime:r});return function(e){return r=>a=>{if(a.type!==nt.API_REQUEST)return void r(a);const o=e.getState(),s=Object.assign({},i,a.request),{success:c,error:l,always:u,formatData:p}=s,f=Dt(s,["success","error","always","formatData"]),d=o.flightData.resources[f.key];if(r(a),d&&d.status===rt.Fetching)return;if(f.bootstrapName&&n[a.request.bootstrapName])return h(n[a.request.bootstrapName]),y(),void delete n[a.request.bootstrapName];const m={resource:f.url,type:f.type,data:f.data,success:h,error:function(t){e.dispatch({type:nt.API_ERROR,errorResponse:t.responseJSON,request:a.request,timestamp:Ct.currentTimestamp(),xhr:t}),l&&l(t)},always:y};return void(_t.isSimulated(f)?_t.simulateFetchData(m,f):t(m));function h(t,n){const r=p(t);let i={result:r,entities:{}};if(f.normalize&&(i=ft(r,f.normalizeOptions)),e.dispatch({type:nt.API_REPONSE,result:i.result,entities:i.entities,request:f,timestamp:Ct.currentTimestamp(),xhr:n}),f.updateState){(Array.isArray(f.updateState)?f.updateState:[f.updateState]).forEach(t=>{!function(t){const n=Pt.getMatchingKeyMap(o.flightData,t.keys),r=Object.assign({},Object.keys(o.flightData.resources).filter(e=>n[e]).reduce((e,t)=>{const n=o.flightData.resources[t];let r=n.response;return n.request.normalize&&(r=ht(n.response,o.flightData.entities)),e[t]=r,e},{})),i=t.updateData(r);Object.keys(i).forEach(t=>{const n=o.flightData.resources[t],r=i[t];let a={result:r,entities:{}};n.request.normalize&&(a=ft(r,n.request.normalizeOptions)),e.dispatch({type:nt.UPDATE,result:a.result,entities:a.entities,request:n.request})})}(t)})}if(!c)return;let a=i.result;f.normalize&&(a=ht(i.result,Object.assign(Object.assign({},o.flightData.entities),i.entities))),c(a)}function y(){f.invalidationKeys&&e.dispatch({type:nt.INVALIDATE,keys:f.invalidationKeys,request:f}),u&&u()}}}}function Ft(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{e[r]?n[r]=Object.assign(Object.assign({},e[r]),t[r]):n[r]=t[r]}),n}const Mt={resources:{},entities:{}};function Ut(e=Mt,t){switch(t.type){case nt.API_REQUEST:return function(e,t){const n=e.resources[t.request.key];return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Fetching,response:n?n.response:null,entityIds:n?n.entityIds:null}})}}(e,t);case nt.API_REPONSE:return function(e,t){var n;const r=t.entities?Object.keys(t.entities):[];return{entities:Ft(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Success,response:t.result,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status,entityIds:r}})}}(e,t);case nt.API_ERROR:return function(e,t){var n;return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Error,errorResponse:t.errorResponse,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status}})}}(e,t);case nt.INVALIDATE:return function(e,t){var n;const r=Pt.getMatchingKeyMap(e,t.keys,null===(n=t.request)||void 0===n?void 0:n.key);return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),Object.keys(e.resources).filter(e=>r[e]).reduce((t,n)=>{const r=e.resources[n];return t[n]=Object.assign({},r,{status:rt.None}),t},{}))}}(e,t);case nt.UPDATE:return function(e=Mt,t){const n=t.entities?Object.keys(t.entities):[];return{entities:Ft(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:Object.assign(Object.assign({},e.resources[t.request.key]),{request:t.request,response:t.result,entityIds:n})})}}(e,t)}return e}const Vt={first:e=>m.first(e),firstFew:(e,t)=>m.first(e,t),last:e=>m.last(e),lastFew:(e,t)=>m.last(e,t),max:(e,t)=>m.max(e,t),cloneAndReplaceAtIdx(e,t,n,r=null){let i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[...i,...Array(t+1-i.length).fill(r)]),i.splice(t,1,n),i},moveItem(e,t,n){const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},isEmpty:e=>e&&!e.length,findIndex:(e,t)=>m.findIndex(e,t),where:(e,t)=>m.where(e,t),groupBy:(e,t)=>m.groupBy(e,t),flatten:(e,t)=>m.flatten(e,t),intersection:(...e)=>m.intersection(...e),addOrRemove(e,t){const n=e.indexOf(t);return-1===n?e.push(t):e.splice(n,1),e},addOrRemoveImmutable(e,t){const n=e.indexOf(t),r=dt.deepClone(e);return-1===n?[...r,t]:[...r.slice(0,n),...r.slice(n+1)]},sortBy:(e,t)=>m.sortBy(e,t),chunk:(e,t)=>m.chunk(e,t),uniq:e=>m.uniq(e)},zt="id";function Bt(e,t){return localStorage.setItem(e,JSON.stringify(t)),t}function Ht(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}const qt={getAll(e,t){let n=Ht(e);return n&&n.length?n:!n&&t?(t.forEach(t=>qt.create(e,t)),Ht(e)):[]},get(e,t){const n=qt.getAll(e);return n.length?n.find(e=>e[zt]===t):null},create(e,t){const n=qt.getAll(e),r=Object.assign(Object.assign({},t),{[zt]:t[zt]||(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)+1).toString()});return n.push(r),Bt(e,n),r},update(e,t){const n=qt.getAll(e);if(!n.length)return t;const r=n.findIndex(e=>e[zt]===t[zt]);return n[r]=t,Bt(e,n),t},delete(e,t){const n=qt.getAll(e);n.length&&(Array.isArray(t)||(t=[t]),t.forEach(e=>{const t=n.findIndex(t=>t[zt]===e);n.splice(t,1)}),Bt(e,n))},assoc(e,t,n,r,i){const a=Array.isArray(i);let o=a?i:[i];"string"==typeof Vt.first(o)&&(o=qt.getAll(r).filter(e=>o.includes(e.id)));const s=o.map(e=>e.id?e:qt.create(r,e));let c=qt.getAll(e);if(!c.length)return;let l=c.find(e=>e.id===t);return l?(s.forEach(e=>{if(l[n])if(Array.isArray(l[n])){if(l[n].find(t=>t.id===e.id))return;l[n].push(e)}else l[n]=e;else l[n]=a?[e]:e}),c=c.map(e=>e.id!==l.id?e:l),Bt(e,c),a?s:Vt.first(s)):void 0},dissoc(e,t,n,r){let i=qt.getAll(e);if(!i.length)return;let a=i.find(e=>e.id===t);if(!a)return;let o=a[n];return o?(Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]),r.forEach(e=>{const t=o.findIndex(t=>t.id===e);o.splice(t,1)}),a[n]=o,i=i.map(e=>e.id!==a.id?e:a),Bt(e,i),i):void 0}};var Jt=function(e){var t="/api/master/v2/companies";return e?"".concat(t,"?cursor=").concat(e):t},$t=function(e){return"/api/master/v2/objects/".concat(e)},Kt=function(){return"/api/master/v2/companies"},Yt=function(e){return"/api/master/v2/objects/".concat(e)},Gt="companies",Wt="company",Zt="update:company",Qt=function(e){return{key:"".concat(Gt).concat(e?":".concat(e):""),url:Jt(e)}},Xt=function(e){return{key:"".concat(Wt,":").concat(e),url:$t(e)}},en=function(e,t,n){return{key:Wt,url:Kt(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[Gt]}},tn=function(e,t,n){return{key:"".concat(Zt,":").concat(e),url:Yt(e),data:t,type:it.PUT,always:n}},nn=n(12),rn=n.n(nn),an=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===on}(e)}(e)};var on="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function sn(e,t){return!1!==t.clone&&t.isMergeableObject(e)?ln((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function cn(e,t,n){return e.concat(t).map((function(e){return sn(e,n)}))}function ln(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||cn,n.isMergeableObject=n.isMergeableObject||an;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=sn(e[t],n)})),Object.keys(t).forEach((function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=ln(e[i],t[i],n):r[i]=sn(t[i],n)})),r}(e,t,n):sn(t,n)}ln.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return ln(e,n,t)}),{})};var un=ln,pn=n(6),fn=pn.a.Symbol,dn=Object.prototype,mn=dn.hasOwnProperty,hn=dn.toString,yn=fn?fn.toStringTag:void 0;var gn=function(e){var t=mn.call(e,yn),n=e[yn];try{e[yn]=void 0;var r=!0}catch(e){}var i=hn.call(e);return r&&(t?e[yn]=n:delete e[yn]),i},vn=Object.prototype.toString;var bn=function(e){return vn.call(e)},Sn=fn?fn.toStringTag:void 0;var En=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Sn&&Sn in Object(e)?gn(e):bn(e)};var Cn=function(e,t){return function(n){return e(t(n))}},On=Cn(Object.getPrototypeOf,Object);var jn=function(e){return null!=e&&"object"==typeof e},In=Function.prototype,An=Object.prototype,Tn=In.toString,wn=An.hasOwnProperty,kn=Tn.call(Object);var Ln=function(e){if(!jn(e)||"[object Object]"!=En(e))return!1;var t=On(e);if(null===t)return!0;var n=wn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Tn.call(n)==kn};var xn=function(){this.__data__=[],this.size=0};var Pn=function(e,t){return e===t||e!=e&&t!=t};var Nn=function(e,t){for(var n=e.length;n--;)if(Pn(e[n][0],t))return n;return-1},_n=Array.prototype.splice;var Dn=function(e){var t=this.__data__,n=Nn(t,e);return!(n<0)&&(n==t.length-1?t.pop():_n.call(t,n,1),--this.size,!0)};var Rn=function(e){var t=this.__data__,n=Nn(t,e);return n<0?void 0:t[n][1]};var Fn=function(e){return Nn(this.__data__,e)>-1};var Mn=function(e,t){var n=this.__data__,r=Nn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Un.prototype.clear=xn,Un.prototype.delete=Dn,Un.prototype.get=Rn,Un.prototype.has=Fn,Un.prototype.set=Mn;var Vn=Un;var zn=function(){this.__data__=new Vn,this.size=0};var Bn=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Hn=function(e){return this.__data__.get(e)};var qn=function(e){return this.__data__.has(e)};var Jn=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var $n,Kn=function(e){if(!Jn(e))return!1;var t=En(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Yn=pn.a["__core-js_shared__"],Gn=($n=/[^.]+$/.exec(Yn&&Yn.keys&&Yn.keys.IE_PROTO||""))?"Symbol(src)_1."+$n:"";var Wn=function(e){return!!Gn&&Gn in e},Zn=Function.prototype.toString;var Qn=function(e){if(null!=e){try{return Zn.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Xn=/^\[object .+?Constructor\]$/,er=Function.prototype,tr=Object.prototype,nr=er.toString,rr=tr.hasOwnProperty,ir=RegExp("^"+nr.call(rr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ar=function(e){return!(!Jn(e)||Wn(e))&&(Kn(e)?ir:Xn).test(Qn(e))};var or=function(e,t){return null==e?void 0:e[t]};var sr=function(e,t){var n=or(e,t);return ar(n)?n:void 0},cr=sr(pn.a,"Map"),lr=sr(Object,"create");var ur=function(){this.__data__=lr?lr(null):{},this.size=0};var pr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},fr=Object.prototype.hasOwnProperty;var dr=function(e){var t=this.__data__;if(lr){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return fr.call(t,e)?t[e]:void 0},mr=Object.prototype.hasOwnProperty;var hr=function(e){var t=this.__data__;return lr?void 0!==t[e]:mr.call(t,e)};var yr=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=lr&&void 0===t?"__lodash_hash_undefined__":t,this};function gr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}gr.prototype.clear=ur,gr.prototype.delete=pr,gr.prototype.get=dr,gr.prototype.has=hr,gr.prototype.set=yr;var vr=gr;var br=function(){this.size=0,this.__data__={hash:new vr,map:new(cr||Vn),string:new vr}};var Sr=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Er=function(e,t){var n=e.__data__;return Sr(t)?n["string"==typeof t?"string":"hash"]:n.map};var Cr=function(e){var t=Er(this,e).delete(e);return this.size-=t?1:0,t};var Or=function(e){return Er(this,e).get(e)};var jr=function(e){return Er(this,e).has(e)};var Ir=function(e,t){var n=Er(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ar.prototype.clear=br,Ar.prototype.delete=Cr,Ar.prototype.get=Or,Ar.prototype.has=jr,Ar.prototype.set=Ir;var Tr=Ar;var wr=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!cr||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Tr(r)}return n.set(e,t),this.size=n.size,this};function kr(e){var t=this.__data__=new Vn(e);this.size=t.size}kr.prototype.clear=zn,kr.prototype.delete=Bn,kr.prototype.get=Hn,kr.prototype.has=qn,kr.prototype.set=wr;var Lr=kr;var xr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},Pr=function(){try{var e=sr(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Nr=function(e,t,n){"__proto__"==t&&Pr?Pr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},_r=Object.prototype.hasOwnProperty;var Dr=function(e,t,n){var r=e[t];_r.call(e,t)&&Pn(r,n)&&(void 0!==n||t in e)||Nr(e,t,n)};var Rr=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),i?Nr(n,s,c):Dr(n,s,c)}return n};var Fr=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Mr=function(e){return jn(e)&&"[object Arguments]"==En(e)},Ur=Object.prototype,Vr=Ur.hasOwnProperty,zr=Ur.propertyIsEnumerable,Br=Mr(function(){return arguments}())?Mr:function(e){return jn(e)&&Vr.call(e,"callee")&&!zr.call(e,"callee")},Hr=Array.isArray,qr=n(20),Jr=/^(?:0|[1-9]\d*)$/;var $r=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Jr.test(e))&&e>-1&&e%1==0&&e<t};var Kr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Yr={};Yr["[object Float32Array]"]=Yr["[object Float64Array]"]=Yr["[object Int8Array]"]=Yr["[object Int16Array]"]=Yr["[object Int32Array]"]=Yr["[object Uint8Array]"]=Yr["[object Uint8ClampedArray]"]=Yr["[object Uint16Array]"]=Yr["[object Uint32Array]"]=!0,Yr["[object Arguments]"]=Yr["[object Array]"]=Yr["[object ArrayBuffer]"]=Yr["[object Boolean]"]=Yr["[object DataView]"]=Yr["[object Date]"]=Yr["[object Error]"]=Yr["[object Function]"]=Yr["[object Map]"]=Yr["[object Number]"]=Yr["[object Object]"]=Yr["[object RegExp]"]=Yr["[object Set]"]=Yr["[object String]"]=Yr["[object WeakMap]"]=!1;var Gr=function(e){return jn(e)&&Kr(e.length)&&!!Yr[En(e)]};var Wr=function(e){return function(t){return e(t)}},Zr=n(10),Qr=Zr.a&&Zr.a.isTypedArray,Xr=Qr?Wr(Qr):Gr,ei=Object.prototype.hasOwnProperty;var ti=function(e,t){var n=Hr(e),r=!n&&Br(e),i=!n&&!r&&Object(qr.a)(e),a=!n&&!r&&!i&&Xr(e),o=n||r||i||a,s=o?Fr(e.length,String):[],c=s.length;for(var l in e)!t&&!ei.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||$r(l,c))||s.push(l);return s},ni=Object.prototype;var ri=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ni)},ii=Cn(Object.keys,Object),ai=Object.prototype.hasOwnProperty;var oi=function(e){if(!ri(e))return ii(e);var t=[];for(var n in Object(e))ai.call(e,n)&&"constructor"!=n&&t.push(n);return t};var si=function(e){return null!=e&&Kr(e.length)&&!Kn(e)};var ci=function(e){return si(e)?ti(e):oi(e)};var li=function(e,t){return e&&Rr(t,ci(t),e)};var ui=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},pi=Object.prototype.hasOwnProperty;var fi=function(e){if(!Jn(e))return ui(e);var t=ri(e),n=[];for(var r in e)("constructor"!=r||!t&&pi.call(e,r))&&n.push(r);return n};var di=function(e){return si(e)?ti(e,!0):fi(e)};var mi=function(e,t){return e&&Rr(t,di(t),e)},hi=n(123);var yi=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var gi=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a};var vi=function(){return[]},bi=Object.prototype.propertyIsEnumerable,Si=Object.getOwnPropertySymbols,Ei=Si?function(e){return null==e?[]:(e=Object(e),gi(Si(e),(function(t){return bi.call(e,t)})))}:vi;var Ci=function(e,t){return Rr(e,Ei(e),t)};var Oi=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},ji=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Oi(t,Ei(e)),e=On(e);return t}:vi;var Ii=function(e,t){return Rr(e,ji(e),t)};var Ai=function(e,t,n){var r=t(e);return Hr(e)?r:Oi(r,n(e))};var Ti=function(e){return Ai(e,ci,Ei)};var wi=function(e){return Ai(e,di,ji)},ki=sr(pn.a,"DataView"),Li=sr(pn.a,"Promise"),xi=sr(pn.a,"Set"),Pi=sr(pn.a,"WeakMap"),Ni=Qn(ki),_i=Qn(cr),Di=Qn(Li),Ri=Qn(xi),Fi=Qn(Pi),Mi=En;(ki&&"[object DataView]"!=Mi(new ki(new ArrayBuffer(1)))||cr&&"[object Map]"!=Mi(new cr)||Li&&"[object Promise]"!=Mi(Li.resolve())||xi&&"[object Set]"!=Mi(new xi)||Pi&&"[object WeakMap]"!=Mi(new Pi))&&(Mi=function(e){var t=En(e),n="[object Object]"==t?e.constructor:void 0,r=n?Qn(n):"";if(r)switch(r){case Ni:return"[object DataView]";case _i:return"[object Map]";case Di:return"[object Promise]";case Ri:return"[object Set]";case Fi:return"[object WeakMap]"}return t});var Ui=Mi,Vi=Object.prototype.hasOwnProperty;var zi=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Vi.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Bi=pn.a.Uint8Array;var Hi=function(e){var t=new e.constructor(e.byteLength);return new Bi(t).set(new Bi(e)),t};var qi=function(e,t){var n=t?Hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Ji=/\w*$/;var $i=function(e){var t=new e.constructor(e.source,Ji.exec(e));return t.lastIndex=e.lastIndex,t},Ki=fn?fn.prototype:void 0,Yi=Ki?Ki.valueOf:void 0;var Gi=function(e){return Yi?Object(Yi.call(e)):{}};var Wi=function(e,t){var n=t?Hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Zi=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Hi(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return qi(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Wi(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return $i(e);case"[object Set]":return new r;case"[object Symbol]":return Gi(e)}},Qi=Object.create,Xi=function(){function e(){}return function(t){if(!Jn(t))return{};if(Qi)return Qi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var ea=function(e){return"function"!=typeof e.constructor||ri(e)?{}:Xi(On(e))};var ta=function(e){return jn(e)&&"[object Map]"==Ui(e)},na=Zr.a&&Zr.a.isMap,ra=na?Wr(na):ta;var ia=function(e){return jn(e)&&"[object Set]"==Ui(e)},aa=Zr.a&&Zr.a.isSet,oa=aa?Wr(aa):ia,sa={};sa["[object Arguments]"]=sa["[object Array]"]=sa["[object ArrayBuffer]"]=sa["[object DataView]"]=sa["[object Boolean]"]=sa["[object Date]"]=sa["[object Float32Array]"]=sa["[object Float64Array]"]=sa["[object Int8Array]"]=sa["[object Int16Array]"]=sa["[object Int32Array]"]=sa["[object Map]"]=sa["[object Number]"]=sa["[object Object]"]=sa["[object RegExp]"]=sa["[object Set]"]=sa["[object String]"]=sa["[object Symbol]"]=sa["[object Uint8Array]"]=sa["[object Uint8ClampedArray]"]=sa["[object Uint16Array]"]=sa["[object Uint32Array]"]=!0,sa["[object Error]"]=sa["[object Function]"]=sa["[object WeakMap]"]=!1;var ca=function e(t,n,r,i,a,o){var s,c=1&n,l=2&n,u=4&n;if(r&&(s=a?r(t,i,a,o):r(t)),void 0!==s)return s;if(!Jn(t))return t;var p=Hr(t);if(p){if(s=zi(t),!c)return yi(t,s)}else{var f=Ui(t),d="[object Function]"==f||"[object GeneratorFunction]"==f;if(Object(qr.a)(t))return Object(hi.a)(t,c);if("[object Object]"==f||"[object Arguments]"==f||d&&!a){if(s=l||d?{}:ea(t),!c)return l?Ii(t,mi(s,t)):Ci(t,li(s,t))}else{if(!sa[f])return a?t:{};s=Zi(t,f,c)}}o||(o=new Lr);var m=o.get(t);if(m)return m;o.set(t,s),oa(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,o))})):ra(t)&&t.forEach((function(i,a){s.set(a,e(i,n,r,a,t,o))}));var h=u?l?wi:Ti:l?keysIn:ci,y=p?void 0:h(t);return xr(y||t,(function(i,a){y&&(i=t[a=i]),Dr(s,a,e(i,n,r,a,t,o))})),s};var la=function(e){return ca(e,4)};var ua=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var pa=function(e){return"symbol"==typeof e||jn(e)&&"[object Symbol]"==En(e)};function fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(fa.Cache||Tr),n}fa.Cache=Tr;var da=fa;var ma=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ha=/\\(\\)?/g,ya=function(e){var t=da(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ma,(function(e,n,r,i){t.push(r?i.replace(ha,"$1"):n||e)})),t}));var ga=function(e){if("string"==typeof e||pa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},va=fn?fn.prototype:void 0,ba=va?va.toString:void 0;var Sa=function e(t){if("string"==typeof t)return t;if(Hr(t))return ua(t,e)+"";if(pa(t))return ba?ba.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Ea=function(e){return null==e?"":Sa(e)};var Ca=function(e){return Hr(e)?ua(e,ga):pa(e)?[e]:yi(ya(Ea(e)))};var Oa=function(e,t){},ja=n(29),Ia=n(30),Aa=n.n(Ia);var Ta=function(e){return ca(e,5)};function wa(){return(wa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ka(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function La(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function xa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Pa=function(e){return"function"==typeof e},Na=function(e){return null!==e&&"object"==typeof e},_a=function(e){return String(Math.floor(Number(e)))===e},Da=function(e){return"[object String]"===Object.prototype.toString.call(e)},Ra=function(e){return 0===d.Children.count(e)},Fa=function(e){return Na(e)&&Pa(e.then)};function Ma(e,t,n,r){void 0===r&&(r=0);for(var i=Ca(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function Ua(e,t,n){for(var r=la(e),i=r,a=0,o=Ca(t);a<o.length-1;a++){var s=o[a],c=Ma(e,o.slice(0,a+1));if(c&&(Na(c)||Array.isArray(c)))i=i[s]=la(c);else{var l=o[a+1];i=i[s]=_a(l)&&Number(l)>=0?[]:{}}}return(0===a?e:i)[o[a]]===n?e:(void 0===n?delete i[o[a]]:i[o[a]]=n,0===a&&void 0===n&&delete r[o[a]],r)}function Va(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],s=e[o];Na(s)?n.get(s)||(n.set(s,!0),r[o]=Array.isArray(s)?[]:{},Va(s,t,n,r[o])):r[o]=t}return r}var za=Object(d.createContext)(void 0),Ba=za.Provider,Ha=za.Consumer;function qa(){var e=Object(d.useContext)(za);return e||Oa(!1),e}function Ja(e,t){switch(t.type){case"SET_VALUES":return wa({},e,{values:t.payload});case"SET_TOUCHED":return wa({},e,{touched:t.payload});case"SET_ERRORS":return wa({},e,{errors:t.payload});case"SET_STATUS":return wa({},e,{status:t.payload});case"SET_ISSUBMITTING":return wa({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return wa({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return wa({},e,{values:Ua(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return wa({},e,{touched:Ua(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return wa({},e,{errors:Ua(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return wa({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return wa({},e,{touched:Va(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return wa({},e,{isSubmitting:!1});default:return e}}var $a={},Ka={};function Ya(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,a=e.validateOnMount,o=void 0!==a&&a,s=e.isInitialValid,c=e.enableReinitialize,l=void 0!==c&&c,u=e.onSubmit,p=La(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=wa({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:u},p),m=Object(d.useRef)(f.initialValues),h=Object(d.useRef)(f.initialErrors||$a),y=Object(d.useRef)(f.initialTouched||Ka),g=Object(d.useRef)(f.initialStatus),v=Object(d.useRef)(!1),b=Object(d.useRef)({});Object(d.useEffect)((function(){0}),[]),Object(d.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var S=Object(d.useReducer)(Ja,{values:f.initialValues,errors:f.initialErrors||$a,touched:f.initialTouched||Ka,status:f.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),E=S[0],C=S[1],O=Object(d.useCallback)((function(e,t){return new Promise((function(n,r){var i=f.validate(e,t);null==i?n($a):Fa(i)?i.then((function(e){n(e||$a)}),(function(e){r(e)})):n(i)}))}),[f.validate]),j=Object(d.useCallback)((function(e,t){var n=f.validationSchema,r=Pa(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r={});var i=function e(t){var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=String(r);!0===Array.isArray(t[i])?n[i]=t[i].map((function(t){return!0===Array.isArray(t)||Ln(t)?e(t):""!==t?t:void 0})):Ln(t[i])?n[i]=e(t[i]):n[i]=""!==t[i]?t[i]:void 0}return n}(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){i.then((function(){e($a)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return Ua(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var o=a;Ma(t,o.path)||(t=Ua(t,o.path,o.message))}}return t}(n)):t(n)}))}))}),[f.validationSchema]),I=Object(d.useCallback)((function(e,t){return new Promise((function(n){return n(b.current[e].validate(t))}))}),[]),A=Object(d.useCallback)((function(e){var t=Object.keys(b.current).filter((function(e){return Pa(b.current[e].validate)})),n=t.length>0?t.map((function(t){return I(t,Ma(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Ua(e,t[r],n)),e}),{})}))}),[I]),T=Object(d.useCallback)((function(e){return Promise.all([A(e),f.validationSchema?j(e):{},f.validate?O(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return un.all([t,n,r],{arrayMerge:Wa})}))}),[f.validate,f.validationSchema,A,O,j]),w=Qa((function(e){return void 0===e&&(e=E.values),Object(ja.unstable_runWithPriority)(ja.LowPriority,(function(){return T(e).then((function(e){return v.current&&C({type:"SET_ERRORS",payload:e}),e}))}))})),k=Qa((function(e){return void 0===e&&(e=E.values),C({type:"SET_ISVALIDATING",payload:!0}),T(e).then((function(e){return v.current&&(C({type:"SET_ISVALIDATING",payload:!1}),rn()(E.errors,e)||C({type:"SET_ERRORS",payload:e})),e}))}));Object(d.useEffect)((function(){o&&!0===v.current&&w(f.initialValues)}),[f.initialValues,o,w]);var L=Object(d.useCallback)((function(e){var t=e&&e.values?e.values:m.current,n=e&&e.errors?e.errors:h.current?h.current:f.initialErrors||{},r=e&&e.touched?e.touched:y.current?y.current:f.initialTouched||{},i=e&&e.status?e.status:g.current?g.current:f.initialStatus;m.current=t,h.current=n,y.current=r,g.current=i,C({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})}),[f.initialErrors,f.initialStatus,f.initialTouched]);Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(m.current,f.initialValues)&&(m.current=f.initialValues,L())}),[l,f.initialValues,L]),Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(h.current,f.initialErrors)&&(h.current=f.initialErrors||$a,C({type:"SET_ERRORS",payload:f.initialErrors||$a}))}),[l,f.initialErrors]),Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(y.current,f.initialTouched)&&(y.current=f.initialTouched||Ka,C({type:"SET_TOUCHED",payload:f.initialTouched||Ka}))}),[l,f.initialTouched]),Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(g.current,f.initialStatus)&&(g.current=f.initialStatus,C({type:"SET_STATUS",payload:f.initialStatus}))}),[l,f.initialStatus,f.initialTouched]);var x=Qa((function(e){if(Pa(b.current[e].validate)){var t=Ma(E.values,e),n=b.current[e].validate(t);return Fa(n)?(C({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),C({type:"SET_ISVALIDATING",payload:!1})}))):(C({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return Promise.resolve()})),P=Object(d.useCallback)((function(e,t){var n=t.validate;b.current[e]={validate:n}}),[]),N=Object(d.useCallback)((function(e){delete b.current[e]}),[]),_=Qa((function(e){return C({type:"SET_TOUCHED",payload:e}),i?w(E.values):Promise.resolve()})),D=Object(d.useCallback)((function(e){C({type:"SET_ERRORS",payload:e})}),[]),R=Qa((function(e){return C({type:"SET_VALUES",payload:e}),n?w(e):Promise.resolve()})),F=Object(d.useCallback)((function(e,t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),M=Qa((function(e,t,r){return void 0===r&&(r=!0),C({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),n&&r?w(Ua(E.values,e,t)):Promise.resolve()})),U=Object(d.useCallback)((function(e,t){var n,r=t,i=e;if(!Da(e)){e.persist&&e.persist();var a=e.target,o=a.type,s=a.name,c=a.id,l=a.value,u=a.checked,p=(a.outerHTML,a.options),f=a.multiple;r=t||(s||c),i=/number|range/.test(o)?(n=parseFloat(l),isNaN(n)?"":n):/checkbox/.test(o)?function(e,t,n){if("true"==n||"false"==n)return!!t;if(t&&n)return Array.isArray(e)?e.concat(n):[n];if(!Array.isArray(e))return!e;var r=e.indexOf(n);if(r<0)return e;return e.slice(0,r).concat(e.slice(r+1))}(Ma(E.values,r),u,l):f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(p):l}r&&M(r,i)}),[M,E.values]),V=Object(d.useCallback)((function(e){if(Da(e))return function(t){return U(t,e)};U(e)}),[U]),z=Qa((function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),i&&n?w(E.values):Promise.resolve()})),B=Object(d.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,a=(n.outerHTML,t||(r||i));z(a,!0)}),[z]),H=Object(d.useCallback)((function(e){if(Da(e))return function(t){return B(t,e)};B(e)}),[B]),q=Object(d.useCallback)((function(e){Pa(e)?C({type:"SET_FORMIK_STATE",payload:e}):C({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),J=Object(d.useCallback)((function(e){C({type:"SET_STATUS",payload:e})}),[]),$=Object(d.useCallback)((function(e){C({type:"SET_ISSUBMITTING",payload:e})}),[]),K={resetForm:L,validateForm:k,validateField:x,setErrors:D,setFieldError:F,setFieldTouched:z,setFieldValue:M,setStatus:J,setSubmitting:$,setTouched:_,setValues:R,setFormikState:q},Y=Qa((function(){return u(E.values,K)})),G=Qa((function(){return C({type:"SUBMIT_ATTEMPT"}),k().then((function(e){if(0===Object.keys(e).length){var t=Y();if(void 0===t)return;return Promise.resolve(t).then((function(){v.current&&C({type:"SUBMIT_SUCCESS"})})).catch((function(e){if(v.current)throw C({type:"SUBMIT_FAILURE"}),e}))}v.current&&C({type:"SUBMIT_FAILURE"})}))})),W=Qa((function(e){e&&e.preventDefault&&Pa(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Pa(e.stopPropagation)&&e.stopPropagation(),G()})),Z=Qa((function(e){if(e&&e.preventDefault&&Pa(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Pa(e.stopPropagation)&&e.stopPropagation(),f.onReset){var t=f.onReset(E.values,K);Fa(t)?t.then(L):L()}else L()})),Q=Object(d.useCallback)((function(e){return{value:Ma(E.values,e),error:Ma(E.errors,e),touched:!!Ma(E.touched,e),initialValue:Ma(m.current,e),initialTouched:!!Ma(y.current,e),initialError:Ma(h.current,e)}}),[E.errors,E.touched,E.values]),X=Object(d.useCallback)((function(e){var t=Na(e),n=t?e.name:e,r=Ma(E.values,n),i={name:n,value:r,onChange:V,onBlur:H};if(t){var a=e.type,o=e.value,s=e.as,c=e.multiple;"checkbox"===a?void 0===o?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(o)),i.value=o):"radio"===a?(i.checked=r===o,i.value=o):"select"===s&&c&&(i.value=i.value||[],i.multiple=!0)}return i}),[H,V,E.values]),ee=Object(d.useMemo)((function(){return!rn()(m.current,E.values)}),[E.values]),te=Object(d.useMemo)((function(){return void 0!==s?ee?E.errors&&0===Object.keys(E.errors).length:!1!==s&&Pa(s)?s(f):s:E.errors&&0===Object.keys(E.errors).length}),[s,ee,E.errors,f]);return wa({},E,{initialValues:m.current,initialErrors:h.current,initialTouched:y.current,initialStatus:g.current,handleBlur:H,handleChange:V,handleReset:Z,handleSubmit:W,resetForm:L,setErrors:D,setFormikState:q,setFieldTouched:z,setFieldValue:M,setFieldError:F,setStatus:J,setSubmitting:$,setTouched:_,setValues:R,submitForm:G,validateForm:k,validateField:x,isValid:te,dirty:ee,unregisterField:N,registerField:P,getFieldProps:X,getFieldMeta:Q,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function Ga(e){var t=Ya(e),n=e.component,r=e.children,i=e.render;return Object(d.useEffect)((function(){0}),[]),Object(d.createElement)(Ba,{value:t},n?Object(d.createElement)(n,t):i?i(t):r?Pa(r)?r(t):Ra(r)?null:d.Children.only(r):null)}function Wa(e,t,n){var r=e.slice();return t.forEach((function(t,i){if(void 0===r[i]){var a=!1!==n.clone&&n.isMergeableObject(t);r[i]=a?un(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=un(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var Za="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d.useLayoutEffect:d.useEffect;function Qa(e){var t=Object(d.useRef)(e);return Za((function(){t.current=e})),Object(d.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}function Xa(e){var t=e.validate,n=e.name,r=e.render,i=e.children,a=e.as,o=e.component,s=La(e,["validate","name","render","children","as","component"]),c=qa(),l=(c.validate,c.validationSchema,La(c,["validate","validationSchema"]));Object(d.useEffect)((function(){0}),[]);var u=l.registerField,p=l.unregisterField;Object(d.useEffect)((function(){return u(n,{validate:t}),function(){p(n)}}),[u,p,n,t]);var f=l.getFieldProps(wa({name:n},s)),m=l.getFieldMeta(n),h={field:f,form:l};if(r)return r(wa({},h,{meta:m}));if(Pa(i))return i(wa({},h,{meta:m}));if(o){if("string"==typeof o){var y=s.innerRef,g=La(s,["innerRef"]);return Object(d.createElement)(o,wa({ref:y},f,g),i)}return Object(d.createElement)(o,wa({field:f,form:l},s),i)}var v=a||"input";if("string"==typeof v){var b=s.innerRef,S=La(s,["innerRef"]);return Object(d.createElement)(v,wa({ref:b},f,S),i)}return Object(d.createElement)(v,wa({},f,s),i)}var eo=Object(d.forwardRef)((function(e,t){var n=e.action,r=La(e,["action"]),i=n||"#",a=qa(),o=a.handleReset,s=a.handleSubmit;return Object(d.createElement)("form",Object.assign({onSubmit:s,ref:t,onReset:o,action:i},r))}));function to(e){var t=function(t){return Object(d.createElement)(Ha,null,(function(n){return n||Oa(!1),Object(d.createElement)(e,Object.assign({},t,{formik:n}))}))},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",Aa()(t,e)}eo.displayName="Form";var no=function(e,t,n){var r=ro(e);return r.splice(t,0,n),r},ro=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(wa({},e,{length:t+1}))}return[]},io=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name,o=i.validateOnChange,s=i.formik,c=s.setFormikState,l=s.validateForm;c((function(n){var i="function"==typeof r?r:e,o="function"==typeof t?t:e;return wa({},n,{values:Ua(n.values,a,e(Ma(n.values,a))),errors:r?Ua(n.errors,a,i(Ma(n.errors,a))):n.errors,touched:t?Ua(n.touched,a,o(Ma(n.touched,a))):n.touched})}),(function(){o&&l()}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(ro(t),[Ta(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=ro(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=ro(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return no(n,e,t)}),(function(t){return no(t,e,null)}),(function(t){return no(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=ro(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(xa(n)),n.pop=n.pop.bind(xa(n)),n}ka(t,e);var n=t.prototype;return n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?ro(n):[];return t||(t=r[e]),Pa(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=t.formik,s=(o.validate,o.validationSchema,wa({},e,{form:La(o,["validate","validationSchema"]),name:a}));return n?Object(d.createElement)(n,s):r?r(s):i?"function"==typeof i?i(s):Ra(i)?null:d.Children.only(i):null},t}(d.Component);io.defaultProps={validateOnChange:!0};var ao=to(function(e){function t(){return e.apply(this,arguments)||this}ka(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return Ma(this.props.formik.errors,this.props.name)!==Ma(e.formik.errors,this.props.name)||Ma(this.props.formik.touched,this.props.name)!==Ma(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},n.render=function(){var e=this.props,t=e.component,n=e.formik,r=e.render,i=e.children,a=e.name,o=La(e,["component","formik","render","children","name"]),s=Ma(n.touched,a),c=Ma(n.errors,a);return s&&c?r?Pa(r)?r(c):null:i?Pa(i)?i(c):null:t?Object(d.createElement)(t,o,c):c:null},t}(d.Component));(function(e){function t(t){var n;n=e.call(this,t)||this;var r=t.render,i=t.children,a=t.component,o=t.as;t.name;return r&&Oa(!1),a&&r&&Oa(!1),o&&i&&Pa(i)&&Oa(!1),a&&i&&Pa(i)&&Oa(!1),r&&i&&!Ra(i)&&Oa(!1),n}ka(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t,n){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):Ma(this.context.values,this.props.name)!==Ma(n.values,this.props.name)||Ma(this.context.errors,this.props.name)!==Ma(n.errors,this.props.name)||Ma(this.context.touched,this.props.name)!==Ma(n.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||this.context.isSubmitting!==n.isSubmitting},n.componentDidMount=function(){this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentDidUpdate=function(e){this.props.name!==e.name&&(this.context.unregisterField(e.name),this.context.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentWillUnmount=function(){this.context.unregisterField(this.props.name)},n.render=function(){var e=this.props,t=(e.validate,e.name),n=e.render,r=e.as,i=e.children,a=e.component,o=(e.shouldUpdate,La(e,["validate","name","render","as","children","component","shouldUpdate"])),s=this.context,c=(s.validate,s.validationSchema,La(s,["validate","validationSchema"])),l={value:"radio"===o.type||"checkbox"===o.type?o.value:Ma(s.values,t),name:t,onChange:s.handleChange,onBlur:s.handleBlur},u={field:l,meta:{value:Ma(s.values,t),error:Ma(s.errors,t),touched:!!Ma(s.touched,t),initialValue:Ma(s.initialValues,t),initialTouched:!!Ma(s.initialTouched,t),initialError:Ma(s.initialErrors,t)},form:c};if(n)return n(u);if(Pa(i))return i(u);if(a){if("string"==typeof a){var p=o.innerRef,f=La(o,["innerRef"]);return Object(d.createElement)(a,wa({ref:p},l,f),i)}return Object(d.createElement)(a,wa({field:l,form:s},o),i)}var m=r||"input";if("string"==typeof m){var h=o.innerRef,y=La(o,["innerRef"]);return Object(d.createElement)(m,wa({ref:h},l,y),i)}return Object(d.createElement)(m,wa({},l,o),i)},t}(d.Component)).contextType=za;var oo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function so(e){const{castInitialValues:t,castValuesOnSubmit:n,initialValues:r,onSubmit:i,resetOnSubmit:a}=e,o=oo(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit","resetOnSubmit"]),s=t&&e.validationSchema?e.validationSchema.cast(function e(t){const n=dt.deepClone(t);return Object.keys(n).forEach(t=>{n.hasOwnProperty(t)&&(dt.isObject(n[t])?n[t]=e(n[t]):null===n[t]&&delete n[t])}),n}(r)):r,c={allowInitialSubmit:e.allowInitialSubmit};return d.createElement(Ga,Object.assign({enableReinitialize:!0},o,{initialValues:s,onSubmit:(t,{setSubmitting:r,resetForm:o})=>{const s=n&&e.validationSchema?e.validationSchema.cast(t):t;i(s,()=>{a&&o(),r(!1)})},initialStatus:c}),X.isFunction(e.children)?t=>e.children(t):d.Children.count(e.children)?e.children:null)}so.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0};var co=n(2),lo=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),uo=n(3);const po={getCustomFormControlClassName(e,t,n,r){let i="form-control";return Ma(t,n)&&Ma(e,n)&&(i+=" is-invalid"),r&&(i+=" "+r),i}};function fo(e){const{values:t}=qa(),n=t[e.fieldName];return"string"!=typeof n?d.createElement(d.Fragment,null):d.createElement("div",{className:"float-right text-muted"},n.length,"/",e.limit)}var mo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ho(e){const{label:t}=e,n=mo(e,["label"]);return d.createElement(uo.Form.Group,null,d.createElement("div",{className:"custom-control custom-checkbox"},d.createElement(go,Object.assign({className:"custom-control-input"},n)),d.createElement(uo.Form.Label,{className:"custom-control-label",htmlFor:n.id},t)))}var yo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function go(e){const{children:t}=e,n=yo(e,["children"]);return d.createElement(Xa,Object.assign({},n),X.isFunction(t)?e=>t(e):d.Children.count(t)?t:null)}function vo(e){const{label:t,className:n,showCharacterCounter:r}=e,i=yo(e,["label","className","showCharacterCounter"]),{errors:a,touched:o}=qa();return"checkbox"===i.type?d.createElement(ho,Object.assign({},e)):d.createElement(uo.Form.Group,null,!!t&&d.createElement(uo.Form.Label,{htmlFor:i.id},t),d.createElement(go,Object.assign({className:po.getCustomFormControlClassName(a,o,i.name,n)},i)),!!r&&!!i.maxLength&&d.createElement(fo,{fieldName:i.name,limit:i.maxLength}),d.createElement(ao,{name:i.name},e=>d.createElement(uo.Form.Control.Feedback,{type:"invalid"},e)))}function bo(e){var t;const[n,r]=d.useState(!1);return d.useEffect(()=>{var t;e.isValid&&(e.dirty||(null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit))?r(!0):r(!1)},[e.isValid,null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit,e.dirty,e.values]),d.useEffect(()=>{e.isSubmitting&&r(!1)},[e.isSubmitting]),n}var So=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Eo(e){const{showSpinner:t,children:n}=e,r=So(e,["showSpinner","children"]),i=d.useRef(),[a,o]=d.useState({});return d.useEffect(()=>{const{width:e,height:t}=a;if(e&&t)return;const n=i.current,r=n.offsetHeight,s=n.offsetWidth;r&&s&&o({width:s,height:r})}),d.useEffect(()=>{const{width:e,height:t}=a;if(!e||!t)return;const n=i.current;n.style.width=e+1+"px",n.style.height=t+1+"px"},[a]),d.createElement(uo.Button,Object.assign({ref:i,disabled:t},r),t?d.createElement(uo.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):n)}var Co=n(124),Oo=n(21);const jo="AlertService",Io="LanguageService";const Ao=class extends G{static get Instance(){return this.instance||(this.instance=new this)}get name(){return Io}setConfig(e){this.polyglot=new Co({locale:e.locale,phrases:e.phrases.rootElement||e.phrases}),this.cache={}}getPhrase(e,t,n){const r=`${e}.${t}`;if(this.polyglot||P.throw(new z("LanguageService config must be set.")),!this.polyglot.has(r)){if(!w.isDevelopment){const e=window.trackJs;return e&&e.console.error(`No phrase set for ${r} in language config`),""}P.throw(new z(`No phrase set for ${r} in language config.`))}if(!n||m.isEmpty(n)){const e=this.cache[r];if(e)return e;const t=this.polyglot.t(r);return this.cache[r]=t,t}const i=m.omit(n,"smartCount");let a={};for(let e in i)a[e]=Oo.sanitize(i[e]);m.isNumber(n.smartCount)&&(a.smart_count=n.smartCount);const o=`${r}:${m.values(Object.assign({},a)).join(":")}`,s=this.cache[o];if(s)return s;const c=this.polyglot.t(r,a);return this.cache[o]=c,c}encloseNamespace(e){return(t,n)=>this.getPhrase(e,t,n)}}.Instance,To=d.createContext(""),wo=d.memo((function(e){const{phrase:t,namespace:n,options:r}=e,i=d.useContext(To),a=n||i,o=Ao.getPhrase(a,t,r);return d.createElement("span",{dangerouslySetInnerHTML:{__html:o}})}),(e,t)=>e.namespace===t.namespace&&e.phrase===t.phrase&&dt.isEqual(e.options,t.options));function ko(e){const t=qa(),n=bo(t);d.useEffect(()=>{function e(e){13===e.keyCode&&n&&t.validateForm().then(e=>{Object.keys(e).length||t.submitForm()})}return window.addEventListener("keypress",e),()=>window.removeEventListener("keypress",e)},[n]);let r="save";return e.isNew&&(r="create"),e.hasNext&&(r="next"),d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},d.createElement(wo,{namespace:"shared.formButtons",phrase:r}))}function Lo(e){var t=qa();return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this company",autoFocus:!0}),d.createElement(ko,{isNew:e.isNew}))}function xo(e){return d.createElement(so,{initialValues:e.company,validationSchema:lo,onSubmit:e.saveCompany},d.createElement(Lo,{isNew:!(e.company&&e.company.id)}))}function Po(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(Xt(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(xo,{company:n.data,saveCompany:function(n,r){return i.fetch(t,tn(e.id,n,r))}}))}function No(){var e=Object(te.useDispatch)();return d.createElement(xo,{saveCompany:function(t,n){i.fetch(e,en(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.Companies.EDIT_COMPANY,args:[e.id]})}),n))}})}var _o,Do=n(125);!function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)"}(_o||(_o={}));const Ro={isNumber:e=>Ro.isType(e,"number"),isString:e=>Ro.isType(e,"string"),isType:(e,t)=>typeof e===t};var Fo,Mo=n(14),Uo=n.n(Mo);function Vo(e,t){return dt.isObject(e)&&e.hasOwnProperty(t)&&Ro.isString(e[t])}function zo(e,t,n){return({value:r})=>{if(r.length||n(),!(r.length<e.activationLength)){if(e.local){const n=X.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(r,e.local):function(e,t,n){const r=e.trim().toLowerCase();return r.length?t.filter(e=>!(!Vo(e,n)||!Ro.isString(e[n]))&&e[n].trim().toLowerCase().includes(r)):[]}(r,e.local,e.valueKey);t(e=>Object.assign(Object.assign({},e),{[Fo.Local]:n}))}e.getRemoteUrl&&function(e,t,n){const r=X.isFunction(e)&&e(t);r&&i.ajaxRequest({resource:r,type:it.GET,success:n,error:()=>{}})}(e.getRemoteUrl,r,n=>t(t=>Object.assign(Object.assign({},t),{[Fo.Remote]:X.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n})))}}}function Bo(e,t,n,r,i,a){const o=t=>e[t]||[],s=t?o(Fo.Recent):[],c=o(Fo.Local),l=o(Fo.Remote);let u=[];s.length&&u.push({title:n,data:s});const p=[...c,...l];return Number.isInteger(a)&&u.length>a&&p.slice(0,a),X.isFunction(i)?u.push(...i(p)):u.push({title:r,data:p}),u}function Ho(e){return e.data}function qo(e){if(e.title)return d.createElement("strong",null,e.title)}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote"}(Fo||(Fo={}));const Jo={container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded "+Uo.a.suggestionsContainerOpen,suggestionsList:"list-unstyled m-0",suggestion:"cursor-pointer py-1 px-2",suggestionHighlighted:Uo.a.suggestionHighlighted,sectionContainer:"border-bottom py-1 "+Uo.a.sectionContainer};function $o(e={}){return Object.assign(Jo,e)}var Ko=n(15),Yo=n(32),Go=n.n(Yo),Wo=n(33),Zo=n.n(Wo),Qo=n(34),Xo=n.n(Qo),es=n(35),ts=n.n(es),ns=(n(36),n(37),n(38)),rs=n.n(ns),is=n(39),as=n.n(is),os=n(40),ss=n.n(os),cs=n(41),ls=n.n(cs),us=n(42),ps=n.n(us),fs=n(43),ds=n.n(fs),ms=n(44),hs=n.n(ms),ys=n(45),gs=n.n(ys),vs=n(46),bs=n.n(vs),Ss=n(47),Es=n.n(Ss),Cs=n(48),Os=n.n(Cs),js=n(49),Is=n.n(js),As=n(50),Ts=n.n(As),ws=n(51),ks=n.n(ws),Ls=n(52),xs=n.n(Ls),Ps=n(53),Ns=n.n(Ps),_s=n(54),Ds=n.n(_s),Rs=n(55),Fs=n.n(Rs),Ms=n(56),Us=n.n(Ms),Vs=n(57),zs=n.n(Vs),Bs=(n(58),n(59)),Hs=n.n(Bs),qs=n(60),Js=n.n(qs),$s=n(61),Ks=n.n($s),Ys=(n(62),n(63),n(64)),Gs=n.n(Ys),Ws=n(65),Zs=n.n(Ws),Qs=n(66),Xs=n.n(Qs),ec=n(67),tc=n.n(ec),nc=n(68),rc=n.n(nc),ic=n(69),ac=n.n(ic),oc=(n(70),n(71)),sc=n.n(oc),cc=n(72),lc=n.n(cc),uc=n(73),pc=n.n(uc),fc=n(74),dc=n.n(fc),mc=n(75),hc=n.n(mc),yc=n(76),gc=n.n(yc),vc=n(77),bc=n.n(vc),Sc=(n(78),n(79)),Ec=n.n(Sc),Cc=n(80),Oc=n.n(Cc),jc=n(81),Ic=n.n(jc),Ac=n(82),Tc=n.n(Ac),wc=n(83),kc=n.n(wc),Lc=n(84),xc=n.n(Lc),Pc=n(85),Nc=n.n(Pc),_c=n(86),Dc=n.n(_c),Rc=n(87),Fc=n.n(Rc),Mc=n(88),Uc=n.n(Mc),Vc=n(89),zc=n.n(Vc),Bc=n(90),Hc=n.n(Bc),qc=n(91),Jc=n.n(qc),$c=(n(92),n(93),n(94),n(95)),Kc=n.n($c),Yc=(n(96),n(97),n(98),n(99),n(100)),Gc=n.n(Yc),Wc=n(101),Zc=n.n(Wc),Qc=(n(102),n(103),n(104),n(105)),Xc=n.n(Qc),el=n(106),tl=n.n(el),nl=n(107),rl=n.n(nl),il=n(108),al=n.n(il),ol=n(109),sl=n.n(ol),cl=n(110),ll=n.n(cl),ul=n(111),pl=n.n(ul),fl=(n(112),n(113),n(114),n(115)),dl=n.n(fl),ml=n(116),hl=n.n(ml);const yl=[Go.a,Xo.a,ts.a,rs.a,ls.a,ps.a,ds.a,hs.a,ss.a,Zo.a,gs.a,bs.a,Es.a,Os.a,Is.a,as.a,Ts.a,ks.a,xs.a,zs.a,Ns.a,Ds.a,Fs.a,Us.a,Hs.a,Xs.a,Nc.a,Fc.a,Dc.a,Jc.a,Uc.a,zc.a,Hc.a,dc.a,gc.a,hc.a,Js.a,Ks.a,lc.a,pc.a,sc.a,Gs.a,tc.a,Oc.a,Ic.a,rc.a,ac.a,Tc.a,Zs.a,Ec.a,kc.a,xc.a,bc.a,Gc.a,Zc.a,Kc.a,rl.a,tl.a,Xc.a,al.a,ll.a,sl.a,pl.a,hl.a,dl.a];var gl;!function(e){e.AddToPlaylists="add-to-playlist",e.Caret="caret",e.Delete="delete",e.Edit="edit",e.NoEdit="no-edit",e.Close="close",e.Folder="folder",e.Resources="resources",e.More="more",e.Bell="bell",e.Plus="plus",e.Search="search",e.Share="share",e.Upload="upload",e.Preview="preview",e.CircleCheck="circle-check",e.Down="down",e.Right="right",e.UpDown="up-down",e.ChevronUp="chevron-up",e.ChevronDown="chevron-down",e.ChevronLeft="chevron-left",e.ChevronRight="chevron-right",e.VisibleOff="visible-off",e.VisibleOn="visible-on",e.PublisherArchive="publisher-archive",e.Play="play",e.PlayCircle="play-circle",e.ArrowLeft="arrow-left",e.CheckCircleOutline="check-circle-o",e.CheckCircle="check-circle",e.Check="check",e.Lock="lock",e.Link="link",e.Info="info",e.Question="question",e.Star="star",e.StarOutline="star-o",e.Archive="archive",e.Warning="warning",e.WarningOutline="warning-o",e.NewWindow="new-window",e.File="file",e.FilePDF="file-pdf",e.FileExcel="file-excel",e.FilePowerpoint="file-ppt",e.FileWord="file-word",e.FileImg="file-img",e.FileZip="file-zip",e.Enter="enter",e.Calendar="calendar",e.CloseCaption="close-caption",e.CloseCaptionBadge="close-caption-badge",e.Playlist="playlist",e.Handle="handle",e.Subject="subject",e.Series="series",e.EditClickView="edit-clickview",e.Heart="heart",e.HeartOutline="heart-outline",e.WhiteWave="white-wave",e.Cog="cog",e.Video="video",e.Compass="compass",e.History="history",e.Tag="tag"}(gl||(gl={}));m.extend(Ko.config,{autoReplaceSvg:!1,autoAddCss:!1,familyPrefix:"cv",autoA11y:!0,observeMutations:!1,replacementClass:"cv-svg",keepOriginalSource:!1}),Ko.library.add(...yl);const vl="cv";const bl=class{constructor(){}static get Instance(){return this.instance||(this.instance=new this)}getSvg(e,t={}){const n=this.faIconLookup(e,t),r=this.getIcon(n,t);if(r&&(!r||r.html.length))return r.html.pop()}getIcon(e,t){return Ko.icon(e,t.iconOptions||{})}faIconLookup(e,t){let{prefix:n=vl}=t;return Ko.findIconDefinition({prefix:n,iconName:e})}}.Instance,Sl=gl,El={getRandomInt:(e=1e4)=>Math.floor(Math.random()*Math.floor(e))};function Cl(e){const{title:t,placement:n,trigger:r,children:i}=e;return d.createElement(uo.OverlayTrigger,{placement:n,overlay:d.createElement(uo.Tooltip,{id:`${t}-${El.getRandomInt()}`},t),trigger:r},i)}Cl.defaultProps={trigger:["hover","click","focus"],placement:"top"};const Ol="d-inline-block svg-container",jl="span";var Il;function Al(e){const{svgName:t,className:n=Ol,tagName:r=jl,size:i=Il.Standard,onClick:a,title:o,tooltipPlacement:s="right"}=e,c=r,l={dangerouslySetInnerHTML:{__html:bl.getSvg(t)},className:`${n} ${i}`,onClick:X.isFunction(a)?a:null};return o?d.createElement(Cl,{title:o,placement:s},d.createElement(c,Object.assign({},l))):d.createElement(c,Object.assign({},l))}!function(e){e.Standard="std",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xlg"}(Il||(Il={}));var Tl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const wl=e=>{const t="d-inline-block svg-container";return X.isFunction(e)?t+" cursor-pointer":t};function kl(e){const{onClickSearchIcon:t,searchIconPlacement:n,className:r}=e,i=Tl(e,["onClickSearchIcon","searchIconPlacement","className"]);let a="form-control "+Uo.a.input,o="input-group-text bg-white";"right"===n&&(a+=" border-right-0",o+=" pl-0"),"left"===n&&(a+=" border-left-0",o+=" pr-0"),r&&(a+=" "+r);const s=()=>d.createElement("div",{className:o},d.createElement(Al,{svgName:Sl.Search,size:Il.Small,onClick:t,className:wl(t)}));return d.createElement("div",{className:"input-group"},"left"===n&&d.createElement("div",{className:"input-group-prepend"},d.createElement(s,null)),d.createElement("input",Object.assign({className:a},i)),"right"===n&&d.createElement("div",{className:"input-group-append"},d.createElement(s,null)))}const Ll=X.isFunction;function xl(e){const t=(n=e.initialSuggestions,r=e.recentSearches,{[Fo.Recent]:r,[Fo.Local]:n,[Fo.Remote]:[]});var n,r;const[i,a]=d.useState(e.initialQuery||""),[o,s]=d.useState(t),c=function(e){const[t,n]=Object(d.useState)(window.matchMedia(e).matches);return Object(d.useEffect)(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const i=()=>n(r.matches);return r.addListener(i),()=>r.removeListener(i)},[e]),t}(_o.XS),l=()=>{s(t)},u=t=>{t.preventDefault(),Ll(e.onSubmit)&&e.onSubmit(i)};return d.createElement("form",{onSubmit:u},d.createElement(Do,{suggestions:Bo(o,!i,e.recentSearchHeading||Ao.getPhrase("shared.searchBar","recentSearchHeading"),e.suggestionsHeading,e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:zo(e,s,l),onSuggestionsClearRequested:()=>{e.alwaysRenderSuggestions||l()},onSuggestionSelected:(t,{suggestion:n})=>{e.clearQueryOnSelect&&a(""),e.onSuggestionSelected(n)},getSuggestionValue:t=>e.updateQueryOnSelection?function(e,t){return Vo(t,e)?t[e]:""}(e.valueKey,t):i,renderSuggestion:t=>Ll(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return Vo(t,e)?d.createElement(d.Fragment,null,t[e]):d.createElement(d.Fragment,null)}(e.valueKey,t),alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!c,inputProps:{placeholder:e.placeholder||Ao.getPhrase("shared.searchBar","placeholder"),value:i,onChange:(t,{newValue:n})=>{a(n),Ll(e.onQueryChange)&&e.onQueryChange(n)},onKeyDown:t=>{8===t.keyCode&&e.onBackspace&&!i&&e.onBackspace()},autoFocus:!!e.autoFocusInput,onClickSearchIcon:!!e.submitOnClickSearchIcon&&u,searchIconPlacement:e.searchIconPlacement},renderInputComponent:kl,theme:$o(e.theme),multiSection:!0,renderSectionTitle:qo,getSectionSuggestions:Ho}))}function Pl(e){const{appLink:t,className:n,children:i,tag:a="a"}=e;if(!t)return d.createElement("span",{className:n||""},i);let o=e.onClick;o||(o=e=>{e.preventDefault(),r.AppLinkHelper.trigger(t)});const s={onClick:o,href:r.AppLinkHelper.getHref(t),className:n};return d.createElement(a,Object.assign({},s),i)}function Nl(e){var t=e.backToName,n=e.appLink;return d.createElement(Pl,{appLink:n,className:"d-inline-flex align-items-center"},d.createElement(Al,{svgName:Sl.ArrowLeft,size:Il.Small}),d.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}function _l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}xl.defaultProps={updateQueryOnSelection:!0,valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialSuggestions:[],searchIconPlacement:"right"};var Rl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Fl(e){var t=e.selected,n=e.onToggle,r=Rl(e,["selected","onToggle"]),i=_l(d.useState(t),2),a=i[0],o=i[1];d.useEffect((function(){return o(t)}),[t]);return d.createElement(uo.Form.Check,Object.assign({type:"checkbox",id:"checkbox-".concat(El.getRandomInt()),checked:a,onChange:function(){o(!a),n(!a)}},r))}var Ml,Ul,Vl,zl,Bl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Hl(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,a=e.error,o=e.touched,s=Bl(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),c="custom-file-input cursor-pointer";a&&o&&(c+=" is-invalid");var l=Object.assign({type:"file",className:c,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&X.isFunction(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"custom-file"},d.createElement(Xa,Object.assign({},l,s),e.children),d.createElement(uo.Form.Label,{className:"custom-file-label",htmlFor:s.id},i)))}!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(Ml||(Ml={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners"}(Ul||(Ul={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(Vl||(Vl={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(zl||(zl={}));const ql={urlBuilder(e,t){const n=m.map(t,(e,t)=>{if(t&&Array.isArray(e)){return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&")}return t&&void 0!==e?`${t}=${encodeURIComponent(e)}`:""}),r=m.reduce(n,(e,t)=>t?e?`${e}&${t}`:t:e);return r?`${e}?${r}`:e},buildFilter(e){let t=[];if(e.limit&&t.push("limit:"+e.limit),e.cursor&&t.push("page:"+e.cursor),e.before&&t.push("dateCreated:..."+e.before),t.length)return t.join(",")},makeHttps:e=>m.isString(e)?-1===e.indexOf("http://")?e:e=e.replace("http://","https://"):e,safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith("/")||(n+="/"),t?(n+=t.startsWith("/")?t.slice(1):t,n):n}};var Jl;!function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(Jl||(Jl={}));const $l={[Ul.Banners]:Jl.Banner,[Ul.Thumbnails]:Jl.Thumbnail},Kl=e=>"/v1/category-map/"+e,Yl={createUrl:(e,t)=>Yl._createUrl(e,t),createBannerUrl:(e,t,n)=>e&&e.url?Yl._createUrl(e.url,n):Yl._createCategoryMappedUrl(t,n),Rfc3986EncodeURIComponent:e=>encodeURIComponent(e).replace(/[!'()*]/g,escape),_createCategoryMappedUrl(e,t){const{fallbackBaseUrl:n,fallbackCategoryName:r,type:i}=e,a=ql.safeUrlConcat(n,""+Kl($l[i])),o=Object.assign({name:Yl.Rfc3986EncodeURIComponent(r)},t);return Yl._createUrl(a,o)},_createUrl(e,t){if(!e)return;if(dt.isEmpty(t))return e;const n=$.param(t),r=-1===e.indexOf("?")?"?":"&";return ql.safeUrlConcat(e,`${r}${n}`)},legacyCreateThumbnailUrl(e,t){if(!e)return"";let n;if(!e)return;if(n=e instanceof r.Model?e.get("url"):"string"==typeof e?e:e.url,!n)return;const i=Object.assign({size:Ml.Small,bgColor:"000"},t);return Yl._createUrl(n,i)}},Gl={[Ul.Thumbnails]:{width:1280,height:720},[Ul.Banners]:{width:3600,height:666},[Ul.Covers]:{width:1080,height:1080},[Ul.Posters]:{width:1e3,height:1500},[Ul.TallPosters]:{width:1080,height:1920},[Ul.HeroBanners]:{width:1920,height:640}};var Wl,Zl={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return Zl.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=Gl[t].width,a=Gl[t].height;r.addEventListener("load",(function(){Zl.isImageValid(t,r)&&X.isFunction(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(a))}))},isImageValid:function(e,t){var n=Gl[e].width,r=Gl[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}},Ql={isItemActive:function(e,t){return t||(t=r.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)}};!function(e){e.Developer="Curator Devs",e.Content="Content",e.Curator="Curators",e.Support="Support",e.SalesSupport="Sales Support"}(Wl||(Wl={}));var Xl=function(){return[{value:"protected",access:"r"}]},eu=function(e){return[Wl.Developer,Wl.Content].some((function(t){return su.getGroupNames(e).includes(t)}))},tu=function(e){return Object.values(e).every((function(e){return!!e}))},nu=function(e,t){return!!e&&!!t&&e.toString()===t.toString()},ru=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function iu(e){return function(e){if(Array.isArray(e))return au(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return au(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return au(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function au(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ou={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(nu(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var a=e(r[i]);if(a)return a}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var a=ou.find(e,i);a&&(n=[a].concat(iu(n))),i=a?r(a):null}return n}},su={getGroupNames:function(e){return e&&e.groups?e.groups.map((function(e){return e.name})):[]}};function cu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return lu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uu=d.createContext(void 0),pu=function(e){var t=e.children,n=cu(d.useState(),2),r=n[0],i=n[1],a=cu(d.useState(!1),2),o=a[0],s=a[1],c=cu(d.useState(),2),l=c[0],u=c[1],p={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:o,getImage:function(){var e=l;return u(null),s(!1),e},setImage:function(e){u(e),s(!0)}};return d.createElement(uu.Provider,{value:p},t)};const fu=class extends G{constructor(){super(),this.constructors={},this.destructors={},this.instances={},this.singletonInstances={},this.referenceCounts={}}get name(){return"InstanceManager"}static get Instance(){return this.instance||(this.instance=new this)}registerDataService(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e({dataProvider:this.getInstance(t.dataProvider),cache:this.getInstance(t.cache),bootstrapData:t.bootstrapData,defaultErrorHandler:t.defaultErrorHandler,alertService:t.alertService}),this.destructors[n]=()=>{this.instances[n]?this.instances[n].destroy():P.throw(new z(`Trying to destroy a ${n} instance that has already been destroyed`)),this.releaseInstance(t.dataProvider),this.releaseInstance(t.cache)},this}registerInstance(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e(t),this.destructors[n]=()=>m.isFunction(this.instances[n].destroy)&&this.instances[n].destroy(),this}registerSingleton(e){const t=e.name;return this.singletonInstances[t]=e,this}getInstance(e,t){return this.singletonInstances[e]?this.singletonInstances[e]:(this.constructors[e]||P.throw(new z(`${e} was not registered with ${this.name}`)),this.referenceCounts[e]++,t&&this.listenTo(t,"destroy",()=>this.releaseInstance(e)),this.instances[e]||(this.instances[e]=this.constructors[e]()),this.instances[e])}releaseInstance(e){if(this.instances[e])return window.setTimeout(()=>{this.referenceCounts[e]--,this.referenceCounts[e]<1&&(this.destructors[e](),delete this.instances[e])},0),this}validateConstructor(e){const t=e.prototype.name;t||P.throw(new z(`Classes registered with ${this.name} must have a unique name property.`)),this.constructors[t]&&P.throw(new z(`A class with the name: ${t} has already been registered with ${this.name}`))}}.Instance,du={fetch(e,t){const{dataServiceName:n,eventPrefix:r,fetchData:i,setData:a,onError:o,deleteEventPrefix:s}=e;if(!X.isFunction(i))return void P.throw(new z("A fetchData function must be passed to fetch"));if(!X.isFunction(a))return void P.throw(new z("A setData function must be passed to fetch"));const c=o&&X.isFunction(o),l=fu.getInstance(n),u=h.Radio.channel(l.channelName),p=r+":request",f=r+":sync",d=r+":error",m=r+":invalidate",y=s&&s+":sync",g=()=>t(!1),v=()=>t(!0),b=()=>t(!1),S=()=>u.off(m,b);u.once(p,g),u.once(f,v),u.once(m,b),c&&u.once(d,o),y&&u.once(y,S);const E=i(l);return E&&(t(!0),e.setData(E)),()=>{fu.releaseInstance(n),u.off(p,g),u.off(f,v),u.off(m,b),c&&u.off(d,o),y&&u.off(y,S)}}};function mu(e,t,n=!0){const[r,i]=d.useState(!1);d.useEffect(()=>{i(!1)},[...t]),d.useEffect(()=>{if(n)return du.fetch(e,i)},[r,n])}const hu="UserDataService",yu="user:data:service",gu="current:user",vu="workspace";class bu extends De{get name(){return hu}get channelName(){return yu}getCurrentUser(e,t){return this.get({resource:"/api/currentuser",eventPrefix:gu,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}getWorkspace(e,t){return this.get({resource:"/api/domain/v2/me/workspace?query=categorytree",eventPrefix:vu,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}}const Su={dataServiceName:hu,dataChannelName:yu},Eu={getCurrentUserFetchOptions:(e,t)=>Object.assign(Object.assign({},Su),{eventPrefix:gu,fetchData:e=>e.getCurrentUser(),setData:e,onError:t}),currentUser:{dataServiceName:hu,eventName:gu+":sync",getData:e=>e.getCurrentUser(),getInstance:e=>fu.getInstance(hu,e),beforeOnBeforeRender:!0}};function Cu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ou(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ou(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ou(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ju,Iu=d.createContext(void 0);function Au(e){var t=e.children,n=Cu(d.useState(),2),r=n[0],i=n[1];return mu(Eu.getCurrentUserFetchOptions(i),[]),d.createElement(Iu.Provider,{value:r},t)}function Tu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ku(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lu=(ku(ju={},Ul.Thumbnails,"Thumbnail"),ku(ju,Ul.Banners,"Banner"),ku(ju,Ul.Avatars,"Avatar"),ku(ju,Ul.Logos,"Logo"),ku(ju,Ul.Covers,"Cover"),ku(ju,Ul.Posters,"Poster"),ku(ju,Ul.TallPosters,"Tall Poster"),ku(ju,Ul.HeroBanners,"Hero Banner"),ju);function xu(e){var t,n=qa(),i=Ma(null===(t=n)||void 0===t?void 0:t.values,e.fieldName),a=d.useContext(uu),o=a.setDataUrl,s=a.getImage,l=a.imageUploaded,u=Tu(d.useState(!1),2),p=u[0],f=u[1],m=Tu(d.useState(i),2),h=m[0],y=m[1],g=Tu(d.useState(!1),2),v=g[0],b=g[1];function S(t){f(!0),o(t.src),r.AppLinkHelper.trigger({application:e.application,action:e.uploadAction,args:[e.imageType]})}d.useEffect((function(){if(p){var t,r=s();if(r)f(!1),y(r),t=r,X.isFunction(e.setSelectedImage)?e.setSelectedImage(t):n&&n.setFieldValue(e.fieldName,{fileId:t.id,fileIdType:zl.ImageAPIv2})}}),[l]);var E=e.label||Lu[e.imageType]||"Image";return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"form-control h-auto py-2"},d.createElement("label",null,E),d.createElement("em",{className:"ml-1 text-muted"},"(Minimum dimensions are ".concat(Gl[e.imageType].width,"px")+" x ".concat(Gl[e.imageType].height,"px)")),d.createElement(Hl,{label:"Choose a ".concat(E.toLowerCase()),name:"image",mimeType:c.IMAGES,onFileSelect:function(t){return Zl.onFileSelect(e.imageType,t,S)}}),!!h&&!!h.url&&d.createElement(d.Fragment,null,!v&&d.createElement("div",{className:"pb-2 ".concat(e.imageType===Ul.Banners?"w-100":"w-50")},d.createElement("img",{src:Yl.createUrl(h.url),className:"img img-fluid"})),d.createElement("div",{className:"d-flex justify-content-center"},d.createElement(Al,{svgName:v?Sl.ChevronDown:Sl.ChevronUp,size:Il.Large,className:"svg-container cursor-pointer",onClick:function(){return b(!v)},title:v?"Show image":"Hide image",tooltipPlacement:"top"})))))}var Pu,Nu=n(126),_u=n.n(Nu);function Du(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ru(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ru(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ru(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(Pu||(Pu={}));var Fu=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function Mu(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,a=e.onCancel,o=d.useRef(),s=d.useRef(),c=Du(d.useState(!1),2),l=c[0],u=c[1],p=Du(d.useState(!1),2),f=p[0],m=p[1];return d.useEffect((function(){var e=new Image;e.src=t;var i=o.current.offsetWidth/e.width;return s.current=new _u.a(o.current,{viewMode:Pu.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return u(!0)}}),function(){return s.current.destroy()}}),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement("img",{ref:o,src:t,className:"img img-fluid mw-100"})),d.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},d.createElement(uo.Button,{variant:"link",onClick:a},"Cancel"),d.createElement(Eo,{onClick:function(){if(l){m(!0);var e=s.current.getCroppedCanvas().toDataURL(function(e){var t=e.match(Fu);if(t)return t[1]}(t));X.isFunction(i)&&i(e)}},disabled:!l,showSpinner:f},"Crop")))}function Uu(e,t){return t?{application:e.application,action:e.action,args:e.args,params:Object.assign({},e.params,{cursor:t})}:null}function Vu({appLink:e,cursors:t,className:n}){return d.createElement(To.Provider,{value:"shared.pagination"},d.createElement("div",{className:n},d.createElement(Pl,{appLink:Uu(e,t.previous),className:"btn btn-secondary mr-1 "+(t.previous?"":"disabled")},d.createElement(wo,{phrase:"previous"})),d.createElement(Pl,{appLink:Uu(e,t.next),className:"btn btn-secondary "+(t.next?"":"disabled")},d.createElement(wo,{phrase:"next"}))))}function zu(e){if(!e.collection)return d.createElement(d.Fragment,null);var t=e.collection,n=t.data,r=t.pagination;return d.createElement(d.Fragment,null,!!n&&d.createElement(Xu,{objects:n,getObjectAppLink:e.getObjectAppLink,newObjectAppLink:e.newObjectAppLink,objectName:e.objectName}),!!r&&!!r.cursors&&d.createElement(Vu,{cursors:r.cursors,appLink:e.collectionAppLink}))}Vu.defaultProps={className:"py-2"};var Bu=n(22),Hu=n.n(Bu);function qu(e){let t="dropdown-item";return e&&(t+=" "+e),t}function Ju(e){if(!e.actions||!e.actions.length)return d.createElement(d.Fragment,null);const t="actions-dropdown-"+El.getRandomInt();let n="px-0 "+Hu.a.dropdownToggle;return e.dropdownToggleClassName&&(n+=" "+e.dropdownToggleClassName),d.createElement(uo.Dropdown,{className:e.className?e.className:"",alignRight:!0},d.createElement(uo.Dropdown.Toggle,{as:"button",type:"button",id:t,className:n},d.createElement(Al,{svgName:Sl.More,size:Il.Small})),d.createElement(uo.Dropdown.Menu,null,e.actions.map((e,t)=>d.createElement(Pl,{key:t,appLink:e.appLink,className:qu(e.className)},e.label))))}Ju.defaultProps={dropdownToggleClassName:"btn btn-light"};var $u=n(18),Ku=n.n($u);function Yu(e){const{svgName:t,children:n,appLink:r,className:i,onClick:a}=e;let o=`${i} ${Ku.a.iconButton}`;o+=n?" "+Ku.a.iconWithText:" "+Ku.a.iconOnly;const s=d.createElement(Al,{svgName:t,className:Ku.a.svg});return r?d.createElement(Pl,{appLink:r,className:o,onClick:a},s,n):d.createElement("button",{className:o,onClick:a},s,n)}function Gu(e){const{onClick:t,appLink:n,svgName:r,tooltip:i}=e.actionOptions;let a="ml-2";return e.actionOptions.className&&(a+=" "+e.actionOptions.className),i?d.createElement(Cl,{title:i},d.createElement(Yu,{appLink:n,svgName:r,onClick:t,className:a},e.children)):r?d.createElement(Yu,{onClick:t,appLink:n,svgName:r,className:a},e.children):n?d.createElement(Pl,{onClick:t,appLink:n,className:a},e.children):d.createElement("button",{onClick:t,className:a},e.children)}function Wu(e){const t=[],n=[];e.actions.forEach(e=>{e.button?t.push(e):n.push(e)});let r="d-flex";return e.className&&(r+=" "+e.className),d.createElement("div",{className:r},d.createElement(d.Fragment,null,!!t.length&&d.createElement("span",{className:Hu.a.buttonList},t.map((e,t)=>d.createElement(Gu,{key:t,actionOptions:e},e.label))),e.sortComponent?e.sortComponent:"",!!n.length&&d.createElement(Ju,{actions:n,className:!!t.length&&"ml-2",dropdownToggleClassName:e.actionsDropdownClassName})))}function Zu(e){var t=e.object,n=e.actions;return d.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&d.createElement("h5",null,t.name),!!n&&d.createElement("span",null,d.createElement(Wu,{actions:n})))}function Qu(e){return d.createElement("tr",null,d.createElement("td",null,d.createElement(Pl,{appLink:e.appLink},e.object.name)),d.createElement("td",null))}function Xu(e){return d.createElement(uo.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Name"),d.createElement("th",null,d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Pl,{appLink:e.newObjectAppLink},d.createElement(Al,{svgName:Sl.Plus,size:Il.Small}),d.createElement("span",null,"New ".concat(e.objectName))))))),d.createElement("tbody",null,e.objects.map((function(t){return d.createElement(Qu,{key:t.id,object:t,appLink:e.getObjectAppLink(t)})}))))}function ep(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?d.createElement("ul",{className:"list-unstyled"},t.map((function(e,t){return d.createElement("li",{key:t,className:"border rounded mb-3"},d.createElement(Pl,{appLink:n(e),className:"d-block p-3"},e.name))}))):d.createElement("div",{className:"py-3"},d.createElement("p",null,r)):d.createElement(d.Fragment,null)}ep.defaultProps={emptyMessage:"There is nothing here."};function tp(e){var t=qa();return d.createElement(vo,{as:"select",label:"Rating",name:"rating",id:"rating",value:t.values.rating&&t.values.rating.id,onChange:function(e){return t.setFieldValue("rating",e.target.value?{id:e.target.value}:{})},disabled:e.disabled},d.createElement(d.Fragment,null,d.createElement("option",{value:""},"Please select a rating"),e.ratings.map((function(e,t){return d.createElement("option",{key:t,value:e.id},function(e){return"".concat(e.name).concat(e.code?" (".concat(e.code,")"):"")}(e))}))))}function np(e){var t=e.tabs,n=e.isItemActive;return d.createElement(uo.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return d.createElement(uo.Nav.Item,{key:t},d.createElement(Pl,{appLink:e.appLink,className:(r=n(e),r?"nav-link active":"nav-link")},e.label));var r})))}np.defaultProps={isItemActive:Ql.isItemActive};var rp=n(8),ip=n.n(rp);function ap(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,a=e.className,o=e.actions,s=ip.a.text;return a&&(s+=" ".concat(a)),i?d.createElement("a",{className:"".concat(s," text-muted ").concat(ip.a.disabled)},t):d.createElement(d.Fragment,null,n?d.createElement(Pl,{appLink:n,className:s},t):d.createElement("a",{onClick:r,className:s},t),!!o&&d.createElement(Wu,{className:ip.a.actions,actions:o}))}function op(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cp(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,a=e.isDisabled,o=e.actions,s=Array.isArray(n)&&n.some((function(e){return nu(t.id,e)})),c=d.useMemo((function(){return Array.isArray(n)&&n.some((function(e){return ou.find(t,e)}))}),[t,n]),l=op(d.useState(c),2),u=l[0],p=l[1],f=!!t.children&&!!t.children.length,m={name:t.name,appLink:X.isFunction(r)?r(t):null,onSelect:X.isFunction(i)?function(){return i(t)}:null,isDisabled:!!X.isFunction(a)&&a(t),className:s&&ip.a.selected||c&&ip.a.parentOfSelected,actions:!!o&&o.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return d.createElement("li",{className:"position-relative".concat(u?"":" ".concat(ip.a.collapsed))},d.createElement("div",{className:"position-relative"},d.createElement("span",{className:ip.a.node},f&&d.createElement(Al,{svgName:Sl.ChevronDown,size:Il.Small,className:"svg-container ".concat(ip.a.chevron),onClick:function(){return p(!u)}}),d.createElement(ap,Object.assign({},m))),u&&d.createElement(up,Object.assign({},e))))}var lp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function up(e){var t=e.tree,n=lp(e,["tree"]);return t&&t.children?d.createElement("ul",{className:"m-0 p-0 ".concat(ip.a.tree)},t.children.map((function(e){return d.createElement(cp,Object.assign({key:e.id,tree:e},n))}))):d.createElement(d.Fragment,null)}var pp={getChord:function(e,t){return ou.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,a,o=ou.find(t,e);o&&(n=Object.assign((r={},i=e,a=pp.getChord(t,o),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),n))})),n}};function fp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var mp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function hp(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,a=e.noSelectionMessage,o=e.isNodeDisabled,s=e.getSelectedItemAppLink,c=mp(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","isNodeDisabled","getSelectedItemAppLink"]),l=c.tree,u=c.selectedIds,p=fp(d.useState(pp.getState(u,l)),2),f=p[0],m=p[1];d.useEffect((function(){return m(pp.getState(u,l))}),[u,l]);var h=fp(d.useState(!!i),2),y=h[0],g=h[1];d.useEffect((function(){return g(!!i)}),[i]);var v=!r||!!n;return d.createElement(d.Fragment,null,v&&d.createElement("div",{className:"pb-2"},!!n&&d.createElement("label",{className:"m-0"},n),!r&&d.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return g(!y)}},y?"Expand":"Collapse")),!y&&d.createElement("div",{className:"py-2 border-top"},d.createElement(up,Object.assign({onSelect:function(e){return X.isFunction(t)&&t(e)},isDisabled:o},c))),(!dt.isEmpty(f)||!!a)&&d.createElement("div",{className:"py-2 border-top"},d.createElement("label",null,"Selected:"),d.createElement("ul",{className:"m-0"},dt.isEmpty(f)?d.createElement("li",null,a):Object.keys(f).map((function(e,t){return d.createElement("li",{key:t},X.isFunction(s)?d.createElement(Pl,{appLink:s(e)},f[e]):f[e])})))))}var yp=n(23);const gp={isEmpty:e=>e&&!(e.data&&e.data.length),length:e=>e&&e.data&&e.data.length,at(e,t){if(e&&e.data&&e.data.length&&!(t>e.data.length))return e.data[t]},get(e,t){if(e&&e.data&&e.data.length)return e.data.find(e=>e.id&&e.id.toString()===t)},flattenCollections(e){if(!e||!e.length)return;let t=[];return e.forEach(e=>{t=[...t,...e.data]}),t},getNextCursor:e=>e.pagination&&e.pagination.cursors&&e.pagination.cursors.next};var vp=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function bp(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,a=void 0===i?"":i,o=e.itemNumber,s=X.isFunction(n)&&n(t);return d.createElement("tr",{className:vp(a)},!!o&&d.createElement("td",null,d.createElement("span",null,o)),d.createElement("td",null,s?d.createElement(Pl,{appLink:s},t.name):t.name),X.isFunction(r)&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Wu,{actions:r(t)}))))}var Sp=Object(yp.SortableElement)((function(e){return d.createElement(bp,Object.assign({sortable:!0},e))})),Ep=n(11),Cp=n.n(Ep),Op=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},jp=function(e){var t=e.sortable,n=e.getVideoActions;return d.createElement("thead",null,d.createElement("tr",null,!!t&&d.createElement("th",null,"#"),d.createElement("th",null,"Name"),!!n&&d.createElement("th",null)))},Ip=d.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=Op(e,["videos","sortable"]);return d.createElement("tbody",{ref:t},!gp.isEmpty(n)&&n.data.map((function(e,t){return r?d.createElement(Sp,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:Cp.a.draggableVideoItem},i)):d.createElement(bp,Object.assign({video:e},i))})))}));var Ap=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Tp=Object(yp.SortableContainer)((function(e){var t=e.forwardedRef,n=Ap(e,["forwardedRef"]);return d.createElement(Ip,Object.assign({sortable:!0,ref:t},n))})),wp=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(Cp.a.sortingContainer);var i=r.querySelector(".".concat(Cp.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},kp=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(Cp.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function Lp(e){var t=e.onSortEnd,n=e.emptyMessage,r=Ap(e,["onSortEnd","emptyMessage"]),i=d.useRef();return gp.isEmpty(e.videos)?d.createElement("div",null,n):d.createElement(uo.Table,{responsive:!0},d.createElement(jp,Object.assign({sortable:!0},e)),d.createElement(Tp,Object.assign({forwardedRef:i,onSortStart:wp(i),onSortEnd:kp(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:Cp.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}function xp(e){var t=e.alias,n=e.onDelete;return d.createElement("li",{className:"list-group-item d-flex justify-content-between"},t.name,d.createElement(Al,{svgName:Sl.Delete,onClick:function(){return n(t.id)}}))}function Pp(e){var t=e.aliases,n=e.onDelete;return d.createElement("ul",{className:"list-group mb-3"},t?t.map((function(e){return d.createElement(xp,{key:e.id,alias:e,onDelete:n})})):d.createElement("span",null,"Currently there are no aliases for this object."))}Lp.defaultProps={emptyMessage:"There are no videos in this list."};var Np=Object(co.object)().shape({name:Object(co.string)().trim().max(255,"Name is too long").required("Name is required").default("")});function _p(){var e=qa(),t=bo(e);return d.createElement(eo,null,d.createElement(vo,{label:"Create an alias",name:"name",id:"name",value:e.values.name,placeholder:"Add an alias"}),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:e.isSubmitting,type:"submit",disabled:!t},"Add")))}function Dp(e){var t=e.onSave;return d.createElement(so,{initialValues:{name:""},validationSchema:Np,onSubmit:function(e,n){t(e,n)},resetOnSubmit:!0},d.createElement(_p,null))}function Rp(e){var t=e.onSave,n=e.aliases,r=e.onDelete;return d.createElement("div",{className:"w-50"},d.createElement("h1",null,"Aliases"),d.createElement(Pp,{aliases:n,onDelete:r}),d.createElement(Dp,{onSave:t}))}var Fp=u.COMPANIES,Mp=function(e){return{application:Fp,action:o.Companies.EDIT_COMPANY,args:[e.id]}},Up=function(e){return r.AppLinkHelper.trigger(Mp(e))};function Vp(e){var t=i.useBasicFetch(Qt(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(xl,{placeholder:"Search for a company",onSuggestionSelected:Up,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/companies/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(zu,{collection:t&&t.data,collectionAppLink:{application:Fp,action:o.Companies.COMPANIES},newObjectAppLink:{application:Fp,action:o.Companies.NEW_COMPANY},getObjectAppLink:Mp,objectName:"Company"}))}function zp(e){return(zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qp(e,t,n){return t&&Hp(e.prototype,t),n&&Hp(e,n),e}function Jp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$p(e,t)}function $p(e,t){return($p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gp(e);if(t){var i=Gp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yp(this,n)}}function Yp(e,t){return!t||"object"!==zp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gp(e){return(Gp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wp,Zp,Qp=function(e){Jp(n,e);var t=Kp(n);function n(){return Bp(this,n),t.apply(this,arguments)}return qp(n,[{key:"channelName",get:function(){return u.COMPANIES}},{key:"appRoutes",get:function(){return{"manage/companies(/)":"companies","manage/companies/new(/)":"newCompany","manage/companies/:id(/)":"editCompany"}}}]),n}(r.AppRouter),Xp=function(e){Jp(n,e);var t=Kp(n);function n(){return Bp(this,n),t.apply(this,arguments)}return qp(n,[{key:"companies",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(Vp,{cursor:t}))}},{key:"newCompany",value:function(){this.layout.showChildView(ae,d.createElement(No,null))}},{key:"editCompany",value:function(e){this.layout.showChildView(ae,d.createElement(Po,{id:e}))}},{key:"name",get:function(){return"Companies Application"}},{key:"channelName",get:function(){return u.COMPANIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Qp}}]),n}(r.Application),ef=n(31);!function(e){e.Success="success",e.Warning="warning",e.Fail="danger",e.Info="info"}(Wp||(Wp={})),function(e){e.Success="Success! 🙌",e.Warning="Whoops...",e.Fail="Oops...",e.Info="FYI"}(Zp||(Zp={}));class tf extends G{constructor(e){super(e)}initialize(){this.alertCollection=new U,this.listenTo(g.ALERT,"remove:alert",this.removeAlert),this.showAlerts()}get name(){return jo}get defaults(){return{maxAlerts:3}}showAlerts(){const e=h.Radio.channel(g.ALERT);let t={collection:this.alertCollection};this.options.alertViewCtor&&(t=m.extend({},t,{ctor:this.options.alertViewCtor})),e.trigger("show:alert",t)}removeAlert(e){this.alertCollection.remove(e),this.showAlerts()}createAlert(e){this.alertCollection.length===this.options.maxAlerts&&this.alertCollection.shift(),e.id||(e=m.extend({},e,{id:this.generateUniqueAlertId()})),this.alertCollection.push(new K(e)),this.showAlerts()}clearAllAlerts(){this.alertCollection.reset(null)}success(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:e})),this):e.useXHR?m.bind((e,t)=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:t})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,e)),this)}error(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e})),this):e.useXHR?m.bind(e=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e.message})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlertIL_DEFAULT,e)),this)}generateUniqueAlertId(){return m.uniqueId("alert_")}}var nf=n(9),rf=n.n(nf);function af(e){const{alert:t,svgName:n,svgClassName:r,closeAlert:i}=e,{message:a,heading:o,appLink:s,appLinkText:c,appLinkClassName:l=""}=t,u=Object(Oo.sanitize)(a);return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-inline-block "+rf.a.icon},d.createElement(Al,{svgName:n,className:"svg-container "+r})),d.createElement("div",{className:"pl-2 d-inline-block "+rf.a.alertContent},d.createElement("p",{className:"p-0 m-0 pb-1 "+rf.a.heading},o),d.createElement("p",{className:"p-0 m-0 "+rf.a.message,dangerouslySetInnerHTML:{__html:u}}),!!s&&d.createElement(Pl,{className:l,appLink:s},c)),d.createElement("div",{className:"close d-inline-block cursor-pointer",role:"button","aria-hidden":"true",onClick:i},"×"))}const of=e=>{switch(e.type){case Wp.Success:return Sl.CheckCircleOutline;case Wp.Fail:case Wp.Warning:return Sl.Warning;case Wp.Info:default:return Sl.Info}};function sf({alert:e,closeAlert:t}){const[n,r]=d.useState(!0),i=d.useRef();d.useEffect(()=>{n?i.current=window.setTimeout(t,3e3):clearTimeout(i.current)},[n]);const a="text-"+e.type.toLowerCase();return d.createElement("li",{className:"bg-white mt-2 p-2 show clearfix "+rf.a.alertItem,onMouseEnter:()=>r(!1),onMouseLeave:()=>r(!0)},d.createElement(af,{alert:e,svgName:of(e),svgClassName:a,closeAlert:t}))}function cf({alerts:e,removeAlert:t}){return d.createElement("div",{className:rf.a.alertBox},d.createElement(ef.TransitionGroup,{component:"ul",className:rf.a.alertList+" list-unstyled"},e&&e.map((e,n)=>d.createElement(ef.CSSTransition,{key:n,timeout:200,classNames:"alert"},d.createElement(sf,{alert:e,closeAlert:()=>t(e.id)})))))}function lf(){return d.createElement("div",{className:"text-center p-5"},d.createElement(uo.Spinner,{as:"div",animation:"border",role:"status"}))}function uf(e){const{title:t,closeButton:n=!0,closePopup:r,onEntered:i,showLoadingSpinner:a}=e,o=Object.assign({show:!0,onHide:r},X.isFunction(i)?{onEntered:i}:{});return d.createElement(uo.Modal,Object.assign({},o),!!t&&d.createElement(uo.Modal.Header,{closeButton:n},d.createElement(uo.Modal.Title,null,t)),a?d.createElement(lf,null):d.createElement(uo.Modal.Body,null,e.children))}var pf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ff({buttons:e}){return d.createElement("div",{className:"d-flex justify-content-end border-top pt-3 px-3 mx-n3"},e.map((e,t)=>((e,t)=>{const{buttonText:n,type:r="button",isSpinnerButton:i,showSpinner:a=!1,className:o}=e,s=pf(e,["buttonText","type","isSpinnerButton","showSpinner","className"]),c=Object.assign({key:t,type:r,className:"ml-2"+(o?" "+o:"")},s);return i?d.createElement(Eo,Object.assign({showSpinner:a},c),n):d.createElement(uo.Button,Object.assign({},c),n)})(e,t)))}var df,mf;!function(e){e.Boolean="System.Boolean",e.String="System.String",e.StaffRequest="ClickView.DomainApi.Models.Options.Enums.StaffRequestOption, ClickView.DomainApi.Models, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null",e.Long="System.Int64"}(df||(df={})),function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(mf||(mf={}));var hf={namespace:"domain_options"},yf=function(){return"/api/domain/v3/settings/types"},gf=function(e){return"/api/domain/v3/settings/types/".concat(e)},vf=function(){return"/api/domain/v3/settings/types"},bf=function(e){return"/api/domain/v3/settings/types/".concat(e)},Sf=function(e){return"/api/domain/v3/settings/types/".concat(e)},Ef="domain:options",Cf="domain:option",Of="update:domain:option",jf="delete:domain:option",If=function(){return{key:Ef,url:yf(),normalizeOptions:hf}},Af=function(e){return{key:"".concat(Cf,":").concat(e),url:gf(e),normalizeOptions:hf}},Tf=function(e,t,n){return e.type===df.String&&(e=Lf(e)),{key:Cf,url:vf(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[Ef],normalizeOptions:hf}},wf=function(e,t){return e.type===df.String&&(e=Lf(e)),{key:"".concat(Of,":").concat(e.id),url:bf(e.id),data:e,type:it.PUT,always:t,formatData:function(){return e},normalizeOptions:hf}},kf=function(e,t){return{key:"".concat(jf,":").concat(e),url:Sf(e),type:it.DELETE,invalidationKeys:[Ef],normalizeOptions:hf,success:t}};function Lf(e){var t=e.defaultValue;if('"'===t)return Object.assign(Object.assign({},e),{defaultValue:'"'.concat(t,'"')});var n=t.charAt(0),r=t.charAt(t.length-1);return'"'!==n&&(t='"'.concat(t)),'"'!==r&&(t="".concat(t,'"')),Object.assign(Object.assign({},e),{defaultValue:t})}function xf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pf(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nf(e){var t=xf(d.useState(!1),2),n=t[0],a=t[1],s=i.useBasicFetch(Af(e.optionId)),c=Object(te.useDispatch)(),l=function(){e.closePopup(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DOMAIN_OPTIONS})};return d.createElement(uf,{title:"Delete Domain Option",closePopup:e.closePopup,showLoadingSpinner:!s.data},s.data&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,s.data.name),"?")),d.createElement(ff,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){a(!0),i.fetch(c,kf(e.optionId,l))},buttonText:"Yes, delete this domain option",isSpinnerButton:!0,showSpinner:n}]})))}var _f,Df=function(e){return{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]}},Rf={application:u.DOMAIN_OPTIONS,action:o.DomainOptions.NEW_DOMAIN_OPTION};function Ff(){var e=i.useBasicFetch(If());if(!e.data)return d.createElement(d.Fragment,null);var t=e.data.map((function(e){return e.displayName&&(e.name=e.displayName),e}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a domain option type to edit:"),d.createElement(Pl,{appLink:Rf,className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:Il.Small}),d.createElement("span",null,"New Domain Option"))),d.createElement(ep,{objects:t,getAppLink:Df}))}!function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience"}(_f||(_f={}));var Mf=co.object().shape({id:co.string(),name:co.string().trim().max(64,"Name is too long").required("Name is required").default(""),displayName:co.string().trim().max(255,"Display name is too long").required("Display name is required").default(""),type:co.mixed().required("Type is required").default(df.Boolean),entityType:co.mixed().required("Entity type is required").default(_f.Customer),kind:co.mixed().required("Kind is required").default(mf.Temporary),defaultValue:co.mixed().required("Default value is required").default("false")}).noUnknown();function Uf(e){var t=e.type,n=e.defaultValue;if(!t)return d.createElement(d.Fragment,null);var r={label:"Default Value",name:"defaultValue",id:"defaultValue",value:n};return t===df.Boolean?d.createElement(vo,Object.assign({as:"select"},r),d.createElement("option",{value:"true"},"True"),d.createElement("option",{value:"false"},"False")):t===df.Long||t===df.StaffRequest?d.createElement(vo,Object.assign({as:"input",type:"number"},r)):t===df.String?d.createElement(vo,Object.assign({as:"input"},r)):void 0}var Vf=[_f.Customer,_f.User];function zf(e){var t=null===e.id||void 0===e.id,n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Name (snake_case)",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this domain option",autoFocus:!0}),d.createElement(vo,{label:"Display Name",type:"text",name:"displayName",id:"displayName",value:n.values.displayName,placeholder:"Enter a display name for this domain option"}),d.createElement(vo,{as:"select",label:"Kind",name:"kind",id:"kind",value:n.values.kind},dt.getEnumKeys(mf).map((function(e){return d.createElement("option",{key:e,value:mf[e]},e)}))),d.createElement(vo,{as:"select",label:"Entity",name:"entityType",id:"entityType",value:n.values.entityType},dt.getEnumKeys(_f).filter((function(e){return Vf.includes(_f[e])})).map((function(e){return d.createElement("option",{key:e,value:_f[e]},e)}))),d.createElement(vo,{as:"select",label:"Type",name:"type",id:"type",value:n.values.type},dt.getEnumKeys(df).map((function(e){return d.createElement("option",{key:e,value:df[e]},e)}))),d.createElement(Uf,{type:n.values.type,defaultValue:n.values.defaultValue}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(uo.Button,{as:Pl,variant:"danger",appLink:{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DELETE_DOMAIN_OPTION,args:[e.id]}},"Delete")))}function Bf(e){return d.createElement(so,{initialValues:e.domainOption,validationSchema:Mf,onSubmit:e.saveDomainOption},d.createElement(zf,{id:e.domainOption&&e.domainOption.id}))}function Hf(){var e=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Domain Option"),d.createElement(Bf,{saveDomainOption:function(t,n){i.fetch(e,Tf(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]})}),n))}}))}function qf(e){var t=e.optionId,n=i.useBasicFetch(Af(t)),r=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Domain Option"),n.data&&d.createElement(Bf,{domainOption:n.data,saveDomainOption:function(e,t){return i.fetch(r,wf(e,t))}}))}function Jf(e){return(Jf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yf(e,t,n){return t&&Kf(e.prototype,t),n&&Kf(e,n),e}function Gf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wf(e,t)}function Wf(e,t){return(Wf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xf(e);if(t){var i=Xf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qf(this,n)}}function Qf(e,t){return!t||"object"!==Jf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xf(e){return(Xf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ed=function(e){Gf(n,e);var t=Zf(n);function n(){return $f(this,n),t.apply(this,arguments)}return Yf(n,[{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"appRoutes",get:function(){return{"developer/options(/)":"domainOptions","developer/options/new(/)":"newDomainOption","developer/options/:id(/)":"editDomainOption"}}},{key:"appLinks",get:function(){return["deleteDomainOption"]}}]),n}(r.AppRouter),td=function(e){Gf(n,e);var t=Zf(n);function n(){return $f(this,n),t.apply(this,arguments)}return Yf(n,[{key:"domainOptions",value:function(){this.layout.showChildView(ae,d.createElement(Ff,null))}},{key:"newDomainOption",value:function(){this.layout.showChildView(ae,d.createElement(Hf,null))}},{key:"editDomainOption",value:function(e){this.layout.showChildView(ae,d.createElement(qf,{optionId:e}))}},{key:"deleteDomainOption",value:function(e){this.layout.showChildView(oe,d.createElement(Nf,Object.assign({optionId:e},this.getPopupProps())))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(g.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(cf,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Domain Options Application"}},{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return ed}}]),n}(r.Application),nd=function(e){return e?"".concat("/api/master/v2/people","?cursor=").concat(e):"/api/master/v2/people"},rd=function(e){return"/api/master/v2/objects/".concat(e)},id=function(){return"/api/master/v2/people"},ad=function(e){return"/api/master/v2/objects/".concat(e)},od="people",sd="person",cd="update:person",ld=function(e){return{key:"".concat(od).concat(e?":".concat(e):""),url:nd(e)}},ud=function(e){return{key:"".concat(sd,":").concat(e),url:rd(e)}},pd=function(e,t,n){return{key:sd,url:id(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[od]}},fd=function(e,t,n){return{key:"".concat(cd,":").concat(e),url:ad(e),data:t,type:it.PUT,always:n}},dd=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown();function md(e){var t=qa();return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this person",autoFocus:!0}),d.createElement(ko,{isNew:e.isNew}))}function hd(e){return d.createElement(so,{initialValues:e.person,validationSchema:dd,onSubmit:e.savePerson},d.createElement(md,{isNew:!(e.person&&e.person.id)}))}function yd(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(ud(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(hd,{person:n.data,savePerson:function(n,r){return i.fetch(t,fd(e.id,n,r))}}))}function gd(){var e=Object(te.useDispatch)();return d.createElement(hd,{savePerson:function(t,n){i.fetch(e,pd(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.People.EDIT_PERSON,args:[e.id]})}),n))}})}var vd=u.PEOPLE,bd=function(e){return{application:vd,action:o.People.EDIT_PERSON,args:[e.id]}},Sd=function(e){return r.AppLinkHelper.trigger(bd(e))};function Ed(e){var t=i.useBasicFetch(ld(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(xl,{placeholder:"Search for a person",onSuggestionSelected:Sd,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/people/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(zu,{collection:t&&t.data,collectionAppLink:{application:vd,action:o.People.PEOPLE},newObjectAppLink:{application:vd,action:o.People.NEW_PERSON},getObjectAppLink:bd,objectName:"Person"}))}function Cd(e){return(Cd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Od(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Id(e,t,n){return t&&jd(e.prototype,t),n&&jd(e,n),e}function Ad(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Td(e,t)}function Td(e,t){return(Td=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ld(e);if(t){var i=Ld(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kd(this,n)}}function kd(e,t){return!t||"object"!==Cd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ld(e){return(Ld=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xd=function(e){Ad(n,e);var t=wd(n);function n(){return Od(this,n),t.apply(this,arguments)}return Id(n,[{key:"channelName",get:function(){return u.PEOPLE}},{key:"appRoutes",get:function(){return{"manage/people(/)":"people","manage/people/new(/)":"newPerson","manage/people/:id(/)":"editPerson"}}}]),n}(r.AppRouter),Pd=function(e){Ad(n,e);var t=wd(n);function n(){return Od(this,n),t.apply(this,arguments)}return Id(n,[{key:"people",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(Ed,{cursor:t}))}},{key:"newPerson",value:function(){this.layout.showChildView(ae,d.createElement(gd,null))}},{key:"editPerson",value:function(e){this.layout.showChildView(ae,d.createElement(yd,{id:e}))}},{key:"name",get:function(){return"People Application"}},{key:"channelName",get:function(){return u.PEOPLE}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return xd}}]),n}(r.Application);function Nd(e){return function(e){const t=fu.getInstance(e);return d.useEffect(()=>()=>fu.releaseInstance(e)),t}(e)}function _d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dd(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rd(e){var t=e.imageType,n=e.closePopup,r=d.useContext(uu),i=r.getDataUrl,a=r.setImage,o=_d(d.useState(i()),1)[0],s=_d(d.useState(!1),2),c=s[0],l=s[1],u=Nd(f.IMAGE_UPLOAD),p=function(e){a(e),n()},m={dataUrl:o,imageType:t,minWidth:Gl[t].width,minHeight:Gl[t].height,onCrop:function(e){return u.uploadBase64Image(e,t,p,n)},onCancel:n};return d.createElement(uf,{title:"Crop Image",closePopup:n,onEntered:function(){return l(!0)}},c&&d.createElement(Mu,Object.assign({},m)))}var Fd=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))};const Md=()=>{const e=Nd(jo);return{success(t){e.success(t)()},error(t){e.error(t)()},warning(t){e.createAlert({type:Wp.Warning,heading:Zp.Warning,message:t})}}};function Ud(e){var t=e.page,n=e.totalPages,r=Ro.isNumber(t)&&t>0&&t<n&&t+1,i=Ro.isNumber(t)&&t>1&&t-1,a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!dt.isEmpty(a))return a}var Vd={convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:Ud(e.pagination),limit:e.pagination.pageSize}}}},zd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1";return{key:"playlists:".concat(e),url:"/ajax/playlists/curators?page=".concat(e),formatData:Vd.convertLegacyPaginatedCollection}},Bd=function(e,t){var n="/api/domain/v1/search/playlists?query=".concat(e);return t&&(n+="&filter={page:".concat(t,"}")),{key:"playlists:search:".concat(e).concat(t?":".concat(t):""),url:n,formatData:Vd.convertLegacyPaginatedCollection}},Hd=function(e){return{key:"playlist:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=cover,banner")}},qd=function(e){var t=e.slice().sort();return{key:"playlists:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Jd=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(t,"/playlists"),key:"playlist",data:e,type:it.POST,invalidationKeys:"playlists",success:n,error:r,always:i}},$d=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:playlist:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}},Kd=function(e,t,n,r){return{url:"/api/master/v1/playlists/".concat(e),key:"delete:playlist:".concat(e),type:it.DELETE,invalidationKeys:"playlists",success:t,error:n,always:r}},Yd=function(e){return{key:"playlist:".concat(e,":videos"),url:"/api/master/v2/objects/".concat(e,"/videos?query={orderBy:orderindex,limit:100}")}},Gd=function(e,t,n,r){return{key:"reorder:playlist",url:"/api/master/v1/objects/".concat(e,"/videos/reorder"),data:t,type:it.PUT,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r}},Wd=function(e,t,n,r,i){return{key:"remove:playlist:video",url:"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t),type:it.DELETE,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r,always:i}};function Zd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qd(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xd(e){var t=Object(te.useDispatch)(),n=Md(),a=Zd(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(Hd(e.playlistId));var p=[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,Kd(e.playlistId,(function(){n.success("Successfully deleted playlist."),r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS})}),(function(){c(!1),n.error("Failed to delete playlist.")}),e.closePopup))},buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:s}],f=!!l.data;return d.createElement(uf,{title:"Delete Playlist",closePopup:e.closePopup,showLoadingSpinner:!f},f&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement("p",null,"Please ensure it is not being used in any widgets.")),d.createElement(ff,{buttons:p})))}var em=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:co.string().trim().max(65535,"Description is too long").default(""),cover:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),banner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown()}).noUnknown(),tm=function(e,t){var n=u.PLAYLISTS,r=o.Playlists,i=[{label:"Edit Playlist Details",appLink:{application:n,action:r.EDIT_PLAYLIST,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_PLAYLIST_VIDEOS,args:[t]}}];return eu(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_PLAYLIST_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_PLAYLIST_AUDIENCES,args:[t]}}]),i};function nm(e){var t=qa(),n=bo(t);return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this playlist",autoFocus:!0}),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this playlist here"}),d.createElement(xu,{imageType:Ul.Covers,fieldName:"cover",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement(xu,{imageType:Ul.Banners,fieldName:"banner",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(Wu,{actions:e.actions})))}function rm(e){var t,n=e.playlist&&e.playlist.id;return d.createElement(so,{initialValues:e.playlist,validationSchema:em,onSubmit:e.savePlaylist},d.createElement(nm,{id:n,actions:!!n&&(t=n,[{label:"Delete playlist",appLink:{application:u.PLAYLISTS,action:o.Playlists.DELETE_PLAYLIST,args:[t]},className:"text-danger"}])}))}var im=function(e){return function(t){return t.appLink.action===e}};function am(e){var t=e.playlistId,n=e.activeAction,r=d.useContext(Iu);return d.createElement("div",{className:"py-2"},!!r&&d.createElement(np,{tabs:tm(r,t),isItemActive:im(n)}))}function om(e){var t=Object(te.useDispatch)(),n=Md(),r=i.useBasicFetch(Hd(e.playlistId));return d.createElement(d.Fragment,null,d.createElement(am,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST}),!!r.data&&d.createElement(rm,{playlist:r.data,savePlaylist:function(r,a){i.fetch(t,$d(e.playlistId,r,(function(){n.success("Successfully updated playlist.")}),(function(){n.error("Failed to update playlist.")}),a))}}))}const sm=e=>Array(Array.isArray(e)?e.length:0).fill(!1);function cm(e,t,n=!0){const[r,i]=d.useState(sm(e));d.useEffect(()=>{i(sm(e))},[...t]),d.useEffect(()=>{if(!n)return;const t=[];return e&&e.forEach((e,n)=>{t.push(du.fetch(e,e=>{e!==r[n]&&i(Vt.cloneAndReplaceAtIdx(r,n,e))}))}),()=>t.forEach(e=>e())},[r,n])}const lm={getSetStateByKey:(e,t,n)=>r=>e(e=>{const i=X.isFunction(n)?n:X.useIdentity();return Object.assign(Object.assign({},e),{[t]:i(r,e)})})};var um,pm,fm,dm;!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(um||(um={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(pm||(pm={})),function(e){e.Root="0"}(fm||(fm={})),function(e){e.Root="root"}(dm||(dm={}));var mm,hm=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),levelIds:co.array().of(co.string()).required("A level is required").default([])}).noUnknown();!function(e){e.Subject="Subject",e.Topic="Topic"}(mm||(mm={}));var ym=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentIds:co.array().of(co.string()).default([dm.Root]),subjectIds:co.array().of(co.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject").default([]),type:co.mixed().required("Type is required").default(mm.Subject),emphasize:co.boolean().default(!1),comingSoon:co.boolean().default(!0),canBePreferred:co.boolean().default(!1),cover:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),banner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown()}).noUnknown(),gm=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),vm=co.object().shape({name:co.string().max(255,"Name is too long").required("Name is required"),description:co.string().max(65535,"Description is too long").required("Description is required")}),bm=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentId:co.string().default(fm.Root)}).noUnknown(),Sm={singularizeMemberType:function(e){switch(e){case pm.Playlists:return"playlist";case pm.Series:return"series";case pm.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case pm.Playlists:return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:n};case pm.Series:return{application:u.SERIES,action:o.Series.EDIT_SERIES,args:n};case pm.Videos:return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{label:"Remove ".concat(Sm.singularizeMemberType(n)),appLink:{application:u.SUBJECTS,action:t===um.Subject?o.Subjects.REMOVE_SUBJECT_MEMBER:o.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},Em=function(){var e=u.SUBJECTS,t=o.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.SUBJECT_CLASSIFICATIONS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},Cm=function(e){var t=u.SUBJECTS,n=o.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Classifications",appLink:{application:t,action:n.SUBJECT_CLASSIFICATIONS,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},Om=function(e,t){var n=u.SUBJECTS,r=o.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]};function jm(e){return(jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Im(e){return function(e){if(Array.isArray(e))return Am(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Am(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Am(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Am(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function km(e,t){return(km=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pm(e);if(t){var i=Pm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xm(this,n)}}function xm(e,t){return!t||"object"!==jm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pm(e){return(Pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nm=function(){return"/api/subjects/v1/subjects/tree"},_m=function(e){return"/api/subjects/v1/subjects/".concat(e)},Dm=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},Rm=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},Fm=function(){return"/api/subjects/v1/subjects"},Mm=function(e){return"/api/subjects/v1/subjects/".concat(e)},Um=function(e){return"/api/subjects/v1/subjects/".concat(e)},Vm=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},zm=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/subjects?addToClassifications=").concat(!!t)},Bm=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},Hm=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},qm=function(){return"/api/subjects/v1/presentations"},Jm=function(e){return"/api/subjects/v1/presentations/".concat(e)},$m=function(){return"/api/subjects/v1/presentations"},Km=function(e){return"/api/subjects/v1/presentations/".concat(e)},Ym=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},Gm=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=cover,banner")},Wm=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},Zm=function(){return"/api/subjects/v1/classifications"},Qm=function(e){return"/api/subjects/v1/classifications/".concat(e)},Xm=function(e){return"/api/subjects/v1/classifications/".concat(e)},eh=function(e){return"/api/subjects/v1/objects/".concat(e,"/classifications")},th=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/classifications?presentationId=").concat(t)},nh=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},rh=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},ih=function(){return"/api/subjects/v1/levels"},ah=function(e){return"/api/subjects/v1/levels/".concat(e)},oh=function(){return"/api/subjects/v1/levels"},sh=function(e){return"/api/subjects/v1/levels/".concat(e)},ch=function(e){return"/api/subjects/v1/objects/".concat(e,"/levels")},lh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/levels?addToAudiences=").concat(!!t)},uh=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},ph=function(e){return"/api/subjects/v1/audiences/".concat(e)},fh=function(){return"/api/subjects/v1/audiences"},dh=function(e){return"/api/subjects/v1/audiences/".concat(e)},mh=function(e){return"/api/subjects/v1/audiences/".concat(e)},hh=function(e){return"/api/subjects/v1/objects/".concat(e,"/audiences")},yh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/audiences?presentationId=").concat(t)},gh=function(e,t,n){var r="".concat(s.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(s.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},vh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&km(e,t)}(a,e);var t,n,r,i=Lm(a);function a(){return Tm(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getPresentations",value:function(e,t){return this.get({resource:qm(),eventPrefix:s.PRESENTATIONS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:Jm(e),eventPrefix:"".concat(s.PRESENTATION,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:$m(),data:e,callback:t,errorCallback:n,eventPrefix:s.PRESENTATION,invalidationKeys:[s.PRESENTATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:Km(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(s.PRESENTATION,":").concat(e),s.PRESENTATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getSubjectTree",value:function(e,t){return this.get({resource:Nm(),formatData:function(e){return{children:e,name:fm.Root,id:null}},eventPrefix:s.SUBJECTS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:_m(e),eventPrefix:"".concat(s.SUBJECT,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:Dm(e,t),eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:Rm(e,t,n),eventPrefix:gh(e,t,n),expiryTime:qe.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:Fm(),data:e,callback:t,errorCallback:n,eventPrefix:s.SUBJECT,invalidationKeys:[s.SUBJECTS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:Mm(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){var r=this;return this.delete({resource:Um(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_SUBJECT,invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject."),errorHandler:function(e){var t,n=(null===(t=e)||void 0===t?void 0:t.code)===Nt.Conflict?"Cannot delete a subject with child subjects and/or classifications.":"Failed to delete subject.";r.alertService.error(n)()}})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:Vm(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectSubjects",value:function(e,t,n,r,i,a){var o=Sm.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.SUBJECTS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)),c.push.apply(c,Im(t.map((function(e){return"".concat(s.SUBJECTS,":").concat(e,":").concat(n)})))),this.update({resource:zm(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_SUBJECTS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," subjects.")),errorHandler:this.alertService.error("Failed to update ".concat(o," subjects."))})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,a){var o=1===t.length?Sm.singularizeMemberType(n):n,c=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(Im(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))),Im(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)}))));return this.create({resource:Bm(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:c,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(o," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(o," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var a=1===t.length?Sm.singularizeMemberType(n):n,o=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(Im(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))));return this.delete({resource:Hm(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(s.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:o,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(a," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(a," from subject."))})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:Ym(e),formatData:function(e){return{children:e,name:dm.Root,id:null}},eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:Gm(e),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:Wm(e,t),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:Zm(),data:e,callback:t,errorCallback:n,eventPrefix:s.CLASSIFICATION,invalidationKeys:[s.CLASSIFICATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:Qm(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:Xm(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_CLASSIFICATION,invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"getObjectClassifications",value:function(e,t,n,r){return this.get({resource:eh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectClassifications",value:function(e,t,n,r,i,a){var o=Sm.singularizeMemberType(r),c=["".concat(r,":").concat(e,":").concat(s.CLASSIFICATIONS)];return c.push.apply(c,Im(n.map((function(e){return"".concat(s.CLASSIFICATION,":").concat(e,":").concat(r)})))),this.update({resource:th(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_CLASSIFICATIONS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," classifications.")),errorHandler:this.alertService.error("Failed to update ".concat(o," classifications."))})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?Sm.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(gh(r,i,n)),l.push.apply(l,Im(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.create({resource:nh(e),data:t,callback:a,errorCallback:o,eventPrefix:"".concat(s.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(c," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(c," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?Sm.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(gh(r,i,n)),l.push.apply(l,Im(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.delete({resource:rh(e,t),callback:a,errorCallback:o,eventPrefix:"".concat(s.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(c," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(c," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:ih(),eventPrefix:s.LEVELS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:ah(e),eventPrefix:"".concat(s.LEVEL,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:oh(),data:e,callback:t,errorCallback:n,eventPrefix:s.LEVEL,invalidationKeys:[s.LEVELS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:sh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(s.LEVEL,":").concat(e),s.LEVELS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getObjectLevels",value:function(e,t,n,r){return this.get({resource:ch(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectLevels",value:function(e,t,n,r,i,a){var o=Sm.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.LEVELS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.AUDIENCES)),this.update({resource:lh(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_LEVELS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," levels.")),errorHandler:this.alertService.error("Failed to update ".concat(o," levels."))})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:uh(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCES,":").concat(e),expiryTime:qe.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:ph(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCE,":").concat(e),expiryTime:qe.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:fh(),data:e,callback:t,errorCallback:n,eventPrefix:s.AUDIENCE,invalidationKeys:[s.AUDIENCES],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:dh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:mh(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_AUDIENCE,invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"getObjectAudiences",value:function(e,t,n,r){return this.get({resource:hh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectAudiences",value:function(e,t,n,r,i,a){var o=Sm.singularizeMemberType(r);return this.update({resource:yh(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_AUDIENCES,":").concat(e),invalidationKeys:["".concat(r,":").concat(e,":").concat(s.AUDIENCES)],successHandler:this.alertService.success("Successfully updated ".concat(o," audiences.")),errorHandler:this.alertService.error("Failed to update ".concat(o," audiences."))})}},{key:"name",get:function(){return f.SUBJECT}},{key:"channelName",get:function(){return p.SUBJECT}}])&&wm(t.prototype,n),r&&wm(t,r),a}(De),bh={dataServiceName:f.SUBJECT,dataChannelName:p.SUBJECT},Sh={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},bh),{eventPrefix:s.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},bh),{eventPrefix:gh(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},bh),{eventPrefix:s.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getObjectClassificationsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),fetchData:function(n){return n.getObjectClassifications(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},bh),{eventPrefix:s.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getObjectLevelsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),fetchData:function(n){return n.getObjectLevels(e,t)},setData:n,onError:r})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(s.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})},getObjectAudiencesFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},bh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),fetchData:function(n){return n.getObjectAudiences(e,t)},setData:n,onError:r})}},Eh=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},Ch=function(e,t){var n=e.levelIds;return t.filter((function(e){return n.includes(e.id)}))};function Oh(e){var t=e.showLevels;return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Audiences"),!!t&&d.createElement("th",null,"Mapped Level(s)")))}function jh(e){var t,n=e.audience,r=e.levels;return d.createElement("tr",null,d.createElement("td",null,d.createElement(Pl,{appLink:(t=n,{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[t.presentationId,t.masterId]})},n.name)),d.createElement("td",null,r.map((function(e){return d.createElement(Pl,{key:e.id,appLink:Eh(e),className:"mr-2"},e.name)}))))}function Ih(e){var t=e.audiences,n=e.levels;return d.createElement(uo.Table,{responsive:!0,bordered:!0},d.createElement(Oh,{showLevels:!!t.length}),d.createElement("tbody",null,t.length?t.map((function(e){return d.createElement(jh,{key:e.masterId,audience:e,levels:Ch(e,n)})})):d.createElement("tr",null,d.createElement("td",null,"This presentation has no audiences."))))}function Ah(e){var t=null===e.masterId||void 0===e.masterId,n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this audience",autoFocus:!0}),d.createElement(vo,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(uo.Button,{as:Pl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_AUDIENCE,args:[e.presentationId,e.masterId]}},"Delete")))}function Th(e){return d.createElement(so,{initialValues:e.audience,validationSchema:hm,onSubmit:e.saveAudience},d.createElement(Ah,{masterId:e.audience&&e.audience.masterId,presentationId:e.presentationId,levels:e.levels}))}function wh(e){var t=e.objectAudiences,n=e.presentationAudiences;return t.filter((function(e){return n.some((function(t){return t.masterId===e.masterId}))}))}function kh(e){var t,n,r,i,a,o=Sm.singularizeMemberType(e.memberType),s=(n=(t=e).presentationAudiences,r=t.objectLevels,i=t.objectAudiences,a=r.map((function(e){return e.id})),n.filter((function(e){return Vt.intersection(e.levelIds,a).length||i.some((function(t){return t.masterId===e.masterId}))})));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Levels"),d.createElement("p",null,"Select which levels this ".concat(o," is mapped to.")),d.createElement("p",null,"To see how levels correspond to audiences, scroll down to the audience-level mappings table."),d.createElement(Wh,{initialValues:{levelIds:e.objectLevels.map((function(e){return e.id})),addToAudiences:!0},saveLevels:e.saveLevels,levels:e.levels,memberType:e.memberType})),d.createElement("h6",null,"Audiences"),d.createElement("p",null,"Select a presentation to view its audiences and map them to this ".concat(o,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(Xh,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),d.createElement("p",null,"Audience to level mappings for this presentation are displayed below."),d.createElement(Ih,{levels:e.levels,audiences:e.presentationAudiences}),d.createElement("p",null,"Only the audiences which are mapped to a level that this"+" ".concat(o," is mapped to are displayed below.")),!!s.length&&d.createElement(xh,{initialValues:{audienceIds:wh(e).map((function(e){return e.masterId}))},saveAudiences:e.saveAudiences,audiences:s}))}function Lh(e){var t=qa(),n=bo(t);return d.createElement(eo,null,d.createElement(vo,{label:"Audience(s)",as:"select",name:"audienceIds",id:"audience-ids",multiple:!0,size:e.audiences.length,value:t.values.audienceIds},e.audiences.map((function(e){return d.createElement("option",{key:e.masterId,value:e.masterId},e.name)}))),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Audiences")))}function xh(e){return d.createElement(so,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.audienceIds;return e.saveAudiences(r,n)},enableReinitialize:!0},d.createElement(Lh,{audiences:e.audiences}))}function Ph(e){var t=e.item,n=e.getItemAppLink,r=e.actions,i=e.pinState;return d.createElement("tr",null,d.createElement("td",null,d.createElement(Pl,{appLink:n(t)},t.name)),i.isPinnable&&d.createElement("td",null,d.createElement(Fl,{selected:parseInt(t.id)===parseInt(i.currentPinnedVideo),onToggle:function(e){return i.onChange(e,t.id)},id:t.id})),r&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Wu,{actions:r}))))}function Nh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fh(e){var t=e.items,n=e.memberType,r=e.classification,i=e.getItemAppLink,a=e.getActions,o=e.updatePinnedVideo,s=Dh(d.useState(!1),2),c=s[0],l=s[1],u=function(e,t){var n=e.pinnedVideoMasterId||null,r=Nh(d.useState(n),2),i=r[0],a=r[1];return{currentPinnedVideo:i,onChange:function(e,t){a(e?t:null)},canSubmit:n!==i,isPinnable:t===pm.Videos}}(r,n);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var p="".concat(ru(Sm.singularizeMemberType(n))," Name");return d.createElement(d.Fragment,null,d.createElement(uo.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,p),u.isPinnable&&d.createElement("th",null,"Pinned"),X.isFunction(a)&&d.createElement("th",null))),d.createElement("tbody",null,t.map((function(e){return d.createElement(Ph,{item:e,key:e.id,getItemAppLink:i,actions:X.isFunction(a)&&a(e),pinState:u})})))),u.isPinnable&&d.createElement(Eo,{showSpinner:c,onClick:function(){l(!0),o(u.currentPinnedVideo,(function(){return l(!1)}))},disabled:!u.canSubmit||c},"Save"))}function Mh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Uh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Vh=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function zh(e){var t=qa(),n=bo(t),r=null===e.id||void 0===e.id,i=!r||!(!t.values.parentIds||!t.values.parentIds.length),a=Mh(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,t.values.parentIds]),d.useEffect((function(){t.values.subjectIds.length&&!t.touched.subjectIds&&t.setFieldTouched("subjectIds",!0)}),[t.values.subjectIds]);var l=function(e){return t.setFieldValue("parentIds",Vt.addOrRemove(t.values.parentIds.map((function(e){return e.toString()})),e.id.toString()))},p=function(e){return t.setFieldValue("subjectIds",Vt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),e.id.toString()))},f=function(e){return"".concat(po.getCustomFormControlClassName(t.errors,t.touched,e)," h-auto py-2")};return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this classification",autoFocus:!0}),d.createElement(vo,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},dt.getEnumKeys(mm).map((function(e){return d.createElement("option",{key:e,value:mm[e]},e)}))),d.createElement(vo,{label:"Coming Soon",name:"comingSoon",id:"comingSoon",type:"checkbox",checked:t.values.comingSoon}),d.createElement(vo,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:t.values.emphasize}),d.createElement(vo,{label:"Can Be Preferred",name:"canBePreferred",id:"canBePreferred",type:"checkbox",checked:t.values.canBePreferred}),d.createElement(vo,{name:"parentIds"},(function(){return d.createElement("div",{className:f("parentIds")},d.createElement(hp,{label:"Parent Classification(s)",tree:e.classificationTree,selectedIds:t.values.parentIds,onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root classification.",isNodeDisabled:(n=e.classificationTree,r=e.id,function(e){if(e.id===r)return!0;var t=ou.find(n,r);return!!ou.find(t,e.id)})}));var n,r})),d.createElement(vo,{name:"subjectIds"},(function(){return d.createElement("div",{className:f("subjectIds")},d.createElement(hp,{label:"Mapped Subject(s)",tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:p,collapse:!r,getSelectedItemAppLink:Vh}))})),d.createElement(xu,{imageType:Ul.Covers,fieldName:"cover",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement(xu,{imageType:Ul.Banners,fieldName:"banner",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},r?"Create":"Save"),!r&&d.createElement(uo.Button,{as:Pl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e.presentationId,e.id]}},"Delete")))}function Bh(e){return d.createElement(so,{initialValues:e.classification,validationSchema:ym,onSubmit:e.saveClassification},d.createElement(zh,{id:e.classification&&e.classification.id,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree}))}var Hh=function(e){return function(t){if(!e)return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION;switch(e){case pm.Playlists:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case pm.Series:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_SERIES;case pm.Videos:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function qh(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?d.createElement(d.Fragment,null,d.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),d.createElement("div",{className:"py-2"},d.createElement(np,{tabs:Om(t.id,n),isItemActive:Hh(r)}))):d.createElement(d.Fragment,null)}function Jh(e){var t=qa(),n=bo(t),r=function(e){return t.setFieldValue("classificationIds",Vt.addOrRemove(t.values.classificationIds.map((function(e){return e.toString()})),e.id.toString()))},i="".concat(po.getCustomFormControlClassName(t.errors,t.touched,"classificationIds")," h-auto py-2");return d.createElement(eo,null,d.createElement(vo,{name:"classificationIds"},(function(){return d.createElement("div",{className:i},d.createElement(hp,{label:"Mapped Classification(s)",tree:e.classificationTree,selectedIds:t.values.classificationIds,onSelect:r,getSelectedItemAppLink:(n=e.presentationId,function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,e]}}),isNodeDisabled:e.isClassificationDisabled}));var n})),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Classifications")))}function $h(e){return d.createElement(so,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.classificationIds;return e.saveClassifications(r,n)},enableReinitialize:!0},d.createElement(Jh,{presentationId:e.presentationId,classificationTree:e.classificationTree,isClassificationDisabled:e.isClassificationDisabled}))}function Kh(e){var t=null===e.id||void 0===e.id,n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this level",autoFocus:!0}),d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"))}function Yh(e){return d.createElement(so,{initialValues:e.level,validationSchema:gm,onSubmit:e.saveLevel},d.createElement(Kh,{id:e.level&&e.level.id}))}function Gh(e){var t=Sm.singularizeMemberType(e.memberType),n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement(vo,{label:"Automatically add to audiences*",name:"addToAudiences",id:"add-to-audiences",type:"checkbox",checked:n.values.addToAudiences}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(t," to a level, all of that level's")+" audiences across all presentations will also be added to.")),d.createElement("p",null,d.createElement("strong",null,"Note:")," When removing a ".concat(t," from a level, that level's audiences "),d.createElement("strong",null,"will not")," be automatically removed from."),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},"Save Levels")))}function Wh(e){return d.createElement(so,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.levelIds,i=t.addToAudiences;return e.saveLevels(r,i,n)}},d.createElement(Gh,{levels:e.levels,memberType:e.memberType}))}function Zh(e){var t=e.values,n=t.name,r=t.description,i=e.id,a=e.isSubmitting,o=!i;return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),d.createElement(Eo,{showSpinner:a,type:"submit"},o?"Create":"Save"))}function Qh(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.description,s=void 0===o?"":o,c=e.savePresentation;return d.createElement(Ga,{initialValues:{name:a,description:s},validationSchema:vm,onSubmit:c},(function(e){return d.createElement(Zh,Object.assign({id:r},e))}))}function Xh(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label,a=function(e){var n,i,a=(n=e,i=t,Vt.first(i.filter((function(e){return e.id.toString()===n.toString()}))));r(a)};return d.useEffect((function(){t&&!n&&r(t[0])}),[t]),d.createElement(d.Fragment,null,!!n&&d.createElement(d.Fragment,null,d.createElement(uo.Form.Label,null,i),d.createElement(uo.Form.Control,{as:"select",value:n.id,onChange:function(e){return a(e.target.value)},className:"cursor-pointer"},t.map((function(e){return d.createElement("option",{value:e.id,key:e.id},e.name)})))))}function ey(e){return d.createElement(d.Fragment,null,d.createElement("h4",null,"".concat(ru(e.memberType))),d.createElement(uo.Table,{responsive:!0},d.createElement("tbody",null,e.objects&&e.objects.map((function(t){return d.createElement("tr",{key:t.id},d.createElement("td",null,d.createElement(Pl,{appLink:Sm.getMemberAppLink(e.memberType,t.id)},t.name)))})))),d.createElement(fy,{initialValues:{subjectIds:[],addToClassifications:!0},subjectTree:e.subjectTree,saveSubjects:e.onClickAddToSubject,memberType:e.memberType,saveBtnText:"Add to subject",subjectRequired:!0}))}function ty(e){return function(e){if(Array.isArray(e))return ny(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ny(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ny(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ny(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ry(e){var t=Sm.singularizeMemberType(e.memberType),n=[].concat(ty(e.objectClassifications),ty(e.objectSubjectClassifications)).map((function(e){return e.id}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Subjects"),d.createElement("p",null,"Select which subjects this ".concat(t," is mapped to.")),d.createElement(fy,{initialValues:{subjectIds:e.objectSubjects.map((function(e){return e.id}))},subjectTree:e.subjectTree,saveSubjects:e.saveSubjects,memberType:e.memberType,saveBtnText:"Save Subjects",allowMultiple:!0})),d.createElement("h6",null,"Classifications"),d.createElement("p",null,"Select a presentation to view its classifications and map them to this ".concat(t,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(Xh,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),e.currentPresentation&&e.classificationTree&&e.classificationTree.children.length?d.createElement(d.Fragment,null,d.createElement("p",null,"Only classifications which are mapped to one of the subjects selected above can be selected."),d.createElement($h,{initialValues:{classificationIds:e.objectClassifications.map((function(e){return e.id}))},presentationId:e.currentPresentation.id,classificationTree:e.classificationTree,saveClassifications:e.saveClassifications,isClassificationDisabled:function(e){return!n.includes(e.id)}})):d.createElement("p",null,"This presentation has no classifications."))}function iy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ay(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ay(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ay(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Xh.defaultProps={label:"Presentation"};function oy(e){var t=!e.id,n=qa(),r=bo(n),i=!t||!!n.values.parentId,a=iy(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,n.values.parentId]);var l=function(e){var t=e.id===n.values.parentId?null:e.id;n.setFieldValue("parentId",t)},p="".concat(po.getCustomFormControlClassName(n.errors,n.touched,"parentId")," h-auto py-2");return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this subject",autoFocus:!0}),d.createElement(vo,{name:"parentId"},(function(){return d.createElement("div",{className:p},d.createElement(hp,{label:"Parent Subject",tree:e.subjectTree,selectedIds:[n.values.parentId],onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root subject.",isNodeDisabled:(t=e.subjectTree,r=e.id,function(e){if(e.id===r)return!0;var n=ou.find(t,r);return!!ou.find(n,e.id)})}));var t,r})),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(uo.Button,{as:Pl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},"Delete")))}function sy(e){return d.createElement(so,{initialValues:e.subject,validationSchema:bm,onSubmit:e.saveSubject},d.createElement(oy,{id:e.subject&&e.subject.id,subjectTree:e.subjectTree}))}var cy=function(e){return function(t){return t.appLink.action===e}};function ly(e){var t=e.subjectId,n=e.activeAction;return d.createElement(d.Fragment,null,d.createElement(uo.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),d.createElement("div",{className:"py-2"},d.createElement(np,{tabs:Cm(t),isItemActive:cy(n)})))}var uy=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function py(e){var t=qa(),n=bo(t),r=function(n){var r=e.allowMultiple?Vt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),n.id.toString()):[n.id];t.setFieldValue("subjectIds",r)},i=Sm.singularizeMemberType(e.memberType),a="".concat(po.getCustomFormControlClassName(t.errors,t.touched,"subjectIds")," h-auto py-2");return d.createElement(eo,null,d.createElement(vo,{name:"subjectIds"},(function(){return d.createElement("div",{className:a},d.createElement(hp,{label:"Mapped Subject".concat(e.allowMultiple?"(s)":""),tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:r,collapse:!!t.initialValues.subjectIds.length,getSelectedItemAppLink:uy}))})),d.createElement(vo,{label:"Automatically add to classifications*",name:"addToClassifications",id:"add-to-classifications",type:"checkbox",checked:t.values.addToClassifications}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(i," to a subject, all of that subject's")+" mapped classifications across all presentations will also be added to.")),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.saveBtnText)))}function fy(e){var t;return d.createElement(so,{initialValues:e.initialValues,validationSchema:(t=e.subjectRequired,co.object().shape({subjectIds:t?co.array().of(co.string()).min(1,"A subject is required").required("A subject is required"):co.array().of(co.string()),addToClassifications:co.boolean().default(!0)}).noUnknown()),onSubmit:function(t,n){var r=t.subjectIds,i=t.addToClassifications;return e.saveSubjects(r,i,n)}},d.createElement(py,{subjectTree:e.subjectTree,memberType:e.memberType,allowMultiple:e.allowMultiple,saveBtnText:e.saveBtnText}))}py.defaultProps={saveBtnText:"Save"};var dy=function(e){return d.createElement("div",{className:"border rounded p-2 mb-3"},d.createElement("h6",{className:"border-bottom pb-1"},e.presentation.name),e.classifications&&e.classifications.length?d.createElement("ul",{className:"list-unstyled mb-0"},e.classifications.map((function(t){return d.createElement("li",{key:t.id,className:"py-1"},d.createElement(Pl,{appLink:(n=e.presentation.id,r=t.id,{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,r]})},t.name));var n,r}))):d.createElement("p",null,d.createElement("em",null,"There are no classifications mapped to this subject in this presentation.")))},my=function(e){return d.createElement(d.Fragment,null,!!e.presentations&&!!e.classificationDictionary&&e.presentations.map((function(t){return d.createElement(dy,{key:t.id,presentation:t,classifications:e.classificationDictionary[t.id]})})))},hy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function yy(e){return d.createElement(d.Fragment,null,e.classifications.map((function(t){return d.createElement("th",{key:t.id},d.createElement("span",{className:"d-inline-block"},d.createElement(Fl,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),d.createElement(Pl,{appLink:e.getClassificationAppLink(t.id)},function(e,t){return t?e.name:"Classification: ".concat(e.name)}(t,e.showClassificationSubHeader)))})))}function gy(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=hy(e,["memberType","hasActions","classifications"]),a="".concat(ru(Sm.singularizeMemberType(t))," Name"),o=!!r&&!!r.length,s=o&&r.length>1,c=o?2:1,l=Object.assign({classifications:r,showClassificationSubHeader:s},i);return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",{rowSpan:c},a),o&&(s?d.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):d.createElement(yy,Object.assign({},l))),n&&d.createElement("th",{rowSpan:c})),o&&s&&d.createElement("tr",null,d.createElement(yy,Object.assign({},l))))}function vy(e){var t=e.member,n=t.id,i=t.name,a=t.classifications,o=void 0===a?[]:a,s=e.getMemberAppLink,c=e.onToggleClassification,l=e.actions,u=X.isFunction(s)&&s(n);return o.length&&!X.isFunction(c)&&r.ErrorHelper.throw(new z("onToggleClassification must be passed to SubjectMemberItem")),d.createElement("tr",null,d.createElement("td",null,u?d.createElement(Pl,{appLink:s(n)},i):i),!!o.length&&o.map((function(e){return d.createElement("td",{key:e.id},d.createElement(Fl,{selected:e.selected,onToggle:function(t){return c(e.id,t,n)}}))})),l&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Wu,{actions:l}))))}var by=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Sy(e,t){return function(n){var r=n[e],i=gp.length(r);return!!i&&i===t.length}}function Ey(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,a=e.getClassificationAppLink,o=e.onToggleClassification,s=by(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var c=X.isFunction(r),l={memberType:n,classifications:i,getClassificationAppLink:a,getIsClassificationSelected:Sy(n,t),onToggleClassification:o,hasActions:c};return d.createElement(uo.Table,{responsive:!0,bordered:!0},d.createElement(gy,Object.assign({},l)),d.createElement("tbody",null,t.map((function(e,t){return d.createElement(vy,Object.assign({key:t,member:e,actions:c&&r(e.id),onToggleClassification:o},s))}))))}function Cy(e){var t=e.navItems,n=e.currentAppLink;return d.createElement(uo.Container,null,d.createElement(uo.Navbar,{className:"justify-content-between align-items-center"},d.createElement(uo.Nav,null,!!t&&t.map((function(e,t){return d.createElement(uo.Nav.Item,{key:t},d.createElement(Pl,{appLink:e.appLink,className:"nav-link".concat(Ql.isItemActive(e,n)?" text-primary":"")},e.label))})))))}function Oy(e,t){d.useEffect((function(){e.presentations&&!e.currentPresentation&&lm.getSetStateByKey(t,"currentPresentation")(Vt.first(e.presentations))}),[e.presentations])}function jy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Iy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ay(e){var t=i.useBasicFetch(Hd(e.playlistId)),n=jy(d.useState({}),2),r=n[0],a=n[1],s=Nd(f.SUBJECT);!function(e,t,n){var r=function(e){return lm.getSetStateByKey(n,e)};cm([Sh.getObjectLevelsFetchOptions(e,pm.Playlists,r("playlistLevels"))],[e]),mu(Sh.getObjectAudiencesFetchOptions(e,pm.Playlists,r("playlistAudiences")),[e,t.playlistLevels]),cm([Sh.getPresentationsFetchOptions(r("presentations")),Sh.getLevelsFetchOptions(r("levels"))],[]),mu(!!t.currentPresentation&&Sh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.playlistId,r,a),Oy(r,a);var c=!!(r.presentations&&r.levels&&r.presentationAudiences&&r.playlistLevels&&r.playlistAudiences);return d.createElement(d.Fragment,null,d.createElement(am,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_AUDIENCES}),d.createElement(Zu,{object:t.data}),!!c&&d.createElement(kh,{objectLevels:r.playlistLevels,objectAudiences:r.playlistAudiences,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:lm.getSetStateByKey(a,"currentPresentation"),levels:r.levels,presentationAudiences:r.presentationAudiences,memberType:pm.Playlists,saveLevels:function(t,n,r){return s.updateObjectLevels(e.playlistId,t,pm.Playlists,n,r,r)},saveAudiences:function(t,n){return s.updateObjectAudiences(e.playlistId,r.currentPresentation.id,t,pm.Playlists,n,n)}}))}function Ty(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||ky(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wy(e){return function(e){if(Array.isArray(e))return Ly(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ky(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ky(e,t){if(e){if("string"==typeof e)return Ly(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ly(e,t):void 0}}function Ly(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xy(e){var t=i.useBasicFetch(Hd(e.playlistId)),n=Ty(d.useState({}),2),r=n[0],a=n[1],s=Nd(f.SUBJECT);!function(e,t,n){var r=function(e){return lm.getSetStateByKey(n,e)};cm([Sh.getSubjectTreeFetchOptions(r("subjectTree")),Sh.getPresentationsFetchOptions(r("presentations"))],[]),cm([Sh.getObjectSubjectsFetchOptions(e,pm.Playlists,r("playlistSubjects"))],[e]),mu(!!t.currentPresentation&&Sh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.playlistSubjects]);var i=function(e,t){return[].concat(wy(t.subjectClassifications||[]),wy(e))},a=t.playlistSubjects&&t.playlistSubjects.map((function(e){return Sh.getSubjectClassificationFetchOptions(e.id,lm.getSetStateByKey(n,"subjectClassifications",i))}));cm(a,[t.playlistSubjects],!!a),mu(Sh.getObjectClassificationsFetchOptions(e,pm.Playlists,r("playlistClassifications")),[e,t.playlistSubjects])}(e.playlistId,r,a),Oy(r,a);var c=!!(r.playlistSubjects&&r.subjectTree&&r.presentations&&r.classificationTree&&r.playlistClassifications&&r.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(am,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_SUBJECTS}),d.createElement(Zu,{object:t.data}),c&&d.createElement(ry,{objectSubjects:r.playlistSubjects,subjectTree:r.subjectTree,memberType:pm.Playlists,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:lm.getSetStateByKey(a,"currentPresentation"),objectClassifications:r.playlistClassifications,objectSubjectClassifications:r.subjectClassifications,classificationTree:r.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.playlistId,t,pm.Playlists,n,r,r)},saveClassifications:function(t,n){return s.updateObjectClassifications(e.playlistId,r.currentPresentation.id,t,pm.Playlists,n,n)}}))}const Py={reorder(e,t,n){if(t===n)return{reorderedItems:e,reorderRequest:null};const r=Vt.moveItem(e,t,n),i=n<e.length-1?r[n+1].id:null;return{reorderedItems:r,reorderRequest:{sourceMemberId:r[n].id,destinationMemberId:i}}},updateState(e,t,n){const r=[],i=dt.deepClone(n),a=[e];let o=n[e];const s=!!o&&!!o.data&&o.data.length;for(;o&&Array.isArray(o.data);){r.push(...o.data);const t=o.pagination&&o.pagination.cursors&&o.pagination.cursors.next,i=!!t&&`${e}:${t}`;o=t&&n[i],o&&a.push(i)}if(!r.length)return n;const c=Vt.findIndex(r,e=>e.id===t.sourceMemberId),l=[...r],u=l.splice(c,1),p=t.destinationMemberId?Vt.findIndex(l,e=>e.id===t.destinationMemberId):l.length;return l.splice(p,0,u[0]),a.forEach(e=>{const t=l.splice(0,s);i[e].data=t}),i}};function Ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dy=function(e){return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:[e.id]}};function Ry(e){var t,n,r=Object(te.useDispatch)(),a=Md(),s=i.useBasicFetch(Hd(e.playlistId)),c=i.useBasicFetch(Yd(e.playlistId)),l=Ny(function(e){const[t,n]=Object(d.useState)();return Object(d.useEffect)(()=>{t&&(e.length!==t.length||function(e,t){let n=!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r].id!==t[r].id){n=!1;break}return n}(e,t))&&n(null)},[e]),[t,n]}(null===(t=c.data)||void 0===t?void 0:t.data),2),p=l[0],f=l[1],m=p?{data:p,pagination:null}:c.data;return d.createElement(d.Fragment,null,d.createElement(am,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_VIDEOS}),d.createElement(Zu,{object:s.data}),!!m&&d.createElement(Lp,{onSortEnd:function(t,n){if(t!==n){var o=Py.reorder(c.data.data,t,n),s=o.reorderRequest,l=o.reorderedItems;f(l);i.fetch(r,Gd(e.playlistId,s,null,(function(){a.error("Failed to update playlist order."),f(null)})))}},videos:m,getVideoAppLink:Dy,getVideoActions:(n=e.playlistId,function(e){return[{label:"Remove video",appLink:{application:u.PLAYLISTS,action:o.Playlists.REMOVE_VIDEO,args:[n.toString(),e.id.toString()]},className:"text-danger"}]}),emptyMessage:"There are no videos in this playlist."}))}function Fy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return My(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return My(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function My(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uy(){var e=Object(te.useDispatch)(),t=Md(),n=Fy(d.useState(),2),a=n[0],s=n[1];return mu($e.getCurrentUserFetchOptions(s),[]),d.createElement(d.Fragment,null,!!a&&d.createElement(rm,{savePlaylist:function(n,s){i.fetch(e,Jd(n,a.id,(function(e){t.success("Successfully created playlist."),function(e){e&&e.id&&r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]})}(e)}),(function(){t.error("Failed to create playlist.")}),s))}}))}var Vy="rating,thumbnail,glance",zy=function(e){return{url:"/api/master/v2/objects/".concat(e,"?query=").concat(Vy),key:"videos:".concat(e)}},By=function(e){var t=e.slice().sort();return{key:"videos:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Hy=function(e){return{url:"/ajax/hostedlibraries/rightsline/programs/".concat(e),key:"rightsline:videos:".concat(e),normalizeOptions:{namespace:"rightsline"}}},qy=function(e,t,n,r,i){return{key:"videos:".concat(e),url:"/api/master/v2/objects/".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}};function Jy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ky(e){var t=Object(te.useDispatch)(),n=Md(),r=i.useBasicFetch(Hd(e.playlistId)),a=i.useBasicFetch(zy(e.videoId)),o=Jy(d.useState(!1),2),s=o[0],c=o[1];var l=!!r.data&&!!a.data;return d.createElement(uf,{title:"Remove Video",closePopup:e.closePopup,showLoadingSpinner:!l},!!l&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,a.data.name)," from ",d.createElement("strong",null,r.data.name),"?")),d.createElement(ff,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,Wd(e.playlistId,e.videoId,(function(){n.success("Successfully removed video from playlist")}),(function(){n.error("Failed to remove video from playlist")}),e.closePopup))},buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:s}]})))}function Yy(e){return r.AppLinkHelper.trigger(function(e){return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}}(e))}function Gy(e){var t=e?{application:u.PLAYLISTS,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e}}:{application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS};r.AppLinkHelper.trigger(t)}function Wy(e){return d.createElement("div",{className:"pb-3 w-50"},d.createElement(xl,{initialQuery:e.query,placeholder:"Search for a playlist",onSuggestionSelected:Yy,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/playlists/instant/raw","?query=").concat(e)},activationLength:2,onSubmit:Gy}))}var Zy=u.PLAYLISTS,Qy=function(e){return{application:Zy,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function Xy(e){var t=i.useBasicFetch(zd(e.cursor));return d.createElement(d.Fragment,null,d.createElement(Wy,null),d.createElement(zu,{collection:t&&t.data,collectionAppLink:{application:Zy,action:o.Playlists.PLAYLISTS},newObjectAppLink:{application:Zy,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:Qy,objectName:"Playlist"}))}var eg=u.PLAYLISTS,tg=function(e){return{application:eg,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function ng(e){var t=i.useBasicFetch(Bd(e.query,e.cursor));return d.createElement(d.Fragment,null,d.createElement(Wy,{query:e.query}),!!t.data&&(t.data.data.length?d.createElement(zu,{collection:t.data,collectionAppLink:{application:eg,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e.query}},newObjectAppLink:{application:eg,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:tg,objectName:"Playlist"}):d.createElement("p",null,"No playlists found, please try a different search query.")))}function rg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ig(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ig(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ig(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ag=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function og(e){var t=e.id,n=e.routeToOnDelete,i=e.closePopup,a=rg(d.useState(),2),o=a[0],s=a[1],c=rg(d.useState(!1),2),l=c[0],u=c[1],p=Nd(f.SUBJECT);mu(Sh.getAudienceFetchOptions(t,s),[t]);return d.createElement(uf,{title:"Delete Audience",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(ff,{buttons:ag((function(){u(!0);p.deleteAudience(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)}),i,l)})))}function sg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return cg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lg=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function ug(e){var t=e.presentationId,n=e.audienceId,r=sg(d.useState(),2),i=r[0],a=r[1],o=sg(d.useState(),2),s=o[0],c=o[1],l=sg(d.useState(),2),u=l[0],p=l[1],m=Nd(f.SUBJECT);mu(Sh.getAudienceFetchOptions(n,a),[n]),mu(Sh.getLevelsFetchOptions(c),[]),mu(Sh.getPresentationFetchOptions(t,p),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(Nl,{appLink:lg(t),backToName:"audiences"})),!!u&&d.createElement("h6",null,"Presentation: ".concat(u.name)),!!i&&!!s&&d.createElement(Th,{audience:i,levels:s,saveAudience:function(e,r){return m.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),r,r)},presentationId:t}))}function pg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dg=function(e){return function(t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,t.masterId]}}},mg=function(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_AUDIENCE,args:[e]}},hg={application:u.SUBJECTS,action:o.Subjects.AUDIENCES};function yg(e){var t=e.presentationId,n=pg(d.useState(),2),r=n[0],i=n[1];return mu(Sh.getAudiencesFetchOptions(t,i),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(Nl,{appLink:hg,backToName:"presentations"})),d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),d.createElement(Pl,{appLink:mg(t),className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:Il.Small}),d.createElement("span",null,"New Audience"))),d.createElement(ep,{objects:r,getAppLink:dg(e.presentationId),emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function gg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bg=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function Sg(e){var t=e.presentationId,n=gg(d.useState(),2),i=n[0],a=n[1],s=gg(d.useState(),2),c=s[0],l=s[1],p=Nd(f.SUBJECT);mu(Sh.getLevelsFetchOptions(a),[]),mu(Sh.getPresentationFetchOptions(t,l),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2"},d.createElement(Nl,{appLink:bg(t),backToName:"audiences"})),!!c&&d.createElement("h6",null,"Presentation: ".concat(c.name)),!!i&&d.createElement(Th,{levels:i,presentationId:t,saveAudience:function(e,n){return p.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,n.masterId]})}}(t,n),n)}}))}function Eg(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}}function Cg(e){return[{label:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},Eg(e)),{args:[e],params:{parentId:t.id}})}},{label:"Delete classification",getAppLink:function(t){return{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var Og=n(127),jg=n.n(Og);function Ig(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ag(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ag(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ag(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tg(e){var t=e.presentationId,n=e.selectedClassificationId,r=Ig(d.useState(),2),i=r[0],a=r[1],s=Ig(d.useState(),2),c=s[0],l=s[1];return function(e,t,n){cm([Sh.getClassificationTreeFetchOptions(e,t),Sh.getPresentationFetchOptions(e,n)],[e])}(t,a,l),d.createElement("div",{className:"".concat(jg.a.navContainer," h-auto pr-2 border-right")},!!c&&d.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(c.name,")")),d.createElement(Pl,{appLink:Eg(t),className:"d-inline-block pb-2"},d.createElement(Al,{svgName:Sl.Plus,size:Il.Small}),d.createElement("span",null,"New Classification")),!!i&&d.createElement("div",{className:"border-top pt-1"},d.createElement(up,{tree:i,getAppLink:function(e){return function(e,t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:Cg(t)})))}function wg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lg(e){var t=e.classificationId,n=e.routeToOnDelete,i=e.closePopup,a=wg(d.useState(),2),o=a[0],s=a[1],c=wg(d.useState(!1),2),l=c[0],u=c[1];mu(Sh.getClassificationFetchOptions(t,s),[]);var p=Nd(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteClassification(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:l}];return d.createElement(uf,{title:"Delete Classification",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(ff,{buttons:m})))}function xg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ng(e){var t=e.presentationId,n=e.classificationId,r=xg(d.useState(),2),i=r[0],a=r[1],o=xg(d.useState(),2),s=o[0],c=o[1],l=xg(d.useState(),2),u=l[0],p=l[1],m=xg(d.useState(),2),h=m[0],y=m[1],g=Nd(f.SUBJECT),v=Sh.getClassificationFetchOptions(n,a),b=Sh.getPresentationFetchOptions(t,c),S=Sh.getClassificationTreeFetchOptions(t,p);mu(Sh.getSubjectTreeFetchOptions(y),[]),mu(v,[n]),cm([b,S],[t]);return d.createElement("div",null,d.createElement(qh,{presentation:s,classificationId:n}),!!i&&!!u&&!!h&&d.createElement(Bh,{classification:i,presentationId:t,subjectTree:h,classificationTree:u,saveClassification:function(e,t){return g.updateClassification(n,e,t,t)}}))}function _g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rg(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=_g(d.useState(),2),a=i[0],o=i[1],s=_g(d.useState(),2),c=s[0],l=s[1],u=_g(d.useState(),2),p=u[0],m=u[1];mu(Sh.getPresentationFetchOptions(t,o),[]),mu(Sh.getClassificationFetchOptions(n,l),[n]),mu(Sh.getClassificationMembersFetchOptions(n,r,m),[n,r]);var h=Nd(f.SUBJECT),y={items:p&&p.data,memberType:r,classification:c,updatePinnedVideo:function(e,t){var r=Object.assign(Object.assign({},c),{pinnedVideoMasterId:e});h.updateClassification(n,r,t)},getItemAppLink:function(e){return Sm.getMemberAppLink(r,e.id)},getActions:function(e){return Sm.getMemberActions(n,um.Classification,r,e.id)}},g={presentation:a,classificationId:n},v=tu(y);return d.createElement(d.Fragment,null,d.createElement(qh,Object.assign({},g,{memberType:r})),v&&d.createElement(Fh,Object.assign({},y)))}function Fg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Mg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ug(e){var t=e.presentationId,n=e.parentId,i=Fg(d.useState(),2),a=i[0],s=i[1],c=Fg(d.useState(),2),l=c[0],p=c[1],m=Nd(f.SUBJECT),h=Sh.getClassificationTreeFetchOptions(t,s);mu(Sh.getSubjectTreeFetchOptions(p),[]),mu(h,[t]);return d.createElement("div",null,d.createElement("h4",{className:"py-2"},"Create New Classification"),!!l&&!!a&&d.createElement(Bh,{classification:n?{parentIds:[n]}:{},presentationId:t,subjectTree:l,classificationTree:a,saveClassification:function(e,n){return m.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),n&&n.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]})}}(t,n),n)}}))}var Vg=function(e){return{key:"series:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=thumbnail,tallPoster,banner,rating")}},zg=function(e){var t=e.slice().sort();return{key:"series:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Bg=function(e,t,n,r){return{url:"/api/master/v2/series",key:"series",data:e,type:it.POST,success:t,error:n,always:r}},Hg=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:series:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}};function qg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $g(e){var t=qg(d.useState(),2),n=t[0],r=t[1],a=qg(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case pm.Playlists:return Hd(t);case pm.Series:return Vg(t);case pm.Videos:return zy(t)}}(e.memberType,e.memberId)),l=Nd(f.SUBJECT);mu(Sh.getClassificationFetchOptions(e.classificationId,r),[e.classificationId]);var u=!!n&&!!c.data,p="Remove ".concat(ru(Sm.singularizeMemberType(e.memberType)));return d.createElement(uf,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"This will not remove it from the backbone subject.")),d.createElement(ff,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromClassification(e.classificationId,[e.memberId],e.memberType,null,null,e.closePopup,e.closePopup),n.pinnedVideoMasterId===e.memberId&&l.updateClassification(e.classificationId,Object.assign(Object.assign({},n),{pinnedVideoMasterId:null}))},buttonText:"Yes, remove this ".concat(Sm.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function Kg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gg(e){var t=e.id,n=Kg(d.useState(),2),r=n[0],i=n[1],a=Nd(f.SUBJECT);mu(Sh.getLevelFetchOptions(t,i),[t]);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Level"),!!r&&d.createElement(Yh,{level:r,saveLevel:function(e,n){return a.updateLevel(t,e,n,n)}}))}function Wg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qg=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},Xg={application:u.SUBJECTS,action:o.Subjects.NEW_LEVEL};function ev(){var e=Wg(d.useState(),2),t=e[0],n=e[1];return mu(Sh.getLevelsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),d.createElement(Pl,{appLink:Xg,className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:Il.Small}),d.createElement("span",null,"New Level"))),d.createElement(ep,{objects:t,getAppLink:Qg}))}function tv(){var e=Nd(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Level"),d.createElement(Yh,{saveLevel:function(t,n){return e.createLevel(t,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[t.id]})}}(n),n)}}))}function nv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iv(e){var t=e.id,n=nv(d.useState(),2),r=n[0],i=n[1],a=Nd(f.SUBJECT);mu(Sh.getPresentationFetchOptions(t,i),[t]);var o={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return a.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},s=tu(o);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Presentation"),!!s&&d.createElement(Qh,Object.assign({},o)))}function av(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ov(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ov(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var sv=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]}},cv={application:u.SUBJECTS,action:o.Subjects.NEW_PRESENTATION};function lv(){var e=av(d.useState(),2),t=e[0],n=e[1];return mu(Sh.getPresentationsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),d.createElement(Pl,{appLink:cv,className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:Il.Small}),d.createElement("span",null,"New Presentation"))),d.createElement(ep,{objects:t,getAppLink:sv}))}function uv(){var e=Nd(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Presentation"),d.createElement(Qh,{savePresentation:function(t,n){var i=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,i)}),(function(){return i(!1)}))}}))}function pv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dv(e){var t=e.objectType,n=e.getAppLink,r=pv(d.useState(),2),i=r[0],a=r[1];return mu(Sh.getPresentationsFetchOptions(a),[]),d.createElement("div",null,d.createElement("h5",null,d.createElement(wo,{namespace:"subjects.selectPresentation",phrase:"heading",options:{objectType:t}})),d.createElement(ep,{objects:i,getAppLink:n}))}function mv(e){const{title:t,onClickConfirm:n,confirmButtonText:r,cancelButtonText:i,closePopup:a}=e,[o,s]=d.useState(!1),c=[{variant:"link",onClick:a,buttonText:i},{variant:"primary",onClick:()=>{s(!0),n()},buttonText:r,isSpinnerButton:!0,showSpinner:o}];return d.createElement(uf,{title:t,closePopup:a},d.createElement(d.Fragment,null,e.children,d.createElement(ff,{buttons:c})))}function hv(e,t){return lm.getSetStateByKey(e,t)}function yv(e,t,n,i,a){var s=i.selectedSubject,c=function(){return hv(a,"showConfirmationPopup")(!1)};t.addObjectsToSubject(s.id,e.map((function(e){return e.id})),n.memberType,i.addToClassifications,(function(){c(),r.AppLinkHelper.trigger(function(e,t){var n={application:u.SUBJECTS,args:[e]};switch(t){case pm.Playlists:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_PLAYLISTS});case pm.Series:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_SERIES});case pm.Videos:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_VIDEOS})}}(s.id,n.memberType))}),c)}function gv(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(Sm.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function vv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sv(e,t){return function(n,r,i){i(),hv(t,"selectedSubject")(ou.find(e.subjectTree,Vt.first(n))),hv(t,"addToClassifications")(r),hv(t,"showConfirmationPopup")(!0)}}function Ev(e){var t=vv(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(function(e,t){switch(e){case pm.Playlists:return qd(t);case pm.Series:return zg(t);case pm.Videos:return By(t)}}(e.memberType,e.objectIds)),o=Nd(f.SUBJECT);!function(e,t){e.memberType,e.objectIds,mu(Sh.getSubjectTreeFetchOptions(hv(t,"subjectTree")),[])}(e,r);var s;return d.createElement(d.Fragment,null,!!a.data&&!!n.subjectTree&&d.createElement(ey,{memberType:e.memberType,objects:a.data,subjectTree:n.subjectTree,onClickAddToSubject:Sv(n,r)}),n.showConfirmationPopup&&d.createElement(mv,{title:gv(e.memberType,a.data,n.selectedSubject),onClickConfirm:function(){return yv(a.data,o,e,n,r)},closePopup:function(){return e=!1,hv(r,"showConfirmationPopup")(e);var e}},d.createElement("p",null,"The following ".concat(e.memberType," will be added to "),d.createElement("strong",null,n.selectedSubject.name),n.addToClassifications?" and its mapped classifications:":":"),d.createElement("ul",null,a.data.map((function(e){return d.createElement("li",{key:e.id},e.name)}))),!n.addToClassifications&&d.createElement("p",null,"".concat(1===a.data.length?"It":"They"," will not be added to its mapped classifications.")),d.createElement("p",null,"".concat((s=e.memberType,ru(Sm.singularizeMemberType(s)))," to classification mappings can be managed from the "),d.createElement("strong",null,"Edit Subject ".concat(ru(e.memberType)," ")),"page.")))}function Cv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ov(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ov(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jv(e){var t=e.subjectId,n=e.routeToOnDelete,i=e.closePopup,a=Cv(d.useState(),2),o=a[0],s=a[1],c=Cv(d.useState(!1),2),l=c[0],u=c[1];mu(Sh.getSubjectFetchOptions(t,s),[]);var p=Nd(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteSubject(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:l}];return d.createElement(uf,{title:"Delete Subject",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?"),d.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),d.createElement(ff,{buttons:m})))}function Iv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Av(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Av(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Av(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tv(e){var t=e.subjectId,n=Iv(d.useState(),2),r=n[0],i=n[1],a=Iv(d.useState(),2),s=a[0],c=a[1],l=Nd(f.SUBJECT),u=Sh.getSubjectFetchOptions(t,i);mu(Sh.getSubjectTreeFetchOptions(c),[]),mu(u,[t]);return d.createElement(d.Fragment,null,d.createElement(ly,{subjectId:t,activeAction:o.Subjects.EDIT_SUBJECT}),!!r&&!!s&&d.createElement(sy,{subject:r,subjectTree:s,saveSubject:function(e,n){return l.updateSubject(t,e,n,n)}}))}function wv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}mv.defaultProps={confirmButtonText:"Confirm",cancelButtonText:"Cancel"};var Lv=d.createContext(void 0);function xv(e){var t=e.children,n=wv(d.useState(),2),r=n[0],i=n[1];return d.createElement(Lv.Provider,{value:[r,i]},t)}var Pv=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(xv,null,d.createElement(pu,null,t)))};function Nv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dv(e,t){return lm.getSetStateByKey(e,t)}function Rv(e){switch(e){case pm.Playlists:return o.Subjects.EDIT_SUBJECT_PLAYLISTS;case pm.Series:return o.Subjects.EDIT_SUBJECT_SERIES;case pm.Videos:return o.Subjects.EDIT_SUBJECT_VIDEOS}}function Fv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Mv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uv(e){var t=Fv(d.useState({}),2),n=t[0],r=t[1],a=n.presentations,s=n.classifications,c=n.memberIds,l=n.membersWithClassifications,p=i.useBasicFetch(Array.isArray(c)&&function(e,t){switch(e){case pm.Playlists:return qd(t);case pm.Series:return zg(t);case pm.Videos:return By(t)}}(e.memberType,c)),m=Fv(d.useContext(Lv),2),h=m[0],y=m[1],g=Nd(f.SUBJECT);!function(e,t,n){var r=e.subjectId,i=e.memberType,a=Nv(d.useContext(Lv),1)[0];mu(Sh.getPresentationsFetchOptions(Dv(n,"presentations")),[]),mu(Sh.getSubjectMemberIdsFetchOptions(r,i,Dv(n,"memberIds")),[r,i]),mu(!!a&&Sh.getSubjectClassificationFetchOptions(r,Dv(n,"classifications"),a.id,i),[r,i,a],!!a)}(e,0,r),function(e,t,n,r){var i=n.classifications;d.useEffect((function(){Dv(r,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(t.memberType,e,i))}),[e,i])}(p.data,e,n,r);var v,b,S=!!h&&!!s;return d.createElement(d.Fragment,null,d.createElement(ly,{subjectId:e.subjectId,activeAction:Rv(e.memberType)}),d.createElement(uo.Alert,{variant:"info",className:"m-0"},"Select which ".concat(e.memberType," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),d.createElement("div",{className:"w-50 py-2"},!!a&&d.createElement(Xh,{presentations:a,currentPresentation:h,setCurrentPresentation:y})),S&&d.createElement(Ey,{members:l||[],memberType:e.memberType,getMemberAppLink:function(t){return Sm.getMemberAppLink(e.memberType,t)},getActions:function(t){return Sm.getMemberActions(e.subjectId,um.Subject,e.memberType,t)},classifications:s,getClassificationAppLink:h&&(v=e.memberType,b=h.id,function(e){var t,n=u.SUBJECTS,r=[b,e];switch(v){case pm.Playlists:t=o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case pm.Series:t=o.Subjects.EDIT_CLASSIFICATION_SERIES;break;case pm.Videos:t=o.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:n,action:t,args:r}}),onToggleClassification:function(t,n,r){return function(e,t,n,r,i,a,o){(o?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(a,n,t,r,i)}(g,e.memberType,r?[r]:c,e.subjectId,h&&h.id,t,n)}}))}function Vv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bv(e){var t=e.parentId,n=Vv(d.useState(),2),i=n[0],a=n[1],s=Nd(f.SUBJECT);mu(Sh.getSubjectTreeFetchOptions(a),[]);var c={application:u.SUBJECTS,action:o.Subjects.PRESENTATIONS};return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2 border-bottom"},d.createElement(Nl,{backToName:"Presentations",appLink:c})),d.createElement("h4",{className:"py-2"},"Create New Subject"),!!i&&d.createElement(sy,{subject:{parentId:t},subjectTree:i,saveSubject:function(e,t){return s.createSubject(e,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]})}}(t),t)}}))}function Hv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jv(e){var t=Hv(d.useState(),2),n=t[0],r=t[1],a=Hv(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case pm.Playlists:return Hd(t);case pm.Series:return Vg(t);case pm.Videos:return zy(t)}}(e.memberType,e.memberId)),l=Nd(f.SUBJECT);mu(Sh.getSubjectFetchOptions(e.subjectId,r),[e.subjectId]);var u=!!n&&!!c.data,p="Remove ".concat(ru(Sm.singularizeMemberType(e.memberType)));return d.createElement(uf,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),d.createElement(ff,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromSubject(e.subjectId,[e.memberId],e.memberType,e.closePopup,e.closePopup)},buttonText:"Yes, remove this ".concat(Sm.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function $v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Kv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yv(e){var t=e.subjectId,n=$v(d.useState({}),2),r=n[0];return function(e,t){var n=function(e){return lm.getSetStateByKey(t,e)};mu(Sh.getSubjectClassificationFetchOptions(e,n("classifications")),[e]),mu(Sh.getPresentationsFetchOptions(n("presentations")),[])}(t,n[1]),d.createElement(d.Fragment,null,d.createElement(ly,{subjectId:t,activeAction:o.Subjects.SUBJECT_CLASSIFICATIONS}),d.createElement(my,{presentations:r.presentations,classificationDictionary:Vt.groupBy(r.classifications,"presentationId")}))}var Gv=n(128),Wv=n.n(Gv);function Zv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xv(e){var t=e.selectedSubjectId,n=Zv(d.useState(),2),r=n[0],i=n[1];mu(Sh.getSubjectTreeFetchOptions(i),[]);var a=d.useCallback((function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),s={application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},c=[{label:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},s),{params:{parentId:e.id}})}},{label:"Delete subject",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return d.createElement("div",{className:"".concat(Wv.a.navContainer," h-auto pr-2 border-right")},d.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),d.createElement(Pl,{appLink:s,className:"d-inline-block pb-2"},d.createElement(Al,{svgName:Sl.Plus,size:Il.Small}),d.createElement("span",null,"New Subject")),!!r&&d.createElement("div",{className:"border-top pt-1"},d.createElement(up,{tree:r,getAppLink:a,selectedIds:[t],actions:c})))}function eb(e){var t=e.currentAppLink;return d.createElement(Cy,{navItems:Em(),currentAppLink:t})}function tb(e){return(tb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ib(e,t,n){return t&&rb(e.prototype,t),n&&rb(e,n),e}function ab(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ob(e,t)}function ob(e,t){return(ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lb(e);if(t){var i=lb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cb(this,n)}}function cb(e,t){return!t||"object"!==tb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lb(e){return(lb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ub=function(e){ab(n,e);var t=sb(n);function n(){return nb(this,n),t.apply(this,arguments)}return ib(n,[{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"appRoutes",get:function(){return{"manage/playlists(/)":"index","manage/playlists/new(/)":"newPlaylist","manage/playlists/search(/)":"searchPlaylists","manage/playlists/:id(/)":"editPlaylist","manage/playlists/:id/videos(/)":"editPlaylistVideos","manage/playlists/:id/subjects(/)":"editPlaylistSubjects","manage/playlists/:id/audiences(/)":"editPlaylistAudiences"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","removeFromSubject"]}}]),n}(r.AppRouter),pb=function(e){ab(n,e);var t=sb(n);function n(){return nb(this,n),t.apply(this,arguments)}return ib(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"index",value:function(e){var t;this.layout.showChildView(ae,d.createElement(Xy,{cursor:null===(t=e)||void 0===t?void 0:t.cursor}))}},{key:"searchPlaylists",value:function(e){var t,n;this.layout.showChildView(ae,d.createElement(ng,{query:null===(t=e)||void 0===t?void 0:t.query,cursor:null===(n=e)||void 0===n?void 0:n.cursor}))}},{key:"newPlaylist",value:function(){this.layout.showChildView(ae,d.createElement(Uy,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(ae,d.createElement(om,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(ae,d.createElement(Ry,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(xy,{key:e,playlistId:e}))}},{key:"editPlaylistAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Ay,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Xd,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Ky,Object.assign({},n)))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:pm.Playlists},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Jv,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Rd,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(g.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(cf,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"navigate",value:function(e){r.LocationUtils.PageLoad(e)}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:Fd}}}}],[{key:"router",get:function(){return ub}}]),n}(r.Application),fb=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))},db=function(){return"/api/domain/v2/me/ratings"},mb="ratings",hb=function(){return{url:db(),key:mb}},yb=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:co.string().trim().max(350,"Description is too long").default(""),rating:co.object().shape({id:co.string()}).default({}).noUnknown(),tallPoster:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),banner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown()}).noUnknown(),gb=function(e,t){var n=u.SERIES,r=o.Series,i=[{label:"Edit Series Details",appLink:{application:n,action:r.EDIT_SERIES,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_SERIES_VIDEOS,args:[t]}}];return eu(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_SERIES_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_SERIES_AUDIENCES,args:[t]}}]),i};function vb(e){var t=qa(),n=bo(t);return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this series",autoFocus:!0}),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",maxLength:350,value:t.values.description,placeholder:"Describe this series here",showCharacterCounter:!0}),d.createElement(tp,{ratings:e.ratings}),d.createElement(xu,{imageType:Ul.TallPosters,fieldName:"tallPoster",application:u.SERIES,uploadAction:o.Series.UPLOAD_IMAGE}),d.createElement(xu,{imageType:Ul.Banners,fieldName:"banner",application:u.SERIES,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(Wu,{actions:e.actions})))}function bb(e){return d.createElement(so,{initialValues:e.series,validationSchema:yb,onSubmit:e.saveSeries},d.createElement(vb,{id:e.series&&e.series.id,ratings:e.ratings}))}var Sb=function(e){return function(t){return t.appLink.action===e}};function Eb(e){var t=e.seriesId,n=e.activeAction,r=d.useContext(Iu);return d.createElement("div",{className:"py-2"},!!r&&d.createElement(np,{tabs:gb(r,t),isItemActive:Sb(n)}))}function Cb(e){var t,n=Object(te.useDispatch)(),r=Md(),a=i.useBasicFetch(Vg(e.seriesId)),s=i.useBasicFetch(hb());return d.createElement(d.Fragment,null,d.createElement(Eb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES}),!!a.data&&!!s.data&&d.createElement(bb,{series:a.data,saveSeries:function(t,a){i.fetch(n,Hg(e.seriesId,t,(function(){r.success("Successfully updated series.")}),(function(){r.error("Failed to update series.")}),a))},ratings:s.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit series page ",d.createElement(Pl,{className:"info-link",appLink:(t=e.seriesId,{application:u.SERIES,action:o.Series.LEGACY_EDIT_SERIES,args:[t]})},"here"),"."))}function Ob(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ib(e){var t=Ob(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(Vg(e.seriesId)),s=Nd(f.SUBJECT);!function(e,t,n){var r=function(e){return lm.getSetStateByKey(n,e)};mu(Sh.getObjectLevelsFetchOptions(e,pm.Series,r("seriesLevels")),[e]),mu(Sh.getObjectAudiencesFetchOptions(e,pm.Series,r("seriesAudiences")),[e,t.seriesLevels]),cm([Sh.getPresentationsFetchOptions(r("presentations")),Sh.getLevelsFetchOptions(r("levels"))],[]),mu(!!t.currentPresentation&&Sh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.seriesId,n,r),Oy(n,r);var c=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.seriesLevels&&n.seriesAudiences);return d.createElement(d.Fragment,null,d.createElement(Eb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_AUDIENCES}),d.createElement(Zu,{object:a.data}),!!c&&d.createElement(kh,{objectLevels:n.seriesLevels,objectAudiences:n.seriesAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:lm.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:pm.Series,saveLevels:function(t,n,r){return s.updateObjectLevels(e.seriesId,t,pm.Series,n,r,r)},saveAudiences:function(t,r){return s.updateObjectAudiences(e.seriesId,n.currentPresentation.id,t,pm.Series,r,r)}}))}function Ab(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||wb(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tb(e){return function(e){if(Array.isArray(e))return kb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||wb(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wb(e,t){if(e){if("string"==typeof e)return kb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kb(e,t):void 0}}function kb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lb(e){var t=Ab(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(Vg(e.seriesId)),s=Nd(f.SUBJECT);!function(e,t,n){var r=function(e){return lm.getSetStateByKey(n,e)};cm([Sh.getSubjectTreeFetchOptions(r("subjectTree")),Sh.getPresentationsFetchOptions(r("presentations"))],[]),mu(Sh.getObjectSubjectsFetchOptions(e,pm.Series,r("seriesSubjects")),[e]),mu(!!t.currentPresentation&&Sh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.seriesSubjects]);var i=function(e,t){return[].concat(Tb(t.subjectClassifications||[]),Tb(e))},a=t.seriesSubjects&&t.seriesSubjects.map((function(e){return Sh.getSubjectClassificationFetchOptions(e.id,lm.getSetStateByKey(n,"subjectClassifications",i))}));cm(a,[t.seriesSubjects],!!a),mu(Sh.getObjectClassificationsFetchOptions(e,pm.Series,r("seriesClassifications")),[e,t.seriesSubjects])}(e.seriesId,n,r),Oy(n,r);var c=!!(n.seriesSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.seriesClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(Eb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_SUBJECTS}),d.createElement(Zu,{object:a.data}),c&&d.createElement(ry,{objectSubjects:n.seriesSubjects,subjectTree:n.subjectTree,memberType:pm.Series,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:lm.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.seriesClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.seriesId,t,pm.Series,n,r,r)},saveClassifications:function(t,r){return s.updateObjectClassifications(e.seriesId,n.currentPresentation.id,t,pm.Series,r,r)}}))}function xb(){var e=Object(te.useDispatch)(),t=Md(),n=i.useBasicFetch(hb());return d.createElement(d.Fragment,null,!!n.data&&d.createElement(bb,{saveSeries:function(n,a){var s=function(){t.error("Failed to create series.")},c=function(e){t.success("Successfully created series."),function(e){r.AppLinkHelper.trigger({application:u.SERIES,action:o.Series.EDIT_SERIES,args:[e.id]})}(e)};i.fetch(e,Bg(n,(function(t){var n={permissions:Xl()};i.fetch(e,Hg(t.id,n,c,s,a))}),s))},ratings:n.data}))}function Pb(e){return(Pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Db(e,t,n){return t&&_b(e.prototype,t),n&&_b(e,n),e}function Rb(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fb(e,t)}function Fb(e,t){return(Fb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vb(e);if(t){var i=Vb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){return!t||"object"!==Pb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vb(e){return(Vb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zb=function(e){Rb(n,e);var t=Mb(n);function n(){return Nb(this,n),t.apply(this,arguments)}return Db(n,[{key:"channelName",get:function(){return u.SERIES}},{key:"appRoutes",get:function(){return{"manage/series/new(/)":"newSeries","manage/series/:id(/)":"editSeries","manage/series/:id/videos(/)":"editSeriesVideos","manage/series/:id/subjects(/)":"editSeriesSubjects","manage/series/:id/audiences(/)":"editSeriesAudiences","manage/legacy/series/:id(/)":"legacyEditSeries"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),Bb=function(e){Rb(n,e);var t=Mb(n);function n(){return Nb(this,n),t.apply(this,arguments)}return Db(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"newSeries",value:function(){this.layout.showChildView(ae,d.createElement(xb,null))}},{key:"editSeries",value:function(e){this.layout.showChildView(ae,d.createElement(Cb,{seriesId:e}))}},{key:"editSeriesVideos",value:function(e){this.legacyEditSeries(e)}},{key:"editSeriesSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(Lb,{seriesId:e}))}},{key:"editSeriesAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Ib,{seriesId:e}))}},{key:"legacyEditSeries",value:function(e){r.LocationUtils.Redirect("/manage/legacy/series/".concat(e),!0)}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Rd,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(g.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(cf,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Series Application"}},{key:"channelName",get:function(){return u.SERIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:fb}}}}],[{key:"router",get:function(){return zb}}]),n}(r.Application);function Hb(e){return(Hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $b(e,t,n){return t&&Jb(e.prototype,t),n&&Jb(e,n),e}function Kb(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yb(e,t)}function Yb(e,t){return(Yb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zb(e);if(t){var i=Zb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wb(this,n)}}function Wb(e,t){return!t||"object"!==Hb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zb(e){return(Zb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qb=function(e){Kb(n,e);var t=Gb(n);function n(){return qb(this,n),t.apply(this,arguments)}return $b(n,[{key:"channelName",get:function(){return u.SUBJECTS}},{key:"appRoutes",get:function(){return{"manage/subjects(/)":"subjects","manage/subjects/add-objects(/)":"addSubjectMembers","manage/subjects/new(/)":"newSubject","manage/subjects/:id/edit(/)":"editSubject","manage/subjects/:id/edit/playlists(/)":"editSubjectPlaylists","manage/subjects/:id/edit/series(/)":"editSubjectSeries","manage/subjects/:id/edit/videos(/)":"editSubjectVideos","manage/subjects/:id/classifications(/)":"subjectClassifications","manage/subjects/classifications(/)":"classifications","manage/subjects/presentations/:id/classifications(/)":"presentationClassifications","manage/subjects/presentations/:id/classifications/new(/)":"newClassification","manage/subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","manage/subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","manage/subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","manage/subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","manage/subjects/levels(/)":"levels","manage/subjects/levels/new(/)":"newLevel","manage/subjects/levels/:id(/)":"editLevel","manage/subjects/audiences(/)":"audiences","manage/subjects/presentations/:id/audiences(/)":"presentationAudiences","manage/subjects/presentations/:id/audiences/new(/)":"newAudience","manage/subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","manage/subjects/presentations(/)":"presentations","manage/subjects/presentations/new":"newPresentation","manage/subjects/presentations/:id(/)":"editPresentation"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),n}(r.AppRouter),Xb=function(e){Kb(n,e);var t=Gb(n);function n(){return qb(this,n),t.apply(this,arguments)}return $b(n,[{key:"initialize",value:function(){var e=this;this.subjectDataService=fu.getInstance(f.SUBJECT,this),dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(ae,d.createElement(Bv,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(ae,d.createElement(Tv,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:pm.Playlists};this.layout.showChildView(ae,d.createElement(Uv,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:pm.Series};this.layout.showChildView(ae,d.createElement(Uv,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:pm.Videos};this.layout.showChildView(ae,d.createElement(Uv,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"subjectClassifications",value:function(e){this.layout.showChildView(ae,d.createElement(Yv,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(ae,d.createElement(Ev,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Jv,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e.toString()===this.currentLeftNavId.toString()?{application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(jv,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(dv,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(ae,d.createElement(Ug,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(ae,d.createElement(Ng,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:pm.Playlists};this.layout.showChildView(ae,d.createElement(Rg,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:pm.Series};this.layout.showChildView(ae,d.createElement(Rg,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:pm.Videos};this.layout.showChildView(ae,d.createElement(Rg,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement($g,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Lg,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(ae,d.createElement(ev,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(ae,d.createElement(tv,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(ae,d.createElement(Gg,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(dv,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(yg,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(ae,d.createElement(Sg,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(ae,d.createElement(ug,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(og,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(ae,d.createElement(lv,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(ae,d.createElement(uv,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(ae,d.createElement(iv,{key:e,id:e})),this.hideLeftNav()}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Rd,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(g.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(cf,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(ie,d.createElement(Tg,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(ie,d.createElement(Xv,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return d.createElement(eb,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return u.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:Pv,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return Qb}}]),n}(r.Application);class eS extends N{onShowAlert(e){if(!this.layoutOptions.options.alertRegion)return;const{ctor:t,collection:n}=e,r=n?n.toJSON():[];this.layout.showChildView(this.layoutOptions.options.alertRegion,d.createElement(t,{alerts:r,removeAlert:e=>h.Radio.channel(g.ALERT).trigger("remove:alert",e)}))}}var tS,nS=function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},rS=function(e){var t="/api/domain/v1/themes",n="themes";return e&&(t+="?type=".concat(e),n+=":type:".concat(e)),{url:t,key:n}},iS=function(e,t,n,r){return{url:"/api/domain/v1/themes",key:"theme",data:e,type:it.POST,invalidationKeys:"themes",success:t,error:n,always:r}},aS=function(e,t,n,r,i){return{url:"/api/domain/v1/themes/".concat(e),key:"update:theme:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}},oS=function(e,t,n,r){return{url:"/api/domain/v1/themes/".concat(e),key:"delete:theme:".concat(e),type:it.DELETE,invalidationKeys:"themes",success:t,error:n,always:r}},sS=function(e){return{application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]}};function cS(){var e=i.useBasicFetch(rS());return e.data?d.createElement(Xu,{objects:e.data,getObjectAppLink:sS,newObjectAppLink:{application:u.THEMES,action:o.Themes.NEW_THEME},objectName:"Theme"}):d.createElement(d.Fragment,null)}!function(e){e.Glance="glance"}(tS||(tS={}));var lS=[{key:"topLeft",label:"Top Left"},{key:"topRight",label:"Top Right"},{key:"bottomLeft",label:"Bottom Left"},{key:"bottomRight",label:"Bottom Right"}];function uS(){var e=qa();return d.createElement("div",{className:"form-group"},lS.map((function(t){var n="data.".concat(t.key);return d.createElement(xu,{label:t.label,imageType:Ul.HeroBanners,fieldName:n,application:u.THEMES,uploadAction:o.Videos.UPLOAD_IMAGE,setSelectedImage:function(t){e.setFieldValue(n,{fileId:t.id,url:t.url,fileIdType:zl.ImageAPIv2})}})})))}var pS=co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),fS=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),type:co.mixed().required("Type is required"),data:co.mixed().when("type",{is:tS.Glance,then:co.object().shape({topLeft:pS,topRight:pS,bottomLeft:pS,bottomRight:pS}).noUnknown(),otherwise:co.mixed().strip(!0)}).default({})}).noUnknown();function dS(e){var t=qa(),n=function(e){switch(e){case tS.Glance:return uS;default:return}}(t.values.type);return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this theme",autoFocus:!0}),d.createElement(vo,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},d.createElement("option",{value:null},"Select a type..."),dt.getEnumKeys(tS).map((function(e){return d.createElement("option",{key:e,value:tS[e]},e)}))),!!n&&d.createElement(n,null),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(ko,{isNew:e.isNew}),!!e.actions&&d.createElement(Wu,{actions:e.actions})))}function mS(e){var t;return d.createElement(so,{initialValues:e.theme,validationSchema:fS,onSubmit:e.saveTheme},d.createElement(dS,{isNew:!(null===(t=e.theme)||void 0===t?void 0:t.id),actions:e.actions}))}function hS(){var e=Object(te.useDispatch)();return d.createElement(mS,{saveTheme:function(t,n){i.fetch(e,iS(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]})}),null,n))}})}function yS(e){var t=Object(te.useDispatch)(),n=Md(),r=i.useBasicFetch(nS(e.id));return r.data?d.createElement(mS,{theme:r.data,saveTheme:function(r,a){i.fetch(t,aS(e.id,r,(function(){n.success("Successfully updated theme")}),(function(){n.error("Failed to update theme")}),a))},actions:[{label:"Delete theme",className:"btn btn-danger",button:!0,appLink:{application:u.THEMES,action:o.Themes.DELETE_THEME,args:[e.id]}}]}):d.createElement(d.Fragment,null)}function gS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bS(e){var t=Object(te.useDispatch)(),n=Md(),a=gS(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(nS(e.id));return d.createElement(uf,{title:"Delete Theme",closePopup:e.closePopup,showLoadingSpinner:!l.data},d.createElement(d.Fragment,null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement(ff,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,oS(e.id,(function(){n.success("Successfully deleted theme"),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.THEMES})}),(function(){n.error("Failed to delete theme")})))},buttonText:"Yes, delete this theme",isSpinnerButton:!0,showSpinner:s}]})))}var SS=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))};function ES(e){return(ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jS(e,t,n){return t&&OS(e.prototype,t),n&&OS(e,n),e}function IS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&AS(e,t)}function AS(e,t){return(AS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kS(e);if(t){var i=kS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wS(this,n)}}function wS(e,t){return!t||"object"!==ES(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kS(e){return(kS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var LS=function(e){IS(n,e);var t=TS(n);function n(){return CS(this,n),t.apply(this,arguments)}return jS(n,[{key:"channelName",get:function(){return u.THEMES}},{key:"appRoutes",get:function(){return{"manage/themes(/)":"themes","manage/themes/new(/)":"newTheme","manage/themes/:id(/)":"editTheme"}}},{key:"appLinks",get:function(){return["deleteTheme","uploadImage"]}}]),n}(r.AppRouter),xS=function(e){IS(n,e);var t=TS(n);function n(){return CS(this,n),t.apply(this,arguments)}return jS(n,[{key:"themes",value:function(){this.layout.showChildView(ae,d.createElement(cS,null))}},{key:"newTheme",value:function(){this.layout.showChildView(ae,d.createElement(hS,null))}},{key:"editTheme",value:function(e){this.layout.showChildView(ae,d.createElement(yS,{id:e}))}},{key:"deleteTheme",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(bS,{id:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(Rd,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Themes Application"}},{key:"channelName",get:function(){return u.THEMES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:SS}}}}],[{key:"router",get:function(){return LS}}]),n}(eS),PS=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))},NS=function(e){var t=u.VIDEOS,n=o.Videos;return[{label:"Edit Video Details",appLink:{application:t,action:n.EDIT_VIDEO,args:[e]}},{label:"Subjects",appLink:{application:t,action:n.EDIT_VIDEO_SUBJECTS,args:[e]}},{label:"Audiences",appLink:{application:t,action:n.EDIT_VIDEO_AUDIENCES,args:[e]}},{label:"Aliases",appLink:{application:t,action:n.EDIT_VIDEO_ALIASES,args:[e]}}]},_S=function(e){return function(t){return t.appLink.action===e}};function DS(e){var t=e.videoId,n=e.activeAction;return d.createElement("div",{className:"py-2"},d.createElement(np,{tabs:NS(t),isItemActive:_S(n)}))}var RS,FS=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:co.string().trim().default(""),status:co.mixed().required("Status is required"),productionYear:co.number().min(1900),rating:co.object().shape({id:co.string()}).default({}).noUnknown(),thumbnail:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),heroBanner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),glance:co.object().shape({theme:co.string(),format:co.mixed(),content:co.string()}).default({}).noUnknown()}).noUnknown();!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Pending=3]="Pending",e[e.Rejected=4]="Rejected",e[e.Processing=5]="Processing"}(RS||(RS={}));var MS,US=n(129);function VS(e){var t,n,r,i,a,o=qa();return d.createElement("div",{className:"form-group p-2 border"},d.createElement("div",{className:"border-bottom mb-2"},d.createElement("label",null,"Summary")),d.createElement(vo,{as:"select",label:"Theme",name:"glance.theme",id:"type",value:null===(t=o.values.glance)||void 0===t?void 0:t.theme},d.createElement("option",{value:null},"Select a theme..."),e.themes.map((function(e){return d.createElement("option",{key:e.id,value:e.name},e.name)}))),d.createElement(vo,{as:"select",label:"Format",name:"glance.format",id:"type",value:null===(n=o.values.glance)||void 0===n?void 0:n.format},d.createElement("option",{value:null},"Select a format..."),dt.getEnumKeys(MS).map((function(e){return d.createElement("option",{key:e,value:MS[e]},e)}))),d.createElement(vo,{label:"Content",as:"textarea",name:"glance.content",id:"content",value:null===(r=o.values.glance)||void 0===r?void 0:r.content}),(null===(i=o.values.glance)||void 0===i?void 0:i.format)===MS.Markdown&&d.createElement("div",{className:"form-group"},d.createElement("label",null,"Content Preview"),d.createElement("div",{className:"border rounded py-2",dangerouslySetInnerHTML:{__html:US(null===(a=o.values.glance)||void 0===a?void 0:a.content)}})))}function zS(e){switch(e){case RS.Published:return"badge-success";case RS.Archived:return"badge-danger";case RS.Draft:return"badge-warning";case RS.Pending:return"badge-info";case RS.Rejected:return"badge-dark";default:return"badge-secondary"}}function BS(e){var t=qa(),n=!!e.rightslineId;return d.createElement(eo,null,n&&d.createElement(vo,{label:"Rightsline ID",name:"rightslineId",id:"rightslineId",value:e.rightslineId,disabled:!0}),d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this video",disabled:n,autoFocus:!0}),d.createElement("div",{className:"form-group"},d.createElement("label",null,"Status"),d.createElement("div",null,d.createElement("span",{className:"badge ".concat(zS(t.values.status))},RS[t.values.status]))),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this video here",disabled:n,showCharacterCounter:!0}),d.createElement(vo,{label:"Production Year",type:"number",name:"productionYear",id:"productionYear",value:t.values.productionYear,disabled:n}),d.createElement(tp,{ratings:e.ratings,disabled:n}),d.createElement(xu,{imageType:Ul.Thumbnails,fieldName:"thumbnail",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),d.createElement(xu,{imageType:Ul.HeroBanners,fieldName:"heroBanner",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),d.createElement(VS,{themes:e.themes}),d.createElement(ko,{isNew:!e.id}))}function HS(e,t){if(e)return t?Object.assign(Object.assign({},e),t):e}function qS(e){return d.createElement(so,{initialValues:HS(e.video,e.rightslineVideo),validationSchema:FS,onSubmit:e.saveVideo,allowInitialSubmit:!!e.rightslineVideo},d.createElement(BS,{id:e.video&&e.video.id,ratings:e.ratings,themes:e.themes,rightslineId:e.rightslineId}))}function JS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KS(e){var t,n=Object(te.useDispatch)(),r=JS(d.useState(!1),2),a=r[0],s=r[1],c=i.useBasicFetch(zy(e.videoId)),l=i.useBasicFetch(Hy(e.videoId)),p=i.useBasicFetch(hb()),f=i.useBasicFetch(rS(tS.Glance));var m,h=!!c.data&&!!p.data&&!!f.data&&l.isComplete;return d.createElement(d.Fragment,null,d.createElement(DS,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO}),!!l.data&&d.createElement("div",{className:"pt-3 text-right"},d.createElement(uo.Button,{variant:"outline-dark",size:"sm",onClick:function(){l.isFetching||(s(!0),i.fetch(n,Hy(e.videoId)))}},"Sync from Rightsline")),h&&d.createElement(qS,{video:c.data,saveVideo:function(t,r){i.fetch(n,qy(e.videoId,t,null,null,r))},ratings:p.data,themes:f.data,rightslineId:null===(t=l.data)||void 0===t?void 0:t.rightslineId,rightslineVideo:a&&l.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit video page ",d.createElement(Pl,{className:"info-link",appLink:(m=e.videoId,{application:u.VIDEOS,action:o.Videos.LEGACY_EDIT_VIDEO,args:[m]})},"here"),"."))}function YS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return GS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WS(e){var t=YS(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(zy(e.videoId)),s=Nd(f.SUBJECT);!function(e,t,n){var r=function(e){return lm.getSetStateByKey(n,e)};mu(Sh.getObjectLevelsFetchOptions(e,pm.Videos,r("videoLevels")),[e]),mu(Sh.getObjectAudiencesFetchOptions(e,pm.Videos,r("videoAudiences")),[e,t.videoLevels]),cm([Sh.getPresentationsFetchOptions(r("presentations")),Sh.getLevelsFetchOptions(r("levels"))],[]),mu(!!t.currentPresentation&&Sh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.videoId,n,r),Oy(n,r);var c=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.videoLevels&&n.videoAudiences);return d.createElement(d.Fragment,null,d.createElement(DS,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_AUDIENCES}),d.createElement(Zu,{object:a.data}),!!c&&d.createElement(kh,{objectLevels:n.videoLevels,objectAudiences:n.videoAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:lm.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:pm.Videos,saveLevels:function(t,n,r){return s.updateObjectLevels(e.videoId,t,pm.Videos,n,r,r)},saveAudiences:function(t,r){return s.updateObjectAudiences(e.videoId,n.currentPresentation.id,t,pm.Videos,r,r)}}))}function ZS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||XS(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QS(e){return function(e){if(Array.isArray(e))return eE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||XS(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XS(e,t){if(e){if("string"==typeof e)return eE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eE(e,t):void 0}}function eE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tE(e){var t=ZS(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(zy(e.videoId)),s=Nd(f.SUBJECT);!function(e,t,n){var r=function(e){return lm.getSetStateByKey(n,e)};cm([Sh.getSubjectTreeFetchOptions(r("subjectTree")),Sh.getPresentationsFetchOptions(r("presentations"))],[]),mu(Sh.getObjectSubjectsFetchOptions(e,pm.Videos,r("videoSubjects")),[e]),mu(!!t.currentPresentation&&Sh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.videoSubjects]);var i=function(e,t){return[].concat(QS(t.subjectClassifications||[]),QS(e))},a=t.videoSubjects&&t.videoSubjects.map((function(e){return Sh.getSubjectClassificationFetchOptions(e.id,lm.getSetStateByKey(n,"subjectClassifications",i))}));cm(a,[t.videoSubjects],!!a),mu(Sh.getObjectClassificationsFetchOptions(e,pm.Videos,r("videoClassifications")),[e,t.videoSubjects])}(e.videoId,n,r),Oy(n,r);var c=!!(n.videoSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.videoClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(DS,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_SUBJECTS}),d.createElement(Zu,{object:a.data}),c&&d.createElement(ry,{objectSubjects:n.videoSubjects,subjectTree:n.subjectTree,memberType:pm.Videos,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:lm.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.videoClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.videoId,t,pm.Videos,n,r,r)},saveClassifications:function(t,r){return s.updateObjectClassifications(e.videoId,n.currentPresentation.id,t,pm.Videos,r,r)}}))}!function(e){e.Markdown="text/markdown"}(MS||(MS={}));var nE=function(e){return{key:"aliases:".concat(e),url:"/api/master/v2/objects/".concat(e,"/aliases")}},rE=function(e,t,n,r){return{key:"create:alias",url:"/api/master/v2/objects/".concat(e,"/aliases"),type:it.POST,invalidationKeys:"aliases:".concat(e),data:t,success:n,error:r}},iE=function(e,t,n,r){return{key:"delete:alias",url:"/api/domain/v2/objects/".concat(e,"/aliases/").concat(t),type:it.DELETE,invalidationKeys:"aliases:".concat(e),success:n,error:r}};function aE(e){var t=e.videoId,n=Object(te.useDispatch)(),r=Md(),a=i.useBasicFetch(nE(t));return a.data?d.createElement(d.Fragment,null,d.createElement(DS,{videoId:t,activeAction:o.Videos.EDIT_VIDEO_ALIASES}),d.createElement(Rp,{aliases:a.data.data,onSave:function(e,a){i.fetch(n,rE(t,e,(function(){r.success("Successfully created alias"),a()}),(function(){r.error("Something went wrong creating your alias")})))},onDelete:function(e){i.fetch(n,iE(t,e,(function(){r.success("Successfully deleted alias")}),(function(){r.error("Something went wrong deleting your alias")})))}})):d.createElement(d.Fragment,null,"Loading...")}function oE(e){return(oE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lE(e,t,n){return t&&cE(e.prototype,t),n&&cE(e,n),e}function uE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pE(e,t)}function pE(e,t){return(pE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mE(e);if(t){var i=mE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dE(this,n)}}function dE(e,t){return!t||"object"!==oE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mE(e){return(mE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hE,yE,gE=function(e){uE(n,e);var t=fE(n);function n(){return sE(this,n),t.apply(this,arguments)}return lE(n,[{key:"channelName",get:function(){return u.VIDEOS}},{key:"appRoutes",get:function(){return{"manage/videos/:id(/)":"editVideo","manage/videos/:id/audiences(/)":"editVideoAudiences","manage/videos/:id/subjects(/)":"editVideoSubjects","manage/videos/:id/aliases(/)":"editVideoAliases","tools/programlookup/:id":"legacyEditVideo"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),vE=function(e){uE(n,e);var t=fE(n);function n(){return sE(this,n),t.apply(this,arguments)}return lE(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"editVideo",value:function(e){this.layout.showChildView(ae,d.createElement(KS,{videoId:e}))}},{key:"editVideoAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(WS,{videoId:e}))}},{key:"editVideoSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(tE,{videoId:e}))}},{key:"editVideoAliases",value:function(e){this.layout.showChildView(ae,d.createElement(aE,{videoId:e}))}},{key:"legacyEditVideo",value:function(e){r.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(Rd,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Videos Application"}},{key:"channelName",get:function(){return u.VIDEOS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:PS,alertRegion:se}}}}],[{key:"router",get:function(){return gE}}]),n}(eS);!function(e){e.Fifo="FifoMemoryCache"}(hE||(hE={}));class bE extends G{constructor(e){super(),this.size=e.size,this.cache={},this.cachedkeys=[]}get name(){return hE.Fifo}removeCacheKey(e){this.cachedkeys=m.without(this.cachedkeys,e)}has(e){return!!this.cache[e]}get(e){return this.cache[e]}set(e,t){e&&t||P.throw(new z("Must provide a cache key and a value to cache in FifoMemoryCache.")),this.has(e)&&this.removeCacheKey(e),this.cachedkeys.push(e),this.cache[e]=t,this.cachedkeys.length>this.size&&delete this.cache[this.cachedkeys.shift()]}getOrSet(e,t){if(this.has(e))return this.get(e);const n=t();return this.set(e,n),n}remove(e){return!!this.has(e)&&(delete this.cache[e],this.removeCacheKey(e),!0)}invalidate(e,t){const n=m.object(this.cachedkeys,this.cachedkeys);let r=[];m.each(e,e=>{n[e]&&r.push(e);const t=new RegExp(e,"i"),i=m.filter(n,e=>t.test(e));r.push(...i)}),r.length&&(r=m.uniq(r),m.each(r,e=>{delete this.cache[e],m.isFunction(t)&&t(e)}),this.cachedkeys=m.without(this.cachedkeys,...r))}}!function(e){e[e.Unknown=0]="Unknown",e[e.BadRequest=1]="BadRequest",e[e.Unauthorized=2]="Unauthorized",e[e.Forbidden=3]="Forbidden",e[e.NotFound=4]="NotFound",e[e.InternalServer=5]="InternalServer"}(yE||(yE={}));const SE={type:yE.Unknown,message:"",code:0};var EE;!function(e){e.Ajax="AjaxDataProvider",e.Notifications="NotificationsSignalRDataProvider"}(EE||(EE={}));const CE={parseErrorMessage(e,t,n){if(!n||!n.errorCode)return e[t];let r=""+n.errorCode;return n.errorSubCode&&(r+="."+n.errorSubCode),e[r]||e[t]}};class OE extends A.Object{constructor(e){super(e),$.ajaxSetup({cache:!1,contentType:"application/json; charset=utf-8"}),this.successMiddleware={},this.errorMiddleware={},this.dataServiceErrorMessageMappings=e.dataServiceErrorMessageMappings,this.defaultErrorMessageKey=e.defaultErrorMessageKey}get name(){return EE.Ajax}parseUrl(e){const t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t}makeHttps(e){const t=this.parseUrl(e);return"http:"===t.protocol&&(t.protocol="https:"),t.href}base(e,t,n,r={}){n||(n=it.GET);const i=m.defaults(r,{forceHttps:!1}),a={url:e,method:n,type:n};t&&(a.data=n===it.POST||n===it.PUT?JSON.stringify(t):t),i.forceHttps&&(a.url=this.makeHttps(a.url)),i.traditional&&(a.traditional=i.traditional);const o=$.ajax(a);return m.keys(this.successMiddleware).length&&o.done(m.values(this.successMiddleware)),m.keys(this.errorMiddleware).length&&o.fail(m.values(this.errorMiddleware)),o}create(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,it.POST).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}read(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,it.GET).done((e,t,i)=>{n.trigger(r,e,t,i)}).fail((e,t,r)=>{n.trigger(i,e,t,r)})}update(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,it.PUT).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}delete(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,it.DELETE).done((e,t,i)=>n.trigger(r,e,t,i)).fail((e,t,r)=>n.trigger(i,e,t,r))}useMiddleware(e,t){this.successMiddleware[e]||(this.successMiddleware[e]=t)}useErrorMiddleware(e,t){this.errorMiddleware[e]||(this.errorMiddleware[e]=t)}parseError(e,t,n){const r=e.responseJSON,i=SE;switch(i.code=e.status,i.message=CE.parseErrorMessage(this.dataServiceErrorMessageMappings,this.defaultErrorMessageKey,r),e.status){case 400:i.type=yE.BadRequest;break;case 401:i.type=yE.Unauthorized;break;case 403:i.type=yE.Forbidden;break;case 404:i.type=yE.NotFound;break;case 500:i.type=yE.InternalServer}return i}}n.d(t,"Actions",(function(){return o})),n.d(t,"DataPrefixes",(function(){return s})),n.d(t,"FileExtensions",(function(){return c})),n.d(t,"Layouts",(function(){return l})),n.d(t,"AppChannels",(function(){return u})),n.d(t,"DataChannels",(function(){return p})),n.d(t,"DataServices",(function(){return f})),n.d(t,"CuratorLayoutView",(function(){return be})),n.d(t,"LayoutComponent",(function(){return je})),n.d(t,"CuratorAppNavService",(function(){return _e})),n.d(t,"ImageUploadDataService",(function(){return He})),n.d(t,"UserDataServiceHelper",(function(){return $e})),n.d(t,"LanguageDataService",(function(){return tt})),n.d(t,"CompaniesApplication",(function(){return Xp})),n.d(t,"DomainOptionsApplication",(function(){return td})),n.d(t,"PeopleApplication",(function(){return Pd})),n.d(t,"PlaylistsApplication",(function(){return pb})),n.d(t,"SeriesApplication",(function(){return Bb})),n.d(t,"SubjectDataService",(function(){return vh})),n.d(t,"SubjectDataServiceHelper",(function(){return Sh})),n.d(t,"SubjectsApplication",(function(){return Xb})),n.d(t,"ThemesApplication",(function(){return xS})),n.d(t,"VideosApplication",(function(){return vE})),n.d(t,"DomainOptionsApplication",(function(){return td})),n.d(t,"Core",(function(){return r})),n.d(t,"InstanceManager",(function(){return fu})),n.d(t,"FifoMemoryCache",(function(){return bE})),n.d(t,"AjaxDataProvider",(function(){return OE})),n.d(t,"AlertType",(function(){return Wp})),n.d(t,"BaseAlertService",(function(){return tf})),n.d(t,"LanguageService",(function(){return Ao})),n.d(t,"Flight",(function(){return i})),n.d(t,"CacheDurations",(function(){return qe})),n.d(t,"UserDataService",(function(){return bu}))}])}));
|