import { b as GeoExcludeRule, c as GeoPathRule, d as GeoRequestPayload, G as GeoTrackerOptions, e as GeoTagLinksOption, f as GeoTagLinksConfig, g as GeoTagMode, h as GeoTagResponseOptions } from './types-CNS6OABG.js';
export { i as GeoLocation, j as GeoNextOptions, k as GeoRequestSignals, T as TagHtmlLinksOptions, W as WaitUntilContext } from './types-CNS6OABG.js';
export { tagHtmlLinks } from './html.js';
import { M as McpEventBatch } from './types-dO1jMWgY.js';

declare const DEFAULT_ENDPOINT = "https://ingest.usenotra.com";
declare const INGEST_PATH = "/api/geo/ingest";
declare const INGEST_TIMEOUT_MS = 2000;
declare const DEFAULT_EXCLUDE: GeoExcludeRule[];
declare const TAG_LOOP_GUARD_HEADER = "x-notra-geo-tag";
declare const TAG_LOOP_GUARD_VALUE = "1";
declare const DEFAULT_TAG_PATHS: GeoPathRule[];
declare const TAGGABLE_CONTENT_TYPES: string[];
declare const TAGGABLE_HTML_CONTENT_TYPES: string[];
declare const ASSET_PATH_PREFIXES: string[];
declare const ASSET_EXTENSIONS: string[];

declare function matchesRule(request: Request, url: URL, rule: GeoPathRule): boolean;
declare function matchesAnyRule(request: Request, url: URL, rules: readonly GeoPathRule[]): boolean;
declare function shouldTrackRequest(request: Request, url: URL, exclude?: GeoExcludeRule[]): boolean;

declare function sendRequestLog(payload: GeoRequestPayload | McpEventBatch, options: Pick<GeoTrackerOptions, "token" | "endpoint" | "fetch" | "onError">): Promise<void>;

declare function serializeRequest(request: Request): GeoRequestPayload;

declare function resolveTagLinksConfig(option: GeoTagLinksOption | undefined): GeoTagLinksConfig | null;
declare function shouldTagRequest(request: Request, url: URL, config: GeoTagLinksConfig): boolean;
declare function resolveTagMode(request: Request, url: URL, config: GeoTagLinksConfig, exclude?: GeoExcludeRule[]): GeoTagMode | null;
declare function tagMarkdownResponse(request: Request, config: GeoTagLinksConfig, options?: GeoTagResponseOptions): Promise<Response | undefined>;

declare class Tracker {
    readonly options: GeoTrackerOptions;
    constructor(options: GeoTrackerOptions);
    buildPayload(request: Request): GeoRequestPayload | null;
    track(request: Request): Promise<void>;
}

export { ASSET_EXTENSIONS, ASSET_PATH_PREFIXES, DEFAULT_ENDPOINT, DEFAULT_EXCLUDE, DEFAULT_TAG_PATHS, GeoExcludeRule, GeoPathRule, GeoRequestPayload, GeoTagLinksConfig, GeoTagLinksOption, GeoTagMode, GeoTagResponseOptions, GeoTrackerOptions, INGEST_PATH, INGEST_TIMEOUT_MS, TAGGABLE_CONTENT_TYPES, TAGGABLE_HTML_CONTENT_TYPES, TAG_LOOP_GUARD_HEADER, TAG_LOOP_GUARD_VALUE, Tracker, matchesAnyRule, matchesRule, resolveTagLinksConfig, resolveTagMode, sendRequestLog, serializeRequest, shouldTagRequest, shouldTrackRequest, tagMarkdownResponse };
