403Webshell
Server IP : 3.93.235.159  /  Your IP : 216.73.216.140
Web Server : Apache
System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64
User : bitnami ( 1000)
PHP Version : 8.2.9
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/pojo-accessibility/modules/settings/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/pojo-accessibility/modules/settings/assets/js/app.js
import '../css/style.css';
import {
	ElementorOneAssetsProvider,
	ElementorOneHeader,
} from '@elementor/elementor-one-assets';
import Box from '@elementor/ui/Box';
import DirectionProvider from '@elementor/ui/DirectionProvider';
import Grid from '@elementor/ui/Grid';
import { styled, ThemeProvider } from '@elementor/ui/styles';
import {
	useNotificationSettings,
	useSavedSettings,
	useSettings,
} from '@ea11y/hooks';
import { QuotaNotices, Sidebar } from '@ea11y/layouts';
import Notifications from '@ea11y-apps/global/components/notifications';
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
import { lazy, Suspense, useEffect, useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { MenuItems } from './components/sidebar-menu/menu';
import { usePluginSettingsContext } from './contexts/plugin-settings';
import PageContent from './page-content';

// Lazy load modals - load them only when needed
const ConnectModal = lazy(
	() =>
		import(
			/* webpackChunkName: "chunk-modal-connect" */ './components/connect-modal'
		),
);
const PostConnectModal = lazy(
	() =>
		import(
			/* webpackChunkName: "chunk-modal-post-connect" */ './components/post-connect-modal'
		),
);
const UrlMismatchModal = lazy(
	() =>
		import(
			/* webpackChunkName: "chunk-modal-url-mismatch" */ './components/url-mismatch-modal'
		),
);
const OnboardingModal = lazy(
	() =>
		import(
			/* webpackChunkName: "chunk-modal-onboarding" */ './components/onboarding-modal'
		),
);
const GetStartedModal = lazy(
	() =>
		import(
			/* webpackChunkName: "chunk-modal-get-started" */ './components/help-menu/get-started-modal'
		),
);
const MigrationModal = lazy(
	() =>
		import(
			/* webpackChunkName: "chunk-modal-migration" */ './components/migration-modal'
		),
);

const App = () => {
	const { ea11ySettingsData } = window;
	const { hasFinishedResolution, loading } = useSavedSettings();

	const {
		isConnected,
		isRTL,
		closePostConnectModal,
		isUrlMismatch,
		isElementorOne,
		hasElementorOneSubscription,
		isMigrationPopupDismissed,
		refreshPluginSettings,
	} = usePluginSettingsContext();
	const { notificationMessage, notificationType } = useNotificationSettings();
	const { selectedMenu } = useSettings();
	const [isMigrationPopupClosed, setIsMigrationPopupClosed] = useState(false);

	const shouldShowMigrationPopup =
		isConnected &&
		!isElementorOne &&
		hasElementorOneSubscription &&
		closePostConnectModal &&
		!isMigrationPopupDismissed &&
		!isMigrationPopupClosed &&
		!isUrlMismatch;

	useEffect(() => {
		if (ea11ySettingsData?.planData?.user?.id) {
			mixpanelService.init().then(() => {
				mixpanelService.sendEvent(mixpanelEvents.pageView, {
					page: 'Button',
				});
			});
		}
	}, [ea11ySettingsData?.planData?.user?.id]);

	useEffect(() => {
		if (!shouldShowMigrationPopup) {
			return;
		}

		mixpanelService.init().then(() => {
			mixpanelService.oneMigration.trackPopupDisplayed();
		});
	}, [shouldShowMigrationPopup]);

	const selectedParent = MenuItems[selectedMenu?.parent];
	const selectedChild = selectedMenu?.child
		? selectedParent?.children[selectedMenu?.child]
		: null;

	return (
		<DirectionProvider rtl={isRTL}>
			<ThemeProvider colorScheme="light">
				<ElementorOneAssetsProvider
					env={
						ea11ySettingsData?.pluginEnv === 'stg' ? 'staging' : 'production'
					}
				>
					<ElementorOneHeader
						appSettings={{
							slug: 'ally', // Intentionally different than the plugin slug.
							version: ea11ySettingsData?.pluginVersion,
						}}
						isWithinWpAdmin
						onDisconnect={refreshPluginSettings}
					/>

					<Suspense fallback={null}>
						{isConnected !== undefined && !isUrlMismatch && !isConnected && (
							<ConnectModal />
						)}
						{isConnected && !closePostConnectModal && <PostConnectModal />}
						{isUrlMismatch && <UrlMismatchModal />}
						{shouldShowMigrationPopup && (
							<MigrationModal onClose={() => setIsMigrationPopupClosed(true)} />
						)}
						<OnboardingModal />
						<GetStartedModal />
					</Suspense>

					<StyledGrid>
						<Sidebar />

						<StyledContainer
							role="main"
							aria-label={__('Plugin settings', 'pojo-accessibility')}
						>
							<QuotaNotices />
							<PageContent
								// Looks the best if we have both checks
								isLoading={!hasFinishedResolution || loading}
								page={
									selectedChild ? selectedChild?.page : selectedParent?.page
								}
							/>
						</StyledContainer>
					</StyledGrid>

					<Notifications
						message={notificationMessage}
						type={notificationType}
					/>
				</ElementorOneAssetsProvider>
			</ThemeProvider>
		</DirectionProvider>
	);
};

export default App;

const StyledContainer = styled(Box)`
	width: 100%;

	display: flex;
	flex-direction: column;
	justify-content: start;
`;

const StyledGrid = styled(Grid)`
	height: calc(100% - 48px);

	display: flex;
	flex-direction: row;
`;

Youez - 2016 - github.com/yon3zu
LinuXploit