{"version":3,"file":"dist-js-73TVjx13.js","names":[],"sources":["../../node_modules/.pnpm/create-web-stream@1.1.3/node_modules/create-web-stream/dist/index.js","../../node_modules/.pnpm/tauri-plugin-android-fs-api@28.4.0/node_modules/tauri-plugin-android-fs-api/dist-js/index.js"],"sourcesContent":["/**\n * Creates a `ReadableStream` that yields byte data using the provided custom handler.\n *\n * The resulting stream can provide a BYOB reader if supported by the runtime.\n * If unsupported, only a default reader is available.\n *\n * @param handler - The stream handler: `read`, `release`. See `CreateReadableStreamHandler` for details.\n * @param options - Optional settings: `signal`, `checkSignalEarly`. See `CreateReadableStreamOptions` for details.\n * @returns A `ReadableStream<Uint8Array<ArrayBuffer>>` configured with the provided handler and options.\n */\nfunction createReadableStream(handler, options) {\n    const checkSignalEarly = options?.checkSignalEarly ?? true;\n    if (checkSignalEarly) {\n        throwIfAborted(options?.signal);\n    }\n    const read = handler.read;\n    const release = handler.release;\n    let abortListener = null;\n    let buffer = null;\n    let cleanupPromise = null;\n    function cleanup(type, reason) {\n        if (cleanupPromise === null) {\n            cleanupPromise = (async () => {\n                buffer = null;\n                if (options?.signal != null && abortListener != null) {\n                    options.signal.removeEventListener(\"abort\", abortListener);\n                    abortListener = null;\n                }\n                if (release != null) {\n                    await release(type, reason);\n                }\n            })();\n        }\n        return cleanupPromise;\n    }\n    const useByteStream = (options?.__internal_useByteStream__ !== undefined)\n        ? options.__internal_useByteStream__\n        : isReadableByteStreamAvailable();\n    if (!useByteStream) {\n        return new ReadableStream({\n            start(controller) {\n                if (options?.signal != null) {\n                    abortListener = () => {\n                        const reason = options?.signal?.reason ?? newAbortSignalDefaultError();\n                        cleanup(\"SignalAbort\", reason).catch(() => { });\n                        controller.error(reason);\n                    };\n                    options?.signal?.addEventListener(\"abort\", abortListener);\n                }\n            },\n            async pull(controller) {\n                try {\n                    throwIfAborted(options?.signal);\n                    const data = await read();\n                    throwIfAborted(options?.signal);\n                    if (data == null || data.byteLength === 0) {\n                        await cleanup(\"Close\");\n                        controller.close();\n                        return;\n                    }\n                    controller.enqueue(data);\n                }\n                catch (e) {\n                    const isSignalAbort = isThrownByAbortSignal(e, options?.signal);\n                    await cleanup(isSignalAbort ? \"SignalAbort\" : \"Error\", e).catch(() => { });\n                    throw e;\n                }\n            },\n            async cancel(reason) {\n                await cleanup(\"Cancel\", reason);\n            }\n        });\n    }\n    // autoAllocateChunkSize を指定すると stream.getReader() でも byob が使われるようになるが、\n    // この実装で byob を用いてもコピーが増えるだけで恩恵が少ないため指定しない。\n    // また type: \"bytes\" で strategy を指定すると (正確には size を定義すると) エラーになる点にも注意。\n    return new ReadableStream({\n        type: \"bytes\",\n        start(controller) {\n            if (options?.signal) {\n                abortListener = () => {\n                    const reason = options?.signal?.reason ?? newAbortSignalDefaultError();\n                    cleanup(\"SignalAbort\", reason).catch(() => { });\n                    controller.error(reason);\n                };\n                options?.signal.addEventListener(\"abort\", abortListener);\n            }\n        },\n        async pull(controller) {\n            try {\n                throwIfAborted(options?.signal);\n                if (buffer == null || buffer.byteLength === 0) {\n                    buffer = (await read()) ?? null;\n                    throwIfAborted(options?.signal);\n                }\n                if (buffer == null || buffer.byteLength === 0) {\n                    await cleanup(\"Close\");\n                    // byobRequest がある場合、respond を呼ばないと promise　が解決されない。\n                    // controller.close() の後だと respond(0) を読んでもエラーにはならない。\n                    // https://github.com/whatwg/streams/issues/1170\n                    controller.close();\n                    controller.byobRequest?.respond(0);\n                    return;\n                }\n                const byob = controller.byobRequest;\n                // byobRequest がある場合、respond を呼ばないと promise　が解決されないことに注意\n                if (byob != null) {\n                    // respond する前なので null にならない\n                    const v = byob.view;\n                    const view = new Uint8Array(v.buffer, v.byteOffset, v.byteLength);\n                    const nread = Math.min(buffer.byteLength, view.byteLength);\n                    view.set(buffer.subarray(0, nread));\n                    buffer = buffer.subarray(nread);\n                    throwIfAborted(options?.signal);\n                    byob.respond(nread);\n                }\n                else {\n                    throwIfAborted(options?.signal);\n                    controller.enqueue(buffer);\n                    buffer = null;\n                }\n            }\n            catch (e) {\n                const isSignalAbort = isThrownByAbortSignal(e, options?.signal);\n                await cleanup(isSignalAbort ? \"SignalAbort\" : \"Error\", e).catch(() => { });\n                // byobRequest が存在する場合、controller.close() を呼んだだけでは\n                // Promise は解決されず、respond() も呼ぶ必要がある。\n                // controller.error() も同様の挙動になる可能性がある。(要検証)\n                // 少なくとも throw すれば Promise は解決されるため、現状はこの実装とする。\n                throw e;\n            }\n        },\n        async cancel(reason) {\n            await cleanup(\"Cancel\", reason);\n        }\n    });\n}\n/**\n * Creates a `ReadableStream` that yields byte data using a BYOB-style handler.\n *\n * The resulting stream can provide a BYOB reader if supported by the runtime.\n * If unsupported, only a default reader is available.\n *\n * @param handler - The stream handler: `read`, `release`. See `CreateBYOBReadableStreamHandler` for details.\n * @param defaultBufferSize - The size of the fallback buffer passed to `handler.read`. Must be a positive safe integer. Used as `autoAllocateChunkSize` when a bytes-type reader is available. If unsupported, used as the size of the internal buffer for a default reader.\n * @param options - Optional settings: `signal`, `checkSignalEarly`. See `CreateBYOBReadableStreamOptions` for details.\n * @returns A `ReadableStream<Uint8Array<ArrayBuffer>>` configured with the provided handler and options.\n */\nfunction createBYOBReadableStream(handler, defaultBufferSize, options) {\n    const checkSignalEarly = options?.checkSignalEarly ?? true;\n    if (checkSignalEarly) {\n        throwIfAborted(options?.signal);\n    }\n    requiresNonzeroSafeInt(defaultBufferSize, \"defaultBufferSize\");\n    const read = handler.read;\n    const release = handler.release;\n    let abortListener = null;\n    let buffer = null;\n    let cleanupPromise = null;\n    function cleanup(type, reason) {\n        if (cleanupPromise === null) {\n            cleanupPromise = (async () => {\n                buffer = null;\n                if (options?.signal != null && abortListener != null) {\n                    options.signal.removeEventListener(\"abort\", abortListener);\n                    abortListener = null;\n                }\n                if (release != null) {\n                    await release(type, reason);\n                }\n            })();\n        }\n        return cleanupPromise;\n    }\n    const useByteStream = (options?.__internal_useByteStream__ !== undefined)\n        ? options.__internal_useByteStream__\n        : isReadableByteStreamAvailable();\n    if (!useByteStream) {\n        return new ReadableStream({\n            start(controller) {\n                if (options?.signal != null) {\n                    abortListener = () => {\n                        const reason = options?.signal?.reason ?? newAbortSignalDefaultError();\n                        cleanup(\"SignalAbort\", reason).catch(() => { });\n                        controller.error(reason);\n                    };\n                    options?.signal?.addEventListener(\"abort\", abortListener);\n                }\n            },\n            async pull(controller) {\n                try {\n                    throwIfAborted(options?.signal);\n                    if (buffer === null) {\n                        buffer = new Uint8Array(defaultBufferSize);\n                    }\n                    throwIfAborted(options?.signal);\n                    const nread = await read(buffer);\n                    throwIfAborted(options?.signal);\n                    requiresSafeUint(nread, \"nread\");\n                    if (nread === 0) {\n                        await cleanup(\"Close\");\n                        controller.close();\n                        return;\n                    }\n                    controller.enqueue(buffer.slice(0, nread));\n                }\n                catch (e) {\n                    const isSignalAbort = isThrownByAbortSignal(e, options?.signal);\n                    await cleanup(isSignalAbort ? \"SignalAbort\" : \"Error\", e).catch(() => { });\n                    throw e;\n                }\n            },\n            async cancel(reason) {\n                await cleanup(\"Cancel\", reason);\n            }\n        });\n    }\n    return new ReadableStream({\n        type: \"bytes\",\n        autoAllocateChunkSize: defaultBufferSize,\n        start(controller) {\n            if (options?.signal) {\n                abortListener = () => {\n                    const reason = options?.signal?.reason ?? newAbortSignalDefaultError();\n                    cleanup(\"SignalAbort\", reason).catch(() => { });\n                    controller.error(reason);\n                };\n                options?.signal.addEventListener(\"abort\", abortListener);\n            }\n        },\n        async pull(controller) {\n            try {\n                throwIfAborted(options?.signal);\n                const byob = controller.byobRequest;\n                if (byob == null) {\n                    if (buffer == null) {\n                        buffer = new Uint8Array(defaultBufferSize);\n                    }\n                    throwIfAborted(options?.signal);\n                    const nread = await read(buffer);\n                    throwIfAborted(options?.signal);\n                    requiresSafeUint(nread, \"nread\");\n                    if (nread === 0) {\n                        await cleanup(\"Close\");\n                        controller.close();\n                        return;\n                    }\n                    controller.enqueue(buffer.slice(0, nread));\n                    return;\n                }\n                const v = byob.view;\n                if (v == null)\n                    return;\n                const view = new Uint8Array(v.buffer, v.byteOffset, v.byteLength);\n                throwIfAborted(options?.signal);\n                const nread = await read(view);\n                throwIfAborted(options?.signal);\n                requiresSafeUint(nread, \"nread\");\n                if (nread === 0) {\n                    await cleanup(\"Close\");\n                    // byobRequest がある場合、respond を呼ばないと promise　が解決されない。\n                    // controller.close() の後だと respond(0) を読んでもエラーにはならない。\n                    // https://github.com/whatwg/streams/issues/1170\n                    controller.close();\n                    controller.byobRequest?.respond(0);\n                    return;\n                }\n                byob.respond(nread);\n            }\n            catch (e) {\n                const isSignalAbort = isThrownByAbortSignal(e, options?.signal);\n                await cleanup(isSignalAbort ? \"SignalAbort\" : \"Error\", e).catch(() => { });\n                throw e;\n            }\n        },\n        async cancel(reason) {\n            await cleanup(\"Cancel\", reason);\n        }\n    });\n}\n/**\n * Creates a `WritableStream` that writes byte data using the provided custom handler.\n *\n * @param handler - The stream handler: `write`, `release`. See `CreateWritableStreamHandler` for details.\n * @param options - Optional settings: `signal`, `checkSignalEarly`, `bufferSize`, `strictBufferSize`, `useBufferView`. See `CreateWritableStreamOptions` for details.\n * @returns A `WritableStream<Uint8Array<ArrayBufferLike>>` instance configured with the provided handler and options.\n */\nfunction createWritableStream(handler, options) {\n    const checkSignalEarly = options?.checkSignalEarly ?? true;\n    if (checkSignalEarly) {\n        throwIfAborted(options?.signal);\n    }\n    const write = handler.write;\n    const release = handler.release;\n    const bufferSize = options?.bufferSize ?? 0;\n    requiresSafeUint(bufferSize, \"bufferSize\");\n    let abortListener = null;\n    let buffer = null;\n    let bufferOffset = 0;\n    let cleanupPromise = null;\n    function cleanup(type, reason) {\n        if (cleanupPromise === null) {\n            cleanupPromise = (async () => {\n                buffer = null;\n                if (options?.signal != null && abortListener != null) {\n                    options?.signal?.removeEventListener(\"abort\", abortListener);\n                    abortListener = null;\n                }\n                if (release != null) {\n                    await release(type, reason);\n                }\n            })();\n        }\n        return cleanupPromise;\n    }\n    return new WritableStream({\n        start(controller) {\n            if (options?.signal != null) {\n                abortListener = () => {\n                    const reason = options?.signal?.reason ?? newAbortSignalDefaultError();\n                    cleanup(\"SignalAbort\", reason).catch(() => { });\n                    controller.error(reason);\n                };\n                options?.signal.addEventListener(\"abort\", abortListener);\n            }\n        },\n        async write(src) {\n            try {\n                throwIfAborted(options?.signal);\n                // bufferSize が 0 以下の場合や src が buffer より大きい場合は buffer を使わずに処理する。\n                if (bufferSize <= 0 ||\n                    (bufferSize <= src.byteLength && options?.strictBufferSize !== true)) {\n                    // buffer に既にデータがある場合、それを処理する。\n                    if (buffer !== null && 0 < bufferOffset) {\n                        const chunk = options?.useBufferView === true\n                            ? buffer.subarray(0, bufferOffset)\n                            : buffer.slice(0, bufferOffset);\n                        throwIfAborted(options?.signal);\n                        await write(chunk);\n                        bufferOffset = 0;\n                    }\n                    throwIfAborted(options?.signal);\n                    await write(mapToArrayBuffer(src));\n                    return;\n                }\n                let srcOffset = 0;\n                while (srcOffset < src.byteLength) {\n                    throwIfAborted(options?.signal);\n                    if (buffer === null) {\n                        buffer = new Uint8Array(bufferSize);\n                    }\n                    const n = Math.min(bufferSize - bufferOffset, src.byteLength - srcOffset);\n                    buffer.set(src.subarray(srcOffset, srcOffset + n), bufferOffset);\n                    bufferOffset += n;\n                    srcOffset += n;\n                    if (bufferOffset === bufferSize) {\n                        throwIfAborted(options?.signal);\n                        const chunk = buffer;\n                        if (options?.useBufferView !== true) {\n                            buffer = null;\n                        }\n                        await write(chunk);\n                        bufferOffset = 0;\n                    }\n                }\n            }\n            catch (e) {\n                const isSignalAbort = isThrownByAbortSignal(e, options?.signal);\n                await cleanup(isSignalAbort ? \"SignalAbort\" : \"Error\", e).catch(() => { });\n                throw e;\n            }\n        },\n        async close() {\n            try {\n                if (0 < bufferOffset && buffer != null) {\n                    const view = buffer.subarray(0, bufferOffset);\n                    buffer = null;\n                    await write(view);\n                }\n                await cleanup(\"Close\");\n            }\n            catch (e) {\n                await cleanup(\"Error\", e).catch(() => { });\n                throw e;\n            }\n        },\n        async abort(reason) {\n            await cleanup(\"Abort\", reason);\n        }\n    });\n}\nlet _isReadableByteStreamAvailable = null;\nfunction isReadableByteStreamAvailable() {\n    if (_isReadableByteStreamAvailable === null) {\n        try {\n            new ReadableStream({ type: \"bytes\" });\n            _isReadableByteStreamAvailable = true;\n        }\n        catch {\n            _isReadableByteStreamAvailable = false;\n        }\n    }\n    return _isReadableByteStreamAvailable;\n}\nfunction throwIfAborted(signal) {\n    if (signal?.aborted === true) {\n        throw (signal?.reason ?? newAbortSignalDefaultError());\n    }\n}\nfunction newAbortSignalDefaultError() {\n    return new DOMException(\"The operation was aborted.\", \"AbortError\");\n}\nfunction isThrownByAbortSignal(err, signal) {\n    return (signal?.aborted === true) &&\n        (err === signal.reason || (err instanceof DOMException && err.name === \"AbortError\"));\n}\nfunction mapToArrayBuffer(buffer) {\n    return buffer.buffer instanceof ArrayBuffer\n        ? buffer\n        : new Uint8Array(buffer);\n}\nfunction requiresSafeUint(num, numName) {\n    const name = numName ?? \"value\";\n    if (!Number.isSafeInteger(num)) {\n        throw new TypeError(`${name} must be a safe integer.`);\n    }\n    if (num < 0) {\n        throw new RangeError(`${name} must be a positive integer.`);\n    }\n}\nfunction requiresNonzeroSafeInt(num, numName) {\n    const name = numName;\n    if (!Number.isSafeInteger(num)) {\n        throw new TypeError(`${name} must be a safe integer.`);\n    }\n    if (num <= 0) {\n        throw new RangeError(`${name} must be a non-zero positive integer.`);\n    }\n}\n\nexport { createBYOBReadableStream, createReadableStream, createWritableStream };\n//# sourceMappingURL=index.js.map\n","import { invoke, convertFileSrc } from '@tauri-apps/api/core';\nimport { createReadableStream, createWritableStream } from 'create-web-stream';\n\n/**\n * Returns whether the Tauri runtime environment is Android.\n *\n * @returns `true` if built for Android; otherwise, `false`.\n *\n * @since 22.0.0\n */\nfunction isAndroid() {\n    const isAndroid = window.__TAURI_ANDROID_FS_PLUGIN_INTERNALS__?.isAndroid;\n    if (isAndroid !== undefined) {\n        return isAndroid;\n    }\n    throw Error(\"tauri-plugin-android-fs may be not set up; see https://github.com/aiueo13/tauri-plugin-android-fs/blob/main/api/README.md\");\n}\nlet cachedApiLevel = null;\n/**\n * Returns {@link https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels | the API level} of the current Android device.\n *\n * @example\n * ```ts\n * import { getAndroidApiLevel, AndroidApiLevel } from 'tauri-plugin-android-fs-api';\n *\n * async function isAndroid10orHigher(): Promise<boolean> {\n * \treturn AndroidApiLevel.ANDROID_10 <= await getAndroidApiLevel()\n * }\n * ```\n *\n * @returns Promise that resolves to the Android API level. This value is constant during the application lifecycle.\n *\n * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_sync/struct.AndroidFs.html#method.api_level | AndroidFs::api_level }\n * @since 24.2.0\n */\nasync function getAndroidApiLevel() {\n    if (!cachedApiLevel) {\n        cachedApiLevel = invoke('plugin:android-fs|get_android_api_level');\n    }\n    return cachedApiLevel;\n}\n/**\n * Android API level.\n *\n * @remarks\n * Tauri does not support Android 7 or lower.\n *\n * @see {@link https://developer.android.com/guide/topics/manifest/uses-sdk-element#api-level-table | Android API level table}\n */\nconst AndroidApiLevel = Object.freeze({\n    ANDROID_7: 24,\n    ANDROID_7_1: 25,\n    ANDROID_8: 26,\n    ANDROID_8_1: 27,\n    ANDROID_9: 28,\n    ANDROID_10: 29,\n    ANDROID_11: 30,\n    ANDROID_12: 31,\n    ANDROID_12_L: 32,\n    ANDROID_13: 33,\n    ANDROID_14: 34,\n    ANDROID_15: 35,\n    ANDROID_16: 36,\n    ANDROID_17: 37,\n});\nfunction mapFsPathForInput(uri) {\n    return uri instanceof URL ? uri.toString() : uri;\n}\n/**\n * Android public directories for general-purpose files.\n */\nconst AndroidPublicGeneralPurposeDir = Object.freeze({\n    /**\n     * `~/Documents` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Documents`\n     * - `/storage/{sd-card-id}/Documents`\n     */\n    Documents: \"Documents\",\n    /**\n     * `~/Download` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Download`\n     * - `/storage/{sd-card-id}/Download`\n     */\n    Download: \"Download\",\n});\n/**\n * Android public directories for image files.\n */\nconst AndroidPublicImageDir = Object.freeze({\n    /**\n     * `~/Pictures` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Pictures`\n     * - `/storage/{sd-card-id}/Pictures`\n     */\n    Pictures: \"Pictures\",\n    /**\n     * `~/DCIM` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/DCIM`\n     * - `/storage/{sd-card-id}/DCIM`\n     */\n    DCIM: \"DCIM\",\n});\n/**\n * Android public directories for video files.\n */\nconst AndroidPublicVideoDir = Object.freeze({\n    /**\n     * `~/Movies` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Movies`\n     * - `/storage/{sd-card-id}/Movies`\n     */\n    Movies: \"Movies\",\n    /**\n     * `~/DCIM` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/DCIM`\n     * - `/storage/{sd-card-id}/DCIM`\n     */\n    DCIM: \"DCIM\",\n});\n/**\n * Android public directories for audio files.\n */\nconst AndroidPublicAudioDir = Object.freeze({\n    /**\n     * `~/Music` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Music`\n     * - `/storage/{sd-card-id}/Music`\n     */\n    Music: \"Music\",\n    /**\n     * `~/Alarms` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Alarms`\n     * - `/storage/{sd-card-id}/Alarms`\n     */\n    Alarms: \"Alarms\",\n    /**\n     * `~/Audiobooks` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Audiobooks`\n     * - `/storage/{sd-card-id}/Audiobooks`\n     *\n     * This is available for Android 10 (API level 29) and higher.\n     * If unavailable, the `~/Music/Audiobooks` folder will be used instead.\n     */\n    Audiobooks: \"Audiobooks\",\n    /**\n     * `~/Notifications` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Notifications`\n     * - `/storage/{sd-card-id}/Notifications`\n     */\n    Notifications: \"Notifications\",\n    /**\n     * `~/Podcasts` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Podcasts`\n     * - `/storage/{sd-card-id}/Podcasts`\n     */\n    Podcasts: \"Podcasts\",\n    /**\n     * `~/Ringtones` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Ringtones`\n     * - `/storage/{sd-card-id}/Ringtones`\n     */\n    Ringtones: \"Ringtones\",\n    /**\n     * `~/Recordings` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Recordings`\n     * - `/storage/{sd-card-id}/Recordings`\n     *\n     * This is available for Android 12 (API level 31) or higher.\n     * If unavailable, the `~/Music/Recordings` folder will be used instead.\n     */\n    Recordings: \"Recordings\",\n});\n/**\n * Android public directories.\n */\nconst AndroidPublicDir = Object.freeze({\n    /**\n     * `~/Documents` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Documents`\n     * - `/storage/{sd-card-id}/Documents`\n     */\n    Documents: \"Documents\",\n    /**\n     * `~/Download` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Download`\n     * - `/storage/{sd-card-id}/Download`\n     */\n    Download: \"Download\",\n    /**\n     * `~/Pictures` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Pictures`\n     * - `/storage/{sd-card-id}/Pictures`\n     */\n    Pictures: \"Pictures\",\n    /**\n     * `~/Movies` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Movies`\n     * - `/storage/{sd-card-id}/Movies`\n     */\n    Movies: \"Movies\",\n    /**\n     * `~/DCIM` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/DCIM`\n     * - `/storage/{sd-card-id}/DCIM`\n     */\n    DCIM: \"DCIM\",\n    /**\n     * `~/Music` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Music`\n     * - `/storage/{sd-card-id}/Music`\n     */\n    Music: \"Music\",\n    /**\n     * `~/Alarms` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Alarms`\n     * - `/storage/{sd-card-id}/Alarms`\n     */\n    Alarms: \"Alarms\",\n    /**\n     * `~/Audiobooks` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Audiobooks`\n     * - `/storage/{sd-card-id}/Audiobooks`\n     *\n     * This is available for Android 10 (API level 29) and higher.\n     * If unavailable, the `~/Music/Audiobooks` folder will be used instead.\n     */\n    Audiobooks: \"Audiobooks\",\n    /**\n     * `~/Notifications` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Notifications`\n     * - `/storage/{sd-card-id}/Notifications`\n     */\n    Notifications: \"Notifications\",\n    /**\n     * `~/Podcasts` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Podcasts`\n     * - `/storage/{sd-card-id}/Podcasts`\n     */\n    Podcasts: \"Podcasts\",\n    /**\n     * `~/Ringtones` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Ringtones`\n     * - `/storage/{sd-card-id}/Ringtones`\n     */\n    Ringtones: \"Ringtones\",\n    /**\n     * `~/Recordings` folder.\n     *\n     * @remarks\n     * This is a subdirectory under the user-visible top-level directory of the storage volume.\n     *\n     * e.g.\n     * - `/storage/emulated/{user-id}/Recordings`\n     * - `/storage/{sd-card-id}/Recordings`\n     *\n     * This is available for Android 12 (API level 31) or higher.\n     * If unavailable, the `~/Music/Recordings` folder will be used instead.\n     */\n    Recordings: \"Recordings\",\n});\n/**\n * State of the URI permission on Android.\n */\nconst AndroidUriPermissionState = Object.freeze({\n    Read: \"Read\",\n    Write: \"Write\",\n    ReadAndWrite: \"ReadAndWrite\",\n    ReadOrWrite: \"ReadOrWrite\"\n});\nfunction mapPickerInitialLocationForInput(i) {\n    if (i == null) {\n        return null;\n    }\n    if (i.type === \"PublicDir\") {\n        return {\n            type: \"PublicDir\",\n            baseDir: i.baseDir,\n            relativePath: i.relativePath ?? null,\n            volumeId: i.volumeId ?? null\n        };\n    }\n    if (i.type === \"VolumeTop\") {\n        return {\n            type: \"VolumeTop\",\n            volumeId: i.volumeId ?? null\n        };\n    }\n    return i;\n}\n/**\n * Initial location when launching File/Directory Picker.\n */\nconst AndroidPickerInitialLocation = Object.freeze({\n    /**\n     * Builds an initial picker location at the specified directory,\n     * or in the directory containing the specified file.\n     *\n     * @param uri - URI of the target entry.\n     */\n    Any(uri) {\n        return {\n            type: \"Any\",\n            uri,\n        };\n    },\n    /**\n     * Builds an initial picker location at the top of the storage volume.\n     *\n     * @param volumeId - ID of the target storage volume. Defaults to {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.get_primary_volume | Primary storage volume}.\n     */\n    VolumeTop(volumeId) {\n        return {\n            type: \"VolumeTop\",\n            volumeId,\n        };\n    },\n    /**\n     * Builds an initial picker location inside the public directory.\n     *\n     * @param baseDir - Target public directory. One of: `\"Documents\"`, `\"Download\"`, `\"Pictures\"`, `\"DCIM\"`, `\"Movies\"`, `\"Music\"`, `\"Alarms\"`, `\"Audiobooks\"`, `\"Notifications\"`, `\"Podcasts\"`, `\"Ringtones\"`, `\"Recordings\"`.\n     * @param options - Optional settings: `relativePath`, `volumeId`. See `AndroidPickerInitialLocationPublicDirOptions` for details.\n     */\n    PublicDir(baseDir, options) {\n        return {\n            type: \"PublicDir\",\n            baseDir,\n            relativePath: options?.relativePath,\n            volumeId: options?.volumeId\n        };\n    },\n});\nconst AndroidProgressNotificationIconType = Object.freeze({\n    /**\n     * Application icon\n     */\n    App: \"App\",\n    /**\n     * Download icon\n     */\n    Download: \"Download\",\n    /**\n     * Upload icon\n     */\n    Upload: \"Upload\",\n    /**\n     * Save icon\n     */\n    Save: \"Save\",\n});\nconst AndroidProgressNotificationTemplate = Object.freeze({\n    /**\n     * Default application notification settings.\n     */\n    Default: Object.freeze({\n        icon: AndroidProgressNotificationIconType.App,\n        title: \"{{fileName}}\",\n        subTextProgress: \"{{progress}}\",\n        subTextCompletion: \"{{progress}}\"\n    }),\n    /**\n     * Default download notification settings.\n     */\n    DefaultDownload: Object.freeze({\n        icon: AndroidProgressNotificationIconType.Download,\n        title: \"{{fileName}}\",\n        subTextProgress: \"{{progress}}\",\n        subTextCompletion: \"{{progress}}\"\n    }),\n    /**\n     * Default upload notification settings.\n     */\n    DefaultUpload: Object.freeze({\n        icon: AndroidProgressNotificationIconType.Upload,\n        title: \"{{fileName}}\",\n        subTextProgress: \"{{progress}}\",\n        subTextCompletion: \"{{progress}}\"\n    }),\n    /**\n     * Default save notification settings.\n     */\n    DefaultSave: Object.freeze({\n        icon: AndroidProgressNotificationIconType.Save,\n        title: \"{{fileName}}\",\n        subTextProgress: \"{{progress}}\",\n        subTextCompletion: \"{{progress}}\"\n    }),\n});\nclass AndroidFs {\n    constructor() { }\n    /**\n     * Gets the name of a file or directory.\n     *\n     * @remarks\n     * Includes the file extension if present.\n     *\n     * @param uri - URI or path of the target file or directory.\n     *\n     * @returns Promise that resolves to the name of the entry.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry does not exist.\n     * - When the app does not have read permissions for the entry.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_name | AndroidFs::get_name}\n     * @since 22.0.0\n     */\n    static async getName(uri) {\n        return await invoke('plugin:android-fs|get_name', {\n            uri: mapFsPathForInput(uri)\n        });\n    }\n    /**\n     * Gets the file size in bytes of a file.\n     *\n     * @param uri - URI or path of the target file.\n     *\n     * @returns Promise that resolves to a non-negative integer representing the file size in bytes.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_len | AndroidFs::get_len}\n     * @since 22.2.0\n     */\n    static async getByteLength(uri) {\n        return await invoke('plugin:android-fs|get_byte_length', {\n            uri: mapFsPathForInput(uri)\n        });\n    }\n    /**\n     * Gets the type of a file or directory.\n     *\n     * @param uri - URI or path of the target file or directory.\n     *\n     * @returns Promise that resolves to the type of the entry. The resolved value will be an object of type `AndroidEntryType`, which can be either `{ type: \"Dir\" }` for directories or `{ type: \"File\", mimeType: string }` for files.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry does not exist.\n     * - When the app does not have read permissions for the entry.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_type | AndroidFs::get_type}\n     * @since 22.0.0\n     */\n    static async getType(uri) {\n        return await invoke('plugin:android-fs|get_type', {\n            uri: mapFsPathForInput(uri)\n        });\n    }\n    /**\n     * Gets the MIME type of a file.\n     *\n     * @param uri - URI or path of the target file.\n     *\n     * @returns Promise that resolves to the MIME type of the file.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_mime_type | AndroidFs::get_mime_type}\n     * @since 22.0.0\n     */\n    static async getMimeType(uri) {\n        return await invoke('plugin:android-fs|get_mime_type', {\n            uri: mapFsPathForInput(uri)\n        });\n    }\n    /**\n     * Gets metadata of a file or directory.\n     *\n     * @param uri - URI or path of the target file or directory.\n     *\n     * @returns Promise that resolves to metadata of the entry. It includes the type (`\"Dir\"` or `\"File\"`), name, last modified date, and for files also byte length and MIME type.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry does not exist.\n     * - When the app does not have read permissions for the entry.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_info | AndroidFs::get_info}\n     * @since 22.0.0\n     */\n    static async getMetadata(uri) {\n        let md = await invoke('plugin:android-fs|get_metadata', {\n            uri: mapFsPathForInput(uri)\n        });\n        const lastModified = new Date(md.lastModified);\n        return md.type === \"Dir\"\n            ? { type: \"Dir\", name: md.name, lastModified, }\n            : { type: \"File\", name: md.name, lastModified, byteLength: md.byteLength, mimeType: md.mimeType };\n    }\n    /**\n     * Gets the thumbnail of a file as the Data URL.\n     *\n     * @remarks\n     * This does not perform caching.\n     *\n     * @param uri - URI or path of the target file.\n     * @param width - Preferred thumbnail width in pixels.\n     * @param height - Preferred thumbnail height in pixels.\n     * @param options - Optional settings: `format`. See `AndroidGetThumbnailOptions` for details.\n     *\n     * @returns Promise that resolves to a Data URL string of the thumbnail, or `null` if none exists. The actual dimensions will not exceed approximately twice the specified width or height, while always maintaining the original aspect ratio.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_thumbnail | AndroidFs::get_thumbnail}\n     * @since 26.1.0\n     */\n    static async getThumbnailAsDataURL(uri, width, height, options) {\n        const format = options?.format ?? \"jpeg\";\n        const thumbnail = await invoke('plugin:android-fs|get_thumbnail_as_data_url', {\n            uri: mapFsPathForInput(uri),\n            width,\n            height,\n            format\n        });\n        return thumbnail.byteLength === 0 ? null : decodeUtf8(thumbnail);\n    }\n    /**\n     * Gets the thumbnail of a file as the base64-encoded string.\n     *\n     * @remarks\n     * This does not perform caching.\n     *\n     * @param uri - URI or path of the target file.\n     * @param width - Preferred thumbnail width in pixels.\n     * @param height - Preferred thumbnail height in pixels.\n     * @param options - Optional settings: `format`. See `AndroidGetThumbnailOptions` for details.\n     *\n     * @returns Promise that resolves to a base64-encoded string of the thumbnail, or `null` if none exists. The actual dimensions will not exceed approximately twice the specified width or height, while always maintaining the original aspect ratio.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_thumbnail | AndroidFs::get_thumbnail}\n     * @since 26.1.0\n     */\n    static async getThumbnailAsBase64(uri, width, height, options) {\n        const format = options?.format ?? \"jpeg\";\n        const thumbnail = await invoke('plugin:android-fs|get_thumbnail_as_base64', {\n            uri: mapFsPathForInput(uri),\n            width,\n            height,\n            format\n        });\n        return thumbnail.byteLength === 0 ? null : decodeUtf8(thumbnail);\n    }\n    /**\n     * Gets the thumbnail of a file as bytes.\n     *\n     * @remarks\n     * This does not perform caching.\n     *\n     * @param uri - URI or path of the target file.\n     * @param width - Preferred thumbnail width in pixels.\n     * @param height - Preferred thumbnail height in pixels.\n     * @param options - Optional settings: `format`. See `AndroidGetThumbnailOptions` for details.\n     *\n     * @returns Promise that resolves to bytes of the thumbnail, or `null` if none exists. The actual dimensions will not exceed approximately twice the specified width or height, while always maintaining the original aspect ratio.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_thumbnail | AndroidFs::get_thumbnail}\n     * @since 26.1.0\n     */\n    static async getThumbnailAsBytes(uri, width, height, options) {\n        const format = options?.format ?? \"jpeg\";\n        const thumbnail = await invoke('plugin:android-fs|get_thumbnail_as_bytes', {\n            uri: mapFsPathForInput(uri),\n            width,\n            height,\n            format\n        });\n        return thumbnail.byteLength === 0 ? null : new Uint8Array(thumbnail);\n    }\n    /**\n     * Gets the thumbnail of a file as bytes.\n     *\n     * @remarks\n     * This does not perform caching.\n     *\n     * @param uri - URI or path of the target file.\n     * @param width - Preferred thumbnail width in pixels.\n     * @param height - Preferred thumbnail height in pixels.\n     * @param options - Optional settings: `format`. See `AndroidGetThumbnailOptions` for details.\n     *\n     * @returns Promise that resolves to bytes of the thumbnail, or `null` if none exists. The actual dimensions will not exceed approximately twice the specified width or height, while always maintaining the original aspect ratio.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_thumbnail | AndroidFs::get_thumbnail}\n     * @since 26.1.0\n     */\n    static async getThumbnail(uri, width, height, options) {\n        const format = options?.format ?? \"jpeg\";\n        const thumbnail = await invoke('plugin:android-fs|get_thumbnail', {\n            uri: mapFsPathForInput(uri),\n            width,\n            height,\n            format\n        });\n        return thumbnail.byteLength === 0 ? null : thumbnail;\n    }\n    /**\n     * Gets the path usable with {@link https://v2.tauri.app/ja/plugin/file-system/ | @tauri-apps/plugin-fs}.\n     *\n     * @remarks\n     * Paths **derived from this plugin's URI** are supported only for reading and writing files.\n     * No guarantees are provided for other operations or directory handling.\n     * For these paths, you do not need to configure {@link https://v2.tauri.app/reference/javascript/fs/#security | the scope configuration} of the Tauri file system.\n     *\n     * Caution is required when using `@tauri-apps/plugin-fs` for file operations.\n     * Writing files can occasionally be very slow.\n     * Additionally, files obtained from third-party apps via a file picker may not be openable, readable, writable, or seekable.\n     *\n     * Therefore, it is strongly recommended to use the dedicated APIs provided by this plugin instead.\n     *\n     * @param uri - URI or path of the target file or directory.\n     * @returns Promise that resolves to the path. Note that while it is called a \"path\", it may actually be a URI that is compatible with `@tauri-apps/plugin-fs`.\n     *\n     * @since 22.0.0\n     */\n    static async getFsPath(uri) {\n        return await invoke('plugin:android-fs|get_fs_path', {\n            uri: mapFsPathForInput(uri)\n        });\n    }\n    /**\n     * Converts a file URI into a URL that can be used to load thumbnails in HTML `<img>` elements.\n     *\n     * @remarks\n     * This is backed by Tauri’s custom protocol.\n     *\n     * ## Setup\n     * This function only constructs a URL.\n     * To actually load a file using the returned URL, follow the steps below.\n     *\n     * #### 1. Enable protocol feature\n     * Enable protocol_thumbnail feature.\n     *\n     * `src-tauri/Cargo.toml`\n     * ```toml\n     * [dependencies]\n     * tauri-plugin-android-fs = { features = [\"protocol_thumbnail\"], ... }\n     * ```\n     *\n     * #### 2. Configuration\n     * Set the configuration to allow files to be loaded.\n     * If you are using absolute paths, you must configure the scope as with other APIs.\n     *\n     * `src-tauri/tauri.conf.json`\n     * ```json\n     * {\n     *   \"plugins\": {\n     *     \"android-fs\": {\n     *       \"thumbnailProtocol\": {\n     *         \"enable\": true,\n     *         \"scope\": {\n     *           \"allow\": [\"$APPDATA/my-data/*\"],\n     *         }\n     *       }\n     *     }\n     *   }\n     * }\n     * ```\n     *\n     * NOTE:\n     * Ensure that `serde_json` is present in your Rust dependencies.\n     * It is included by default in Tauri project templates, but if it has been removed, add it back.\n     * If it is missing, the project will fail to build.\n     *\n     * #### 3. Content Security Policy (CSP)\n     * If you are using a CSP,\n     * add `http://android-fs-thumbnail.localhost` to {@link https://v2.tauri.app/reference/config/#csp-1 | app.security.csp} in `src-tauri/tauri.conf.json`.\n     *\n     * @param uri - URI or path of the target file.\n     * @param options - Optional settings: `width`, `height`, `format`. See `AndroidConvertThumbnailSrcOptions` for details.\n     *\n     * @since 27.2.0\n     */\n    static convertThumbnailSrc(uri, options) {\n        let srcUrl = convertFileSrc(JSON.stringify(mapFsPathForInput(uri)), \"android-fs-thumbnail\");\n        let sep = \"?\";\n        if (options?.width != null) {\n            srcUrl += sep + \"w=\" + options.width;\n            sep = \"&\";\n        }\n        if (options?.height != null) {\n            srcUrl += sep + \"h=\" + options.height;\n            sep = \"&\";\n        }\n        if (options?.format != null) {\n            srcUrl += sep + \"f=\" + options?.format;\n            sep = \"&\";\n        }\n        return srcUrl;\n    }\n    /**\n     * Converts a file URI into a URL that can be loaded by HTML `<img>`, `<video>`, and `<audio>` elements.\n     *\n     * @remarks\n     * This is backed by Tauri’s custom protocol.\n     *\n     * ## Setup\n     * This function only constructs a URL.\n     * To actually load a file using the returned URL, follow the steps below.\n     *\n     * #### 1. Enable protocol feature\n     * Enable protocol_content feature.\n     *\n     * `src-tauri/Cargo.toml`\n     * ```toml\n     * [dependencies]\n     * tauri-plugin-android-fs = { features = [\"protocol_content\"], ... }\n     * ```\n     *\n     * #### 2. Configuration\n     * Set the configuration to allow files to be loaded.\n     * If you are using absolute paths, you must configure the scope as with other APIs.\n     *\n     * `src-tauri/tauri.conf.json`\n     * ```json\n     * {\n     *   \"plugins\": {\n     *     \"android-fs\": {\n     *       \"contentProtocol\": {\n     *         \"enable\": true,\n     *         \"scope\": {\n     *           \"allow\": [\"$APPDATA/my-data/*\"],\n     *         }\n     *       }\n     *     }\n     *   }\n     * }\n     * ```\n     *\n     * NOTE:\n     * Ensure that `serde_json` is present in your Rust dependencies.\n     * It is included by default in Tauri project templates, but if it has been removed, add it back.\n     * If it is missing, the project will fail to build.\n     *\n     * #### 3. Content Security Policy (CSP)\n     * If you are using a CSP,\n     * add `http://android-fs-content.localhost` to {@link https://v2.tauri.app/reference/config/#csp-1 | app.security.csp} in `src-tauri/tauri.conf.json`.\n     *\n     *\n     * ## Known Issues (As of June 15, 2026)\n     * File loading may fail.\n     * This issue occurs frequently with `<video>` and `<audio>` elements, but is not limited to them,\n     * because Tauri’s custom protocol currently {@link https://github.com/tauri-apps/tauri/issues/12019 | cannot handle range requests on Android}.\n     * As a workaround, you can host your own local server on the backend.\n     *\n     * @param uri - URI or path of the target file.\n     *\n     * @since 27.2.0\n     */\n    static convertFileSrc(uri) {\n        return convertFileSrc(JSON.stringify(mapFsPathForInput(uri)), \"android-fs-content\");\n    }\n    /**\n     * Retrieves information about available Android storage volumes (e.g., internal storage, SD cards, or USB drives).\n     *\n     * @param options - Optional settings.\n     * @param options.purpose - Purpose of the storage volumes. One of: `\"CreatePublicFile\"`, `\"PickerInitialLocation\"`. By default, only volumes that are available for both purposes are listed.\n     *\n     * @returns Promise that resolves to an array of the storage volumes.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_volumes | AndroidFs::get_volumes}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.get_volumes | PublicStorage::get_volumes}\n     *\n     * @since 22.2.0\n     */\n    static async listVolumes(options) {\n        const purpose = options?.purpose;\n        const volumes = await invoke('plugin:android-fs|list_volumes');\n        if (purpose == null || purpose === \"CreatePublicFile\") {\n            return volumes\n                .filter(v => !v.isReadOnly)\n                .filter(v => v.isAvailableForPublicFiles);\n        }\n        else {\n            return volumes;\n        }\n    }\n    /**\n     * Requests permission from the user to create public files and access them.\n     *\n     * @remarks\n     * This is intended for `AndroidFs.createNewPublicFile` and its related functions.\n     * However, since those functions automatically request permission by default, calling this method explicitly is usually unnecessary.\n     *\n     * @returns Promise that resolves to a boolean indicating whether the app is allowed to create files in public storage and access them.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.request_permission | PublicStorage::request_permission}\n     * @since 22.0.0\n     */\n    static async requestPublicFilesPermission() {\n        return await invoke('plugin:android-fs|request_public_files_permission');\n    }\n    /**\n     * Checks whether the app has permission to create public files and access them.\n     *\n     * @remarks\n     * The app can request this permission explicitly using {@link AndroidFs.requestPublicFilesPermission}.\n     *\n     * @returns Promise that resolves to a boolean indicating whether the app is allowed to create files in public storage and access them.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.check_permission | PublicStorage::check_permission}\n     * @since 27.1.0\n     */\n    static async checkPublicFilesPermission() {\n        return await invoke('plugin:android-fs|check_public_files_permission');\n    }\n    /**\n     * Triggers the Android MediaScanner to scan a public file,\n     * making it visible in media applications (e.g., Gallery, Music player).\n     *\n     * @param uri - URI of the file to be scanned.\n     * @returns Promise that resolves when the scan request has been successfully initiated.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When a provider of the file is not the Android MediaStore.\n     * - When the app does not have read/write permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.scan | PublicStorage::scan}\n     * @since 22.0.0\n     */\n    static async scanPublicFile(uri) {\n        return await invoke('plugin:android-fs|scan_public_file', {\n            uri,\n        });\n    }\n    /**\n     * Specifies whether a public file is marked as pending.\n     *\n     * @remarks\n     * This is available for Android 11 (API level 30) or higher.\n     * If unavailable, this does nothing.\n     *\n     * @param uri - URI of the target file.\n     * @param isPending - Indicates whether the file is pending. When `true`, the app has exclusive access and the file is invisible to others. Files pending for over 7 days are automatically deleted by the Android system.\n     *\n     * @returns Promise that resolves when the operation is completed.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When a provider of the file is not the Android MediaStore.\n     * - When the app does not have read/write permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.set_pending | PublicStorage::set_pending}\n     * @since 25.0.0\n     */\n    static async setPublicFilePending(uri, isPending) {\n        return await invoke('plugin:android-fs|set_public_file_pending', {\n            uri,\n            isPending\n        });\n    }\n    /**\n     * Creates a new empty file in a public directory\n     *\n     * @param baseDir - Base directory in which to create the new file. One of: `\"Documents\"`, `\"Download\"`.\n     * @param relativePath - Relative path from the base directory. If a file with the same name already exists, a sequential number is appended to ensure uniqueness. Any missing directories in this path will be created recursively.\n     * @param mimeType - MIME type of the file to create. If `null`, it is inferred from the extension of `relativePath`.\n     * @param options - Optional settings: `requestPermission`, `volumeId`, `isPending`. See `AndroidCreateNewPublicFileOptions` for details.\n     *\n     * @returns Promise that resolves to a URI of the created file, with persisted read/write permissions that depend on `AndroidFs.checkPublicFilesPermission`.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the storage volume is currently unavailable\n     * - When the app does not have read/write permissions for the public files.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.create_new_file | PublicStorage::create_new_file}\n     * @since 22.0.0\n     */\n    static async createNewPublicFile(baseDir, relativePath, mimeType, options) {\n        const requestPermission = options?.requestPermission ?? true;\n        const volumeId = options?.volumeId ?? null;\n        const isPending = options?.isPending ?? false;\n        return await invoke('plugin:android-fs|create_new_public_file', {\n            volumeId,\n            baseDir,\n            relativePath,\n            mimeType,\n            requestPermission,\n            isPending\n        });\n    }\n    /**\n     * Creates a new empty image file in a public directory\n     *\n     * @param baseDir - Base directory in which to create the new file. One of: `\"Pictures\"`, `\"DCIM\"`, `\"Documents\"`, `\"Download\"`.\n     * @param relativePath - Relative path from the base directory. If a file with the same name already exists, a sequential number is appended to ensure uniqueness. Any missing directories in this path will be created recursively.\n     * @param mimeType - MIME type of the file to create. If `null`, it is inferred from the extension of `relativePath`.\n     * @param options - Optional settings: `requestPermission`, `volumeId`, `isPending`. See `AndroidCreateNewPublicFileOptions` for details.\n     *\n     * @returns Promise that resolves to a URI of the created file, with persisted read/write permissions that depend on `AndroidFs.checkPublicFilesPermission`.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the storage volume is currently unavailable\n     * - When the app does not have read/write permissions for the public files.\n     * - When the MIME type is not an image type.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.create_new_file | PublicStorage::create_new_file}\n     * @since 22.0.0\n     */\n    static async createNewPublicImageFile(baseDir, relativePath, mimeType, options) {\n        const requestPermission = options?.requestPermission ?? true;\n        const volumeId = options?.volumeId ?? null;\n        const isPending = options?.isPending ?? false;\n        return await invoke('plugin:android-fs|create_new_public_image_file', {\n            volumeId,\n            baseDir,\n            relativePath,\n            mimeType,\n            requestPermission,\n            isPending\n        });\n    }\n    /**\n     * Creates a new empty video file in a public directory\n     *\n     * @param baseDir - Base directory in which to create the new file. One of: `\"Movies\"`, `\"DCIM\"`, `\"Documents\"`, `\"Download\"`.\n     * @param relativePath - Relative path from the base directory. If a file with the same name already exists, a sequential number is appended to ensure uniqueness. Any missing directories in this path will be created recursively.\n     * @param mimeType - MIME type of the file to create. If `null`, it is inferred from the extension of `relativePath`.\n     * @param options - Optional settings: `requestPermission`, `volumeId`, `isPending`. See `AndroidCreateNewPublicFileOptions` for details.\n     *\n     * @returns Promise that resolves to a URI of the created file, with persisted read/write permissions that depend on `AndroidFs.checkPublicFilesPermission`.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the storage volume is currently unavailable\n     * - When the app does not have read/write permissions for the public files.\n     * - When the MIME type is not a video type.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.create_new_file | PublicStorage::create_new_file}\n     * @since 22.0.0\n     */\n    static async createNewPublicVideoFile(baseDir, relativePath, mimeType, options) {\n        const requestPermission = options?.requestPermission ?? true;\n        const volumeId = options?.volumeId ?? null;\n        const isPending = options?.isPending ?? false;\n        return await invoke('plugin:android-fs|create_new_public_video_file', {\n            volumeId,\n            baseDir,\n            relativePath,\n            mimeType,\n            requestPermission,\n            isPending\n        });\n    }\n    /**\n     * Creates a new empty audio file in a public directory.\n     *\n     * @param baseDir - Base directory in which to create the new file. One of: `\"Music\"`, `\"Alarms\"`, `\"Audiobooks\"`, `\"Notifications\"`, `\"Podcasts\"`, `\"Ringtones\"`, `\"Recordings\"`, `\"Documents\"`, `\"Download\"`.\n     * @param relativePath - Relative path from the base directory. If a file with the same name already exists, a sequential number is appended to ensure uniqueness. Any missing directories in this path will be created recursively.\n     * @param mimeType - MIME type of the file to create. If `null`, it is inferred from the extension of `relativePath`.\n     * @param options - Optional settings: `requestPermission`, `volumeId`, `isPending`. See `AndroidCreateNewPublicFileOptions` for details.\n     *\n     * @returns Promise that resolves to a URI of the created file, with persisted read/write permissions that depend on `AndroidFs.checkPublicFilesPermission`.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the storage volume is currently unavailable\n     * - When the app does not have read/write permissions for the public files.\n     * - When the MIME type is not an audio type.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.PublicStorage.html#method.create_new_file | PublicStorage::create_new_file}\n     * @since 22.0.0\n     */\n    static async createNewPublicAudioFile(baseDir, relativePath, mimeType, options) {\n        const requestPermission = options?.requestPermission ?? true;\n        const volumeId = options?.volumeId ?? null;\n        const isPending = options?.isPending ?? false;\n        return await invoke('plugin:android-fs|create_new_public_audio_file', {\n            volumeId,\n            baseDir,\n            relativePath,\n            mimeType,\n            requestPermission,\n            isPending\n        });\n    }\n    /**\n     * Creates a new empty file in a directory.\n     *\n     * @param baseDirUri - URI of the base directory in which to create the new file.\n     * @param relativePath - Relative path from the base directory. If an entry with the same name already exists, a sequential number is appended to ensure uniqueness. Any missing parent directories in this path will be created recursively.\n     * @param mimeType - MIME type of the file to create. If `null`, it is inferred from the extension of `relativePath`.\n     *\n     * @returns Promise that resolves to a URI of the created file, with permissions that depend on the base directory.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the base directory is a file, not a directory.\n     * - When the base directory does not exist.\n     * - When the app does not have read/write permissions for the base directory.\n     * - When a provider of the base directory via Directory Picker does not support the create-file or read-directory operations.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.create_new_file | AndroidFs::create_new_file}\n     * @since 22.0.0\n     */\n    static async createNewFile(baseDirUri, relativePath, mimeType) {\n        return await invoke('plugin:android-fs|create_new_file', {\n            baseDirUri,\n            relativePath,\n            mimeType,\n        });\n    }\n    /**\n     * Creates a new directory in a directory.\n     *\n     * @param baseDirUri - URI of the base directory in which to create the new directory.\n     * @param relativePath - Relative path from the base directory. If an entry with the same name already exists, a sequential number is appended to ensure uniqueness. Any missing parent directories in this path will be created recursively.\n     * @param mimeType - MIME type of the directory to create. If `null`, it is inferred from the extension of `relativePath`.\n     *\n     * @returns Promise that resolves to a URI of the created directory, with permissions that depend on the base directory.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the base directory is a file, not a directory.\n     * - When the base directory does not exist.\n     * - When the app does not have read/write permissions for the base directory.\n     * - When a provider of the base directory via Directory Picker does not support the create-directory or read-directory operations.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.create_new_dir | AndroidFs::create_new_dir}\n     * @since 28.2.0\n     */\n    static async createNewDir(baseDirUri, relativePath) {\n        return await invoke('plugin:android-fs|create_new_dir', {\n            baseDirUri,\n            relativePath,\n        });\n    }\n    /**\n     * Creates a new directory in a directory if missing.\n     *\n     * @remarks\n     * If the directory already exists, returns the existing directory URI.\n     *\n     * @param baseDirUri - URI of the base directory in which to create the directory.\n     * @param relativePath - Relative path from the base directory. Any missing parent directories in this path will be created recursively.\n     *\n     * @returns Promise that resolves to a URI of the created or existing directory. The permissions depend on the base directory.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the base directory is a file, not a directory.\n     * - When the base directory does not exist.\n     * - When the app does not have read/write permissions for the base directory.\n     * - When a provider of the base directory via Directory Picker does not support the create-directory or read-directory operations.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.create_dir_all | AndroidFs::create_dir_all}\n     * @since 26.1.0\n     */\n    static async createDir(baseDirUri, relativePath) {\n        return await invoke('plugin:android-fs|create_dir', {\n            baseDirUri,\n            relativePath,\n        });\n    }\n    /**\n     * Opens a file in read mode and resolves to a {@link https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream | ReadableStream}.\n     *\n     * @remarks\n     * The caller is responsible for releasing the returned stream.\n     * The stream is released in the following cases:\n     * - When the stream or its reader is canceled.\n     * - When all data has been successfully read from the stream.\n     * - When a read operation fails with an error.\n     * - When an abort event is received from the provided `AbortSignal`.\n     * - When `AndroidFs.closeAllFileStreams` is called.\n     *\n     * The stream provides a {@link https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader | ReadableStreamDefaultReader}\n     * and a {@link https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader | ReadableStreamBYOBReader}.\n     *\n     * There is also {@link https://crates.io/crates/tauri-plugin-fs-stream | tauri-plugin-fs-stream}, which provides APIs not only for Android but for all platforms.\n     *\n     * @param uri - URI or path of the file to read.\n     * @param options - Optional settings: `bufferByteLength`, `signal`. See `AndroidOpenReadFileStreamOptions` for details.\n     *\n     * @returns Promise that resolves to a `ReadableStream<Uint8Array<ArrayBuffer>>` backed by the file opened in read-only mode. This stream maintains a one-to-one correspondence with the file descriptor.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file_readable | AndroidFs::open_file_readable}\n     * @since 25.1.0\n     */\n    static async openReadFileStream(uri, options) {\n        throwIfAborted(options?.signal);\n        const bufferByteLength = mapBufferByteLengthForInput(options?.bufferByteLength);\n        const { open, read, close } = resolveCmdReadFileStream(\"plugin:android-fs|open_read_file_stream\");\n        try {\n            await open({\n                uri: mapFsPathForInput(uri)\n            });\n            return createReadableStream({\n                read: () => read(bufferByteLength),\n                release: () => close()\n            }, { signal: options?.signal });\n        }\n        catch (e) {\n            await close().catch(() => { });\n            throw e;\n        }\n    }\n    /**\n     * Opens a file in read mode and resolves to a {@link https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream | ReadableStream} of text lines.\n     *\n     * @remarks\n     * The returned stream yields decoded text line by line.\n     * For the structure of each item, see `AndroidOpenReadTextFileLinesStreamItem`.\n     *\n     * The caller is responsible for releasing the stream.\n     * The stream is released in the following cases:\n     * - When the stream or its reader is canceled.\n     * - When all data has been successfully read from the stream.\n     * - When a read operation fails with an error.\n     * - When an abort event is received from the provided `AbortSignal`.\n     * - When `AndroidFs.closeAllFileStreams` is called.\n     *\n     * There is also {@link https://crates.io/crates/tauri-plugin-fs-stream | tauri-plugin-fs-stream}, which provides APIs not only for Android but for all platforms.\n     *\n     * @param uri - URI or path of the file to read.\n     * @param options - Optional settings: `encoding`, `fatal`, `ignoreBOM`, `maxLineByteLength`, `bufferByteLength`, `signal`. See `AndroidOpenReadTextFileLinesStreamOptions` for details.\n     *\n     * @returns Promise that resolves to a `ReadableStream<AndroidOpenReadTextFileLinesStreamItem>` backed by the file opened in read-only mode. This stream maintains a one-to-one correspondence with the file descriptor.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file_readable | AndroidFs::open_file_readable}\n     * @since 25.1.0\n     */\n    static async openReadTextFileLinesStream(uri, options) {\n        throwIfAborted(options?.signal);\n        const maxLineByteLength = mapMaxLineByteLength(options?.maxLineByteLength);\n        const bufferByteLength = mapBufferByteLengthForInput(options?.bufferByteLength);\n        const label = mapEncodingLabelForInput(options?.encoding);\n        const fatal = options?.fatal ?? false;\n        const ignoreBOM = options?.ignoreBOM ?? false;\n        const { open, read, close } = resolveCmdReadFileStream(\"plugin:android-fs|open_read_text_file_lines_stream\");\n        try {\n            await open({\n                uri: mapFsPathForInput(uri),\n                label,\n                maxLineByteLength,\n                ignoreBOM\n            });\n            return createTextLinesReadableStream({\n                read: () => read(bufferByteLength),\n                release: close\n            }, { label, fatal }, options?.signal);\n        }\n        catch (e) {\n            await close().catch(() => { });\n            throw e;\n        }\n    }\n    /**\n     * Opens a file in write mode and resolves to a {@link https://developer.mozilla.org/en-US/docs/Web/API/WritableStream | WritableStream}.\n     *\n     * @remarks\n     * The caller is responsible for releasing the returned stream.\n     * The stream is released in the following cases:\n     * - When the stream or its writer is closed.\n     * - When the stream or its writer is aborted.\n     * - When a write operation fails with an error.\n     * - When an abort event is received from the provided `AbortSignal`.\n     * - When `AndroidFs.closeAllFileStreams` is called.\n     *\n     * There is also {@link https://crates.io/crates/tauri-plugin-fs-stream | tauri-plugin-fs-stream}, which provides APIs not only for Android but for all platforms.\n     *\n     * @param uri - URI or path of the file to be written.\n     * @param options - Optional settings: `append`, `create`, `bufferByteLength`, `signal`, `notification`. See `AndroidOpenWriteFileStreamOptions` for details.\n     *\n     * @returns Promise that resolves to a `WritableStream<Uint8Array<ArrayBufferLike>>` backed by the file opened in write mode. This stream maintains a one-to-one correspondence with the file descriptor.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the app does not have write permissions for the file.\n     * - When `options.create` is `false` or a URI is specified, and the file does not exist.\n     * - When `options.append` is `true`, and a provider of the file via File/Directory Picker does not support append mode.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file_writable | AndroidFs::open_file_writable}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file | AndroidFs::open_file}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/enum.FileAccessMode.html#variant.WriteAppend | AndroidFs::FileAccessMode::WriteAppend}\n     *\n     * @since 25.1.0\n     */\n    static async openWriteFileStream(uri, options) {\n        throwIfAborted(options?.signal);\n        const bufferByteLength = mapBufferByteLengthForInput(options?.bufferByteLength);\n        const { open, write, close } = resolveCmdWriteFileStream(\"plugin:android-fs|open_write_file_stream\");\n        try {\n            await open({\n                uri: mapFsPathForInput(uri),\n                append: options?.append ?? false,\n                create: options?.create ?? true,\n                notification: options?.notification ?? null\n            });\n            return createWritableStream({\n                write,\n                release: (t) => close(t === \"Close\" ? \"Ok\" : \"Err\")\n            }, {\n                signal: options?.signal,\n                bufferSize: bufferByteLength,\n                strictBufferSize: false,\n                useBufferView: true,\n            });\n        }\n        catch (e) {\n            await close(\"Err\").catch(() => { });\n            throw e;\n        }\n    }\n    /**\n     * Forcibly disposes of all file streams.\n     *\n     * @remarks\n     * All backend file resources owned by stream instances\n     * created by this plugin are disconnected from the frontend and released.\n     *\n     * After this operation,\n     * any read or write attempts on existing streams will result in an error,\n     * except for buffering in the frontend\n     *\n     * This affects streams created by the following methods:\n     * - `AndroidFs.openReadFileStream`\n     * - `AndroidFs.openReadTextFileLinesStream`\n     * - `AndroidFs.openWriteFileStream`\n     *\n     * This is intended for debugging or testing.\n     * Instead, use the stream's APIs or abort the associated {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @since 26.0.0\n     */\n    static async closeAllFileStreams() {\n        await invoke(\"plugin:android-fs|close_all_file_streams\");\n    }\n    /**\n     * Retrieves the number of currently active file streams.\n     *\n     * @remarks\n     * This counts all backend file resources owned by stream instances created by this plugin\n     * that have not yet been disconnected from the frontend and released.\n     *\n     * This applies to streams created by the following methods:\n     * - `AndroidFs.openReadFileStream`\n     * - `AndroidFs.openReadTextFileLinesStream`\n     * - `AndroidFs.openWriteFileStream`\n     *\n     * @returns Promise that resolves to a number of currently active file streams.\n     *\n     * @since 26.0.0\n     */\n    static async countAllFileStreams() {\n        return await invoke(\"plugin:android-fs|count_all_file_streams\");\n    }\n    /**\n     * Reads the entire file contents as raw bytes.\n     *\n     * @param uri - URI or path of the target file.\n     *\n     * @returns Promise that resolves to a `Uint8Array<ArrayBuffer>` containing the entire file contents.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.read_file | AndroidFs::read_file}\n     * @since 25.1.0\n     */\n    static async readFile(uri) {\n        const bytes = await invoke('plugin:android-fs|read_file', {\n            uri: mapFsPathForInput(uri),\n        });\n        return new Uint8Array(bytes);\n    }\n    /**\n     * Reads the entire file contents as a {@link https://developer.mozilla.org/en-US/docs/Glossary/Base64 | Base64-encoded string}.\n     *\n     * @param uri - URI or path of the target file.\n     *\n     * @returns Promise that resolves to a Base64-encoded string representing the entire file contents.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.read_file | AndroidFs::read_file}\n     * @since 26.1.0\n     */\n    static async readFileAsBase64(uri) {\n        const base64 = await invoke('plugin:android-fs|read_file_as_base64', {\n            uri: mapFsPathForInput(uri),\n        });\n        return decodeUtf8(base64);\n    }\n    /**\n     * Reads the entire file contents as a {@link https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data | Data URL}.\n     *\n     * @param uri - URI or path of the target file.\n     * @param options - Optional settings: `mimeType`. See `AndroidReadFileAsDataUrlOptions` for details.\n     *\n     * @returns Promise that resolves to a Data URL string representing the entire file contents.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.read_file | AndroidFs::read_file}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.get_mime_type | AndroidFs::get_mime_type}\n     * @since 26.1.0\n     */\n    static async readFileAsDataURL(uri, options) {\n        const mimeType = options?.mimeType ?? null;\n        const dataUrl = await invoke('plugin:android-fs|read_file_as_data_url', {\n            uri: mapFsPathForInput(uri),\n            mimeType\n        });\n        return decodeUtf8(dataUrl);\n    }\n    /**\n     * Reads the entire contents of a file and decodes it as text.\n     *\n     * @param uri - URI or file path of the target file.\n     * @param options - Optional settings: `encoding`, `fatal`, `ignoreBOM`. See `AndroidReadTextFileOptions` for details.\n     *\n     * @returns Promise that resolves to a decoded text representing the entire file contents.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have read permissions for the file.\n     * - When `options.fatal` is `true`, and the file contains an invalid byte sequence for `options.encoding`.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file_readable | AndroidFs::open_file_readable}\n     * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder | WebAPI TextDecoder}\n     * @since 25.1.0\n     */\n    static async readTextFile(uri, options) {\n        const bytes = await invoke('plugin:android-fs|read_text_file', {\n            uri: mapFsPathForInput(uri),\n        });\n        const decoder = new TextDecoder(options?.encoding ?? \"utf-8\", {\n            fatal: options?.fatal,\n            ignoreBOM: options?.ignoreBOM\n        });\n        return decoder.decode(bytes);\n    }\n    /**\n     * Writes data to a file.\n     *\n     * @param uri - URI or path of the file to write to.\n     * @param data - Bytes to write.\n     * @param options - Optional settings: `append`, `create`, `notification`. See `AndroidWriteFileOptions` for details.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the app does not have write permissions for the file.\n     * - When `options.create` is `false` or a URI is specified, and the file does not exist.\n     * - When `options.append` is `true`, and a provider of the file via File/Directory Picker does not support append mode.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file_writable | AndroidFs::open_file_writable}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file | AndroidFs::open_file}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/enum.FileAccessMode.html#variant.WriteAppend | AndroidFs::FileAccessMode::WriteAppend}\n     *\n     * @since 25.1.0\n     */\n    static async writeFile(uri, data, options) {\n        const n = options?.notification;\n        const notification = n != null ? { ...n, forceIndeterminateProgressBar: true } : null;\n        const { open, write, close } = resolveCmdWriteFileStream(\"plugin:android-fs|write_file\");\n        try {\n            await open({\n                uri: mapFsPathForInput(uri),\n                append: options?.append ?? false,\n                create: options?.create ?? true,\n                notification\n            });\n            await write(data);\n            await close(\"Ok\");\n        }\n        catch (e) {\n            await close(\"Err\").catch(() => { });\n            throw e;\n        }\n    }\n    /**\n     * Writes text data to a file as UTF-8.\n     *\n     * @param uri - URI or path of the file to write to.\n     * @param data - String to write.\n     * @param options - Optional settings: `append`, `create`, `notification`. See `AndroidWriteTextFileOptions` for details.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the app does not have write permissions for the file.\n     * - When `options.create` is `false` or a URI is specified, and the file does not exist.\n     * - When `options.append` is `true`, and a provider of the file via File/Directory Picker does not support append mode.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file_writable | AndroidFs::open_file_writable}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file | AndroidFs::open_file}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/enum.FileAccessMode.html#variant.WriteAppend | AndroidFs::FileAccessMode::WriteAppend}\n     * @see {@link https://developer.mozilla.org/en-us/docs/Web/API/TextEncoder | WebAPI TextEncoder}\n     * @since 25.1.0\n     */\n    static async writeTextFile(uri, data, options) {\n        const n = options?.notification;\n        const notification = n != null ? { ...n, forceIndeterminateProgressBar: true } : null;\n        const { open, write, close } = resolveCmdWriteFileStream(\"plugin:android-fs|write_text_file\");\n        try {\n            await open({\n                uri: mapFsPathForInput(uri),\n                append: options?.append ?? false,\n                create: options?.create ?? true,\n                notification\n            });\n            await write(data);\n            await close(\"Ok\");\n        }\n        catch (e) {\n            await close(\"Err\").catch(() => { });\n            throw e;\n        }\n    }\n    /**\n     * Copies the contents of a source file to a destination file.\n     *\n     * @remarks\n     * The existing content of the destination file will be truncated before writing.\n     *\n     * @param srcUri - URI or path of the source file to copy.\n     * @param destUri - URI or path of the destination file to copy.\n     * @param options - Optional settings: `create`, `notification`. See `AndroidCopyFileOptions` for details.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the src/dest entry is a directory, not a file.\n     * - When the src file does not exist.\n     * - When `options.create` is `false` or a URI is specified, and the dest file does not exist.\n     * - When the app does not have read permissions for the src file.\n     * - When the app does not have write permissions for the dest file.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.copy | AndroidFs::copy}\n     * @since 22.0.0\n     */\n    static async copyFile(srcUri, destUri, options) {\n        const create = options?.create ?? true;\n        const notification = options?.notification ?? null;\n        return await invoke('plugin:android-fs|copy_file', {\n            srcUri: mapFsPathForInput(srcUri),\n            destUri: mapFsPathForInput(destUri),\n            create,\n            notification,\n        });\n    }\n    /**\n     * Truncates a file to zero length.\n     *\n     * @param uri - URI of the file to truncate.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have write permissions for the file.\n     * - When a provider of the file via File/Directory Picker does not support the truncate operation.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.open_file_writable | AndroidFs::open_file_writable}\n     * @since 22.0.0\n     */\n    static async truncateFile(uri) {\n        return await invoke('plugin:android-fs|truncate_file', { uri });\n    }\n    /**\n     * Renames a file and returns its new URI.\n     *\n     * @remarks\n     * For URIs from File/Directory Picker,\n     * all permissions are lost after this operation, including for the returned new URI.\n     *\n     * @param uri - URI of the file to rename.\n     * @param name - New name, including the file extension if needed. If a entry with the same name already exists, a sequential number is automatically appended.\n     *\n     * @returns Promise that resolves to a new URI of the file.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have write permissions for the file.\n     * - When a provider of the file via File/Directory Picker does not support the rename operation.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.rename | AndroidFs::rename}\n     * @since 24.1.0\n     */\n    static async renameFile(uri, name) {\n        return await invoke('plugin:android-fs|rename_file', {\n            uri,\n            name\n        });\n    }\n    /**\n     * Renames a directory and returns its new URI.\n     *\n     * @remarks\n     * For URIs from Directory Picker,\n     * all permissions are lost after this operation, including for the returned new URI.\n     *\n     * @param uri - URI of the directory to rename.\n     * @param name - New name. If a entry with the same name already exists, a sequential number is automatically appended.\n     *\n     * @returns Promise that resolves to a new URI of the directory.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a file, not a directory.\n     * - When the directory does not exist.\n     * - When the app does not have write permissions for the directory.\n     * - When a provider of the directory via Directory Picker does not support the rename operation.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.rename | AndroidFs::rename}\n     * @since 24.1.0\n     */\n    static async renameDir(uri, name) {\n        return await invoke('plugin:android-fs|rename_dir', {\n            uri,\n            name\n        });\n    }\n    /**\n     * Removes a file.\n     *\n     * @param uri - URI of the file to remove.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a directory, not a file.\n     * - When the file does not exist.\n     * - When the app does not have write permissions for the file.\n     * - When a provider of the file via File/Directory Picker does not support the remove operation.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.remove_file | AndroidFs::remove_file}\n     * @since 22.0.0\n     */\n    static async removeFile(uri) {\n        return await invoke('plugin:android-fs|remove_file', { uri });\n    }\n    /**\n     * Removes a directory and all of its contents recursively.\n     *\n     * @param uri - URI of the file to remove.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a file, not a directory.\n     * - When the directory does not exist.\n     * - When the app does not have read/write permissions for the directory.\n     * - When a provider of the directory via Directory Picker does not support the remove or read-directory operations.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.remove_dir_all | AndroidFs::remove_dir_all}\n     * @since 22.0.0\n     */\n    static async removeDirAll(uri) {\n        return await invoke('plugin:android-fs|remove_dir_all', { uri });\n    }\n    /**\n     * Removes a empty directory.\n     *\n     * @param uri - URI of the file to remove.\n     *\n     * @returns Promise that resolves when the operation completes successfully.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a file, not a directory.\n     * - When the directory does not exist.\n     * - When the directory is not empty.\n     * - When the app does not have read/write permissions for the directory.\n     * - When a provider of the directory via Directory Picker does not support the remove or read-directory operations.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.remove_dir | AndroidFs::remove_dir}\n     * @since 22.0.0\n     */\n    static async removeEmptyDir(uri) {\n        return await invoke('plugin:android-fs|remove_empty_dir', { uri });\n    }\n    /**\n     * Retrieves metadata and URIs for the immediate children of a directory.\n     *\n     * @param uri - URI of the directory to read.\n     * @param options - Optional settings: `offset`, `limit`. See `AndroidReadDirOptions` for details.\n     *\n     * @returns Promise that resolves to an array of entries. Each entry includes metadata and the URI of the file or directory.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry is a file, not a directory.\n     * - When the directory does not exist.\n     * - When the app does not have read permissions for the directory.\n     * - When a provider of the directory via Directory Picker does not support the read-directory operation.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.AndroidFs.html#method.read_dir | AndroidFs::read_dir}\n     * @since 22.0.0\n     */\n    static async readDir(uri, options) {\n        const offset = options?.offset ?? null;\n        const limit = options?.limit ?? null;\n        const entries = await invoke('plugin:android-fs|read_dir', {\n            uri,\n            offset,\n            limit,\n        });\n        const buffer = new Array(entries.length);\n        for (let i = 0; i < entries.length; i++) {\n            const e = entries[i];\n            const lastModified = new Date(e.lastModified);\n            buffer[i] = e.type === \"Dir\"\n                ? { type: \"Dir\", name: e.name, uri: e.uri, lastModified }\n                : { type: \"File\", name: e.name, uri: e.uri, lastModified, byteLength: e.byteLength, mimeType: e.mimeType };\n        }\n        return buffer;\n    }\n    /**\n     * Opens the system file picker to let the user select an existing file.\n     *\n     * @param options - Optional settings: `mimeTypes`, `multiple`, `pickerType`, `needWritePermission`, `localOnly`, `initialLocation`. See `AndroidOpenFilePickerOptions` for details.\n     *\n     * @returns Promise that resolves to an array of URIs representing the picked files, or an empty array if no files are selected. By default, the app has read access to the URIs, and this permission remains valid until the app or device is terminated. The app can gain persistent access to the files using `AndroidFs.persistPickerUriPermission`.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.pick_files | Picker::pick_files}\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.pick_visual_medias | Picker::pick_visual_medias}\n     * @since 22.0.0\n     */\n    static async showOpenFilePicker(options) {\n        const _mimeTypes = options?.mimeTypes ?? [];\n        const mimeTypes = Array.isArray(_mimeTypes) ? _mimeTypes : [_mimeTypes];\n        const multiple = options?.multiple ?? false;\n        const pickerType = options?.pickerType ?? null;\n        const needWritePermission = options?.needWritePermission ?? false;\n        const localOnly = options?.localOnly ?? false;\n        const initialLocation = mapPickerInitialLocationForInput(options?.initialLocation);\n        return await invoke(\"plugin:android-fs|show_open_file_picker\", {\n            mimeTypes,\n            multiple,\n            pickerType,\n            needWritePermission,\n            localOnly,\n            initialLocation,\n        });\n    }\n    /**\n     * Opens the system directory picker to let the user select a new or existing directory.\n     *\n     * @param options - Optional settings: `localOnly`, `initialLocation`. See `AndroidOpenDirPickerOptions` for details.\n     *\n     * @returns Promise that resolves to a URI representing the picked directory (which may be newly created or already existing), or `null` if no directory is selected. By default, the app has read-write access to the URI, and this permission remains valid until the app or device is terminated. The app can gain persistent access to the directory using `AndroidFs.persistPickerUriPermission`. Permissions for derived entries, such as `AndroidFs.readDir` and `AndroidFs.createNewFile`, depend on the permissions granted to this picked directory.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.pick_dir | Picker::pick_dir}\n     * @since 22.0.0\n     */\n    static async showOpenDirPicker(options) {\n        const localOnly = options?.localOnly ?? false;\n        const initialLocation = mapPickerInitialLocationForInput(options?.initialLocation);\n        return await invoke(\"plugin:android-fs|show_open_dir_picker\", {\n            localOnly,\n            initialLocation\n        });\n    }\n    /**\n     * Opens the system file saver to let the user specify a file destination.\n     *\n     * @param defaultFileName - Initial file name. The user may change this value before saving the file.\n     * @param mimeType - MIME type of the file to save. If `null`, it is inferred from the extension of `defaultFileName`.\n     * @param options - Optional settings: `localOnly`, `initialLocation`. See `AndroidSaveFilePickerOptions` for details.\n     *\n     * @returns Promise that resolves to a URI representing the picked file (which may be a newly created empty file or an existing file), or `null` if no file is selected. By default, the app has write access to the URI, and this permission remains valid until the app or device is terminated. The app can gain persistent access to the file using `AndroidFs.persistPickerUriPermission`.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.save_file | Picker::save_file}\n     * @since 22.0.0\n     */\n    static async showSaveFilePicker(defaultFileName, mimeType, options) {\n        const localOnly = options?.localOnly ?? false;\n        const initialLocation = mapPickerInitialLocationForInput(options?.initialLocation);\n        return await invoke(\"plugin:android-fs|show_save_file_picker\", {\n            defaultFileName,\n            mimeType,\n            localOnly,\n            initialLocation\n        });\n    }\n    /**\n     * Shows the app chooser for sharing files with other applications.\n     *\n     * @remarks\n     * This sends the files as a single unit.\n     * Available applications depend on the MIME types associated with the files.\n     * This does not result in an error even if no compatible applications are found;\n     * instead, an empty app chooser is displayed.\n     *\n     * @param uris - Array of URIs of the target files.\n     *\n     * @returns Promise that resolves after the app chooser is launched.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the app does not have read permissions for the files.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Opener.html#method.share_files | Opener::share_files}\n     * @since 22.0.0\n     */\n    static async showShareFileDialog(uris) {\n        return await invoke(\"plugin:android-fs|show_share_file_dialog\", {\n            uris: Array.isArray(uris) ? uris : [uris]\n        });\n    }\n    /**\n     * Shows the app chooser for opening a file with other applications.\n     *\n     * @remarks\n     * Available applications depend on the MIME types associated with the file.\n     * This does not result in an error even if no compatible applications are found;\n     * instead, an empty app chooser is displayed.\n     *\n     * @param uri - URI of the target file.\n     *\n     * @returns Promise that resolves after the app chooser is launched.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the app does not have read permissions for the file.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Opener.html#method.open_file | Opener::open_file}\n     * @since 22.0.0\n     */\n    static async showViewFileDialog(uri) {\n        return await invoke(\"plugin:android-fs|show_view_file_dialog\", { uri });\n    }\n    /**\n     * Shows the app chooser for opening a directory with other applications.\n     *\n     * @remarks\n     * This does not result in an error even if no compatible applications are found;\n     * instead, an empty app chooser is displayed.\n     *\n     * @param uri - URI of the target directory.\n     *\n     * @returns Promise that resolves after the app chooser is launched.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the app does not have read permissions for the directory.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Opener.html#method.open_dir | Opener::open_dir}\n     * @since 22.0.0\n     */\n    static async showViewDirDialog(uri) {\n        return await invoke(\"plugin:android-fs|show_view_dir_dialog\", { uri });\n    }\n    /**\n     * Shows the app chooser for editing a file with other applications.\n     *\n     * @remarks\n     * Available applications depend on the MIME types associated with the file.\n     * This does not result in an error even if no compatible applications are found;\n     * instead, an empty app chooser is displayed.\n     *\n     * OPINION:\n     * I think this is probably the least commonly used request for sending a file to an app.\n     * Even if you want to open an image or video editing app,\n     * `AndroidFs.showViewFileDialog` often lets you choose from a wider range of apps.\n     *\n     * @param uri - URI of the target file.\n     *\n     * @returns Promise that resolves after the app chooser is launched.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the app does not have read/write permissions for the file.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Opener.html#method.edit_file | Opener::edit_file}\n     * @since 28.4.0\n     */\n    static async showEditFileDialog(uri) {\n        return await invoke(\"plugin:android-fs|show_edit_file_dialog\", { uri });\n    }\n    /**\n     * Checks the permission state of a URI granted by File/Directory Picker.\n     *\n     * @param uri - URI of the target file or directory.\n     * @param state - Permission state to check. One of: `\"Read\"`, `\"Write\"`, `\"ReadAndWrite\"`, `\"ReadOrWrite\"`.\n     *\n     * @returns Promise that resolves to a boolean indicating whether the specified permission is granted.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.check_uri_permission | Picker::check_uri_permission}\n     * @since 24.1.0\n     */\n    static async checkPickerUriPermission(uri, state) {\n        return await invoke(\"plugin:android-fs|check_picker_uri_permission\", { uri, state });\n    }\n    /**\n     * Takes a persistent permission to access the file or directory (and its descendants) selected via File/Directory Picker.\n     *\n     * @remarks\n     * This prolongs an already acquired permission rather than acquiring a new one.\n     *\n     * Android imposes a strict limit on the total number of URIs\n     * that can be made persistent at the same time.\n     * Therefore, it is highly recommended to release unnecessary persisted URIs\n     * via `AndroidFs.releasePersistedPickerUriPermission}`\n     * or `AndroidFs.releaseAllPersistedPickerUriPermissions`.\n     *\n     * Persisted permissions may be revoked by other applications or the user,\n     * by modifying set permissions, or by moving/removing entries.\n     * To verify validity,\n     * use `AndroidFs.checkPersistedPickerUriPermission`\n     * or `AndroidFs.checkPickerUriPermission`.\n     *\n     * @param uri - URI of the target file or directory.\n     *\n     * @returns Promise that resolves when the operation is complete.\n     *\n     * @throws\n     * The returned Promise rejects with an error in the following cases:\n     * - When the entry does not exist.\n     * - When the app does not have any permissions for the entry.\n     * - When a provider of the entry via File/Directory Picker does not support the persist-permissions operation.\n     * - When an unexpected error occurs.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.persist_picker_uri_permission | Picker::persist_picker_uri_permission}\n     * @see {@link https://stackoverflow.com/questions/71099575/should-i-release-persistableuripermission-when-a-new-storage-location-is-chosen/71100621#71100621 | Android Persistable URI Permission Limit Discussion}\n     * @since 24.1.0\n     */\n    static async persistPickerUriPermission(uri) {\n        return await invoke(\"plugin:android-fs|persist_picker_uri_permission\", { uri });\n    }\n    /**\n     * Checks the persisted permission state of a URI granted via `AndroidFs.persistPickerUriPermission`.\n     *\n     * @param uri - URI of the target file or directory.\n     * @param state - Permission state to check. One of: `\"Read\"`, `\"Write\"`, `\"ReadAndWrite\"`, `\"ReadOrWrite\"`.\n     *\n     * @returns Promise that resolves to a boolean; `false` if only non-persistent permissions exist or if there are no permissions.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.check_persisted_picker_uri_permission | Picker::check_persisted_picker_uri_permission}\n     * @since 24.1.0\n     */\n    static async checkPersistedPickerUriPermission(uri, state) {\n        return await invoke(\"plugin:android-fs|check_persisted_picker_uri_permission\", { uri, state });\n    }\n    /**\n     * Relinquishes a persisted permission of a URI granted via {@link AndroidFs.persistPickerUriPermission}.\n     *\n     * @param uri - URI of the target file or directory.\n     * @returns Promise that resolves to a boolean; `true` if a persisted permission exists for the specified URI and was successfully released, or `false` if no persisted permission existed.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.release_persisted_picker_uri_permission | Picker::release_persisted_picker_uri_permission}\n     * @since 24.1.0\n     */\n    static async releasePersistedPickerUriPermission(uri) {\n        return await invoke(\"plugin:android-fs|release_persisted_picker_uri_permission\", { uri });\n    }\n    /**\n     * Relinquishes all persisted permissions of URIs granted via {@link AndroidFs.persistPickerUriPermission}.\n     *\n     * @returns Promise that resolves when the operation is complete.\n     *\n     * @see {@link https://docs.rs/tauri-plugin-android-fs/latest/tauri_plugin_android_fs/api/api_async/struct.Picker.html#method.release_all_persisted_picker_uri_permissions | Picker::release_all_persisted_picker_uri_permissions}\n     * @since 24.1.0\n     */\n    static async releaseAllPersistedPickerUriPermissions() {\n        return await invoke(\"plugin:android-fs|release_all_persisted_picker_uri_permissions\");\n    }\n}\n/** 512 KiB */\nconst DEFAULT_BUFFER_SIZE_FOR_IPC = 512 * 1024;\nfunction mapBufferByteLengthForInput(s) {\n    const bufferSize = s ?? DEFAULT_BUFFER_SIZE_FOR_IPC;\n    if (!isNonzeroSafeInt(bufferSize)) {\n        throw new Error(\"Invalid bufferByteLength: expected a non-zero safe unsigned integer (1..Number.MAX_SAFE_INTEGER)\");\n    }\n    return bufferSize;\n}\nfunction mapEncodingLabelForInput(label) {\n    try {\n        return (new TextDecoder(label)).encoding;\n    }\n    catch {\n        throw new RangeError(\"Bad encoding label\");\n    }\n}\nfunction mapMaxLineByteLength(s) {\n    if (s == null)\n        return 0;\n    if (!Number.isSafeInteger(s) || s < 0) {\n        throw new Error(\"Invalid maxLineByteLength: expected a safe unsigned integer\");\n    }\n    return s;\n}\nconst UTF8_DECODER = new TextDecoder();\nconst UTF8_ENCODER = new TextEncoder();\nfunction decodeUtf8(bytes) {\n    return UTF8_DECODER.decode(bytes);\n}\nfunction encodeUtf8(text) {\n    return UTF8_ENCODER.encode(text);\n}\nfunction resolveCmdReadFileStream(cmdName) {\n    function cmd(type, args) {\n        return invoke(cmdName, { event: { type, args } });\n    }\n    let id = null;\n    return {\n        open: async (args) => {\n            if (id !== null)\n                throw new Error(\"File already opened\");\n            id = cmd(\"Open\", args).then(ridFromBytes);\n            await id;\n        },\n        read: async (len) => {\n            if (id === null)\n                throw new Error(\"File not opened\");\n            const data = await cmd(\"Read\", { id: await id, len, });\n            return data.byteLength === 0 ? null : new Uint8Array(data);\n        },\n        close: async () => {\n            if (id === null)\n                return;\n            await cmd(\"Close\", { id: await id });\n        }\n    };\n}\nfunction resolveCmdWriteFileStream(cmdName) {\n    function cmd(type, body, args) {\n        return invoke(cmdName, body, {\n            headers: {\n                \"tpafs-cmd-type\": type,\n                \"tpafs-cmd-args\": encodeURIComponent(JSON.stringify(args))\n            }\n        });\n    }\n    const PAYLOAD_FOR_CHECKING_RAW_IPC_REQUEST_BODY_SUPPORTED = new Uint8Array([0]);\n    let state = null;\n    return {\n        open: async (args) => {\n            if (state !== null)\n                throw new Error(\"File already opened\");\n            state = cmd(\"Open\", PAYLOAD_FOR_CHECKING_RAW_IPC_REQUEST_BODY_SUPPORTED, args);\n            await state;\n        },\n        write: async (chunk) => {\n            if (state === null)\n                throw new Error(\"File not opened\");\n            const { id, supportsRawIpcRequestBody } = await state;\n            if (supportsRawIpcRequestBody) {\n                const data = typeof chunk === \"string\"\n                    ? encodeUtf8(chunk)\n                    : chunk;\n                await cmd(\"Write\", data, { id });\n            }\n            else {\n                if (typeof chunk === \"string\") {\n                    await cmd(\"Write\", {\n                        data: chunk,\n                        format: \"textToUtf8\"\n                    }, { id });\n                }\n                else {\n                    // IPC のリクエストで raw Body を送れない場合、\n                    // 大きな配列に対して非常に非効率な形式にシリアライズされる。\n                    // よって、まだマシな dataURL としてデータを送る。\n                    // Data URL を用いる理由は web API の FileReader で比較的効率的に作成できるため。\n                    // <https://github.com/tauri-apps/tauri/issues/10573>\n                    await cmd(\"Write\", {\n                        data: await bytesToDataUrl(chunk),\n                        format: \"dataUrlToDecodedData\"\n                    }, { id });\n                }\n            }\n        },\n        close: async (result) => {\n            if (state === null)\n                return;\n            const { id } = await state;\n            const error = result === \"Err\";\n            await cmd(\"Close\", {}, { id, error });\n        },\n    };\n}\nfunction createTextLinesReadableStream(handler, options, signal) {\n    /*\n     * bytes は以下の形式のレコードが連続したものであり、\n     * 各レコードが分断されることはない。\n     *\n     * - err flag (u8, 0 = ok, 1 = err)\n     * - line break type (u8, 0 = null, 1 = \"\\n\", 2 = \"\\r\\n\")\n     * - line bytes len (u64, big endian)\n     * - line bytes (variable bytes)\n     *\n     * err flag が 0 の場合、正常にその行が読み込まれたことを指す。\n     * この場合、line bytes には BOM 処理されたテキストが格納される。\n     *\n     * err flag が 1 の場合、その行でエラーが発生したことを示す。\n     * この場合、line bytes には utf-8 形式のエラーメッセージが格納され、\n     * この呼び出しでの最後の行となる。\n     *\n     * エラー発生後の呼び出しの挙動は未定義。\n     */\n    const ERR_FLAG_LEN = 1;\n    const LINE_BREAK_TYPE_LEN = 1;\n    const LINE_LEN_LEN = 8;\n    const ERR_FLAG_OFFSET = 0;\n    const LINE_BREAK_TYPE_OFFSET = ERR_FLAG_OFFSET + ERR_FLAG_LEN;\n    const LINE_LEN_OFFSET = LINE_BREAK_TYPE_OFFSET + LINE_BREAK_TYPE_LEN;\n    const LINE_OFFSET = LINE_LEN_OFFSET + LINE_LEN_LEN;\n    const LINE_BREAK_NULL = 0;\n    const LINE_BREAK_LF = 1;\n    const LINE_BREAK_CRLF = 2;\n    let abortListener = null;\n    let decoder = null;\n    let buffer = null;\n    let cleanupPromise = null;\n    function cleanup() {\n        if (cleanupPromise === null) {\n            cleanupPromise = (async () => {\n                buffer = null;\n                decoder = null;\n                if (signal != null && abortListener != null) {\n                    signal.removeEventListener(\"abort\", abortListener);\n                    abortListener = null;\n                }\n                if (handler.release) {\n                    await handler.release();\n                }\n            })();\n        }\n        return cleanupPromise;\n    }\n    // エラーはその原因となった行を読み込んだ際に発生させたいため、\n    // 1回の pull では1回だけ enqueue　を行う。\n    // 複数回行うとエラーが発生した行ではない箇所で read してもエラーになってしまう。\n    return new ReadableStream({\n        start(controller) {\n            if (signal) {\n                abortListener = () => {\n                    cleanup().catch(() => { });\n                    controller.error(signal.reason ?? newAbortError());\n                };\n                signal.addEventListener(\"abort\", abortListener);\n            }\n        },\n        async pull(controller) {\n            try {\n                throwIfAborted(signal);\n                if (buffer == null || buffer.byteLength === 0) {\n                    buffer = await handler.read();\n                    throwIfAborted(signal);\n                }\n                if (buffer == null || buffer.byteLength === 0) {\n                    await cleanup();\n                    controller.close();\n                    return;\n                }\n                if (buffer.byteLength < LINE_OFFSET) {\n                    throw new Error(\"Invalid data: Chunk ended with partial header.\");\n                }\n                const lineLen = trySafeU64FromBytes(buffer.subarray(LINE_LEN_OFFSET, LINE_LEN_OFFSET + LINE_LEN_LEN), \"bigEndian\");\n                if (buffer.byteLength < LINE_OFFSET + lineLen) {\n                    throw new Error(\"Invalid data: Line split detected.\");\n                }\n                const lineBytes = buffer.subarray(LINE_OFFSET, LINE_OFFSET + lineLen);\n                const errFlag = buffer[ERR_FLAG_OFFSET];\n                if (numToFlag(errFlag)) {\n                    throw new Error(decodeUtf8(lineBytes));\n                }\n                const lineBreakType = buffer[LINE_BREAK_TYPE_OFFSET];\n                let lineBreak = null;\n                if (lineBreakType === LINE_BREAK_LF)\n                    lineBreak = \"\\n\";\n                else if (lineBreakType === LINE_BREAK_CRLF)\n                    lineBreak = \"\\r\\n\";\n                else if (lineBreakType === LINE_BREAK_NULL)\n                    lineBreak = null;\n                else\n                    throw new Error(\"Invalid lineBreakType\");\n                if (decoder == null) {\n                    decoder = new TextDecoder(options?.label, {\n                        fatal: options?.fatal,\n                        ignoreBOM: true\n                    });\n                }\n                const line = decoder.decode(lineBytes);\n                throwIfAborted(signal);\n                controller.enqueue({ line, lineBreak });\n                buffer = buffer.subarray(LINE_OFFSET + lineLen);\n            }\n            catch (e) {\n                await cleanup().catch(() => { });\n                throw e;\n            }\n        },\n        async cancel() {\n            await cleanup();\n        }\n    });\n}\nfunction throwIfAborted(signal) {\n    if (signal?.aborted === true) {\n        throw (signal?.reason ?? newAbortError());\n    }\n}\nfunction newAbortError() {\n    return new DOMException(\"The operation was aborted.\", \"AbortError\");\n}\nasync function bytesToDataUrl(bytes) {\n    const buffer = bytes.buffer instanceof ArrayBuffer\n        ? bytes\n        : new Uint8Array(bytes);\n    const blob = new Blob([buffer], { type: \"application/octet-stream\" });\n    return await blobToDataUrl(blob);\n}\nasync function blobToDataUrl(blob) {\n    return new Promise((resolve, reject) => {\n        const reader = new FileReader();\n        reader.onload = () => {\n            const result = reader.result;\n            unsub();\n            if (typeof result === \"string\") {\n                resolve(result);\n            }\n            else {\n                reject(new Error(\"FileReader result is not a string\"));\n            }\n        };\n        reader.onerror = () => {\n            unsub();\n            reject(reader.error ?? new Error(\"FileReader failed\"));\n        };\n        reader.onabort = () => {\n            unsub();\n            reject(new Error(\"FileReader aborted\"));\n        };\n        function unsub() {\n            reader.onload = null;\n            reader.onerror = null;\n            reader.onabort = null;\n        }\n        try {\n            reader.readAsDataURL(blob);\n        }\n        catch (err) {\n            unsub();\n            reject(err);\n        }\n    });\n}\nfunction isNonzeroSafeInt(num) {\n    return isSafeInt(num) && num !== 0;\n}\nfunction isSafeInt(num) {\n    return Number.isSafeInteger(num) && 0 <= num && num <= Number.MAX_SAFE_INTEGER;\n}\nfunction ridFromBytes(bytes) {\n    return u32FromBytes(bytes);\n}\nfunction u32FromBytes(input, endian) {\n    const bytes = input instanceof Uint8Array\n        ? input\n        : input instanceof ArrayBuffer\n            ? new Uint8Array(input)\n            : new Uint8Array(input.buffer, input.byteOffset, input.byteLength);\n    if (bytes.length !== 4) {\n        throw new Error(\"Expected 4 bytes for u32\");\n    }\n    {\n        // Big Endian: [0xAA, 0xBB, 0xCC, 0xDD] -> 0xAABBCCDD\n        return ((bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3]) >>> 0;\n    }\n}\nfunction numToFlag(flag) {\n    if (flag === 1)\n        return true;\n    if (flag === 0)\n        return false;\n    throw new Error(\"Invalid flag value\");\n}\nfunction trySafeU64FromBytes(input, endian) {\n    const bytes = input instanceof Uint8Array\n        ? input\n        : input instanceof ArrayBuffer\n            ? new Uint8Array(input)\n            : new Uint8Array(input.buffer, input.byteOffset, input.byteLength);\n    if (bytes.length !== 8) {\n        throw new Error(\"Expected 8 bytes for u64\");\n    }\n    {\n        // bytes[0]: bits 56-63 (全ビット禁止)\n        // bytes[1]: bits 48-55 (上位3ビット: 53, 54, 55 が禁止)\n        if (bytes[0] !== 0 || (bytes[1] & 0b1110_0000) !== 0) {\n            throw new Error(\"u64 exceeds Number.MAX_SAFE_INTEGER\");\n        }\n        return ((bytes[0] * (2 ** 56)) +\n            (bytes[1] * (2 ** 48)) +\n            (bytes[2] * (2 ** 40)) +\n            (bytes[3] * (2 ** 32)) +\n            (bytes[4] * (2 ** 24)) +\n            (bytes[5] * (2 ** 16)) +\n            (bytes[6] * (2 ** 8)) +\n            (bytes[7]));\n    }\n}\n\nexport { AndroidApiLevel, AndroidFs, AndroidPickerInitialLocation, AndroidProgressNotificationIconType, AndroidProgressNotificationTemplate, AndroidPublicAudioDir, AndroidPublicDir, AndroidPublicGeneralPurposeDir, AndroidPublicImageDir, AndroidPublicVideoDir, AndroidUriPermissionState, getAndroidApiLevel, isAndroid };\n"],"x_google_ignoreList":[0,1],"mappings":"8CAUA,SAAS,EAAqB,EAAS,EAAS,EACnB,GAAS,kBAAoB,KAElD,EAAe,GAAS,MAAM,EAElC,IAAM,EAAO,EAAQ,KACf,EAAU,EAAQ,QACpB,EAAgB,KAChB,EAAS,KACT,EAAiB,KACrB,SAAS,EAAQ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