import type { Plugin } from "vite"; export declare const USER_AGENT_STUB_ID = "\0cfni:user-agent-stub"; export declare const USER_AGENT_STUB_CODE = "\nexport function isBot(input) {\n if (!input) return false;\n return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver|GPTBot/i.test(\n input\n );\n}\n\nexport function userAgentFromString(input) {\n return {\n ua: input ?? \"\",\n browser: { name: undefined, version: undefined, major: undefined },\n cpu: { architecture: undefined },\n device: { model: undefined, type: undefined, vendor: undefined },\n engine: { name: undefined, version: undefined },\n os: { name: undefined, version: undefined },\n isBot: input === undefined ? false : isBot(input),\n };\n}\n\nexport function userAgent(context) {\n const headers = context?.headers;\n const ua = headers?.get ? headers.get(\"user-agent\") : undefined;\n return userAgentFromString(ua ?? undefined);\n}\n\nexport default {\n isBot,\n userAgent,\n userAgentFromString,\n};\n"; export declare function userAgentStubPlugin(): Plugin;