-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage.js.map
7 lines (7 loc) · 104 KB
/
storage.js.map
1
2
3
4
5
6
7
{
"version": 3,
"sources": ["../webapp/node_modules/native-file-system-adapter/src/config.js", "../webapp/node_modules/native-file-system-adapter/src/adapters/memory.js", "../webapp/node_modules/native-file-system-adapter/src/adapters/sandbox.js", "../webapp/node_modules/native-file-system-adapter/src/FileSystemHandle.js", "../webapp/node_modules/native-file-system-adapter/src/FileSystemWritableFileStream.js", "../webapp/node_modules/native-file-system-adapter/src/FileSystemFileHandle.js", "../webapp/node_modules/native-file-system-adapter/src/FileSystemDirectoryHandle.js", "../webapp/node_modules/native-file-system-adapter/src/util.js", "../webapp/node_modules/native-file-system-adapter/src/adapters/downloader.js", "../webapp/modules/storage/indexedDb.ts", "../webapp/modules/avalonia/caretHelper.ts", "../webapp/modules/avalonia/input.ts", "../webapp/modules/avalonia/caniuse.ts", "../webapp/modules/storage/storageItem.ts", "../webapp/node_modules/native-file-system-adapter/src/showDirectoryPicker.js", "../webapp/node_modules/native-file-system-adapter/src/showOpenFilePicker.js", "../webapp/node_modules/native-file-system-adapter/src/showSaveFilePicker.js", "../webapp/node_modules/native-file-system-adapter/src/getOriginPrivateDirectory.js", "../webapp/node_modules/native-file-system-adapter/src/es6.js", "../webapp/modules/storage/storageProvider.ts"],
"sourcesContent": ["const config = {\n ReadableStream: globalThis.ReadableStream,\n WritableStream: globalThis.WritableStream,\n TransformStream: globalThis.TransformStream,\n DOMException: globalThis.DOMException,\n Blob: globalThis.Blob,\n File: globalThis.File,\n}\n\nexport default config\n", "import { errors } from '../util.js'\nimport config from '../config.js'\n\nconst { File, Blob, DOMException } = config\nconst { INVALID, GONE, MISMATCH, MOD_ERR, SYNTAX, SECURITY, DISALLOWED } = errors\n\nexport class Sink {\n\n /**\n * @param {FileHandle} fileHandle\n * @param {File} file\n */\n constructor (fileHandle, file) {\n this.fileHandle = fileHandle\n this.file = file\n this.size = file.size\n this.position = 0\n }\n\n write (chunk) {\n let file = this.file\n\n if (typeof chunk === 'object') {\n if (chunk.type === 'write') {\n if (Number.isInteger(chunk.position) && chunk.position >= 0) {\n this.position = chunk.position\n if (this.size < chunk.position) {\n this.file = new File(\n [this.file, new ArrayBuffer(chunk.position - this.size)],\n this.file.name,\n this.file\n )\n }\n }\n if (!('data' in chunk)) {\n throw new DOMException(...SYNTAX('write requires a data argument'))\n }\n chunk = chunk.data\n } else if (chunk.type === 'seek') {\n if (Number.isInteger(chunk.position) && chunk.position >= 0) {\n if (this.size < chunk.position) {\n throw new DOMException(...INVALID)\n }\n this.position = chunk.position\n return\n } else {\n throw new DOMException(...SYNTAX('seek requires a position argument'))\n }\n } else if (chunk.type === 'truncate') {\n if (Number.isInteger(chunk.size) && chunk.size >= 0) {\n file = chunk.size < this.size\n ? new File([file.slice(0, chunk.size)], file.name, file)\n : new File([file, new Uint8Array(chunk.size - this.size)], file.name)\n\n this.size = file.size\n if (this.position > file.size) {\n this.position = file.size\n }\n this.file = file\n return\n } else {\n throw new DOMException(...SYNTAX('truncate requires a size argument'))\n }\n }\n }\n\n chunk = new Blob([chunk])\n\n let blob = this.file\n // Calc the head and tail fragments\n const head = blob.slice(0, this.position)\n const tail = blob.slice(this.position + chunk.size)\n\n // Calc the padding\n let padding = this.position - head.size\n if (padding < 0) {\n padding = 0\n }\n blob = new File([\n head,\n new Uint8Array(padding),\n chunk,\n tail\n ], blob.name)\n\n this.size = blob.size\n this.position += chunk.size\n\n this.file = blob\n }\n close () {\n if (this.fileHandle._deleted) throw new DOMException(...GONE)\n this.fileHandle._file = this.file\n this.file =\n this.position =\n this.size = null\n if (this.fileHandle.onclose) {\n this.fileHandle.onclose(this.fileHandle)\n }\n }\n}\n\nexport class FileHandle {\n constructor (name = '', file = new File([], name), writable = true) {\n this._file = file\n this.name = name\n this.kind = 'file'\n this._deleted = false\n this.writable = writable\n this.readable = true\n }\n\n async getFile () {\n if (this._deleted) throw new DOMException(...GONE)\n return this._file\n }\n\n async createWritable (opts) {\n if (!this.writable) throw new DOMException(...DISALLOWED)\n if (this._deleted) throw new DOMException(...GONE)\n\n const file = opts.keepExistingData\n ? await this.getFile()\n : new File([], this.name)\n\n return new Sink(this, file)\n }\n\n async isSameEntry (other) {\n return this === other\n }\n\n async _destroy () {\n this._deleted = true\n this._file = null\n }\n}\n\nexport class FolderHandle {\n\n /** @param {string} name */\n constructor (name, writable = true) {\n this.name = name\n this.kind = 'directory'\n this._deleted = false\n /** @type {Object.<string, (FolderHandle|FileHandle)>} */\n this._entries = {}\n this.writable = writable\n this.readable = true\n }\n\n /** @returns {AsyncGenerator<[string, FileHandle | FolderHandle]>} */\n async * entries () {\n if (this._deleted) throw new DOMException(...GONE)\n yield* Object.entries(this._entries)\n }\n\n async isSameEntry (other) {\n return this === other\n }\n\n /**\n * @param {string} name\n * @param {{ create: boolean; }} opts\n */\n async getDirectoryHandle (name, opts) {\n if (this._deleted) throw new DOMException(...GONE)\n const entry = this._entries[name]\n if (entry) { // entry exist\n if (entry instanceof FileHandle) {\n throw new DOMException(...MISMATCH)\n } else {\n return entry\n }\n } else {\n if (opts.create) {\n return (this._entries[name] = new FolderHandle(name))\n } else {\n throw new DOMException(...GONE)\n }\n }\n }\n\n /**\n * @param {string} name\n * @param {{ create: boolean; }} opts\n */\n async getFileHandle (name, opts) {\n const entry = this._entries[name]\n const isFile = entry instanceof FileHandle\n if (entry && isFile) return entry\n if (entry && !isFile) throw new DOMException(...MISMATCH)\n if (!entry && !opts.create) throw new DOMException(...GONE)\n if (!entry && opts.create) {\n return (this._entries[name] = new FileHandle(name))\n }\n }\n\n async removeEntry (name, opts) {\n const entry = this._entries[name]\n if (!entry) throw new DOMException(...GONE)\n await entry._destroy(opts.recursive)\n delete this._entries[name]\n }\n\n async _destroy (recursive) {\n for (let x of Object.values(this._entries)) {\n if (!recursive) throw new DOMException(...MOD_ERR)\n await x._destroy(recursive)\n }\n this._entries = {}\n this._deleted = true\n }\n}\n\nconst fs = new FolderHandle('')\n\nexport default () => fs\n", "/* global Blob, DOMException */\n\nimport { errors } from '../util.js'\n\nconst { DISALLOWED } = errors\n\nclass Sink {\n /**\n * @param {FileWriter} writer\n * @param {FileEntry} fileEntry\n */\n constructor (writer, fileEntry) {\n this.writer = writer\n this.fileEntry = fileEntry\n }\n\n /**\n * @param {BlobPart | Object} chunk\n */\n async write (chunk) {\n if (typeof chunk === 'object') {\n if (chunk.type === 'write') {\n if (Number.isInteger(chunk.position) && chunk.position >= 0) {\n this.writer.seek(chunk.position)\n if (this.writer.position !== chunk.position) {\n await new Promise((resolve, reject) => {\n this.writer.onwriteend = resolve\n this.writer.onerror = reject\n this.writer.truncate(chunk.position)\n })\n this.writer.seek(chunk.position)\n }\n }\n if (!('data' in chunk)) {\n throw new DOMException('Failed to execute \\'write\\' on \\'UnderlyingSinkBase\\': Invalid params passed. write requires a data argument', 'SyntaxError')\n }\n chunk = chunk.data\n } else if (chunk.type === 'seek') {\n if (Number.isInteger(chunk.position) && chunk.position >= 0) {\n this.writer.seek(chunk.position)\n if (this.writer.position !== chunk.position) {\n throw new DOMException('seeking position failed', 'InvalidStateError')\n }\n return\n } else {\n throw new DOMException('Failed to execute \\'write\\' on \\'UnderlyingSinkBase\\': Invalid params passed. seek requires a position argument', 'SyntaxError')\n }\n } else if (chunk.type === 'truncate') {\n return new Promise(resolve => {\n if (Number.isInteger(chunk.size) && chunk.size >= 0) {\n this.writer.onwriteend = evt => resolve()\n this.writer.truncate(chunk.size)\n } else {\n throw new DOMException('Failed to execute \\'write\\' on \\'UnderlyingSinkBase\\': Invalid params passed. truncate requires a size argument', 'SyntaxError')\n }\n })\n }\n }\n await new Promise((resolve, reject) => {\n this.writer.onwriteend = resolve\n this.writer.onerror = reject\n this.writer.write(new Blob([chunk]))\n })\n }\n\n close () {\n return new Promise(this.fileEntry.file.bind(this.fileEntry))\n }\n}\n\nexport class FileHandle {\n /** @param {FileEntry} file */\n constructor (file, writable = true) {\n this.file = file\n this.kind = 'file'\n this.writable = writable\n this.readable = true\n }\n\n get name () {\n return this.file.name\n }\n\n /**\n * @param {{ file: { toURL: () => string; }; }} other\n */\n isSameEntry (other) {\n return this.file.toURL() === other.file.toURL()\n }\n\n /** @return {Promise<File>} */\n getFile () {\n return new Promise(this.file.file.bind(this.file))\n }\n\n /** @return {Promise<Sink>} */\n createWritable (opts) {\n if (!this.writable) throw new DOMException(...DISALLOWED)\n\n return new Promise((resolve, reject) =>\n this.file.createWriter(fileWriter => {\n if (opts.keepExistingData === false) {\n fileWriter.onwriteend = evt => resolve(new Sink(fileWriter, this.file))\n fileWriter.truncate(0)\n } else {\n resolve(new Sink(fileWriter, this.file))\n }\n }, reject)\n )\n }\n}\n\nexport class FolderHandle {\n /** @param {DirectoryEntry} dir */\n constructor (dir, writable = true) {\n this.dir = dir\n this.writable = writable\n this.readable = true\n this.kind = 'directory'\n this.name = dir.name\n }\n\n /** @param {FolderHandle} other */\n isSameEntry (other) {\n return this.dir.fullPath === other.dir.fullPath\n }\n\n /** @returns {AsyncGenerator<[string, FileHandle | FolderHandle]>} */\n async * entries () {\n const reader = this.dir.createReader()\n const entries = await new Promise(reader.readEntries.bind(reader))\n for (const x of entries) {\n yield [x.name, x.isFile ? new FileHandle(x, this.writable) : new FolderHandle(x, this.writable)]\n }\n }\n\n /**\n * @param {string} name\n * @param {{ create: boolean; }} opts\n * @returns {Promise<FolderHandle>}\n */\n getDirectoryHandle (name, opts) {\n return new Promise((resolve, reject) => {\n this.dir.getDirectory(name, opts, dir => {\n resolve(new FolderHandle(dir))\n }, reject)\n })\n }\n\n /**\n * @param {string} name\n * @param {{ create: boolean; }} opts\n * @returns {Promise<FileHandle>}\n */\n getFileHandle (name, opts) {\n return new Promise((resolve, reject) =>\n this.dir.getFile(name, opts, file => resolve(new FileHandle(file)), reject)\n )\n }\n\n /**\n * @param {string} name\n * @param {{ recursive: boolean; }} opts\n */\n async removeEntry (name, opts) {\n /** @type {Error|FolderHandle|FileHandle} */\n const entry = await this.getDirectoryHandle(name, { create: false }).catch(err =>\n err.name === 'TypeMismatchError' ? this.getFileHandle(name, { create: false }) : err\n )\n\n if (entry instanceof Error) throw entry\n\n return new Promise((resolve, reject) => {\n if (entry instanceof FolderHandle) {\n opts.recursive\n ? entry.dir.removeRecursively(() => resolve(), reject)\n : entry.dir.remove(() => resolve(), reject)\n } else if (entry.file) {\n entry.file.remove(() => resolve(), reject)\n }\n })\n }\n}\n\nexport default (opts = {}) => new Promise((resolve, reject) =>\n window.webkitRequestFileSystem(\n opts._persistent, 0,\n e => resolve(new FolderHandle(e.root)),\n reject\n )\n)\n", "const kAdapter = Symbol('adapter')\n\nclass FileSystemHandle {\n /** @type {FileSystemHandle} */\n [kAdapter]\n\n /** @type {string} */\n name\n /** @type {('file'|'directory')} */\n kind\n\n /** @param {FileSystemHandle & {writable}} adapter */\n constructor (adapter) {\n this.kind = adapter.kind\n this.name = adapter.name\n this[kAdapter] = adapter\n }\n\n async queryPermission ({mode = 'read'} = {}) {\n const handle = this[kAdapter]\n\n if (handle.queryPermission) {\n return handle.queryPermission({mode})\n }\n\n if (mode === 'read') {\n return 'granted'\n } else if (mode === 'readwrite') {\n return handle.writable ? 'granted' : 'denied'\n } else {\n throw new TypeError(`Mode ${mode} must be 'read' or 'readwrite'`)\n }\n }\n\n async requestPermission ({mode = 'read'} = {}) {\n const handle = this[kAdapter]\n if (handle.requestPermission) {\n return handle.requestPermission({mode})\n }\n\n if (mode === 'read') {\n return 'granted'\n } else if (mode === 'readwrite') {\n return handle.writable ? 'granted' : 'denied'\n } else {\n throw new TypeError(`Mode ${mode} must be 'read' or 'readwrite'`)\n }\n }\n\n /**\n * Attempts to remove the entry represented by handle from the underlying file system.\n *\n * @param {object} options\n * @param {boolean} [options.recursive=false]\n */\n async remove (options = {}) {\n await this[kAdapter].remove(options)\n }\n\n /**\n * @param {FileSystemHandle} other\n */\n async isSameEntry (other) {\n if (this === other) return true\n if (\n (!other) ||\n (typeof other !== 'object') ||\n (this.kind !== other.kind) ||\n (!other[kAdapter])\n ) return false\n return this[kAdapter].isSameEntry(other[kAdapter])\n }\n}\n\nObject.defineProperty(FileSystemHandle.prototype, Symbol.toStringTag, {\n value: 'FileSystemHandle',\n writable: false,\n enumerable: false,\n configurable: true\n})\n\nexport default FileSystemHandle\nexport { FileSystemHandle }\n", "import config from './config.js'\n\nconst { WritableStream } = config\n\nclass FileSystemWritableFileStream extends WritableStream {\n constructor (...args) {\n super(...args)\n\n // Stupid Safari hack to extend native classes\n // https://bugs.webkit.org/show_bug.cgi?id=226201\n Object.setPrototypeOf(this, FileSystemWritableFileStream.prototype)\n\n /** @private */\n this._closed = false\n }\n\n close () {\n this._closed = true\n const w = this.getWriter()\n const p = w.close()\n w.releaseLock()\n return p\n // return super.close ? super.close() : this.getWriter().close()\n }\n\n /** @param {number} position */\n seek (position) {\n return this.write({ type: 'seek', position })\n }\n\n /** @param {number} size */\n truncate (size) {\n return this.write({ type: 'truncate', size })\n }\n\n write (data) {\n if (this._closed) {\n return Promise.reject(new TypeError('Cannot write to a CLOSED writable stream'))\n }\n\n const writer = this.getWriter()\n const p = writer.write(data)\n writer.releaseLock()\n return p\n }\n}\n\nObject.defineProperty(FileSystemWritableFileStream.prototype, Symbol.toStringTag, {\n value: 'FileSystemWritableFileStream',\n writable: false,\n enumerable: false,\n configurable: true\n})\n\nObject.defineProperties(FileSystemWritableFileStream.prototype, {\n close: { enumerable: true },\n seek: { enumerable: true },\n truncate: { enumerable: true },\n write: { enumerable: true }\n})\n\nexport default FileSystemWritableFileStream\nexport { FileSystemWritableFileStream }\n", "import FileSystemHandle from './FileSystemHandle.js'\nimport FileSystemWritableFileStream from './FileSystemWritableFileStream.js'\n\nconst kAdapter = Symbol('adapter')\n\nclass FileSystemFileHandle extends FileSystemHandle {\n /** @type {FileSystemFileHandle} */\n [kAdapter]\n\n constructor (adapter) {\n super(adapter)\n this[kAdapter] = adapter\n }\n\n /**\n * @param {Object} [options={}]\n * @param {boolean} [options.keepExistingData]\n * @returns {Promise<FileSystemWritableFileStream>}\n */\n async createWritable (options = {}) {\n return new FileSystemWritableFileStream(\n await this[kAdapter].createWritable(options)\n )\n }\n\n /**\n * @returns {Promise<File>}\n */\n async getFile () {\n return this[kAdapter].getFile()\n }\n}\n\nObject.defineProperty(FileSystemFileHandle.prototype, Symbol.toStringTag, {\n value: 'FileSystemFileHandle',\n writable: false,\n enumerable: false,\n configurable: true\n})\n\nObject.defineProperties(FileSystemFileHandle.prototype, {\n createWritable: { enumerable: true },\n getFile: { enumerable: true }\n})\n\nexport default FileSystemFileHandle\nexport { FileSystemFileHandle }\n", "import FileSystemHandle from './FileSystemHandle.js'\n\nconst kAdapter = Symbol('adapter')\n\nclass FileSystemDirectoryHandle extends FileSystemHandle {\n /** @type {FileSystemDirectoryHandle} */\n [kAdapter]\n\n constructor (adapter) {\n super(adapter)\n this[kAdapter] = adapter\n }\n\n /**\n * @param {string} name Name of the directory\n * @param {object} [options]\n * @param {boolean} [options.create] create the directory if don't exist\n * @returns {Promise<FileSystemDirectoryHandle>}\n */\n async getDirectoryHandle (name, options = {}) {\n if (name === '') {\n throw new TypeError(`Name can't be an empty string.`)\n }\n if (name === '.' || name === '..' || name.includes('/')) {\n throw new TypeError(`Name contains invalid characters.`)\n }\n options.create = !!options.create\n const handle = await this[kAdapter].getDirectoryHandle(name, options)\n return new FileSystemDirectoryHandle(handle)\n }\n\n /** @returns {AsyncGenerator<[string, FileSystemHandle | FileSystemDirectoryHandle]>} */\n async * entries () {\n const {FileSystemFileHandle} = await import('./FileSystemFileHandle.js')\n\n for await (const [_, entry] of this[kAdapter].entries())\n yield [entry.name, entry.kind === 'file'\n ? new FileSystemFileHandle(entry)\n : new FileSystemDirectoryHandle(entry)]\n }\n\n /** @deprecated use .entries() instead */\n async * getEntries() {\n const {FileSystemFileHandle} = await import('./FileSystemFileHandle.js')\n console.warn('deprecated, use .entries() instead')\n for await (let entry of this[kAdapter].entries())\n yield entry.kind === 'file'\n ? new FileSystemFileHandle(entry)\n : new FileSystemDirectoryHandle(entry)\n }\n\n /**\n * @param {string} name Name of the file\n * @param {object} [options]\n * @param {boolean} [options.create] create the file if don't exist\n */\n async getFileHandle (name, options = {}) {\n const {FileSystemFileHandle} = await import('./FileSystemFileHandle.js')\n if (name === '') throw new TypeError(`Name can't be an empty string.`)\n if (name === '.' || name === '..' || name.includes('/')) {\n throw new TypeError(`Name contains invalid characters.`)\n }\n options.create = !!options.create\n const handle = await this[kAdapter].getFileHandle(name, options)\n return new FileSystemFileHandle(handle)\n }\n\n /**\n * @param {string} name\n * @param {object} [options]\n * @param {boolean} [options.recursive]\n */\n async removeEntry (name, options = {}) {\n if (name === '') {\n throw new TypeError(`Name can't be an empty string.`)\n }\n if (name === '.' || name === '..' || name.includes('/')) {\n throw new TypeError(`Name contains invalid characters.`)\n }\n options.recursive = !!options.recursive // cuz node's fs.rm require boolean\n return this[kAdapter].removeEntry(name, options)\n }\n\n async resolve (possibleDescendant) {\n if (await possibleDescendant.isSameEntry(this)) {\n return []\n }\n\n const openSet = [{ handle: this, path: [] }]\n\n while (openSet.length) {\n let { handle: current, path } = openSet.pop()\n for await (const entry of current.values()) {\n if (await entry.isSameEntry(possibleDescendant)) {\n return [...path, entry.name]\n }\n if (entry.kind === 'directory') {\n openSet.push({ handle: entry, path: [...path, entry.name] })\n }\n }\n }\n\n return null\n }\n\n async * keys () {\n for await (const [name] of this[kAdapter].entries())\n yield name\n }\n\n async * values () {\n for await (const [_, entry] of this)\n yield entry\n }\n\n [Symbol.asyncIterator]() {\n return this.entries()\n }\n}\n\nObject.defineProperty(FileSystemDirectoryHandle.prototype, Symbol.toStringTag, {\n\tvalue: 'FileSystemDirectoryHandle',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n})\n\nObject.defineProperties(FileSystemDirectoryHandle.prototype, {\n\tgetDirectoryHandle: { enumerable: true },\n\tentries: { enumerable: true },\n\tgetFileHandle: { enumerable: true },\n\tremoveEntry: { enumerable: true }\n})\n\nexport default FileSystemDirectoryHandle\nexport { FileSystemDirectoryHandle }\n", "export const errors = {\n INVALID: ['seeking position failed.', 'InvalidStateError'],\n GONE: ['A requested file or directory could not be found at the time an operation was processed.', 'NotFoundError'],\n MISMATCH: ['The path supplied exists, but was not an entry of requested type.', 'TypeMismatchError'],\n MOD_ERR: ['The object can not be modified in this way.', 'InvalidModificationError'],\n SYNTAX: m => [`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${m}`, 'SyntaxError'],\n SECURITY: ['It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.', 'SecurityError'],\n DISALLOWED: ['The request is not allowed by the user agent or the platform in the current context.', 'NotAllowedError']\n}\n\nexport const config = {\n writable: globalThis.WritableStream\n}\n\nexport async function fromDataTransfer (entries) {\n console.warn('deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead')\n const [memory, sandbox, fs] = await Promise.all([\n import('./adapters/memory.js'),\n import('./adapters/sandbox.js'),\n import('./FileSystemDirectoryHandle.js')\n ])\n\n const folder = new memory.FolderHandle('', false)\n folder._entries = entries.map(entry => entry.isFile\n ? new sandbox.FileHandle(entry, false)\n : new sandbox.FolderHandle(entry, false)\n )\n\n return new fs.FileSystemDirectoryHandle(folder)\n}\n\nexport async function getDirHandlesFromInput (input) {\n const { FolderHandle, FileHandle } = await import('./adapters/memory.js')\n const { FileSystemDirectoryHandle } = await import('./FileSystemDirectoryHandle.js')\n\n const files = Array.from(input.files)\n const rootName = files[0].webkitRelativePath.split('/', 1)[0]\n const root = new FolderHandle(rootName, false)\n\n files.forEach(file => {\n const path = file.webkitRelativePath.split('/')\n path.shift()\n const name = path.pop()\n\n const dir = path.reduce((dir, path) => {\n if (!dir._entries[path]) dir._entries[path] = new FolderHandle(path, false)\n return dir._entries[path]\n }, root)\n\n dir._entries[name] = new FileHandle(file.name, file, false)\n })\n\n return new FileSystemDirectoryHandle(root)\n}\n\nexport async function getFileHandlesFromInput (input) {\n const { FileHandle } = await import('./adapters/memory.js')\n const { FileSystemFileHandle } = await import('./FileSystemFileHandle.js')\n\n return Array.from(input.files).map(file =>\n new FileSystemFileHandle(new FileHandle(file.name, file, false))\n )\n}\n", "import { errors } from '../util.js'\nimport config from '../config.js'\n\nconst {\n WritableStream,\n TransformStream,\n DOMException,\n Blob\n} = config\n\nconst { GONE } = errors\n// @ts-ignore\nconst isSafari = /constructor/i.test(window.HTMLElement) || window.safari || window.WebKitPoint\n\nexport class FileHandle {\n constructor (name = 'unkown') {\n this.name = name\n this.kind = 'file'\n }\n\n async getFile () {\n throw new DOMException(...GONE)\n }\n\n async isSameEntry(other) {\n return this === other\n }\n\n /**\n * @param {object} [options={}]\n */\n async createWritable (options = {}) {\n const sw = await navigator.serviceWorker?.getRegistration()\n const link = document.createElement('a')\n const ts = new TransformStream()\n const sink = ts.writable\n\n link.download = this.name\n\n if (isSafari || !sw) {\n /** @type {Blob[]} */\n let chunks = []\n ts.readable.pipeTo(new WritableStream({\n write (chunk) {\n chunks.push(new Blob([chunk]))\n },\n close () {\n const blob = new Blob(chunks, { type: 'application/octet-stream; charset=utf-8' })\n chunks = []\n link.href = URL.createObjectURL(blob)\n link.click()\n setTimeout(() => URL.revokeObjectURL(link.href), 10000)\n }\n }))\n } else {\n const { writable, readablePort } = new RemoteWritableStream(WritableStream)\n // Make filename RFC5987 compatible\n const fileName = encodeURIComponent(this.name).replace(/['()]/g, escape).replace(/\\*/g, '%2A')\n const headers = {\n 'content-disposition': \"attachment; filename*=UTF-8''\" + fileName,\n 'content-type': 'application/octet-stream; charset=utf-8',\n ...(options.size ? { 'content-length': options.size } : {})\n }\n\n const keepAlive = setTimeout(() => sw.active.postMessage(0), 10000)\n\n ts.readable.pipeThrough(new TransformStream({\n transform (chunk, ctrl) {\n if (chunk instanceof Uint8Array) return ctrl.enqueue(chunk)\n const reader = new Response(chunk).body.getReader()\n const pump = _ => reader.read().then(e => e.done ? 0 : pump(ctrl.enqueue(e.value)))\n return pump()\n }\n })).pipeTo(writable).finally(() => {\n clearInterval(keepAlive)\n })\n\n // Transfer the stream to service worker\n sw.active.postMessage({\n url: sw.scope + fileName,\n headers,\n readablePort\n }, [readablePort])\n\n // Trigger the download with a hidden iframe\n const iframe = document.createElement('iframe')\n iframe.hidden = true\n iframe.src = sw.scope + fileName\n document.body.appendChild(iframe)\n }\n\n return sink.getWriter()\n }\n}\n\nconst WRITE = 0\nconst PULL = 0\nconst ERROR = 1\nconst ABORT = 1\nconst CLOSE = 2\n\nclass MessagePortSink {\n /** @param {MessagePort} port */\n constructor (port) {\n port.onmessage = event => this._onMessage(event.data)\n this._port = port\n this._resetReady()\n }\n\n start (controller) {\n this._controller = controller\n // Apply initial backpressure\n return this._readyPromise\n }\n\n write (chunk) {\n const message = { type: WRITE, chunk }\n\n // Send chunk\n this._port.postMessage(message, [chunk.buffer])\n\n // Assume backpressure after every write, until sender pulls\n this._resetReady()\n\n // Apply backpressure\n return this._readyPromise\n }\n\n close () {\n this._port.postMessage({ type: CLOSE })\n this._port.close()\n }\n\n abort (reason) {\n this._port.postMessage({ type: ABORT, reason })\n this._port.close()\n }\n\n _onMessage (message) {\n if (message.type === PULL) this._resolveReady()\n if (message.type === ERROR) this._onError(message.reason)\n }\n\n _onError (reason) {\n this._controller.error(reason)\n this._rejectReady(reason)\n this._port.close()\n }\n\n _resetReady () {\n this._readyPromise = new Promise((resolve, reject) => {\n this._readyResolve = resolve\n this._readyReject = reject\n })\n this._readyPending = true\n }\n\n _resolveReady () {\n this._readyResolve()\n this._readyPending = false\n }\n\n _rejectReady (reason) {\n if (!this._readyPending) this._resetReady()\n this._readyPromise.catch(() => {})\n this._readyReject(reason)\n this._readyPending = false\n }\n}\n\nclass RemoteWritableStream {\n constructor (WritableStream) {\n const channel = new MessageChannel()\n this.readablePort = channel.port1\n this.writable = new WritableStream(\n new MessagePortSink(channel.port2)\n )\n }\n}\n", "class InnerDbConnection {\r\n constructor(private readonly database: IDBDatabase) { }\r\n\r\n private openStore(store: string, mode: IDBTransactionMode): IDBObjectStore {\r\n const tx = this.database.transaction(store, mode);\r\n return tx.objectStore(store);\r\n }\r\n\r\n public async put(store: string, obj: any, key?: IDBValidKey): Promise<IDBValidKey> {\r\n const os = this.openStore(store, \"readwrite\");\r\n\r\n return await new Promise((resolve, reject) => {\r\n const response = os.put(obj, key);\r\n response.onsuccess = () => {\r\n resolve(response.result);\r\n };\r\n response.onerror = () => {\r\n reject(response.error);\r\n };\r\n });\r\n }\r\n\r\n public get(store: string, key: IDBValidKey): any {\r\n const os = this.openStore(store, \"readonly\");\r\n\r\n return new Promise((resolve, reject) => {\r\n const response = os.get(key);\r\n response.onsuccess = () => {\r\n resolve(response.result);\r\n };\r\n response.onerror = () => {\r\n reject(response.error);\r\n };\r\n });\r\n }\r\n\r\n public async delete(store: string, key: IDBValidKey): Promise<void> {\r\n const os = this.openStore(store, \"readwrite\");\r\n\r\n return await new Promise((resolve, reject) => {\r\n const response = os.delete(key);\r\n response.onsuccess = () => {\r\n resolve();\r\n };\r\n response.onerror = () => {\r\n reject(response.error);\r\n };\r\n });\r\n }\r\n\r\n public close() {\r\n this.database.close();\r\n }\r\n}\r\n\r\nclass IndexedDbWrapper {\r\n constructor(private readonly databaseName: string, private readonly objectStores: [string]) {\r\n }\r\n\r\n public async connect(): Promise<InnerDbConnection> {\r\n const conn = window.indexedDB.open(this.databaseName, 1);\r\n\r\n conn.onupgradeneeded = event => {\r\n const db = (event.target as IDBRequest<IDBDatabase>).result;\r\n this.objectStores.forEach(store => {\r\n db.createObjectStore(store);\r\n });\r\n };\r\n\r\n return await new Promise((resolve, reject) => {\r\n conn.onsuccess = event => {\r\n resolve(new InnerDbConnection((event.target as IDBRequest<IDBDatabase>).result));\r\n };\r\n conn.onerror = event => {\r\n reject((event.target as IDBRequest<IDBDatabase>).error);\r\n };\r\n });\r\n }\r\n}\r\n\r\nexport const fileBookmarksStore: string = \"fileBookmarks\";\r\nexport const avaloniaDb = new IndexedDbWrapper(\"AvaloniaDb\", [\r\n fileBookmarksStore\r\n]);\r\n", "// Based on https://github.com/component/textarea-caret-position/blob/master/index.js\r\nexport class CaretHelper {\r\n public static getCaretCoordinates(\r\n element: HTMLInputElement | HTMLTextAreaElement,\r\n position: number,\r\n options?: { debug: boolean }\r\n ) {\r\n if (!isBrowser) {\r\n throw new Error(\r\n \"textarea-caret-position#getCaretCoordinates should only be called in a browser\"\r\n );\r\n }\r\n\r\n const debug = options?.debug ?? false;\r\n if (debug) {\r\n const el = document.querySelector(\r\n \"#input-textarea-caret-position-mirror-div\"\r\n );\r\n if (el) el.parentNode?.removeChild(el);\r\n }\r\n\r\n // The mirror div will replicate the textarea's style\r\n const div = document.createElement(\"div\");\r\n div.id = \"input-textarea-caret-position-mirror-div\";\r\n document.body.appendChild(div);\r\n\r\n const style = div.style;\r\n const computed = window.getComputedStyle\r\n ? window.getComputedStyle(element)\r\n : ((element as any).currentStyle as CSSStyleDeclaration); // currentStyle for IE < 9\r\n const isInput = element.nodeName === \"INPUT\";\r\n\r\n // Default textarea styles\r\n style.whiteSpace = \"pre-wrap\";\r\n if (!isInput) style.wordWrap = \"break-word\"; // only for textarea-s\r\n\r\n // Position off-screen\r\n style.position = \"absolute\"; // required to return coordinates properly\r\n if (!debug) style.visibility = \"hidden\"; // not 'display: none' because we want rendering\r\n\r\n // Transfer the element's properties to the div\r\n properties.forEach((prop: string) => {\r\n if (isInput && prop === \"lineHeight\") {\r\n // Special case for <input>s because text is rendered centered and line height may be != height\r\n if (computed.boxSizing === \"border-box\") {\r\n const height = parseInt(computed.height);\r\n const outerHeight =\r\n parseInt(computed.paddingTop) +\r\n parseInt(computed.paddingBottom) +\r\n parseInt(computed.borderTopWidth) +\r\n parseInt(computed.borderBottomWidth);\r\n const targetHeight = outerHeight + parseInt(computed.lineHeight);\r\n if (height > targetHeight) {\r\n style.lineHeight = `${height - outerHeight}px`;\r\n } else if (height === targetHeight) {\r\n style.lineHeight = computed.lineHeight;\r\n } else {\r\n style.lineHeight = \"0\";\r\n }\r\n } else {\r\n style.lineHeight = computed.height;\r\n }\r\n } else {\r\n (style as any)[prop] = (computed as any)[prop];\r\n }\r\n });\r\n\r\n if (isFirefox) {\r\n // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\r\n if (element.scrollHeight > parseInt(computed.height)) {\r\n style.overflowY = \"scroll\";\r\n }\r\n } else {\r\n style.overflow = \"hidden\"; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\r\n }\r\n\r\n div.textContent = element.value.substring(0, position);\r\n // The second special handling for input type=\"text\" vs textarea:\r\n // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\r\n if (isInput) div.textContent = div.textContent.replace(/\\s/g, \"\\u00a0\");\r\n\r\n const span = document.createElement(\"span\");\r\n // Wrapping must be replicated *exactly*, including when a long word gets\r\n // onto the next line, with whitespace at the end of the line before (#7).\r\n // The *only* reliable way to do that is to copy the *entire* rest of the\r\n // textarea's content into the <span> created at the caret position.\r\n // For inputs, just '.' would be enough, but no need to bother.\r\n span.textContent = element.value.substring(position) || \".\"; // || because a completely empty faux span doesn't render at all\r\n div.appendChild(span);\r\n\r\n const coordinates = {\r\n top: span.offsetTop + parseInt(computed.borderTopWidth),\r\n left: span.offsetLeft + parseInt(computed.borderLeftWidth),\r\n height: parseInt(computed.lineHeight)\r\n };\r\n\r\n if (debug) {\r\n span.style.backgroundColor = \"#aaa\";\r\n } else {\r\n document.body.removeChild(div);\r\n }\r\n\r\n return coordinates;\r\n }\r\n}\r\n\r\nconst properties = [\r\n \"direction\", // RTL support\r\n \"boxSizing\",\r\n \"width\", // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\r\n \"height\",\r\n \"overflowX\",\r\n \"overflowY\", // copy the scrollbar for IE\r\n\r\n \"borderTopWidth\",\r\n \"borderRightWidth\",\r\n \"borderBottomWidth\",\r\n \"borderLeftWidth\",\r\n \"borderStyle\",\r\n\r\n \"paddingTop\",\r\n \"paddingRight\",\r\n \"paddingBottom\",\r\n \"paddingLeft\",\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font\r\n \"fontStyle\",\r\n \"fontVariant\",\r\n \"fontWeight\",\r\n \"fontStretch\",\r\n \"fontSize\",\r\n \"fontSizeAdjust\",\r\n \"lineHeight\",\r\n \"fontFamily\",\r\n\r\n \"textAlign\",\r\n \"textTransform\",\r\n \"textIndent\",\r\n \"textDecoration\", // might not make a difference, but better be safe\r\n\r\n \"letterSpacing\",\r\n \"wordSpacing\",\r\n\r\n \"tabSize\",\r\n \"MozTabSize\"\r\n];\r\n\r\nconst isBrowser = typeof window !== \"undefined\";\r\nconst isFirefox = isBrowser && (window as any).mozInnerScreenX != null;\r\n", "import { CaretHelper } from \"./caretHelper\";\r\n\r\nenum RawInputModifiers {\r\n None = 0,\r\n Alt = 1,\r\n Control = 2,\r\n Shift = 4,\r\n Meta = 8,\r\n\r\n LeftMouseButton = 16,\r\n RightMouseButton = 32,\r\n MiddleMouseButton = 64,\r\n XButton1MouseButton = 128,\r\n XButton2MouseButton = 256,\r\n KeyboardMask = Alt | Control | Shift | Meta,\r\n\r\n PenInverted = 512,\r\n PenEraser = 1024,\r\n PenBarrelButton = 2048\r\n}\r\n\r\n/*\r\n* This is a hack to handle Mozilla clipboard events in a more convinient way for framework users.\r\n* In the browser, events go in order KeyDown -> Paste -> KeyUp.\r\n* On KeyDown we trigger Avalonia handlers, which might execute readClipboardText.\r\n* When readClipboardText was executed, we mark ClipboardState as Pending and setup clipboard promise,\r\n* which will un-handle KeyDown event, basically allowing browser to pass a Paste event properly.\r\n* On actual Paste event we execute promise callbacks, resuming async operation, and returning pasted text to the app.\r\n* Note #1, on every KeyUp event we will reset all the state and reject pending promises if any, as this event it expected to come after Paste.\r\n* Note #2, whole this code will be executed only on legacy browsers like Mozilla, where clipboard.readText is not available.\r\n* Note #3, with all of these hacks Clipboard.ReadText will still work only on actual \"paste\" gesture initiated by user.\r\n* */\r\nenum ClipboardState {\r\n None,\r\n Ready,\r\n Pending\r\n}\r\n\r\nexport class InputHelper {\r\n static clipboardState: ClipboardState = ClipboardState.None;\r\n static resolveClipboard?: any;\r\n static rejectClipboard?: any;\r\n\r\n public static initializeBackgroundHandlers() {\r\n if (this.clipboardState !== ClipboardState.None) {\r\n return;\r\n }\r\n\r\n globalThis.addEventListener(\"paste\", (args: any) => {\r\n if (this.clipboardState === ClipboardState.Pending) {\r\n this.resolveClipboard(args.clipboardData.getData(\"text\"));\r\n }\r\n });\r\n this.clipboardState = ClipboardState.Ready;\r\n }\r\n\r\n public static async readClipboardText(): Promise<string> {\r\n if (globalThis.navigator.clipboard.readText) {\r\n return await globalThis.navigator.clipboard.readText();\r\n } else {\r\n try {\r\n return await new Promise<any>((resolve, reject) => {\r\n this.clipboardState = ClipboardState.Pending;\r\n this.resolveClipboard = resolve;\r\n this.rejectClipboard = reject;\r\n });\r\n } finally {\r\n this.clipboardState = ClipboardState.Ready;\r\n this.resolveClipboard = null;\r\n this.rejectClipboard = null;\r\n }\r\n }\r\n }\r\n\r\n public static subscribeKeyEvents(\r\n element: HTMLInputElement,\r\n keyDownCallback: (code: string, key: string, modifiers: RawInputModifiers) => boolean,\r\n keyUpCallback: (code: string, key: string, modifiers: RawInputModifiers) => boolean) {\r\n const keyDownHandler = (args: KeyboardEvent) => {\r\n if (keyDownCallback(args.code, args.key, this.getModifiers(args))) {\r\n if (this.clipboardState !== ClipboardState.Pending) {\r\n args.preventDefault();\r\n }\r\n }\r\n };\r\n element.addEventListener(\"keydown\", keyDownHandler);\r\n\r\n const keyUpHandler = (args: KeyboardEvent) => {\r\n if (keyUpCallback(args.code, args.key, this.getModifiers(args))) {\r\n args.preventDefault();\r\n }\r\n if (this.rejectClipboard) {\r\n this.rejectClipboard();\r\n }\r\n };\r\n\r\n element.addEventListener(\"keyup\", keyUpHandler);\r\n\r\n return () => {\r\n element.removeEventListener(\"keydown\", keyDownHandler);\r\n element.removeEventListener(\"keyup\", keyUpHandler);\r\n };\r\n }\r\n\r\n public static subscribeTextEvents(\r\n element: HTMLInputElement,\r\n beforeInputCallback: (args: InputEvent, start: number, end: number) => boolean,\r\n inputCallback: (type: string, data: string | null) => boolean,\r\n compositionStartCallback: (args: CompositionEvent) => boolean,\r\n compositionUpdateCallback: (args: CompositionEvent) => boolean,\r\n compositionEndCallback: (args: CompositionEvent) => boolean) {\r\n const inputHandler = (args: Event) => {\r\n const inputEvent = args as InputEvent;\r\n\r\n // todo check cast\r\n if (inputCallback(inputEvent.type, inputEvent.data)) {\r\n args.preventDefault();\r\n }\r\n };\r\n element.addEventListener(\"input\", inputHandler);\r\n\r\n const compositionStartHandler = (args: CompositionEvent) => {\r\n if (compositionStartCallback(args)) {\r\n args.preventDefault();\r\n }\r\n };\r\n element.addEventListener(\"compositionstart\", compositionStartHandler);\r\n\r\n const beforeInputHandler = (args: InputEvent) => {\r\n const ranges = args.getTargetRanges();\r\n let start = -1;\r\n let end = -1;\r\n if (ranges.length > 0) {\r\n start = ranges[0].startOffset;\r\n end = ranges[0].endOffset;\r\n }\r\n\r\n if (args.inputType === \"insertCompositionText\") {\r\n start = 2;\r\n end = start + 2;\r\n }\r\n if (beforeInputCallback(args, start, end)) {\r\n args.preventDefault();\r\n }\r\n };\r\n element.addEventListener(\"beforeinput\", beforeInputHandler);\r\n\r\n const compositionUpdateHandler = (args: CompositionEvent) => {\r\n if (compositionUpdateCallback(args)) {\r\n args.preventDefault();\r\n }\r\n };\r\n element.addEventListener(\"compositionupdate\", compositionUpdateHandler);\r\n\r\n const compositionEndHandler = (args: CompositionEvent) => {\r\n if (compositionEndCallback(args)) {\r\n args.preventDefault();\r\n }\r\n };\r\n element.addEventListener(\"compositionend\", compositionEndHandler);\r\n\r\n return () => {\r\n element.removeEventListener(\"input\", inputHandler);\r\n element.removeEventListener(\"compositionstart\", compositionStartHandler);\r\n element.removeEventListener(\"compositionupdate\", compositionUpdateHandler);\r\n element.removeEventListener(\"compositionend\", compositionEndHandler);\r\n };\r\n }\r\n\r\n public static subscribePointerEvents(\r\n element: HTMLInputElement,\r\n pointerMoveCallback: (args: PointerEvent) => boolean,\r\n pointerDownCallback: (args: PointerEvent) => boolean,\r\n pointerUpCallback: (args: PointerEvent) => boolean,\r\n pointerCancelCallback: (args: PointerEvent) => boolean,\r\n wheelCallback: (args: WheelEvent) => boolean\r\n ) {\r\n const pointerMoveHandler = (args: PointerEvent) => {\r\n pointerMoveCallback(args);\r\n args.preventDefault();\r\n };\r\n\r\n const pointerDownHandler = (args: PointerEvent) => {\r\n pointerDownCallback(args);\r\n args.preventDefault();\r\n };\r\n\r\n const pointerUpHandler = (args: PointerEvent) => {\r\n pointerUpCallback(args);\r\n args.preventDefault();\r\n };\r\n\r\n const pointerCancelHandler = (args: PointerEvent) => {\r\n pointerCancelCallback(args);\r\n args.preventDefault();\r\n };\r\n\r\n const wheelHandler = (args: WheelEvent) => {\r\n wheelCallback(args);\r\n args.preventDefault();\r\n };\r\n\r\n element.addEventListener(\"pointermove\", pointerMoveHandler);\r\n element.addEventListener(\"pointerdown\", pointerDownHandler);\r\n element.addEventListener(\"pointerup\", pointerUpHandler);\r\n element.addEventListener(\"wheel\", wheelHandler);\r\n element.addEventListener(\"pointercancel\", pointerCancelHandler);\r\n\r\n return () => {\r\n element.removeEventListener(\"pointerover\", pointerMoveHandler);\r\n element.removeEventListener(\"pointerdown\", pointerDownHandler);\r\n element.removeEventListener(\"pointerup\", pointerUpHandler);\r\n element.removeEventListener(\"pointercancel\", pointerCancelHandler);\r\n element.removeEventListener(\"wheel\", wheelHandler);\r\n };\r\n }\r\n\r\n public static subscribeInputEvents(\r\n element: HTMLInputElement,\r\n inputCallback: (value: string) => boolean\r\n ) {\r\n const inputHandler = (args: Event) => {\r\n if (inputCallback((args as any).value)) {\r\n args.preventDefault();\r\n }\r\n };\r\n element.addEventListener(\"input\", inputHandler);\r\n\r\n return () => {\r\n element.removeEventListener(\"input\", inputHandler);\r\n };\r\n }\r\n\r\n public static subscribeDropEvents(\r\n element: HTMLInputElement,\r\n dragEvent: (args: any) => boolean\r\n ) {\r\n const dragHandler = (args: Event) => {\r\n if (dragEvent(args as any)) {\r\n args.preventDefault();\r\n }\r\n };\r\n element.addEventListener(\"dragover\", dragHandler);\r\n element.addEventListener(\"dragenter\", dragHandler);\r\n element.addEventListener(\"dragleave\", dragHandler);\r\n element.addEventListener(\"drop\", dragHandler);\r\n\r\n return () => {\r\n element.removeEventListener(\"dragover\", dragHandler);\r\n element.removeEventListener(\"dragenter\", dragHandler);\r\n element.removeEventListener(\"dragleave\", dragHandler);\r\n element.removeEventListener(\"drop\", dragHandler);\r\n };\r\n }\r\n\r\n public static getCoalescedEvents(pointerEvent: PointerEvent): PointerEvent[] {\r\n return pointerEvent.getCoalescedEvents();\r\n }\r\n\r\n public static clearInput(inputElement: HTMLInputElement) {\r\n inputElement.value = \"\";\r\n }\r\n\r\n public static focusElement(inputElement: HTMLElement) {\r\n inputElement.focus();\r\n }\r\n\r\n public static setCursor(inputElement: HTMLInputElement, kind: string) {\r\n if (kind === \"default\") {\r\n inputElement.style.removeProperty(\"cursor\");\r\n } else {\r\n inputElement.style.cursor = kind;\r\n }\r\n }\r\n\r\n public static setBounds(inputElement: HTMLInputElement, x: number, y: number, caretWidth: number, caretHeight: number, caret: number) {\r\n inputElement.style.left = (x).toFixed(0) + \"px\";\r\n inputElement.style.top = (y).toFixed(0) + \"px\";\r\n\r\n const { left, top } = CaretHelper.getCaretCoordinates(inputElement, caret);\r\n\r\n inputElement.style.left = (x - left).toFixed(0) + \"px\";\r\n inputElement.style.top = (y - top).toFixed(0) + \"px\";\r\n }\r\n\r\n public static hide(inputElement: HTMLInputElement) {\r\n inputElement.style.display = \"none\";\r\n }\r\n\r\n public static show(inputElement: HTMLInputElement) {\r\n inputElement.style.display = \"block\";\r\n }\r\n\r\n public static setSurroundingText(inputElement: HTMLInputElement, text: string, start: number, end: number) {\r\n if (!inputElement) {\r\n return;\r\n }\r\n\r\n inputElement.value = text;\r\n inputElement.setSelectionRange(start, end);\r\n inputElement.style.width = \"20px\";\r\n inputElement.style.width = `${inputElement.scrollWidth}px`;\r\n }\r\n\r\n private static getModifiers(args: KeyboardEvent): RawInputModifiers {\r\n let modifiers = RawInputModifiers.None;\r\n\r\n if (args.ctrlKey) { modifiers |= RawInputModifiers.Control; }\r\n if (args.altKey) { modifiers |= RawInputModifiers.Alt; }\r\n if (args.shiftKey) { modifiers |= RawInputModifiers.Shift; }\r\n if (args.metaKey) { modifiers |= RawInputModifiers.Meta; }\r\n\r\n return modifiers;\r\n }\r\n}\r\n", "export class Caniuse {\r\n public static hasNativeFilePicker(): boolean {\r\n return \"showSaveFilePicker\" in globalThis;\r\n }\r\n\r\n public static isMobile(): boolean {\r\n const userAgentData = (globalThis.navigator as any)?.userAgentData;\r\n if (userAgentData) {\r\n return userAgentData.mobile;\r\n }\r\n\r\n const userAgent = navigator.userAgent;\r\n const regex1 = /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i;\r\n const regex2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw(n|u)|c55\\/|capi|ccwa|cdm|cell|chtm|cldc|cmd|co(mp|nd)|craw|da(it|ll|ng)|dbte|dcs|devi|dica|dmob|do(c|p)o|ds(12|d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(|_)|g1 u|g560|gene|gf5|gmo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd(m|p|t)|hei|hi(pt|ta)|hp( i|ip)|hsc|ht(c(| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i(20|go|ma)|i230|iac( ||\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|[a-w])|libw|lynx|m1w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|mcr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|([1-8]|c))|phil|pire|pl(ay|uc)|pn2|po(ck|rt|se)|prox|psio|ptg|qaa|qc(07|12|21|32|60|[2-7]|i)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h|oo|p)|sdk\\/|se(c(|0|1)|47|mc|nd|ri)|sgh|shar|sie(|m)|sk0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h|v|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl|tdg|tel(i|m)|tim|tmo|to(pl|sh)|ts(70|m|m3|m5)|tx9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas|your|zeto|zte/i;\r\n return regex1.test(userAgent) || regex2.test(userAgent.substr(0, 4));\r\n }\r\n}\r\n", "import { avaloniaDb, fileBookmarksStore } from \"./indexedDb\";\r\nimport { FileSystemFileHandle, FileSystemDirectoryHandle, FileSystemWritableFileStream } from \"native-file-system-adapter\";\r\nimport { Caniuse } from \"../avalonia\";\r\n\r\nexport class StorageItem {\r\n private constructor(\r\n public handle?: FileSystemFileHandle | FileSystemDirectoryHandle,\r\n private readonly file?: File,\r\n private readonly bookmarkId?: string,\r\n public wellKnownType?: WellKnownDirectory\r\n ) {\r\n }\r\n\r\n public get name(): string {\r\n if (this.handle) {\r\n return this.handle.name;\r\n }\r\n if (this.file) {\r\n return this.file.name;\r\n }\r\n return this.wellKnownType ?? \"\";\r\n }\r\n\r\n public get kind(): \"file\" | \"directory\" {\r\n if (this.handle) {\r\n return this.handle.kind;\r\n }\r\n if (this.file) {\r\n return \"file\";\r\n }\r\n return \"directory\";\r\n }\r\n\r\n public static createFromHandle(handle: FileSystemFileHandle | FileSystemDirectoryHandle, bookmarkId?: string) {\r\n return new StorageItem(handle, undefined, bookmarkId, undefined);\r\n }\r\n\r\n public static createFromFile(file: File) {\r\n return new StorageItem(undefined, file, undefined, undefined);\r\n }\r\n\r\n public static createWellKnownDirectory(type: WellKnownDirectory) {\r\n return new StorageItem(undefined, undefined, undefined, type);\r\n }\r\n\r\n public static async openRead(item: StorageItem): Promise<Blob> {\r\n if (item.file) {\r\n return item.file;\r\n }\r\n\r\n if (!item.handle || item.kind !== \"file\") {\r\n throw new Error(\"StorageItem is not a file\");\r\n }\r\n\r\n await item.verityPermissions(\"read\");\r\n\r\n const file = await (item.handle as FileSystemFileHandle).getFile();\r\n return file;\r\n }\r\n\r\n public static async openWrite(item: StorageItem): Promise<FileSystemWritableFileStream> {\r\n if (!item.handle || item.kind !== \"file\") {\r\n throw new Error(\"StorageItem is not a writeable file\");\r\n }\r\n\r\n await item.verityPermissions(\"readwrite\");\r\n\r\n return await (item.handle as FileSystemFileHandle).createWritable({ keepExistingData: true });\r\n }\r\n\r\n public static async getProperties(item: StorageItem): Promise<{ Size: number; LastModified: number; Type: string } | null> {\r\n // getFile can fail with an exception depending if we use polyfill with a save file dialog or not.\r\n try {\r\n const file = item.handle && \"getFile\" in item.handle\r\n ? await item.handle.getFile()\r\n : item.file;\r\n\r\n if (!file) {\r\n return null;\r\n }\r\n\r\n return {\r\n Size: file.size,\r\n LastModified: file.lastModified,\r\n Type: file.type\r\n };\r\n } catch {\r\n return null;\r\n }\r\n }\r\n\r\n public static getItemsIterator(item: StorageItem): any | null {\r\n if (item.kind !== \"directory\" || !item.handle) {\r\n return null;\r\n }\r\n\r\n return (item.handle as any).entries();\r\n }\r\n\r\n public static async createFile(item: StorageItem, name: string): Promise<any | null> {\r\n if (item.kind !== \"directory\" || !item.handle) {\r\n throw new TypeError(\"Unable to create item in the requested directory\");\r\n }\r\n\r\n await item.verityPermissions(\"readwrite\");\r\n\r\n return await ((item.handle as any).getFileHandle(name, { create: true }) as Promise<any>);\r\n }\r\n\r\n public static async createFolder(item: StorageItem, name: string): Promise<any | null> {\r\n if (item.kind !== \"directory\" || !item.handle) {\r\n throw new TypeError(\"Unable to create item in the requested directory\");\r\n }\r\n\r\n await item.verityPermissions(\"readwrite\");\r\n\r\n return await ((item.handle as any).getDirectoryHandle(name, { create: true }) as Promise<any>);\r\n }\r\n\r\n public static async deleteAsync(item: StorageItem): Promise<any | null> {\r\n if (!item.handle) {\r\n return null;\r\n }\r\n\r\n await item.verityPermissions(\"readwrite\");\r\n\r\n return await ((item.handle as any).remove({ recursive: true }) as Promise<any>);\r\n }\r\n\r\n public static async moveAsync(item: StorageItem, destination: StorageItem): Promise<any | null> {\r\n if (!item.handle) {\r\n return null;\r\n }\r\n if (destination.kind !== \"directory\" || !destination.handle) {\r\n throw new TypeError(\"Unable to move item to the requested directory\");\r\n }\r\n\r\n await item.verityPermissions(\"readwrite\");\r\n\r\n return await ((item.handle as any).move(destination /*, newName */) as Promise<any>);\r\n }\r\n\r\n private async verityPermissions(mode: \"read\" | \"readwrite\"): Promise<void | never> {\r\n if (!this.handle) {\r\n return;\r\n }\r\n\r\n // If we are using polyfill, let it decide permissions by itself, we can't request anything in this case.\r\n if (!Caniuse.hasNativeFilePicker()) {\r\n return;\r\n }\r\n\r\n if (await this.handle.queryPermission({ mode }) === \"granted\") {\r\n return;\r\n }\r\n\r\n if (await this.handle.requestPermission({ mode }) === \"denied\") {\r\n throw new Error(\"Permissions denied\");\r\n }\r\n }\r\n\r\n public static async saveBookmark(item: StorageItem): Promise<string | null> {\r\n // If file was previously bookmarked, just return old one.\r\n if (item.bookmarkId) {\r\n return item.bookmarkId;\r\n }\r\n\r\n // Bookmarks are not supported with polyfill.\r\n if (!item.handle || !Caniuse.hasNativeFilePicker()) {\r\n return null;\r\n }\r\n\r\n const connection = await avaloniaDb.connect();\r\n try {\r\n const key = await connection.put(fileBookmarksStore, item.handle, item.generateBookmarkId());\r\n return key as string;\r\n } finally {\r\n connection.close();\r\n }\r\n }\r\n\r\n public static async deleteBookmark(item: StorageItem): Promise<void> {\r\n if (!item.bookmarkId || !Caniuse.hasNativeFilePicker()) {\r\n return;\r\n }\r\n\r\n const connection = await avaloniaDb.connect();\r\n try {\r\n await connection.delete(fileBookmarksStore, item.bookmarkId);\r\n } finally {\r\n connection.close();\r\n }\r\n }\r\n\r\n private generateBookmarkId(): string {\r\n return Date.now().toString(36) + Math.random().toString(36).substring(2);\r\n }\r\n}\r\n\r\nexport class StorageItems {\r\n constructor(private readonly items: StorageItem[]) { }\r\n\r\n public static itemsArray(instance: StorageItems): StorageItem[] {\r\n return instance.items;\r\n }\r\n\r\n public static filesToItemsArray(files: File[]): StorageItem[] {\r\n if (!files) {\r\n return [];\r\n }\r\n\r\n const retItems = [];\r\n for (let i = 0; i < files.length; i++) {\r\n retItems[i] = StorageItem.createFromFile(files[i]);\r\n }\r\n return retItems;\r\n }\r\n}\r\n", "/** @typedef {import('./FileSystemDirectoryHandle.js').default} FileSystemDirectoryHandle */\n\nconst native = globalThis.showDirectoryPicker\n\n/**\n * @param {Object} [options]\n * @param {boolean} [options._preferPolyfill] If you rather want to use the polyfill instead of the native\n * @returns {Promise<FileSystemDirectoryHandle>}\n */\nasync function showDirectoryPicker (options = {}) {\n if (native && !options._preferPolyfill) {\n return native(options)\n }\n\n const input = document.createElement('input')\n input.type = 'file'\n\n // Even with this check, the browser may support the attribute, but not the functionality (e.g. iOS Safari)\n if (!('webkitdirectory' in input)) {\n throw new Error(`HTMLInputElement.webkitdirectory is not supported`)\n }\n\n // See https://stackoverflow.com/questions/47664777/javascript-file-input-onchange-not-working-ios-safari-only\n input.style.position = 'fixed'\n input.style.top = '-100000px'\n input.style.left = '-100000px'\n document.body.appendChild(input)\n\n input.webkitdirectory = true\n\n // Lazy load while the user is choosing the directory\n const p = import('./util.js')\n\n await new Promise(resolve => {\n input.addEventListener('change', resolve)\n input.click()\n })\n\n return p.then(mod => mod.getDirHandlesFromInput(input))\n}\n\nexport default showDirectoryPicker\nexport { showDirectoryPicker }\n", "/** @typedef {import('./FileSystemFileHandle.js').default} FileSystemFileHandle */\n\nconst def = { accepts: [] }\nconst native = globalThis.showOpenFilePicker\n\n/**\n * @param {Object} [options]\n * @param {boolean} [options.multiple] If you want to allow more than one file\n * @param {boolean} [options.excludeAcceptAllOption=false] Prevent user for selecting any\n * @param {Object[]} [options.accepts] Files you want to accept\n * @param {boolean} [options._preferPolyfill] If you rather want to use the polyfill instead of the native\n * @returns {Promise<FileSystemFileHandle[]>}\n */\nasync function showOpenFilePicker (options = {}) {\n const opts = { ...def, ...options }\n\n if (native && !options._preferPolyfill) {\n return native(opts)\n }\n\n const input = document.createElement('input')\n input.type = 'file'\n input.multiple = opts.multiple\n input.accept = (opts.accepts || [])\n .map(e => [\n ...(e.extensions || []).map(e => '.' + e),\n ...e.mimeTypes || []]\n )\n .flat()\n .join(',')\n\n // See https://stackoverflow.com/questions/47664777/javascript-file-input-onchange-not-working-ios-safari-only\n input.style.position = 'fixed'\n input.style.top = '-100000px'\n input.style.left = '-100000px'\n document.body.appendChild(input)\n\n // Lazy load while the user is choosing the directory\n const p = import('./util.js')\n\n await new Promise(resolve => {\n input.addEventListener('change', resolve)\n input.click()\n })\n\n return p.then(m => m.getFileHandlesFromInput(input))\n}\n\nexport default showOpenFilePicker\nexport { showOpenFilePicker }\n", "/** @typedef {import('./FileSystemFileHandle.js').default} FileSystemFileHandle */\n\nconst native = globalThis.showSaveFilePicker\n\n/**\n * @param {Object} [options]\n * @param {boolean} [options.excludeAcceptAllOption=false] Prevent user for selecting any\n * @param {Object[]} [options.types] Files you want to accept\n * @param {string} [options.suggestedName] the name to fall back to when using polyfill\n * @param {string} [options._name] the name to fall back to when using polyfill\n * @param {boolean} [options._preferPolyfill] If you rather want to use the polyfill instead of the native\n * @return {Promise<FileSystemFileHandle>}\n */\nasync function showSaveFilePicker (options = {}) {\n if (native && !options._preferPolyfill) {\n return native(options)\n }\n\n if (options._name) {\n console.warn('deprecated _name, spec now have `suggestedName`')\n options.suggestedName = options._name\n }\n\n const { FileSystemFileHandle } = await import('./FileSystemFileHandle.js')\n const { FileHandle } = await import('./adapters/downloader.js')\n return new FileSystemFileHandle(new FileHandle(options.suggestedName))\n}\n\nexport default showSaveFilePicker\nexport { showSaveFilePicker }\n", "/** @typedef {import('./FileSystemDirectoryHandle.js').default} FileSystemDirectoryHandle */\n\nif (globalThis.DataTransferItem && !DataTransferItem.prototype.getAsFileSystemHandle) {\n DataTransferItem.prototype.getAsFileSystemHandle = async function () {\n const entry = this.webkitGetAsEntry()\n const [\n { FileHandle, FolderHandle },\n { FileSystemDirectoryHandle },\n { FileSystemFileHandle }\n ] = await Promise.all([\n import('./adapters/sandbox.js'),\n import('./FileSystemDirectoryHandle.js'),\n import('./FileSystemFileHandle.js')\n ])\n\n return entry.isFile\n ? new FileSystemFileHandle(new FileHandle(entry, false))\n : new FileSystemDirectoryHandle(new FolderHandle(entry, false))\n }\n}\n\n/**\n * @param {object=} driver\n * @return {Promise<FileSystemDirectoryHandle>}\n */\nasync function getOriginPrivateDirectory (driver, options = {}) {\n if (!driver) {\n return globalThis.navigator?.storage?.getDirectory() || globalThis.getOriginPrivateDirectory()\n }\n const {FileSystemDirectoryHandle} = await import('./FileSystemDirectoryHandle.js')\n const module = await driver\n const sandbox = await (module.default\n ? module.default(options)\n : module(options)\n )\n return new FileSystemDirectoryHandle(sandbox)\n}\n\nexport default getOriginPrivateDirectory\n", "import showDirectoryPicker from './showDirectoryPicker.js'\nimport showOpenFilePicker from './showOpenFilePicker.js'\nimport showSaveFilePicker from './showSaveFilePicker.js'\nimport getOriginPrivateDirectory from './getOriginPrivateDirectory.js'\nimport FileSystemDirectoryHandle from './FileSystemDirectoryHandle.js'\nimport FileSystemFileHandle from './FileSystemFileHandle.js'\nimport FileSystemHandle from './FileSystemHandle.js'\nimport FileSystemWritableFileStream from './FileSystemWritableFileStream.js'\n\nexport {\n FileSystemDirectoryHandle,\n FileSystemFileHandle,\n FileSystemHandle,\n FileSystemWritableFileStream,\n getOriginPrivateDirectory,\n showDirectoryPicker,\n showOpenFilePicker,\n showSaveFilePicker\n}\n", "import { avaloniaDb, fileBookmarksStore } from \"./indexedDb\";\r\nimport { StorageItem, StorageItems } from \"./storageItem\";\r\nimport { showOpenFilePicker, showDirectoryPicker, showSaveFilePicker, FileSystemFileHandle } from \"native-file-system-adapter\";\r\n\r\ndeclare global {\r\n type WellKnownDirectory = \"desktop\" | \"documents\" | \"downloads\" | \"music\" | \"pictures\" | \"videos\";\r\n interface FilePickerAcceptType {\r\n description?: string | undefined;\r\n accept: Record<string, string | string[]>;\r\n }\r\n}\r\n\r\nexport class StorageProvider {\r\n public static async selectFolderDialog(\r\n startIn: StorageItem | null,\r\n preferPolyfill: boolean): Promise<StorageItem> {\r\n // 'Picker' API doesn't accept \"null\" as a parameter, so it should be set to undefined.\r\n const options = {\r\n startIn: (startIn?.wellKnownType ?? startIn?.handle ?? undefined),\r\n _preferPolyfill: preferPolyfill\r\n };\r\n\r\n const handle = await showDirectoryPicker(options as any);\r\n return StorageItem.createFromHandle(handle);\r\n }\r\n\r\n public static async openFileDialog(\r\n startIn: StorageItem | null, multiple: boolean,\r\n types: FilePickerAcceptType[] | null, excludeAcceptAllOption: boolean,\r\n preferPolyfill: boolean): Promise<StorageItems> {\r\n const options = {\r\n startIn: (startIn?.wellKnownType ?? startIn?.handle ?? undefined),\r\n multiple,\r\n excludeAcceptAllOption,\r\n types: (types ?? undefined),\r\n _preferPolyfill: preferPolyfill\r\n };\r\n\r\n const handles = await showOpenFilePicker(options);\r\n return new StorageItems(handles.map((handle: FileSystemFileHandle) => StorageItem.createFromHandle(handle)));\r\n }\r\n\r\n public static async saveFileDialog(\r\n startIn: StorageItem | null, suggestedName: string | null,\r\n types: FilePickerAcceptType[] | null, excludeAcceptAllOption: boolean,\r\n preferPolyfill: boolean): Promise<StorageItem> {\r\n const options = {\r\n startIn: (startIn?.wellKnownType ?? startIn?.handle ?? undefined),\r\n suggestedName: (suggestedName ?? undefined),\r\n excludeAcceptAllOption,\r\n types: (types ?? undefined),\r\n _preferPolyfill: preferPolyfill\r\n };\r\n\r\n const handle = await showSaveFilePicker(options);\r\n return StorageItem.createFromHandle(handle);\r\n }\r\n\r\n public static async openBookmark(key: string): Promise<StorageItem | null> {\r\n const connection = await avaloniaDb.connect();\r\n try {\r\n const handle = await connection.get(fileBookmarksStore, key);\r\n return handle && StorageItem.createFromHandle(handle, key);\r\n } finally {\r\n connection.close();\r\n }\r\n }\r\n\r\n public static createAcceptType(description: string, mimeTypes: string[], extensions: string[] | undefined): FilePickerAcceptType {\r\n const accept: Record<string, string[]> = {};\r\n mimeTypes.forEach(a => { accept[a] = extensions ?? []; });\r\n return { description, accept };\r\n }\r\n}\r\n"],
"mappings": "8QAAA,IAAMA,GASCC,EATPC,EAAAC,EAAA,KAAMH,GAAS,CACb,eAAgB,WAAW,eAC3B,eAAgB,WAAW,eAC3B,gBAAiB,WAAW,gBAC5B,aAAc,WAAW,aACzB,KAAM,WAAW,KACjB,KAAM,WAAW,IACnB,EAEOC,EAAQD,KCTf,IAAAI,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,iBAAAC,EAAA,SAAAC,EAAA,YAAAC,KAA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,EAC7BL,EAAsCC,EACtCT,EAA+C,CA7CvD,IAAAC,EAAAC,EA8CQ,IAAMC,EAAU,CACZ,SAAUD,GAAAD,EAAAF,GAAA,YAAAA,EAAS,gBAAT,KAAAE,EAA0BF,GAAA,YAAAA,EAAS,SAAnC,KAAAG,EAA6C,OACvD,cAAgBW,GAAA,KAAAA,EAAiB,OACjC,uBAAAJ,EACA,MAAQD,GAAA,KAAAA,EAAS,OACjB,gBAAiBR,CACrB,EAEMI,EAAS,MAAMU,GAAmBX,CAAO,EAC/C,OAAOG,EAAY,iBAAiBF,CAAM,CAC9C,CAEA,aAAoB,aAAaW,EAA0C,CACvE,IAAMC,EAAa,MAAMC,EAAW,QAAQ,EAC5C,GAAI,CACA,IAAMb,EAAS,MAAMY,EAAW,IAAIE,EAAoBH,CAAG,EAC3D,OAAOX,GAAUE,EAAY,iBAAiBF,EAAQW,CAAG,CAC7D,QAAE,CACEC,EAAW,MAAM,CACrB,CACJ,CAEA,OAAc,iBAAiBG,EAAqBC,EAAqBC,EAAwD,CAC7H,IAAMC,EAAmC,CAAC,EAC1C,OAAAF,EAAU,QAAQG,GAAK,CAAED,EAAOC,GAAKF,GAAA,KAAAA,EAAc,CAAC,CAAG,CAAC,EACjD,CAAE,YAAAF,EAAa,OAAAG,CAAO,CACjC,CACJ",
"names": ["config", "config_default", "init_config", "__esmMin", "memory_exports", "__export", "FileHandle", "FolderHandle", "Sink", "memory_default", "File", "Blob", "DOMException", "INVALID", "GONE", "MISMATCH", "MOD_ERR", "SYNTAX", "SECURITY", "DISALLOWED", "fs", "init_memory", "__esmMin", "init_util", "init_config", "config_default", "errors", "fileHandle", "file", "chunk", "blob", "head", "tail", "padding", "name", "writable", "opts", "other", "entry", "isFile", "recursive", "x", "sandbox_exports", "__export", "FileHandle", "FolderHandle", "sandbox_default", "DISALLOWED", "Sink", "init_sandbox", "__esmMin", "init_util", "errors", "writer", "fileEntry", "chunk", "resolve", "reject", "evt", "file", "writable", "other", "opts", "fileWriter", "dir", "reader", "entries", "x", "name", "entry", "err", "e", "kAdapter", "_a", "FileSystemHandle", "FileSystemHandle_default", "init_FileSystemHandle", "__esmMin", "adapter", "__publicField", "mode", "handle", "options", "other", "WritableStream", "FileSystemWritableFileStream", "FileSystemWritableFileStream_default", "init_FileSystemWritableFileStream", "__esmMin", "init_config", "config_default", "args", "w", "p", "position", "size", "data", "writer", "FileSystemFileHandle_exports", "__export", "FileSystemFileHandle", "FileSystemFileHandle_default", "kAdapter", "_a", "init_FileSystemFileHandle", "__esmMin", "init_FileSystemHandle", "init_FileSystemWritableFileStream", "FileSystemHandle_default", "adapter", "__publicField", "options", "FileSystemWritableFileStream_default", "FileSystemDirectoryHandle_exports", "__export", "FileSystemDirectoryHandle", "FileSystemDirectoryHandle_default", "kAdapter", "_a", "init_FileSystemDirectoryHandle", "__esmMin", "init_FileSystemHandle", "FileSystemHandle_default", "adapter", "__publicField", "name", "options", "handle", "FileSystemFileHandle", "_", "entry", "possibleDescendant", "openSet", "current", "path", "util_exports", "__export", "config", "errors", "fromDataTransfer", "getDirHandlesFromInput", "getFileHandlesFromInput", "entries", "memory", "sandbox", "fs", "folder", "entry", "input", "FolderHandle", "FileHandle", "FileSystemDirectoryHandle", "files", "rootName", "root", "file", "path", "name", "dir", "FileSystemFileHandle", "init_util", "__esmMin", "m", "downloader_exports", "__export", "FileHandle", "WritableStream", "TransformStream", "DOMException", "Blob", "GONE", "isSafari", "WRITE", "PULL", "ERROR", "ABORT", "CLOSE", "MessagePortSink", "RemoteWritableStream", "init_downloader", "__esmMin", "init_util", "init_config", "config_default", "errors", "name", "other", "options", "_a", "sw", "link", "ts", "sink", "chunks", "chunk", "blob", "writable", "readablePort", "fileName", "headers", "keepAlive", "ctrl", "reader", "pump", "_", "e", "iframe", "port", "event", "controller", "message", "reason", "resolve", "reject", "channel", "InnerDbConnection", "database", "store", "mode", "obj", "key", "os", "resolve", "reject", "response", "IndexedDbWrapper", "databaseName", "objectStores", "conn", "event", "db", "fileBookmarksStore", "avaloniaDb", "CaretHelper", "element", "position", "options", "_a", "_b", "isBrowser", "debug", "el", "div", "style", "computed", "isInput", "properties", "prop", "height", "outerHeight", "targetHeight", "isFirefox", "span", "coordinates", "InputHelper", "args", "resolve", "reject", "element", "keyDownCallback", "keyUpCallback", "keyDownHandler", "keyUpHandler", "beforeInputCallback", "inputCallback", "compositionStartCallback", "compositionUpdateCallback", "compositionEndCallback", "inputHandler", "inputEvent", "compositionStartHandler", "beforeInputHandler", "ranges", "start", "end", "compositionUpdateHandler", "compositionEndHandler", "pointerMoveCallback", "pointerDownCallback", "pointerUpCallback", "pointerCancelCallback", "wheelCallback", "pointerMoveHandler", "pointerDownHandler", "pointerUpHandler", "pointerCancelHandler", "wheelHandler", "dragEvent", "dragHandler", "pointerEvent", "inputElement", "kind", "x", "y", "caretWidth", "caretHeight", "caret", "left", "top", "CaretHelper", "text", "modifiers", "Caniuse", "_a", "userAgentData", "userAgent", "regex1", "regex2", "StorageItem", "handle", "file", "bookmarkId", "wellKnownType", "_a", "type", "item", "e", "name", "destination", "mode", "Caniuse", "connection", "avaloniaDb", "fileBookmarksStore", "StorageItems", "items", "instance", "files", "retItems", "native", "showDirectoryPicker", "options", "input", "p", "resolve", "mod", "showDirectoryPicker_default", "def", "native", "showOpenFilePicker", "options", "opts", "input", "e", "p", "resolve", "m", "showOpenFilePicker_default", "native", "showSaveFilePicker", "options", "FileSystemFileHandle", "FileHandle", "showSaveFilePicker_default", "entry", "FileHandle", "FolderHandle", "FileSystemDirectoryHandle", "FileSystemFileHandle", "init_FileSystemDirectoryHandle", "init_FileSystemFileHandle", "init_FileSystemHandle", "init_FileSystemWritableFileStream", "StorageProvider", "startIn", "preferPolyfill", "_a", "_b", "options", "handle", "showDirectoryPicker_default", "StorageItem", "multiple", "types", "excludeAcceptAllOption", "handles", "showOpenFilePicker_default", "StorageItems", "suggestedName", "showSaveFilePicker_default", "key", "connection", "avaloniaDb", "fileBookmarksStore", "description", "mimeTypes", "extensions", "accept", "a"]
}