<?php














 
spl_autoload_register(function ($class) {
     
    static $map = null;

    if ($map === null) {
         
         
         
        $cache_dir = defined('EASYCHAT_AUTOLOAD_CACHE_DIR')
            ? rtrim((string)EASYCHAT_AUTOLOAD_CACHE_DIR, '/\\')
            : SITE_PATH . DS . 'log';
        $cache_file = $cache_dir . DS . 'autoload_classmap.json';
        $legacy_cache_file = SITE_PATH . DS . 'core' . DS . 'autoload_classmap.json';
        $version_file = SITE_PATH . DS . 'version.php';
        $version_fingerprint = is_file($version_file) ? hash_file('sha256', $version_file) : '';
        $cache_fingerprint = hash('sha256', 'v2|' . $version_fingerprint . '|' . filemtime(__FILE__) . '|' . filesize(__FILE__));

        if (is_file($cache_file)) {
            $payload = json_decode(file_get_contents($cache_file), true);
            $map = is_array($payload)
                && isset($payload['format'], $payload['fingerprint'], $payload['classes'])
                && (int)$payload['format'] === 2
                && hash_equals($cache_fingerprint, (string)$payload['fingerprint'])
                && is_array($payload['classes'])
                    ? $payload['classes']
                    : array();
            if (is_array($map)) {
                foreach ($map as $class_name => $mapped_file) {
                    if (!is_string($mapped_file) || $mapped_file === '' || strpos($mapped_file, '..') !== false) {
                        $map = [];
                        break;
                    }

                    $resolved_file = SITE_PATH . DS . str_replace(['/', '\\'], DS, ltrim($mapped_file, '/\\'));
                    if (!is_file($resolved_file)) {
                         
                         
                        $map = [];
                        break;
                    }
                    $map[$class_name] = $resolved_file;
                }
            }
        }

        if (!is_array($map) || empty($map)) {
            $map = [];
            $dirs = [
                SITE_PATH . DS . 'classes',
                SITE_PATH . DS . 'controllers',
                SITE_PATH . DS . 'models',
                DIR_LIBRARY
            ];

            foreach ($dirs as $dir) {
                if (!is_dir($dir)) continue;

                $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
                foreach ($iterator as $file) {
                    if ($file->isFile() && $file->getExtension() === 'php') {
                        $content = file_get_contents($file->getPathname());
                        $tokens = token_get_all($content);
                        $ns = '';

                        for ($i = 0, $cnt = count($tokens); $i < $cnt; $i++) {
                            if (is_array($tokens[$i]) && $tokens[$i][0] === T_NAMESPACE) {
                                $i++;
                                $n = '';
                                while (isset($tokens[$i]) && $tokens[$i] !== ';' && $tokens[$i] !== '{') {
                                    if (is_array($tokens[$i]) && in_array($tokens[$i][0], [T_STRING, T_NS_SEPARATOR, defined('T_NAME_QUALIFIED') ? T_NAME_QUALIFIED : -1])) {
                                        $n .= $tokens[$i][1];
                                    }
                                    $i++;
                                }
                                $ns = $n ? $n . '\\' : '';
                            }

                            if (is_array($tokens[$i]) && in_array($tokens[$i][0], [T_CLASS, T_INTERFACE, T_TRAIT])) {
                                $i++;
                                while (isset($tokens[$i]) && is_array($tokens[$i]) && $tokens[$i][0] === T_WHITESPACE) $i++;
                                if (isset($tokens[$i]) && is_array($tokens[$i]) && $tokens[$i][0] === T_STRING) {
                                    $map[$ns . $tokens[$i][1]] = $file->getPathname();
                                }
                            }
                        }
                    }
                }
            }

            if (!defined('EASYCHAT_DISABLE_AUTOLOAD_CLASSMAP_WRITE') || !EASYCHAT_DISABLE_AUTOLOAD_CLASSMAP_WRITE) {
                set_error_handler(function () {
                    return true;
                });
                try {
                    $cache_map = [];
                    $site_prefix = rtrim(SITE_PATH, '/\\') . DS;
                    foreach ($map as $class_name => $mapped_file) {
                        if (is_string($mapped_file) && strpos($mapped_file, $site_prefix) === 0) {
                            $cache_map[$class_name] = str_replace(DS, '/', substr($mapped_file, strlen($site_prefix)));
                        }
                    }
                    $cache_payload = array(
                        'format' => 2,
                        'fingerprint' => $cache_fingerprint,
                        'classes' => $cache_map,
                    );
                    $cache_json = json_encode($cache_payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
                    $cache_temp = $cache_file . '.tmp.' . bin2hex(random_bytes(8));
                    $previous_umask = umask(0077);
                    try {
                        $cache_handle = fopen($cache_temp, 'x+b');
                    } finally {
                        umask($previous_umask);
                    }
                    if ($cache_handle !== false) {
                        $offset = 0;
                        $length = strlen((string)$cache_json);
                        while ($offset < $length) {
                            $written = fwrite($cache_handle, substr((string)$cache_json, $offset));
                            if ($written === false || $written === 0) {
                                break;
                            }
                            $offset += $written;
                        }
                        $flushed = fflush($cache_handle);
                        fclose($cache_handle);
                        clearstatcache(true, $cache_temp);
                        $private = is_file($cache_temp) && ((fileperms($cache_temp) & 0077) === 0);
                        if ($offset !== $length || !$flushed || !$private || !rename($cache_temp, $cache_file)) {
                            if (is_file($cache_temp)) {
                                unlink($cache_temp);
                            }
                        }
                    }
                } catch (\Throwable $e) {
                } finally {
                    restore_error_handler();
                }
            }
        }

        if (is_file($legacy_cache_file)) {
            set_error_handler(function () {
                return true;
            });
            try {
                 
                 
                unlink($legacy_cache_file);
            } catch (\Throwable $e) {
            } finally {
                restore_error_handler();
            }
        }

         
         
        $explicit_map = [
            'EasyChat\\Library\\Commerce\\CommerceContextProviderInterface' => DIR_LIBRARY . DS . 'commerce' . DS . 'commerce_context_provider_interface.php',
            'EasyChat\\Library\\Commerce\\AbstractCommerceContextProvider' => DIR_LIBRARY . DS . 'commerce' . DS . 'abstract_commerce_context_provider.php',
            'EasyChat\\Library\\Commerce\\CommerceProviderFactory' => DIR_LIBRARY . DS . 'commerce' . DS . 'commerce_provider_factory.php',
            'EasyChat\\Library\\Commerce\\CommerceIdentityRepository' => DIR_LIBRARY . DS . 'commerce' . DS . 'commerce_identity_repository.php',
            'EasyChat\\Library\\Commerce\\CommerceContextCache' => DIR_LIBRARY . DS . 'commerce' . DS . 'commerce_context_cache.php',
            'EasyChat\\Library\\Commerce\\CommerceContextNormalizer' => DIR_LIBRARY . DS . 'commerce' . DS . 'commerce_context_normalizer.php',
            'EasyChat\\Library\\Commerce\\CustomerCommerceContextService' => DIR_LIBRARY . DS . 'commerce' . DS . 'customer_commerce_context_service.php',
            'EasyChat\\Library\\Cms\\CmsVisitorIdentityAssertion' => DIR_LIBRARY . DS . 'cms' . DS . 'cms_visitor_identity_assertion.php',
            'EasyChat\\Library\\Cms\\CmsCustomerIdentityRepository' => DIR_LIBRARY . DS . 'cms' . DS . 'cms_customer_identity_repository.php',
            'EasyChat\\Library\\Cms\\CmsVisitorIdentityService' => DIR_LIBRARY . DS . 'cms' . DS . 'cms_visitor_identity_service.php',
            'EasyChat\\Library\\Commerce\\OpenCartCommerceContextProvider' => DIR_LIBRARY . DS . 'commerce' . DS . 'opencart_commerce_context_provider.php',
            'EasyChat\\Library\\Commerce\\OpenCartShippingResolver' => DIR_LIBRARY . DS . 'commerce' . DS . 'opencart_shipping_resolver.php',
            'EasyChat\\Library\\Commerce\\OpenCartDeliveryMethodCatalog' => DIR_LIBRARY . DS . 'commerce' . DS . 'opencart_delivery_method_catalog.php',
            'EasyChat\\Library\\Commerce\\ApiShipShipment' => DIR_LIBRARY . DS . 'commerce' . DS . 'apiship_shipment.php',
            'EasyChat\\Library\\Commerce\\WooCommerceContextProvider' => DIR_LIBRARY . DS . 'commerce' . DS . 'woocommerce_context_provider.php',
            'EasyChat\\Library\\Commerce\\WebasystCommerceContextProvider' => DIR_LIBRARY . DS . 'commerce' . DS . 'webasyst_commerce_context_provider.php',
            'EasyChat\\Library\\Commerce\\BitrixCommerceContextProvider' => DIR_LIBRARY . DS . 'commerce' . DS . 'bitrix_commerce_context_provider.php',
            'EasyChat\\Library\\Commerce\\MoySkladClient' => DIR_LIBRARY . DS . 'commerce' . DS . 'moysklad_client.php',
            'EasyChat\\Library\\Commerce\\MoySkladCommerceContextProvider' => DIR_LIBRARY . DS . 'commerce' . DS . 'moysklad_commerce_context_provider.php',
            'EasyChat\\Library\\Delivery\\ShipmentAwareTrackingProviderInterface' => DIR_LIBRARY . DS . 'delivery' . DS . 'shipment_aware_tracking_provider_interface.php',
            'EasyChat\\Library\\Delivery\\TrackingProviderInterface' => DIR_LIBRARY . DS . 'delivery' . DS . 'tracking_provider_interface.php',
            'EasyChat\\Library\\Delivery\\TrackingStatus' => DIR_LIBRARY . DS . 'delivery' . DS . 'tracking_status.php',
            'EasyChat\\Library\\Delivery\\DeliveryConnection' => DIR_LIBRARY . DS . 'delivery' . DS . 'delivery_connection.php',
            'EasyChat\\Library\\Delivery\\RussianPostTrackingProvider' => DIR_LIBRARY . DS . 'delivery' . DS . 'russian_post_tracking_provider.php',
            'EasyChat\\Library\\Delivery\\CdekTrackingProvider' => DIR_LIBRARY . DS . 'delivery' . DS . 'cdek_tracking_provider.php',
            'EasyChat\\Library\\Delivery\\ShipmentTrackingService' => DIR_LIBRARY . DS . 'delivery' . DS . 'shipment_tracking_service.php',
            'EasyChat\\Library\\Commerce\\MoySkladConnection' => DIR_LIBRARY . DS . 'commerce' . DS . 'moysklad_connection.php',
            'EasyChat\\Controller\\MoyskladIntegration' => SITE_PATH . DS . 'controllers' . DS . 'moysklad_integration.php',
            'EasyChat\\Controller\\Messenger' => SITE_PATH . DS . 'controllers' . DS . 'messenger.php',
            'EasyChat\\Controller\\Webpush' => SITE_PATH . DS . 'controllers' . DS . 'webpush.php',
            'EasyChat\\Controller\\WidgetPush' => SITE_PATH . DS . 'controllers' . DS . 'widget_push.php',
            'EasyChat\\Controller\\MobileConnect' => SITE_PATH . DS . 'controllers' . DS . 'mobile_connect.php',
            'EasyChat\\Controller\\NotificationHealth' => SITE_PATH . DS . 'controllers' . DS . 'notification_health.php',
            'EasyChat\\Controller\\Onboarding' => SITE_PATH . DS . 'controllers' . DS . 'onboarding.php',
            'EasyChat\\Controller\\AdminHelp' => SITE_PATH . DS . 'controllers' . DS . 'admin_help.php',
            'EasyChat\\Model\\Messenger' => SITE_PATH . DS . 'models' . DS . 'model_messenger.php',
            'EasyChat\\Model\\Marketplace' => SITE_PATH . DS . 'models' . DS . 'model_marketplace.php',
            'EasyChat\\Model\\Customer' => SITE_PATH . DS . 'models' . DS . 'model_customer.php',
            'EasyChat\\Model\\MessageContext' => SITE_PATH . DS . 'models' . DS . 'model_message_context.php',
            'EasyChat\\Model\\MessengerItemContext' => SITE_PATH . DS . 'models' . DS . 'model_messenger_item_context.php',
            'EasyChat\\Model\\AppPairing' => SITE_PATH . DS . 'models' . DS . 'model_apppairing.php',
            'EasyChat\\Model\\ChatAssignment' => SITE_PATH . DS . 'models' . DS . 'model_chat_assignment.php',
            'EasyChat\\Model\\OperatorDraft' => SITE_PATH . DS . 'models' . DS . 'model_operator_draft.php',
            'EasyChat\\Model\\AdminHelpSession' => SITE_PATH . DS . 'models' . DS . 'model_admin_help_session.php',
            'EasyChat\\Library\\AttachmentPolicy' => DIR_LIBRARY . DS . 'attachment_policy.php',
            'EasyChat\\Library\\Attachment\\OfficeDocumentInspector' => DIR_LIBRARY . DS . 'attachment' . DS . 'office_document_inspector.php',
            'EasyChat\\Library\\Attachment\\AttachmentBatchUploadService' => DIR_LIBRARY . DS . 'attachment' . DS . 'attachment_batch_upload_service.php',
            'EasyChat\\Library\\AttachmentStorage' => DIR_LIBRARY . DS . 'attachment_storage.php',
            'EasyChat\\Library\\Attachment\\AudioInspector' => DIR_LIBRARY . DS . 'attachment' . DS . 'audio_inspector.php',
            'EasyChat\\Library\\Voice\\EasyTokensAudioClient' => DIR_LIBRARY . DS . 'voice' . DS . 'easytokens_audio_client.php',
            'EasyChat\\Library\\Voice\\VoiceMediaService' => DIR_LIBRARY . DS . 'voice' . DS . 'voice_media_service.php',
            'EasyChat\\Library\\Voice\\VoiceMessageTextResolver' => DIR_LIBRARY . DS . 'voice' . DS . 'voice_message_text_resolver.php',
            'EasyChat\\Library\\ImageVariantService' => DIR_LIBRARY . DS . 'image_variant_service.php',
            'EasyChat\\Library\\QuickReplyAiAssistant' => DIR_LIBRARY . DS . 'quick_reply_ai_assistant.php',
            'EasyChat\\Library\\SuggestedReplyAssistant' => DIR_LIBRARY . DS . 'suggested_reply_assistant.php',
            'EasyChat\\Library\\Ai\\OutboundDraftAssistant' => DIR_LIBRARY . DS . 'ai' . DS . 'outbound_draft_assistant.php',
            'EasyChat\\Library\\Ai\\PromptDefaults' => DIR_LIBRARY . DS . 'ai' . DS . 'prompt_defaults.php',
            'EasyChat\\Library\\Ai\\VisualContextBuilder' => DIR_LIBRARY . DS . 'ai' . DS . 'visual_context_builder.php',
            'EasyChat\\Library\\EasyTokensClientHeaders' => DIR_LIBRARY . DS . 'easytokens_client_headers.php',
            'EasyChat\\Library\\AiProvider\\OpenAiCompatibleTransport' => DIR_LIBRARY . DS . 'ai_provider' . DS . 'openai_compatible_transport.php',
            'EasyChat\\Library\\AiProvider\\EasyTokensProvider' => DIR_LIBRARY . DS . 'ai_provider' . DS . 'easytokens.php',
            'EasyChat\\Library\\AiProvider\\ProviderException' => DIR_LIBRARY . DS . 'ai_provider' . DS . 'provider_exception.php',
            'EasyChat\\Library\\InstallationConsent' => DIR_LIBRARY . DS . 'installation_consent.php',
            'EasyChat\\Library\\AndroidPushNotifier' => DIR_LIBRARY . DS . 'android_push_notifier.php',
            'EasyChat\\Library\\Support\\ChatAssignmentService' => DIR_LIBRARY . DS . 'support' . DS . 'chat_assignment_service.php',
            'EasyChat\\Library\\Support\\ChatAssignmentPolicy' => DIR_LIBRARY . DS . 'support' . DS . 'chat_assignment_policy.php',
            'EasyChat\\Library\\Support\\NextConversationSelector' => DIR_LIBRARY . DS . 'support' . DS . 'next_conversation_selector.php',
            'EasyChat\\Library\\Support\\AdminHelpContextBuilder' => DIR_LIBRARY . DS . 'support' . DS . 'admin_help_context_builder.php',
            'EasyChat\\Library\\Support\\AdminHelpHandoffPolicy' => DIR_LIBRARY . DS . 'support' . DS . 'admin_help_handoff_policy.php',
            'EasyChat\\Library\\Support\\AdminHelpService' => DIR_LIBRARY . DS . 'support' . DS . 'admin_help_service.php',
            'EasyChat\\Library\\Support\\OfficialGroundingPolicy' => DIR_LIBRARY . DS . 'support' . DS . 'official_grounding_policy.php',
            'EasyChat\\Library\\Support\\OfficialProductSupportProfile' => DIR_LIBRARY . DS . 'support' . DS . 'official_product_support_profile.php',
            'EasyChat\\Library\\Support\\OfficialSupportRolloutPolicy' => DIR_LIBRARY . DS . 'support' . DS . 'official_support_rollout_policy.php',
            'EasyChat\\Library\\Support\\OfficialSupportNetworkPolicy' => DIR_LIBRARY . DS . 'support' . DS . 'official_support_network_policy.php',
            'EasyChat\\Library\\Support\\OfficialSupportRuntimeConfig' => DIR_LIBRARY . DS . 'support' . DS . 'official_support_runtime_config.php',
            'EasyChat\\Library\\Support\\ProductSupportService' => DIR_LIBRARY . DS . 'support' . DS . 'product_support_service.php',
            'EasyChat\\Library\\Operator\\OperatorDraftService' => DIR_LIBRARY . DS . 'operator' . DS . 'operator_draft_service.php',
            'EasyChat\\Library\\Queue\\Jobs\\ChatAssignmentPushJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'ChatAssignmentPushJob.php',
            'EasyChat\\Library\\CustomerWebPushNotifier' => DIR_LIBRARY . DS . 'customer_webpush_notifier.php',
            'EasyChat\\Library\\Notification\\TrialLockGuard' => DIR_LIBRARY . DS . 'notification' . DS . 'trial_lock_guard.php',
            'EasyChat\\Library\\ResponseTimeMetrics' => DIR_LIBRARY . DS . 'response_time_metrics.php',
            'EasyChat\\Library\\Update\\ReleaseManifestCanonicalizer' => DIR_LIBRARY . DS . 'update' . DS . 'release_manifest_canonicalizer.php',
            'EasyChat\\Library\\Update\\ReleaseManifestVerifier' => DIR_LIBRARY . DS . 'update' . DS . 'release_manifest_verifier.php',
            'EasyChat\\Library\\Update\\UpdatePlatformProfile' => DIR_LIBRARY . DS . 'update' . DS . 'update_platform_profile.php',
            'EasyChat\\Library\\Update\\SignedUpdateCatalog' => DIR_LIBRARY . DS . 'update' . DS . 'signed_update_catalog.php',
            'EasyChat\\Library\\Update\\VerifiedArtifactDownloader' => DIR_LIBRARY . DS . 'update' . DS . 'verified_artifact_downloader.php',
            'EasyChat\\Library\\Update\\SafeUpdateArchive' => DIR_LIBRARY . DS . 'update' . DS . 'safe_update_archive.php',
            'EasyChat\\Library\\Update\\GenericUpdateInstaller' => DIR_LIBRARY . DS . 'update' . DS . 'generic_update_installer.php',
            'EasyChat\\Library\\Update\\UpdateCenterService' => DIR_LIBRARY . DS . 'update' . DS . 'update_center_service.php',
            'EasyChat\\Library\\Update\\UpdateOperationStore' => DIR_LIBRARY . DS . 'update' . DS . 'update_operation_store.php',
            'EasyChat\\Library\\Update\\UpdateOperationService' => DIR_LIBRARY . DS . 'update' . DS . 'update_operation_service.php',
            'EasyChat\\Library\\PasskeyService' => DIR_LIBRARY . DS . 'passkey_service.php',
            'EasyChat\\Library\\NotificationHealthService' => DIR_LIBRARY . DS . 'notification_health_service.php',
            'EasyChat\\Library\\CentralGatewayClient' => DIR_LIBRARY . DS . 'central_gateway_client.php',
            'EasyChat\\Library\\MessageTextRenderer' => DIR_LIBRARY . DS . 'message_text_renderer.php',
            'EasyChat\\Library\\RequestContext' => DIR_LIBRARY . DS . 'request_context.php',
            'EasyChat\\Library\\AppClock' => DIR_LIBRARY . DS . 'app_clock.php',
            'EasyChat\\Library\\WidgetDomainPolicy' => DIR_LIBRARY . DS . 'widget_domain_policy.php',
            'EasyChat\\Library\\Messenger\\AttachmentCapabilities' => DIR_LIBRARY . DS . 'messenger' . DS . 'attachment_capabilities.php',
            'EasyChat\\Library\\Messenger\\OutboundAttachmentLink' => DIR_LIBRARY . DS . 'messenger' . DS . 'outbound_attachment_link.php',
            'EasyChat\\Library\\Messenger\\MaxGenerationSessionStore' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_generation_session_store.php',
            'EasyChat\\Library\\Messenger\\MaxSessionGenerationChangedException' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_generation_session_store.php',
            'EasyChat\\Library\\Messenger\\MaxSessionLifecycleBusyException' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_generation_session_store.php',
            'EasyChat\\Library\\Messenger\\MaxSessionAuthorizationRequiredException' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_generation_session_store.php',
            'EasyChat\\Library\\Messenger\\MaxPrivateFileLock' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_private_file_lock.php',
            'EasyChat\\Library\\Messenger\\MaxPrivateRuntime' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_private_runtime.php',
            'EasyChat\\Library\\Messenger\\MaxEncryptedSessionStore' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_encrypted_session_store.php',
            'EasyChat\\Library\\Messenger\\MaxDurableInbox' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_durable_inbox.php',
            'EasyChat\\Library\\Messenger\\MaxOperationalSpool' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_operational_spool.php',
            'EasyChat\\Library\\Messenger\\MaxSessionLifecycle' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_session_lifecycle.php',
            'EasyChat\\Library\\Messenger\\MaxHealthPresenter' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_health_presenter.php',
            'EasyChat\\Library\\Messenger\\MaxCronCadenceAnalyzer' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_cron_cadence_analyzer.php',
            'EasyChat\\Library\\Messenger\\MaxCronHeartbeatRepository' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_cron_heartbeat_repository.php',
            'EasyChat\\Library\\Messenger\\MaxAccountProfile' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_account_profile.php',
            'EasyChat\\Library\\Messenger\\MaxPersonalPresenter' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_personal_presenter.php',
            'EasyChat\\Library\\Messenger\\MaxPersonalIncidentService' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_personal_incident_service.php',
            'EasyChat\\Library\\Messenger\\MaxPersonalSettingsService' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_personal_settings_service.php',
            'EasyChat\\Library\\Messenger\\MaxPersonalSettingsConflictException' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_personal_settings_conflict_exception.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalRuntime' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_runtime.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalAuthStore' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_auth_store.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalLifecycle' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_lifecycle.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalAuthService' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_auth_service.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalPresenter' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_presenter.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalIdentityRepository' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_identity_repository.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_provider.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalOutboxHandler' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_outbox_handler.php',
            'EasyChat\\Library\\Messenger\\WhatsAppPersonalWorker' => DIR_LIBRARY . DS . 'messenger' . DS . 'whatsapp_personal_worker.php',
            'EasyChat\\Library\\CustomerProfileDetector' => DIR_LIBRARY . DS . 'customer_profile_detector.php',
            'EasyChat\\Library\\CustomerContactService' => DIR_LIBRARY . DS . 'customer_contact_service.php',
            'EasyChat\\Library\\CustomerMergeService' => DIR_LIBRARY . DS . 'customer_merge_service.php',
            'EasyChat\\Library\\CustomerIdentityResolver' => DIR_LIBRARY . DS . 'customer_identity_resolver.php',
            'EasyChat\\Library\\Chat\\ChatDeletionService' => DIR_LIBRARY . DS . 'chat' . DS . 'chat_deletion_service.php',
            'EasyChat\\Library\\SafeRuntime' => DIR_LIBRARY . DS . 'safe_runtime.php',
            'EasyChat\\Library\\Security\\PrivateFileArea' => DIR_LIBRARY . DS . 'security' . DS . 'private_file_area.php',
            'EasyChat\\Library\\Security\\AeadEnvelopeCipher' => DIR_LIBRARY . DS . 'security' . DS . 'aead_envelope_cipher.php',
            'EasyChat\\Library\\Support\\LogTailReader' => DIR_LIBRARY . DS . 'support' . DS . 'log_tail_reader.php',
            'EasyChat\\Library\\Catalog\\CatalogSearchService' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_search_service.php',
            'EasyChat\\Library\\Catalog\\CatalogSearchIntentResolver' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_search_intent_resolver.php',
            'EasyChat\\Library\\Catalog\\CatalogSearchUnavailableException' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_search_unavailable_exception.php',
            'EasyChat\\Library\\Catalog\\CatalogUrlPolicy' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_url_policy.php',
            'EasyChat\\Library\\Catalog\\CatalogPublicUrlService' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_public_url_service.php',
            'EasyChat\\Library\\Catalog\\CatalogCanonicalProbe' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_canonical_probe.php',
            'EasyChat\\Library\\Catalog\\CmsCatalogCapability' => DIR_LIBRARY . DS . 'catalog' . DS . 'cms_catalog_capability.php',
            'EasyChat\\Library\\Catalog\\CmsCatalogConnectionResolver' => DIR_LIBRARY . DS . 'catalog' . DS . 'cms_catalog_connection_resolver.php',
            'EasyChat\\Library\\Catalog\\CatalogSemanticBootstrap' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_semantic_bootstrap.php',
            'EasyChat\\Library\\Catalog\\CatalogIndexScheduler' => DIR_LIBRARY . DS . 'catalog' . DS . 'catalog_index_scheduler.php',
            'EasyChat\\View\\HtmxFragmentRenderer' => DIR_LIBRARY . DS . 'view' . DS . 'htmx_fragment_renderer.php',
            'EasyChat\\View\\AccessibleColor' => DIR_LIBRARY . DS . 'view' . DS . 'accessible_color.php',
            'EasyChat\\View\\QuickReplyFragments' => DIR_LIBRARY . DS . 'view' . DS . 'quick_reply_fragments.php',
            'EasyChat\\View\\OperatorFragments' => DIR_LIBRARY . DS . 'view' . DS . 'operator_fragments.php',
            'EasyChat\\View\\SettingFragments' => DIR_LIBRARY . DS . 'view' . DS . 'setting_fragments.php',
            'EasyChat\\View\\IntegrationFragments' => DIR_LIBRARY . DS . 'view' . DS . 'integration_fragments.php',
            'EasyChat\\View\\KnowledgeStorageFragments' => DIR_LIBRARY . DS . 'view' . DS . 'knowledge_storage_fragments.php',
            'EasyChat\\View\\NotificationHealthFragments' => DIR_LIBRARY . DS . 'view' . DS . 'notification_health_fragments.php',
            'EasyChat\\Library\\Http\\TlsTrustManager' => DIR_LIBRARY . DS . 'http' . DS . 'tls_trust_manager.php',
            'EasyChat\\Library\\Http\\ExternalHttpClient' => DIR_LIBRARY . DS . 'http' . DS . 'external_http_client.php',
            'EasyChat\\Library\\Http\\PublicUrlGuard' => DIR_LIBRARY . DS . 'http' . DS . 'public_url_guard.php',
            'EasyChat\\Library\\Http\\ProxyPolicy' => DIR_LIBRARY . DS . 'http' . DS . 'proxy_policy.php',
            'EasyChat\\Library\\Http\\TransportErrorCatalog' => DIR_LIBRARY . DS . 'http' . DS . 'transport_error_catalog.php',
            'EasyChat\\Library\\Messenger\\MessengerProviderInterface' => DIR_LIBRARY . DS . 'messenger' . DS . 'provider_interface.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceText' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_text.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\ProviderTimestamp' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'provider_timestamp.php',
            'EasyChat\\Library\\Messenger\\MaxBotProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_bot_provider.php',
            'EasyChat\\Library\\Messenger\\MaxProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_provider.php',
            'EasyChat\\Library\\Messenger\\MaxAuthService' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_auth_service.php',
            'EasyChat\\Library\\Messenger\\MaxCliSupport' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_cli_support.php',
            'EasyChat\\Library\\Messenger\\MaxRuntime' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_runtime.php',
            'EasyChat\\Library\\Messenger\\MaxEventNormalizer' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_event_normalizer.php',
            'EasyChat\\Library\\Messenger\\MaxConversationIdentity' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_conversation_identity.php',
            'EasyChat\\Library\\Messenger\\MaxPollingRunBudget' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_polling_run_budget.php',
            'EasyChat\\Library\\Messenger\\MaxPollingService' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_polling_service.php',
            'EasyChat\\Library\\Messenger\\MaxInboundScope' => DIR_LIBRARY . DS . 'messenger' . DS . 'max_inbound_scope.php',
            'EasyChat\\Library\\Messenger\\ServiceNoticeClassifier' => DIR_LIBRARY . DS . 'messenger' . DS . 'service_notice_classifier.php',
            'EasyChat\\Library\\Messenger\\ReplyCapability' => DIR_LIBRARY . DS . 'messenger' . DS . 'reply_capability.php',
            'EasyChat\\Library\\Messenger\\OutboundContactService' => DIR_LIBRARY . DS . 'messenger' . DS . 'outbound_contact_service.php',
            'EasyChat\\Library\\Messenger\\ScheduledMessageService' => DIR_LIBRARY . DS . 'messenger' . DS . 'scheduled_message_service.php',
            'EasyChat\\Library\\Messenger\\DirectMessageIdempotency' => DIR_LIBRARY . DS . 'messenger' . DS . 'direct_message_idempotency.php',
            'EasyChat\\Library\\Messenger\\DirectSmsDispatchOutbox' => DIR_LIBRARY . DS . 'messenger' . DS . 'direct_sms_dispatch_outbox.php',
            'EasyChat\\Library\\Messenger\\SmsDispatchAcceptancePolicy' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_dispatch_acceptance_policy.php',
            'EasyChat\\Library\\Messenger\\SmsProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_provider.php',
            'EasyChat\\Library\\Messenger\\SmsPhoneNumber' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_phone_number.php',
            'EasyChat\\Library\\Messenger\\SmsInstallationScope' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_installation_scope.php',
            'EasyChat\\Library\\Messenger\\SmsInboundContactFilter' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_inbound_contact_filter.php',
            'EasyChat\\Library\\Messenger\\SmsInboundFilterRefreshScheduler' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_inbound_filter_refresh_scheduler.php',
            'EasyChat\\Library\\Messenger\\SmsOutboundService' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_outbound_service.php',
            'EasyChat\\Library\\Messenger\\SmsDeliveryProjector' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_delivery_projector.php',
            'EasyChat\\Library\\Messenger\\SmsConversationResolver' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_conversation_resolver.php',
            'EasyChat\\Library\\Messenger\\SmsTextMetrics' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_text_metrics.php',
            'EasyChat\\Library\\Messenger\\SmsInboundService' => DIR_LIBRARY . DS . 'messenger' . DS . 'sms_inbound_service.php',
            'EasyChat\\Library\\Messenger\\AvitoProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'avito_provider.php',
            'EasyChat\\Library\\Messenger\\YoulaProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'youla_provider.php',
            'EasyChat\\Library\\Messenger\\VkProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'vk_provider.php',
            'EasyChat\\Library\\Messenger\\TelegramProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'telegram_provider.php',
            'EasyChat\\Library\\Messenger\\TelegramPollingService' => DIR_LIBRARY . DS . 'messenger' . DS . 'telegram_polling_service.php',
            'EasyChat\\Library\\Messenger\\ProviderRegistry' => DIR_LIBRARY . DS . 'messenger' . DS . 'provider_registry.php',
            'EasyChat\\Library\\Messenger\\ChannelCatalog' => DIR_LIBRARY . DS . 'messenger' . DS . 'channel_catalog.php',
            'EasyChat\\Library\\Messenger\\WildberriesProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'wildberries_provider.php',
            'EasyChat\\Library\\Messenger\\WildberriesTokenInspector' => DIR_LIBRARY . DS . 'messenger' . DS . 'wildberries_token_inspector.php',
            'EasyChat\\Library\\Messenger\\OzonProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'ozon_provider.php',
            'EasyChat\\Library\\Messenger\\YandexMarketProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'yandex_market_provider.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceProviderInterface' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_provider_interface.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceProviderCatalog' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_provider_catalog.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceStream' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_stream.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceCredentialsVault' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_credentials_vault.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceHttpTransport' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_http_transport.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\AbstractMarketplaceProvider' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'abstract_marketplace_provider.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceSyncService' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_sync_service.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceRateBudget' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_rate_budget.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\WildberriesHistoryRepairService' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'wildberries_history_repair_service.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceActionService' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_action_service.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceAccountService' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_account_service.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceAdminPresenter' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_admin_presenter.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceConversationService' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_conversation_service.php',
            'EasyChat\\Library\\Messenger\\Marketplace\\MarketplaceReadReceiptService' => DIR_LIBRARY . DS . 'messenger' . DS . 'marketplace' . DS . 'marketplace_read_receipt_service.php',
            'EasyChat\\Library\\Messenger\\InboundService' => DIR_LIBRARY . DS . 'messenger' . DS . 'inbound_service.php',
            'EasyChat\\Library\\Messenger\\OutboundService' => DIR_LIBRARY . DS . 'messenger' . DS . 'outbound_service.php',
            'EasyChat\\Library\\Messenger\\OutboundDispatchGuard' => DIR_LIBRARY . DS . 'messenger' . DS . 'outbound_dispatch_guard.php',
            'EasyChat\\Library\\Messenger\\OutboundTextFormatter' => DIR_LIBRARY . DS . 'messenger' . DS . 'outbound_text_formatter.php',
            'EasyChat\\Library\\Messenger\\MessengerLogger' => DIR_LIBRARY . DS . 'messenger' . DS . 'messenger_logger.php',
            'EasyChat\\Library\\Messenger\\SecretBox' => DIR_LIBRARY . DS . 'messenger' . DS . 'secret_box.php',
            'EasyChat\\Library\\Messenger\\CommerceContextService' => DIR_LIBRARY . DS . 'messenger' . DS . 'commerce_context_service.php',
            'EasyChat\\Library\\Messenger\\ContactAvatarService' => DIR_LIBRARY . DS . 'messenger' . DS . 'contact_avatar_service.php',
            'EasyChat\\Library\\Security\\ApiIncidentLogger' => DIR_LIBRARY . DS . 'security' . DS . 'api_incident_logger.php',
            'EasyChat\\Library\\Messenger\\VkCallbackRepairService' => DIR_LIBRARY . DS . 'messenger' . DS . 'vk_callback_repair_service.php',
            'EasyChat\\Library\\Messenger\\AvitoHistorySyncService' => DIR_LIBRARY . DS . 'messenger' . DS . 'avito_history_sync_service.php',
            'EasyChat\\Library\\Messenger\\AvitoAccessIncidentService' => DIR_LIBRARY . DS . 'messenger' . DS . 'avito_access_incident_service.php',
            'EasyChat\\Library\\Messenger\\AvitoItemContextService' => DIR_LIBRARY . DS . 'messenger' . DS . 'avito_item_context_service.php',
            'EasyChat\\Library\\Messenger\\YoulaItemContextService' => DIR_LIBRARY . DS . 'messenger' . DS . 'youla_item_context_service.php',
            'EasyChat\\Library\\Messenger\\AvitoHealthService' => DIR_LIBRARY . DS . 'messenger' . DS . 'avito_health_service.php',
            'EasyChat\\Library\\Queue\\QueueManager' => DIR_LIBRARY . DS . 'queue' . DS . 'QueueManager.php',
            'EasyChat\\Library\\Queue\\QueueWorker' => DIR_LIBRARY . DS . 'queue' . DS . 'QueueWorker.php',
            'EasyChat\\Library\\Queue\\Jobs\\VoiceMediaFetchJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'VoiceMediaFetchJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\VoiceTranscriptionJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'VoiceTranscriptionJob.php',
            'EasyChat\\Library\\Queue\\SchedulerHealthService' => DIR_LIBRARY . DS . 'queue' . DS . 'scheduler_health_service.php',
            'EasyChat\\Library\\Queue\\JobInterface' => DIR_LIBRARY . DS . 'queue' . DS . 'JobInterface.php',
            'EasyChat\\Library\\Queue\\Jobs\\SchedulerProbeJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'scheduler_probe_job.php',
            'EasyChat\\Library\\Queue\\Jobs\\DirectSmsDispatchRecoveryJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'DirectSmsDispatchRecoveryJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\ScheduledMessageReleaseJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'ScheduledMessageReleaseJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\SmsInboundPushJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'SmsInboundPushJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\SmsInboundFilterRefreshJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'SmsInboundFilterRefreshJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\ChatAttachmentCleanupJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'ChatAttachmentCleanupJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\CmsIndexJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'CmsIndexJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\CatalogUrlVerifyJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'CatalogUrlVerifyJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\EmbeddingJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'EmbeddingJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\ImageVariantJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'ImageVariantJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerOutboundJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerOutboundJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerMarketplaceSyncJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerMarketplaceSyncJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerMarketplaceAttachmentRetryJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerMarketplaceAttachmentRetryJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerMarketplaceReadReceiptJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerMarketplaceReadReceiptJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerAvitoHistorySyncJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerAvitoHistorySyncJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerAvitoItemContextEnrichJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerAvitoItemContextEnrichJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerYoulaItemContextEnrichJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerYoulaItemContextEnrichJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerAiTickJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerAiTickJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerAvatarJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerAvatarJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerVkCallbackRepairJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerVkCallbackRepairJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\MessengerVkInboundJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'MessengerVkInboundJob.php',
            'EasyChat\\Library\\Queue\\Jobs\\ResponseTimeMetricsBackfillJob' => DIR_LIBRARY . DS . 'queue' . DS . 'jobs' . DS . 'ResponseTimeMetricsBackfillJob.php',
            'EasyChat\\Library\\Queue\\RequeueWithoutAttemptException' => DIR_LIBRARY . DS . 'queue' . DS . 'RequeueWithoutAttemptException.php',
            'EasyChat\\Model\\ScheduledMessage' => SITE_PATH . DS . 'models' . DS . 'model_scheduled_message.php',
            'EasyChat\\Library\\Ai\\AiResponseTimingPolicy' => DIR_LIBRARY . DS . 'ai' . DS . 'ai_response_timing_policy.php',
            'EasyChat\\Library\\Ai\\AiReplyEligibilityGuard' => DIR_LIBRARY . DS . 'ai' . DS . 'ai_reply_eligibility_guard.php',
            'EasyChat\\Library\\Ai\\ConnectedChannelIdentityGuard' => DIR_LIBRARY . DS . 'ai' . DS . 'connected_channel_identity_guard.php',
            'EasyChat\\Library\\Ai\\CommerceContextReadinessService' => DIR_LIBRARY . DS . 'ai' . DS . 'commerce_context_readiness_service.php',
            'EasyChat\\Library\\Ai\\ChannelPolicyResolver' => DIR_LIBRARY . DS . 'ai' . DS . 'channel_policy_resolver.php',
            'EasyChat\\Library\\Ai\\AvitoItemContextBuilder' => DIR_LIBRARY . DS . 'ai' . DS . 'avito_item_context_builder.php',
            'EasyChat\\Library\\Ai\\YoulaItemContextBuilder' => DIR_LIBRARY . DS . 'ai' . DS . 'youla_item_context_builder.php',
            'EasyChat\\Library\\Ai\\SitePageContextBuilder' => DIR_LIBRARY . DS . 'ai' . DS . 'site_page_context_builder.php',
            'EasyChat\\Library\\Ai\\SitePageWebGrounding' => DIR_LIBRARY . DS . 'ai' . DS . 'site_page_web_grounding.php',
            'EasyChat\\Library\\Ai\\AvitoReplyTextNormalizer' => DIR_LIBRARY . DS . 'ai' . DS . 'avito_reply_text_normalizer.php',
            'EasyChat\\Library\\Ai\\TestNoticeSanitizer' => DIR_LIBRARY . DS . 'ai' . DS . 'test_notice_sanitizer.php',
            'EasyChat\\Library\\Ai\\OpenAiSseStreamParser' => DIR_LIBRARY . DS . 'ai' . DS . 'openai_sse_stream_parser.php',
            'EasyChat\\Library\\Ai\\GeminiStreamParser' => DIR_LIBRARY . DS . 'ai' . DS . 'gemini_stream_parser.php',
            'Parsedown' => DIR_LIBRARY . DS . 'parsedown' . DS . 'Parsedown.php',
            'EasyChat\\Model\\OutboundContact' => SITE_PATH . DS . 'models' . DS . 'model_outbound_contact.php',
            'EasyChat\\Model\\SmsDevice' => SITE_PATH . DS . 'models' . DS . 'model_sms_device.php',
            'EasyChat\\Model\\SmsJob' => SITE_PATH . DS . 'models' . DS . 'model_sms_job.php',
            'EasyChat\\Model\\SmsJobEvent' => SITE_PATH . DS . 'models' . DS . 'model_sms_job_event.php',
            'EasyChat\\Model\\ManagerNoticeState' => SITE_PATH . DS . 'models' . DS . 'model_manager_notice_state.php',
            'EasyChat\\Library\\Android\\AndroidReleaseCatalog' => DIR_LIBRARY . DS . 'android' . DS . 'android_release_catalog.php',
            'EasyChat\\Library\\Android\\AndroidUpdatePolicy' => DIR_LIBRARY . DS . 'android' . DS . 'android_update_policy.php',
            'EasyChat\\Library\\Android\\AndroidUpdateNoticeService' => DIR_LIBRARY . DS . 'android' . DS . 'android_update_notice_service.php',
        ];
        foreach ($explicit_map as $class_name => $file_path) {
            $map[$class_name] = $file_path;
        }
    }

    if (isset($map[$class])) {
        $file = $map[$class];
        if (is_file($file)) {
            require $file;
        }
    }
});

 
 
 
spl_autoload_register(function ($class) {
    static $aliases = null;

    if ($aliases === null) {
        $aliases = [
             
            'Registry'              => 'EasyChat\\Registry',
            'Router'                => 'EasyChat\\Router',
            'Template'              => 'EasyChat\\Template',
            'Controller_Base'       => 'EasyChat\\Controller\\Base',
            'Model_Base'            => 'EasyChat\\Model\\Base',
            'Knowledge_section'     => 'EasyChat\\KnowledgeSection',

             
            'DB'                                    => 'EasyChat\\Library\\DB',
            'Logger'                                => 'EasyChat\\Library\\Logger',
            'Log'                                   => 'EasyChat\\Library\\Log',
            'AiResponder'                           => 'EasyChat\\Library\\AiResponder',
            'EasyChat_I18n'                         => 'EasyChat\\Library\\I18n',
            'EasyChat_Presence_Service'             => 'EasyChat\\Library\\PresenceService',
            'EasyChat_Install_Service'              => 'EasyChat\\Library\\InstallService',
            'EasyChat_Central_Gateway_Client'       => 'EasyChat\\Library\\CentralGatewayClient',
            'EasyChat_EasyTokens_Gift_Provisioner'  => 'EasyChat\\Library\\EasyTokensGiftProvisioner',
            'EasyChat_AttachmentPolicy'             => 'EasyChat\\Library\\AttachmentPolicy',
            'EasyChat_AttachmentStorage'            => 'EasyChat\\Library\\AttachmentStorage',
            'EasyChat_ImageVariantService'          => 'EasyChat\\Library\\ImageVariantService',
            'EasyChat_QuickReplyAiAssistant'        => 'EasyChat\\Library\\QuickReplyAiAssistant',
            'EasyChat_SuggestedReplyAssistant'      => 'EasyChat\\Library\\SuggestedReplyAssistant',
            'EasyChat_AndroidPushNotifier'          => 'EasyChat\\Library\\AndroidPushNotifier',
            'EasyChat_CustomerWebPushNotifier'      => 'EasyChat\\Library\\CustomerWebPushNotifier',
            'EasyChat_ResponseTimeMetrics'          => 'EasyChat\\Library\\ResponseTimeMetrics',
            'Pagination'                            => 'EasyChat\\Library\\Pagination',
            'Sklonenie'                             => 'EasyChat\\Library\\Sklonenie',
            'ImageHelper'                           => 'EasyChat\\Library\\ImageHelper',

             
            'AiProvider'            => 'EasyChat\\Library\\AiProvider\\AiProvider',
            'Gemini'                => 'EasyChat\\Library\\AiProvider\\Gemini',
            'OpenAI'                => 'EasyChat\\Library\\AiProvider\\OpenAI',
            'OpenAiCompatibleTransport' => 'EasyChat\\Library\\AiProvider\\OpenAiCompatibleTransport',
            'EasyTokensProvider'    => 'EasyChat\\Library\\AiProvider\\EasyTokensProvider',
            'ProviderException'     => 'EasyChat\\Library\\AiProvider\\ProviderException',
            'ToolExecutor'          => 'EasyChat\\Library\\AiProvider\\ToolExecutor',

             
            'AiPipeline'                  => 'EasyChat\\Library\\Ai\\Pipeline',
            'AiStepInterface'             => 'EasyChat\\Library\\Ai\\StepInterface',
            'AiReplyEligibilityGuard'      => 'EasyChat\\Library\\Ai\\AiReplyEligibilityGuard',
            'CommerceContextReadinessService' => 'EasyChat\\Library\\Ai\\CommerceContextReadinessService',
            'ChannelPolicyResolver'       => 'EasyChat\\Library\\Ai\\ChannelPolicyResolver',
            'AvitoItemContextBuilder'     => 'EasyChat\\Library\\Ai\\AvitoItemContextBuilder',
            'YoulaItemContextBuilder'     => 'EasyChat\\Library\\Ai\\YoulaItemContextBuilder',
            'SitePageContextBuilder'      => 'EasyChat\\Library\\Ai\\SitePageContextBuilder',
            'AvitoReplyTextNormalizer'    => 'EasyChat\\Library\\Ai\\AvitoReplyTextNormalizer',
            'AiTestNoticeSanitizer'        => 'EasyChat\\Library\\Ai\\TestNoticeSanitizer',
            'StepContactExtract'          => 'EasyChat\\Library\\Ai\\StepContactExtract',
            'StepThemeCheck'              => 'EasyChat\\Library\\Ai\\StepThemeCheck',
            'StepRagSearch'               => 'EasyChat\\Library\\Ai\\StepRagSearch',
            'EmbeddingConfigResolver'     => 'EasyChat\\Library\\Ai\\EmbeddingConfigResolver',
            'EasyChat_VectorStorageGuard' => 'EasyChat\\Library\\Ai\\VectorStorageGuard',
            'OpenAiSseStreamParser'       => 'EasyChat\\Library\\Ai\\OpenAiSseStreamParser',
            'GeminiStreamParser'          => 'EasyChat\\Library\\Ai\\GeminiStreamParser',

             
            'QueueManager'          => 'EasyChat\\Library\\Queue\\QueueManager',
            'QueueWorker'           => 'EasyChat\\Library\\Queue\\QueueWorker',
            'QueueJobInterface'     => 'EasyChat\\Library\\Queue\\JobInterface',
            'EmbeddingJob'          => 'EasyChat\\Library\\Queue\\Jobs\\EmbeddingJob',
            'CmsIndexJob'           => 'EasyChat\\Library\\Queue\\Jobs\\CmsIndexJob',
            'ImageVariantJob'       => 'EasyChat\\Library\\Queue\\Jobs\\ImageVariantJob',
            'MessengerOutboundJob'  => 'EasyChat\\Library\\Queue\\Jobs\\MessengerOutboundJob',
            'MessengerAiTickJob'    => 'EasyChat\\Library\\Queue\\Jobs\\MessengerAiTickJob',
            'MessengerAvatarJob'    => 'EasyChat\\Library\\Queue\\Jobs\\MessengerAvatarJob',
            'MessengerVkCallbackRepairJob' => 'EasyChat\\Library\\Queue\\Jobs\\MessengerVkCallbackRepairJob',
            'MessengerVkInboundJob' => 'EasyChat\\Library\\Queue\\Jobs\\MessengerVkInboundJob',
            'ResponseTimeMetricsBackfillJob' => 'EasyChat\\Library\\Queue\\Jobs\\ResponseTimeMetricsBackfillJob',
            'RequeueWithoutAttemptException' => 'EasyChat\\Library\\Queue\\RequeueWithoutAttemptException',

             
            'EasyChat_MessengerProviderInterface' => 'EasyChat\\Library\\Messenger\\MessengerProviderInterface',
            'EasyChat_MaxMessengerProvider'       => 'EasyChat\\Library\\Messenger\\MaxBotProvider',
            'EasyChat_AvitoMessengerProvider'     => 'EasyChat\\Library\\Messenger\\AvitoProvider',
            'EasyChat_YoulaMessengerProvider'     => 'EasyChat\\Library\\Messenger\\YoulaProvider',
            'EasyChat_VkMessengerProvider'        => 'EasyChat\\Library\\Messenger\\VkProvider',
            'EasyChat_TelegramMessengerProvider'  => 'EasyChat\\Library\\Messenger\\TelegramProvider',
            'EasyChat_MessengerProviderRegistry'  => 'EasyChat\\Library\\Messenger\\ProviderRegistry',
            'EasyChat_MessengerInboundService'    => 'EasyChat\\Library\\Messenger\\InboundService',
            'EasyChat_MessengerOutboundService'   => 'EasyChat\\Library\\Messenger\\OutboundService',
            'EasyChat_MessengerOutboundGuard'     => 'EasyChat\\Library\\Messenger\\OutboundDispatchGuard',
            'EasyChat_MessengerLogger'            => 'EasyChat\\Library\\Messenger\\MessengerLogger',
            'EasyChat_SecretBox'                  => 'EasyChat\\Library\\Messenger\\SecretBox',
            'EasyChat_CommerceContextService'     => 'EasyChat\\Library\\Messenger\\CommerceContextService',
            'EasyChat_ContactAvatarService'       => 'EasyChat\\Library\\Messenger\\ContactAvatarService',
            'EasyChat_VkCallbackRepairService'    => 'EasyChat\\Library\\Messenger\\VkCallbackRepairService',
            'EasyChat_AvitoItemContextService'    => 'EasyChat\\Library\\Messenger\\AvitoItemContextService',
            'EasyChat_YoulaItemContextService'    => 'EasyChat\\Library\\Messenger\\YoulaItemContextService',

             
            'Model_Setting'         => 'EasyChat\\Model\\Setting',
            'Model_Manager'         => 'EasyChat\\Model\\Manager',
            'Model_Message'         => 'EasyChat\\Model\\Message',
            'Model_Session'         => 'EasyChat\\Model\\Session',
            'Model_Knowledge'       => 'EasyChat\\Model\\Knowledge',
            'Model_Reply'           => 'EasyChat\\Model\\Reply',
            'Model_Appsession'      => 'EasyChat\\Model\\AppSession',
            'Model_Moderationtoken' => 'EasyChat\\Model\\ModerationToken',
            'Model_Messenger'       => 'EasyChat\\Model\\Messenger',
            'Model_MessengerItemContext' => 'EasyChat\\Model\\MessengerItemContext',
            'Model_Apppairing'      => 'EasyChat\\Model\\AppPairing',

             
            'CmsInterface'          => 'EasyChat\\Model\\Cms\\CmsInterface',
            'CmsModelBase'          => 'EasyChat\\Model\\Cms\\CmsModelBase',
            'CmsFactory'            => 'EasyChat\\Model\\Cms\\CmsFactory',
            'CmsModelOpenCart'      => 'EasyChat\\Model\\Cms\\CmsModelOpenCart',
            'CmsModelWordPress'     => 'EasyChat\\Model\\Cms\\CmsModelWordPress',
            'CmsModelBitrix'        => 'EasyChat\\Model\\Cms\\CmsModelBitrix',
            'CmsModelWebAsyst'      => 'EasyChat\\Model\\Cms\\CmsModelWebAsyst',

             
            'Controller_Index'             => 'EasyChat\\Controller\\Index',
            'Controller_Setting'           => 'EasyChat\\Controller\\Setting',
            'Controller_Auth'              => 'EasyChat\\Controller\\Auth',
            'Controller_Api'               => 'EasyChat\\Controller\\Api',
            'Controller_Widget'            => 'EasyChat\\Controller\\Widget',
            'Controller_Widget_push'       => 'EasyChat\\Controller\\WidgetPush',
            'Controller_Messenger'         => 'EasyChat\\Controller\\Messenger',
            'Controller_Mobile_connect'    => 'EasyChat\\Controller\\MobileConnect',
            'Controller_Install'           => 'EasyChat\\Controller\\Install',
            'Controller_Operator'          => 'EasyChat\\Controller\\Operator',
            'Controller_Quickreply'        => 'EasyChat\\Controller\\QuickReply',
            'Controller_Analytics'         => 'EasyChat\\Controller\\Analytics',
            'Controller_Knowledge_storage' => 'EasyChat\\Controller\\KnowledgeStorage',
            'Controller_Provisioning'      => 'EasyChat\\Controller\\Provisioning',
        ];
    }

    if (isset($aliases[$class])) {
         
        class_alias($aliases[$class], $class);
    }
});

 
require_once DIR_LIBRARY . DS . 'url_helper.php';
