import * as GeoJSON from 'geojson'; import { N as NoReturn, F as Func, M as MemoizeOptions } from '../../shared/flow-rdf-core.63162669.js'; export { m as memoize } from '../../shared/flow-rdf-core.63162669.js'; export { html } from 'lit-html'; /** @group Type Checks */ declare const isUndefined: (val: unknown) => val is undefined; declare const isNull: (val: unknown) => val is null; declare const isNil: (val: unknown) => val is null | undefined; declare const isDefined: (val: T) => val is Exclude; declare const isString: (val: unknown) => val is string; declare const hasLength: (val: unknown) => boolean; declare const isStringFull: (val: unknown) => val is string; declare const isArray: (val: unknown) => val is unknown[]; declare const isArrayFull: (val: unknown) => val is unknown[]; declare const isArrayStrings: (val: unknown) => val is string[]; declare const isObject: (val: unknown) => val is object; declare const isObjectFull: (val: unknown) => boolean; declare const isNumber: (val: unknown) => val is number; declare const isFalse: (val: unknown) => val is false; declare const isTrue: (val: unknown) => val is true; declare const isIn: (val: unknown, arr: any[]) => boolean; declare const isBoolean: (val: unknown) => val is boolean; declare const isNumeric: (val: unknown) => boolean; declare const isDate: (val: unknown) => val is Date; declare const isValue: (val: unknown) => boolean; declare const hasValue: (val: unknown) => boolean; declare const isFunction: (val: unknown) => val is Function; declare function isPlainObject(o: unknown): o is object; declare function isURL(val: unknown): val is string; declare function ensureArray(a: T | T[], ...rest: T[]): T[]; declare const isPoint: (val: unknown) => val is GeoJSON.Feature | GeoJSON.Point; declare const isLineString: (val: any) => val is GeoJSON.Feature | GeoJSON.LineString; declare const isPolygon: (val: any) => val is GeoJSON.Feature | GeoJSON.Polygon; declare const isMultiPolygon: (val: any) => val is GeoJSON.Feature | GeoJSON.MultiPolygon; /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. * Provide `options` to indicate whether `func` should be invoked on the * leading and/or trailing edge of the `wait` timeout. The `func` is invoked * with the last arguments provided to the debounced function. Subsequent * calls to the debounced function return the result of the last `func` * invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the debounced function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @param {Function} func The function to debounce. * @param {number} [wait=0] The number of milliseconds to delay. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=false] * Specify invoking on the leading edge of the timeout. * @param {number} [options.maxWait] * The maximum time `func` is allowed to be delayed before it's invoked. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new debounced function. * @example * * // Avoid costly calculations while the window size is in flux. * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * * // Invoke `sendMail` when clicked, debouncing subsequent calls. * jQuery(element).on('click', _.debounce(sendMail, 300, { * 'leading': true, * 'trailing': false * })); * * // Ensure `batchLog` is invoked once after 1 second of debounced calls. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); * var source = new EventSource('/stream'); * jQuery(source).on('message', debounced); * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel); */ interface CancelOptions { upcomingOnly?: boolean; } interface Cancel { cancel: (options?: CancelOptions) => void; } interface DebounceOptions { leading?: boolean; trailing?: boolean; maxWait?: number; context?: any; } declare function debounce any>(func: TFunc, wait: number, options?: DebounceOptions): NoReturn & Cancel; type MemoizedDebounceOptions = DebounceOptions & MemoizeOptions; declare function debounceWithArgs(fn: Func, wait: number, options: MemoizedDebounceOptions): Func; /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to * immediately invoke them. Provide `options` to indicate whether `func` * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * * @param {Function} func The function to throttle. * @param {number} [wait=0] The number of milliseconds to throttle invocations to. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=true] * Specify invoking on the leading edge of the timeout. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new throttled function. * @example * * // Avoid excessively updating the position while scrolling. * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); * * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); * jQuery(element).on('click', throttled); * * // Cancel the trailing throttled invocation. * jQuery(window).on('popstate', throttled.cancel); */ declare function throttle any>(func: TFunc, wait: number, options?: Omit): NoReturn & Cancel; type MemoizedThrottleOptions = Omit & MemoizeOptions; declare function throttleWithArgs(fn: Func, wait: number, options: MemoizedThrottleOptions): Func; declare const capitalize: (str: string, lowerRest?: boolean) => string; /** * Generate a random ID of `length` characters and prepending the given prefix. * * @param prefix Fixed prefix to prepend to the generated ID. * @param length Number of characters in the generated ID. * */ declare function randomId(prefix?: string, length?: number): string; export { capitalize, debounce, debounceWithArgs, ensureArray, hasLength, hasValue, isArray, isArrayFull, isArrayStrings, isBoolean, isDate, isDefined, isFalse, isFunction, isIn, isLineString, isMultiPolygon, isNil, isNull, isNumber, isNumeric, isObject, isObjectFull, isPlainObject, isPoint, isPolygon, isString, isStringFull, isTrue, isURL, isUndefined, isValue, randomId, throttle, throttleWithArgs };