A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
chore: update desktop app config and SDK dist files
esengine98e085482d14
diff --git a/.vscode/tasks.json b/.vscode/tasks.jsonindex 41da42710..125f5af60 100644--- a/.vscode/tasks.json+++ b/.vscode/tasks.json@@ -21,10 +21,10 @@{"label": "build-sdk","type": "shell",- "command": "pnpm",- "args": ["build"],+ "command": "npm",+ "args": ["run", "build:sdk"],"options": {- "cwd": "${workspaceFolder}/sdk"+ "cwd": "${workspaceFolder}"},"problemMatcher": ["$tsc"]},diff --git a/desktop/public/sdk/cjs/index.wechat.js b/desktop/public/sdk/cjs/index.wechat.jsnew file mode 100644index 000000000..ed6fb6c7f--- /dev/null+++ b/desktop/public/sdk/cjs/index.wechat.js@@ -0,0 +1,3535 @@+/**+ * @file base.ts+ * @brief Base platform adapter - no platform-specific code+ */+// =============================================================================+// Platform Instance (set by entry point)+// =============================================================================+let currentPlatform = null;+/**+ * Set the platform adapter (called by entry point)+ */+function setPlatform(adapter) {+ currentPlatform = adapter;+ console.log(`[ESEngine] Platform: ${adapter.name}`);+}+/**+ * Get the current platform adapter+ * @throws Error if platform not initialized+ */+function getPlatform() {+ if (!currentPlatform) {+ throw new Error('[ESEngine] Platform not initialized. ' ++ 'Import from "esengine" (web) or "esengine/wechat" (WeChat) instead of direct imports.');+ }+ return currentPlatform;+}+/**+ * Check if platform is initialized+ */+function isPlatformInitialized() {+ return currentPlatform !== null;+}+/**+ * Get platform type+ */+function getPlatformType() {+ return currentPlatform?.name ?? null;+}+/**+ * Check if running on WeChat+ */+function isWeChat() {+ return currentPlatform?.name === 'wechat';+}+/**+ * Check if running on Web+ */+function isWeb() {+ return currentPlatform?.name === 'web';+}+// =============================================================================+// Convenience Functions+// =============================================================================+async function platformFetch(url, options) {+ return getPlatform().fetch(url, options);+}+async function platformReadFile(path) {+ return getPlatform().readFile(path);+}+async function platformReadTextFile(path) {+ return getPlatform().readTextFile(path);+}+async function platformFileExists(path) {+ return getPlatform().fileExists(path);+}+async function platformInstantiateWasm(pathOrBuffer, imports) {+ return getPlatform().instantiateWasm(pathOrBuffer, imports);+}++/**+ * @file fetch.ts+ * @brief Fetch polyfill for WeChat MiniGame using wx.request+ */+// =============================================================================+// WeChat Fetch Implementation+// =============================================================================+function wxFetch(url, options) {+ return new Promise((resolve, reject) => {+ const responseType = options?.responseType ?? 'text';+ wx.request({+ url,+ method: (options?.method ?? 'GET'),+ data: options?.body,+ header: options?.headers,+ responseType: responseType === 'arraybuffer' ? 'arraybuffer' : 'text',+ timeout: options?.timeout,+ success: (res) => {+ const ok = res.statusCode >= 200 && res.statusCode < 300;+ const headers = {};+ if (res.header) {+ for (const key of Object.keys(res.header)) {+ headers[key.toLowerCase()] = res.header[key];+ }+ }+ resolve({+ ok,+ status: res.statusCode,+ statusText: ok ? 'OK' : 'Error',+ headers,+ json: () => {+ if (typeof res.data === 'string') {+ return Promise.resolve(JSON.parse(res.data));+ }+ return Promise.resolve(res.data);+ },+ text: () => {+ if (typeof res.data === 'string') {+ return Promise.resolve(res.data);+ }+ return Promise.resolve(JSON.stringify(res.data));+ },+ arrayBuffer: () => {+ if (res.data instanceof ArrayBuffer) {+ return Promise.resolve(res.data);+ }+ // Convert string to ArrayBuffer+ const encoder = new TextEncoder();+ const data = typeof res.data === 'string' ? res.data : JSON.stringify(res.data);+ return Promise.resolve(encoder.encode(data).buffer);+ },+ });+ },+ fail: (err) => {+ reject(new Error(`wx.request failed: ${err.errMsg}`));+ },+ });+ });+}+// =============================================================================+// Global Fetch Polyfill+// =============================================================================+function polyfillFetch() {+ if (typeof globalThis.fetch === 'undefined') {+ globalThis.fetch = async (input, init) => {+ const url = typeof input === 'string' ? input : input.toString();+ const options = {+ method: init?.method ?? 'GET',+ headers: init?.headers,+ body: init?.body,+ };+ const response = await wxFetch(url, options);+ // Return a Response-like object+ return {+ ok: response.ok,+ status: response.status,+ statusText: response.statusText,+ headers: new Headers(response.headers),+ json: () => response.json(),+ text: () => response.text(),+ arrayBuffer: () => response.arrayBuffer(),+ blob: () => Promise.reject(new Error('Blob not supported in WeChat')),+ formData: () => Promise.reject(new Error('FormData not supported in WeChat')),+ clone: () => { throw new Error('clone not supported'); },+ body: null,+ bodyUsed: false,+ redirected: false,+ type: 'basic',+ url,+ };+ };+ }+}++/**+ * @file wasm.ts+ * @brief WebAssembly adapter for WeChat MiniGame using WXWebAssembly+ */+// =============================================================================+// WeChat WASM Implementation+// =============================================================================+/**+ * Instantiate WASM using WXWebAssembly+ * Note: WeChat requires path to be a string (package-relative path), not ArrayBuffer+ */+async function wxInstantiateWasm(path, imports) {+ if (typeof WXWebAssembly === 'undefined') {+ throw new Error('WXWebAssembly is not available. Requires WeChat base library >= 2.13.0');+ }+ // WeChat requires the path to be a package-relative path string+ // e.g., "esengine.wasm" not "/esengine.wasm" or ArrayBuffer+ const normalizedPath = path.startsWith('/') ? path.slice(1) : path;+ try {+ // eslint-disable-next-line @typescript-eslint/no-explicit-any+ const result = await WXWebAssembly.instantiate(normalizedPath, imports);+ return {+ // WXWebAssembly.instantiate returns { instance, module } but types are slightly different+ instance: result.instance ?? result,+ module: result.module,+ };+ }+ catch (err) {+ const message = err instanceof Error ? err.message : String(err);+ throw new Error(`WXWebAssembly.instantiate failed for "${normalizedPath}": ${message}`);+ }+}+// =============================================================================+// Global WebAssembly Polyfill+// =============================================================================+/**+ * Polyfill global WebAssembly with WXWebAssembly+ * This allows existing code using WebAssembly.instantiate to work on WeChat+ */+function polyfillWebAssembly() {+ if (typeof WXWebAssembly !== 'undefined' && typeof WebAssembly === 'undefined') {+ globalThis.WebAssembly = {+ instantiate: async (bufferOrPath, imports) => {+ if (typeof bufferOrPath !== 'string') {+ throw new Error('WeChat WXWebAssembly requires a file path string, not ArrayBuffer. ' ++ 'Use platform adapter instead of direct WebAssembly.instantiate.');+ }+ return wxInstantiateWasm(bufferOrPath, imports ?? {});+ },+ compile: () => {+ throw new Error('WebAssembly.compile is not supported in WeChat MiniGame');+ },+ compileStreaming: () => {+ throw new Error('WebAssembly.compileStreaming is not supported in WeChat MiniGame');+ },+ instantiateStreaming: () => {+ throw new Error('WebAssembly.instantiateStreaming is not supported in WeChat MiniGame');+ },+ validate: () => {+ throw new Error('WebAssembly.validate is not supported in WeChat MiniGame');+ },+ Module: class {+ },+ Instance: class {+ },+ Memory: class {+ },+ Table: class {+ },+ Global: class {+ },+ CompileError: Error,+ LinkError: Error,+ RuntimeError: Error,+ };+ }+}++/**+ * @file fs.ts+ * @brief File system adapter for WeChat MiniGame+ */+/// <reference types="minigame-api-typings" />+// =============================================================================+// WeChat File System+// =============================================================================+let fsManager = null;+function getFileSystemManager() {+ if (!fsManager) {+ fsManager = wx.getFileSystemManager();+ }+ return fsManager;+}+/**+ * Read file as ArrayBuffer (async)+ */+function wxReadFile(path) {+ return new Promise((resolve, reject) => {+ const fs = getFileSystemManager();+ fs.readFile({+ filePath: path,+ success: (res) => {+ resolve(res.data);+ },+ fail: (err) => {+ reject(new Error(`Failed to read file "${path}": ${err.errMsg}`));+ },+ });+ });+}+/**+ * Read file as string (async)+ */+function wxReadTextFile(path, encoding = 'utf-8') {+ return new Promise((resolve, reject) => {+ const fs = getFileSystemManager();+ fs.readFile({+ filePath: path,+ encoding,+ success: (res) => {+ resolve(res.data);+ },+ fail: (err) => {+ reject(new Error(`Failed to read file "${path}": ${err.errMsg}`));+ },+ });+ });+}+/**+ * Check if file exists+ */+function wxFileExists(path) {+ return new Promise((resolve) => {+ const fs = getFileSystemManager();+ fs.access({+ path,+ success: () => resolve(true),+ fail: () => resolve(false),+ });+ });+}+/**+ * Check if file exists (sync)+ */+function wxFileExistsSync(path) {+ const fs = getFileSystemManager();+ try {+ fs.accessSync(path);+ return true;+ }+ catch {+ return false;+ }+}+/**+ * Write file+ */+function wxWriteFile(path, data) {+ return new Promise((resolve, reject) => {+ const fs = getFileSystemManager();+ fs.writeFile({+ filePath: path,+ data,+ success: () => resolve(),+ fail: (err) => {+ reject(new Error(`Failed to write file "${path}": ${err.errMsg}`));+ },+ });+ });+}++/**+ * @file image.ts+ * @brief WeChat MiniGame image loading utilities+ */+/// <reference types="minigame-api-typings" />+// =============================================================================+// Canvas Management+// =============================================================================+let offscreenCanvas = null;+let offscreenCtx = null;+function getOffscreenCanvas(width, height) {+ if (!offscreenCanvas) {+ offscreenCanvas = wx.createCanvas();+ offscreenCanvas.width = width;+ offscreenCanvas.height = height;+ offscreenCtx = offscreenCanvas.getContext('2d');+ }+ if (offscreenCanvas.width < width || offscreenCanvas.height < height) {+ offscreenCanvas.width = Math.max(offscreenCanvas.width, width);+ offscreenCanvas.height = Math.max(offscreenCanvas.height, height);+ }+ return { canvas: offscreenCanvas, ctx: offscreenCtx };+}+// =============================================================================+// Image Loading+// =============================================================================+/**+ * Load an image from a file path+ * @param path - File path relative to game root+ */+function wxLoadImage(path) {+ return new Promise((resolve, reject) => {+ const img = wx.createImage();+ img.onload = () => resolve(img);+ img.onerror = (err) => reject(new Error(`Failed to load image: ${path}, ${err}`));+ img.src = path;+ });+}+/**+ * Extract pixel data from an image+ * @param img - Loaded image object+ * @param flipY - Whether to flip the image vertically (default: true for OpenGL)+ */+function wxGetImagePixels(img, flipY = true) {+ const { width, height } = img;+ const { ctx } = getOffscreenCanvas(width, height);+ ctx.clearRect(0, 0, width, height);+ ctx.drawImage(img, 0, 0);+ const imageData = ctx.getImageData(0, 0, width, height);+ const pixels = new Uint8Array(imageData.data.buffer);+ if (flipY) {+ return { width, height, pixels: flipVertically(pixels, width, height) };+ }+ return { width, height, pixels };+}+/**+ * Load image and get pixel data in one call+ * @param path - File path relative to game root+ * @param flipY - Whether to flip the image vertically (default: true for OpenGL)+ */+async function wxLoadImagePixels(path, flipY = true) {+ const img = await wxLoadImage(path);+ return wxGetImagePixels(img, flipY);+}+// =============================================================================+// Utility Functions+// =============================================================================+function flipVertically(pixels, width, height) {+ const rowSize = width * 4;+ const flipped = new Uint8Array(pixels.length);+ for (let y = 0; y < height; y++) {+ const srcOffset = y * rowSize;+ const dstOffset = (height - 1 - y) * rowSize;+ flipped.set(pixels.subarray(srcOffset, srcOffset + rowSize), dstOffset);+ }+ return flipped;+}++/**+ * @file index.ts+ * @brief WeChat MiniGame platform adapter+ */+// =============================================================================+// WeChat Platform Adapter+// =============================================================================+class WeChatPlatformAdapter {+ constructor() {+ this.name = 'wechat';+ }+ async fetch(url, options) {+ return wxFetch(url, options);+ }+ async readFile(path) {+ return wxReadFile(path);+ }+ async readTextFile(path) {+ return wxReadTextFile(path);+ }+ async fileExists(path) {+ return wxFileExists(path);+ }+ async instantiateWasm(pathOrBuffer, imports) {+ if (typeof pathOrBuffer !== 'string') {+ throw new Error('WeChat WXWebAssembly requires a file path string, not ArrayBuffer');+ }+ return wxInstantiateWasm(pathOrBuffer, imports);+ }+}+// =============================================================================+// Initialization+// =============================================================================+let initialized = false;+/**+ * Initialize WeChat platform polyfills+ * Call this at the entry point of your game+ */+function initWeChatPlatform() {+ if (initialized)+ return;+ initialized = true;+ polyfillFetch();+ polyfillWebAssembly();+ console.log('[ESEngine] WeChat platform initialized');+}+// =============================================================================+// Export+// =============================================================================+const wechatAdapter = new WeChatPlatformAdapter();++/**+ * @file types.ts+ * @brief Core type definitions for ESEngine SDK+ */+const INVALID_ENTITY = 0;+const INVALID_TEXTURE = 0xFFFFFFFF;+// =============================================================================+// Factory Functions+// =============================================================================+const vec2 = (x = 0, y = 0) => ({ x, y });+const vec3 = (x = 0, y = 0, z = 0) => ({ x, y, z });+const vec4 = (x = 0, y = 0, z = 0, w = 1) => ({ x, y, z, w });+const color = (r = 1, g = 1, b = 1, a = 1) => ({ x: r, y: g, z: b, w: a });+const quat = (w = 1, x = 0, y = 0, z = 0) => ({ w, x, y, z });++/**+ * @file component.ts+ * @brief Component definition and builtin components+ */+let componentCounter = 0;+function createComponentDef(name, defaults) {+ const id = ++componentCounter;+ return {+ _id: Symbol(`Component_${id}_${name}`),+ _name: name,+ _default: defaults,+ _builtin: false,+ create(data) {+ return { ...defaults, ...data };+ }+ };+}+function defineComponent(name, defaults) {+ const def = createComponentDef(name, defaults);+ registerToEditor(name, defaults, false);+ return def;+}+function defineTag(name) {+ const def = createComponentDef(name, {});+ registerToEditor(name, {}, true);+ return def;+}+function registerToEditor(name, defaults, isTag) {+ if (typeof window !== 'undefined' && window.__esengine_registerComponent) {+ window.__esengine_registerComponent(name, defaults, isTag);+ }+}+function defineBuiltin(name, defaults) {+ return {+ _id: Symbol(`Builtin_${name}`),+ _name: name,+ _cppName: name,+ _builtin: true,+ _default: defaults+ };+}+function isBuiltinComponent(comp) {+ return comp._builtin === true;+}+// =============================================================================+// Builtin Component Instances+// =============================================================================+const LocalTransform = defineBuiltin('LocalTransform', {+ position: { x: 0, y: 0, z: 0 },+ rotation: { w: 1, x: 0, y: 0, z: 0 },+ scale: { x: 1, y: 1, z: 1 }+});+const WorldTransform = defineBuiltin('WorldTransform', {+ position: { x: 0, y: 0, z: 0 },+ rotation: { w: 1, x: 0, y: 0, z: 0 },+ scale: { x: 1, y: 1, z: 1 }+});+const Sprite = defineBuiltin('Sprite', {+ texture: 0,+ color: { x: 1, y: 1, z: 1, w: 1 },+ size: { x: 32, y: 32 },+ uvOffset: { x: 0, y: 0 },+ uvScale: { x: 1, y: 1 },+ layer: 0,+ flipX: false,+ flipY: false+});+const Camera = defineBuiltin('Camera', {+ projectionType: 0,+ fov: 60,+ orthoSize: 5,+ nearPlane: 0.1,+ farPlane: 1000,+ aspectRatio: 1.77,+ isActive: true,+ priority: 0+});+const Canvas = defineBuiltin('Canvas', {+ designResolution: { x: 1920, y: 1080 },+ pixelsPerUnit: 100,+ scaleMode: 0,+ matchWidthOrHeight: 0.5,+ backgroundColor: { x: 0, y: 0, z: 0, w: 1 }+});+const Velocity = defineBuiltin('Velocity', {+ linear: { x: 0, y: 0, z: 0 },+ angular: { x: 0, y: 0, z: 0 }+});+const Parent = defineBuiltin('Parent', {+ entity: 0+});+const Children = defineBuiltin('Children', {+ entities: []+});+const SpineAnimation = defineBuiltin('SpineAnimation', {+ skeletonPath: '',+ atlasPath: '',+ skin: '',+ animation: '',+ timeScale: 1.0,+ loop: true,+ playing: true,+ flipX: false,+ flipY: false,+ color: { x: 1, y: 1, z: 1, w: 1 },+ layer: 0,+ skeletonScale: 1.0+});+// =============================================================================+// Component Defaults Registry+// =============================================================================+const builtinComponents = {+ LocalTransform,+ WorldTransform,+ Sprite,+ Camera,+ Canvas,+ Velocity,+ Parent,+ Children,+ SpineAnimation,+};+function getComponentDefaults(typeName) {+ const component = builtinComponents[typeName];+ if (component) {+ return { ...component._default };+ }+ return null;+}++/**+ * @file resource.ts+ * @brief Resource system for global singleton data+ */+let resourceCounter = 0;+function defineResource(defaultValue, name) {+ const id = ++resourceCounter;+ return {+ _id: Symbol(`Resource_${id}_${name ?? ''}`),+ _name: name ?? `Resource_${id}`,+ _default: defaultValue+ };+}+function Res(resource) {+ return { _type: 'res', _resource: resource };+}+function ResMut(resource) {+ return { _type: 'res_mut', _resource: resource };+}+// =============================================================================+// Resource Instances (Runtime)+// =============================================================================+class ResMutInstance {+ constructor(value, setter) {+ this.value_ = value;+ this.setter_ = setter;+ }+ get() {+ return this.value_;+ }+ set(value) {+ this.value_ = value;+ this.setter_(value);+ }+ modify(fn) {+ fn(this.value_);+ this.setter_(this.value_);+ }+}+// =============================================================================+// Resource Storage+// =============================================================================+class ResourceStorage {+ constructor() {+ this.resources_ = new Map();+ }+ insert(resource, value) {+ this.resources_.set(resource._id, value);+ }+ get(resource) {+ if (!this.resources_.has(resource._id)) {+ this.resources_.set(resource._id, resource._default);+ }+ return this.resources_.get(resource._id);+ }+ set(resource, value) {+ this.resources_.set(resource._id, value);+ }+ has(resource) {+ return this.resources_.has(resource._id);+ }+ remove(resource) {+ this.resources_.delete(resource._id);+ }+ getResMut(resource) {+ return new ResMutInstance(this.get(resource), (v) => this.set(resource, v));+ }+}+const Time = defineResource({+ delta: 0,+ elapsed: 0,+ frameCount: 0+}, 'Time');+const Input = defineResource({+ keysDown: new Set(),+ keysPressed: new Set(),+ keysReleased: new Set(),+ mouseX: 0,+ mouseY: 0,+ mouseButtons: new Set()+}, 'Input');++/**+ * @file query.ts+ * @brief Component query system with mutable component support+ */+function Mut(component) {+ return { _type: 'mut', _component: component };+}+function isMutWrapper(value) {+ return typeof value === 'object' && value !== null && value._type === 'mut';+}+function createQueryDescriptor(components, withFilters = [], withoutFilters = []) {+ const mutIndices = [];+ components.forEach((comp, i) => {+ if (isMutWrapper(comp)) {+ mutIndices.push(i);+ }+ });+ return {+ _type: 'query',+ _components: components,+ _mutIndices: mutIndices,+ _with: withFilters,+ _without: withoutFilters+ };+}+// =============================================================================+// Query Factory+// =============================================================================+function Query(...components) {+ return createQueryDescriptor(components);+}+class QueryInstance {+ constructor(world, descriptor) {+ this.pendingMutations_ = [];+ this.world_ = world;+ this.descriptor_ = descriptor;+ }+ getActualComponent(arg) {+ return isMutWrapper(arg) ? arg._component : arg;+ }+ commitPending() {+ for (const mutation of this.pendingMutations_) {+ this.world_.insert(mutation.entity, mutation.component, mutation.data);+ }+ this.pendingMutations_ = [];+ }+ *[Symbol.iterator]() {+ const { _components, _mutIndices, _with, _without } = this.descriptor_;+ const actualComponents = _components.map(c => this.getActualComponent(c));+ const allRequired = [...actualComponents, ..._with];+ const entities = this.world_.getEntitiesWithComponents(allRequired);+ let prevEntity = null;+ let prevMutData = [];+ try {+ for (const entity of entities) {+ // Commit previous entity's mutations before moving to next+ if (prevEntity !== null) {+ for (const mut of prevMutData) {+ this.world_.insert(prevEntity, mut.component, mut.data);+ }+ }+ prevMutData = [];+ let excluded = false;+ for (const comp of _without) {+ if (this.world_.has(entity, comp)) {+ excluded = true;+ break;+ }+ }+ if (excluded)+ continue;+ const components = actualComponents.map(comp => this.world_.get(entity, comp));+ // Track mutable components for write-back+ for (const idx of _mutIndices) {+ prevMutData.push({+ component: actualComponents[idx],+ data: components[idx]+ });+ }+ prevEntity = entity;+ yield [entity, ...components];+ }+ }+ finally {+ // Commit last entity's mutations+ if (prevEntity !== null) {+ for (const mut of prevMutData) {+ this.world_.insert(prevEntity, mut.component, mut.data);+ }+ }+ }+ }+ forEach(callback) {+ for (const [entity, ...components] of this) {+ callback(entity, ...components);+ }+ }+ single() {+ for (const result of this) {+ return result;+ }+ return null;+ }+ isEmpty() {+ return this.single() === null;+ }+ count() {+ let n = 0;+ for (const _ of this) {+ n++;+ }+ return n;+ }+ toArray() {+ return [...this];+ }+}++/**+ * @file commands.ts+ * @brief Deferred entity/component operations+ */+function Commands() {+ return { _type: 'commands' };+}+// =============================================================================+// Entity Commands (Builder for spawning)+// =============================================================================+class EntityCommands {+ constructor(commands, entity) {+ this.components_ = [];+ this.commands_ = commands;+ if (entity === null) {+ this.entityRef_ = { entity: 0 };+ this.isNew_ = true;+ }+ else {+ this.entityRef_ = { entity };+ this.isNew_ = false;+ }+ }+ insert(component, data) {+ let instance;+ if (isBuiltinComponent(component)) {+ instance = { ...component._default, ...data };+ }+ else {+ instance = component.create(data);+ }+ if (this.isNew_) {+ this.components_.push({ component, data: instance });+ }+ else {+ this.commands_.queueInsert(this.entityRef_.entity, component, instance);+ }+ return this;+ }+ remove(component) {+ if (!this.isNew_) {+ this.commands_.queueRemove(this.entityRef_.entity, component);+ }+ return this;+ }+ id() {+ if (this.isNew_ && this.entityRef_.entity === 0) {+ this.finalize();+ }+ return this.entityRef_.entity;+ }+ finalize() {+ if (this.isNew_) {+ this.commands_.spawnImmediate(this.components_, this.entityRef_);+ this.isNew_ = false;+ }+ }+}+// =============================================================================+// Commands Instance (Runtime)+// =============================================================================+class CommandsInstance {+ constructor(world, resources) {+ this.pending_ = [];+ this.world_ = world;+ this.resources_ = resources;+ }+ spawn() {+ return new EntityCommands(this, null);+ }+ entity(entity) {+ return new EntityCommands(this, entity);+ }+ despawn(entity) {+ this.pending_.push({ type: 'despawn', entity });+ return this;+ }+ insertResource(resource, value) {+ this.pending_.push({+ type: 'insert_resource',+ resource: resource,+ value+ });+ return this;+ }+ queueInsert(entity, component, data) {+ this.pending_.push({ type: 'insert', entity, component, data });+ }+ queueRemove(entity, component) {+ this.pending_.push({ type: 'remove', entity, component });+ }+ spawnImmediate(components, entityRef) {+ const entity = this.world_.spawn();+ entityRef.entity = entity;+ for (const entry of components) {+ this.world_.insert(entity, entry.component, entry.data);+ }+ }+ flush() {+ for (const cmd of this.pending_) {+ this.executeCommand(cmd);+ }+ this.pending_ = [];+ }+ executeCommand(cmd) {+ switch (cmd.type) {+ case 'spawn': {+ const entity = this.world_.spawn();+ cmd.entityRef.entity = entity;+ for (const entry of cmd.components) {+ this.world_.insert(entity, entry.component, entry.data);+ }+ break;+ }+ case 'despawn':+ this.world_.despawn(cmd.entity);+ break;+ case 'insert':+ this.world_.insert(cmd.entity, cmd.component, cmd.data);+ break;+ case 'remove':+ this.world_.remove(cmd.entity, cmd.component);+ break;+ case 'insert_resource':+ this.resources_.insert(cmd.resource, cmd.value);+ break;+ }+ }+}++/**+ * @file system.ts+ * @brief System definition and scheduling+ */+// =============================================================================+// Schedule Phases+// =============================================================================+var Schedule;+(function (Schedule) {+ Schedule[Schedule["Startup"] = 0] = "Startup";+ Schedule[Schedule["First"] = 1] = "First";+ Schedule[Schedule["PreUpdate"] = 2] = "PreUpdate";+ Schedule[Schedule["Update"] = 3] = "Update";+ Schedule[Schedule["PostUpdate"] = 4] = "PostUpdate";+ Schedule[Schedule["Last"] = 5] = "Last";+ Schedule[Schedule["FixedPreUpdate"] = 10] = "FixedPreUpdate";+ Schedule[Schedule["FixedUpdate"] = 11] = "FixedUpdate";+ Schedule[Schedule["FixedPostUpdate"] = 12] = "FixedPostUpdate";+})(Schedule || (Schedule = {}));+let systemCounter = 0;+function defineSystem(params, fn, options) {+ const id = ++systemCounter;+ return {+ _id: Symbol(`System_${id}_${options?.name ?? ''}`),+ _params: params,+ _fn: fn,+ _name: options?.name ?? `System_${id}`+ };+}+// =============================================================================+// System Runner+// =============================================================================+class SystemRunner {+ constructor(world, resources) {+ this.world_ = world;+ this.resources_ = resources;+ }+ run(system) {+ const args = system._params.map(param => this.resolveParam(param));+ system._fn(...args);+ for (const arg of args) {+ if (arg instanceof CommandsInstance) {+ arg.flush();+ }+ }+ }+ resolveParam(param) {+ switch (param._type) {+ case 'query':+ return new QueryInstance(this.world_, param);+ case 'res':+ return this.resources_.get(param._resource);+ case 'res_mut':+ return this.resources_.getResMut(param._resource);+ case 'commands':+ return new CommandsInstance(this.world_, this.resources_);+ default:+ throw new Error('Unknown system parameter type');+ }+ }+}++/**+ * @file world.ts+ * @brief ECS World with C++ Registry integration+ */+// =============================================================================+// World+// =============================================================================+class World {+ constructor() {+ this.cppRegistry_ = null;+ this.entities_ = new Set();+ this.tsStorage_ = new Map();+ }+ connectCpp(cppRegistry) {+ this.cppRegistry_ = cppRegistry;+ }+ get hasCpp() {+ return this.cppRegistry_ !== null;+ }+ // =========================================================================+ // Entity Management+ // =========================================================================+ spawn() {+ let entity;+ if (this.cppRegistry_) {+ entity = this.cppRegistry_.create();+ }+ else {+ entity = (this.entities_.size + 1);+ }+ this.entities_.add(entity);+ return entity;+ }+ despawn(entity) {+ if (this.cppRegistry_) {+ this.cppRegistry_.destroy(entity);+ }+ this.entities_.delete(entity);+ for (const storage of this.tsStorage_.values()) {+ storage.delete(entity);+ }+ }+ valid(entity) {+ if (this.cppRegistry_) {+ return this.cppRegistry_.valid(entity);+ }+ return this.entities_.has(entity);+ }+ entityCount() {+ return this.entities_.size;+ }+ getAllEntities() {+ return Array.from(this.entities_);+ }+ setParent(child, parent) {+ if (this.cppRegistry_) {+ this.cppRegistry_.setParent(child, parent);+ }+ }+ // =========================================================================+ // Component Management+ // =========================================================================+ insert(entity, component, data) {+ if (isBuiltinComponent(component)) {+ return this.insertBuiltin(entity, component, data);+ }+ return this.insertScript(entity, component, data);+ }+ get(entity, component) {+ if (isBuiltinComponent(component)) {+ return this.getBuiltin(entity, component);+ }+ return this.getScript(entity, component);+ }+ has(entity, component) {+ if (isBuiltinComponent(component)) {+ return this.hasBuiltin(entity, component);+ }+ return this.hasScript(entity, component);+ }+ remove(entity, component) {+ if (isBuiltinComponent(component)) {+ this.removeBuiltin(entity, component);+ }+ else {+ this.removeScript(entity, component);+ }+ }+ // =========================================================================+ // Builtin Component Operations (C++ Registry)+ // =========================================================================+ insertBuiltin(entity, component, data) {+ const merged = { ...component._default, ...data };+ if (this.cppRegistry_) {+ const adder = `add${component._cppName}`;+ const fn = this.cppRegistry_[adder];+ fn.call(this.cppRegistry_, entity, merged);+ }+ return merged;+ }+ getBuiltin(entity, component) {+ if (!this.cppRegistry_) {+ throw new Error('C++ Registry not connected');+ }+ const getter = `get${component._cppName}`;+ const fn = this.cppRegistry_[getter];+ return fn.call(this.cppRegistry_, entity);+ }+ hasBuiltin(entity, component) {+ if (!this.cppRegistry_) {+ return false;+ }+ const checker = `has${component._cppName}`;+ const fn = this.cppRegistry_[checker];+ return fn.call(this.cppRegistry_, entity);+ }+ removeBuiltin(entity, component) {+ if (!this.cppRegistry_) {+ return;+ }+ const remover = `remove${component._cppName}`;+ const fn = this.cppRegistry_[remover];+ fn.call(this.cppRegistry_, entity);+ }+ // =========================================================================+ // Script Component Operations (TypeScript storage)+ // =========================================================================+ insertScript(entity, component, data) {+ const value = component.create(data);+ this.getStorage(component).set(entity, value);+ return value;+ }+ getScript(entity, component) {+ const storage = this.tsStorage_.get(component._id);+ if (!storage) {+ throw new Error(`Component not found: ${component._name}`);+ }+ return storage.get(entity);+ }+ hasScript(entity, component) {+ const storage = this.tsStorage_.get(component._id);+ return storage?.has(entity) ?? false;+ }+ removeScript(entity, component) {+ const storage = this.tsStorage_.get(component._id);+ storage?.delete(entity);+ }+ getStorage(component) {+ let storage = this.tsStorage_.get(component._id);+ if (!storage) {+ storage = new Map();+ this.tsStorage_.set(component._id, storage);+ }+ return storage;+ }+ // =========================================================================+ // Query Support+ // =========================================================================+ getEntitiesWithComponents(components) {+ if (components.length === 0) {+ return this.getAllEntities();+ }+ const entities = [];+ for (const entity of this.entities_) {+ let hasAll = true;+ for (const comp of components) {+ if (!this.has(entity, comp)) {+ hasAll = false;+ break;+ }+ }+ if (hasAll) {+ entities.push(entity);+ }+ }+ return entities;+ }+}++/**+ * @file text.ts+ * @brief Text component definition for UI text rendering+ */+// =============================================================================+// Text Alignment Enums+// =============================================================================+var TextAlign;+(function (TextAlign) {+ TextAlign[TextAlign["Left"] = 0] = "Left";+ TextAlign[TextAlign["Center"] = 1] = "Center";+ TextAlign[TextAlign["Right"] = 2] = "Right";+})(TextAlign || (TextAlign = {}));+var TextVerticalAlign;+(function (TextVerticalAlign) {+ TextVerticalAlign[TextVerticalAlign["Top"] = 0] = "Top";+ TextVerticalAlign[TextVerticalAlign["Middle"] = 1] = "Middle";+ TextVerticalAlign[TextVerticalAlign["Bottom"] = 2] = "Bottom";+})(TextVerticalAlign || (TextVerticalAlign = {}));+var TextOverflow;+(function (TextOverflow) {+ TextOverflow[TextOverflow["Visible"] = 0] = "Visible";+ TextOverflow[TextOverflow["Clip"] = 1] = "Clip";+ TextOverflow[TextOverflow["Ellipsis"] = 2] = "Ellipsis";+})(TextOverflow || (TextOverflow = {}));+// =============================================================================+// Text Component Definition+// =============================================================================+const Text = defineComponent('Text', {+ content: '',+ fontFamily: 'Arial',+ fontSize: 24,+ color: { x: 1, y: 1, z: 1, w: 1 },+ align: TextAlign.Left,+ verticalAlign: TextVerticalAlign.Top,+ wordWrap: true,+ overflow: TextOverflow.Visible,+ lineHeight: 1.2,+ dirty: true,+});++/**+ * @file TextRenderer.ts+ * @brief Renders text to GPU textures using Canvas 2D API+ */+// =============================================================================+// Text Renderer+// =============================================================================+class TextRenderer {+ constructor(module) {+ this.cache = new Map();+ this.module = module;+ if (typeof OffscreenCanvas !== 'undefined') {+ this.canvas = new OffscreenCanvas(512, 512);+ this.ctx = this.canvas.getContext('2d', { willReadFrequently: true });+ }+ else {+ this.canvas = document.createElement('canvas');+ this.canvas.width = 512;+ this.canvas.height = 512;+ this.ctx = this.canvas.getContext('2d', { willReadFrequently: true });+ }+ }+ /**+ * Renders text to a texture and returns the handle+ */+ renderText(text, uiRect) {+ const ctx = this.ctx;+ const canvas = this.canvas;+ ctx.font = `${text.fontSize}px ${text.fontFamily}`;+ const hasContainer = uiRect && uiRect.size.x > 0 && uiRect.size.y > 0;+ const containerWidth = hasContainer ? uiRect.size.x : 0;+ const containerHeight = hasContainer ? uiRect.size.y : 0;+ const shouldWrap = text.wordWrap && hasContainer;+ let lines = this.wrapText(text.content, shouldWrap ? containerWidth : 0);+ const lineHeightPx = Math.ceil(text.fontSize * text.lineHeight);+ const padding = Math.ceil(text.fontSize * 0.2);+ const measuredWidth = Math.ceil(this.measureWidth(lines));+ const measuredHeight = Math.ceil(lines.length * lineHeightPx);+ const width = hasContainer ? Math.ceil(containerWidth) : measuredWidth + padding * 2;+ const height = hasContainer ? Math.ceil(containerHeight) : measuredHeight + padding * 2;+ // Handle overflow ellipsis+ if (hasContainer && text.overflow === TextOverflow.Ellipsis && measuredHeight > containerHeight) {+ const maxLines = Math.floor(containerHeight / lineHeightPx);+ if (maxLines > 0 && lines.length > maxLines) {+ lines = lines.slice(0, maxLines);+ const lastLine = lines[maxLines - 1];+ lines[maxLines - 1] = this.truncateWithEllipsis(lastLine, containerWidth);+ }+ }+ if (canvas.width < width || canvas.height < height) {+ const newWidth = Math.max(canvas.width, this.nextPowerOf2(width));+ const newHeight = Math.max(canvas.height, this.nextPowerOf2(height));+ canvas.width = newWidth;+ canvas.height = newHeight;+ }+ const r = Math.round(text.color.x * 255);+ const g = Math.round(text.color.y * 255);+ const b = Math.round(text.color.z * 255);+ const a = text.color.w;+ ctx.clearRect(0, 0, canvas.width, canvas.height);+ ctx.font = `${text.fontSize}px ${text.fontFamily}`;+ ctx.textAlign = this.mapAlign(text.align);+ ctx.textBaseline = 'top';+ ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${a})`;+ // Handle overflow clip+ if (hasContainer && text.overflow === TextOverflow.Clip) {+ ctx.save();+ ctx.beginPath();+ ctx.rect(0, 0, width, height);+ ctx.clip();+ }+ const textBlockHeight = lines.length * lineHeightPx;+ let startY;+ if (hasContainer) {+ switch (text.verticalAlign) {+ case TextVerticalAlign.Top:+ startY = padding;+ break;+ case TextVerticalAlign.Middle:+ startY = (height - textBlockHeight) / 2;+ break;+ case TextVerticalAlign.Bottom:+ startY = height - textBlockHeight - padding;+ break;+ default: startY = padding;+ }+ }+ else {+ startY = padding;+ }+ let y = startY;+ for (const line of lines) {+ let x;+ switch (text.align) {+ case TextAlign.Left:+ x = padding;+ break;+ case TextAlign.Center:+ x = width / 2;+ break;+ case TextAlign.Right:+ x = width - padding;+ break;+ default:+ x = padding;+ }+ ctx.fillText(line, x, y);+ y += lineHeightPx;+ }+ if (hasContainer && text.overflow === TextOverflow.Clip) {+ ctx.restore();+ }+ const imageData = ctx.getImageData(0, 0, width, height);+ const pixels = new Uint8Array(imageData.data.buffer);+ const flipped = this.flipVertically(pixels, width, height);+ const rm = this.module.getResourceManager();+ const ptr = this.module._malloc(flipped.length);+ this.module.HEAPU8.set(flipped, ptr);+ const textureHandle = rm.createTexture(width, height, ptr, flipped.length, 1);+ this.module._free(ptr);+ return { textureHandle, width, height };+ }+ truncateWithEllipsis(text, maxWidth) {+ const ellipsis = '...';+ if (this.ctx.measureText(text).width <= maxWidth) {+ return text;+ }+ let truncated = text;+ while (truncated.length > 0 && this.ctx.measureText(truncated + ellipsis).width > maxWidth) {+ truncated = truncated.slice(0, -1);+ }+ return truncated + ellipsis;+ }+ /**+ * Renders text for an entity and caches the result+ */+ renderForEntity(entity, text, uiRect) {+ const existing = this.cache.get(entity);+ if (existing) {+ const rm = this.module.getResourceManager();+ rm.releaseTexture(existing.textureHandle);+ }+ const result = this.renderText(text, uiRect);+ this.cache.set(entity, result);+ return result;+ }+ /**+ * Gets cached render result for entity+ */+ getCached(entity) {+ return this.cache.get(entity);+ }+ /**+ * Releases texture for entity+ */+ release(entity) {+ const cached = this.cache.get(entity);+ if (cached) {+ const rm = this.module.getResourceManager();+ rm.releaseTexture(cached.textureHandle);+ this.cache.delete(entity);+ }+ }+ /**+ * Releases all cached textures+ */+ releaseAll() {+ const rm = this.module.getResourceManager();+ for (const result of this.cache.values()) {+ rm.releaseTexture(result.textureHandle);+ }+ this.cache.clear();+ }+ // =========================================================================+ // Private Methods+ // =========================================================================+ wrapText(text, maxWidth) {+ if (!text)+ return [''];+ if (maxWidth <= 0)+ return text.split('\n');+ const paragraphs = text.split('\n');+ const lines = [];+ for (const paragraph of paragraphs) {+ if (!paragraph) {+ lines.push('');+ continue;+ }+ let currentLine = '';+ for (const char of paragraph) {+ const testLine = currentLine + char;+ const metrics = this.ctx.measureText(testLine);+ if (metrics.width > maxWidth && currentLine) {+ lines.push(currentLine);+ currentLine = char;+ }+ else {+ currentLine = testLine;+ }+ }+ if (currentLine) {+ lines.push(currentLine);+ }+ }+ return lines.length > 0 ? lines : [''];+ }+ measureWidth(lines) {+ let maxWidth = 0;+ for (const line of lines) {+ const metrics = this.ctx.measureText(line);+ const width = metrics.actualBoundingBoxLeft !== undefined+ ? metrics.actualBoundingBoxLeft + metrics.actualBoundingBoxRight+ : metrics.width;+ maxWidth = Math.max(maxWidth, width);+ }+ return maxWidth;+ }+ mapAlign(align) {+ switch (align) {+ case TextAlign.Left:+ return 'left';+ case TextAlign.Center:+ return 'center';+ case TextAlign.Right:+ return 'right';+ }+ }+ nextPowerOf2(n) {+ let p = 1;+ while (p < n)+ p *= 2;+ return p;+ }+ flipVertically(pixels, width, height) {+ const rowSize = width * 4;+ const flipped = new Uint8Array(pixels.length);+ for (let y = 0; y < height; y++) {+ const srcOffset = y * rowSize;+ const dstOffset = (height - 1 - y) * rowSize;+ flipped.set(pixels.subarray(srcOffset, srcOffset + rowSize), dstOffset);+ }+ return flipped;+ }+}++/**+ * @file UIRect.ts+ * @brief UIRect component for UI layout with anchor and pivot+ */+// =============================================================================+// UIRect Component Definition+// =============================================================================+const UIRect = defineComponent('UIRect', {+ size: { x: 100, y: 100 },+ anchor: { x: 0.5, y: 0.5 },+ pivot: { x: 0.5, y: 0.5 },+});++/**+ * @file TextPlugin.ts+ * @brief Plugin that automatically syncs Text components to Sprite textures+ */+// =============================================================================+// Text Plugin+// =============================================================================+class TextPlugin {+ build(app) {+ const module = app.wasmModule;+ if (!module) {+ console.warn('TextPlugin: No WASM module available');+ return;+ }+ const renderer = new TextRenderer(module);+ const world = app.world;+ app.addSystemToSchedule(Schedule.PreUpdate, defineSystem([], () => {+ const entities = world.getEntitiesWithComponents([Text]);+ for (const entity of entities) {+ const text = world.get(entity, Text);+ if (!text.dirty)+ continue;+ if (!world.has(entity, Sprite)) {+ world.insert(entity, Sprite, {+ texture: 0,+ size: { x: 0, y: 0 },+ color: { x: 1, y: 1, z: 1, w: 1 },+ anchor: { x: 0.5, y: 0.5 },+ flip: { x: false, y: false }+ });+ }+ const uiRect = world.has(entity, UIRect)+ ? world.get(entity, UIRect)+ : null;+ const result = renderer.renderForEntity(entity, text, uiRect);+ const sprite = world.get(entity, Sprite);+ sprite.texture = result.textureHandle;+ sprite.size = { x: result.width, y: result.height };+ sprite.uvOffset = { x: 0, y: 0 };+ sprite.uvScale = { x: 1, y: 1 };+ world.insert(entity, Sprite, sprite);+ text.dirty = false;+ }+ }));+ }+}+const textPlugin = new TextPlugin();++/**+ * @file blend.ts+ * @brief Blend mode definitions for rendering+ */+var BlendMode;+(function (BlendMode) {+ BlendMode[BlendMode["Normal"] = 0] = "Normal";+ BlendMode[BlendMode["Additive"] = 1] = "Additive";+ BlendMode[BlendMode["Multiply"] = 2] = "Multiply";+ BlendMode[BlendMode["Screen"] = 3] = "Screen";+ BlendMode[BlendMode["PremultipliedAlpha"] = 4] = "PremultipliedAlpha";+})(BlendMode || (BlendMode = {}));++/**+ * @file material.ts+ * @brief Material and Shader API for custom rendering+ * @details Provides shader creation and material management for custom visual effects.+ */+let resourceManager = null;+let nextMaterialId = 1;+const materials = new Map();+// =============================================================================+// Initialization+// =============================================================================+function initMaterialAPI(wasmModule) {+ resourceManager = wasmModule.getResourceManager();+}+function shutdownMaterialAPI() {+ materials.clear();+ nextMaterialId = 1;+ resourceManager = null;+}+// =============================================================================+// Shader API+// =============================================================================+function getResourceManager() {+ if (!resourceManager) {+ throw new Error('Material API not initialized. Call initMaterialAPI() first.');+ }+ return resourceManager;+}+const Material = {+ /**+ * Creates a shader from vertex and fragment source code.+ * @param vertexSrc GLSL vertex shader source+ * @param fragmentSrc GLSL fragment shader source+ * @returns Shader handle, or 0 on failure+ */+ createShader(vertexSrc, fragmentSrc) {+ return getResourceManager().createShader(vertexSrc, fragmentSrc);+ },+ /**+ * Releases a shader.+ * @param shader Shader handle to release+ */+ releaseShader(shader) {+ if (shader > 0) {+ getResourceManager().releaseShader(shader);+ }+ },+ /**+ * Creates a material with a shader and optional settings.+ * @param options Material creation options+ * @returns Material handle+ */+ create(options) {+ const handle = nextMaterialId++;+ const data = {+ shader: options.shader,+ uniforms: new Map(),+ blendMode: options.blendMode ?? BlendMode.Normal,+ depthTest: options.depthTest ?? false,+ };+ if (options.uniforms) {+ for (const [key, value] of Object.entries(options.uniforms)) {+ data.uniforms.set(key, value);+ }+ }+ materials.set(handle, data);+ return handle;+ },+ /**+ * Gets material data by handle.+ * @param material Material handle+ * @returns Material data or undefined+ */+ get(material) {+ return materials.get(material);+ },+ /**+ * Sets a uniform value on a material.+ * @param material Material handle+ * @param name Uniform name+ * @param value Uniform value+ */+ setUniform(material, name, value) {+ const data = materials.get(material);+ if (data) {+ data.uniforms.set(name, value);+ }+ },+ /**+ * Gets a uniform value from a material.+ * @param material Material handle+ * @param name Uniform name+ * @returns Uniform value or undefined+ */+ getUniform(material, name) {+ const data = materials.get(material);+ return data?.uniforms.get(name);+ },+ /**+ * Sets the blend mode for a material.+ * @param material Material handle+ * @param mode Blend mode+ */+ setBlendMode(material, mode) {+ const data = materials.get(material);+ if (data) {+ data.blendMode = mode;+ }+ },+ /**+ * Gets the blend mode of a material.+ * @param material Material handle+ * @returns Blend mode+ */+ getBlendMode(material) {+ const data = materials.get(material);+ return data?.blendMode ?? BlendMode.Normal;+ },+ /**+ * Sets depth test enabled for a material.+ * @param material Material handle+ * @param enabled Whether depth test is enabled+ */+ setDepthTest(material, enabled) {+ const data = materials.get(material);+ if (data) {+ data.depthTest = enabled;+ }+ },+ /**+ * Gets the shader handle for a material.+ * @param material Material handle+ * @returns Shader handle+ */+ getShader(material) {+ const data = materials.get(material);+ return data?.shader ?? 0;+ },+ /**+ * Releases a material (does not release the shader).+ * @param material Material handle+ */+ release(material) {+ materials.delete(material);+ },+ /**+ * Checks if a material exists.+ * @param material Material handle+ * @returns True if material exists+ */+ isValid(material) {+ return materials.has(material);+ },+};+// =============================================================================+// Built-in Shader Sources+// =============================================================================+const ShaderSources = {+ SPRITE_VERTEX: `#version 300 es+precision highp float;++layout(location = 0) in vec3 a_position;+layout(location = 1) in vec4 a_color;+layout(location = 2) in vec2 a_texCoord;++uniform mat4 u_projection;+uniform mat4 u_model;++out vec4 v_color;+out vec2 v_texCoord;++void main() {+ v_color = a_color;+ v_texCoord = a_texCoord;+ gl_Position = u_projection * u_model * vec4(a_position, 1.0);+}+`,+ SPRITE_FRAGMENT: `#version 300 es+precision highp float;++in vec4 v_color;+in vec2 v_texCoord;++uniform sampler2D u_texture;++out vec4 fragColor;++void main() {+ fragColor = texture(u_texture, v_texCoord) * v_color;+}+`,+ COLOR_VERTEX: `#version 300 es+precision highp float;++layout(location = 0) in vec3 a_position;+layout(location = 1) in vec4 a_color;++uniform mat4 u_projection;+uniform mat4 u_model;++out vec4 v_color;++void main() {+ v_color = a_color;+ gl_Position = u_projection * u_model * vec4(a_position, 1.0);+}+`,+ COLOR_FRAGMENT: `#version 300 es+precision highp float;++in vec4 v_color;++out vec4 fragColor;++void main() {+ fragColor = v_color;+}+`,+};++/**+ * @file draw.ts+ * @brief Immediate mode 2D drawing API+ * @details Provides simple drawing primitives (lines, rectangles, circles)+ * with automatic batching. All draw commands are cleared each frame.+ */+// =============================================================================+// Internal State+// =============================================================================+let module$4 = null;+let viewProjectionPtr$1 = 0;+let transformPtr = 0;+let uniformsPtr = 0;+const UNIFORMS_BUFFER_SIZE = 256;+const uniformBuffer = new Float32Array(UNIFORMS_BUFFER_SIZE);+// =============================================================================+// Initialization+// =============================================================================+function initDrawAPI(wasmModule) {+ module$4 = wasmModule;+ viewProjectionPtr$1 = module$4._malloc(16 * 4);+ transformPtr = module$4._malloc(16 * 4);+ uniformsPtr = module$4._malloc(UNIFORMS_BUFFER_SIZE * 4);+}+function shutdownDrawAPI() {+ if (module$4) {+ if (viewProjectionPtr$1) {+ module$4._free(viewProjectionPtr$1);+ viewProjectionPtr$1 = 0;+ }+ if (transformPtr) {+ module$4._free(transformPtr);+ transformPtr = 0;+ }+ if (uniformsPtr) {+ module$4._free(uniformsPtr);+ uniformsPtr = 0;+ }+ }+ module$4 = null;+}+// =============================================================================+// Draw Implementation+// =============================================================================+function getModule$2() {+ if (!module$4) {+ throw new Error('Draw API not initialized. Call initDrawAPI() first.');+ }+ return module$4;+}+const WHITE = { x: 1, y: 1, z: 1, w: 1 };+const Draw = {+ begin(viewProjection) {+ const m = getModule$2();+ m.HEAPF32.set(viewProjection, viewProjectionPtr$1 / 4);+ m.draw_begin(viewProjectionPtr$1);+ },+ end() {+ getModule$2().draw_end();+ },+ line(from, to, color, thickness = 1) {+ getModule$2().draw_line(from.x, from.y, to.x, to.y, color.x, color.y, color.z, color.w, thickness);+ },+ rect(position, size, color, filled = true) {+ getModule$2().draw_rect(position.x, position.y, size.x, size.y, color.x, color.y, color.z, color.w, filled);+ },+ rectOutline(position, size, color, thickness = 1) {+ getModule$2().draw_rectOutline(position.x, position.y, size.x, size.y, color.x, color.y, color.z, color.w, thickness);+ },+ circle(center, radius, color, filled = true, segments = 32) {+ getModule$2().draw_circle(center.x, center.y, radius, color.x, color.y, color.z, color.w, filled, segments);+ },+ circleOutline(center, radius, color, thickness = 1, segments = 32) {+ getModule$2().draw_circleOutline(center.x, center.y, radius, color.x, color.y, color.z, color.w, thickness, segments);+ },+ texture(position, size, textureHandle, tint = WHITE) {+ getModule$2().draw_texture(position.x, position.y, size.x, size.y, textureHandle, tint.x, tint.y, tint.z, tint.w);+ },+ textureRotated(position, size, rotation, textureHandle, tint = WHITE) {+ getModule$2().draw_textureRotated(position.x, position.y, size.x, size.y, rotation, textureHandle, tint.x, tint.y, tint.z, tint.w);+ },+ setLayer(layer) {+ getModule$2().draw_setLayer(layer);+ },+ setDepth(depth) {+ getModule$2().draw_setDepth(depth);+ },+ getDrawCallCount() {+ if (!module$4)+ return 0;+ return module$4.draw_getDrawCallCount();+ },+ getPrimitiveCount() {+ if (!module$4)+ return 0;+ return module$4.draw_getPrimitiveCount();+ },+ setBlendMode(mode) {+ getModule$2().draw_setBlendMode(mode);+ },+ setDepthTest(enabled) {+ getModule$2().draw_setDepthTest(enabled);+ },+ drawMesh(geometry, shader, transform) {+ const m = getModule$2();+ m.HEAPF32.set(transform, transformPtr / 4);+ m.draw_mesh(geometry, shader, transformPtr);+ },+ drawMeshWithMaterial(geometry, material, transform) {+ const m = getModule$2();+ const matData = Material.get(material);+ if (!matData)+ return;+ Draw.setBlendMode(matData.blendMode);+ Draw.setDepthTest(matData.depthTest);+ if (matData.uniforms.size === 0) {+ Draw.drawMesh(geometry, matData.shader, transform);+ return;+ }+ m.HEAPF32.set(transform, transformPtr / 4);+ let idx = 0;+ for (const [name, value] of matData.uniforms) {+ const nameId = getUniformNameId(name);+ if (nameId < 0)+ continue;+ if (typeof value === 'number') {+ uniformBuffer[idx++] = 1;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value;+ }+ else if (Array.isArray(value)) {+ uniformBuffer[idx++] = value.length;+ uniformBuffer[idx++] = nameId;+ for (let i = 0; i < value.length; i++) {+ uniformBuffer[idx++] = value[i];+ }+ }+ else if ('w' in value) {+ uniformBuffer[idx++] = 4;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value.x;+ uniformBuffer[idx++] = value.y;+ uniformBuffer[idx++] = value.z;+ uniformBuffer[idx++] = value.w;+ }+ else if ('z' in value) {+ uniformBuffer[idx++] = 3;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value.x;+ uniformBuffer[idx++] = value.y;+ uniformBuffer[idx++] = value.z;+ }+ else {+ uniformBuffer[idx++] = 2;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value.x;+ uniformBuffer[idx++] = value.y;+ }+ if (idx > UNIFORMS_BUFFER_SIZE - 6) {+ console.warn('Uniform buffer overflow, some uniforms will be ignored');+ break;+ }+ }+ if (idx === 0) {+ m.draw_mesh(geometry, matData.shader, transformPtr);+ return;+ }+ m.HEAPF32.set(uniformBuffer.subarray(0, idx), uniformsPtr / 4);+ m.draw_meshWithUniforms(geometry, matData.shader, transformPtr, uniformsPtr, idx);+ },+};+const UNIFORM_NAME_MAP = {+ 'u_time': 0,+ 'u_color': 1,+ 'u_intensity': 2,+ 'u_scale': 3,+ 'u_offset': 4,+ 'u_param0': 5,+ 'u_param1': 6,+ 'u_param2': 7,+ 'u_param3': 8,+ 'u_param4': 9,+ 'u_vec0': 10,+ 'u_vec1': 11,+ 'u_vec2': 12,+ 'u_vec3': 13,+ 'u_texture0': 14,+ 'u_texture1': 15,+ 'u_texture2': 16,+ 'u_texture3': 17,+};+function getUniformNameId(name) {+ return UNIFORM_NAME_MAP[name] ?? -1;+}++/**+ * @file geometry.ts+ * @brief Geometry API for custom mesh rendering+ * @details Provides geometry creation and management for custom shapes,+ * particles, trails, and other procedural meshes.+ */+var DataType;+(function (DataType) {+ DataType[DataType["Float"] = 1] = "Float";+ DataType[DataType["Float2"] = 2] = "Float2";+ DataType[DataType["Float3"] = 3] = "Float3";+ DataType[DataType["Float4"] = 4] = "Float4";+ DataType[DataType["Int"] = 5] = "Int";+ DataType[DataType["Int2"] = 6] = "Int2";+ DataType[DataType["Int3"] = 7] = "Int3";+ DataType[DataType["Int4"] = 8] = "Int4";+})(DataType || (DataType = {}));+// =============================================================================+// Internal State+// =============================================================================+let module$3 = null;+let vertexPtr = 0;+let indexPtr = 0;+let layoutPtr = 0;+const VERTEX_BUFFER_SIZE = 64 * 1024;+const INDEX_BUFFER_SIZE = 16 * 1024;+const LAYOUT_BUFFER_SIZE = 64;+// =============================================================================+// Initialization+// =============================================================================+function initGeometryAPI(wasmModule) {+ module$3 = wasmModule;+ vertexPtr = module$3._malloc(VERTEX_BUFFER_SIZE * 4);+ indexPtr = module$3._malloc(INDEX_BUFFER_SIZE * 4);+ layoutPtr = module$3._malloc(LAYOUT_BUFFER_SIZE * 4);+}+function shutdownGeometryAPI() {+ if (module$3) {+ if (vertexPtr)+ module$3._free(vertexPtr);+ if (indexPtr)+ module$3._free(indexPtr);+ if (layoutPtr)+ module$3._free(layoutPtr);+ vertexPtr = 0;+ indexPtr = 0;+ layoutPtr = 0;+ }+ module$3 = null;+}+// =============================================================================+// Geometry API+// =============================================================================+function getModule$1() {+ if (!module$3) {+ throw new Error('Geometry API not initialized. Call initGeometryAPI() first.');+ }+ return module$3;+}+const Geometry = {+ /**+ * Creates a new geometry with vertices and optional indices.+ * @param options Geometry creation options+ * @returns Geometry handle+ */+ create(options) {+ const m = getModule$1();+ const handle = m.geometry_create();+ if (handle === 0) {+ throw new Error('Failed to create geometry');+ }+ const vertexCount = options.vertices.length;+ if (vertexCount * 4 > VERTEX_BUFFER_SIZE * 4) {+ throw new Error(`Vertex data too large: ${vertexCount} floats (max ${VERTEX_BUFFER_SIZE})`);+ }+ m.HEAPF32.set(options.vertices, vertexPtr / 4);+ const layoutCount = options.layout.length;+ const layoutArray = new Int32Array(layoutCount);+ for (let i = 0; i < layoutCount; i++) {+ layoutArray[i] = options.layout[i].type;+ }+ const heap32 = new Int32Array(m.HEAPU8.buffer, layoutPtr, layoutCount);+ heap32.set(layoutArray);+ m.geometry_init(handle, vertexPtr, vertexCount, layoutPtr, layoutCount, options.dynamic ?? false);+ if (options.indices) {+ const indexCount = options.indices.length;+ if (indexCount * 4 > INDEX_BUFFER_SIZE * 4) {+ throw new Error(`Index data too large: ${indexCount} indices (max ${INDEX_BUFFER_SIZE})`);+ }+ if (options.indices instanceof Uint16Array) {+ const heap16 = new Uint16Array(m.HEAPU8.buffer, indexPtr, indexCount);+ heap16.set(options.indices);+ m.geometry_setIndices16(handle, indexPtr, indexCount);+ }+ else {+ const heap32 = new Uint32Array(m.HEAPU8.buffer, indexPtr, indexCount);+ heap32.set(options.indices);+ m.geometry_setIndices32(handle, indexPtr, indexCount);+ }+ }+ return handle;+ },+ /**+ * Updates vertices of a dynamic geometry.+ * @param handle Geometry handle+ * @param vertices New vertex data+ * @param offset Offset in floats+ */+ updateVertices(handle, vertices, offset = 0) {+ const m = getModule$1();+ const vertexCount = vertices.length;+ if (vertexCount * 4 > VERTEX_BUFFER_SIZE * 4) {+ throw new Error(`Vertex data too large: ${vertexCount} floats (max ${VERTEX_BUFFER_SIZE})`);+ }+ m.HEAPF32.set(vertices, vertexPtr / 4);+ m.geometry_updateVertices(handle, vertexPtr, vertexCount, offset);+ },+ /**+ * Releases a geometry.+ * @param handle Geometry handle+ */+ release(handle) {+ if (handle > 0) {+ getModule$1().geometry_release(handle);+ }+ },+ /**+ * Checks if a geometry handle is valid.+ * @param handle Geometry handle+ * @returns True if valid+ */+ isValid(handle) {+ if (!module$3 || handle <= 0)+ return false;+ return module$3.geometry_isValid(handle);+ },+ // =========================================================================+ // Helper Functions+ // =========================================================================+ /**+ * Creates a unit quad geometry (1x1, centered at origin).+ * @returns Geometry handle+ */+ createQuad(width = 1, height = 1) {+ const hw = width / 2;+ const hh = height / 2;+ return Geometry.create({+ vertices: new Float32Array([+ // x, y, u, v+ -hw, -hh, 0, 0,+ hw, -hh, 1, 0,+ hw, hh, 1, 1,+ -hw, hh, 0, 1,+ ]),+ layout: [+ { name: 'a_position', type: DataType.Float2 },+ { name: 'a_texCoord', type: DataType.Float2 },+ ],+ indices: new Uint16Array([0, 1, 2, 2, 3, 0]),+ });+ },+ /**+ * Creates a circle geometry.+ * @param radius Circle radius+ * @param segments Number of segments+ * @returns Geometry handle+ */+ createCircle(radius = 1, segments = 32) {+ const vertices = [];+ const indices = [];+ vertices.push(0, 0, 0.5, 0.5);+ for (let i = 0; i <= segments; i++) {+ const angle = (i / segments) * Math.PI * 2;+ const x = Math.cos(angle) * radius;+ const y = Math.sin(angle) * radius;+ const u = (Math.cos(angle) + 1) / 2;+ const v = (Math.sin(angle) + 1) / 2;+ vertices.push(x, y, u, v);+ }+ for (let i = 1; i <= segments; i++) {+ indices.push(0, i, i + 1);+ }+ return Geometry.create({+ vertices: new Float32Array(vertices),+ layout: [+ { name: 'a_position', type: DataType.Float2 },+ { name: 'a_texCoord', type: DataType.Float2 },+ ],+ indices: new Uint16Array(indices),+ });+ },+ /**+ * Creates a polygon geometry from vertices.+ * @param points Array of {x, y} points+ * @returns Geometry handle+ */+ createPolygon(points) {+ if (points.length < 3) {+ throw new Error('Polygon must have at least 3 points');+ }+ let minX = Infinity, minY = Infinity;+ let maxX = -Infinity, maxY = -Infinity;+ for (const p of points) {+ minX = Math.min(minX, p.x);+ minY = Math.min(minY, p.y);+ maxX = Math.max(maxX, p.x);+ maxY = Math.max(maxY, p.y);+ }+ const vertices = [];+ for (const p of points) {+ const u = (p.x - minX) / (maxX - minX);+ const v = (p.y - minY) / (maxY - minY);+ vertices.push(p.x, p.y, u, v);+ }+ const indices = [];+ for (let i = 1; i < points.length - 1; i++) {+ indices.push(0, i, i + 1);+ }+ return Geometry.create({+ vertices: new Float32Array(vertices),+ layout: [+ { name: 'a_position', type: DataType.Float2 },+ { name: 'a_texCoord', type: DataType.Float2 },+ ],+ indices: new Uint16Array(indices),+ });+ },+};++/**+ * @file postprocess.ts+ * @brief Post-processing effects API+ * @details Provides full-screen post-processing effects like blur, vignette, etc.+ */+// =============================================================================+// Internal State+// =============================================================================+let module$2 = null;+// =============================================================================+// Initialization+// =============================================================================+function initPostProcessAPI(wasmModule) {+ module$2 = wasmModule;+}+function shutdownPostProcessAPI() {+ if (module$2 && PostProcess.isInitialized()) {+ PostProcess.shutdown();+ }+ module$2 = null;+}+// =============================================================================+// PostProcess API+// =============================================================================+function getModule() {+ if (!module$2) {+ throw new Error('PostProcess API not initialized. Call initPostProcessAPI() first.');+ }+ return module$2;+}+const PostProcess = {+ /**+ * Initializes the post-processing pipeline.+ * @param width Framebuffer width+ * @param height Framebuffer height+ * @returns True on success+ */+ init(width, height) {+ return getModule().postprocess_init(width, height);+ },+ /**+ * Shuts down the post-processing pipeline.+ */+ shutdown() {+ getModule().postprocess_shutdown();+ },+ /**+ * Resizes the framebuffers.+ * @param width New width+ * @param height New height+ */+ resize(width, height) {+ getModule().postprocess_resize(width, height);+ },+ /**+ * Adds a post-processing pass.+ * @param name Unique name for the pass+ * @param shader Shader handle+ * @returns Pass index+ */+ addPass(name, shader) {+ return getModule().postprocess_addPass(name, shader);+ },+ /**+ * Removes a pass by name.+ * @param name Pass name+ */+ removePass(name) {+ getModule().postprocess_removePass(name);+ },+ /**+ * Enables or disables a pass.+ * @param name Pass name+ * @param enabled Whether to enable the pass+ */+ setEnabled(name, enabled) {+ getModule().postprocess_setPassEnabled(name, enabled);+ },+ /**+ * Checks if a pass is enabled.+ * @param name Pass name+ * @returns True if enabled+ */+ isEnabled(name) {+ return getModule().postprocess_isPassEnabled(name);+ },+ /**+ * Sets a float uniform on a pass.+ * @param passName Pass name+ * @param uniform Uniform name+ * @param value Float value+ */+ setUniform(passName, uniform, value) {+ getModule().postprocess_setUniformFloat(passName, uniform, value);+ },+ /**+ * Sets a vec4 uniform on a pass.+ * @param passName Pass name+ * @param uniform Uniform name+ * @param value Vec4 value+ */+ setUniformVec4(passName, uniform, value) {+ getModule().postprocess_setUniformVec4(passName, uniform, value.x, value.y, value.z, value.w);+ },+ /**+ * Begins rendering to the post-process pipeline.+ * Call this before rendering your scene.+ */+ begin() {+ getModule().postprocess_begin();+ },+ /**+ * Ends and processes all passes.+ * Call this after rendering your scene.+ */+ end() {+ getModule().postprocess_end();+ },+ /**+ * Gets the number of passes.+ */+ getPassCount() {+ return getModule().postprocess_getPassCount();+ },+ /**+ * Checks if the pipeline is initialized.+ */+ isInitialized() {+ if (!module$2)+ return false;+ return module$2.postprocess_isInitialized();+ },+ /**+ * Sets bypass mode to skip FBO rendering entirely.+ * When bypassed, begin()/end() become no-ops and scene renders directly to screen.+ * Use this when no post-processing passes are needed for maximum performance.+ * @param bypass Whether to bypass the pipeline+ */+ setBypass(bypass) {+ getModule().postprocess_setBypass(bypass);+ },+ /**+ * Checks if bypass mode is enabled.+ * @returns True if bypassed+ */+ isBypassed() {+ if (!module$2)+ return true;+ return module$2.postprocess_isBypassed();+ },+ // =========================================================================+ // Built-in Effects+ // =========================================================================+ /**+ * Creates a blur effect shader.+ * @returns Shader handle+ */+ createBlur() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform vec2 u_resolution;+uniform float u_intensity;+out vec4 fragColor;++void main() {+ vec2 texelSize = 1.0 / u_resolution;+ float offset = u_intensity;++ vec4 color = vec4(0.0);+ color += texture(u_texture, v_texCoord + vec2(-offset, -offset) * texelSize) * 0.0625;+ color += texture(u_texture, v_texCoord + vec2( 0.0, -offset) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord + vec2( offset, -offset) * texelSize) * 0.0625;+ color += texture(u_texture, v_texCoord + vec2(-offset, 0.0) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord) * 0.25;+ color += texture(u_texture, v_texCoord + vec2( offset, 0.0) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord + vec2(-offset, offset) * texelSize) * 0.0625;+ color += texture(u_texture, v_texCoord + vec2( 0.0, offset) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord + vec2( offset, offset) * texelSize) * 0.0625;++ fragColor = color;+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+ /**+ * Creates a vignette effect shader.+ * @returns Shader handle+ */+ createVignette() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform float u_intensity;+uniform float u_softness;+out vec4 fragColor;++void main() {+ vec4 color = texture(u_texture, v_texCoord);+ vec2 uv = v_texCoord * 2.0 - 1.0;+ float dist = length(uv);+ float vignette = smoothstep(u_intensity, u_intensity - u_softness, dist);+ fragColor = vec4(color.rgb * vignette, color.a);+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+ /**+ * Creates a grayscale effect shader.+ * @returns Shader handle+ */+ createGrayscale() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform float u_intensity;+out vec4 fragColor;++void main() {+ vec4 color = texture(u_texture, v_texCoord);+ float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));+ fragColor = vec4(mix(color.rgb, vec3(gray), u_intensity), color.a);+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+ /**+ * Creates a chromatic aberration effect shader.+ * @returns Shader handle+ */+ createChromaticAberration() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform vec2 u_resolution;+uniform float u_intensity;+out vec4 fragColor;++void main() {+ vec2 offset = u_intensity / u_resolution;+ float r = texture(u_texture, v_texCoord + offset).r;+ float g = texture(u_texture, v_texCoord).g;+ float b = texture(u_texture, v_texCoord - offset).b;+ float a = texture(u_texture, v_texCoord).a;+ fragColor = vec4(r, g, b, a);+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+};+// =============================================================================+// Shared Vertex Shader+// =============================================================================+const POSTPROCESS_VERTEX = `#version 300 es+precision highp float;++layout(location = 0) in vec2 a_position;+layout(location = 1) in vec2 a_texCoord;++out vec2 v_texCoord;++void main() {+ v_texCoord = a_texCoord;+ gl_Position = vec4(a_position, 0.0, 1.0);+}+`;++var RenderStage;+(function (RenderStage) {+ RenderStage[RenderStage["Background"] = 0] = "Background";+ RenderStage[RenderStage["Opaque"] = 1] = "Opaque";+ RenderStage[RenderStage["Transparent"] = 2] = "Transparent";+ RenderStage[RenderStage["Overlay"] = 3] = "Overlay";+})(RenderStage || (RenderStage = {}));+let module$1 = null;+let viewProjectionPtr = 0;+function initRendererAPI(wasmModule) {+ module$1 = wasmModule;+ viewProjectionPtr = module$1._malloc(16 * 4);+}+function shutdownRendererAPI() {+ if (module$1 && viewProjectionPtr) {+ module$1._free(viewProjectionPtr);+ viewProjectionPtr = 0;+ }+ module$1 = null;+}+const Renderer = {+ init(width, height) {+ module$1?.renderer_init(width, height);+ },+ resize(width, height) {+ module$1?.renderer_resize(width, height);+ },+ begin(viewProjection, target) {+ if (!module$1 || !viewProjectionPtr)+ return;+ module$1.HEAPF32.set(viewProjection, viewProjectionPtr / 4);+ module$1.renderer_begin(viewProjectionPtr, target ?? 0);+ },+ end() {+ module$1?.renderer_end();+ },+ submitSprites(registry) {+ if (!module$1)+ return;+ module$1.renderer_submitSprites(registry._cpp);+ },+ submitSpine(registry) {+ if (!module$1)+ return;+ module$1.renderer_submitSpine(registry._cpp);+ },+ setStage(stage) {+ module$1?.renderer_setStage(stage);+ },+ createRenderTarget(width, height) {+ return module$1?.renderer_createTarget(width, height) ?? 0;+ },+ releaseRenderTarget(handle) {+ module$1?.renderer_releaseTarget(handle);+ },+ getTargetTexture(handle) {+ return module$1?.renderer_getTargetTexture(handle) ?? 0;+ },+ getStats() {+ if (!module$1) {+ return { drawCalls: 0, triangles: 0, sprites: 0, spine: 0, meshes: 0, culled: 0 };+ }+ return {+ drawCalls: module$1.renderer_getDrawCalls(),+ triangles: module$1.renderer_getTriangles(),+ sprites: module$1.renderer_getSprites(),+ spine: module$1.renderer_getSpine(),+ meshes: module$1.renderer_getMeshes(),+ culled: module$1.renderer_getCulled(),+ };+ },+};++/**+ * @file app.ts+ * @brief Application builder and web platform integration+ */+// =============================================================================+// App+// =============================================================================+class App {+ constructor() {+ this.systems_ = new Map();+ this.runner_ = null;+ this.running_ = false;+ this.lastTime_ = 0;+ this.module_ = null;+ this.mainLoop = () => {+ if (!this.running_) {+ return;+ }+ const now = performance.now();+ const deltaMs = now - this.lastTime_;+ this.lastTime_ = now;+ const delta = deltaMs / 1000;+ this.updateTime(delta);+ this.runSchedule(Schedule.First);+ this.runSchedule(Schedule.PreUpdate);+ this.runSchedule(Schedule.Update);+ this.runSchedule(Schedule.PostUpdate);+ this.runSchedule(Schedule.Last);+ requestAnimationFrame(this.mainLoop);+ };+ this.world_ = new World();+ this.resources_ = new ResourceStorage();+ for (const s of Object.values(Schedule)) {+ if (typeof s === 'number') {+ this.systems_.set(s, []);+ }+ }+ }+ static new() {+ return new App();+ }+ // =========================================================================+ // Plugins+ // =========================================================================+ addPlugin(plugin) {+ plugin.build(this);+ return this;+ }+ // =========================================================================+ // Systems+ // =========================================================================+ addSystemToSchedule(schedule, system) {+ this.systems_.get(schedule).push({ system });+ return this;+ }+ addSystem(system) {+ return this.addSystemToSchedule(Schedule.Update, system);+ }+ addStartupSystem(system) {+ return this.addSystemToSchedule(Schedule.Startup, system);+ }+ // =========================================================================+ // C++ Integration+ // =========================================================================+ connectCpp(cppRegistry, module) {+ this.world_.connectCpp(cppRegistry);+ if (module) {+ this.module_ = module;+ }+ return this;+ }+ get wasmModule() {+ return this.module_;+ }+ // =========================================================================+ // World Access+ // =========================================================================+ get world() {+ return this.world_;+ }+ // =========================================================================+ // Resource Access+ // =========================================================================+ insertResource(resource, value) {+ this.resources_.insert(resource, value);+ return this;+ }+ getResource(resource) {+ return this.resources_.get(resource);+ }+ hasResource(resource) {+ return this.resources_.has(resource);+ }+ // =========================================================================+ // Run+ // =========================================================================+ run() {+ if (this.running_) {+ return;+ }+ this.running_ = true;+ this.runner_ = new SystemRunner(this.world_, this.resources_);+ this.resources_.insert(Time, { delta: 0, elapsed: 0, frameCount: 0 });+ this.runSchedule(Schedule.Startup);+ this.lastTime_ = performance.now();+ this.mainLoop();+ }+ quit() {+ this.running_ = false;+ shutdownRendererAPI();+ shutdownPostProcessAPI();+ shutdownGeometryAPI();+ shutdownMaterialAPI();+ shutdownDrawAPI();+ }+ // =========================================================================+ // Internal+ // =========================================================================+ runSchedule(schedule) {+ const systems = this.systems_.get(schedule);+ if (!systems || !this.runner_) {+ return;+ }+ for (const entry of systems) {+ this.runner_.run(entry.system);+ }+ }+ updateTime(delta) {+ const time = this.resources_.get(Time);+ const newTime = {+ delta,+ elapsed: time.elapsed + delta,+ frameCount: time.frameCount + 1+ };+ this.resources_.set(Time, newTime);+ }+}+function createWebApp(module, options) {+ const app = App.new();+ const cppRegistry = new module.Registry();+ app.connectCpp(cppRegistry, module);+ if (options?.glContextHandle) {+ module.initRendererWithContext(options.glContextHandle);+ }+ else {+ module.initRenderer();+ }+ initDrawAPI(module);+ initMaterialAPI(module);+ initGeometryAPI(module);+ initPostProcessAPI(module);+ initRendererAPI(module);+ const getViewportSize = options?.getViewportSize ?? (() => ({+ width: window.innerWidth * (window.devicePixelRatio || 1),+ height: window.innerHeight * (window.devicePixelRatio || 1)+ }));+ const renderSystem = {+ _id: Symbol('RenderSystem'),+ _name: 'RenderSystem',+ _params: [],+ _fn: () => {+ const { width, height } = getViewportSize();+ module.renderFrame(cppRegistry, width, height);+ }+ };+ app.addSystemToSchedule(Schedule.Last, renderSystem);+ app.addPlugin(textPlugin);+ return app;+}++/**+ * @file AssetServer.ts+ * @brief Asset loading and caching system+ */+// =============================================================================+// AssetServer+// =============================================================================+class AssetServer {+ constructor(module) {+ this.cache_ = new Map();+ this.pending_ = new Map();+ this.loadedSpines_ = new Map();+ this.virtualFSPaths_ = new Set();+ this.module_ = module;+ if (typeof OffscreenCanvas !== 'undefined') {+ this.canvas_ = new OffscreenCanvas(512, 512);+ this.ctx_ = this.canvas_.getContext('2d', { willReadFrequently: true });+ }+ else {+ this.canvas_ = document.createElement('canvas');+ this.canvas_.width = 512;+ this.canvas_.height = 512;+ this.ctx_ = this.canvas_.getContext('2d', { willReadFrequently: true });+ }+ }+ // =========================================================================+ // Public API+ // =========================================================================+ /**+ * Load texture with vertical flip (for Sprite/UI).+ * OpenGL UV origin is bottom-left, so standard images need flipping.+ */+ async loadTexture(source) {+ return this.loadTextureWithFlip(source, true);+ }+ /**+ * Load texture without flip (for Spine).+ * Spine runtime handles UV coordinates internally.+ */+ async loadTextureRaw(source) {+ return this.loadTextureWithFlip(source, false);+ }+ getTexture(source) {+ return this.cache_.get(this.getCacheKey(source, true));+ }+ hasTexture(source) {+ return this.cache_.has(this.getCacheKey(source, true));+ }+ releaseTexture(source) {+ const rm = this.module_.getResourceManager();+ for (const flip of [true, false]) {+ const key = this.getCacheKey(source, flip);+ const info = this.cache_.get(key);+ if (info) {+ rm.releaseTexture(info.handle);+ this.cache_.delete(key);+ }+ }+ }+ releaseAll() {+ const rm = this.module_.getResourceManager();+ for (const info of this.cache_.values()) {+ rm.releaseTexture(info.handle);+ }+ this.cache_.clear();+ }+ setTextureMetadata(handle, border) {+ const rm = this.module_.getResourceManager();+ rm.setTextureMetadata(handle, border.left, border.right, border.top, border.bottom);+ }+ setTextureMetadataByPath(source, border) {+ const info = this.cache_.get(this.getCacheKey(source, true));+ if (info) {+ this.setTextureMetadata(info.handle, border);+ return true;+ }+ return false;+ }+ async loadSpine(skeletonPath, atlasPath, baseUrl) {+ const cacheKey = `${skeletonPath}:${atlasPath}`;+ if (this.loadedSpines_.get(cacheKey)) {+ return { success: true };+ }+ const resolveUrl = (path) => {+ if (path.startsWith('http://') || path.startsWith('https://') || path.startsWith('/')) {+ return path;+ }+ return baseUrl ? `${baseUrl}/${path}` : `/${path}`;+ };+ try {+ const atlasUrl = resolveUrl(atlasPath);+ const atlasResponse = await fetch(atlasUrl);+ if (!atlasResponse.ok) {+ return { success: false, error: `Failed to fetch atlas: ${atlasUrl}` };+ }+ const atlasContent = await atlasResponse.text();+ if (!this.writeToVirtualFS(atlasPath, atlasContent)) {+ return { success: false, error: `Failed to write atlas to virtual FS: ${atlasPath}` };+ }+ const atlasDir = atlasPath.substring(0, atlasPath.lastIndexOf('/'));+ const textureNames = this.parseAtlasTextures(atlasContent);+ for (const texName of textureNames) {+ const texPath = atlasDir ? `${atlasDir}/${texName}` : texName;+ const texUrl = resolveUrl(texPath);+ try {+ const info = await this.loadTextureRaw(texUrl);+ const rm = this.module_.getResourceManager();+ rm.registerTextureWithPath(info.handle, texPath);+ }+ catch (err) {+ console.warn(`[AssetServer] Failed to load Spine texture: ${texPath}`, err);+ }+ }+ const skelUrl = resolveUrl(skeletonPath);+ const skelResponse = await fetch(skelUrl);+ if (!skelResponse.ok) {+ return { success: false, error: `Failed to fetch skeleton: ${skelUrl}` };+ }+ const isBinary = skeletonPath.endsWith('.skel');+ const skelData = isBinary+ ? new Uint8Array(await skelResponse.arrayBuffer())+ : await skelResponse.text();+ if (!this.writeToVirtualFS(skeletonPath, skelData)) {+ return { success: false, error: `Failed to write skeleton to virtual FS: ${skeletonPath}` };+ }+ this.loadedSpines_.set(cacheKey, true);+ return { success: true };+ }+ catch (err) {+ return { success: false, error: String(err) };+ }+ }+ isSpineLoaded(skeletonPath, atlasPath) {+ return this.loadedSpines_.get(`${skeletonPath}:${atlasPath}`) ?? false;+ }+ // =========================================================================+ // Private Methods+ // =========================================================================+ getCacheKey(source, flip) {+ return `${source}:${flip ? 'f' : 'n'}`;+ }+ async loadTextureWithFlip(source, flip) {+ const cacheKey = this.getCacheKey(source, flip);+ const cached = this.cache_.get(cacheKey);+ if (cached) {+ return cached;+ }+ const pending = this.pending_.get(cacheKey);+ if (pending) {+ return pending;+ }+ const promise = this.loadTextureInternal(source, flip);+ this.pending_.set(cacheKey, promise);+ try {+ const result = await promise;+ this.cache_.set(cacheKey, result);+ return result;+ }+ finally {+ this.pending_.delete(cacheKey);+ }+ }+ async loadTextureInternal(source, flip) {+ const img = await this.loadImage(source);+ return this.createTextureFromImage(img, flip);+ }+ async loadImage(source) {+ return new Promise((resolve, reject) => {+ const img = new Image();+ img.crossOrigin = 'anonymous';+ img.onload = async () => {+ if (typeof createImageBitmap !== 'undefined') {+ try {+ const bitmap = await createImageBitmap(img, {+ premultiplyAlpha: 'none',+ colorSpaceConversion: 'none'+ });+ resolve(bitmap);+ return;+ }+ catch {+ // Fall back to Image element+ }+ }+ resolve(img);+ };+ img.onerror = () => reject(new Error(`Failed to load image: ${source}`));+ img.src = source;+ });+ }+ createTextureFromImage(img, flip) {+ const { width, height } = img;+ if (this.canvas_.width < width || this.canvas_.height < height) {+ this.canvas_.width = Math.max(this.canvas_.width, this.nextPowerOf2(width));+ this.canvas_.height = Math.max(this.canvas_.height, this.nextPowerOf2(height));+ }+ this.ctx_.clearRect(0, 0, this.canvas_.width, this.canvas_.height);+ this.ctx_.save();+ if (flip) {+ this.ctx_.translate(0, height);+ this.ctx_.scale(1, -1);+ }+ this.ctx_.drawImage(img, 0, 0);+ this.ctx_.restore();+ const imageData = this.ctx_.getImageData(0, 0, width, height);+ const pixels = new Uint8Array(imageData.data.buffer);+ this.unpremultiplyAlpha(pixels);+ const rm = this.module_.getResourceManager();+ const ptr = this.module_._malloc(pixels.length);+ this.module_.HEAPU8.set(pixels, ptr);+ const handle = rm.createTexture(width, height, ptr, pixels.length, 1);+ this.module_._free(ptr);+ return { handle, width, height };+ }+ unpremultiplyAlpha(pixels) {+ for (let i = 0; i < pixels.length; i += 4) {+ const a = pixels[i + 3];+ if (a > 0 && a < 255) {+ const scale = 255 / a;+ pixels[i] = Math.min(255, Math.round(pixels[i] * scale));+ pixels[i + 1] = Math.min(255, Math.round(pixels[i + 1] * scale));+ pixels[i + 2] = Math.min(255, Math.round(pixels[i + 2] * scale));+ }+ }+ }+ nextPowerOf2(n) {+ let p = 1;+ while (p < n)+ p *= 2;+ return p;+ }+ writeToVirtualFS(virtualPath, data) {+ if (this.virtualFSPaths_.has(virtualPath)) {+ return true;+ }+ const fs = this.module_.FS;+ if (!fs) {+ return false;+ }+ try {+ this.ensureVirtualDir(virtualPath);+ fs.writeFile(virtualPath, data);+ this.virtualFSPaths_.add(virtualPath);+ return true;+ }+ catch (e) {+ console.error(`[AssetServer] Failed to write to virtual FS: ${virtualPath}`, e);+ return false;+ }+ }+ ensureVirtualDir(virtualPath) {+ const fs = this.module_.FS;+ if (!fs)+ return;+ const dir = virtualPath.substring(0, virtualPath.lastIndexOf('/'));+ if (!dir)+ return;+ const parts = dir.split('/').filter(p => p);+ let currentPath = '';+ for (const part of parts) {+ currentPath = currentPath ? `${currentPath}/${part}` : part;+ try {+ const analysis = fs.analyzePath(currentPath);+ if (!analysis.exists) {+ fs.mkdir(currentPath);+ }+ }+ catch {+ try {+ fs.mkdir(currentPath);+ }+ catch {+ // Directory might already exist+ }+ }+ }+ }+ parseAtlasTextures(atlasContent) {+ const textures = [];+ const lines = atlasContent.split('\n');+ for (const line of lines) {+ const trimmed = line.trim();+ if (trimmed && !trimmed.includes(':') &&+ (trimmed.endsWith('.png') || trimmed.endsWith('.jpg'))) {+ textures.push(trimmed);+ }+ }+ return textures;+ }+}++/**+ * @file AssetPlugin.ts+ * @brief Plugin that provides asset loading capabilities+ */+const Assets = defineResource({ server: null }, 'Assets');+// =============================================================================+// Asset Plugin+// =============================================================================+class AssetPlugin {+ build(app) {+ const module = app.wasmModule;+ if (!module) {+ console.warn('AssetPlugin: No WASM module available');+ return;+ }+ const server = new AssetServer(module);+ app.insertResource(Assets, { server });+ }+}+const assetPlugin = new AssetPlugin();++/**+ * @file scene.ts+ * @brief Scene loading utilities+ */+// =============================================================================+// Scene Loader+// =============================================================================+function loadSceneData(world, sceneData) {+ const entityMap = new Map();+ for (const entityData of sceneData.entities) {+ const entity = world.spawn();+ entityMap.set(entityData.id, entity);+ for (const compData of entityData.components) {+ loadComponent(world, entity, compData);+ }+ }+ // Set parent-child relationships+ for (const entityData of sceneData.entities) {+ if (entityData.parent !== null) {+ const entity = entityMap.get(entityData.id);+ const parentEntity = entityMap.get(entityData.parent);+ if (entity !== undefined && parentEntity !== undefined) {+ world.setParent(entity, parentEntity);+ }+ }+ }+ return entityMap;+}+async function loadSceneWithAssets(world, sceneData, options) {+ const entityMap = new Map();+ const assetServer = options?.assetServer;+ const texturePathToUrl = new Map();+ for (const entityData of sceneData.entities) {+ const entity = world.spawn();+ entityMap.set(entityData.id, entity);+ for (const compData of entityData.components) {+ if (compData.type === 'Sprite' && assetServer) {+ const data = compData.data;+ if (typeof data.texture === 'string' && data.texture) {+ const texturePath = data.texture;+ const isDataUrl = texturePath.startsWith('data:');+ const url = isDataUrl+ ? texturePath+ : options?.assetBaseUrl+ ? `${options.assetBaseUrl}/${texturePath}`+ : `/${texturePath}`;+ try {+ const info = await assetServer.loadTexture(url);+ data.texture = info.handle;+ texturePathToUrl.set(texturePath, url);+ }+ catch (err) {+ console.warn(`Failed to load texture: ${url}`, err);+ data.texture = 0;+ }+ }+ }+ if (compData.type === 'SpineAnimation' && assetServer) {+ const data = compData.data;+ const skeletonPath = data.skeletonPath;+ const atlasPath = data.atlasPath;+ if (skeletonPath && atlasPath) {+ const result = await assetServer.loadSpine(skeletonPath, atlasPath, options?.assetBaseUrl);+ if (!result.success) {+ console.warn(`Failed to load Spine: ${result.error}`);+ }+ }+ }+ loadComponent(world, entity, compData);+ }+ }+ for (const entityData of sceneData.entities) {+ if (entityData.parent !== null) {+ const entity = entityMap.get(entityData.id);+ const parentEntity = entityMap.get(entityData.parent);+ if (entity !== undefined && parentEntity !== undefined) {+ world.setParent(entity, parentEntity);+ }+ }+ }+ if (assetServer && sceneData.textureMetadata) {+ for (const [texturePath, metadata] of Object.entries(sceneData.textureMetadata)) {+ const url = texturePathToUrl.get(texturePath);+ if (url && metadata.sliceBorder) {+ assetServer.setTextureMetadataByPath(url, metadata.sliceBorder);+ }+ }+ }+ return entityMap;+}+function loadComponent(world, entity, compData) {+ const data = compData.data;+ switch (compData.type) {+ case 'LocalTransform':+ world.insert(entity, LocalTransform, data);+ break;+ case 'Sprite':+ world.insert(entity, Sprite, data);+ break;+ case 'Camera':+ world.insert(entity, Camera, data);+ break;+ case 'Canvas':+ world.insert(entity, Canvas, data);+ break;+ case 'Text':+ world.insert(entity, Text, data);+ break;+ case 'SpineAnimation':+ world.insert(entity, SpineAnimation, data);+ break;+ default:+ console.warn(`Unknown component type: ${compData.type}`);+ }+}+function updateCameraAspectRatio(world, aspectRatio) {+ const cameraEntities = world.getEntitiesWithComponents([Camera]);+ for (const entity of cameraEntities) {+ const camera = world.get(entity, Camera);+ if (camera) {+ camera.aspectRatio = aspectRatio;+ world.insert(entity, Camera, camera);+ }+ }+}++/**+ * @file PreviewPlugin.ts+ * @brief Plugin for editor preview functionality+ */+// =============================================================================+// PreviewPlugin+// =============================================================================+class PreviewPlugin {+ constructor(sceneUrl) {+ this.app_ = null;+ this.loadPromise_ = null;+ this.sceneUrl_ = sceneUrl;+ }+ build(app) {+ this.app_ = app;+ if (!app.hasResource(Assets)) {+ app.addPlugin(assetPlugin);+ }+ this.loadPromise_ = this.loadScene();+ }+ /**+ * @brief Wait for scene loading to complete+ */+ async waitForReady() {+ if (this.loadPromise_) {+ await this.loadPromise_;+ }+ }+ async loadScene() {+ if (!this.app_)+ return;+ try {+ const response = await platformFetch(this.sceneUrl_);+ if (!response.ok) {+ throw new Error(`Failed to fetch scene: ${response.status}`);+ }+ const sceneData = await response.json();+ const assets = this.app_.getResource(Assets);+ await loadSceneWithAssets(this.app_.world, sceneData, {+ assetServer: assets.server+ });+ this.ensureCamera();+ }+ catch (err) {+ console.error('[PreviewPlugin] Failed to load scene:', err);+ }+ }+ ensureCamera() {+ if (!this.app_)+ return;+ const world = this.app_.world;+ let hasActiveCamera = false;+ const cameraEntities = world.getEntitiesWithComponents([Camera]);+ for (const entity of cameraEntities) {+ const camera = world.get(entity, Camera);+ if (camera.isActive) {+ hasActiveCamera = true;+ break;+ }+ }+ if (!hasActiveCamera) {+ console.warn('[PreviewPlugin] No active camera found, creating default camera');+ const cameraEntity = world.spawn();+ const transformData = {+ position: { x: 0, y: 0, z: 10 },+ rotation: { x: 0, y: 0, z: 0, w: 1 },+ scale: { x: 1, y: 1, z: 1 },+ };+ world.insert(cameraEntity, LocalTransform, transformData);+ const cameraData = {+ isActive: true,+ projectionType: 0,+ fov: 60,+ orthoSize: 540,+ nearPlane: 0.1,+ farPlane: 1000,+ aspectRatio: 1.77,+ priority: 0,+ };+ world.insert(cameraEntity, Camera, cameraData);+ }+ }+}++/**+ * @file spine.ts+ * @brief Spine animation control API+ */+// =============================================================================+// SpineController+// =============================================================================+/**+ * Controller for Spine skeletal animations+ *+ * @example+ * ```typescript+ * const spine = new SpineController(wasmModule);+ *+ * // Play animation+ * spine.play(entity, 'run', true);+ *+ * // Queue next animation+ * spine.addAnimation(entity, 'idle', true, 0.2);+ *+ * // Change skin+ * spine.setSkin(entity, 'warrior');+ *+ * // Get bone position for effects+ * const pos = spine.getBonePosition(entity, 'weapon');+ * if (pos) {+ * spawnEffect(pos.x, pos.y);+ * }+ *+ * // Listen for events+ * spine.on(entity, 'event', (e) => {+ * if (e.eventName === 'footstep') {+ * playSound('footstep');+ * }+ * });+ * ```+ */+class SpineController {+ constructor(wasmModule) {+ this.module_ = wasmModule;+ this.listeners_ = new Map();+ this.setupEventBridge();+ }+ // =========================================================================+ // Animation Control+ // =========================================================================+ /**+ * Plays an animation, replacing any current animation on the track+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop the animation+ * @param track Animation track (default 0)+ * @returns True if animation was set+ */+ play(entity, animation, loop = true, track = 0) {+ if (!this.module_.spinePlayAnimation)+ return false;+ return this.module_.spinePlayAnimation(entity, animation, loop, track);+ }+ /**+ * Adds an animation to the queue+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop+ * @param delay Delay before starting (seconds)+ * @param track Animation track (default 0)+ * @returns True if animation was queued+ */+ addAnimation(entity, animation, loop = true, delay = 0, track = 0) {+ if (!this.module_.spineAddAnimation)+ return false;+ return this.module_.spineAddAnimation(entity, animation, loop, delay, track);+ }+ /**+ * Sets an empty animation to mix out the current animation+ * @param entity Target entity+ * @param mixDuration Duration of the mix out+ * @param track Animation track (default 0)+ */+ setEmptyAnimation(entity, mixDuration = 0.2, track = 0) {+ if (!this.module_.spineSetEmptyAnimation)+ return;+ this.module_.spineSetEmptyAnimation(entity, mixDuration, track);+ }+ /**+ * Clears all animations on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ */+ clearTrack(entity, track = 0) {+ if (!this.module_.spineClearTrack)+ return;+ this.module_.spineClearTrack(entity, track);+ }+ /**+ * Clears all tracks+ * @param entity Target entity+ */+ clearTracks(entity) {+ if (!this.module_.spineClearTracks)+ return;+ this.module_.spineClearTracks(entity);+ }+ // =========================================================================+ // Skin Control+ // =========================================================================+ /**+ * Sets the current skin+ * @param entity Target entity+ * @param skinName Skin name+ * @returns True if skin was set+ */+ setSkin(entity, skinName) {+ if (!this.module_.spineSetSkin)+ return false;+ return this.module_.spineSetSkin(entity, skinName);+ }+ /**+ * Gets available skin names+ * @param entity Target entity+ * @returns Array of skin names+ */+ getSkins(entity) {+ if (!this.module_.spineGetSkins)+ return [];+ return this.module_.spineGetSkins(entity) || [];+ }+ // =========================================================================+ // Queries+ // =========================================================================+ /**+ * Gets available animation names+ * @param entity Target entity+ * @returns Array of animation names+ */+ getAnimations(entity) {+ if (!this.module_.spineGetAnimations)+ return [];+ return this.module_.spineGetAnimations(entity) || [];+ }+ /**+ * Gets the current animation on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Animation name or null+ */+ getCurrentAnimation(entity, track = 0) {+ if (!this.module_.spineGetCurrentAnimation)+ return null;+ return this.module_.spineGetCurrentAnimation(entity, track);+ }+ /**+ * Gets the duration of an animation+ * @param entity Target entity+ * @param animation Animation name+ * @returns Duration in seconds, or 0 if not found+ */+ getAnimationDuration(entity, animation) {+ if (!this.module_.spineGetAnimationDuration)+ return 0;+ return this.module_.spineGetAnimationDuration(entity, animation);+ }+ /**+ * Gets detailed track entry info+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Track entry info or null+ */+ getTrackEntry(entity, track = 0) {+ if (!this.module_.spineGetTrackEntry)+ return null;+ return this.module_.spineGetTrackEntry(entity, track);+ }+ // =========================================================================+ // Bone/Slot Access+ // =========================================================================+ /**+ * Gets world position of a bone+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Position or null if not found+ */+ getBonePosition(entity, boneName) {+ if (!this.module_.spineGetBonePosition)+ return null;+ const result = this.module_.spineGetBonePosition(entity, boneName);+ if (!result)+ return null;+ return { x: result.x, y: result.y };+ }+ /**+ * Gets world rotation of a bone in degrees+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Rotation in degrees or null+ */+ getBoneRotation(entity, boneName) {+ if (!this.module_.spineGetBoneRotation)+ return null;+ return this.module_.spineGetBoneRotation(entity, boneName);+ }+ /**+ * Sets the attachment for a slot+ * @param entity Target entity+ * @param slotName Slot name+ * @param attachmentName Attachment name (null to clear)+ */+ setAttachment(entity, slotName, attachmentName) {+ if (!this.module_.spineSetAttachment)+ return;+ this.module_.spineSetAttachment(entity, slotName, attachmentName || '');+ }+ // =========================================================================+ // Events+ // =========================================================================+ /**+ * Registers an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ on(entity, type, callback) {+ if (!this.listeners_.has(entity)) {+ this.listeners_.set(entity, new Map());+ }+ const entityListeners = this.listeners_.get(entity);+ if (!entityListeners.has(type)) {+ entityListeners.set(type, new Set());+ }+ entityListeners.get(type).add(callback);+ }+ /**+ * Unregisters an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ off(entity, type, callback) {+ const entityListeners = this.listeners_.get(entity);+ if (!entityListeners)+ return;+ const typeListeners = entityListeners.get(type);+ if (!typeListeners)+ return;+ typeListeners.delete(callback);+ }+ /**+ * Removes all event listeners for an entity+ * @param entity Target entity+ */+ removeAllListeners(entity) {+ this.listeners_.delete(entity);+ }+ // =========================================================================+ // Private+ // =========================================================================+ setupEventBridge() {+ if (typeof window !== 'undefined') {+ window.__esengine_spineEvent = (entity, eventData) => {+ this.dispatchEvent(entity, eventData);+ };+ }+ }+ dispatchEvent(entity, eventData) {+ const entityListeners = this.listeners_.get(entity);+ if (!entityListeners)+ return;+ const event = {+ type: eventData.type,+ entity,+ track: eventData.track ?? 0,+ animation: eventData.animation ?? null,+ eventName: eventData.eventName,+ intValue: eventData.intValue,+ floatValue: eventData.floatValue,+ stringValue: eventData.stringValue,+ };+ const typeListeners = entityListeners.get(event.type);+ if (typeListeners) {+ typeListeners.forEach(callback => {+ try {+ callback(event);+ }+ catch (e) {+ console.error('Error in Spine event callback:', e);+ }+ });+ }+ }+}+// =============================================================================+// Factory Function+// =============================================================================+/**+ * Creates a SpineController instance+ * @param wasmModule The ESEngine WASM module+ * @returns SpineController instance+ */+function createSpineController(wasmModule) {+ return new SpineController(wasmModule);+}++/**+ * @file index.wechat.ts+ * @brief ESEngine SDK - WeChat MiniGame entry point+ */+// Initialize WeChat platform+initWeChatPlatform();+setPlatform(wechatAdapter);++export { App, AssetPlugin, AssetServer, Assets, BlendMode, Camera, Canvas, Children, Commands, CommandsInstance, DataType, Draw, EntityCommands, Geometry, INVALID_ENTITY, INVALID_TEXTURE, Input, LocalTransform, Material, Mut, Parent, PostProcess, PreviewPlugin, Query, QueryInstance, RenderStage, Renderer, Res, ResMut, Schedule, ShaderSources, SpineAnimation, SpineController, Sprite, SystemRunner, Text, TextAlign, TextOverflow, TextPlugin, TextRenderer, TextVerticalAlign, Time, UIRect, Velocity, World, WorldTransform, assetPlugin, color, createSpineController, createWebApp, defineComponent, defineResource, defineSystem, defineTag, getComponentDefaults, getPlatform, getPlatformType, initDrawAPI, initGeometryAPI, initMaterialAPI, initPostProcessAPI, initRendererAPI, isBuiltinComponent, isPlatformInitialized, isWeChat, isWeb, loadComponent, loadSceneData, loadSceneWithAssets, platformFetch, platformFileExists, platformInstantiateWasm, platformReadFile, platformReadTextFile, quat, shutdownDrawAPI, shutdownGeometryAPI, shutdownMaterialAPI, shutdownPostProcessAPI, shutdownRendererAPI, textPlugin, updateCameraAspectRatio, vec2, vec3, vec4, wxFileExists, wxFileExistsSync, wxGetImagePixels, wxLoadImage, wxLoadImagePixels, wxReadFile, wxReadTextFile, wxWriteFile };+//# sourceMappingURL=index.wechat.js.mapdiff --git a/desktop/public/sdk/esm/esengine.d.ts b/desktop/public/sdk/esm/esengine.d.tsnew file mode 100644index 000000000..59c4432f8--- /dev/null+++ b/desktop/public/sdk/esm/esengine.d.ts@@ -0,0 +1,1521 @@+/**+ * @file types.ts+ * @brief Core type definitions for ESEngine SDK+ */+type Entity = number;+declare const INVALID_ENTITY: Entity;+type TextureHandle = number;+declare const INVALID_TEXTURE: TextureHandle;+interface Vec2 {+ x: number;+ y: number;+}+interface Vec3 {+ x: number;+ y: number;+ z: number;+}+interface Vec4 {+ x: number;+ y: number;+ z: number;+ w: number;+}+interface Quat {+ w: number;+ x: number;+ y: number;+ z: number;+}+type Color = Vec4;+declare const vec2: (x?: number, y?: number) => Vec2;+declare const vec3: (x?: number, y?: number, z?: number) => Vec3;+declare const vec4: (x?: number, y?: number, z?: number, w?: number) => Vec4;+declare const color: (r?: number, g?: number, b?: number, a?: number) => Color;+declare const quat: (w?: number, x?: number, y?: number, z?: number) => Quat;++/**+ * @file component.ts+ * @brief Component definition and builtin components+ */++interface ComponentDef<T> {+ readonly _id: symbol;+ readonly _name: string;+ readonly _default: T;+ readonly _builtin: false;+ create(data?: Partial<T>): T;+}+declare function defineComponent<T extends object>(name: string, defaults: T): ComponentDef<T>;+declare function defineTag(name: string): ComponentDef<{}>;+interface BuiltinComponentDef<T> {+ readonly _id: symbol;+ readonly _name: string;+ readonly _cppName: string;+ readonly _builtin: true;+ readonly _default: T;+}+type AnyComponentDef = ComponentDef<any> | BuiltinComponentDef<any>;+declare function isBuiltinComponent(comp: AnyComponentDef): comp is BuiltinComponentDef<any>;+interface LocalTransformData {+ position: Vec3;+ rotation: Quat;+ scale: Vec3;+}+interface WorldTransformData {+ position: Vec3;+ rotation: Quat;+ scale: Vec3;+}+interface SpriteData {+ texture: number;+ color: Vec4;+ size: Vec2;+ uvOffset: Vec2;+ uvScale: Vec2;+ layer: number;+ flipX: boolean;+ flipY: boolean;+}+interface CameraData {+ projectionType: number;+ fov: number;+ orthoSize: number;+ nearPlane: number;+ farPlane: number;+ aspectRatio: number;+ isActive: boolean;+ priority: number;+}+interface CanvasData {+ designResolution: Vec2;+ pixelsPerUnit: number;+ scaleMode: number;+ matchWidthOrHeight: number;+ backgroundColor: Vec4;+}+interface VelocityData {+ linear: Vec3;+ angular: Vec3;+}+interface ParentData {+ entity: Entity;+}+interface ChildrenData {+ entities: Entity[];+}+interface SpineAnimationData {+ skeletonPath: string;+ atlasPath: string;+ skin: string;+ animation: string;+ timeScale: number;+ loop: boolean;+ playing: boolean;+ flipX: boolean;+ flipY: boolean;+ color: Vec4;+ layer: number;+ skeletonScale: number;+}+declare const LocalTransform: BuiltinComponentDef<LocalTransformData>;+declare const WorldTransform: BuiltinComponentDef<WorldTransformData>;+declare const Sprite: BuiltinComponentDef<SpriteData>;+declare const Camera: BuiltinComponentDef<CameraData>;+declare const Canvas: BuiltinComponentDef<CanvasData>;+declare const Velocity: BuiltinComponentDef<VelocityData>;+declare const Parent: BuiltinComponentDef<ParentData>;+declare const Children: BuiltinComponentDef<ChildrenData>;+declare const SpineAnimation: BuiltinComponentDef<SpineAnimationData>;+type ComponentData<C> = C extends BuiltinComponentDef<infer T> ? T : C extends ComponentDef<infer T> ? T : never;+declare function getComponentDefaults(typeName: string): Record<string, unknown> | null;++/**+ * @file resource.ts+ * @brief Resource system for global singleton data+ */+interface ResourceDef<T> {+ readonly _id: symbol;+ readonly _name: string;+ readonly _default: T;+}+declare function defineResource<T>(defaultValue: T, name?: string): ResourceDef<T>;+interface ResDescriptor<T> {+ readonly _type: 'res';+ readonly _resource: ResourceDef<T>;+}+interface ResMutDescriptor<T> {+ readonly _type: 'res_mut';+ readonly _resource: ResourceDef<T>;+}+declare function Res<T>(resource: ResourceDef<T>): ResDescriptor<T>;+declare function ResMut<T>(resource: ResourceDef<T>): ResMutDescriptor<T>;+declare class ResMutInstance<T> {+ private value_;+ private readonly setter_;+ constructor(value: T, setter: (v: T) => void);+ get(): T;+ set(value: T): void;+ modify(fn: (value: T) => void): void;+}+declare class ResourceStorage {+ private resources_;+ insert<T>(resource: ResourceDef<T>, value: T): void;+ get<T>(resource: ResourceDef<T>): T;+ set<T>(resource: ResourceDef<T>, value: T): void;+ has<T>(resource: ResourceDef<T>): boolean;+ remove<T>(resource: ResourceDef<T>): void;+ getResMut<T>(resource: ResourceDef<T>): ResMutInstance<T>;+}+interface TimeData {+ delta: number;+ elapsed: number;+ frameCount: number;+}+declare const Time: ResourceDef<TimeData>;+interface InputState {+ keysDown: Set<string>;+ keysPressed: Set<string>;+ keysReleased: Set<string>;+ mouseX: number;+ mouseY: number;+ mouseButtons: Set<number>;+}+declare const Input: ResourceDef<InputState>;++/**+ * @file wasm.ts+ * @brief WASM module type definitions+ */++interface CppRegistry {+ create(): Entity;+ destroy(entity: Entity): void;+ valid(entity: Entity): boolean;+ delete(): void;+ addLocalTransform(entity: Entity, data: unknown): void;+ getLocalTransform(entity: Entity): unknown;+ hasLocalTransform(entity: Entity): boolean;+ removeLocalTransform(entity: Entity): void;+ addWorldTransform(entity: Entity, data: unknown): void;+ getWorldTransform(entity: Entity): unknown;+ hasWorldTransform(entity: Entity): boolean;+ removeWorldTransform(entity: Entity): void;+ addSprite(entity: Entity, data: unknown): void;+ getSprite(entity: Entity): unknown;+ hasSprite(entity: Entity): boolean;+ removeSprite(entity: Entity): void;+ addCamera(entity: Entity, data: unknown): void;+ getCamera(entity: Entity): unknown;+ hasCamera(entity: Entity): boolean;+ removeCamera(entity: Entity): void;+ addCanvas(entity: Entity, data: unknown): void;+ getCanvas(entity: Entity): unknown;+ hasCanvas(entity: Entity): boolean;+ removeCanvas(entity: Entity): void;+ addVelocity(entity: Entity, data: unknown): void;+ getVelocity(entity: Entity): unknown;+ hasVelocity(entity: Entity): boolean;+ removeVelocity(entity: Entity): void;+ addParent(entity: Entity, data: unknown): void;+ getParent(entity: Entity): unknown;+ hasParent(entity: Entity): boolean;+ removeParent(entity: Entity): void;+ addChildren(entity: Entity, data: unknown): void;+ getChildren(entity: Entity): unknown;+ hasChildren(entity: Entity): boolean;+ removeChildren(entity: Entity): void;+ addSpineAnimation(entity: Entity, data: unknown): void;+ getSpineAnimation(entity: Entity): unknown;+ hasSpineAnimation(entity: Entity): boolean;+ removeSpineAnimation(entity: Entity): void;+ setParent(child: Entity, parent: Entity): void;+ [key: string]: any;+}+interface CppResourceManager {+ createTexture(width: number, height: number, pixels: number, pixelsLen: number, format: number): number;+ createShader(vertSrc: string, fragSrc: string): number;+ releaseTexture(handle: number): void;+ releaseShader(handle: number): void;+ setTextureMetadata(handle: number, left: number, right: number, top: number, bottom: number): void;+ registerTextureWithPath(handle: number, path: string): void;+}+interface EmscriptenFS {+ writeFile(path: string, data: string | Uint8Array): void;+ readFile(path: string, opts?: {+ encoding?: string;+ }): string | Uint8Array;+ mkdir(path: string): void;+ mkdirTree(path: string): void;+ unlink(path: string): void;+ stat(path: string): {+ mode: number;+ size: number;+ };+ isFile(mode: number): boolean;+ isDir(mode: number): boolean;+ analyzePath(path: string): {+ exists: boolean;+ parentExists: boolean;+ };+}+interface SpineBounds {+ x: number;+ y: number;+ width: number;+ height: number;+ valid: boolean;+}+interface ESEngineModule {+ Registry: new () => CppRegistry;+ HEAPU8: Uint8Array;+ HEAPF32: Float32Array;+ FS: EmscriptenFS;+ initRenderer(): void;+ initRendererWithCanvas(canvasSelector: string): boolean;+ initRendererWithContext(contextHandle: number): boolean;+ shutdownRenderer(): void;+ GL: {+ registerContext(ctx: WebGLRenderingContext | WebGL2RenderingContext, options: {+ majorVersion: number;+ minorVersion: number;+ enableExtensionsByDefault?: boolean;+ }): number;+ };+ renderFrame(registry: CppRegistry, width: number, height: number): void;+ renderFrameWithMatrix(registry: CppRegistry, width: number, height: number, matrixPtr: number): void;+ getResourceManager(): CppResourceManager;+ getSpineBounds(registry: CppRegistry, entity: number): SpineBounds;+ draw_begin(matrixPtr: number): void;+ draw_end(): void;+ draw_line(fromX: number, fromY: number, toX: number, toY: number, r: number, g: number, b: number, a: number, thickness: number): void;+ draw_rect(x: number, y: number, width: number, height: number, r: number, g: number, b: number, a: number, filled: boolean): void;+ draw_rectOutline(x: number, y: number, width: number, height: number, r: number, g: number, b: number, a: number, thickness: number): void;+ draw_circle(centerX: number, centerY: number, radius: number, r: number, g: number, b: number, a: number, filled: boolean, segments: number): void;+ draw_circleOutline(centerX: number, centerY: number, radius: number, r: number, g: number, b: number, a: number, thickness: number, segments: number): void;+ draw_texture(x: number, y: number, width: number, height: number, textureId: number, r: number, g: number, b: number, a: number): void;+ draw_textureRotated(x: number, y: number, width: number, height: number, rotation: number, textureId: number, r: number, g: number, b: number, a: number): void;+ draw_setLayer(layer: number): void;+ draw_setDepth(depth: number): void;+ draw_getDrawCallCount(): number;+ draw_getPrimitiveCount(): number;+ draw_setBlendMode(mode: number): void;+ draw_setDepthTest(enabled: boolean): void;+ draw_mesh(geometryHandle: number, shaderHandle: number, transformPtr: number): void;+ draw_meshWithUniforms(geometryHandle: number, shaderHandle: number, transformPtr: number, uniformsPtr: number, uniformCount: number): void;+ geometry_create(): number;+ geometry_init(handle: number, verticesPtr: number, vertexCount: number, layoutPtr: number, layoutCount: number, dynamic: boolean): void;+ geometry_setIndices16(handle: number, indicesPtr: number, indexCount: number): void;+ geometry_setIndices32(handle: number, indicesPtr: number, indexCount: number): void;+ geometry_updateVertices(handle: number, verticesPtr: number, vertexCount: number, offset: number): void;+ geometry_release(handle: number): void;+ geometry_isValid(handle: number): boolean;+ postprocess_init(width: number, height: number): boolean;+ postprocess_shutdown(): void;+ postprocess_resize(width: number, height: number): void;+ postprocess_addPass(name: string, shaderHandle: number): number;+ postprocess_removePass(name: string): void;+ postprocess_setPassEnabled(name: string, enabled: boolean): void;+ postprocess_isPassEnabled(name: string): boolean;+ postprocess_setUniformFloat(passName: string, uniform: string, value: number): void;+ postprocess_setUniformVec4(passName: string, uniform: string, x: number, y: number, z: number, w: number): void;+ postprocess_begin(): void;+ postprocess_end(): void;+ postprocess_getPassCount(): number;+ postprocess_isInitialized(): boolean;+ postprocess_setBypass(bypass: boolean): void;+ postprocess_isBypassed(): boolean;+ renderer_init(width: number, height: number): void;+ renderer_resize(width: number, height: number): void;+ renderer_begin(matrixPtr: number, targetHandle: number): void;+ renderer_end(): void;+ renderer_submitSprites(registry: CppRegistry): void;+ renderer_submitSpine(registry: CppRegistry): void;+ renderer_setStage(stage: number): void;+ renderer_createTarget(width: number, height: number): number;+ renderer_releaseTarget(handle: number): void;+ renderer_getTargetTexture(handle: number): number;+ renderer_getDrawCalls(): number;+ renderer_getTriangles(): number;+ renderer_getSprites(): number;+ renderer_getSpine(): number;+ renderer_getMeshes(): number;+ renderer_getCulled(): number;+ _malloc(size: number): number;+ _free(ptr: number): void;+}++/**+ * @file world.ts+ * @brief ECS World with C++ Registry integration+ */++declare class World {+ private cppRegistry_;+ private entities_;+ private tsStorage_;+ connectCpp(cppRegistry: CppRegistry): void;+ get hasCpp(): boolean;+ spawn(): Entity;+ despawn(entity: Entity): void;+ valid(entity: Entity): boolean;+ entityCount(): number;+ getAllEntities(): Entity[];+ setParent(child: Entity, parent: Entity): void;+ insert(entity: Entity, component: AnyComponentDef, data?: unknown): unknown;+ get(entity: Entity, component: AnyComponentDef): unknown;+ has(entity: Entity, component: AnyComponentDef): boolean;+ remove(entity: Entity, component: AnyComponentDef): void;+ private insertBuiltin;+ private getBuiltin;+ private hasBuiltin;+ private removeBuiltin;+ private insertScript;+ private getScript;+ private hasScript;+ private removeScript;+ private getStorage;+ getEntitiesWithComponents(components: AnyComponentDef[]): Entity[];+}++/**+ * @file query.ts+ * @brief Component query system with mutable component support+ */++interface MutWrapper<T extends AnyComponentDef> {+ readonly _type: 'mut';+ readonly _component: T;+}+declare function Mut<T extends AnyComponentDef>(component: T): MutWrapper<T>;+type QueryArg$1 = AnyComponentDef | MutWrapper<AnyComponentDef>;+interface QueryDescriptor<C extends readonly QueryArg$1[]> {+ readonly _type: 'query';+ readonly _components: C;+ readonly _mutIndices: number[];+ readonly _with: AnyComponentDef[];+ readonly _without: AnyComponentDef[];+}+declare function Query<C extends QueryArg$1[]>(...components: C): QueryDescriptor<C>;+type UnwrapQueryArg<T> = T extends MutWrapper<infer C> ? C : T;+type ComponentsData<C extends readonly QueryArg$1[]> = {+ [K in keyof C]: ComponentData<UnwrapQueryArg<C[K]>>;+};+type QueryResult<C extends readonly QueryArg$1[]> = [+ Entity,+ ...ComponentsData<C>+];+declare class QueryInstance<C extends readonly QueryArg$1[]> implements Iterable<QueryResult<C>> {+ private readonly world_;+ private readonly descriptor_;+ private pendingMutations_;+ constructor(world: World, descriptor: QueryDescriptor<C>);+ private getActualComponent;+ private commitPending;+ [Symbol.iterator](): Iterator<QueryResult<C>>;+ forEach(callback: (entity: Entity, ...components: ComponentsData<C>) => void): void;+ single(): QueryResult<C> | null;+ isEmpty(): boolean;+ count(): number;+ toArray(): QueryResult<C>[];+}++/**+ * @file commands.ts+ * @brief Deferred entity/component operations+ */++interface CommandsDescriptor {+ readonly _type: 'commands';+}+declare function Commands(): CommandsDescriptor;+interface SpawnComponentEntry {+ component: AnyComponentDef;+ data: unknown;+}+declare class EntityCommands {+ private readonly commands_;+ private readonly entityRef_;+ private readonly components_;+ private isNew_;+ constructor(commands: CommandsInstance, entity: Entity | null);+ insert<T extends object>(component: AnyComponentDef, data?: Partial<T>): this;+ remove(component: AnyComponentDef): this;+ id(): Entity;+ private finalize;+}+declare class CommandsInstance {+ private readonly world_;+ private readonly resources_;+ private pending_;+ constructor(world: World, resources: ResourceStorage);+ spawn(): EntityCommands;+ entity(entity: Entity): EntityCommands;+ despawn(entity: Entity): this;+ insertResource<T>(resource: ResourceDef<T>, value: T): this;+ queueInsert(entity: Entity, component: AnyComponentDef, data: unknown): void;+ queueRemove(entity: Entity, component: AnyComponentDef): void;+ spawnImmediate(components: SpawnComponentEntry[], entityRef: {+ entity: Entity;+ }): void;+ flush(): void;+ private executeCommand;+}++/**+ * @file system.ts+ * @brief System definition and scheduling+ */++declare enum Schedule {+ Startup = 0,+ First = 1,+ PreUpdate = 2,+ Update = 3,+ PostUpdate = 4,+ Last = 5,+ FixedPreUpdate = 10,+ FixedUpdate = 11,+ FixedPostUpdate = 12+}+type QueryArg = AnyComponentDef | MutWrapper<AnyComponentDef>;+type SystemParam = QueryDescriptor<readonly QueryArg[]> | ResDescriptor<unknown> | ResMutDescriptor<unknown> | CommandsDescriptor;+type InferParam<P> = P extends QueryDescriptor<infer C> ? QueryInstance<C> : P extends ResDescriptor<infer T> ? T : P extends ResMutDescriptor<infer T> ? ResMutInstance<T> : P extends CommandsDescriptor ? CommandsInstance : never;+type InferParams<P extends readonly SystemParam[]> = {+ [K in keyof P]: InferParam<P[K]>;+};+interface SystemDef {+ readonly _id: symbol;+ readonly _params: readonly SystemParam[];+ readonly _fn: (...args: unknown[]) => void;+ readonly _name: string;+}+declare function defineSystem<P extends readonly SystemParam[]>(params: [...P], fn: (...args: InferParams<P>) => void, options?: {+ name?: string;+}): SystemDef;+declare class SystemRunner {+ private readonly world_;+ private readonly resources_;+ constructor(world: World, resources: ResourceStorage);+ run(system: SystemDef): void;+ private resolveParam;+}++/**+ * @file app.ts+ * @brief Application builder and web platform integration+ */++interface Plugin {+ build(app: App): void;+}+declare class App {+ private readonly world_;+ private readonly resources_;+ private readonly systems_;+ private runner_;+ private running_;+ private lastTime_;+ private module_;+ private constructor();+ static new(): App;+ addPlugin(plugin: Plugin): this;+ addSystemToSchedule(schedule: Schedule, system: SystemDef): this;+ addSystem(system: SystemDef): this;+ addStartupSystem(system: SystemDef): this;+ connectCpp(cppRegistry: CppRegistry, module?: ESEngineModule): this;+ get wasmModule(): ESEngineModule | null;+ get world(): World;+ insertResource<T>(resource: ResourceDef<T>, value: T): this;+ getResource<T>(resource: ResourceDef<T>): T;+ hasResource<T>(resource: ResourceDef<T>): boolean;+ run(): void;+ private mainLoop;+ quit(): void;+ private runSchedule;+ private updateTime;+}+interface WebAppOptions {+ getViewportSize?: () => {+ width: number;+ height: number;+ };+ glContextHandle?: number;+}+declare function createWebApp(module: ESEngineModule, options?: WebAppOptions): App;++declare enum TextAlign {+ Left = 0,+ Center = 1,+ Right = 2+}+declare enum TextVerticalAlign {+ Top = 0,+ Middle = 1,+ Bottom = 2+}+declare enum TextOverflow {+ Visible = 0,+ Clip = 1,+ Ellipsis = 2+}+interface TextData {+ content: string;+ fontFamily: string;+ fontSize: number;+ color: Vec4;+ align: TextAlign;+ verticalAlign: TextVerticalAlign;+ wordWrap: boolean;+ overflow: TextOverflow;+ lineHeight: number;+ dirty: boolean;+}+declare const Text: ComponentDef<TextData>;++interface UIRectData {+ size: Vec2;+ anchor: Vec2;+ pivot: Vec2;+}+declare const UIRect: ComponentDef<UIRectData>;++/**+ * @file TextRenderer.ts+ * @brief Renders text to GPU textures using Canvas 2D API+ */++interface TextRenderResult {+ textureHandle: number;+ width: number;+ height: number;+}+declare class TextRenderer {+ private canvas;+ private ctx;+ private module;+ private cache;+ constructor(module: ESEngineModule);+ /**+ * Renders text to a texture and returns the handle+ */+ renderText(text: TextData, uiRect?: UIRectData | null): TextRenderResult;+ private truncateWithEllipsis;+ /**+ * Renders text for an entity and caches the result+ */+ renderForEntity(entity: Entity, text: TextData, uiRect?: UIRectData | null): TextRenderResult;+ /**+ * Gets cached render result for entity+ */+ getCached(entity: Entity): TextRenderResult | undefined;+ /**+ * Releases texture for entity+ */+ release(entity: Entity): void;+ /**+ * Releases all cached textures+ */+ releaseAll(): void;+ private wrapText;+ private measureWidth;+ private mapAlign;+ private nextPowerOf2;+ private flipVertically;+}++/**+ * @file TextPlugin.ts+ * @brief Plugin that automatically syncs Text components to Sprite textures+ */++declare class TextPlugin implements Plugin {+ build(app: App): void;+}+declare const textPlugin: TextPlugin;++/**+ * @file AssetServer.ts+ * @brief Asset loading and caching system+ */++interface TextureInfo {+ handle: TextureHandle;+ width: number;+ height: number;+}+interface SliceBorder$1 {+ left: number;+ right: number;+ top: number;+ bottom: number;+}+interface SpineLoadResult {+ success: boolean;+ error?: string;+}+declare class AssetServer {+ private module_;+ private cache_;+ private pending_;+ private canvas_;+ private ctx_;+ private loadedSpines_;+ private virtualFSPaths_;+ constructor(module: ESEngineModule);+ /**+ * Load texture with vertical flip (for Sprite/UI).+ * OpenGL UV origin is bottom-left, so standard images need flipping.+ */+ loadTexture(source: string): Promise<TextureInfo>;+ /**+ * Load texture without flip (for Spine).+ * Spine runtime handles UV coordinates internally.+ */+ loadTextureRaw(source: string): Promise<TextureInfo>;+ getTexture(source: string): TextureInfo | undefined;+ hasTexture(source: string): boolean;+ releaseTexture(source: string): void;+ releaseAll(): void;+ setTextureMetadata(handle: TextureHandle, border: SliceBorder$1): void;+ setTextureMetadataByPath(source: string, border: SliceBorder$1): boolean;+ loadSpine(skeletonPath: string, atlasPath: string, baseUrl?: string): Promise<SpineLoadResult>;+ isSpineLoaded(skeletonPath: string, atlasPath: string): boolean;+ private getCacheKey;+ private loadTextureWithFlip;+ private loadTextureInternal;+ private loadImage;+ private createTextureFromImage;+ private unpremultiplyAlpha;+ private nextPowerOf2;+ private writeToVirtualFS;+ private ensureVirtualDir;+ private parseAtlasTextures;+}++interface AssetsData {+ server: AssetServer;+}+declare const Assets: ResourceDef<AssetsData>;+declare class AssetPlugin implements Plugin {+ build(app: App): void;+}+declare const assetPlugin: AssetPlugin;++/**+ * @file scene.ts+ * @brief Scene loading utilities+ */++interface SceneEntityData {+ id: number;+ name: string;+ parent: number | null;+ children: number[];+ components: SceneComponentData[];+}+interface SceneComponentData {+ type: string;+ data: Record<string, unknown>;+}+interface SliceBorder {+ left: number;+ right: number;+ top: number;+ bottom: number;+}+interface TextureMetadata {+ version: string;+ type: 'texture';+ sliceBorder: SliceBorder;+}+interface SceneData {+ version: string;+ name: string;+ entities: SceneEntityData[];+ textureMetadata?: Record<string, TextureMetadata>;+}+interface SceneLoadOptions {+ assetServer?: AssetServer;+ assetBaseUrl?: string;+}+declare function loadSceneData(world: World, sceneData: SceneData): Map<number, Entity>;+declare function loadSceneWithAssets(world: World, sceneData: SceneData, options?: SceneLoadOptions): Promise<Map<number, Entity>>;+declare function loadComponent(world: World, entity: Entity, compData: SceneComponentData): void;+declare function updateCameraAspectRatio(world: World, aspectRatio: number): void;++/**+ * @file PreviewPlugin.ts+ * @brief Plugin for editor preview functionality+ */++declare class PreviewPlugin implements Plugin {+ private sceneUrl_;+ private app_;+ private loadPromise_;+ constructor(sceneUrl: string);+ build(app: App): void;+ /**+ * @brief Wait for scene loading to complete+ */+ waitForReady(): Promise<void>;+ private loadScene;+ private ensureCamera;+}++/**+ * @file types.ts+ * @brief Platform adapter interface definitions+ */+interface PlatformResponse {+ ok: boolean;+ status: number;+ statusText: string;+ headers: Record<string, string>;+ json<T = unknown>(): Promise<T>;+ text(): Promise<string>;+ arrayBuffer(): Promise<ArrayBuffer>;+}+interface PlatformRequestOptions {+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS';+ headers?: Record<string, string>;+ body?: string | ArrayBuffer;+ responseType?: 'text' | 'arraybuffer' | 'json';+ timeout?: number;+}+interface WasmInstantiateResult {+ instance: WebAssembly.Instance;+ module: WebAssembly.Module;+}+interface PlatformAdapter {+ /**+ * Platform name identifier+ */+ readonly name: 'web' | 'wechat';+ /**+ * Fetch resource from URL+ */+ fetch(url: string, options?: PlatformRequestOptions): Promise<PlatformResponse>;+ /**+ * Read local file as ArrayBuffer+ * @param path - File path (relative to game root)+ */+ readFile(path: string): Promise<ArrayBuffer>;+ /**+ * Read local file as text+ * @param path - File path (relative to game root)+ */+ readTextFile(path: string): Promise<string>;+ /**+ * Check if file exists+ * @param path - File path+ */+ fileExists(path: string): Promise<boolean>;+ /**+ * Instantiate WebAssembly module+ * @param pathOrBuffer - WASM file path (WeChat) or ArrayBuffer (Web)+ * @param imports - Import object+ */+ instantiateWasm(pathOrBuffer: string | ArrayBuffer, imports: WebAssembly.Imports): Promise<WasmInstantiateResult>;+}+type PlatformType = 'web' | 'wechat';++/**+ * Get the current platform adapter+ * @throws Error if platform not initialized+ */+declare function getPlatform(): PlatformAdapter;+/**+ * Check if platform is initialized+ */+declare function isPlatformInitialized(): boolean;+/**+ * Get platform type+ */+declare function getPlatformType(): 'web' | 'wechat' | null;+/**+ * Check if running on WeChat+ */+declare function isWeChat(): boolean;+/**+ * Check if running on Web+ */+declare function isWeb(): boolean;+declare function platformFetch(url: string, options?: PlatformRequestOptions): Promise<PlatformResponse>;+declare function platformReadFile(path: string): Promise<ArrayBuffer>;+declare function platformReadTextFile(path: string): Promise<string>;+declare function platformFileExists(path: string): Promise<boolean>;+declare function platformInstantiateWasm(pathOrBuffer: string | ArrayBuffer, imports: WebAssembly.Imports): Promise<WasmInstantiateResult>;++/**+ * @file spine.ts+ * @brief Spine animation control API+ */++/**+ * Spine event types+ */+type SpineEventType = 'start' | 'interrupt' | 'end' | 'complete' | 'dispose' | 'event';+/**+ * Spine event callback+ */+type SpineEventCallback = (event: SpineEvent) => void;+/**+ * Spine event data+ */+interface SpineEvent {+ type: SpineEventType;+ entity: Entity;+ track: number;+ animation: string | null;+ eventName?: string;+ intValue?: number;+ floatValue?: number;+ stringValue?: string;+}+/**+ * Track entry info for animation queries+ */+interface TrackEntryInfo {+ animation: string;+ track: number;+ loop: boolean;+ timeScale: number;+ trackTime: number;+ animationTime: number;+ duration: number;+ isComplete: boolean;+}+/**+ * Controller for Spine skeletal animations+ *+ * @example+ * ```typescript+ * const spine = new SpineController(wasmModule);+ *+ * // Play animation+ * spine.play(entity, 'run', true);+ *+ * // Queue next animation+ * spine.addAnimation(entity, 'idle', true, 0.2);+ *+ * // Change skin+ * spine.setSkin(entity, 'warrior');+ *+ * // Get bone position for effects+ * const pos = spine.getBonePosition(entity, 'weapon');+ * if (pos) {+ * spawnEffect(pos.x, pos.y);+ * }+ *+ * // Listen for events+ * spine.on(entity, 'event', (e) => {+ * if (e.eventName === 'footstep') {+ * playSound('footstep');+ * }+ * });+ * ```+ */+declare class SpineController {+ private module_;+ private listeners_;+ constructor(wasmModule: any);+ /**+ * Plays an animation, replacing any current animation on the track+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop the animation+ * @param track Animation track (default 0)+ * @returns True if animation was set+ */+ play(entity: Entity, animation: string, loop?: boolean, track?: number): boolean;+ /**+ * Adds an animation to the queue+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop+ * @param delay Delay before starting (seconds)+ * @param track Animation track (default 0)+ * @returns True if animation was queued+ */+ addAnimation(entity: Entity, animation: string, loop?: boolean, delay?: number, track?: number): boolean;+ /**+ * Sets an empty animation to mix out the current animation+ * @param entity Target entity+ * @param mixDuration Duration of the mix out+ * @param track Animation track (default 0)+ */+ setEmptyAnimation(entity: Entity, mixDuration?: number, track?: number): void;+ /**+ * Clears all animations on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ */+ clearTrack(entity: Entity, track?: number): void;+ /**+ * Clears all tracks+ * @param entity Target entity+ */+ clearTracks(entity: Entity): void;+ /**+ * Sets the current skin+ * @param entity Target entity+ * @param skinName Skin name+ * @returns True if skin was set+ */+ setSkin(entity: Entity, skinName: string): boolean;+ /**+ * Gets available skin names+ * @param entity Target entity+ * @returns Array of skin names+ */+ getSkins(entity: Entity): string[];+ /**+ * Gets available animation names+ * @param entity Target entity+ * @returns Array of animation names+ */+ getAnimations(entity: Entity): string[];+ /**+ * Gets the current animation on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Animation name or null+ */+ getCurrentAnimation(entity: Entity, track?: number): string | null;+ /**+ * Gets the duration of an animation+ * @param entity Target entity+ * @param animation Animation name+ * @returns Duration in seconds, or 0 if not found+ */+ getAnimationDuration(entity: Entity, animation: string): number;+ /**+ * Gets detailed track entry info+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Track entry info or null+ */+ getTrackEntry(entity: Entity, track?: number): TrackEntryInfo | null;+ /**+ * Gets world position of a bone+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Position or null if not found+ */+ getBonePosition(entity: Entity, boneName: string): Vec2 | null;+ /**+ * Gets world rotation of a bone in degrees+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Rotation in degrees or null+ */+ getBoneRotation(entity: Entity, boneName: string): number | null;+ /**+ * Sets the attachment for a slot+ * @param entity Target entity+ * @param slotName Slot name+ * @param attachmentName Attachment name (null to clear)+ */+ setAttachment(entity: Entity, slotName: string, attachmentName: string | null): void;+ /**+ * Registers an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ on(entity: Entity, type: SpineEventType, callback: SpineEventCallback): void;+ /**+ * Unregisters an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ off(entity: Entity, type: SpineEventType, callback: SpineEventCallback): void;+ /**+ * Removes all event listeners for an entity+ * @param entity Target entity+ */+ removeAllListeners(entity: Entity): void;+ private setupEventBridge;+ private dispatchEvent;+}+/**+ * Creates a SpineController instance+ * @param wasmModule The ESEngine WASM module+ * @returns SpineController instance+ */+declare function createSpineController(wasmModule: any): SpineController;++/**+ * @file geometry.ts+ * @brief Geometry API for custom mesh rendering+ * @details Provides geometry creation and management for custom shapes,+ * particles, trails, and other procedural meshes.+ */++type GeometryHandle = number;+declare enum DataType {+ Float = 1,+ Float2 = 2,+ Float3 = 3,+ Float4 = 4,+ Int = 5,+ Int2 = 6,+ Int3 = 7,+ Int4 = 8+}+interface VertexAttributeDescriptor {+ name: string;+ type: DataType;+}+interface GeometryOptions {+ vertices: Float32Array;+ layout: VertexAttributeDescriptor[];+ indices?: Uint16Array | Uint32Array;+ dynamic?: boolean;+}+declare function initGeometryAPI(wasmModule: ESEngineModule): void;+declare function shutdownGeometryAPI(): void;+declare const Geometry: {+ /**+ * Creates a new geometry with vertices and optional indices.+ * @param options Geometry creation options+ * @returns Geometry handle+ */+ create(options: GeometryOptions): GeometryHandle;+ /**+ * Updates vertices of a dynamic geometry.+ * @param handle Geometry handle+ * @param vertices New vertex data+ * @param offset Offset in floats+ */+ updateVertices(handle: GeometryHandle, vertices: Float32Array, offset?: number): void;+ /**+ * Releases a geometry.+ * @param handle Geometry handle+ */+ release(handle: GeometryHandle): void;+ /**+ * Checks if a geometry handle is valid.+ * @param handle Geometry handle+ * @returns True if valid+ */+ isValid(handle: GeometryHandle): boolean;+ /**+ * Creates a unit quad geometry (1x1, centered at origin).+ * @returns Geometry handle+ */+ createQuad(width?: number, height?: number): GeometryHandle;+ /**+ * Creates a circle geometry.+ * @param radius Circle radius+ * @param segments Number of segments+ * @returns Geometry handle+ */+ createCircle(radius?: number, segments?: number): GeometryHandle;+ /**+ * Creates a polygon geometry from vertices.+ * @param points Array of {x, y} points+ * @returns Geometry handle+ */+ createPolygon(points: Array<{+ x: number;+ y: number;+ }>): GeometryHandle;+};++/**+ * @file blend.ts+ * @brief Blend mode definitions for rendering+ */+declare enum BlendMode {+ Normal = 0,+ Additive = 1,+ Multiply = 2,+ Screen = 3,+ PremultipliedAlpha = 4+}++/**+ * @file material.ts+ * @brief Material and Shader API for custom rendering+ * @details Provides shader creation and material management for custom visual effects.+ */++type ShaderHandle = number;+type MaterialHandle = number;+type UniformValue = number | Vec2 | Vec3 | Vec4 | number[];+interface MaterialOptions {+ shader: ShaderHandle;+ uniforms?: Record<string, UniformValue>;+ blendMode?: BlendMode;+ depthTest?: boolean;+}+interface MaterialData {+ shader: ShaderHandle;+ uniforms: Map<string, UniformValue>;+ blendMode: BlendMode;+ depthTest: boolean;+}+declare function initMaterialAPI(wasmModule: ESEngineModule): void;+declare function shutdownMaterialAPI(): void;+declare const Material: {+ /**+ * Creates a shader from vertex and fragment source code.+ * @param vertexSrc GLSL vertex shader source+ * @param fragmentSrc GLSL fragment shader source+ * @returns Shader handle, or 0 on failure+ */+ createShader(vertexSrc: string, fragmentSrc: string): ShaderHandle;+ /**+ * Releases a shader.+ * @param shader Shader handle to release+ */+ releaseShader(shader: ShaderHandle): void;+ /**+ * Creates a material with a shader and optional settings.+ * @param options Material creation options+ * @returns Material handle+ */+ create(options: MaterialOptions): MaterialHandle;+ /**+ * Gets material data by handle.+ * @param material Material handle+ * @returns Material data or undefined+ */+ get(material: MaterialHandle): MaterialData | undefined;+ /**+ * Sets a uniform value on a material.+ * @param material Material handle+ * @param name Uniform name+ * @param value Uniform value+ */+ setUniform(material: MaterialHandle, name: string, value: UniformValue): void;+ /**+ * Gets a uniform value from a material.+ * @param material Material handle+ * @param name Uniform name+ * @returns Uniform value or undefined+ */+ getUniform(material: MaterialHandle, name: string): UniformValue | undefined;+ /**+ * Sets the blend mode for a material.+ * @param material Material handle+ * @param mode Blend mode+ */+ setBlendMode(material: MaterialHandle, mode: BlendMode): void;+ /**+ * Gets the blend mode of a material.+ * @param material Material handle+ * @returns Blend mode+ */+ getBlendMode(material: MaterialHandle): BlendMode;+ /**+ * Sets depth test enabled for a material.+ * @param material Material handle+ * @param enabled Whether depth test is enabled+ */+ setDepthTest(material: MaterialHandle, enabled: boolean): void;+ /**+ * Gets the shader handle for a material.+ * @param material Material handle+ * @returns Shader handle+ */+ getShader(material: MaterialHandle): ShaderHandle;+ /**+ * Releases a material (does not release the shader).+ * @param material Material handle+ */+ release(material: MaterialHandle): void;+ /**+ * Checks if a material exists.+ * @param material Material handle+ * @returns True if material exists+ */+ isValid(material: MaterialHandle): boolean;+};+declare const ShaderSources: {+ SPRITE_VERTEX: string;+ SPRITE_FRAGMENT: string;+ COLOR_VERTEX: string;+ COLOR_FRAGMENT: string;+};++/**+ * @file draw.ts+ * @brief Immediate mode 2D drawing API+ * @details Provides simple drawing primitives (lines, rectangles, circles)+ * with automatic batching. All draw commands are cleared each frame.+ */++declare function initDrawAPI(wasmModule: ESEngineModule): void;+declare function shutdownDrawAPI(): void;+interface DrawAPI {+ /**+ * Begins a new draw frame with the given view-projection matrix.+ * Must be called before any draw commands.+ */+ begin(viewProjection: Float32Array): void;+ /**+ * Ends the current draw frame and submits all commands.+ * Must be called after all draw commands.+ */+ end(): void;+ /**+ * Draws a line between two points.+ * @param from Start point+ * @param to End point+ * @param color RGBA color+ * @param thickness Line thickness in pixels (default: 1)+ */+ line(from: Vec2, to: Vec2, color: Color, thickness?: number): void;+ /**+ * Draws a filled or outlined rectangle.+ * @param position Center position+ * @param size Width and height+ * @param color RGBA color+ * @param filled If true draws filled, if false draws outline (default: true)+ */+ rect(position: Vec2, size: Vec2, color: Color, filled?: boolean): void;+ /**+ * Draws a rectangle outline.+ * @param position Center position+ * @param size Width and height+ * @param color RGBA color+ * @param thickness Line thickness in pixels (default: 1)+ */+ rectOutline(position: Vec2, size: Vec2, color: Color, thickness?: number): void;+ /**+ * Draws a filled or outlined circle.+ * @param center Center position+ * @param radius Circle radius+ * @param color RGBA color+ * @param filled If true draws filled, if false draws outline (default: true)+ * @param segments Number of segments for approximation (default: 32)+ */+ circle(center: Vec2, radius: number, color: Color, filled?: boolean, segments?: number): void;+ /**+ * Draws a circle outline.+ * @param center Center position+ * @param radius Circle radius+ * @param color RGBA color+ * @param thickness Line thickness in pixels (default: 1)+ * @param segments Number of segments for approximation (default: 32)+ */+ circleOutline(center: Vec2, radius: number, color: Color, thickness?: number, segments?: number): void;+ /**+ * Draws a textured quad.+ * @param position Center position+ * @param size Width and height+ * @param textureHandle GPU texture handle+ * @param tint Color tint (default: white)+ */+ texture(position: Vec2, size: Vec2, textureHandle: number, tint?: Color): void;+ /**+ * Draws a rotated textured quad.+ * @param position Center position+ * @param size Width and height+ * @param rotation Rotation angle in radians+ * @param textureHandle GPU texture handle+ * @param tint Color tint (default: white)+ */+ textureRotated(position: Vec2, size: Vec2, rotation: number, textureHandle: number, tint?: Color): void;+ /**+ * Sets the current render layer.+ * @param layer Layer index (higher layers render on top)+ */+ setLayer(layer: number): void;+ /**+ * Sets the current depth for sorting within a layer.+ * @param depth Z depth value+ */+ setDepth(depth: number): void;+ /**+ * Gets the number of draw calls in the current/last frame.+ */+ getDrawCallCount(): number;+ /**+ * Gets the number of primitives drawn in the current/last frame.+ */+ getPrimitiveCount(): number;+ /**+ * Sets the blend mode for subsequent draw operations.+ * @param mode The blend mode to use+ */+ setBlendMode(mode: BlendMode): void;+ /**+ * Enables or disables depth testing.+ * @param enabled True to enable depth testing+ */+ setDepthTest(enabled: boolean): void;+ /**+ * Draws a custom mesh with a shader.+ * @param geometry Geometry handle+ * @param shader Shader handle+ * @param transform Transform matrix (4x4, column-major)+ */+ drawMesh(geometry: GeometryHandle, shader: ShaderHandle, transform: Float32Array): void;+ /**+ * Draws a custom mesh with a material.+ * @param geometry Geometry handle+ * @param material Material handle+ * @param transform Transform matrix (4x4, column-major)+ */+ drawMeshWithMaterial(geometry: GeometryHandle, material: MaterialHandle, transform: Float32Array): void;+}+declare const Draw: DrawAPI;++/**+ * @file postprocess.ts+ * @brief Post-processing effects API+ * @details Provides full-screen post-processing effects like blur, vignette, etc.+ */++declare function initPostProcessAPI(wasmModule: ESEngineModule): void;+declare function shutdownPostProcessAPI(): void;+declare const PostProcess: {+ /**+ * Initializes the post-processing pipeline.+ * @param width Framebuffer width+ * @param height Framebuffer height+ * @returns True on success+ */+ init(width: number, height: number): boolean;+ /**+ * Shuts down the post-processing pipeline.+ */+ shutdown(): void;+ /**+ * Resizes the framebuffers.+ * @param width New width+ * @param height New height+ */+ resize(width: number, height: number): void;+ /**+ * Adds a post-processing pass.+ * @param name Unique name for the pass+ * @param shader Shader handle+ * @returns Pass index+ */+ addPass(name: string, shader: ShaderHandle): number;+ /**+ * Removes a pass by name.+ * @param name Pass name+ */+ removePass(name: string): void;+ /**+ * Enables or disables a pass.+ * @param name Pass name+ * @param enabled Whether to enable the pass+ */+ setEnabled(name: string, enabled: boolean): void;+ /**+ * Checks if a pass is enabled.+ * @param name Pass name+ * @returns True if enabled+ */+ isEnabled(name: string): boolean;+ /**+ * Sets a float uniform on a pass.+ * @param passName Pass name+ * @param uniform Uniform name+ * @param value Float value+ */+ setUniform(passName: string, uniform: string, value: number): void;+ /**+ * Sets a vec4 uniform on a pass.+ * @param passName Pass name+ * @param uniform Uniform name+ * @param value Vec4 value+ */+ setUniformVec4(passName: string, uniform: string, value: Vec4): void;+ /**+ * Begins rendering to the post-process pipeline.+ * Call this before rendering your scene.+ */+ begin(): void;+ /**+ * Ends and processes all passes.+ * Call this after rendering your scene.+ */+ end(): void;+ /**+ * Gets the number of passes.+ */+ getPassCount(): number;+ /**+ * Checks if the pipeline is initialized.+ */+ isInitialized(): boolean;+ /**+ * Sets bypass mode to skip FBO rendering entirely.+ * When bypassed, begin()/end() become no-ops and scene renders directly to screen.+ * Use this when no post-processing passes are needed for maximum performance.+ * @param bypass Whether to bypass the pipeline+ */+ setBypass(bypass: boolean): void;+ /**+ * Checks if bypass mode is enabled.+ * @returns True if bypassed+ */+ isBypassed(): boolean;+ /**+ * Creates a blur effect shader.+ * @returns Shader handle+ */+ createBlur(): ShaderHandle;+ /**+ * Creates a vignette effect shader.+ * @returns Shader handle+ */+ createVignette(): ShaderHandle;+ /**+ * Creates a grayscale effect shader.+ * @returns Shader handle+ */+ createGrayscale(): ShaderHandle;+ /**+ * Creates a chromatic aberration effect shader.+ * @returns Shader handle+ */+ createChromaticAberration(): ShaderHandle;+};++declare enum RenderStage {+ Background = 0,+ Opaque = 1,+ Transparent = 2,+ Overlay = 3+}+type RenderTargetHandle = number;+interface RenderStats {+ drawCalls: number;+ triangles: number;+ sprites: number;+ spine: number;+ meshes: number;+ culled: number;+}+declare function initRendererAPI(wasmModule: ESEngineModule): void;+declare function shutdownRendererAPI(): void;+declare const Renderer: {+ init(width: number, height: number): void;+ resize(width: number, height: number): void;+ begin(viewProjection: Float32Array, target?: RenderTargetHandle): void;+ end(): void;+ submitSprites(registry: {+ _cpp: CppRegistry;+ }): void;+ submitSpine(registry: {+ _cpp: CppRegistry;+ }): void;+ setStage(stage: RenderStage): void;+ createRenderTarget(width: number, height: number): RenderTargetHandle;+ releaseRenderTarget(handle: RenderTargetHandle): void;+ getTargetTexture(handle: RenderTargetHandle): number;+ getStats(): RenderStats;+};++export { App, AssetPlugin, AssetServer, Assets, BlendMode, Camera, Canvas, Children, Commands, CommandsInstance, DataType, Draw, EntityCommands, Geometry, INVALID_ENTITY, INVALID_TEXTURE, Input, LocalTransform, Material, Mut, Parent, PostProcess, PreviewPlugin, Query, QueryInstance, RenderStage, Renderer, Res, ResMut, ResMutInstance, Schedule, ShaderSources, SpineAnimation, SpineController, Sprite, SystemRunner, Text, TextAlign, TextOverflow, TextPlugin, TextRenderer, TextVerticalAlign, Time, UIRect, Velocity, World, WorldTransform, assetPlugin, color, createSpineController, createWebApp, defineComponent, defineResource, defineSystem, defineTag, getComponentDefaults, getPlatform, getPlatformType, initDrawAPI, initGeometryAPI, initMaterialAPI, initPostProcessAPI, initRendererAPI, isBuiltinComponent, isPlatformInitialized, isWeChat, isWeb, loadComponent, loadSceneData, loadSceneWithAssets, platformFetch, platformFileExists, platformInstantiateWasm, platformReadFile, platformReadTextFile, quat, shutdownDrawAPI, shutdownGeometryAPI, shutdownMaterialAPI, shutdownPostProcessAPI, shutdownRendererAPI, textPlugin, updateCameraAspectRatio, vec2, vec3, vec4 };+export type { AnyComponentDef, AssetsData, BuiltinComponentDef, CameraData, CanvasData, ChildrenData, Color, CommandsDescriptor, ComponentData, ComponentDef, CppRegistry, CppResourceManager, DrawAPI, ESEngineModule, Entity, GeometryHandle, GeometryOptions, InferParam, InferParams, InputState, LocalTransformData, MaterialHandle, MaterialOptions, MutWrapper, ParentData, PlatformAdapter, PlatformRequestOptions, PlatformResponse, PlatformType, Plugin, Quat, QueryDescriptor, QueryResult, RenderStats, RenderTargetHandle, ResDescriptor, ResMutDescriptor, ResourceDef, SceneComponentData, SceneData, SceneEntityData, SceneLoadOptions, ShaderHandle, SliceBorder$1 as SliceBorder, SpineAnimationData, SpineEvent, SpineEventCallback, SpineEventType, SpineLoadResult, SpriteData, SystemDef, SystemParam, TextData, TextRenderResult, TextureHandle, TextureInfo, TimeData, TrackEntryInfo, UIRectData, UniformValue, Vec2, Vec3, Vec4, VelocityData, VertexAttributeDescriptor, WebAppOptions, WorldTransformData };diff --git a/desktop/public/sdk/esm/esengine.js b/desktop/public/sdk/esm/esengine.jsindex 30a413e1c..4fdfa77dd 100644--- a/desktop/public/sdk/esm/esengine.js+++ b/desktop/public/sdk/esm/esengine.js@@ -264,6 +264,27 @@ const SpineAnimation = defineBuiltin('SpineAnimation', {layer: 0,skeletonScale: 1.0});+// =============================================================================+// Component Defaults Registry+// =============================================================================+const builtinComponents = {+ LocalTransform,+ WorldTransform,+ Sprite,+ Camera,+ Canvas,+ Velocity,+ Parent,+ Children,+ SpineAnimation,+};+function getComponentDefaults(typeName) {+ const component = builtinComponents[typeName];+ if (component) {+ return { ...component._default };+ }+ return null;+}/*** @file resource.ts@@ -1183,6 +1204,1011 @@ class TextPlugin {}const textPlugin = new TextPlugin();+/**+ * @file blend.ts+ * @brief Blend mode definitions for rendering+ */+var BlendMode;+(function (BlendMode) {+ BlendMode[BlendMode["Normal"] = 0] = "Normal";+ BlendMode[BlendMode["Additive"] = 1] = "Additive";+ BlendMode[BlendMode["Multiply"] = 2] = "Multiply";+ BlendMode[BlendMode["Screen"] = 3] = "Screen";+ BlendMode[BlendMode["PremultipliedAlpha"] = 4] = "PremultipliedAlpha";+})(BlendMode || (BlendMode = {}));++/**+ * @file material.ts+ * @brief Material and Shader API for custom rendering+ * @details Provides shader creation and material management for custom visual effects.+ */+let resourceManager = null;+let nextMaterialId = 1;+const materials = new Map();+// =============================================================================+// Initialization+// =============================================================================+function initMaterialAPI(wasmModule) {+ resourceManager = wasmModule.getResourceManager();+}+function shutdownMaterialAPI() {+ materials.clear();+ nextMaterialId = 1;+ resourceManager = null;+}+// =============================================================================+// Shader API+// =============================================================================+function getResourceManager() {+ if (!resourceManager) {+ throw new Error('Material API not initialized. Call initMaterialAPI() first.');+ }+ return resourceManager;+}+const Material = {+ /**+ * Creates a shader from vertex and fragment source code.+ * @param vertexSrc GLSL vertex shader source+ * @param fragmentSrc GLSL fragment shader source+ * @returns Shader handle, or 0 on failure+ */+ createShader(vertexSrc, fragmentSrc) {+ return getResourceManager().createShader(vertexSrc, fragmentSrc);+ },+ /**+ * Releases a shader.+ * @param shader Shader handle to release+ */+ releaseShader(shader) {+ if (shader > 0) {+ getResourceManager().releaseShader(shader);+ }+ },+ /**+ * Creates a material with a shader and optional settings.+ * @param options Material creation options+ * @returns Material handle+ */+ create(options) {+ const handle = nextMaterialId++;+ const data = {+ shader: options.shader,+ uniforms: new Map(),+ blendMode: options.blendMode ?? BlendMode.Normal,+ depthTest: options.depthTest ?? false,+ };+ if (options.uniforms) {+ for (const [key, value] of Object.entries(options.uniforms)) {+ data.uniforms.set(key, value);+ }+ }+ materials.set(handle, data);+ return handle;+ },+ /**+ * Gets material data by handle.+ * @param material Material handle+ * @returns Material data or undefined+ */+ get(material) {+ return materials.get(material);+ },+ /**+ * Sets a uniform value on a material.+ * @param material Material handle+ * @param name Uniform name+ * @param value Uniform value+ */+ setUniform(material, name, value) {+ const data = materials.get(material);+ if (data) {+ data.uniforms.set(name, value);+ }+ },+ /**+ * Gets a uniform value from a material.+ * @param material Material handle+ * @param name Uniform name+ * @returns Uniform value or undefined+ */+ getUniform(material, name) {+ const data = materials.get(material);+ return data?.uniforms.get(name);+ },+ /**+ * Sets the blend mode for a material.+ * @param material Material handle+ * @param mode Blend mode+ */+ setBlendMode(material, mode) {+ const data = materials.get(material);+ if (data) {+ data.blendMode = mode;+ }+ },+ /**+ * Gets the blend mode of a material.+ * @param material Material handle+ * @returns Blend mode+ */+ getBlendMode(material) {+ const data = materials.get(material);+ return data?.blendMode ?? BlendMode.Normal;+ },+ /**+ * Sets depth test enabled for a material.+ * @param material Material handle+ * @param enabled Whether depth test is enabled+ */+ setDepthTest(material, enabled) {+ const data = materials.get(material);+ if (data) {+ data.depthTest = enabled;+ }+ },+ /**+ * Gets the shader handle for a material.+ * @param material Material handle+ * @returns Shader handle+ */+ getShader(material) {+ const data = materials.get(material);+ return data?.shader ?? 0;+ },+ /**+ * Releases a material (does not release the shader).+ * @param material Material handle+ */+ release(material) {+ materials.delete(material);+ },+ /**+ * Checks if a material exists.+ * @param material Material handle+ * @returns True if material exists+ */+ isValid(material) {+ return materials.has(material);+ },+};+// =============================================================================+// Built-in Shader Sources+// =============================================================================+const ShaderSources = {+ SPRITE_VERTEX: `#version 300 es+precision highp float;++layout(location = 0) in vec3 a_position;+layout(location = 1) in vec4 a_color;+layout(location = 2) in vec2 a_texCoord;++uniform mat4 u_projection;+uniform mat4 u_model;++out vec4 v_color;+out vec2 v_texCoord;++void main() {+ v_color = a_color;+ v_texCoord = a_texCoord;+ gl_Position = u_projection * u_model * vec4(a_position, 1.0);+}+`,+ SPRITE_FRAGMENT: `#version 300 es+precision highp float;++in vec4 v_color;+in vec2 v_texCoord;++uniform sampler2D u_texture;++out vec4 fragColor;++void main() {+ fragColor = texture(u_texture, v_texCoord) * v_color;+}+`,+ COLOR_VERTEX: `#version 300 es+precision highp float;++layout(location = 0) in vec3 a_position;+layout(location = 1) in vec4 a_color;++uniform mat4 u_projection;+uniform mat4 u_model;++out vec4 v_color;++void main() {+ v_color = a_color;+ gl_Position = u_projection * u_model * vec4(a_position, 1.0);+}+`,+ COLOR_FRAGMENT: `#version 300 es+precision highp float;++in vec4 v_color;++out vec4 fragColor;++void main() {+ fragColor = v_color;+}+`,+};++/**+ * @file draw.ts+ * @brief Immediate mode 2D drawing API+ * @details Provides simple drawing primitives (lines, rectangles, circles)+ * with automatic batching. All draw commands are cleared each frame.+ */+// =============================================================================+// Internal State+// =============================================================================+let module$4 = null;+let viewProjectionPtr$1 = 0;+let transformPtr = 0;+let uniformsPtr = 0;+const UNIFORMS_BUFFER_SIZE = 256;+const uniformBuffer = new Float32Array(UNIFORMS_BUFFER_SIZE);+// =============================================================================+// Initialization+// =============================================================================+function initDrawAPI(wasmModule) {+ module$4 = wasmModule;+ viewProjectionPtr$1 = module$4._malloc(16 * 4);+ transformPtr = module$4._malloc(16 * 4);+ uniformsPtr = module$4._malloc(UNIFORMS_BUFFER_SIZE * 4);+}+function shutdownDrawAPI() {+ if (module$4) {+ if (viewProjectionPtr$1) {+ module$4._free(viewProjectionPtr$1);+ viewProjectionPtr$1 = 0;+ }+ if (transformPtr) {+ module$4._free(transformPtr);+ transformPtr = 0;+ }+ if (uniformsPtr) {+ module$4._free(uniformsPtr);+ uniformsPtr = 0;+ }+ }+ module$4 = null;+}+// =============================================================================+// Draw Implementation+// =============================================================================+function getModule$2() {+ if (!module$4) {+ throw new Error('Draw API not initialized. Call initDrawAPI() first.');+ }+ return module$4;+}+const WHITE = { x: 1, y: 1, z: 1, w: 1 };+const Draw = {+ begin(viewProjection) {+ const m = getModule$2();+ m.HEAPF32.set(viewProjection, viewProjectionPtr$1 / 4);+ m.draw_begin(viewProjectionPtr$1);+ },+ end() {+ getModule$2().draw_end();+ },+ line(from, to, color, thickness = 1) {+ getModule$2().draw_line(from.x, from.y, to.x, to.y, color.x, color.y, color.z, color.w, thickness);+ },+ rect(position, size, color, filled = true) {+ getModule$2().draw_rect(position.x, position.y, size.x, size.y, color.x, color.y, color.z, color.w, filled);+ },+ rectOutline(position, size, color, thickness = 1) {+ getModule$2().draw_rectOutline(position.x, position.y, size.x, size.y, color.x, color.y, color.z, color.w, thickness);+ },+ circle(center, radius, color, filled = true, segments = 32) {+ getModule$2().draw_circle(center.x, center.y, radius, color.x, color.y, color.z, color.w, filled, segments);+ },+ circleOutline(center, radius, color, thickness = 1, segments = 32) {+ getModule$2().draw_circleOutline(center.x, center.y, radius, color.x, color.y, color.z, color.w, thickness, segments);+ },+ texture(position, size, textureHandle, tint = WHITE) {+ getModule$2().draw_texture(position.x, position.y, size.x, size.y, textureHandle, tint.x, tint.y, tint.z, tint.w);+ },+ textureRotated(position, size, rotation, textureHandle, tint = WHITE) {+ getModule$2().draw_textureRotated(position.x, position.y, size.x, size.y, rotation, textureHandle, tint.x, tint.y, tint.z, tint.w);+ },+ setLayer(layer) {+ getModule$2().draw_setLayer(layer);+ },+ setDepth(depth) {+ getModule$2().draw_setDepth(depth);+ },+ getDrawCallCount() {+ if (!module$4)+ return 0;+ return module$4.draw_getDrawCallCount();+ },+ getPrimitiveCount() {+ if (!module$4)+ return 0;+ return module$4.draw_getPrimitiveCount();+ },+ setBlendMode(mode) {+ getModule$2().draw_setBlendMode(mode);+ },+ setDepthTest(enabled) {+ getModule$2().draw_setDepthTest(enabled);+ },+ drawMesh(geometry, shader, transform) {+ const m = getModule$2();+ m.HEAPF32.set(transform, transformPtr / 4);+ m.draw_mesh(geometry, shader, transformPtr);+ },+ drawMeshWithMaterial(geometry, material, transform) {+ const m = getModule$2();+ const matData = Material.get(material);+ if (!matData)+ return;+ Draw.setBlendMode(matData.blendMode);+ Draw.setDepthTest(matData.depthTest);+ if (matData.uniforms.size === 0) {+ Draw.drawMesh(geometry, matData.shader, transform);+ return;+ }+ m.HEAPF32.set(transform, transformPtr / 4);+ let idx = 0;+ for (const [name, value] of matData.uniforms) {+ const nameId = getUniformNameId(name);+ if (nameId < 0)+ continue;+ if (typeof value === 'number') {+ uniformBuffer[idx++] = 1;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value;+ }+ else if (Array.isArray(value)) {+ uniformBuffer[idx++] = value.length;+ uniformBuffer[idx++] = nameId;+ for (let i = 0; i < value.length; i++) {+ uniformBuffer[idx++] = value[i];+ }+ }+ else if ('w' in value) {+ uniformBuffer[idx++] = 4;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value.x;+ uniformBuffer[idx++] = value.y;+ uniformBuffer[idx++] = value.z;+ uniformBuffer[idx++] = value.w;+ }+ else if ('z' in value) {+ uniformBuffer[idx++] = 3;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value.x;+ uniformBuffer[idx++] = value.y;+ uniformBuffer[idx++] = value.z;+ }+ else {+ uniformBuffer[idx++] = 2;+ uniformBuffer[idx++] = nameId;+ uniformBuffer[idx++] = value.x;+ uniformBuffer[idx++] = value.y;+ }+ if (idx > UNIFORMS_BUFFER_SIZE - 6) {+ console.warn('Uniform buffer overflow, some uniforms will be ignored');+ break;+ }+ }+ if (idx === 0) {+ m.draw_mesh(geometry, matData.shader, transformPtr);+ return;+ }+ m.HEAPF32.set(uniformBuffer.subarray(0, idx), uniformsPtr / 4);+ m.draw_meshWithUniforms(geometry, matData.shader, transformPtr, uniformsPtr, idx);+ },+};+const UNIFORM_NAME_MAP = {+ 'u_time': 0,+ 'u_color': 1,+ 'u_intensity': 2,+ 'u_scale': 3,+ 'u_offset': 4,+ 'u_param0': 5,+ 'u_param1': 6,+ 'u_param2': 7,+ 'u_param3': 8,+ 'u_param4': 9,+ 'u_vec0': 10,+ 'u_vec1': 11,+ 'u_vec2': 12,+ 'u_vec3': 13,+ 'u_texture0': 14,+ 'u_texture1': 15,+ 'u_texture2': 16,+ 'u_texture3': 17,+};+function getUniformNameId(name) {+ return UNIFORM_NAME_MAP[name] ?? -1;+}++/**+ * @file geometry.ts+ * @brief Geometry API for custom mesh rendering+ * @details Provides geometry creation and management for custom shapes,+ * particles, trails, and other procedural meshes.+ */+var DataType;+(function (DataType) {+ DataType[DataType["Float"] = 1] = "Float";+ DataType[DataType["Float2"] = 2] = "Float2";+ DataType[DataType["Float3"] = 3] = "Float3";+ DataType[DataType["Float4"] = 4] = "Float4";+ DataType[DataType["Int"] = 5] = "Int";+ DataType[DataType["Int2"] = 6] = "Int2";+ DataType[DataType["Int3"] = 7] = "Int3";+ DataType[DataType["Int4"] = 8] = "Int4";+})(DataType || (DataType = {}));+// =============================================================================+// Internal State+// =============================================================================+let module$3 = null;+let vertexPtr = 0;+let indexPtr = 0;+let layoutPtr = 0;+const VERTEX_BUFFER_SIZE = 64 * 1024;+const INDEX_BUFFER_SIZE = 16 * 1024;+const LAYOUT_BUFFER_SIZE = 64;+// =============================================================================+// Initialization+// =============================================================================+function initGeometryAPI(wasmModule) {+ module$3 = wasmModule;+ vertexPtr = module$3._malloc(VERTEX_BUFFER_SIZE * 4);+ indexPtr = module$3._malloc(INDEX_BUFFER_SIZE * 4);+ layoutPtr = module$3._malloc(LAYOUT_BUFFER_SIZE * 4);+}+function shutdownGeometryAPI() {+ if (module$3) {+ if (vertexPtr)+ module$3._free(vertexPtr);+ if (indexPtr)+ module$3._free(indexPtr);+ if (layoutPtr)+ module$3._free(layoutPtr);+ vertexPtr = 0;+ indexPtr = 0;+ layoutPtr = 0;+ }+ module$3 = null;+}+// =============================================================================+// Geometry API+// =============================================================================+function getModule$1() {+ if (!module$3) {+ throw new Error('Geometry API not initialized. Call initGeometryAPI() first.');+ }+ return module$3;+}+const Geometry = {+ /**+ * Creates a new geometry with vertices and optional indices.+ * @param options Geometry creation options+ * @returns Geometry handle+ */+ create(options) {+ const m = getModule$1();+ const handle = m.geometry_create();+ if (handle === 0) {+ throw new Error('Failed to create geometry');+ }+ const vertexCount = options.vertices.length;+ if (vertexCount * 4 > VERTEX_BUFFER_SIZE * 4) {+ throw new Error(`Vertex data too large: ${vertexCount} floats (max ${VERTEX_BUFFER_SIZE})`);+ }+ m.HEAPF32.set(options.vertices, vertexPtr / 4);+ const layoutCount = options.layout.length;+ const layoutArray = new Int32Array(layoutCount);+ for (let i = 0; i < layoutCount; i++) {+ layoutArray[i] = options.layout[i].type;+ }+ const heap32 = new Int32Array(m.HEAPU8.buffer, layoutPtr, layoutCount);+ heap32.set(layoutArray);+ m.geometry_init(handle, vertexPtr, vertexCount, layoutPtr, layoutCount, options.dynamic ?? false);+ if (options.indices) {+ const indexCount = options.indices.length;+ if (indexCount * 4 > INDEX_BUFFER_SIZE * 4) {+ throw new Error(`Index data too large: ${indexCount} indices (max ${INDEX_BUFFER_SIZE})`);+ }+ if (options.indices instanceof Uint16Array) {+ const heap16 = new Uint16Array(m.HEAPU8.buffer, indexPtr, indexCount);+ heap16.set(options.indices);+ m.geometry_setIndices16(handle, indexPtr, indexCount);+ }+ else {+ const heap32 = new Uint32Array(m.HEAPU8.buffer, indexPtr, indexCount);+ heap32.set(options.indices);+ m.geometry_setIndices32(handle, indexPtr, indexCount);+ }+ }+ return handle;+ },+ /**+ * Updates vertices of a dynamic geometry.+ * @param handle Geometry handle+ * @param vertices New vertex data+ * @param offset Offset in floats+ */+ updateVertices(handle, vertices, offset = 0) {+ const m = getModule$1();+ const vertexCount = vertices.length;+ if (vertexCount * 4 > VERTEX_BUFFER_SIZE * 4) {+ throw new Error(`Vertex data too large: ${vertexCount} floats (max ${VERTEX_BUFFER_SIZE})`);+ }+ m.HEAPF32.set(vertices, vertexPtr / 4);+ m.geometry_updateVertices(handle, vertexPtr, vertexCount, offset);+ },+ /**+ * Releases a geometry.+ * @param handle Geometry handle+ */+ release(handle) {+ if (handle > 0) {+ getModule$1().geometry_release(handle);+ }+ },+ /**+ * Checks if a geometry handle is valid.+ * @param handle Geometry handle+ * @returns True if valid+ */+ isValid(handle) {+ if (!module$3 || handle <= 0)+ return false;+ return module$3.geometry_isValid(handle);+ },+ // =========================================================================+ // Helper Functions+ // =========================================================================+ /**+ * Creates a unit quad geometry (1x1, centered at origin).+ * @returns Geometry handle+ */+ createQuad(width = 1, height = 1) {+ const hw = width / 2;+ const hh = height / 2;+ return Geometry.create({+ vertices: new Float32Array([+ // x, y, u, v+ -hw, -hh, 0, 0,+ hw, -hh, 1, 0,+ hw, hh, 1, 1,+ -hw, hh, 0, 1,+ ]),+ layout: [+ { name: 'a_position', type: DataType.Float2 },+ { name: 'a_texCoord', type: DataType.Float2 },+ ],+ indices: new Uint16Array([0, 1, 2, 2, 3, 0]),+ });+ },+ /**+ * Creates a circle geometry.+ * @param radius Circle radius+ * @param segments Number of segments+ * @returns Geometry handle+ */+ createCircle(radius = 1, segments = 32) {+ const vertices = [];+ const indices = [];+ vertices.push(0, 0, 0.5, 0.5);+ for (let i = 0; i <= segments; i++) {+ const angle = (i / segments) * Math.PI * 2;+ const x = Math.cos(angle) * radius;+ const y = Math.sin(angle) * radius;+ const u = (Math.cos(angle) + 1) / 2;+ const v = (Math.sin(angle) + 1) / 2;+ vertices.push(x, y, u, v);+ }+ for (let i = 1; i <= segments; i++) {+ indices.push(0, i, i + 1);+ }+ return Geometry.create({+ vertices: new Float32Array(vertices),+ layout: [+ { name: 'a_position', type: DataType.Float2 },+ { name: 'a_texCoord', type: DataType.Float2 },+ ],+ indices: new Uint16Array(indices),+ });+ },+ /**+ * Creates a polygon geometry from vertices.+ * @param points Array of {x, y} points+ * @returns Geometry handle+ */+ createPolygon(points) {+ if (points.length < 3) {+ throw new Error('Polygon must have at least 3 points');+ }+ let minX = Infinity, minY = Infinity;+ let maxX = -Infinity, maxY = -Infinity;+ for (const p of points) {+ minX = Math.min(minX, p.x);+ minY = Math.min(minY, p.y);+ maxX = Math.max(maxX, p.x);+ maxY = Math.max(maxY, p.y);+ }+ const vertices = [];+ for (const p of points) {+ const u = (p.x - minX) / (maxX - minX);+ const v = (p.y - minY) / (maxY - minY);+ vertices.push(p.x, p.y, u, v);+ }+ const indices = [];+ for (let i = 1; i < points.length - 1; i++) {+ indices.push(0, i, i + 1);+ }+ return Geometry.create({+ vertices: new Float32Array(vertices),+ layout: [+ { name: 'a_position', type: DataType.Float2 },+ { name: 'a_texCoord', type: DataType.Float2 },+ ],+ indices: new Uint16Array(indices),+ });+ },+};++/**+ * @file postprocess.ts+ * @brief Post-processing effects API+ * @details Provides full-screen post-processing effects like blur, vignette, etc.+ */+// =============================================================================+// Internal State+// =============================================================================+let module$2 = null;+// =============================================================================+// Initialization+// =============================================================================+function initPostProcessAPI(wasmModule) {+ module$2 = wasmModule;+}+function shutdownPostProcessAPI() {+ if (module$2 && PostProcess.isInitialized()) {+ PostProcess.shutdown();+ }+ module$2 = null;+}+// =============================================================================+// PostProcess API+// =============================================================================+function getModule() {+ if (!module$2) {+ throw new Error('PostProcess API not initialized. Call initPostProcessAPI() first.');+ }+ return module$2;+}+const PostProcess = {+ /**+ * Initializes the post-processing pipeline.+ * @param width Framebuffer width+ * @param height Framebuffer height+ * @returns True on success+ */+ init(width, height) {+ return getModule().postprocess_init(width, height);+ },+ /**+ * Shuts down the post-processing pipeline.+ */+ shutdown() {+ getModule().postprocess_shutdown();+ },+ /**+ * Resizes the framebuffers.+ * @param width New width+ * @param height New height+ */+ resize(width, height) {+ getModule().postprocess_resize(width, height);+ },+ /**+ * Adds a post-processing pass.+ * @param name Unique name for the pass+ * @param shader Shader handle+ * @returns Pass index+ */+ addPass(name, shader) {+ return getModule().postprocess_addPass(name, shader);+ },+ /**+ * Removes a pass by name.+ * @param name Pass name+ */+ removePass(name) {+ getModule().postprocess_removePass(name);+ },+ /**+ * Enables or disables a pass.+ * @param name Pass name+ * @param enabled Whether to enable the pass+ */+ setEnabled(name, enabled) {+ getModule().postprocess_setPassEnabled(name, enabled);+ },+ /**+ * Checks if a pass is enabled.+ * @param name Pass name+ * @returns True if enabled+ */+ isEnabled(name) {+ return getModule().postprocess_isPassEnabled(name);+ },+ /**+ * Sets a float uniform on a pass.+ * @param passName Pass name+ * @param uniform Uniform name+ * @param value Float value+ */+ setUniform(passName, uniform, value) {+ getModule().postprocess_setUniformFloat(passName, uniform, value);+ },+ /**+ * Sets a vec4 uniform on a pass.+ * @param passName Pass name+ * @param uniform Uniform name+ * @param value Vec4 value+ */+ setUniformVec4(passName, uniform, value) {+ getModule().postprocess_setUniformVec4(passName, uniform, value.x, value.y, value.z, value.w);+ },+ /**+ * Begins rendering to the post-process pipeline.+ * Call this before rendering your scene.+ */+ begin() {+ getModule().postprocess_begin();+ },+ /**+ * Ends and processes all passes.+ * Call this after rendering your scene.+ */+ end() {+ getModule().postprocess_end();+ },+ /**+ * Gets the number of passes.+ */+ getPassCount() {+ return getModule().postprocess_getPassCount();+ },+ /**+ * Checks if the pipeline is initialized.+ */+ isInitialized() {+ if (!module$2)+ return false;+ return module$2.postprocess_isInitialized();+ },+ /**+ * Sets bypass mode to skip FBO rendering entirely.+ * When bypassed, begin()/end() become no-ops and scene renders directly to screen.+ * Use this when no post-processing passes are needed for maximum performance.+ * @param bypass Whether to bypass the pipeline+ */+ setBypass(bypass) {+ getModule().postprocess_setBypass(bypass);+ },+ /**+ * Checks if bypass mode is enabled.+ * @returns True if bypassed+ */+ isBypassed() {+ if (!module$2)+ return true;+ return module$2.postprocess_isBypassed();+ },+ // =========================================================================+ // Built-in Effects+ // =========================================================================+ /**+ * Creates a blur effect shader.+ * @returns Shader handle+ */+ createBlur() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform vec2 u_resolution;+uniform float u_intensity;+out vec4 fragColor;++void main() {+ vec2 texelSize = 1.0 / u_resolution;+ float offset = u_intensity;++ vec4 color = vec4(0.0);+ color += texture(u_texture, v_texCoord + vec2(-offset, -offset) * texelSize) * 0.0625;+ color += texture(u_texture, v_texCoord + vec2( 0.0, -offset) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord + vec2( offset, -offset) * texelSize) * 0.0625;+ color += texture(u_texture, v_texCoord + vec2(-offset, 0.0) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord) * 0.25;+ color += texture(u_texture, v_texCoord + vec2( offset, 0.0) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord + vec2(-offset, offset) * texelSize) * 0.0625;+ color += texture(u_texture, v_texCoord + vec2( 0.0, offset) * texelSize) * 0.125;+ color += texture(u_texture, v_texCoord + vec2( offset, offset) * texelSize) * 0.0625;++ fragColor = color;+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+ /**+ * Creates a vignette effect shader.+ * @returns Shader handle+ */+ createVignette() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform float u_intensity;+uniform float u_softness;+out vec4 fragColor;++void main() {+ vec4 color = texture(u_texture, v_texCoord);+ vec2 uv = v_texCoord * 2.0 - 1.0;+ float dist = length(uv);+ float vignette = smoothstep(u_intensity, u_intensity - u_softness, dist);+ fragColor = vec4(color.rgb * vignette, color.a);+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+ /**+ * Creates a grayscale effect shader.+ * @returns Shader handle+ */+ createGrayscale() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform float u_intensity;+out vec4 fragColor;++void main() {+ vec4 color = texture(u_texture, v_texCoord);+ float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));+ fragColor = vec4(mix(color.rgb, vec3(gray), u_intensity), color.a);+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+ /**+ * Creates a chromatic aberration effect shader.+ * @returns Shader handle+ */+ createChromaticAberration() {+ const fragmentSrc = `#version 300 es+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+uniform vec2 u_resolution;+uniform float u_intensity;+out vec4 fragColor;++void main() {+ vec2 offset = u_intensity / u_resolution;+ float r = texture(u_texture, v_texCoord + offset).r;+ float g = texture(u_texture, v_texCoord).g;+ float b = texture(u_texture, v_texCoord - offset).b;+ float a = texture(u_texture, v_texCoord).a;+ fragColor = vec4(r, g, b, a);+}+`;+ return Material.createShader(POSTPROCESS_VERTEX, fragmentSrc);+ },+};+// =============================================================================+// Shared Vertex Shader+// =============================================================================+const POSTPROCESS_VERTEX = `#version 300 es+precision highp float;++layout(location = 0) in vec2 a_position;+layout(location = 1) in vec2 a_texCoord;++out vec2 v_texCoord;++void main() {+ v_texCoord = a_texCoord;+ gl_Position = vec4(a_position, 0.0, 1.0);+}+`;++var RenderStage;+(function (RenderStage) {+ RenderStage[RenderStage["Background"] = 0] = "Background";+ RenderStage[RenderStage["Opaque"] = 1] = "Opaque";+ RenderStage[RenderStage["Transparent"] = 2] = "Transparent";+ RenderStage[RenderStage["Overlay"] = 3] = "Overlay";+})(RenderStage || (RenderStage = {}));+let module$1 = null;+let viewProjectionPtr = 0;+function initRendererAPI(wasmModule) {+ module$1 = wasmModule;+ viewProjectionPtr = module$1._malloc(16 * 4);+}+function shutdownRendererAPI() {+ if (module$1 && viewProjectionPtr) {+ module$1._free(viewProjectionPtr);+ viewProjectionPtr = 0;+ }+ module$1 = null;+}+const Renderer = {+ init(width, height) {+ module$1?.renderer_init(width, height);+ },+ resize(width, height) {+ module$1?.renderer_resize(width, height);+ },+ begin(viewProjection, target) {+ if (!module$1 || !viewProjectionPtr)+ return;+ module$1.HEAPF32.set(viewProjection, viewProjectionPtr / 4);+ module$1.renderer_begin(viewProjectionPtr, target ?? 0);+ },+ end() {+ module$1?.renderer_end();+ },+ submitSprites(registry) {+ if (!module$1)+ return;+ module$1.renderer_submitSprites(registry._cpp);+ },+ submitSpine(registry) {+ if (!module$1)+ return;+ module$1.renderer_submitSpine(registry._cpp);+ },+ setStage(stage) {+ module$1?.renderer_setStage(stage);+ },+ createRenderTarget(width, height) {+ return module$1?.renderer_createTarget(width, height) ?? 0;+ },+ releaseRenderTarget(handle) {+ module$1?.renderer_releaseTarget(handle);+ },+ getTargetTexture(handle) {+ return module$1?.renderer_getTargetTexture(handle) ?? 0;+ },+ getStats() {+ if (!module$1) {+ return { drawCalls: 0, triangles: 0, sprites: 0, spine: 0, meshes: 0, culled: 0 };+ }+ return {+ drawCalls: module$1.renderer_getDrawCalls(),+ triangles: module$1.renderer_getTriangles(),+ sprites: module$1.renderer_getSprites(),+ spine: module$1.renderer_getSpine(),+ meshes: module$1.renderer_getMeshes(),+ culled: module$1.renderer_getCulled(),+ };+ },+};+/*** @file app.ts* @brief Application builder and web platform integration@@ -1292,6 +2318,11 @@ class App {}quit() {this.running_ = false;+ shutdownRendererAPI();+ shutdownPostProcessAPI();+ shutdownGeometryAPI();+ shutdownMaterialAPI();+ shutdownDrawAPI();}// =========================================================================// Internal@@ -1325,6 +2356,11 @@ function createWebApp(module, options) {else {module.initRenderer();}+ initDrawAPI(module);+ initMaterialAPI(module);+ initGeometryAPI(module);+ initPostProcessAPI(module);+ initRendererAPI(module);const getViewportSize = options?.getViewportSize ?? (() => ({width: window.innerWidth * (window.devicePixelRatio || 1),height: window.innerHeight * (window.devicePixelRatio || 1)@@ -2174,5 +3210,5 @@ function createSpineController(wasmModule) {// Initialize Web platformsetPlatform(webAdapter);-export { App, AssetPlugin, AssetServer, Assets, Camera, Canvas, Children, Commands, CommandsInstance, EntityCommands, INVALID_ENTITY, INVALID_TEXTURE, Input, LocalTransform, Mut, Parent, PreviewPlugin, Query, QueryInstance, Res, ResMut, Schedule, SpineAnimation, SpineController, Sprite, SystemRunner, Text, TextAlign, TextOverflow, TextPlugin, TextRenderer, TextVerticalAlign, Time, UIRect, Velocity, World, WorldTransform, assetPlugin, color, createSpineController, createWebApp, defineComponent, defineResource, defineSystem, defineTag, getPlatform, getPlatformType, isBuiltinComponent, isPlatformInitialized, isWeChat, isWeb, loadSceneData, loadSceneWithAssets, platformFetch, platformFileExists, platformInstantiateWasm, platformReadFile, platformReadTextFile, quat, textPlugin, updateCameraAspectRatio, vec2, vec3, vec4 };+export { App, AssetPlugin, AssetServer, Assets, BlendMode, Camera, Canvas, Children, Commands, CommandsInstance, DataType, Draw, EntityCommands, Geometry, INVALID_ENTITY, INVALID_TEXTURE, Input, LocalTransform, Material, Mut, Parent, PostProcess, PreviewPlugin, Query, QueryInstance, RenderStage, Renderer, Res, ResMut, Schedule, ShaderSources, SpineAnimation, SpineController, Sprite, SystemRunner, Text, TextAlign, TextOverflow, TextPlugin, TextRenderer, TextVerticalAlign, Time, UIRect, Velocity, World, WorldTransform, assetPlugin, color, createSpineController, createWebApp, defineComponent, defineResource, defineSystem, defineTag, getComponentDefaults, getPlatform, getPlatformType, initDrawAPI, initGeometryAPI, initMaterialAPI, initPostProcessAPI, initRendererAPI, isBuiltinComponent, isPlatformInitialized, isWeChat, isWeb, loadComponent, loadSceneData, loadSceneWithAssets, platformFetch, platformFileExists, platformInstantiateWasm, platformReadFile, platformReadTextFile, quat, shutdownDrawAPI, shutdownGeometryAPI, shutdownMaterialAPI, shutdownPostProcessAPI, shutdownRendererAPI, textPlugin, updateCameraAspectRatio, vec2, vec3, vec4 };//# sourceMappingURL=index.js.mapdiff --git a/desktop/public/sdk/esm/index.d.ts b/desktop/public/sdk/esm/index.d.tsnew file mode 100644index 000000000..de4ba80a4--- /dev/null+++ b/desktop/public/sdk/esm/index.d.ts@@ -0,0 +1,973 @@+/**+ * @file types.ts+ * @brief Core type definitions for ESEngine SDK+ */+type Entity = number;+declare const INVALID_ENTITY: Entity;+type TextureHandle = number;+declare const INVALID_TEXTURE: TextureHandle;+interface Vec2 {+ x: number;+ y: number;+}+interface Vec3 {+ x: number;+ y: number;+ z: number;+}+interface Vec4 {+ x: number;+ y: number;+ z: number;+ w: number;+}+interface Quat {+ w: number;+ x: number;+ y: number;+ z: number;+}+type Color = Vec4;+declare const vec2: (x?: number, y?: number) => Vec2;+declare const vec3: (x?: number, y?: number, z?: number) => Vec3;+declare const vec4: (x?: number, y?: number, z?: number, w?: number) => Vec4;+declare const color: (r?: number, g?: number, b?: number, a?: number) => Color;+declare const quat: (w?: number, x?: number, y?: number, z?: number) => Quat;++/**+ * @file component.ts+ * @brief Component definition and builtin components+ */++interface ComponentDef<T> {+ readonly _id: symbol;+ readonly _name: string;+ readonly _default: T;+ readonly _builtin: false;+ create(data?: Partial<T>): T;+}+declare function defineComponent<T extends object>(name: string, defaults: T): ComponentDef<T>;+declare function defineTag(name: string): ComponentDef<{}>;+interface BuiltinComponentDef<T> {+ readonly _id: symbol;+ readonly _name: string;+ readonly _cppName: string;+ readonly _builtin: true;+ readonly _default: T;+}+type AnyComponentDef = ComponentDef<any> | BuiltinComponentDef<any>;+declare function isBuiltinComponent(comp: AnyComponentDef): comp is BuiltinComponentDef<any>;+interface LocalTransformData {+ position: Vec3;+ rotation: Quat;+ scale: Vec3;+}+interface WorldTransformData {+ position: Vec3;+ rotation: Quat;+ scale: Vec3;+}+interface SpriteData {+ texture: number;+ color: Vec4;+ size: Vec2;+ uvOffset: Vec2;+ uvScale: Vec2;+ layer: number;+ flipX: boolean;+ flipY: boolean;+}+interface CameraData {+ projectionType: number;+ fov: number;+ orthoSize: number;+ nearPlane: number;+ farPlane: number;+ aspectRatio: number;+ isActive: boolean;+ priority: number;+}+interface CanvasData {+ designResolution: Vec2;+ pixelsPerUnit: number;+ scaleMode: number;+ matchWidthOrHeight: number;+ backgroundColor: Vec4;+}+interface VelocityData {+ linear: Vec3;+ angular: Vec3;+}+interface ParentData {+ entity: Entity;+}+interface ChildrenData {+ entities: Entity[];+}+interface SpineAnimationData {+ skeletonPath: string;+ atlasPath: string;+ skin: string;+ animation: string;+ timeScale: number;+ loop: boolean;+ playing: boolean;+ flipX: boolean;+ flipY: boolean;+ color: Vec4;+ layer: number;+ skeletonScale: number;+}+declare const LocalTransform: BuiltinComponentDef<LocalTransformData>;+declare const WorldTransform: BuiltinComponentDef<WorldTransformData>;+declare const Sprite: BuiltinComponentDef<SpriteData>;+declare const Camera: BuiltinComponentDef<CameraData>;+declare const Canvas: BuiltinComponentDef<CanvasData>;+declare const Velocity: BuiltinComponentDef<VelocityData>;+declare const Parent: BuiltinComponentDef<ParentData>;+declare const Children: BuiltinComponentDef<ChildrenData>;+declare const SpineAnimation: BuiltinComponentDef<SpineAnimationData>;+type ComponentData<C> = C extends BuiltinComponentDef<infer T> ? T : C extends ComponentDef<infer T> ? T : never;++/**+ * @file resource.ts+ * @brief Resource system for global singleton data+ */+interface ResourceDef<T> {+ readonly _id: symbol;+ readonly _name: string;+ readonly _default: T;+}+declare function defineResource<T>(defaultValue: T, name?: string): ResourceDef<T>;+interface ResDescriptor<T> {+ readonly _type: 'res';+ readonly _resource: ResourceDef<T>;+}+interface ResMutDescriptor<T> {+ readonly _type: 'res_mut';+ readonly _resource: ResourceDef<T>;+}+declare function Res<T>(resource: ResourceDef<T>): ResDescriptor<T>;+declare function ResMut<T>(resource: ResourceDef<T>): ResMutDescriptor<T>;+declare class ResMutInstance<T> {+ private value_;+ private readonly setter_;+ constructor(value: T, setter: (v: T) => void);+ get(): T;+ set(value: T): void;+ modify(fn: (value: T) => void): void;+}+declare class ResourceStorage {+ private resources_;+ insert<T>(resource: ResourceDef<T>, value: T): void;+ get<T>(resource: ResourceDef<T>): T;+ set<T>(resource: ResourceDef<T>, value: T): void;+ has<T>(resource: ResourceDef<T>): boolean;+ remove<T>(resource: ResourceDef<T>): void;+ getResMut<T>(resource: ResourceDef<T>): ResMutInstance<T>;+}+interface TimeData {+ delta: number;+ elapsed: number;+ frameCount: number;+}+declare const Time: ResourceDef<TimeData>;+interface InputState {+ keysDown: Set<string>;+ keysPressed: Set<string>;+ keysReleased: Set<string>;+ mouseX: number;+ mouseY: number;+ mouseButtons: Set<number>;+}+declare const Input: ResourceDef<InputState>;++/**+ * @file wasm.ts+ * @brief WASM module type definitions+ */++interface CppRegistry {+ create(): Entity;+ destroy(entity: Entity): void;+ valid(entity: Entity): boolean;+ delete(): void;+ addLocalTransform(entity: Entity, data: unknown): void;+ getLocalTransform(entity: Entity): unknown;+ hasLocalTransform(entity: Entity): boolean;+ removeLocalTransform(entity: Entity): void;+ addWorldTransform(entity: Entity, data: unknown): void;+ getWorldTransform(entity: Entity): unknown;+ hasWorldTransform(entity: Entity): boolean;+ removeWorldTransform(entity: Entity): void;+ addSprite(entity: Entity, data: unknown): void;+ getSprite(entity: Entity): unknown;+ hasSprite(entity: Entity): boolean;+ removeSprite(entity: Entity): void;+ addCamera(entity: Entity, data: unknown): void;+ getCamera(entity: Entity): unknown;+ hasCamera(entity: Entity): boolean;+ removeCamera(entity: Entity): void;+ addCanvas(entity: Entity, data: unknown): void;+ getCanvas(entity: Entity): unknown;+ hasCanvas(entity: Entity): boolean;+ removeCanvas(entity: Entity): void;+ addVelocity(entity: Entity, data: unknown): void;+ getVelocity(entity: Entity): unknown;+ hasVelocity(entity: Entity): boolean;+ removeVelocity(entity: Entity): void;+ addParent(entity: Entity, data: unknown): void;+ getParent(entity: Entity): unknown;+ hasParent(entity: Entity): boolean;+ removeParent(entity: Entity): void;+ addChildren(entity: Entity, data: unknown): void;+ getChildren(entity: Entity): unknown;+ hasChildren(entity: Entity): boolean;+ removeChildren(entity: Entity): void;+ addSpineAnimation(entity: Entity, data: unknown): void;+ getSpineAnimation(entity: Entity): unknown;+ hasSpineAnimation(entity: Entity): boolean;+ removeSpineAnimation(entity: Entity): void;+ setParent(child: Entity, parent: Entity): void;+ [key: string]: any;+}+interface CppResourceManager {+ createTexture(width: number, height: number, pixels: number, pixelsLen: number, format: number): number;+ createShader(vertSrc: string, fragSrc: string): number;+ releaseTexture(handle: number): void;+ releaseShader(handle: number): void;+ setTextureMetadata(handle: number, left: number, right: number, top: number, bottom: number): void;+ registerTextureWithPath(handle: number, path: string): void;+}+interface EmscriptenFS {+ writeFile(path: string, data: string | Uint8Array): void;+ readFile(path: string, opts?: {+ encoding?: string;+ }): string | Uint8Array;+ mkdir(path: string): void;+ mkdirTree(path: string): void;+ unlink(path: string): void;+ stat(path: string): {+ mode: number;+ size: number;+ };+ isFile(mode: number): boolean;+ isDir(mode: number): boolean;+ analyzePath(path: string): {+ exists: boolean;+ parentExists: boolean;+ };+}+interface SpineBounds {+ x: number;+ y: number;+ width: number;+ height: number;+ valid: boolean;+}+interface ESEngineModule {+ Registry: new () => CppRegistry;+ HEAPU8: Uint8Array;+ HEAPF32: Float32Array;+ FS: EmscriptenFS;+ initRenderer(): void;+ initRendererWithCanvas(canvasSelector: string): boolean;+ initRendererWithContext(contextHandle: number): boolean;+ shutdownRenderer(): void;+ GL: {+ registerContext(ctx: WebGLRenderingContext | WebGL2RenderingContext, options: {+ majorVersion: number;+ minorVersion: number;+ enableExtensionsByDefault?: boolean;+ }): number;+ };+ renderFrame(registry: CppRegistry, width: number, height: number): void;+ renderFrameWithMatrix(registry: CppRegistry, width: number, height: number, matrixPtr: number): void;+ getResourceManager(): CppResourceManager;+ getSpineBounds(registry: CppRegistry, entity: number): SpineBounds;+ _malloc(size: number): number;+ _free(ptr: number): void;+}++/**+ * @file world.ts+ * @brief ECS World with C++ Registry integration+ */++declare class World {+ private cppRegistry_;+ private entities_;+ private tsStorage_;+ connectCpp(cppRegistry: CppRegistry): void;+ get hasCpp(): boolean;+ spawn(): Entity;+ despawn(entity: Entity): void;+ valid(entity: Entity): boolean;+ entityCount(): number;+ getAllEntities(): Entity[];+ setParent(child: Entity, parent: Entity): void;+ insert(entity: Entity, component: AnyComponentDef, data?: unknown): unknown;+ get(entity: Entity, component: AnyComponentDef): unknown;+ has(entity: Entity, component: AnyComponentDef): boolean;+ remove(entity: Entity, component: AnyComponentDef): void;+ private insertBuiltin;+ private getBuiltin;+ private hasBuiltin;+ private removeBuiltin;+ private insertScript;+ private getScript;+ private hasScript;+ private removeScript;+ private getStorage;+ getEntitiesWithComponents(components: AnyComponentDef[]): Entity[];+}++/**+ * @file query.ts+ * @brief Component query system with mutable component support+ */++interface MutWrapper<T extends AnyComponentDef> {+ readonly _type: 'mut';+ readonly _component: T;+}+declare function Mut<T extends AnyComponentDef>(component: T): MutWrapper<T>;+type QueryArg$1 = AnyComponentDef | MutWrapper<AnyComponentDef>;+interface QueryDescriptor<C extends readonly QueryArg$1[]> {+ readonly _type: 'query';+ readonly _components: C;+ readonly _mutIndices: number[];+ readonly _with: AnyComponentDef[];+ readonly _without: AnyComponentDef[];+}+declare function Query<C extends QueryArg$1[]>(...components: C): QueryDescriptor<C>;+type UnwrapQueryArg<T> = T extends MutWrapper<infer C> ? C : T;+type ComponentsData<C extends readonly QueryArg$1[]> = {+ [K in keyof C]: ComponentData<UnwrapQueryArg<C[K]>>;+};+type QueryResult<C extends readonly QueryArg$1[]> = [+ Entity,+ ...ComponentsData<C>+];+declare class QueryInstance<C extends readonly QueryArg$1[]> implements Iterable<QueryResult<C>> {+ private readonly world_;+ private readonly descriptor_;+ private pendingMutations_;+ constructor(world: World, descriptor: QueryDescriptor<C>);+ private getActualComponent;+ private commitPending;+ [Symbol.iterator](): Iterator<QueryResult<C>>;+ forEach(callback: (entity: Entity, ...components: ComponentsData<C>) => void): void;+ single(): QueryResult<C> | null;+ isEmpty(): boolean;+ count(): number;+ toArray(): QueryResult<C>[];+}++/**+ * @file commands.ts+ * @brief Deferred entity/component operations+ */++interface CommandsDescriptor {+ readonly _type: 'commands';+}+declare function Commands(): CommandsDescriptor;+interface SpawnComponentEntry {+ component: AnyComponentDef;+ data: unknown;+}+declare class EntityCommands {+ private readonly commands_;+ private readonly entityRef_;+ private readonly components_;+ private isNew_;+ constructor(commands: CommandsInstance, entity: Entity | null);+ insert<T extends object>(component: AnyComponentDef, data?: Partial<T>): this;+ remove(component: AnyComponentDef): this;+ id(): Entity;+ private finalize;+}+declare class CommandsInstance {+ private readonly world_;+ private readonly resources_;+ private pending_;+ constructor(world: World, resources: ResourceStorage);+ spawn(): EntityCommands;+ entity(entity: Entity): EntityCommands;+ despawn(entity: Entity): this;+ insertResource<T>(resource: ResourceDef<T>, value: T): this;+ queueInsert(entity: Entity, component: AnyComponentDef, data: unknown): void;+ queueRemove(entity: Entity, component: AnyComponentDef): void;+ spawnImmediate(components: SpawnComponentEntry[], entityRef: {+ entity: Entity;+ }): void;+ flush(): void;+ private executeCommand;+}++/**+ * @file system.ts+ * @brief System definition and scheduling+ */++declare enum Schedule {+ Startup = 0,+ First = 1,+ PreUpdate = 2,+ Update = 3,+ PostUpdate = 4,+ Last = 5,+ FixedPreUpdate = 10,+ FixedUpdate = 11,+ FixedPostUpdate = 12+}+type QueryArg = AnyComponentDef | MutWrapper<AnyComponentDef>;+type SystemParam = QueryDescriptor<readonly QueryArg[]> | ResDescriptor<unknown> | ResMutDescriptor<unknown> | CommandsDescriptor;+type InferParam<P> = P extends QueryDescriptor<infer C> ? QueryInstance<C> : P extends ResDescriptor<infer T> ? T : P extends ResMutDescriptor<infer T> ? ResMutInstance<T> : P extends CommandsDescriptor ? CommandsInstance : never;+type InferParams<P extends readonly SystemParam[]> = {+ [K in keyof P]: InferParam<P[K]>;+};+interface SystemDef {+ readonly _id: symbol;+ readonly _params: readonly SystemParam[];+ readonly _fn: (...args: unknown[]) => void;+ readonly _name: string;+}+declare function defineSystem<P extends readonly SystemParam[]>(params: [...P], fn: (...args: InferParams<P>) => void, options?: {+ name?: string;+}): SystemDef;+declare class SystemRunner {+ private readonly world_;+ private readonly resources_;+ constructor(world: World, resources: ResourceStorage);+ run(system: SystemDef): void;+ private resolveParam;+}++/**+ * @file app.ts+ * @brief Application builder and web platform integration+ */++interface Plugin {+ build(app: App): void;+}+declare class App {+ private readonly world_;+ private readonly resources_;+ private readonly systems_;+ private runner_;+ private running_;+ private lastTime_;+ private module_;+ private constructor();+ static new(): App;+ addPlugin(plugin: Plugin): this;+ addSystemToSchedule(schedule: Schedule, system: SystemDef): this;+ addSystem(system: SystemDef): this;+ addStartupSystem(system: SystemDef): this;+ connectCpp(cppRegistry: CppRegistry, module?: ESEngineModule): this;+ get wasmModule(): ESEngineModule | null;+ get world(): World;+ insertResource<T>(resource: ResourceDef<T>, value: T): this;+ getResource<T>(resource: ResourceDef<T>): T;+ hasResource<T>(resource: ResourceDef<T>): boolean;+ run(): void;+ private mainLoop;+ quit(): void;+ private runSchedule;+ private updateTime;+}+interface WebAppOptions {+ getViewportSize?: () => {+ width: number;+ height: number;+ };+ glContextHandle?: number;+}+declare function createWebApp(module: ESEngineModule, options?: WebAppOptions): App;++declare enum TextAlign {+ Left = 0,+ Center = 1,+ Right = 2+}+declare enum TextVerticalAlign {+ Top = 0,+ Middle = 1,+ Bottom = 2+}+declare enum TextOverflow {+ Visible = 0,+ Clip = 1,+ Ellipsis = 2+}+interface TextData {+ content: string;+ fontFamily: string;+ fontSize: number;+ color: Vec4;+ align: TextAlign;+ verticalAlign: TextVerticalAlign;+ wordWrap: boolean;+ overflow: TextOverflow;+ lineHeight: number;+ dirty: boolean;+}+declare const Text: ComponentDef<TextData>;++interface UIRectData {+ size: Vec2;+ anchor: Vec2;+ pivot: Vec2;+}+declare const UIRect: ComponentDef<UIRectData>;++/**+ * @file TextRenderer.ts+ * @brief Renders text to GPU textures using Canvas 2D API+ */++interface TextRenderResult {+ textureHandle: number;+ width: number;+ height: number;+}+declare class TextRenderer {+ private canvas;+ private ctx;+ private module;+ private cache;+ constructor(module: ESEngineModule);+ /**+ * Renders text to a texture and returns the handle+ */+ renderText(text: TextData, uiRect?: UIRectData | null): TextRenderResult;+ private truncateWithEllipsis;+ /**+ * Renders text for an entity and caches the result+ */+ renderForEntity(entity: Entity, text: TextData, uiRect?: UIRectData | null): TextRenderResult;+ /**+ * Gets cached render result for entity+ */+ getCached(entity: Entity): TextRenderResult | undefined;+ /**+ * Releases texture for entity+ */+ release(entity: Entity): void;+ /**+ * Releases all cached textures+ */+ releaseAll(): void;+ private wrapText;+ private measureWidth;+ private mapAlign;+ private nextPowerOf2;+ private flipVertically;+}++/**+ * @file TextPlugin.ts+ * @brief Plugin that automatically syncs Text components to Sprite textures+ */++declare class TextPlugin implements Plugin {+ build(app: App): void;+}+declare const textPlugin: TextPlugin;++/**+ * @file AssetServer.ts+ * @brief Asset loading and caching system+ */++interface TextureInfo {+ handle: TextureHandle;+ width: number;+ height: number;+}+interface SliceBorder$1 {+ left: number;+ right: number;+ top: number;+ bottom: number;+}+declare class AssetServer {+ private module_;+ private cache_;+ private pending_;+ private canvas_;+ private ctx_;+ constructor(module: ESEngineModule);+ loadTexture(source: string): Promise<TextureInfo>;+ getTexture(source: string): TextureInfo | undefined;+ hasTexture(source: string): boolean;+ releaseTexture(source: string): void;+ releaseAll(): void;+ setTextureMetadata(handle: TextureHandle, border: SliceBorder$1): void;+ setTextureMetadataByPath(source: string, border: SliceBorder$1): boolean;+ private loadTextureInternal;+ private loadImage;+ private createTextureFromImage;+ private unpremultiplyAlpha;+ private flipVertically;+ private nextPowerOf2;+}++interface AssetsData {+ server: AssetServer;+}+declare const Assets: ResourceDef<AssetsData>;+declare class AssetPlugin implements Plugin {+ build(app: App): void;+}+declare const assetPlugin: AssetPlugin;++/**+ * @file scene.ts+ * @brief Scene loading utilities+ */++interface SceneEntityData {+ id: number;+ name: string;+ parent: number | null;+ children: number[];+ components: SceneComponentData[];+}+interface SceneComponentData {+ type: string;+ data: Record<string, unknown>;+}+interface SliceBorder {+ left: number;+ right: number;+ top: number;+ bottom: number;+}+interface TextureMetadata {+ version: string;+ type: 'texture';+ sliceBorder: SliceBorder;+}+interface SceneData {+ version: string;+ name: string;+ entities: SceneEntityData[];+ textureMetadata?: Record<string, TextureMetadata>;+}+interface SceneLoadOptions {+ assetServer?: AssetServer;+ assetBaseUrl?: string;+}+declare function loadSceneData(world: World, sceneData: SceneData): Map<number, Entity>;+declare function loadSceneWithAssets(world: World, sceneData: SceneData, options?: SceneLoadOptions): Promise<Map<number, Entity>>;+declare function updateCameraAspectRatio(world: World, aspectRatio: number): void;++/**+ * @file PreviewPlugin.ts+ * @brief Plugin for editor preview functionality+ */++declare class PreviewPlugin implements Plugin {+ private sceneUrl_;+ private app_;+ private loadPromise_;+ constructor(sceneUrl: string);+ build(app: App): void;+ /**+ * @brief Wait for scene loading to complete+ */+ waitForReady(): Promise<void>;+ private loadScene;+ private ensureCamera;+}++/**+ * @file types.ts+ * @brief Platform adapter interface definitions+ */+interface PlatformResponse {+ ok: boolean;+ status: number;+ statusText: string;+ headers: Record<string, string>;+ json<T = unknown>(): Promise<T>;+ text(): Promise<string>;+ arrayBuffer(): Promise<ArrayBuffer>;+}+interface PlatformRequestOptions {+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS';+ headers?: Record<string, string>;+ body?: string | ArrayBuffer;+ responseType?: 'text' | 'arraybuffer' | 'json';+ timeout?: number;+}+interface WasmInstantiateResult {+ instance: WebAssembly.Instance;+ module: WebAssembly.Module;+}+interface PlatformAdapter {+ /**+ * Platform name identifier+ */+ readonly name: 'web' | 'wechat';+ /**+ * Fetch resource from URL+ */+ fetch(url: string, options?: PlatformRequestOptions): Promise<PlatformResponse>;+ /**+ * Read local file as ArrayBuffer+ * @param path - File path (relative to game root)+ */+ readFile(path: string): Promise<ArrayBuffer>;+ /**+ * Read local file as text+ * @param path - File path (relative to game root)+ */+ readTextFile(path: string): Promise<string>;+ /**+ * Check if file exists+ * @param path - File path+ */+ fileExists(path: string): Promise<boolean>;+ /**+ * Instantiate WebAssembly module+ * @param pathOrBuffer - WASM file path (WeChat) or ArrayBuffer (Web)+ * @param imports - Import object+ */+ instantiateWasm(pathOrBuffer: string | ArrayBuffer, imports: WebAssembly.Imports): Promise<WasmInstantiateResult>;+}+type PlatformType = 'web' | 'wechat';++/**+ * Get the current platform adapter+ * @throws Error if platform not initialized+ */+declare function getPlatform(): PlatformAdapter;+/**+ * Check if platform is initialized+ */+declare function isPlatformInitialized(): boolean;+/**+ * Get platform type+ */+declare function getPlatformType(): 'web' | 'wechat' | null;+/**+ * Check if running on WeChat+ */+declare function isWeChat(): boolean;+/**+ * Check if running on Web+ */+declare function isWeb(): boolean;+declare function platformFetch(url: string, options?: PlatformRequestOptions): Promise<PlatformResponse>;+declare function platformReadFile(path: string): Promise<ArrayBuffer>;+declare function platformReadTextFile(path: string): Promise<string>;+declare function platformFileExists(path: string): Promise<boolean>;+declare function platformInstantiateWasm(pathOrBuffer: string | ArrayBuffer, imports: WebAssembly.Imports): Promise<WasmInstantiateResult>;++/**+ * @file spine.ts+ * @brief Spine animation control API+ */++/**+ * Spine event types+ */+type SpineEventType = 'start' | 'interrupt' | 'end' | 'complete' | 'dispose' | 'event';+/**+ * Spine event callback+ */+type SpineEventCallback = (event: SpineEvent) => void;+/**+ * Spine event data+ */+interface SpineEvent {+ type: SpineEventType;+ entity: Entity;+ track: number;+ animation: string | null;+ eventName?: string;+ intValue?: number;+ floatValue?: number;+ stringValue?: string;+}+/**+ * Track entry info for animation queries+ */+interface TrackEntryInfo {+ animation: string;+ track: number;+ loop: boolean;+ timeScale: number;+ trackTime: number;+ animationTime: number;+ duration: number;+ isComplete: boolean;+}+/**+ * Controller for Spine skeletal animations+ *+ * @example+ * ```typescript+ * const spine = new SpineController(wasmModule);+ *+ * // Play animation+ * spine.play(entity, 'run', true);+ *+ * // Queue next animation+ * spine.addAnimation(entity, 'idle', true, 0.2);+ *+ * // Change skin+ * spine.setSkin(entity, 'warrior');+ *+ * // Get bone position for effects+ * const pos = spine.getBonePosition(entity, 'weapon');+ * if (pos) {+ * spawnEffect(pos.x, pos.y);+ * }+ *+ * // Listen for events+ * spine.on(entity, 'event', (e) => {+ * if (e.eventName === 'footstep') {+ * playSound('footstep');+ * }+ * });+ * ```+ */+declare class SpineController {+ private module_;+ private listeners_;+ constructor(wasmModule: any);+ /**+ * Plays an animation, replacing any current animation on the track+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop the animation+ * @param track Animation track (default 0)+ * @returns True if animation was set+ */+ play(entity: Entity, animation: string, loop?: boolean, track?: number): boolean;+ /**+ * Adds an animation to the queue+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop+ * @param delay Delay before starting (seconds)+ * @param track Animation track (default 0)+ * @returns True if animation was queued+ */+ addAnimation(entity: Entity, animation: string, loop?: boolean, delay?: number, track?: number): boolean;+ /**+ * Sets an empty animation to mix out the current animation+ * @param entity Target entity+ * @param mixDuration Duration of the mix out+ * @param track Animation track (default 0)+ */+ setEmptyAnimation(entity: Entity, mixDuration?: number, track?: number): void;+ /**+ * Clears all animations on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ */+ clearTrack(entity: Entity, track?: number): void;+ /**+ * Clears all tracks+ * @param entity Target entity+ */+ clearTracks(entity: Entity): void;+ /**+ * Sets the current skin+ * @param entity Target entity+ * @param skinName Skin name+ * @returns True if skin was set+ */+ setSkin(entity: Entity, skinName: string): boolean;+ /**+ * Gets available skin names+ * @param entity Target entity+ * @returns Array of skin names+ */+ getSkins(entity: Entity): string[];+ /**+ * Gets available animation names+ * @param entity Target entity+ * @returns Array of animation names+ */+ getAnimations(entity: Entity): string[];+ /**+ * Gets the current animation on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Animation name or null+ */+ getCurrentAnimation(entity: Entity, track?: number): string | null;+ /**+ * Gets the duration of an animation+ * @param entity Target entity+ * @param animation Animation name+ * @returns Duration in seconds, or 0 if not found+ */+ getAnimationDuration(entity: Entity, animation: string): number;+ /**+ * Gets detailed track entry info+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Track entry info or null+ */+ getTrackEntry(entity: Entity, track?: number): TrackEntryInfo | null;+ /**+ * Gets world position of a bone+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Position or null if not found+ */+ getBonePosition(entity: Entity, boneName: string): Vec2 | null;+ /**+ * Gets world rotation of a bone in degrees+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Rotation in degrees or null+ */+ getBoneRotation(entity: Entity, boneName: string): number | null;+ /**+ * Sets the attachment for a slot+ * @param entity Target entity+ * @param slotName Slot name+ * @param attachmentName Attachment name (null to clear)+ */+ setAttachment(entity: Entity, slotName: string, attachmentName: string | null): void;+ /**+ * Registers an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ on(entity: Entity, type: SpineEventType, callback: SpineEventCallback): void;+ /**+ * Unregisters an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ off(entity: Entity, type: SpineEventType, callback: SpineEventCallback): void;+ /**+ * Removes all event listeners for an entity+ * @param entity Target entity+ */+ removeAllListeners(entity: Entity): void;+ private setupEventBridge;+ private dispatchEvent;+}+/**+ * Creates a SpineController instance+ * @param wasmModule The ESEngine WASM module+ * @returns SpineController instance+ */+declare function createSpineController(wasmModule: any): SpineController;++export { App, AssetPlugin, AssetServer, Assets, Camera, Canvas, Children, Commands, CommandsInstance, EntityCommands, INVALID_ENTITY, INVALID_TEXTURE, Input, LocalTransform, Mut, Parent, PreviewPlugin, Query, QueryInstance, Res, ResMut, ResMutInstance, Schedule, SpineAnimation, SpineController, Sprite, SystemRunner, Text, TextAlign, TextOverflow, TextPlugin, TextRenderer, TextVerticalAlign, Time, UIRect, Velocity, World, WorldTransform, assetPlugin, color, createSpineController, createWebApp, defineComponent, defineResource, defineSystem, defineTag, getPlatform, getPlatformType, isBuiltinComponent, isPlatformInitialized, isWeChat, isWeb, loadSceneData, loadSceneWithAssets, platformFetch, platformFileExists, platformInstantiateWasm, platformReadFile, platformReadTextFile, quat, textPlugin, updateCameraAspectRatio, vec2, vec3, vec4 };+export type { AnyComponentDef, AssetsData, BuiltinComponentDef, CameraData, CanvasData, ChildrenData, Color, CommandsDescriptor, ComponentData, ComponentDef, CppRegistry, CppResourceManager, ESEngineModule, Entity, InferParam, InferParams, InputState, LocalTransformData, MutWrapper, ParentData, PlatformAdapter, PlatformRequestOptions, PlatformResponse, PlatformType, Plugin, Quat, QueryDescriptor, QueryResult, ResDescriptor, ResMutDescriptor, ResourceDef, SceneComponentData, SceneData, SceneEntityData, SceneLoadOptions, SpineAnimationData, SpineEvent, SpineEventCallback, SpineEventType, SpriteData, SystemDef, SystemParam, TextData, TextRenderResult, TextureHandle, TextureInfo, TimeData, TrackEntryInfo, UIRectData, Vec2, Vec3, Vec4, VelocityData, WebAppOptions, WorldTransformData };diff --git a/desktop/public/sdk/esm/index.js b/desktop/public/sdk/esm/index.jsnew file mode 100644index 000000000..e73f58737--- /dev/null+++ b/desktop/public/sdk/esm/index.js@@ -0,0 +1,2033 @@+/**+ * @file base.ts+ * @brief Base platform adapter - no platform-specific code+ */+// =============================================================================+// Platform Instance (set by entry point)+// =============================================================================+let currentPlatform = null;+/**+ * Set the platform adapter (called by entry point)+ */+function setPlatform(adapter) {+ currentPlatform = adapter;+ console.log(`[ESEngine] Platform: ${adapter.name}`);+}+/**+ * Get the current platform adapter+ * @throws Error if platform not initialized+ */+function getPlatform() {+ if (!currentPlatform) {+ throw new Error('[ESEngine] Platform not initialized. ' ++ 'Import from "esengine" (web) or "esengine/wechat" (WeChat) instead of direct imports.');+ }+ return currentPlatform;+}+/**+ * Check if platform is initialized+ */+function isPlatformInitialized() {+ return currentPlatform !== null;+}+/**+ * Get platform type+ */+function getPlatformType() {+ return currentPlatform?.name ?? null;+}+/**+ * Check if running on WeChat+ */+function isWeChat() {+ return currentPlatform?.name === 'wechat';+}+/**+ * Check if running on Web+ */+function isWeb() {+ return currentPlatform?.name === 'web';+}+// =============================================================================+// Convenience Functions+// =============================================================================+async function platformFetch(url, options) {+ return getPlatform().fetch(url, options);+}+async function platformReadFile(path) {+ return getPlatform().readFile(path);+}+async function platformReadTextFile(path) {+ return getPlatform().readTextFile(path);+}+async function platformFileExists(path) {+ return getPlatform().fileExists(path);+}+async function platformInstantiateWasm(pathOrBuffer, imports) {+ return getPlatform().instantiateWasm(pathOrBuffer, imports);+}++/**+ * @file web.ts+ * @brief Web platform adapter implementation+ */+// =============================================================================+// Web Platform Adapter+// =============================================================================+class WebPlatformAdapter {+ constructor() {+ this.name = 'web';+ }+ async fetch(url, options) {+ const response = await globalThis.fetch(url, {+ method: options?.method ?? 'GET',+ headers: options?.headers,+ body: options?.body,+ });+ const headers = {};+ response.headers.forEach((value, key) => {+ headers[key] = value;+ });+ return {+ ok: response.ok,+ status: response.status,+ statusText: response.statusText,+ headers,+ json: () => response.json(),+ text: () => response.text(),+ arrayBuffer: () => response.arrayBuffer(),+ };+ }+ async readFile(path) {+ const response = await this.fetch(path);+ if (!response.ok) {+ throw new Error(`Failed to read file: ${path} (${response.status})`);+ }+ return response.arrayBuffer();+ }+ async readTextFile(path) {+ const response = await this.fetch(path);+ if (!response.ok) {+ throw new Error(`Failed to read file: ${path} (${response.status})`);+ }+ return response.text();+ }+ async fileExists(path) {+ try {+ const response = await globalThis.fetch(path, { method: 'HEAD' });+ return response.ok;+ }+ catch {+ return false;+ }+ }+ async instantiateWasm(pathOrBuffer, imports) {+ let buffer;+ if (typeof pathOrBuffer === 'string') {+ buffer = await this.readFile(pathOrBuffer);+ }+ else {+ buffer = pathOrBuffer;+ }+ const result = await WebAssembly.instantiate(buffer, imports);+ return {+ instance: result.instance,+ module: result.module,+ };+ }+}+// =============================================================================+// Export Singleton+// =============================================================================+const webAdapter = new WebPlatformAdapter();++/**+ * @file types.ts+ * @brief Core type definitions for ESEngine SDK+ */+const INVALID_ENTITY = 0;+const INVALID_TEXTURE = 0xFFFFFFFF;+// =============================================================================+// Factory Functions+// =============================================================================+const vec2 = (x = 0, y = 0) => ({ x, y });+const vec3 = (x = 0, y = 0, z = 0) => ({ x, y, z });+const vec4 = (x = 0, y = 0, z = 0, w = 1) => ({ x, y, z, w });+const color = (r = 1, g = 1, b = 1, a = 1) => ({ x: r, y: g, z: b, w: a });+const quat = (w = 1, x = 0, y = 0, z = 0) => ({ w, x, y, z });++/**+ * @file component.ts+ * @brief Component definition and builtin components+ */+let componentCounter = 0;+function createComponentDef(name, defaults) {+ const id = ++componentCounter;+ return {+ _id: Symbol(`Component_${id}_${name}`),+ _name: name,+ _default: defaults,+ _builtin: false,+ create(data) {+ return { ...defaults, ...data };+ }+ };+}+function defineComponent(name, defaults) {+ const def = createComponentDef(name, defaults);+ registerToEditor(name, defaults, false);+ return def;+}+function defineTag(name) {+ const def = createComponentDef(name, {});+ registerToEditor(name, {}, true);+ return def;+}+function registerToEditor(name, defaults, isTag) {+ if (typeof window !== 'undefined' && window.__esengine_registerComponent) {+ window.__esengine_registerComponent(name, defaults, isTag);+ }+}+function defineBuiltin(name, defaults) {+ return {+ _id: Symbol(`Builtin_${name}`),+ _name: name,+ _cppName: name,+ _builtin: true,+ _default: defaults+ };+}+function isBuiltinComponent(comp) {+ return comp._builtin === true;+}+// =============================================================================+// Builtin Component Instances+// =============================================================================+const LocalTransform = defineBuiltin('LocalTransform', {+ position: { x: 0, y: 0, z: 0 },+ rotation: { w: 1, x: 0, y: 0, z: 0 },+ scale: { x: 1, y: 1, z: 1 }+});+const WorldTransform = defineBuiltin('WorldTransform', {+ position: { x: 0, y: 0, z: 0 },+ rotation: { w: 1, x: 0, y: 0, z: 0 },+ scale: { x: 1, y: 1, z: 1 }+});+const Sprite = defineBuiltin('Sprite', {+ texture: 0,+ color: { x: 1, y: 1, z: 1, w: 1 },+ size: { x: 32, y: 32 },+ uvOffset: { x: 0, y: 0 },+ uvScale: { x: 1, y: 1 },+ layer: 0,+ flipX: false,+ flipY: false+});+const Camera = defineBuiltin('Camera', {+ projectionType: 0,+ fov: 60,+ orthoSize: 5,+ nearPlane: 0.1,+ farPlane: 1000,+ aspectRatio: 1.77,+ isActive: true,+ priority: 0+});+const Canvas = defineBuiltin('Canvas', {+ designResolution: { x: 1920, y: 1080 },+ pixelsPerUnit: 100,+ scaleMode: 0,+ matchWidthOrHeight: 0.5,+ backgroundColor: { x: 0, y: 0, z: 0, w: 1 }+});+const Velocity = defineBuiltin('Velocity', {+ linear: { x: 0, y: 0, z: 0 },+ angular: { x: 0, y: 0, z: 0 }+});+const Parent = defineBuiltin('Parent', {+ entity: 0+});+const Children = defineBuiltin('Children', {+ entities: []+});+const SpineAnimation = defineBuiltin('SpineAnimation', {+ skeletonPath: '',+ atlasPath: '',+ skin: '',+ animation: '',+ timeScale: 1.0,+ loop: true,+ playing: true,+ flipX: false,+ flipY: false,+ color: { x: 1, y: 1, z: 1, w: 1 },+ layer: 0,+ skeletonScale: 1.0+});++/**+ * @file resource.ts+ * @brief Resource system for global singleton data+ */+let resourceCounter = 0;+function defineResource(defaultValue, name) {+ const id = ++resourceCounter;+ return {+ _id: Symbol(`Resource_${id}_${name ?? ''}`),+ _name: name ?? `Resource_${id}`,+ _default: defaultValue+ };+}+function Res(resource) {+ return { _type: 'res', _resource: resource };+}+function ResMut(resource) {+ return { _type: 'res_mut', _resource: resource };+}+// =============================================================================+// Resource Instances (Runtime)+// =============================================================================+class ResMutInstance {+ constructor(value, setter) {+ this.value_ = value;+ this.setter_ = setter;+ }+ get() {+ return this.value_;+ }+ set(value) {+ this.value_ = value;+ this.setter_(value);+ }+ modify(fn) {+ fn(this.value_);+ this.setter_(this.value_);+ }+}+// =============================================================================+// Resource Storage+// =============================================================================+class ResourceStorage {+ constructor() {+ this.resources_ = new Map();+ }+ insert(resource, value) {+ this.resources_.set(resource._id, value);+ }+ get(resource) {+ if (!this.resources_.has(resource._id)) {+ this.resources_.set(resource._id, resource._default);+ }+ return this.resources_.get(resource._id);+ }+ set(resource, value) {+ this.resources_.set(resource._id, value);+ }+ has(resource) {+ return this.resources_.has(resource._id);+ }+ remove(resource) {+ this.resources_.delete(resource._id);+ }+ getResMut(resource) {+ return new ResMutInstance(this.get(resource), (v) => this.set(resource, v));+ }+}+const Time = defineResource({+ delta: 0,+ elapsed: 0,+ frameCount: 0+}, 'Time');+const Input = defineResource({+ keysDown: new Set(),+ keysPressed: new Set(),+ keysReleased: new Set(),+ mouseX: 0,+ mouseY: 0,+ mouseButtons: new Set()+}, 'Input');++/**+ * @file query.ts+ * @brief Component query system with mutable component support+ */+function Mut(component) {+ return { _type: 'mut', _component: component };+}+function isMutWrapper(value) {+ return typeof value === 'object' && value !== null && value._type === 'mut';+}+function createQueryDescriptor(components, withFilters = [], withoutFilters = []) {+ const mutIndices = [];+ components.forEach((comp, i) => {+ if (isMutWrapper(comp)) {+ mutIndices.push(i);+ }+ });+ return {+ _type: 'query',+ _components: components,+ _mutIndices: mutIndices,+ _with: withFilters,+ _without: withoutFilters+ };+}+// =============================================================================+// Query Factory+// =============================================================================+function Query(...components) {+ return createQueryDescriptor(components);+}+class QueryInstance {+ constructor(world, descriptor) {+ this.pendingMutations_ = [];+ this.world_ = world;+ this.descriptor_ = descriptor;+ }+ getActualComponent(arg) {+ return isMutWrapper(arg) ? arg._component : arg;+ }+ commitPending() {+ for (const mutation of this.pendingMutations_) {+ this.world_.insert(mutation.entity, mutation.component, mutation.data);+ }+ this.pendingMutations_ = [];+ }+ *[Symbol.iterator]() {+ const { _components, _mutIndices, _with, _without } = this.descriptor_;+ const actualComponents = _components.map(c => this.getActualComponent(c));+ const allRequired = [...actualComponents, ..._with];+ const entities = this.world_.getEntitiesWithComponents(allRequired);+ let prevEntity = null;+ let prevMutData = [];+ try {+ for (const entity of entities) {+ // Commit previous entity's mutations before moving to next+ if (prevEntity !== null) {+ for (const mut of prevMutData) {+ this.world_.insert(prevEntity, mut.component, mut.data);+ }+ }+ prevMutData = [];+ let excluded = false;+ for (const comp of _without) {+ if (this.world_.has(entity, comp)) {+ excluded = true;+ break;+ }+ }+ if (excluded)+ continue;+ const components = actualComponents.map(comp => this.world_.get(entity, comp));+ // Track mutable components for write-back+ for (const idx of _mutIndices) {+ prevMutData.push({+ component: actualComponents[idx],+ data: components[idx]+ });+ }+ prevEntity = entity;+ yield [entity, ...components];+ }+ }+ finally {+ // Commit last entity's mutations+ if (prevEntity !== null) {+ for (const mut of prevMutData) {+ this.world_.insert(prevEntity, mut.component, mut.data);+ }+ }+ }+ }+ forEach(callback) {+ for (const [entity, ...components] of this) {+ callback(entity, ...components);+ }+ }+ single() {+ for (const result of this) {+ return result;+ }+ return null;+ }+ isEmpty() {+ return this.single() === null;+ }+ count() {+ let n = 0;+ for (const _ of this) {+ n++;+ }+ return n;+ }+ toArray() {+ return [...this];+ }+}++/**+ * @file commands.ts+ * @brief Deferred entity/component operations+ */+function Commands() {+ return { _type: 'commands' };+}+// =============================================================================+// Entity Commands (Builder for spawning)+// =============================================================================+class EntityCommands {+ constructor(commands, entity) {+ this.components_ = [];+ this.commands_ = commands;+ if (entity === null) {+ this.entityRef_ = { entity: 0 };+ this.isNew_ = true;+ }+ else {+ this.entityRef_ = { entity };+ this.isNew_ = false;+ }+ }+ insert(component, data) {+ let instance;+ if (isBuiltinComponent(component)) {+ instance = { ...component._default, ...data };+ }+ else {+ instance = component.create(data);+ }+ if (this.isNew_) {+ this.components_.push({ component, data: instance });+ }+ else {+ this.commands_.queueInsert(this.entityRef_.entity, component, instance);+ }+ return this;+ }+ remove(component) {+ if (!this.isNew_) {+ this.commands_.queueRemove(this.entityRef_.entity, component);+ }+ return this;+ }+ id() {+ if (this.isNew_ && this.entityRef_.entity === 0) {+ this.finalize();+ }+ return this.entityRef_.entity;+ }+ finalize() {+ if (this.isNew_) {+ this.commands_.spawnImmediate(this.components_, this.entityRef_);+ this.isNew_ = false;+ }+ }+}+// =============================================================================+// Commands Instance (Runtime)+// =============================================================================+class CommandsInstance {+ constructor(world, resources) {+ this.pending_ = [];+ this.world_ = world;+ this.resources_ = resources;+ }+ spawn() {+ return new EntityCommands(this, null);+ }+ entity(entity) {+ return new EntityCommands(this, entity);+ }+ despawn(entity) {+ this.pending_.push({ type: 'despawn', entity });+ return this;+ }+ insertResource(resource, value) {+ this.pending_.push({+ type: 'insert_resource',+ resource: resource,+ value+ });+ return this;+ }+ queueInsert(entity, component, data) {+ this.pending_.push({ type: 'insert', entity, component, data });+ }+ queueRemove(entity, component) {+ this.pending_.push({ type: 'remove', entity, component });+ }+ spawnImmediate(components, entityRef) {+ const entity = this.world_.spawn();+ entityRef.entity = entity;+ for (const entry of components) {+ this.world_.insert(entity, entry.component, entry.data);+ }+ }+ flush() {+ for (const cmd of this.pending_) {+ this.executeCommand(cmd);+ }+ this.pending_ = [];+ }+ executeCommand(cmd) {+ switch (cmd.type) {+ case 'spawn': {+ const entity = this.world_.spawn();+ cmd.entityRef.entity = entity;+ for (const entry of cmd.components) {+ this.world_.insert(entity, entry.component, entry.data);+ }+ break;+ }+ case 'despawn':+ this.world_.despawn(cmd.entity);+ break;+ case 'insert':+ this.world_.insert(cmd.entity, cmd.component, cmd.data);+ break;+ case 'remove':+ this.world_.remove(cmd.entity, cmd.component);+ break;+ case 'insert_resource':+ this.resources_.insert(cmd.resource, cmd.value);+ break;+ }+ }+}++/**+ * @file system.ts+ * @brief System definition and scheduling+ */+// =============================================================================+// Schedule Phases+// =============================================================================+var Schedule;+(function (Schedule) {+ Schedule[Schedule["Startup"] = 0] = "Startup";+ Schedule[Schedule["First"] = 1] = "First";+ Schedule[Schedule["PreUpdate"] = 2] = "PreUpdate";+ Schedule[Schedule["Update"] = 3] = "Update";+ Schedule[Schedule["PostUpdate"] = 4] = "PostUpdate";+ Schedule[Schedule["Last"] = 5] = "Last";+ Schedule[Schedule["FixedPreUpdate"] = 10] = "FixedPreUpdate";+ Schedule[Schedule["FixedUpdate"] = 11] = "FixedUpdate";+ Schedule[Schedule["FixedPostUpdate"] = 12] = "FixedPostUpdate";+})(Schedule || (Schedule = {}));+let systemCounter = 0;+function defineSystem(params, fn, options) {+ const id = ++systemCounter;+ return {+ _id: Symbol(`System_${id}_${options?.name ?? ''}`),+ _params: params,+ _fn: fn,+ _name: options?.name ?? `System_${id}`+ };+}+// =============================================================================+// System Runner+// =============================================================================+class SystemRunner {+ constructor(world, resources) {+ this.world_ = world;+ this.resources_ = resources;+ }+ run(system) {+ const args = system._params.map(param => this.resolveParam(param));+ system._fn(...args);+ for (const arg of args) {+ if (arg instanceof CommandsInstance) {+ arg.flush();+ }+ }+ }+ resolveParam(param) {+ switch (param._type) {+ case 'query':+ return new QueryInstance(this.world_, param);+ case 'res':+ return this.resources_.get(param._resource);+ case 'res_mut':+ return this.resources_.getResMut(param._resource);+ case 'commands':+ return new CommandsInstance(this.world_, this.resources_);+ default:+ throw new Error('Unknown system parameter type');+ }+ }+}++/**+ * @file world.ts+ * @brief ECS World with C++ Registry integration+ */+// =============================================================================+// World+// =============================================================================+class World {+ constructor() {+ this.cppRegistry_ = null;+ this.entities_ = new Set();+ this.tsStorage_ = new Map();+ }+ connectCpp(cppRegistry) {+ this.cppRegistry_ = cppRegistry;+ }+ get hasCpp() {+ return this.cppRegistry_ !== null;+ }+ // =========================================================================+ // Entity Management+ // =========================================================================+ spawn() {+ let entity;+ if (this.cppRegistry_) {+ entity = this.cppRegistry_.create();+ }+ else {+ entity = (this.entities_.size + 1);+ }+ this.entities_.add(entity);+ return entity;+ }+ despawn(entity) {+ if (this.cppRegistry_) {+ this.cppRegistry_.destroy(entity);+ }+ this.entities_.delete(entity);+ for (const storage of this.tsStorage_.values()) {+ storage.delete(entity);+ }+ }+ valid(entity) {+ if (this.cppRegistry_) {+ return this.cppRegistry_.valid(entity);+ }+ return this.entities_.has(entity);+ }+ entityCount() {+ return this.entities_.size;+ }+ getAllEntities() {+ return Array.from(this.entities_);+ }+ setParent(child, parent) {+ if (this.cppRegistry_) {+ this.cppRegistry_.setParent(child, parent);+ }+ }+ // =========================================================================+ // Component Management+ // =========================================================================+ insert(entity, component, data) {+ if (isBuiltinComponent(component)) {+ return this.insertBuiltin(entity, component, data);+ }+ return this.insertScript(entity, component, data);+ }+ get(entity, component) {+ if (isBuiltinComponent(component)) {+ return this.getBuiltin(entity, component);+ }+ return this.getScript(entity, component);+ }+ has(entity, component) {+ if (isBuiltinComponent(component)) {+ return this.hasBuiltin(entity, component);+ }+ return this.hasScript(entity, component);+ }+ remove(entity, component) {+ if (isBuiltinComponent(component)) {+ this.removeBuiltin(entity, component);+ }+ else {+ this.removeScript(entity, component);+ }+ }+ // =========================================================================+ // Builtin Component Operations (C++ Registry)+ // =========================================================================+ insertBuiltin(entity, component, data) {+ const merged = { ...component._default, ...data };+ if (this.cppRegistry_) {+ const adder = `add${component._cppName}`;+ const fn = this.cppRegistry_[adder];+ fn.call(this.cppRegistry_, entity, merged);+ }+ return merged;+ }+ getBuiltin(entity, component) {+ if (!this.cppRegistry_) {+ throw new Error('C++ Registry not connected');+ }+ const getter = `get${component._cppName}`;+ const fn = this.cppRegistry_[getter];+ return fn.call(this.cppRegistry_, entity);+ }+ hasBuiltin(entity, component) {+ if (!this.cppRegistry_) {+ return false;+ }+ const checker = `has${component._cppName}`;+ const fn = this.cppRegistry_[checker];+ return fn.call(this.cppRegistry_, entity);+ }+ removeBuiltin(entity, component) {+ if (!this.cppRegistry_) {+ return;+ }+ const remover = `remove${component._cppName}`;+ const fn = this.cppRegistry_[remover];+ fn.call(this.cppRegistry_, entity);+ }+ // =========================================================================+ // Script Component Operations (TypeScript storage)+ // =========================================================================+ insertScript(entity, component, data) {+ const value = component.create(data);+ this.getStorage(component).set(entity, value);+ return value;+ }+ getScript(entity, component) {+ const storage = this.tsStorage_.get(component._id);+ if (!storage) {+ throw new Error(`Component not found: ${component._name}`);+ }+ return storage.get(entity);+ }+ hasScript(entity, component) {+ const storage = this.tsStorage_.get(component._id);+ return storage?.has(entity) ?? false;+ }+ removeScript(entity, component) {+ const storage = this.tsStorage_.get(component._id);+ storage?.delete(entity);+ }+ getStorage(component) {+ let storage = this.tsStorage_.get(component._id);+ if (!storage) {+ storage = new Map();+ this.tsStorage_.set(component._id, storage);+ }+ return storage;+ }+ // =========================================================================+ // Query Support+ // =========================================================================+ getEntitiesWithComponents(components) {+ if (components.length === 0) {+ return this.getAllEntities();+ }+ const entities = [];+ for (const entity of this.entities_) {+ let hasAll = true;+ for (const comp of components) {+ if (!this.has(entity, comp)) {+ hasAll = false;+ break;+ }+ }+ if (hasAll) {+ entities.push(entity);+ }+ }+ return entities;+ }+}++/**+ * @file text.ts+ * @brief Text component definition for UI text rendering+ */+// =============================================================================+// Text Alignment Enums+// =============================================================================+var TextAlign;+(function (TextAlign) {+ TextAlign[TextAlign["Left"] = 0] = "Left";+ TextAlign[TextAlign["Center"] = 1] = "Center";+ TextAlign[TextAlign["Right"] = 2] = "Right";+})(TextAlign || (TextAlign = {}));+var TextVerticalAlign;+(function (TextVerticalAlign) {+ TextVerticalAlign[TextVerticalAlign["Top"] = 0] = "Top";+ TextVerticalAlign[TextVerticalAlign["Middle"] = 1] = "Middle";+ TextVerticalAlign[TextVerticalAlign["Bottom"] = 2] = "Bottom";+})(TextVerticalAlign || (TextVerticalAlign = {}));+var TextOverflow;+(function (TextOverflow) {+ TextOverflow[TextOverflow["Visible"] = 0] = "Visible";+ TextOverflow[TextOverflow["Clip"] = 1] = "Clip";+ TextOverflow[TextOverflow["Ellipsis"] = 2] = "Ellipsis";+})(TextOverflow || (TextOverflow = {}));+// =============================================================================+// Text Component Definition+// =============================================================================+const Text = defineComponent('Text', {+ content: '',+ fontFamily: 'Arial',+ fontSize: 24,+ color: { x: 1, y: 1, z: 1, w: 1 },+ align: TextAlign.Left,+ verticalAlign: TextVerticalAlign.Top,+ wordWrap: true,+ overflow: TextOverflow.Visible,+ lineHeight: 1.2,+ dirty: true,+});++/**+ * @file TextRenderer.ts+ * @brief Renders text to GPU textures using Canvas 2D API+ */+// =============================================================================+// Text Renderer+// =============================================================================+class TextRenderer {+ constructor(module) {+ this.cache = new Map();+ this.module = module;+ if (typeof OffscreenCanvas !== 'undefined') {+ this.canvas = new OffscreenCanvas(512, 512);+ this.ctx = this.canvas.getContext('2d', { willReadFrequently: true });+ }+ else {+ this.canvas = document.createElement('canvas');+ this.canvas.width = 512;+ this.canvas.height = 512;+ this.ctx = this.canvas.getContext('2d', { willReadFrequently: true });+ }+ }+ /**+ * Renders text to a texture and returns the handle+ */+ renderText(text, uiRect) {+ const ctx = this.ctx;+ const canvas = this.canvas;+ ctx.font = `${text.fontSize}px ${text.fontFamily}`;+ const hasContainer = uiRect && uiRect.size.x > 0 && uiRect.size.y > 0;+ const containerWidth = hasContainer ? uiRect.size.x : 0;+ const containerHeight = hasContainer ? uiRect.size.y : 0;+ const shouldWrap = text.wordWrap && hasContainer;+ let lines = this.wrapText(text.content, shouldWrap ? containerWidth : 0);+ const lineHeightPx = Math.ceil(text.fontSize * text.lineHeight);+ const padding = Math.ceil(text.fontSize * 0.2);+ const measuredWidth = Math.ceil(this.measureWidth(lines));+ const measuredHeight = Math.ceil(lines.length * lineHeightPx);+ const width = hasContainer ? Math.ceil(containerWidth) : measuredWidth + padding * 2;+ const height = hasContainer ? Math.ceil(containerHeight) : measuredHeight + padding * 2;+ // Handle overflow ellipsis+ if (hasContainer && text.overflow === TextOverflow.Ellipsis && measuredHeight > containerHeight) {+ const maxLines = Math.floor(containerHeight / lineHeightPx);+ if (maxLines > 0 && lines.length > maxLines) {+ lines = lines.slice(0, maxLines);+ const lastLine = lines[maxLines - 1];+ lines[maxLines - 1] = this.truncateWithEllipsis(lastLine, containerWidth);+ }+ }+ if (canvas.width < width || canvas.height < height) {+ const newWidth = Math.max(canvas.width, this.nextPowerOf2(width));+ const newHeight = Math.max(canvas.height, this.nextPowerOf2(height));+ canvas.width = newWidth;+ canvas.height = newHeight;+ }+ const r = Math.round(text.color.x * 255);+ const g = Math.round(text.color.y * 255);+ const b = Math.round(text.color.z * 255);+ const a = text.color.w;+ ctx.clearRect(0, 0, canvas.width, canvas.height);+ ctx.font = `${text.fontSize}px ${text.fontFamily}`;+ ctx.textAlign = this.mapAlign(text.align);+ ctx.textBaseline = 'top';+ ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${a})`;+ // Handle overflow clip+ if (hasContainer && text.overflow === TextOverflow.Clip) {+ ctx.save();+ ctx.beginPath();+ ctx.rect(0, 0, width, height);+ ctx.clip();+ }+ const textBlockHeight = lines.length * lineHeightPx;+ let startY;+ if (hasContainer) {+ switch (text.verticalAlign) {+ case TextVerticalAlign.Top:+ startY = padding;+ break;+ case TextVerticalAlign.Middle:+ startY = (height - textBlockHeight) / 2;+ break;+ case TextVerticalAlign.Bottom:+ startY = height - textBlockHeight - padding;+ break;+ default: startY = padding;+ }+ }+ else {+ startY = padding;+ }+ let y = startY;+ for (const line of lines) {+ let x;+ switch (text.align) {+ case TextAlign.Left:+ x = padding;+ break;+ case TextAlign.Center:+ x = width / 2;+ break;+ case TextAlign.Right:+ x = width - padding;+ break;+ default:+ x = padding;+ }+ ctx.fillText(line, x, y);+ y += lineHeightPx;+ }+ if (hasContainer && text.overflow === TextOverflow.Clip) {+ ctx.restore();+ }+ const imageData = ctx.getImageData(0, 0, width, height);+ const pixels = new Uint8Array(imageData.data.buffer);+ const flipped = this.flipVertically(pixels, width, height);+ const rm = this.module.getResourceManager();+ const ptr = this.module._malloc(flipped.length);+ this.module.HEAPU8.set(flipped, ptr);+ const textureHandle = rm.createTexture(width, height, ptr, flipped.length, 1);+ this.module._free(ptr);+ return { textureHandle, width, height };+ }+ truncateWithEllipsis(text, maxWidth) {+ const ellipsis = '...';+ if (this.ctx.measureText(text).width <= maxWidth) {+ return text;+ }+ let truncated = text;+ while (truncated.length > 0 && this.ctx.measureText(truncated + ellipsis).width > maxWidth) {+ truncated = truncated.slice(0, -1);+ }+ return truncated + ellipsis;+ }+ /**+ * Renders text for an entity and caches the result+ */+ renderForEntity(entity, text, uiRect) {+ const existing = this.cache.get(entity);+ if (existing) {+ const rm = this.module.getResourceManager();+ rm.releaseTexture(existing.textureHandle);+ }+ const result = this.renderText(text, uiRect);+ this.cache.set(entity, result);+ return result;+ }+ /**+ * Gets cached render result for entity+ */+ getCached(entity) {+ return this.cache.get(entity);+ }+ /**+ * Releases texture for entity+ */+ release(entity) {+ const cached = this.cache.get(entity);+ if (cached) {+ const rm = this.module.getResourceManager();+ rm.releaseTexture(cached.textureHandle);+ this.cache.delete(entity);+ }+ }+ /**+ * Releases all cached textures+ */+ releaseAll() {+ const rm = this.module.getResourceManager();+ for (const result of this.cache.values()) {+ rm.releaseTexture(result.textureHandle);+ }+ this.cache.clear();+ }+ // =========================================================================+ // Private Methods+ // =========================================================================+ wrapText(text, maxWidth) {+ if (!text)+ return [''];+ if (maxWidth <= 0)+ return text.split('\n');+ const paragraphs = text.split('\n');+ const lines = [];+ for (const paragraph of paragraphs) {+ if (!paragraph) {+ lines.push('');+ continue;+ }+ let currentLine = '';+ for (const char of paragraph) {+ const testLine = currentLine + char;+ const metrics = this.ctx.measureText(testLine);+ if (metrics.width > maxWidth && currentLine) {+ lines.push(currentLine);+ currentLine = char;+ }+ else {+ currentLine = testLine;+ }+ }+ if (currentLine) {+ lines.push(currentLine);+ }+ }+ return lines.length > 0 ? lines : [''];+ }+ measureWidth(lines) {+ let maxWidth = 0;+ for (const line of lines) {+ const metrics = this.ctx.measureText(line);+ const width = metrics.actualBoundingBoxLeft !== undefined+ ? metrics.actualBoundingBoxLeft + metrics.actualBoundingBoxRight+ : metrics.width;+ maxWidth = Math.max(maxWidth, width);+ }+ return maxWidth;+ }+ mapAlign(align) {+ switch (align) {+ case TextAlign.Left:+ return 'left';+ case TextAlign.Center:+ return 'center';+ case TextAlign.Right:+ return 'right';+ }+ }+ nextPowerOf2(n) {+ let p = 1;+ while (p < n)+ p *= 2;+ return p;+ }+ flipVertically(pixels, width, height) {+ const rowSize = width * 4;+ const flipped = new Uint8Array(pixels.length);+ for (let y = 0; y < height; y++) {+ const srcOffset = y * rowSize;+ const dstOffset = (height - 1 - y) * rowSize;+ flipped.set(pixels.subarray(srcOffset, srcOffset + rowSize), dstOffset);+ }+ return flipped;+ }+}++/**+ * @file UIRect.ts+ * @brief UIRect component for UI layout with anchor and pivot+ */+// =============================================================================+// UIRect Component Definition+// =============================================================================+const UIRect = defineComponent('UIRect', {+ size: { x: 100, y: 100 },+ anchor: { x: 0.5, y: 0.5 },+ pivot: { x: 0.5, y: 0.5 },+});++/**+ * @file TextPlugin.ts+ * @brief Plugin that automatically syncs Text components to Sprite textures+ */+// =============================================================================+// Text Plugin+// =============================================================================+class TextPlugin {+ build(app) {+ const module = app.wasmModule;+ if (!module) {+ console.warn('TextPlugin: No WASM module available');+ return;+ }+ const renderer = new TextRenderer(module);+ const world = app.world;+ app.addSystemToSchedule(Schedule.PreUpdate, defineSystem([], () => {+ const entities = world.getEntitiesWithComponents([Text]);+ for (const entity of entities) {+ const text = world.get(entity, Text);+ if (!text.dirty)+ continue;+ if (!world.has(entity, Sprite)) {+ world.insert(entity, Sprite, {+ texture: 0,+ size: { x: 0, y: 0 },+ color: { x: 1, y: 1, z: 1, w: 1 },+ anchor: { x: 0.5, y: 0.5 },+ flip: { x: false, y: false }+ });+ }+ const uiRect = world.has(entity, UIRect)+ ? world.get(entity, UIRect)+ : null;+ const result = renderer.renderForEntity(entity, text, uiRect);+ const sprite = world.get(entity, Sprite);+ sprite.texture = result.textureHandle;+ sprite.size = { x: result.width, y: result.height };+ sprite.uvOffset = { x: 0, y: 0 };+ sprite.uvScale = { x: 1, y: 1 };+ world.insert(entity, Sprite, sprite);+ text.dirty = false;+ }+ }));+ }+}+const textPlugin = new TextPlugin();++/**+ * @file app.ts+ * @brief Application builder and web platform integration+ */+// =============================================================================+// App+// =============================================================================+class App {+ constructor() {+ this.systems_ = new Map();+ this.runner_ = null;+ this.running_ = false;+ this.lastTime_ = 0;+ this.module_ = null;+ this.mainLoop = () => {+ if (!this.running_) {+ return;+ }+ const now = performance.now();+ const deltaMs = now - this.lastTime_;+ this.lastTime_ = now;+ const delta = deltaMs / 1000;+ this.updateTime(delta);+ this.runSchedule(Schedule.First);+ this.runSchedule(Schedule.PreUpdate);+ this.runSchedule(Schedule.Update);+ this.runSchedule(Schedule.PostUpdate);+ this.runSchedule(Schedule.Last);+ requestAnimationFrame(this.mainLoop);+ };+ this.world_ = new World();+ this.resources_ = new ResourceStorage();+ for (const s of Object.values(Schedule)) {+ if (typeof s === 'number') {+ this.systems_.set(s, []);+ }+ }+ }+ static new() {+ return new App();+ }+ // =========================================================================+ // Plugins+ // =========================================================================+ addPlugin(plugin) {+ plugin.build(this);+ return this;+ }+ // =========================================================================+ // Systems+ // =========================================================================+ addSystemToSchedule(schedule, system) {+ this.systems_.get(schedule).push({ system });+ return this;+ }+ addSystem(system) {+ return this.addSystemToSchedule(Schedule.Update, system);+ }+ addStartupSystem(system) {+ return this.addSystemToSchedule(Schedule.Startup, system);+ }+ // =========================================================================+ // C++ Integration+ // =========================================================================+ connectCpp(cppRegistry, module) {+ this.world_.connectCpp(cppRegistry);+ if (module) {+ this.module_ = module;+ }+ return this;+ }+ get wasmModule() {+ return this.module_;+ }+ // =========================================================================+ // World Access+ // =========================================================================+ get world() {+ return this.world_;+ }+ // =========================================================================+ // Resource Access+ // =========================================================================+ insertResource(resource, value) {+ this.resources_.insert(resource, value);+ return this;+ }+ getResource(resource) {+ return this.resources_.get(resource);+ }+ hasResource(resource) {+ return this.resources_.has(resource);+ }+ // =========================================================================+ // Run+ // =========================================================================+ run() {+ if (this.running_) {+ return;+ }+ this.running_ = true;+ this.runner_ = new SystemRunner(this.world_, this.resources_);+ this.resources_.insert(Time, { delta: 0, elapsed: 0, frameCount: 0 });+ this.runSchedule(Schedule.Startup);+ this.lastTime_ = performance.now();+ this.mainLoop();+ }+ quit() {+ this.running_ = false;+ }+ // =========================================================================+ // Internal+ // =========================================================================+ runSchedule(schedule) {+ const systems = this.systems_.get(schedule);+ if (!systems || !this.runner_) {+ return;+ }+ for (const entry of systems) {+ this.runner_.run(entry.system);+ }+ }+ updateTime(delta) {+ const time = this.resources_.get(Time);+ const newTime = {+ delta,+ elapsed: time.elapsed + delta,+ frameCount: time.frameCount + 1+ };+ this.resources_.set(Time, newTime);+ }+}+function createWebApp(module, options) {+ const app = App.new();+ const cppRegistry = new module.Registry();+ app.connectCpp(cppRegistry, module);+ if (options?.glContextHandle) {+ module.initRendererWithContext(options.glContextHandle);+ }+ else {+ module.initRenderer();+ }+ const getViewportSize = options?.getViewportSize ?? (() => ({+ width: window.innerWidth * (window.devicePixelRatio || 1),+ height: window.innerHeight * (window.devicePixelRatio || 1)+ }));+ const renderSystem = {+ _id: Symbol('RenderSystem'),+ _name: 'RenderSystem',+ _params: [],+ _fn: () => {+ const { width, height } = getViewportSize();+ module.renderFrame(cppRegistry, width, height);+ }+ };+ app.addSystemToSchedule(Schedule.Last, renderSystem);+ app.addPlugin(textPlugin);+ return app;+}++/**+ * @file AssetServer.ts+ * @brief Asset loading and caching system+ */+// =============================================================================+// AssetServer+// =============================================================================+class AssetServer {+ constructor(module) {+ this.cache_ = new Map();+ this.pending_ = new Map();+ this.module_ = module;+ if (typeof OffscreenCanvas !== 'undefined') {+ this.canvas_ = new OffscreenCanvas(512, 512);+ this.ctx_ = this.canvas_.getContext('2d', { willReadFrequently: true });+ }+ else {+ this.canvas_ = document.createElement('canvas');+ this.canvas_.width = 512;+ this.canvas_.height = 512;+ this.ctx_ = this.canvas_.getContext('2d', { willReadFrequently: true });+ }+ }+ // =========================================================================+ // Public API+ // =========================================================================+ async loadTexture(source) {+ const cached = this.cache_.get(source);+ if (cached) {+ return cached;+ }+ const pending = this.pending_.get(source);+ if (pending) {+ return pending;+ }+ const promise = this.loadTextureInternal(source);+ this.pending_.set(source, promise);+ try {+ const result = await promise;+ this.cache_.set(source, result);+ return result;+ }+ finally {+ this.pending_.delete(source);+ }+ }+ getTexture(source) {+ return this.cache_.get(source);+ }+ hasTexture(source) {+ return this.cache_.has(source);+ }+ releaseTexture(source) {+ const info = this.cache_.get(source);+ if (info) {+ const rm = this.module_.getResourceManager();+ rm.releaseTexture(info.handle);+ this.cache_.delete(source);+ }+ }+ releaseAll() {+ const rm = this.module_.getResourceManager();+ for (const info of this.cache_.values()) {+ rm.releaseTexture(info.handle);+ }+ this.cache_.clear();+ }+ setTextureMetadata(handle, border) {+ const rm = this.module_.getResourceManager();+ rm.setTextureMetadata(handle, border.left, border.right, border.top, border.bottom);+ }+ setTextureMetadataByPath(source, border) {+ const info = this.cache_.get(source);+ if (info) {+ this.setTextureMetadata(info.handle, border);+ return true;+ }+ return false;+ }+ // =========================================================================+ // Private Methods+ // =========================================================================+ async loadTextureInternal(source) {+ const img = await this.loadImage(source);+ return this.createTextureFromImage(img);+ }+ async loadImage(source) {+ return new Promise((resolve, reject) => {+ const img = new Image();+ img.crossOrigin = 'anonymous';+ img.onload = async () => {+ if (typeof createImageBitmap !== 'undefined') {+ try {+ const bitmap = await createImageBitmap(img, {+ premultiplyAlpha: 'none',+ colorSpaceConversion: 'none'+ });+ resolve(bitmap);+ return;+ }+ catch {+ // Fall back to Image element+ }+ }+ resolve(img);+ };+ img.onerror = () => reject(new Error(`Failed to load image: ${source}`));+ img.src = source;+ });+ }+ createTextureFromImage(img) {+ const { width, height } = img;+ if (this.canvas_.width < width || this.canvas_.height < height) {+ this.canvas_.width = Math.max(this.canvas_.width, this.nextPowerOf2(width));+ this.canvas_.height = Math.max(this.canvas_.height, this.nextPowerOf2(height));+ }+ this.ctx_.clearRect(0, 0, this.canvas_.width, this.canvas_.height);+ this.ctx_.globalCompositeOperation = 'copy';+ this.ctx_.drawImage(img, 0, 0);+ this.ctx_.globalCompositeOperation = 'source-over';+ const imageData = this.ctx_.getImageData(0, 0, width, height);+ const pixels = new Uint8Array(imageData.data.buffer);+ this.unpremultiplyAlpha(pixels);+ const flipped = this.flipVertically(pixels, width, height);+ const rm = this.module_.getResourceManager();+ const ptr = this.module_._malloc(flipped.length);+ this.module_.HEAPU8.set(flipped, ptr);+ const handle = rm.createTexture(width, height, ptr, flipped.length, 1);+ this.module_._free(ptr);+ return { handle, width, height };+ }+ unpremultiplyAlpha(pixels) {+ for (let i = 0; i < pixels.length; i += 4) {+ const a = pixels[i + 3];+ if (a > 0 && a < 255) {+ const scale = 255 / a;+ pixels[i] = Math.min(255, Math.round(pixels[i] * scale));+ pixels[i + 1] = Math.min(255, Math.round(pixels[i + 1] * scale));+ pixels[i + 2] = Math.min(255, Math.round(pixels[i + 2] * scale));+ }+ }+ }+ flipVertically(pixels, width, height) {+ const rowSize = width * 4;+ const flipped = new Uint8Array(pixels.length);+ for (let y = 0; y < height; y++) {+ const srcOffset = y * rowSize;+ const dstOffset = (height - 1 - y) * rowSize;+ flipped.set(pixels.subarray(srcOffset, srcOffset + rowSize), dstOffset);+ }+ return flipped;+ }+ nextPowerOf2(n) {+ let p = 1;+ while (p < n)+ p *= 2;+ return p;+ }+}++/**+ * @file AssetPlugin.ts+ * @brief Plugin that provides asset loading capabilities+ */+const Assets = defineResource({ server: null }, 'Assets');+// =============================================================================+// Asset Plugin+// =============================================================================+class AssetPlugin {+ build(app) {+ const module = app.wasmModule;+ if (!module) {+ console.warn('AssetPlugin: No WASM module available');+ return;+ }+ const server = new AssetServer(module);+ app.insertResource(Assets, { server });+ }+}+const assetPlugin = new AssetPlugin();++/**+ * @file scene.ts+ * @brief Scene loading utilities+ */+// =============================================================================+// Scene Loader+// =============================================================================+function loadSceneData(world, sceneData) {+ const entityMap = new Map();+ for (const entityData of sceneData.entities) {+ const entity = world.spawn();+ entityMap.set(entityData.id, entity);+ for (const compData of entityData.components) {+ loadComponent(world, entity, compData);+ }+ }+ // Set parent-child relationships+ for (const entityData of sceneData.entities) {+ if (entityData.parent !== null) {+ const entity = entityMap.get(entityData.id);+ const parentEntity = entityMap.get(entityData.parent);+ if (entity !== undefined && parentEntity !== undefined) {+ world.setParent(entity, parentEntity);+ }+ }+ }+ return entityMap;+}+async function loadSceneWithAssets(world, sceneData, options) {+ const entityMap = new Map();+ const assetServer = options?.assetServer;+ const texturePathToUrl = new Map();+ for (const entityData of sceneData.entities) {+ const entity = world.spawn();+ entityMap.set(entityData.id, entity);+ for (const compData of entityData.components) {+ if (compData.type === 'Sprite' && assetServer) {+ const data = compData.data;+ if (typeof data.texture === 'string' && data.texture) {+ const texturePath = data.texture;+ const isDataUrl = texturePath.startsWith('data:');+ const url = isDataUrl+ ? texturePath+ : options?.assetBaseUrl+ ? `${options.assetBaseUrl}/${texturePath}`+ : `/${texturePath}`;+ try {+ const info = await assetServer.loadTexture(url);+ data.texture = info.handle;+ texturePathToUrl.set(texturePath, url);+ }+ catch (err) {+ console.warn(`Failed to load texture: ${url}`, err);+ data.texture = 0;+ }+ }+ }+ loadComponent(world, entity, compData);+ }+ }+ for (const entityData of sceneData.entities) {+ if (entityData.parent !== null) {+ const entity = entityMap.get(entityData.id);+ const parentEntity = entityMap.get(entityData.parent);+ if (entity !== undefined && parentEntity !== undefined) {+ world.setParent(entity, parentEntity);+ }+ }+ }+ if (assetServer && sceneData.textureMetadata) {+ for (const [texturePath, metadata] of Object.entries(sceneData.textureMetadata)) {+ const url = texturePathToUrl.get(texturePath);+ if (url && metadata.sliceBorder) {+ assetServer.setTextureMetadataByPath(url, metadata.sliceBorder);+ }+ }+ }+ return entityMap;+}+function loadComponent(world, entity, compData) {+ const data = compData.data;+ switch (compData.type) {+ case 'LocalTransform':+ world.insert(entity, LocalTransform, data);+ break;+ case 'Sprite':+ world.insert(entity, Sprite, data);+ break;+ case 'Camera':+ world.insert(entity, Camera, data);+ break;+ case 'Canvas':+ world.insert(entity, Canvas, data);+ break;+ case 'Text':+ world.insert(entity, Text, data);+ break;+ default:+ console.warn(`Unknown component type: ${compData.type}`);+ }+}+function updateCameraAspectRatio(world, aspectRatio) {+ const cameraEntities = world.getEntitiesWithComponents([Camera]);+ for (const entity of cameraEntities) {+ const camera = world.get(entity, Camera);+ if (camera) {+ camera.aspectRatio = aspectRatio;+ world.insert(entity, Camera, camera);+ }+ }+}++/**+ * @file PreviewPlugin.ts+ * @brief Plugin for editor preview functionality+ */+// =============================================================================+// PreviewPlugin+// =============================================================================+class PreviewPlugin {+ constructor(sceneUrl) {+ this.app_ = null;+ this.loadPromise_ = null;+ this.sceneUrl_ = sceneUrl;+ }+ build(app) {+ this.app_ = app;+ if (!app.hasResource(Assets)) {+ app.addPlugin(assetPlugin);+ }+ this.loadPromise_ = this.loadScene();+ }+ /**+ * @brief Wait for scene loading to complete+ */+ async waitForReady() {+ if (this.loadPromise_) {+ await this.loadPromise_;+ }+ }+ async loadScene() {+ if (!this.app_)+ return;+ try {+ const response = await platformFetch(this.sceneUrl_);+ if (!response.ok) {+ throw new Error(`Failed to fetch scene: ${response.status}`);+ }+ const sceneData = await response.json();+ const assets = this.app_.getResource(Assets);+ await loadSceneWithAssets(this.app_.world, sceneData, {+ assetServer: assets.server+ });+ this.ensureCamera();+ }+ catch (err) {+ console.error('[PreviewPlugin] Failed to load scene:', err);+ }+ }+ ensureCamera() {+ if (!this.app_)+ return;+ const world = this.app_.world;+ let hasActiveCamera = false;+ const cameraEntities = world.getEntitiesWithComponents([Camera]);+ for (const entity of cameraEntities) {+ const camera = world.get(entity, Camera);+ if (camera.isActive) {+ hasActiveCamera = true;+ break;+ }+ }+ if (!hasActiveCamera) {+ console.warn('[PreviewPlugin] No active camera found, creating default camera');+ const cameraEntity = world.spawn();+ const transformData = {+ position: { x: 0, y: 0, z: 10 },+ rotation: { x: 0, y: 0, z: 0, w: 1 },+ scale: { x: 1, y: 1, z: 1 },+ };+ world.insert(cameraEntity, LocalTransform, transformData);+ const cameraData = {+ isActive: true,+ projectionType: 0,+ fov: 60,+ orthoSize: 540,+ nearPlane: 0.1,+ farPlane: 1000,+ aspectRatio: 1.77,+ priority: 0,+ };+ world.insert(cameraEntity, Camera, cameraData);+ }+ }+}++/**+ * @file spine.ts+ * @brief Spine animation control API+ */+// =============================================================================+// SpineController+// =============================================================================+/**+ * Controller for Spine skeletal animations+ *+ * @example+ * ```typescript+ * const spine = new SpineController(wasmModule);+ *+ * // Play animation+ * spine.play(entity, 'run', true);+ *+ * // Queue next animation+ * spine.addAnimation(entity, 'idle', true, 0.2);+ *+ * // Change skin+ * spine.setSkin(entity, 'warrior');+ *+ * // Get bone position for effects+ * const pos = spine.getBonePosition(entity, 'weapon');+ * if (pos) {+ * spawnEffect(pos.x, pos.y);+ * }+ *+ * // Listen for events+ * spine.on(entity, 'event', (e) => {+ * if (e.eventName === 'footstep') {+ * playSound('footstep');+ * }+ * });+ * ```+ */+class SpineController {+ constructor(wasmModule) {+ this.module_ = wasmModule;+ this.listeners_ = new Map();+ this.setupEventBridge();+ }+ // =========================================================================+ // Animation Control+ // =========================================================================+ /**+ * Plays an animation, replacing any current animation on the track+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop the animation+ * @param track Animation track (default 0)+ * @returns True if animation was set+ */+ play(entity, animation, loop = true, track = 0) {+ if (!this.module_.spinePlayAnimation)+ return false;+ return this.module_.spinePlayAnimation(entity, animation, loop, track);+ }+ /**+ * Adds an animation to the queue+ * @param entity Target entity+ * @param animation Animation name+ * @param loop Whether to loop+ * @param delay Delay before starting (seconds)+ * @param track Animation track (default 0)+ * @returns True if animation was queued+ */+ addAnimation(entity, animation, loop = true, delay = 0, track = 0) {+ if (!this.module_.spineAddAnimation)+ return false;+ return this.module_.spineAddAnimation(entity, animation, loop, delay, track);+ }+ /**+ * Sets an empty animation to mix out the current animation+ * @param entity Target entity+ * @param mixDuration Duration of the mix out+ * @param track Animation track (default 0)+ */+ setEmptyAnimation(entity, mixDuration = 0.2, track = 0) {+ if (!this.module_.spineSetEmptyAnimation)+ return;+ this.module_.spineSetEmptyAnimation(entity, mixDuration, track);+ }+ /**+ * Clears all animations on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ */+ clearTrack(entity, track = 0) {+ if (!this.module_.spineClearTrack)+ return;+ this.module_.spineClearTrack(entity, track);+ }+ /**+ * Clears all tracks+ * @param entity Target entity+ */+ clearTracks(entity) {+ if (!this.module_.spineClearTracks)+ return;+ this.module_.spineClearTracks(entity);+ }+ // =========================================================================+ // Skin Control+ // =========================================================================+ /**+ * Sets the current skin+ * @param entity Target entity+ * @param skinName Skin name+ * @returns True if skin was set+ */+ setSkin(entity, skinName) {+ if (!this.module_.spineSetSkin)+ return false;+ return this.module_.spineSetSkin(entity, skinName);+ }+ /**+ * Gets available skin names+ * @param entity Target entity+ * @returns Array of skin names+ */+ getSkins(entity) {+ if (!this.module_.spineGetSkins)+ return [];+ return this.module_.spineGetSkins(entity) || [];+ }+ // =========================================================================+ // Queries+ // =========================================================================+ /**+ * Gets available animation names+ * @param entity Target entity+ * @returns Array of animation names+ */+ getAnimations(entity) {+ if (!this.module_.spineGetAnimations)+ return [];+ return this.module_.spineGetAnimations(entity) || [];+ }+ /**+ * Gets the current animation on a track+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Animation name or null+ */+ getCurrentAnimation(entity, track = 0) {+ if (!this.module_.spineGetCurrentAnimation)+ return null;+ return this.module_.spineGetCurrentAnimation(entity, track);+ }+ /**+ * Gets the duration of an animation+ * @param entity Target entity+ * @param animation Animation name+ * @returns Duration in seconds, or 0 if not found+ */+ getAnimationDuration(entity, animation) {+ if (!this.module_.spineGetAnimationDuration)+ return 0;+ return this.module_.spineGetAnimationDuration(entity, animation);+ }+ /**+ * Gets detailed track entry info+ * @param entity Target entity+ * @param track Animation track (default 0)+ * @returns Track entry info or null+ */+ getTrackEntry(entity, track = 0) {+ if (!this.module_.spineGetTrackEntry)+ return null;+ return this.module_.spineGetTrackEntry(entity, track);+ }+ // =========================================================================+ // Bone/Slot Access+ // =========================================================================+ /**+ * Gets world position of a bone+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Position or null if not found+ */+ getBonePosition(entity, boneName) {+ if (!this.module_.spineGetBonePosition)+ return null;+ const result = this.module_.spineGetBonePosition(entity, boneName);+ if (!result)+ return null;+ return { x: result.x, y: result.y };+ }+ /**+ * Gets world rotation of a bone in degrees+ * @param entity Target entity+ * @param boneName Bone name+ * @returns Rotation in degrees or null+ */+ getBoneRotation(entity, boneName) {+ if (!this.module_.spineGetBoneRotation)+ return null;+ return this.module_.spineGetBoneRotation(entity, boneName);+ }+ /**+ * Sets the attachment for a slot+ * @param entity Target entity+ * @param slotName Slot name+ * @param attachmentName Attachment name (null to clear)+ */+ setAttachment(entity, slotName, attachmentName) {+ if (!this.module_.spineSetAttachment)+ return;+ this.module_.spineSetAttachment(entity, slotName, attachmentName || '');+ }+ // =========================================================================+ // Events+ // =========================================================================+ /**+ * Registers an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ on(entity, type, callback) {+ if (!this.listeners_.has(entity)) {+ this.listeners_.set(entity, new Map());+ }+ const entityListeners = this.listeners_.get(entity);+ if (!entityListeners.has(type)) {+ entityListeners.set(type, new Set());+ }+ entityListeners.get(type).add(callback);+ }+ /**+ * Unregisters an event callback+ * @param entity Target entity+ * @param type Event type+ * @param callback Callback function+ */+ off(entity, type, callback) {+ const entityListeners = this.listeners_.get(entity);+ if (!entityListeners)+ return;+ const typeListeners = entityListeners.get(type);+ if (!typeListeners)+ return;+ typeListeners.delete(callback);+ }+ /**+ * Removes all event listeners for an entity+ * @param entity Target entity+ */+ removeAllListeners(entity) {+ this.listeners_.delete(entity);+ }+ // =========================================================================+ // Private+ // =========================================================================+ setupEventBridge() {+ if (typeof window !== 'undefined') {+ window.__esengine_spineEvent = (entity, eventData) => {+ this.dispatchEvent(entity, eventData);+ };+ }+ }+ dispatchEvent(entity, eventData) {+ const entityListeners = this.listeners_.get(entity);+ if (!entityListeners)+ return;+ const event = {+ type: eventData.type,+ entity,+ track: eventData.track ?? 0,+ animation: eventData.animation ?? null,+ eventName: eventData.eventName,+ intValue: eventData.intValue,+ floatValue: eventData.floatValue,+ stringValue: eventData.stringValue,+ };+ const typeListeners = entityListeners.get(event.type);+ if (typeListeners) {+ typeListeners.forEach(callback => {+ try {+ callback(event);+ }+ catch (e) {+ console.error('Error in Spine event callback:', e);+ }+ });+ }+ }+}+// =============================================================================+// Factory Function+// =============================================================================+/**+ * Creates a SpineController instance+ * @param wasmModule The ESEngine WASM module+ * @returns SpineController instance+ */+function createSpineController(wasmModule) {+ return new SpineController(wasmModule);+}++/**+ * @file index.ts+ * @brief ESEngine SDK - Web entry point (auto-initializes Web platform)+ */+// Initialize Web platform+setPlatform(webAdapter);++export { App, AssetPlugin, AssetServer, Assets, Camera, Canvas, Children, Commands, CommandsInstance, EntityCommands, INVALID_ENTITY, INVALID_TEXTURE, Input, LocalTransform, Mut, Parent, PreviewPlugin, Query, QueryInstance, Res, ResMut, Schedule, SpineAnimation, SpineController, Sprite, SystemRunner, Text, TextAlign, TextOverflow, TextPlugin, TextRenderer, TextVerticalAlign, Time, UIRect, Velocity, World, WorldTransform, assetPlugin, color, createSpineController, createWebApp, defineComponent, defineResource, defineSystem, defineTag, getPlatform, getPlatformType, isBuiltinComponent, isPlatformInitialized, isWeChat, isWeb, loadSceneData, loadSceneWithAssets, platformFetch, platformFileExists, platformInstantiateWasm, platformReadFile, platformReadTextFile, quat, textPlugin, updateCameraAspectRatio, vec2, vec3, vec4 };+//# sourceMappingURL=index.js.mapdiff --git a/desktop/public/sdk/esm/wasm.d.ts b/desktop/public/sdk/esm/wasm.d.tsnew file mode 100644index 000000000..282f4455c--- /dev/null+++ b/desktop/public/sdk/esm/wasm.d.ts@@ -0,0 +1,169 @@+/**+ * @file types.ts+ * @brief Core type definitions for ESEngine SDK+ */+type Entity = number;++/**+ * @file wasm.ts+ * @brief WASM module type definitions+ */++interface CppRegistry {+ create(): Entity;+ destroy(entity: Entity): void;+ valid(entity: Entity): boolean;+ delete(): void;+ addLocalTransform(entity: Entity, data: unknown): void;+ getLocalTransform(entity: Entity): unknown;+ hasLocalTransform(entity: Entity): boolean;+ removeLocalTransform(entity: Entity): void;+ addWorldTransform(entity: Entity, data: unknown): void;+ getWorldTransform(entity: Entity): unknown;+ hasWorldTransform(entity: Entity): boolean;+ removeWorldTransform(entity: Entity): void;+ addSprite(entity: Entity, data: unknown): void;+ getSprite(entity: Entity): unknown;+ hasSprite(entity: Entity): boolean;+ removeSprite(entity: Entity): void;+ addCamera(entity: Entity, data: unknown): void;+ getCamera(entity: Entity): unknown;+ hasCamera(entity: Entity): boolean;+ removeCamera(entity: Entity): void;+ addCanvas(entity: Entity, data: unknown): void;+ getCanvas(entity: Entity): unknown;+ hasCanvas(entity: Entity): boolean;+ removeCanvas(entity: Entity): void;+ addVelocity(entity: Entity, data: unknown): void;+ getVelocity(entity: Entity): unknown;+ hasVelocity(entity: Entity): boolean;+ removeVelocity(entity: Entity): void;+ addParent(entity: Entity, data: unknown): void;+ getParent(entity: Entity): unknown;+ hasParent(entity: Entity): boolean;+ removeParent(entity: Entity): void;+ addChildren(entity: Entity, data: unknown): void;+ getChildren(entity: Entity): unknown;+ hasChildren(entity: Entity): boolean;+ removeChildren(entity: Entity): void;+ addSpineAnimation(entity: Entity, data: unknown): void;+ getSpineAnimation(entity: Entity): unknown;+ hasSpineAnimation(entity: Entity): boolean;+ removeSpineAnimation(entity: Entity): void;+ setParent(child: Entity, parent: Entity): void;+ [key: string]: any;+}+interface CppResourceManager {+ createTexture(width: number, height: number, pixels: number, pixelsLen: number, format: number): number;+ createShader(vertSrc: string, fragSrc: string): number;+ releaseTexture(handle: number): void;+ releaseShader(handle: number): void;+ setTextureMetadata(handle: number, left: number, right: number, top: number, bottom: number): void;+ registerTextureWithPath(handle: number, path: string): void;+}+interface EmscriptenFS {+ writeFile(path: string, data: string | Uint8Array): void;+ readFile(path: string, opts?: {+ encoding?: string;+ }): string | Uint8Array;+ mkdir(path: string): void;+ mkdirTree(path: string): void;+ unlink(path: string): void;+ stat(path: string): {+ mode: number;+ size: number;+ };+ isFile(mode: number): boolean;+ isDir(mode: number): boolean;+ analyzePath(path: string): {+ exists: boolean;+ parentExists: boolean;+ };+}+interface SpineBounds {+ x: number;+ y: number;+ width: number;+ height: number;+ valid: boolean;+}+interface ESEngineModule {+ Registry: new () => CppRegistry;+ HEAPU8: Uint8Array;+ HEAPF32: Float32Array;+ FS: EmscriptenFS;+ initRenderer(): void;+ initRendererWithCanvas(canvasSelector: string): boolean;+ initRendererWithContext(contextHandle: number): boolean;+ shutdownRenderer(): void;+ GL: {+ registerContext(ctx: WebGLRenderingContext | WebGL2RenderingContext, options: {+ majorVersion: number;+ minorVersion: number;+ enableExtensionsByDefault?: boolean;+ }): number;+ };+ renderFrame(registry: CppRegistry, width: number, height: number): void;+ renderFrameWithMatrix(registry: CppRegistry, width: number, height: number, matrixPtr: number): void;+ getResourceManager(): CppResourceManager;+ getSpineBounds(registry: CppRegistry, entity: number): SpineBounds;+ draw_begin(matrixPtr: number): void;+ draw_end(): void;+ draw_line(fromX: number, fromY: number, toX: number, toY: number, r: number, g: number, b: number, a: number, thickness: number): void;+ draw_rect(x: number, y: number, width: number, height: number, r: number, g: number, b: number, a: number, filled: boolean): void;+ draw_rectOutline(x: number, y: number, width: number, height: number, r: number, g: number, b: number, a: number, thickness: number): void;+ draw_circle(centerX: number, centerY: number, radius: number, r: number, g: number, b: number, a: number, filled: boolean, segments: number): void;+ draw_circleOutline(centerX: number, centerY: number, radius: number, r: number, g: number, b: number, a: number, thickness: number, segments: number): void;+ draw_texture(x: number, y: number, width: number, height: number, textureId: number, r: number, g: number, b: number, a: number): void;+ draw_textureRotated(x: number, y: number, width: number, height: number, rotation: number, textureId: number, r: number, g: number, b: number, a: number): void;+ draw_setLayer(layer: number): void;+ draw_setDepth(depth: number): void;+ draw_getDrawCallCount(): number;+ draw_getPrimitiveCount(): number;+ draw_setBlendMode(mode: number): void;+ draw_setDepthTest(enabled: boolean): void;+ draw_mesh(geometryHandle: number, shaderHandle: number, transformPtr: number): void;+ draw_meshWithUniforms(geometryHandle: number, shaderHandle: number, transformPtr: number, uniformsPtr: number, uniformCount: number): void;+ geometry_create(): number;+ geometry_init(handle: number, verticesPtr: number, vertexCount: number, layoutPtr: number, layoutCount: number, dynamic: boolean): void;+ geometry_setIndices16(handle: number, indicesPtr: number, indexCount: number): void;+ geometry_setIndices32(handle: number, indicesPtr: number, indexCount: number): void;+ geometry_updateVertices(handle: number, verticesPtr: number, vertexCount: number, offset: number): void;+ geometry_release(handle: number): void;+ geometry_isValid(handle: number): boolean;+ postprocess_init(width: number, height: number): boolean;+ postprocess_shutdown(): void;+ postprocess_resize(width: number, height: number): void;+ postprocess_addPass(name: string, shaderHandle: number): number;+ postprocess_removePass(name: string): void;+ postprocess_setPassEnabled(name: string, enabled: boolean): void;+ postprocess_isPassEnabled(name: string): boolean;+ postprocess_setUniformFloat(passName: string, uniform: string, value: number): void;+ postprocess_setUniformVec4(passName: string, uniform: string, x: number, y: number, z: number, w: number): void;+ postprocess_begin(): void;+ postprocess_end(): void;+ postprocess_getPassCount(): number;+ postprocess_isInitialized(): boolean;+ postprocess_setBypass(bypass: boolean): void;+ postprocess_isBypassed(): boolean;+ renderer_init(width: number, height: number): void;+ renderer_resize(width: number, height: number): void;+ renderer_begin(matrixPtr: number, targetHandle: number): void;+ renderer_end(): void;+ renderer_submitSprites(registry: CppRegistry): void;+ renderer_submitSpine(registry: CppRegistry): void;+ renderer_setStage(stage: number): void;+ renderer_createTarget(width: number, height: number): number;+ renderer_releaseTarget(handle: number): void;+ renderer_getTargetTexture(handle: number): number;+ renderer_getDrawCalls(): number;+ renderer_getTriangles(): number;+ renderer_getSprites(): number;+ renderer_getSpine(): number;+ renderer_getMeshes(): number;+ renderer_getCulled(): number;+ _malloc(size: number): number;+ _free(ptr: number): void;+}++export type { CppRegistry, CppResourceManager, ESEngineModule, EmscriptenFS, SpineBounds };diff --git a/desktop/public/sdk/esm/wasm.js b/desktop/public/sdk/esm/wasm.jsnew file mode 100644index 000000000..3a6959ed4--- /dev/null+++ b/desktop/public/sdk/esm/wasm.js@@ -0,0 +1,2 @@++//# sourceMappingURL=wasm.js.mapdiff --git a/desktop/public/wasm/esengine.js b/desktop/public/wasm/esengine.jsindex c00eafdd1..3d650fee7 100644--- a/desktop/public/wasm/esengine.js+++ b/desktop/public/wasm/esengine.js@@ -1,114 +1,130 @@-async function ESEngineModule(moduleArg={}){var moduleRtn;var m=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope,ca=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(ca){const {createRequire:a}=await import("node:module");var require=a(import.meta.url)}var da="./this.program",ea=import.meta.url,fa="",ha,ia;+async function ESEngineModule(moduleArg={}){var moduleRtn;var h=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope,ca=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(ca){const {createRequire:a}=await import("node:module");var require=a(import.meta.url)}var da="./this.program",ea=import.meta.url,fa="",ha,ia;if(ca){var fs=require("node:fs");ea.startsWith("file:")&&(fa=require("node:path").dirname(require("node:url").fileURLToPath(ea))+"/");ia=a=>{a=ja(a)?new URL(a):a;return fs.readFileSync(a)};ha=async a=>{a=ja(a)?new URL(a):a;return fs.readFileSync(a,void 0)};1<process.argv.length&&(da=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2)}else if(aa||ba){try{fa=(new URL(".",ea)).href}catch{}ba&&(ia=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});-ha=async a=>{if(ja(a))return new Promise((c,d)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?c(e.response):d(e.status)};e.onerror=d;e.send(null)});var b=await fetch(a,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url);}}var ka=console.log.bind(console),n=console.error.bind(console),la,ma=!1,ja=a=>a.startsWith("file://"),na,oa,q,r,u,v,x,y,pa,z,qa,ra,sa=!1;-function ua(){var a=va.buffer;q=new Int8Array(a);u=new Int16Array(a);m.HEAPU8=r=new Uint8Array(a);v=new Uint16Array(a);x=new Int32Array(a);m.HEAPU32=y=new Uint32Array(a);m.HEAPF32=pa=new Float32Array(a);z=new Float64Array(a);qa=new BigInt64Array(a);ra=new BigUint64Array(a)}function wa(a){m.onAbort?.(a);a="Aborted("+a+")";n(a);ma=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");oa?.(a);throw a;}var xa;-async function ya(a){if(!la)try{var b=await ha(a);return new Uint8Array(b)}catch{}if(a==xa&&la)a=new Uint8Array(la);else if(ia)a=ia(a);else throw"both async and sync fetching of the wasm failed";return a}async function za(a,b){try{var c=await ya(a);return await WebAssembly.instantiate(c,b)}catch(d){n(`failed to asynchronously prepare wasm: ${d}`),wa(d)}}-async function Aa(a){var b=xa;if(!la&&!ja(b)&&!ca)try{var c=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,a)}catch(d){n(`wasm streaming compile failed: ${d}`),n("falling back to ArrayBuffer instantiation")}return za(b,a)}var Ba=a=>{for(;0<a.length;)a.shift()(m)},Ca=[],Da=[],Ea=()=>{var a=m.preRun.shift();Da.push(a)};class Fa{constructor(a){this.fb=a-24}}var Ga=0,Ha=0,Ia={},Ja=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};-function Ka(a){return this.ib(y[a>>2])}-var La={},Ma={},Na={},Oa=class extends Error{constructor(a){super(a);this.name="InternalError"}},Pa=(a,b,c)=>{function d(h){h=c(h);if(h.length!==a.length)throw new Oa("Mismatched type converter count");for(var l=0;l<a.length;++l)A(a[l],h[l])}a.forEach(h=>Na[h]=b);var e=Array(b.length),f=[],g=0;for(let [h,l]of b.entries())Ma.hasOwnProperty(l)?e[h]=Ma[l]:(f.push(l),La.hasOwnProperty(l)||(La[l]=[]),La[l].push(()=>{e[h]=Ma[l];++g;g===f.length&&d(e)}));0===f.length&&d(e)},B=a=>{for(var b="";;){var c=r[a++];-if(!c)return b;b+=String.fromCharCode(c)}},H=class extends Error{constructor(a){super(a);this.name="BindingError"}},Qa=a=>{throw new H(a);};function Ra(a,b,c={}){var d=b.name;if(!a)throw new H(`type "${d}" must have a positive integer typeid pointer`);if(Ma.hasOwnProperty(a)){if(c.md)return;throw new H(`Cannot register type '${d}' twice`);}Ma[a]=b;delete Na[a];La.hasOwnProperty(a)&&(b=La[a],delete La[a],b.forEach(e=>e()))}function A(a,b,c={}){return Ra(a,b,c)}-var Sa=(a,b,c)=>{switch(b){case 1:return c?d=>q[d]:d=>r[d];case 2:return c?d=>u[d>>1]:d=>v[d>>1];case 4:return c?d=>x[d>>2]:d=>y[d>>2];case 8:return c?d=>qa[d>>3]:d=>ra[d>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Ta=a=>{throw new H(a.bb.jb.hb.name+" instance already deleted");},Ua=!1,Va=()=>{},Wa=a=>{if(!globalThis.FinalizationRegistry)return Wa=b=>b,a;Ua=new FinalizationRegistry(b=>{b=b.bb;--b.count.value;0===b.count.value&&(b.ob?b.sb.vb(b.ob):b.jb.hb.vb(b.fb))});Wa=-b=>{var c=b.bb;c.ob&&Ua.register(b,{bb:c},b);return b};Va=b=>{Ua.unregister(b)};return Wa(a)},Xa=[];function Ya(){}-var Za=(a,b)=>Object.defineProperty(b,"name",{value:a}),$a={},ab=(a,b,c)=>{if(void 0===a[b].nb){var d=a[b];a[b]=function(...e){if(!a[b].nb.hasOwnProperty(e.length))throw new H(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].nb})!`);return a[b].nb[e.length].apply(this,e)};a[b].nb=[];a[b].nb[d.Cb]=d}},bb=(a,b,c)=>{if(m.hasOwnProperty(a)){if(void 0===c||void 0!==m[a].nb&&void 0!==m[a].nb[c])throw new H(`Cannot register public name '${a}' twice`);ab(m,-a,a);if(m[a].nb.hasOwnProperty(c))throw new H(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);m[a].nb[c]=b}else m[a]=b,m[a].Cb=c},cb=a=>{a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function db(a,b,c,d,e,f,g,h){this.name=a;this.constructor=b;this.Hb=c;this.vb=d;this.pb=e;this.gd=f;this.Ub=g;this.cd=h;this.sd=[]}-var eb=(a,b,c)=>{for(;b!==c;){if(!b.Ub)throw new H(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.Ub(a);b=b.pb}return a},fb=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a};-function gb(a,b){if(null===b){if(this.pc)throw new H(`null is not a valid ${this.name}`);return 0}if(!b.bb)throw new H(`Cannot pass "${fb(b)}" as a ${this.name}`);if(!b.bb.fb)throw new H(`Cannot pass deleted object as a pointer of type ${this.name}`);return eb(b.bb.fb,b.bb.jb.hb,this.hb)}-function hb(a,b){if(null===b){if(this.pc)throw new H(`null is not a valid ${this.name}`);if(this.bc){var c=this.uc();null!==a&&a.push(this.vb,c);return c}return 0}if(!b||!b.bb)throw new H(`Cannot pass "${fb(b)}" as a ${this.name}`);if(!b.bb.fb)throw new H(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ac&&b.bb.jb.ac)throw new H(`Cannot convert argument of type ${b.bb.sb?b.bb.sb.name:b.bb.jb.name} to parameter type ${this.name}`);c=eb(b.bb.fb,b.bb.jb.hb,this.hb);if(this.bc){if(void 0===-b.bb.ob)throw new H("Passing raw pointer to smart pointer is illegal");switch(this.yd){case 0:if(b.bb.sb===this)c=b.bb.ob;else throw new H(`Cannot convert argument of type ${b.bb.sb?b.bb.sb.name:b.bb.jb.name} to parameter type ${this.name}`);break;case 1:c=b.bb.ob;break;case 2:if(b.bb.sb===this)c=b.bb.ob;else{var d=b.clone();c=this.td(c,ib(()=>d["delete"]()));null!==a&&a.push(this.vb,c)}break;default:throw new H("Unsupported sharing policy");}}return c}-function jb(a,b){if(null===b){if(this.pc)throw new H(`null is not a valid ${this.name}`);return 0}if(!b.bb)throw new H(`Cannot pass "${fb(b)}" as a ${this.name}`);if(!b.bb.fb)throw new H(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.bb.jb.ac)throw new H(`Cannot convert argument of type ${b.bb.jb.name} to parameter type ${this.name}`);return eb(b.bb.fb,b.bb.jb.hb,this.hb)}-var kb=(a,b,c)=>{if(b===c)return a;if(void 0===c.pb)return null;a=kb(a,b,c.pb);return null===a?null:c.cd(a)},lb={},mb=(a,b)=>{if(void 0===b)throw new H("ptr should not be undefined");for(;a.pb;)b=a.Ub(b),a=a.pb;return lb[b]},nb=(a,b)=>{if(!b.jb||!b.fb)throw new Oa("makeClassHandle requires ptr and ptrType");if(!!b.sb!==!!b.ob)throw new Oa("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Wa(Object.create(a,{bb:{value:b,writable:!0}}))};-function ob(a,b,c,d,e,f,g,h,l,k,p){this.name=a;this.hb=b;this.pc=c;this.ac=d;this.bc=e;this.rd=f;this.yd=g;this.Tc=h;this.uc=l;this.td=k;this.vb=p;e||void 0!==b.pb?this.lb=hb:(this.lb=d?gb:jb,this.mb=null)}-var pb=(a,b,c)=>{if(!m.hasOwnProperty(a))throw new Oa("Replacing nonexistent public symbol");void 0!==m[a].nb&&void 0!==c?m[a].nb[c]=b:(m[a]=b,m[a].Cb=c)},qb=[],sb=a=>{var b=qb[a];b||(qb[a]=b=rb.get(a));return b},I=(a,b)=>{a=B(a);var c=sb(b);if("function"!=typeof c)throw new H(`unknown function pointer with signature ${a}: ${b}`);return c};class tb extends Error{}-var wb=a=>{a=ub(a);var b=B(a);J(a);return b},xb=(a,b)=>{function c(f){e[f]||Ma[f]||(Na[f]?Na[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new tb(`${a}: `+d.map(wb).join([", "]));},yb=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(y[b+4*d>>2]);return c};function zb(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].mb)return!0;return!1}-function Ab(a,b,c,d,e,f){var g=b.length;if(2>g)throw new H("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,l=zb(b);c=!b[0].od;var k=b[0],p=b[1];d=[a,Qa,d,e,Ja,k.ib.bind(k),p?.lb.bind(p)];for(e=2;e<g;++e)k=b[e],d.push(k.lb.bind(k));if(!l)for(e=h?1:2;e<b.length;++e)null!==b[e].mb&&d.push(b[e].mb);l=zb(b);e=b.length-2;p=[];k=["fn"];h&&k.push("thisWired");for(g=0;g<e;++g)p.push(`arg${g}`),k.push(`arg${g}Wired`);p=p.join(",");k=k.join(",");-p=`return function (${p}) {\n`;l&&(p+="var destructors = [];\n");var w=l?"destructors":"null",t="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");h&&(p+=`var thisWired = toClassParamWire(${w}, this);\n`);for(g=0;g<e;++g){var C=`toArg${g}Wire`;p+=`var arg${g}Wired = ${C}(${w}, arg${g});\n`;t.push(C)}p+=(c||f?"var rv = ":"")+`invoker(${k});\n`;if(l)p+="runDestructors(destructors);\n";else for(g=h?1:2;g<b.length;++g)f=1===g?"thisWired":"arg"+(g-2)+"Wired",-null!==b[g].mb&&(p+=`${f}_dtor(${f});\n`,t.push(`${f}_dtor`));c&&(p+="var ret = fromRetWire(rv);\nreturn ret;\n");b=(new Function(t,p+"}\n"))(...d);return Za(a,b)}-var Bb=a=>{a=a.trim();const b=a.indexOf("(");return-1===b?a:a.slice(0,b)},Cb=[],Db=[0,1,,1,null,1,!0,1,!1,1],ib=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=Cb.pop()||Db.length;Db[b]=a;Db[b+1]=1;return b}},Eb={name:"emscripten::val",ib:a=>{if(!a)throw new H(`Cannot use deleted val. handle = ${a}`);var b=Db[a];9<a&&0===--Db[a+1]&&(Db[a]=void 0,Cb.push(a));return b},lb:(a,b)=>ib(b),rb:Ka,mb:null},Fb=(a,b,c)=>{switch(b){case 1:return c?function(d){return this.ib(q[d])}:-function(d){return this.ib(r[d])};case 2:return c?function(d){return this.ib(u[d>>1])}:function(d){return this.ib(v[d>>1])};case 4:return c?function(d){return this.ib(x[d>>2])}:function(d){return this.ib(y[d>>2])};default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Gb=a=>{var b=Ma[a];if(void 0===b)throw a=`${"enum"} has unknown type ${wb(a)}`,new H(a);return b},Hb=(a,b)=>{switch(b){case 4:return function(c){return this.ib(pa[c>>2])};case 8:return function(c){return this.ib(z[c>>3])};-default:throw new TypeError(`invalid float width (${b}): ${a}`);}},K=(a,b,c,d)=>{if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.codePointAt(f);if(127>=g){if(c>=d)break;b[c++]=g}else if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6;b[c++]=128|g&63}else if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12;b[c++]=128|g>>6&63;b[c++]=128|g&63}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63;b[c++]=128|g>>6&63;b[c++]=128|g&63;f++}}b[c]=0;return c-e},Ib=a=>{for(var b=0,c=0;c<a.length;++c){var d=-a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},Jb=globalThis.TextDecoder&&new TextDecoder,Kb=(a,b,c,d)=>{c=b+c;if(d)return c;for(;a[b]&&!(b>=c);)++b;return b},L=(a,b=0,c,d)=>{c=Kb(a,b,c,d);if(16<c-b&&a.buffer&&Jb)return Jb.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):-(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},Lb=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,Mb=(a,b,c)=>{a>>=1;b=Kb(v,a,b/2,c);if(16<b-a&&Lb)return Lb.decode(v.subarray(a,b));for(c="";a<b;++a)c+=String.fromCharCode(v[a]);return c},Nb=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)u[b>>1]=a.charCodeAt(e),b+=2;u[b>>1]=0;return b-d},Ob=a=>2*a.length,Pb=(a,b,c)=>{var d="";a>>=-2;for(var e=0;!(e>=b/4);e++){var f=y[a+e];if(!f&&!c)break;d+=String.fromCodePoint(f)}return d},Qb=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.codePointAt(e);65535<f&&e++;x[b>>2]=f;b+=4;if(b+4>c)break}x[b>>2]=0;return b-d},Rb=a=>{for(var b=0,c=0;c<a.length;++c)65535<a.codePointAt(c)&&c++,b+=4;return b},Sb=[0,globalThis.document??0,globalThis.window??0],Tb=a=>{a=2<a?a?L(r,a):"":a;return Sb[a]||globalThis.document?.querySelector(a)},Ub=a=>0>Sb.indexOf(a)?-a.getBoundingClientRect():{left:0,top:0};function Vb(a){var b=N.qb[a];b.target.removeEventListener(b.zb,b.Hc,b.Vb);N.qb.splice(a,1)}function Wb(){if(navigator.userActivation?navigator.userActivation.isActive:N.oc&&N.ad.Ac){var a=N.yb;N.yb=[];for(var b of a)b.vc(...b.Bc)}}-function Xb(a){if(!a.target)return-4;if(a.Gb)a.Hc=function(c){++N.oc;N.ad=a;Wb();a.$b(c);Wb();--N.oc},a.target.addEventListener(a.zb,a.Hc,a.Vb),N.qb.push(a);else for(var b=0;b<N.qb.length;++b)N.qb[b].target==a.target&&N.qb[b].zb==a.zb&&Vb(b--);return 0}-var N={Bd:0,Qd:0,qc:0,ic:0,je:0,xc:0,Od:0,Jd:0,$d:0,Id:0,Pd:0,ae:0,he:0,wc:0,de(){for(;N.qb.length;)Vb(N.qb.length-1);N.yb=[]},oc:0,yb:[],Hd(a,b,c){function d(f,g){if(f.length!=g.length)return!1;for(var h in f)if(f[h]!=g[h])return!1;return!0}for(var e of N.yb)if(e.vc==a&&d(e.Bc,c))return;N.yb.push({vc:a,Sc:b,Bc:c});N.yb.sort((f,g)=>f.Sc<g.Sc)},ee(a){N.yb=N.yb.filter(b=>b.vc!=a)},qb:[],ud:(a,b)=>{for(var c=0;c<N.qb.length;++c)N.qb[c].target!=a||b&&b!=N.qb[c].zb||Vb(c--)},fe(a){let b=!1;for(let c=0;c<-N.qb.length;++c){const d=N.qb[c];d.target===a.target&&d.Qb===a.Qb&&d.Gb===a.Gb&&d.Wb===a.Wb&&(Vb(c--),b=!0)}return b?0:-5},Sd(a){return a?a==window?"#window":a==screen?"#screen":a?.nodeName||"":""},fullscreenEnabled(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},Zb=(a,b,c,d,e,f)=>{N.qc||(N.qc=Yb(160));a={target:Tb(a),zb:f,Qb:e,Wb:b,Gb:d,$b:g=>{var h=N.qc;z[h>>3]=g.timeStamp;var l=h>>2;x[l+2]=g.location;q[h+12]=g.ctrlKey;q[h+13]=g.shiftKey;q[h+14]=g.altKey;q[h+15]=g.metaKey;-q[h+16]=g.repeat;x[l+5]=g.charCode;x[l+6]=g.keyCode;x[l+7]=g.which;K(g.key||"",r,h+32,32);K(g.code||"",r,h+64,32);K(g.char||"",r,h+96,32);K(g.locale||"",r,h+128,32);sb(d)(e,h,b)&&g.preventDefault()},Vb:c};return Xb(a)},$b=(a,b,c,d,e,f)=>{N.ic||(N.ic=Yb(64));a=Tb(a);return Xb({target:a,Ac:"mousemove"!=f&&"mouseenter"!=f&&"mouseleave"!=f,zb:f,Qb:e,Wb:b,Gb:d,$b:g=>{var h=a,l=N.ic;z[l>>3]=g.timeStamp;var k=l>>2;x[k+2]=g.screenX;x[k+3]=g.screenY;x[k+4]=g.clientX;x[k+5]=g.clientY;q[l+24]=g.ctrlKey;q[l+-25]=g.shiftKey;q[l+26]=g.altKey;q[l+27]=g.metaKey;u[2*k+14]=g.button;u[2*k+15]=g.buttons;x[k+8]=g.movementX;x[k+9]=g.movementY;h=Ub(h);x[k+10]=g.clientX-(h.left|0);x[k+11]=g.clientY-(h.top|0);sb(d)(e,N.ic,b)&&g.preventDefault()},Vb:c})},ac=(a,b,c,d)=>{N.xc||(N.xc=Yb(36));a=Tb(a);return Xb({target:a,zb:"resize",Qb:10,Wb:b,Gb:d,$b:e=>{if(e.target==a){var f=document.body;if(f){var g=N.xc;x[g>>2]=0;x[g+4>>2]=f.clientWidth;x[g+8>>2]=f.clientHeight;x[g+12>>2]=innerWidth;x[g+16>>2]=innerHeight;x[g+20>>2]=-outerWidth;x[g+24>>2]=outerHeight;x[g+28>>2]=pageXOffset|0;x[g+32>>2]=pageYOffset|0;sb(d)(10,g,b)&&e.preventDefault()}}},Vb:c})},bc=(a,b,c,d,e,f)=>{N.wc||(N.wc=Yb(1552));a=Tb(a);return Xb({target:a,Ac:"touchstart"==f||"touchend"==f,zb:f,Qb:e,Wb:b,Gb:d,$b:g=>{var h={},l=g.touches;for(var k of l)k.Kc=k.Rc=0,h[k.identifier]=k;for(var p of g.changedTouches)p.Kc=1,h[p.identifier]=p;for(var w of g.targetTouches)h[w.identifier].Rc=1;l=N.wc;z[l>>3]=g.timeStamp;q[l+12]=g.ctrlKey;q[l+13]=g.shiftKey;q[l+14]=-g.altKey;q[l+15]=g.metaKey;k=l+16;p=Ub(a);w=0;for(let t of Object.values(h))if(h=k>>2,x[h]=t.identifier,x[h+1]=t.screenX,x[h+2]=t.screenY,x[h+3]=t.clientX,x[h+4]=t.clientY,x[h+5]=t.pageX,x[h+6]=t.pageY,q[k+28]=t.Kc,q[k+29]=t.Rc,x[h+8]=t.clientX-(p.left|0),x[h+9]=t.clientY-(p.top|0),k+=48,31<++w)break;x[l+8>>2]=w;sb(d)(e,l,b)&&g.preventDefault()},Vb:c})},O,cc=a=>{var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=(c,d)=>b.vertexAttribDivisorANGLE(c,d),a.drawArraysInstanced=(c,-d,e,f)=>b.drawArraysInstancedANGLE(c,d,e,f),a.drawElementsInstanced=(c,d,e,f,g)=>b.drawElementsInstancedANGLE(c,d,e,f,g))},dc=a=>{var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=()=>b.createVertexArrayOES(),a.deleteVertexArray=c=>b.deleteVertexArrayOES(c),a.bindVertexArray=c=>b.bindVertexArrayOES(c),a.isVertexArray=c=>b.isVertexArrayOES(c))},ec=a=>{var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=(c,d)=>b.drawBuffersWEBGL(c,d))},fc=a=>{var b="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");-return(a.getSupportedExtensions()||[]).filter(c=>b.includes(c))},gc=1,hc=[],P=[],ic=[],Q=[],jc=[],R=[],kc=[1,1,2,2,4,4,4,2,3,4,8],lc=a=>{for(var b=gc++,c=a.length;c<b;c++)a[c]=null;for(;a[b];)b=gc++;return b},mc=(a,b,c,d)=>{for(var e=0;e<a;e++){var f=O[c](),g=f&&lc(d);f?(f.name=g,d[g]=f):S||=1282;x[b+4*e>>2]=g}},nc=a=>{a=32-Math.clz32(0===a?0:a-1);var b=T.Kb[a];if(b)return b;b=O.getParameter(34965);T.Kb[a]=O.createBuffer();O.bindBuffer(34963,T.Kb[a]);O.bufferData(34963,1<<a,35048);O.bindBuffer(34963,-b);return T.Kb[a]},pc=a=>{oc=!1;for(var b=0;b<T.sc;++b){var c=T.Mb[b];if(c.Xb&&c.enabled){oc=!0;var d=c.size;var e=c.type,f=c.stride;d=0<f?a*f:d*kc[e-5120]*a;e=32-Math.clz32(0===d?0:d-1);f=T.Lb[e];var g=T.Bb[e];T.Bb[e]=T.Bb[e]+1&63;var h=f[g];h?e=h:(h=O.getParameter(34964),f[g]=O.createBuffer(),O.bindBuffer(34962,f[g]),O.bufferData(34962,1<<e,35048),O.bindBuffer(34962,h),e=f[g]);O.bindBuffer(34962,e);O.bufferSubData(34962,0,r.subarray(c.fb,c.fb+d));c.Yc.call(O,b,c.size,c.type,c.Qc,c.stride,0)}}},-rc=(a,b)=>{a.Db||(a.Db=a.getContext,a.getContext=function(d,e){e=a.Db(d,e);return"webgl"==d==e instanceof WebGLRenderingContext?e:null});var c=1<b.Mc?a.getContext("webgl2",b):a.getContext("webgl",b);return c?qc(c,b):0},qc=(a,b)=>{var c=lc(R),d={handle:c,attributes:b,version:b.Mc,Fb:a};a.canvas&&(a.canvas.Zc=d);R[c]=d;if("undefined"==typeof b.Gc||b.Gc)if((a=d)||(a=T),!a.nd){a.nd=!0;b=a.Fb;b.Yd=b.getExtension("WEBGL_multi_draw");b.Nd=b.getExtension("EXT_polygon_offset_clamp");b.Md=b.getExtension("EXT_clip_control");-b.ie=b.getExtension("WEBGL_polygon_mode");cc(b);dc(b);ec(b);b.Kd=b.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");b.Wd=b.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");2<=a.version&&(b.Fc=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.Fc)b.Fc=b.getExtension("EXT_disjoint_timer_query");for(var e of fc(b))e.includes("lose_context")||e.includes("debug")||b.getExtension(e)}d.sc=d.Fb.getParameter(34921);d.Mb=[];for(e=0;e<d.sc;e++)d.Mb[e]={enabled:!1,-Xb:!1,size:0,type:0,Qc:0,stride:0,fb:0,Yc:null};d.Bb=[];d.jc=[];d.Bb.length=d.jc.length=22;d.Lb=[];d.Sb=[];d.Lb.length=d.Sb.length=22;d.Kb=[];d.Kb.length=22;for(e=0;21>=e;++e){d.Kb[e]=null;d.Bb[e]=d.jc[e]=0;d.Lb[e]=[];d.Sb[e]=[];a=d.Lb[e];b=d.Sb[e];a.length=b.length=64;for(var f=0;64>f;++f)a[f]=b[f]=null}return c},S,T,oc,sc=["default","low-power","high-performance"],tc={},vc=()=>{if(!uc){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??-"C").replace("-","_")+".UTF-8",_:da||"./this.program"},b;for(b in tc)void 0===tc[b]?delete a[b]:a[b]=tc[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);uc=c}return uc},uc,wc=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},xc=a=>{var b="/"===a.charAt(0),c="/"===a.slice(-1);(a=wc(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},yc=a=>{var b=-/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.slice(0,-1);return a+b},zc=()=>{if(ca){var a=require("node:crypto");return b=>a.randomFillSync(b)}return b=>crypto.getRandomValues(b)},Bc=a=>{(Bc=zc())(a)},Cc=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=wc(b.split("/").filter(e=>-!!e),!c).join("/");return(c?"/":"")+b||"."},Dc=[],Ec=[];function Fc(a,b){Ec[a]={input:[],output:[],Jb:b};Gc(a,Hc)}-var Hc={open(a){var b=Ec[a.node.rdev];if(!b)throw new U(43);a.tty=b;a.seekable=!1},close(a){a.tty.Jb.fsync(a.tty)},fsync(a){a.tty.Jb.fsync(a.tty)},read(a,b,c,d){if(!a.tty||!a.tty.Jb.Jc)throw new U(60);for(var e=0,f=0;f<d;f++){try{var g=a.tty.Jb.Jc(a.tty)}catch(h){throw new U(29);}if(void 0===g&&0===e)throw new U(6);if(null===g||void 0===g)break;e++;b[c+f]=g}e&&(a.node.atime=Date.now());return e},write(a,b,c,d){if(!a.tty||!a.tty.Jb.tc)throw new U(60);try{for(var e=0;e<d;e++)a.tty.Jb.tc(a.tty,b[c+e])}catch(f){throw new U(29);-}d&&(a.node.mtime=a.node.ctime=Date.now());return e}},Ic={Jc(){a:{if(!Dc.length){var a=null;if(ca){var b=Buffer.alloc(256),c=0,d=process.stdin.fd;try{c=fs.readSync(d,b,0,256)}catch(e){if(e.toString().includes("EOF"))c=0;else throw e;}0<c&&(a=b.slice(0,c).toString("utf-8"))}else globalThis.window?.prompt&&(a=window.prompt("Input: "),null!==a&&(a+="\n"));if(!a){a=null;break a}b=Array(Ib(a)+1);a=K(a,b,0,b.length);b.length=a;Dc=b}a=Dc.shift()}return a},tc(a,b){null===b||10===b?(ka(L(a.output)),a.output=-[]):0!=b&&a.output.push(b)},fsync(a){0<a.output?.length&&(ka(L(a.output)),a.output=[])},Td(){return{Ed:25856,Gd:5,Dd:191,Fd:35387,Cd:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Ud(){return 0},Vd(){return[24,80]}},Jc={tc(a,b){null===b||10===b?(n(L(a.output)),a.output=[]):0!=b&&a.output.push(b)},fsync(a){0<a.output?.length&&(n(L(a.output)),a.output=[])}},V={ub:null,xb(){return V.createNode(null,"/",16895,0)},createNode(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new U(63);-V.ub||(V.ub={dir:{node:{Ab:V.eb.Ab,wb:V.eb.wb,lookup:V.eb.lookup,fc:V.eb.fc,rename:V.eb.rename,unlink:V.eb.unlink,rmdir:V.eb.rmdir,readdir:V.eb.readdir,symlink:V.eb.symlink},stream:{tb:V.gb.tb}},file:{node:{Ab:V.eb.Ab,wb:V.eb.wb},stream:{tb:V.gb.tb,read:V.gb.read,write:V.gb.write,Nc:V.gb.Nc,Pc:V.gb.Pc}},link:{node:{Ab:V.eb.Ab,wb:V.eb.wb,readlink:V.eb.readlink},stream:{}},Cc:{node:{Ab:V.eb.Ab,wb:V.eb.wb},stream:Kc}});c=Lc(a,b,c,d);16384===(c.mode&61440)?(c.eb=V.ub.dir.node,c.gb=V.ub.dir.stream,c.cb=-{}):32768===(c.mode&61440)?(c.eb=V.ub.file.node,c.gb=V.ub.file.stream,c.kb=0,c.cb=null):40960===(c.mode&61440)?(c.eb=V.ub.link.node,c.gb=V.ub.link.stream):8192===(c.mode&61440)&&(c.eb=V.ub.Cc.node,c.gb=V.ub.Cc.stream);c.atime=c.mtime=c.ctime=Date.now();a&&(a.cb[b]=c,a.atime=a.mtime=a.ctime=c.atime);return c},Rd(a){return a.cb?a.cb.subarray?a.cb.subarray(0,a.kb):new Uint8Array(a.cb):new Uint8Array(0)},eb:{Ab(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;-b.gid=0;b.rdev=a.rdev;16384===(a.mode&61440)?b.size=4096:32768===(a.mode&61440)?b.size=a.kb:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.atime);b.mtime=new Date(a.mtime);b.ctime=new Date(a.ctime);b.blksize=4096;b.blocks=Math.ceil(b.size/b.blksize);return b},wb(a,b){for(var c of["mode","atime","mtime","ctime"])null!=b[c]&&(a[c]=b[c]);void 0!==b.size&&(b=b.size,a.kb!=b&&(0==b?(a.cb=null,a.kb=0):(c=a.cb,a.cb=new Uint8Array(b),c&&a.cb.set(c.subarray(0,Math.min(b,a.kb))),a.kb=-b)))},lookup(){V.kc||(V.kc=new U(44),V.kc.stack="<generic error, no stack>");throw V.kc;},fc(a,b,c,d){return V.createNode(a,b,c,d)},rename(a,b,c){try{var d=Mc(b,c)}catch(f){}if(d){if(16384===(a.mode&61440))for(var e in d.cb)throw new U(55);e=Nc(d.parent.id,d.name);if(W[e]===d)W[e]=d.Ib;else for(e=W[e];e;){if(e.Ib===d){e.Ib=d.Ib;break}e=e.Ib}}delete a.parent.cb[a.name];b.cb[c]=a;a.name=c;b.ctime=b.mtime=a.parent.ctime=a.parent.mtime=Date.now()},unlink(a,b){delete a.cb[b];a.ctime=a.mtime=Date.now()},-rmdir(a,b){var c=Mc(a,b),d;for(d in c.cb)throw new U(55);delete a.cb[b];a.ctime=a.mtime=Date.now()},readdir(a){return[".","..",...Object.keys(a.cb)]},symlink(a,b,c){a=V.createNode(a,b,41471,0);a.link=c;return a},readlink(a){if(40960!==(a.mode&61440))throw new U(28);return a.link}},gb:{read(a,b,c,d,e){var f=a.node.cb;if(e>=a.node.kb)return 0;a=Math.min(a.node.kb-e,d);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write(a,b,c,d,e,f){b.buffer===q.buffer&&(f=-!1);if(!d)return 0;a=a.node;a.mtime=a.ctime=Date.now();if(b.subarray&&(!a.cb||a.cb.subarray)){if(f)return a.cb=b.subarray(c,c+d),a.kb=d;if(0===a.kb&&0===e)return a.cb=b.slice(c,c+d),a.kb=d;if(e+d<=a.kb)return a.cb.set(b.subarray(c,c+d),e),d}f=e+d;var g=a.cb?a.cb.length:0;g>=f||(f=Math.max(f,g*(1048576>g?2:1.125)>>>0),0!=g&&(f=Math.max(f,256)),g=a.cb,a.cb=new Uint8Array(f),0<a.kb&&a.cb.set(g.subarray(0,a.kb),0));if(a.cb.subarray&&b.subarray)a.cb.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.cb[e+-f]=b[c+f];a.kb=Math.max(a.kb,e+d);return d},tb(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.kb);if(0>b)throw new U(28);return b},Nc(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new U(43);a=a.node.cb;if(e&2||!a||a.buffer!==q.buffer){d=!0;wa();e=void 0;if(!e)throw new U(48);if(a){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);q.set(a,e)}}else d=!1,e=a.byteOffset;return{fb:e,Ad:d}},Pc(a,b,c,d){V.gb.write(a,b,0,d,c,!1);return 0}}},-Oc=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},Pc=null,Qc={},Rc=[],Sc=1,W=null,Tc=!1,Uc=!0,Vc={},U=class{name="ErrnoError";constructor(a){this.Pb=a}},Wc=class{Db={};node=null;get flags(){return this.Db.flags}set flags(a){this.Db.flags=a}get position(){return this.Db.position}set position(a){this.Db.position=a}},Xc=class{eb={};gb={};hc=null;constructor(a,b,c,d){a||=this;this.parent=a;this.xb=a.xb;this.id=Sc++;this.name=b;this.mode=c;this.rdev=d;this.atime=this.mtime=this.ctime=Date.now()}get read(){return 365===-(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}};-function Yc(a,b={}){if(!a)throw new U(44);b.mc??(b.mc=!0);"/"===a.charAt(0)||(a="//"+a);var c=0;a:for(;40>c;c++){a=a.split("/").filter(h=>!!h);for(var d=Pc,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;if("."!==a[f])if(".."===a[f])if(e=yc(e),d===d.parent){a=e+"/"+a.slice(f+1).join("/");c--;continue a}else d=d.parent;else{e=xc(e+"/"+a[f]);try{d=Mc(d,a[f])}catch(h){if(44===h?.Pb&&g&&b.qd)return{path:e};throw h;}!d.hc||g&&!b.mc||(d=d.hc.root);if(40960===(d.mode&61440)&&(!g||b.lc)){if(!d.eb.readlink)throw new U(52);-d=d.eb.readlink(d);"/"===d.charAt(0)||(d=yc(e)+"/"+d);a=d+"/"+a.slice(f+1).join("/");continue a}}}return{path:e,node:d}}throw new U(32);}function Nc(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%W.length}function Mc(a,b){var c=16384===(a.mode&61440)?(c=Zc(a,"x"))?c:a.eb.lookup?0:2:54;if(c)throw new U(c);for(c=W[Nc(a.id,b)];c;c=c.Ib){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.eb.lookup(a,b)}-function Lc(a,b,c,d){a=new Xc(a,b,c,d);b=Nc(a.parent.id,a.name);a.Ib=W[b];return W[b]=a}function $c(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Zc(a,b){if(Uc)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function ad(a,b){if(16384!==(a.mode&61440))return 54;try{return Mc(a,b),20}catch(c){}return Zc(a,"wx")}function bd(a){a=Rc[a];if(!a)throw new U(8);return a}-function cd(a,b){var c=null?.gb.wb,d=c?null:a;c??=a.eb.wb;if(!c)throw new U(63);c(d,b)}var Kc={open(a){a.gb=Qc[a.node.rdev].gb;a.gb.open?.(a)},tb(){throw new U(70);}};function Gc(a,b){Qc[a]={gb:b}}function dd(a,b){var c="/"===b;if(c&&Pc)throw new U(10);if(!c&&b){var d=Yc(b,{mc:!1});b=d.path;d=d.node;if(d.hc)throw new U(10);if(16384!==(d.mode&61440))throw new U(54);}b={type:a,Zd:{},Oc:b,pd:[]};a=a.xb(b);a.xb=b;b.root=a;c?Pc=a:d&&(d.hc=b,d.xb&&d.xb.pd.push(b))}-function ed(a,b,c){var d=Yc(a,{parent:!0}).node;a=a&&a.match(/([^\/]+|\/)\/*$/)[1];if(!a)throw new U(28);if("."===a||".."===a)throw new U(20);var e=ad(d,a);if(e)throw new U(e);if(!d.eb.fc)throw new U(63);return d.eb.fc(d,a,b,c)}function X(a){return ed(a,16895,0)}function fd(a,b,c){"undefined"==typeof c&&(c=b,b=438);ed(a,b|8192,c)}-function gd(a,b){if(!Cc(a))throw new U(44);var c=Yc(b,{parent:!0}).node;if(!c)throw new U(44);b=b&&b.match(/([^\/]+|\/)\/*$/)[1];var d=ad(c,b);if(d)throw new U(d);if(!c.eb.symlink)throw new U(63);c.eb.symlink(c,b,a)}-function hd(a,b){if(""===a)throw new U(44);if("string"==typeof b){var c={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof c)throw Error(`Unknown file open mode: ${b}`);b=c}c=b&64?33206:0;if("object"==typeof a)var d=a;else{var e=a.endsWith("/");a=Yc(a,{lc:!(b&131072),qd:!0});d=a.node;a=a.path}var f=!1;if(b&64)if(d){if(b&128)throw new U(20);}else{if(e)throw new U(31);d=ed(a,c|511,0);f=!0}if(!d)throw new U(44);8192===(d.mode&61440)&&(b&=-513);if(b&65536&&16384!==(d.mode&61440))throw new U(54);-if(!f&&(e=d?40960===(d.mode&61440)?32:16384===(d.mode&61440)&&("r"!==$c(b)||b&576)?31:Zc(d,$c(b)):44))throw new U(e);if(b&512&&!f){e=d;e="string"==typeof e?Yc(e,{lc:!0}).node:e;if(16384===(e.mode&61440))throw new U(31);if(32768!==(e.mode&61440))throw new U(28);var g=Zc(e,"w");if(g)throw new U(g);cd(e,{size:0,timestamp:Date.now()})}b&=-131713;a:for(e=d;;){if(e===e.parent){e=e.xb.Oc;var h=h?"/"!==e[e.length-1]?`${e}/${h}`:e+h:e;break a}h=h?`${e.name}/${h}`:e.name;e=e.parent}h={node:d,path:h,flags:b,-seekable:!0,position:0,gb:d.gb,zd:[],error:!1};e=-1;h=Object.assign(new Wc,h);if(-1==e)a:{for(e=0;4096>=e;e++)if(!Rc[e])break a;throw new U(33);}h.fd=e;Rc[e]=h;h.gb.open&&h.gb.open(h);f&&(c&=511,d="string"==typeof d?Yc(d,{lc:!0}).node:d,cd(d,{mode:c&4095|d.mode&-4096,ctime:Date.now(),Ld:void 0}));!m.logReadFiles||b&1||a in Vc||(Vc[a]=1)}function jd(a,b,c){if(null===a.fd)throw new U(8);if(!a.seekable||!a.gb.tb)throw new U(70);if(0!=c&&1!=c&&2!=c)throw new U(28);a.position=a.gb.tb(a,b,c);a.zd=[]}-function Y(a,b,c){a=xc("/dev/"+a);var d=Oc(!!b,!!c);Y.Lc??(Y.Lc=64);var e=Y.Lc++<<8|0;Gc(e,{open(f){f.seekable=!1},close(){c?.buffer?.length&&c(10)},read(f,g,h,l){for(var k=0,p=0;p<l;p++){try{var w=b()}catch(t){throw new U(29);}if(void 0===w&&0===k)throw new U(6);if(null===w||void 0===w)break;k++;g[h+p]=w}k&&(f.node.atime=Date.now());return k},write(f,g,h,l){for(var k=0;k<l;k++)try{c(g[h+k])}catch(p){throw new U(29);}l&&(f.node.mtime=f.node.ctime=Date.now());return k}});fd(a,d,e)}-var kd={},ld=a=>"]"==a.slice(-1)&&a.lastIndexOf("["),md=a=>{a-=5120;return 0==a?q:1==a?r:2==a?u:4==a?x:6==a?pa:5==a||28922==a||28520==a||30779==a||30782==a?y:v},nd=(a,b,c,d,e)=>{a=md(a);b=d*(c*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*a.BYTES_PER_ELEMENT+4-1&-4);return a.subarray(e>>>31-Math.clz32(a.BYTES_PER_ELEMENT),e+b>>>31-Math.clz32(a.BYTES_PER_ELEMENT))},od=a=>{var b=O.bd;if(b){var c=b.Tb[a];"number"==typeof c&&(b.Tb[a]=c=O.getUniformLocation(b,b.Vc[a]+(0<c?-`[${c}]`:"")));return c}S||=1282},pd=[],qd=[],ud=(a,b,c,d)=>{var e={string:k=>{var p=0;if(null!==k&&void 0!==k&&0!==k){p=Ib(k)+1;var w=rd(p);K(k,r,w,p);p=w}return p},array:k=>{var p=rd(k.length);q.set(k,p);return p}};a=m["_"+a];var f=[],g=0;if(d)for(var h=0;h<d.length;h++){var l=e[c[h]];l?(0===g&&(g=sd()),f[h]=l(d[h])):f[h]=d[h]}c=a(...f);return c=function(k){0!==g&&td(g);return"string"===b?k?L(r,k):"":"boolean"===b?!!k:k}(c)};-(()=>{let a=Ya.prototype;Object.assign(a,{isAliasOf:function(c){if(!(this instanceof Ya&&c instanceof Ya))return!1;var d=this.bb.jb.hb,e=this.bb.fb;c.bb=c.bb;var f=c.bb.jb.hb;for(c=c.bb.fb;d.pb;)e=d.Ub(e),d=d.pb;for(;f.pb;)c=f.Ub(c),f=f.pb;return d===f&&e===c},clone:function(){this.bb.fb||Ta(this);if(this.bb.Rb)return this.bb.count.value+=1,this;var c=Wa,d=Object,e=d.create,f=Object.getPrototypeOf(this),g=this.bb;c=c(e.call(d,f,{bb:{value:{count:g.count,Ob:g.Ob,Rb:g.Rb,fb:g.fb,jb:g.jb,ob:g.ob,sb:g.sb}}}));-c.bb.count.value+=1;c.bb.Ob=!1;return c},["delete"](){this.bb.fb||Ta(this);if(this.bb.Ob&&!this.bb.Rb)throw new H("Object already scheduled for deletion");Va(this);var c=this.bb;--c.count.value;0===c.count.value&&(c.ob?c.sb.vb(c.ob):c.jb.hb.vb(c.fb));this.bb.Rb||(this.bb.ob=void 0,this.bb.fb=void 0)},isDeleted:function(){return!this.bb.fb},deleteLater:function(){this.bb.fb||Ta(this);if(this.bb.Ob&&!this.bb.Rb)throw new H("Object already scheduled for deletion");Xa.push(this);this.bb.Ob=!0;return this}});+ha=async a=>{if(ja(a))return new Promise((c,d)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?c(e.response):d(e.status)};e.onerror=d;e.send(null)});var b=await fetch(a,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url);}}var ka=console.log.bind(console),n=console.error.bind(console),la,ma=!1,ja=a=>a.startsWith("file://"),na,oa,q,t,u,pa,v,x,qa,ra,sa,ta,ua=!1;+function va(){var a=wa.buffer;q=new Int8Array(a);u=new Int16Array(a);h.HEAPU8=t=new Uint8Array(a);pa=new Uint16Array(a);v=new Int32Array(a);h.HEAPU32=x=new Uint32Array(a);h.HEAPF32=qa=new Float32Array(a);ra=new Float64Array(a);sa=new BigInt64Array(a);ta=new BigUint64Array(a)}function z(a){h.onAbort?.(a);a="Aborted("+a+")";n(a);ma=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");oa?.(a);throw a;}var xa;+async function ya(a){if(!la)try{var b=await ha(a);return new Uint8Array(b)}catch{}if(a==xa&&la)a=new Uint8Array(la);else if(ia)a=ia(a);else throw"both async and sync fetching of the wasm failed";return a}async function za(a,b){try{var c=await ya(a);return await WebAssembly.instantiate(c,b)}catch(d){n(`failed to asynchronously prepare wasm: ${d}`),z(d)}}+async function Aa(a){var b=xa;if(!la&&!ja(b)&&!ca)try{var c=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,a)}catch(d){n(`wasm streaming compile failed: ${d}`),n("falling back to ArrayBuffer instantiation")}return za(b,a)}var Ba=a=>{for(;0<a.length;)a.shift()(h)},Ca=[],Da=[],Ea=()=>{var a=h.preRun.shift();Da.push(a)};class Fa{constructor(a){this.ib=a-24}fc(a,b){x[this.ib+16>>2]=0;x[this.ib+4>>2]=a;x[this.ib+8>>2]=b}}+var Ga=0,Ha=0,B=()=>{var a=v[+Ia>>2];Ia+=4;return a},Ja=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ka=a=>{var b="/"===a.charAt(0),c="/"===a.slice(-1);(a=Ja(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},La=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";+b&&=b.slice(0,-1);return a+b},Ma=a=>a&&a.match(/([^\/]+|\/)\/*$/)[1],Na=(a,b)=>Ka(a+"/"+b),Oa=()=>{if(ca){var a=require("node:crypto");return b=>a.randomFillSync(b)}return b=>crypto.getRandomValues(b)},Pa=a=>{(Pa=Oa())(a)},Qa=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:C.cwd();if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Ja(b.split("/").filter(e=>!!e),!c).join("/");return(c?"/":"")+b||"."},+Ra=(a,b)=>{function c(g){for(var k=0;k<g.length&&""===g[k];k++);for(var m=g.length-1;0<=m&&""===g[m];m--);return k>m?[]:g.slice(k,m-k+1)}a=Qa(a).slice(1);b=Qa(b).slice(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),e=d,f=0;f<d;f++)if(a[f]!==b[f]){e=f;break}d=[];for(f=e;f<a.length;f++)d.push("..");d=d.concat(b.slice(e));return d.join("/")},Sa=globalThis.TextDecoder&&new TextDecoder,Ta=(a,b,c,d)=>{c=b+c;if(d)return c;for(;a[b]&&!(b>=c);)++b;return b},D=(a,b=0,c,d)=>{c=+Ta(a,b,c,d);if(16<c-b&&a.buffer&&Sa)return Sa.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},Ua=[],Va=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=+d?(b+=4,++c):b+=3}return b},G=(a,b,c,d)=>{if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.codePointAt(f);if(127>=g){if(c>=d)break;b[c++]=g}else if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6;b[c++]=128|g&63}else if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12;b[c++]=128|g>>6&63;b[c++]=128|g&63}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63;b[c++]=128|g>>6&63;b[c++]=128|g&63;f++}}b[c]=0;return c-e},Wa=a=>{var b=Array(Va(a)+1);a=G(a,b,0,b.length);b.length=a;return b},Xa=+[];function Ya(a,b){Xa[a]={input:[],output:[],Gb:b};Za(a,$a)}+var $a={open(a){var b=Xa[a.node.rdev];if(!b)throw new C.cb(43);a.tty=b;a.seekable=!1},close(a){a.tty.Gb.fsync(a.tty)},fsync(a){a.tty.Gb.fsync(a.tty)},read(a,b,c,d){if(!a.tty||!a.tty.Gb.Pc)throw new C.cb(60);for(var e=0,f=0;f<d;f++){try{var g=a.tty.Gb.Pc(a.tty)}catch(k){throw new C.cb(29);}if(void 0===g&&0===e)throw new C.cb(6);if(null===g||void 0===g)break;e++;b[c+f]=g}e&&(a.node.atime=Date.now());return e},write(a,b,c,d){if(!a.tty||!a.tty.Gb.Bc)throw new C.cb(60);try{for(var e=0;e<d;e++)a.tty.Gb.Bc(a.tty,+b[c+e])}catch(f){throw new C.cb(29);}d&&(a.node.mtime=a.node.ctime=Date.now());return e}},ab={Pc(){a:{if(!Ua.length){var a=null;if(ca){var b=Buffer.alloc(256),c=0,d=process.stdin.fd;try{c=fs.readSync(d,b,0,256)}catch(e){if(e.toString().includes("EOF"))c=0;else throw e;}0<c&&(a=b.slice(0,c).toString("utf-8"))}else globalThis.window?.prompt&&(a=window.prompt("Input: "),null!==a&&(a+="\n"));if(!a){a=null;break a}Ua=Wa(a)}a=Ua.shift()}return a},Bc(a,b){null===b||10===b?(ka(D(a.output)),a.output=[]):0!=+b&&a.output.push(b)},fsync(a){0<a.output?.length&&(ka(D(a.output)),a.output=[])},zd(){return{Wd:25856,Yd:5,Vd:191,Xd:35387,Ud:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Ad(){return 0},Bd(){return[24,80]}},bb={Bc(a,b){null===b||10===b?(n(D(a.output)),a.output=[]):0!=b&&a.output.push(b)},fsync(a){0<a.output?.length&&(n(D(a.output)),a.output=[])}},H={Cb:null,lb(){return H.createNode(null,"/",16895,0)},createNode(a,b,c,d){if(24576===(c&61440)||C.isFIFO(c))throw new C.cb(63);+H.Cb||(H.Cb={dir:{node:{zb:H.fb.zb,Bb:H.fb.Bb,lookup:H.fb.lookup,Eb:H.fb.Eb,rename:H.fb.rename,unlink:H.fb.unlink,rmdir:H.fb.rmdir,readdir:H.fb.readdir,symlink:H.fb.symlink},stream:{tb:H.gb.tb}},file:{node:{zb:H.fb.zb,Bb:H.fb.Bb},stream:{tb:H.gb.tb,read:H.gb.read,write:H.gb.write,Pb:H.gb.Pb,Yb:H.gb.Yb}},link:{node:{zb:H.fb.zb,Bb:H.fb.Bb,readlink:H.fb.readlink},stream:{}},Fc:{node:{zb:H.fb.zb,Bb:H.fb.Bb},stream:C.hd}});c=C.createNode(a,b,c,d);K(c.mode)?(c.fb=H.Cb.dir.node,c.gb=H.Cb.dir.stream,c.hb=+{}):C.isFile(c.mode)?(c.fb=H.Cb.file.node,c.gb=H.Cb.file.stream,c.nb=0,c.hb=null):40960===(c.mode&61440)?(c.fb=H.Cb.link.node,c.gb=H.Cb.link.stream):8192===(c.mode&61440)&&(c.fb=H.Cb.Fc.node,c.gb=H.Cb.Fc.stream);c.atime=c.mtime=c.ctime=Date.now();a&&(a.hb[b]=c,a.atime=a.mtime=a.ctime=c.atime);return c},je(a){return a.hb?a.hb.subarray?a.hb.subarray(0,a.nb):new Uint8Array(a.hb):new Uint8Array(0)},fb:{zb(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=+0;b.rdev=a.rdev;K(a.mode)?b.size=4096:C.isFile(a.mode)?b.size=a.nb:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.atime);b.mtime=new Date(a.mtime);b.ctime=new Date(a.ctime);b.blksize=4096;b.blocks=Math.ceil(b.size/b.blksize);return b},Bb(a,b){for(var c of["mode","atime","mtime","ctime"])null!=b[c]&&(a[c]=b[c]);void 0!==b.size&&(b=b.size,a.nb!=b&&(0==b?(a.hb=null,a.nb=0):(c=a.hb,a.hb=new Uint8Array(b),c&&a.hb.set(c.subarray(0,Math.min(b,a.nb))),a.nb=b)))},lookup(){H.oc||(H.oc=+new C.cb(44),H.oc.stack="<generic error, no stack>");throw H.oc;},Eb(a,b,c,d){return H.createNode(a,b,c,d)},rename(a,b,c){try{var d=L(b,c)}catch(f){}if(d){if(K(a.mode))for(var e in d.hb)throw new C.cb(55);cb(d)}delete a.parent.hb[a.name];b.hb[c]=a;a.name=c;b.ctime=b.mtime=a.parent.ctime=a.parent.mtime=Date.now()},unlink(a,b){delete a.hb[b];a.ctime=a.mtime=Date.now()},rmdir(a,b){var c=L(a,b),d;for(d in c.hb)throw new C.cb(55);delete a.hb[b];a.ctime=a.mtime=Date.now()},readdir(a){return[".","..",...Object.keys(a.hb)]},+symlink(a,b,c){a=H.createNode(a,b,41471,0);a.link=c;return a},readlink(a){if(40960!==(a.mode&61440))throw new C.cb(28);return a.link}},gb:{read(a,b,c,d,e){var f=a.node.hb;if(e>=a.node.nb)return 0;a=Math.min(a.node.nb-e,d);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write(a,b,c,d,e,f){b.buffer===q.buffer&&(f=!1);if(!d)return 0;a=a.node;a.mtime=a.ctime=Date.now();if(b.subarray&&(!a.hb||a.hb.subarray)){if(f)return a.hb=b.subarray(c,c+d),a.nb=d;if(0===a.nb&&+0===e)return a.hb=b.slice(c,c+d),a.nb=d;if(e+d<=a.nb)return a.hb.set(b.subarray(c,c+d),e),d}f=e+d;var g=a.hb?a.hb.length:0;g>=f||(f=Math.max(f,g*(1048576>g?2:1.125)>>>0),0!=g&&(f=Math.max(f,256)),g=a.hb,a.hb=new Uint8Array(f),0<a.nb&&a.hb.set(g.subarray(0,a.nb),0));if(a.hb.subarray&&b.subarray)a.hb.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.hb[e+f]=b[c+f];a.nb=Math.max(a.nb,e+d);return d},tb(a,b,c){1===c?b+=a.position:2===c&&C.isFile(a.node.mode)&&(b+=a.node.nb);if(0>b)throw new C.cb(28);return b},+Pb(a,b,c,d,e){if(!C.isFile(a.node.mode))throw new C.cb(43);a=a.node.hb;if(e&2||!a||a.buffer!==q.buffer){d=!0;z();e=void 0;if(!e)throw new C.cb(48);if(a){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);q.set(a,e)}}else d=!1,e=a.byteOffset;return{ib:e,Qd:d}},Yb(a,b,c,d){H.gb.write(a,b,0,d,c,!1);return 0}}},db=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},eb=async a=>{a=await ha(a);return new Uint8Array(a)},fb=0,gb=null,hb=()=>{fb--;h.monitorRunDependencies?.(fb);+if(0==fb&&gb){var a=gb;gb=null;a()}},ib=()=>{fb++;h.monitorRunDependencies?.(fb)},jb=[],kb=async(a,b)=>{"undefined"!=typeof Browser&&Browser.fc();for(var c of jb)if(c.canHandle(b))return c.handle(a,b);return a},mb=async(a,b,c,d,e,f,g,k)=>{var m=b?Qa(Ka(a+"/"+b)):a,l=`cp ${m}`;ib(l);try{var p=c;"string"==typeof c&&(p=await eb(c));p=await kb(p,m);k?.();f||lb(a,b,p,d,e,g)}finally{hb(l)}};function Za(a,b){C.Jc[a]={gb:b}}function K(a){return 16384===(a&61440)}+function L(a,b){var c=K(a.mode)?(c=nb(a,"x"))?c:a.fb.lookup?0:2:54;if(c)throw new C.cb(c);for(c=C.Fb[ob(a.id,b)];c;c=c.Mb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return C.lookup(a,b)}function cb(a){var b=ob(a.parent.id,a.name);if(C.Fb[b]===a)C.Fb[b]=a.Mb;else for(b=C.Fb[b];b;){if(b.Mb===a){b.Mb=a.Mb;break}b=b.Mb}}+function lb(a,b,c,d,e,f){var g=b;a&&(a="string"==typeof a?a:pb(a),g=b?Ka(a+"/"+b):a);a=db(d,e);g=C.create(g,a);if(c){if("string"==typeof c){b=Array(c.length);d=0;for(e=c.length;d<e;++d)b[d]=c.charCodeAt(d);c=b}C.chmod(g,a|146);b=C.open(g,577);C.write(b,c,0,c.length,0,f);C.close(b);C.chmod(g,a)}}+function M(a,b={}){if(!a)throw new C.cb(44);b.ec??(b.ec=!0);"/"===a.charAt(0)||(a=C.cwd()+"/"+a);var c=0;a:for(;40>c;c++){a=a.split("/").filter(k=>!!k);for(var d=C.root,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;if("."!==a[f])if(".."===a[f])if(e=La(e),C.vc(d)){a=e+"/"+a.slice(f+1).join("/");c--;continue a}else d=d.parent;else{e=Ka(e+"/"+a[f]);try{d=L(d,a[f])}catch(k){if(44===k?.xb&&g&&b.Gd)return{path:e};throw k;}!d.Ab||g&&!b.ec||(d=d.Ab.root);if(40960===(d.mode&61440)&&(!g||+b.yb)){if(!d.fb.readlink)throw new C.cb(52);d=d.fb.readlink(d);"/"===d.charAt(0)||(d=La(e)+"/"+d);a=d+"/"+a.slice(f+1).join("/");continue a}}}return{path:e,node:d}}throw new C.cb(32);}function pb(a){for(var b;;){if(C.vc(a))return a=a.lb.Sc,b?"/"!==a[a.length-1]?`${a}/${b}`:a+b:a;b=b?`${a.name}/${b}`:a.name;a=a.parent}}function ob(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%C.Fb.length}function qb(a){var b=ob(a.parent.id,a.name);a.Mb=C.Fb[b];C.Fb[b]=a}+function rb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function nb(a,b){if(C.Rc)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function sb(a,b){if(!K(a.mode))return 54;try{return L(a,b),20}catch(c){}return nb(a,"wx")}+function tb(a,b,c){try{var d=L(a,b)}catch(e){return e.xb}if(a=nb(a,"wx"))return a;if(c){if(!K(d.mode))return 54;if(C.vc(d)||pb(d)===C.cwd())return 10}else if(K(d.mode))return 31;return 0}function ub(a,b){if(!a)throw new C.cb(b);return a}function O(a){a=C.td(a);if(!a)throw new C.cb(8);return a}function vb(a,b=-1){a=Object.assign(new C.dd,a);if(-1==b)a:{for(b=0;b<=C.gd;b++)if(!C.streams[b])break a;throw new C.cb(33);}a.fd=b;return C.streams[b]=a}+function wb(a,b=-1){a=vb(a,b);a.gb?.be?.(a);return a}function xb(a,b,c){var d=a?.gb.Bb;a=d?a:b;d??=b.fb.Bb;ub(d,63);d(a,c)}function yb(a){var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push(...c.Xb)}return b}function zb(a){var b={Td:4096,ge:4096,blocks:1E6,Sd:5E5,Rd:5E5,files:C.Ac,ee:C.Ac-1,he:42,flags:2,oe:255};a.fb.Xc&&Object.assign(b,a.fb.Xc(a.lb.Hd.root));return b}function Bb(a,b,c){"undefined"==typeof c&&(c=b,b=438);return C.Eb(a,b|8192,c)}+function Cb(a,b,c,d){xb(a,b,{mode:c&4095|b.mode&-4096,ctime:Date.now(),Lc:d})}function Db(a,b,c){if(K(b.mode))throw new C.cb(31);if(!C.isFile(b.mode))throw new C.cb(28);var d=nb(b,"w");if(d)throw new C.cb(d);xb(a,b,{size:c,timestamp:Date.now()})}function Eb(a,b){a="string"==typeof a?a:pb(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=Ka(a+"/"+c);try{C.mkdir(d)}catch(e){if(20!=e.xb)throw e;}a=d}}return d}+function Fb(a,b,c,d){a="string"==typeof a?a:pb(a);b=Ka(a+"/"+b);return C.create(b,db(c,d))}function Gb(a){if(!(a.Cd||a.Dd||a.link||a.hb))if(globalThis.XMLHttpRequest)z("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{a.hb=ia(a.url)}catch(b){throw new C.cb(29);}}+function Hb(a,b,c,d,e){class f{pc=!1;ub=[];Wb=void 0;Oc=0;Mc=0;get(l){if(!(l>this.length-1||0>l)){var p=l%this.chunkSize;return this.Wb(l/this.chunkSize|0)[p]}}wd(l){this.Wb=l}Qc(){var l=new XMLHttpRequest;l.open("HEAD",c,!1);l.send(null);200<=l.status&&300>l.status||304===l.status||z("Couldn't load "+c+". Status: "+l.status);var p=Number(l.getResponseHeader("Content-length")),r,w=(r=l.getResponseHeader("Accept-Ranges"))&&"bytes"===r;l=(r=l.getResponseHeader("Content-Encoding"))&&"gzip"===r;var y=+1048576;w||(y=p);var A=this;A.wd(E=>{var I=E*y,N=(E+1)*y-1;N=Math.min(N,p-1);if("undefined"==typeof A.ub[E]){var J=A.ub;I>N&&z("invalid range ("+I+", "+N+") or no bytes requested!");N>p-1&&z("only "+p+" bytes available! programmer error!");var F=new XMLHttpRequest;F.open("GET",c,!1);p!==y&&F.setRequestHeader("Range","bytes="+I+"-"+N);F.responseType="arraybuffer";F.overrideMimeType&&F.overrideMimeType("text/plain; charset=x-user-defined");F.send(null);200<=F.status&&300>F.status||304===F.status||z("Couldn't load "++c+". Status: "+F.status);I=void 0!==F.response?new Uint8Array(F.response||[]):Wa(F.responseText||"");J[E]=I}"undefined"==typeof A.ub[E]&&z("doXHR failed!");return A.ub[E]});if(l||!p)y=p=1,y=p=this.Wb(0).length,ka("LazyFiles on gzip forces download of the whole file when length is accessed");this.Oc=p;this.Mc=y;this.pc=!0}get length(){this.pc||this.Qc();return this.Oc}get chunkSize(){this.pc||this.Qc();return this.Mc}}if(globalThis.XMLHttpRequest){ba||z("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");+var g=new f;var k=void 0}else k=c,g=void 0;var m=Fb(a,b,d,e);g?m.hb=g:k&&(m.hb=null,m.url=k);Object.defineProperties(m,{nb:{get:function(){return this.hb.length}}});a={};for(const [l,p]of Object.entries(m.gb))a[l]=(...r)=>{Gb(m);return p(...r)};a.read=(l,p,r,w,y)=>{Gb(m);l=l.node.hb;if(y>=l.length)p=0;else{w=Math.min(l.length-y,w);if(l.slice)for(var A=0;A<w;A++)p[r+A]=l[y+A];else for(A=0;A<w;A++)p[r+A]=l.get(y+A);p=w}return p};a.Pb=()=>{Gb(m);z();throw new C.cb(48);};m.gb=a;return m}+var C={root:null,Xb:[],Jc:{},streams:[],Ac:1,Fb:null,Gc:"/",sc:!1,Rc:!0,pd:null,mc:0,Vc:{},cb:class{name="ErrnoError";constructor(a){this.xb=a}},dd:class{ub={};node=null;get object(){return this.node}set object(a){this.node=a}get flags(){return this.ub.flags}set flags(a){this.ub.flags=a}get position(){return this.ub.position}set position(a){this.ub.position=a}},cd:class{fb={};gb={};Ab=null;constructor(a,b,c,d){a||=this;this.parent=a;this.lb=a.lb;this.id=C.Ac++;this.name=b;this.mode=c;this.rdev=d;+this.atime=this.mtime=this.ctime=Date.now()}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}get Dd(){return K(this.mode)}get Cd(){return 8192===(this.mode&61440)}},createNode(a,b,c,d){a=new C.cd(a,b,c,d);qb(a);return a},vc(a){return a===a.parent},isFile(a){return 32768===(a&61440)},isFIFO(a){return 4096===(a&61440)},isSocket(a){return 49152===(a&49152)},gd:4096,td:a=>C.streams[a],+hd:{open(a){a.gb=C.rd(a.node.rdev).gb;a.gb.open?.(a)},tb(){throw new C.cb(70);}},xc:a=>a>>8,le:a=>a&255,Lb:(a,b)=>a<<8|b,rd:a=>C.Jc[a],Yc(a,b){function c(k){C.mc--;return b(k)}function d(k){if(k){if(!d.md)return d.md=!0,c(k)}else++f>=e.length&&c(null)}"function"==typeof a&&(b=a,a=!1);C.mc++;1<C.mc&&n(`warning: ${C.mc} FS.syncfs operations in flight at once, probably just doing extra work`);var e=yb(C.root.lb),f=0,g;for(g of e)g.type.Yc?g.type.Yc(g,a,d):d(null)},lb(a,b,c){var d="/"===c;if(d&&C.root)throw new C.cb(10);+if(!d&&c){var e=M(c,{ec:!1});c=e.path;e=e.node;if(e.Ab)throw new C.cb(10);if(!K(e.mode))throw new C.cb(54);}b={type:a,Hd:b,Sc:c,Xb:[]};a=a.lb(b);a.lb=b;b.root=a;d?C.root=a:e&&(e.Ab=b,e.lb&&e.lb.Xb.push(b));return a},we(a){a=M(a,{ec:!1});if(!a.node.Ab)throw new C.cb(28);a=a.node;var b=a.Ab,c=yb(b);for([,e]of Object.entries(C.Fb))for(;e;){var d=e.Mb;c.includes(e.lb)&&cb(e);var e=d}a.Ab=null;a.lb.Xb.splice(a.lb.Xb.indexOf(b),1)},lookup(a,b){return a.fb.lookup(a,b)},Eb(a,b,c){var d=M(a,{parent:!0}).node;+a=Ma(a);if(!a)throw new C.cb(28);if("."===a||".."===a)throw new C.cb(20);var e=sb(d,a);if(e)throw new C.cb(e);if(!d.fb.Eb)throw new C.cb(63);return d.fb.Eb(d,a,b,c)},Xc(a){return zb(M(a,{yb:!0}).node)},ve(a){return zb(a.node)},create(a,b=438){return C.Eb(a,b&4095|32768,0)},mkdir(a,b=511){return C.Eb(a,b&1023|16384,0)},me(a,b){var c=a.split("/"),d="",e;for(e of c)if(e){if(d||"/"===a.charAt(0))d+="/";d+=e;try{C.mkdir(d,b)}catch(f){if(20!=f.xb)throw f;}}},symlink(a,b){if(!Qa(a))throw new C.cb(44);var c=+M(b,{parent:!0}).node;if(!c)throw new C.cb(44);b=Ma(b);var d=sb(c,b);if(d)throw new C.cb(d);if(!c.fb.symlink)throw new C.cb(63);return c.fb.symlink(c,b,a)},rename(a,b){var c=La(a),d=La(b),e=Ma(a),f=Ma(b);var g=M(a,{parent:!0});var k=g.node;g=M(b,{parent:!0});g=g.node;if(!k||!g)throw new C.cb(44);if(k.lb!==g.lb)throw new C.cb(75);var m=L(k,e);a=Ra(a,d);if("."!==a.charAt(0))throw new C.cb(28);a=Ra(b,c);if("."!==a.charAt(0))throw new C.cb(55);try{var l=L(g,f)}catch(p){}if(m!==l){b=K(m.mode);if(e=tb(k,+e,b))throw new C.cb(e);if(e=l?tb(g,f,b):sb(g,f))throw new C.cb(e);if(!k.fb.rename)throw new C.cb(63);if(m.Ab||l&&l.Ab)throw new C.cb(10);if(g!==k&&(e=nb(k,"w")))throw new C.cb(e);cb(m);try{k.fb.rename(m,g,f),m.parent=g}catch(p){throw p;}finally{qb(m)}}},rmdir(a){var b=M(a,{parent:!0}).node;a=Ma(a);var c=L(b,a),d=tb(b,a,!0);if(d)throw new C.cb(d);if(!b.fb.rmdir)throw new C.cb(63);if(c.Ab)throw new C.cb(10);b.fb.rmdir(b,a);cb(c)},readdir(a){a=M(a,{yb:!0}).node;return ub(a.fb.readdir,54)(a)},unlink(a){var b=+M(a,{parent:!0}).node;if(!b)throw new C.cb(44);a=Ma(a);var c=L(b,a),d=tb(b,a,!1);if(d)throw new C.cb(d);if(!b.fb.unlink)throw new C.cb(63);if(c.Ab)throw new C.cb(10);b.fb.unlink(b,a);cb(c)},readlink(a){a=M(a).node;if(!a)throw new C.cb(44);if(!a.fb.readlink)throw new C.cb(28);return a.fb.readlink(a)},stat(a,b){a=M(a,{yb:!b}).node;return ub(a.fb.zb,63)(a)},fstat(a){var b=O(a);a=b.node;var c=b.gb.zb;b=c?b:a;c??=a.fb.zb;ub(c,63);return c(b)},lstat(a){return C.stat(a,!0)},chmod(a,b,c){a="string"==typeof a?+M(a,{yb:!c}).node:a;Cb(null,a,b,c)},lchmod(a,b){C.chmod(a,b,!0)},fchmod(a,b){a=O(a);Cb(a,a.node,b,!1)},chown(a,b,c,d){a="string"==typeof a?M(a,{yb:!d}).node:a;xb(null,a,{timestamp:Date.now(),Lc:d})},lchown(a,b,c){C.chown(a,b,c,!0)},fchown(a){a=O(a);xb(a,a.node,{timestamp:Date.now(),Lc:!1})},truncate(a,b){if(0>b)throw new C.cb(28);a="string"==typeof a?M(a,{yb:!0}).node:a;Db(null,a,b)},ie(a,b){a=O(a);if(0>b||0===(a.flags&2097155))throw new C.cb(28);Db(a,a.node,b)},xe(a,b,c){a=M(a,{yb:!0}).node;ub(a.fb.Bb,+63)(a,{atime:b,mtime:c})},open(a,b,c=438){if(""===a)throw new C.cb(44);if("string"==typeof b){var d={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof d)throw Error(`Unknown file open mode: ${b}`);b=d}c=b&64?c&4095|32768:0;if("object"==typeof a)d=a;else{var e=a.endsWith("/");a=M(a,{yb:!(b&131072),Gd:!0});d=a.node;a=a.path}var f=!1;if(b&64)if(d){if(b&128)throw new C.cb(20);}else{if(e)throw new C.cb(31);d=C.Eb(a,c|511,0);f=!0}if(!d)throw new C.cb(44);8192===(d.mode&61440)&&(b&=-513);+if(b&65536&&!K(d.mode))throw new C.cb(54);if(!f&&(e=d?40960===(d.mode&61440)?32:K(d.mode)&&("r"!==rb(b)||b&576)?31:nb(d,rb(b)):44))throw new C.cb(e);b&512&&!f&&C.truncate(d,0);b&=-131713;e=vb({node:d,path:pb(d),flags:b,seekable:!0,position:0,gb:d.gb,Pd:[],error:!1});e.gb.open&&e.gb.open(e);f&&C.chmod(d,c&511);!h.logReadFiles||b&1||a in C.Vc||(C.Vc[a]=1);return e},close(a){if(null===a.fd)throw new C.cb(8);a.rc&&(a.rc=null);try{a.gb.close&&a.gb.close(a)}catch(b){throw b;}finally{C.streams[a.fd]=null}a.fd=+null},tb(a,b,c){if(null===a.fd)throw new C.cb(8);if(!a.seekable||!a.gb.tb)throw new C.cb(70);if(0!=c&&1!=c&&2!=c)throw new C.cb(28);a.position=a.gb.tb(a,b,c);a.Pd=[];return a.position},read(a,b,c,d,e){if(0>d||0>e)throw new C.cb(28);if(null===a.fd)throw new C.cb(8);if(1===(a.flags&2097155))throw new C.cb(8);if(K(a.node.mode))throw new C.cb(31);if(!a.gb.read)throw new C.cb(28);var f="undefined"!=typeof e;if(!f)e=a.position;else if(!a.seekable)throw new C.cb(70);b=a.gb.read(a,b,c,d,e);f||(a.position+=+b);return b},write(a,b,c,d,e,f){if(0>d||0>e)throw new C.cb(28);if(null===a.fd)throw new C.cb(8);if(0===(a.flags&2097155))throw new C.cb(8);if(K(a.node.mode))throw new C.cb(31);if(!a.gb.write)throw new C.cb(28);a.seekable&&a.flags&1024&&C.tb(a,0,2);var g="undefined"!=typeof e;if(!g)e=a.position;else if(!a.seekable)throw new C.cb(70);b=a.gb.write(a,b,c,d,e,f);g||(a.position+=b);return b},Pb(a,b,c,d,e){if(0!==(d&2)&&0===(e&2)&&2!==(a.flags&2097155))throw new C.cb(2);if(1===(a.flags&2097155))throw new C.cb(2);+if(!a.gb.Pb)throw new C.cb(43);if(!b)throw new C.cb(28);return a.gb.Pb(a,b,c,d,e)},Yb(a,b,c,d,e){return a.gb.Yb?a.gb.Yb(a,b,c,d,e):0},tc(a,b,c){if(!a.gb.tc)throw new C.cb(59);return a.gb.tc(a,b,c)},readFile(a,b={}){b.flags=b.flags||0;b.encoding=b.encoding||"binary";"utf8"!==b.encoding&&"binary"!==b.encoding&&z(`Invalid encoding type "${b.encoding}"`);var c=C.open(a,b.flags);a=C.stat(a).size;var d=new Uint8Array(a);C.read(c,d,0,a,0);"utf8"===b.encoding&&(d=D(d));C.close(c);return d},writeFile(a,b,+c={}){c.flags=c.flags||577;a=C.open(a,c.flags,c.mode);"string"==typeof b&&(b=new Uint8Array(Wa(b)));ArrayBuffer.isView(b)?C.write(a,b,0,b.byteLength,void 0,c.Zd):z("Unsupported data type");C.close(a)},cwd:()=>C.Gc,chdir(a){a=M(a,{yb:!0});if(null===a.node)throw new C.cb(44);if(!K(a.node.mode))throw new C.cb(54);var b=nb(a.node,"x");if(b)throw new C.cb(b);C.Gc=a.path},fc(a,b,c){C.sc=!0;a??=h.stdin;b??=h.stdout;c??=h.stderr;a?C.Hb("/dev","stdin",a):C.symlink("/dev/tty","/dev/stdin");b?C.Hb("/dev","stdout",+null,b):C.symlink("/dev/tty","/dev/stdout");c?C.Hb("/dev","stderr",null,c):C.symlink("/dev/tty1","/dev/stderr");C.open("/dev/stdin",0);C.open("/dev/stdout",1);C.open("/dev/stderr",1)},se(){C.sc=!1;for(var a of C.streams)a&&C.close(a)},fe(a,b){try{var c=M(a,{yb:!b});a=c.path}catch(f){}var d=!1,e=null;try{c=M(a,{parent:!0}),Ma(a),c=M(a,{yb:!b}),d=!0,e=c.node}catch(f){}return d?e:null},Hb(a,b,c,d){a=Na("string"==typeof a?a:pb(a),b);b=db(!!c,!!d);var e;(e=C.Hb).xc??(e.xc=64);e=C.Lb(C.Hb.xc++,0);Za(e,+{open(f){f.seekable=!1},close(){d?.buffer?.length&&d(10)},read(f,g,k,m){for(var l=0,p=0;p<m;p++){try{var r=c()}catch(w){throw new C.cb(29);}if(void 0===r&&0===l)throw new C.cb(6);if(null===r||void 0===r)break;l++;g[k+p]=r}l&&(f.node.atime=Date.now());return l},write(f,g,k,m){for(var l=0;l<m;l++)try{d(g[k+l])}catch(p){throw new C.cb(29);}m&&(f.node.mtime=f.node.ctime=Date.now());return l}});return Bb(a,b,e)}},Ia=void 0,Ib={},Jb=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};+function Kb(a){return this.kb(x[a>>2])}+var Lb={},Mb={},Nb={},Ob=class extends Error{constructor(a){super(a);this.name="InternalError"}},Pb=(a,b,c)=>{function d(k){k=c(k);if(k.length!==a.length)throw new Ob("Mismatched type converter count");for(var m=0;m<a.length;++m)P(a[m],k[m])}a.forEach(k=>Nb[k]=b);var e=Array(b.length),f=[],g=0;for(let [k,m]of b.entries())Mb.hasOwnProperty(m)?e[k]=Mb[m]:(f.push(m),Lb.hasOwnProperty(m)||(Lb[m]=[]),Lb[m].push(()=>{e[k]=Mb[m];++g;g===f.length&&d(e)}));0===f.length&&d(e)},Q=a=>{for(var b="";;){var c=t[a++];+if(!c)return b;b+=String.fromCharCode(c)}},R=class extends Error{constructor(a){super(a);this.name="BindingError"}},Qb=a=>{throw new R(a);};function Rb(a,b,c={}){var d=b.name;if(!a)throw new R(`type "${d}" must have a positive integer typeid pointer`);if(Mb.hasOwnProperty(a)){if(c.xd)return;throw new R(`Cannot register type '${d}' twice`);}Mb[a]=b;delete Nb[a];Lb.hasOwnProperty(a)&&(b=Lb[a],delete Lb[a],b.forEach(e=>e()))}function P(a,b,c={}){return Rb(a,b,c)}+var Sb=(a,b,c)=>{switch(b){case 1:return c?d=>q[d]:d=>t[d];case 2:return c?d=>u[d>>1]:d=>pa[d>>1];case 4:return c?d=>v[d>>2]:d=>x[d>>2];case 8:return c?d=>sa[d>>3]:d=>ta[d>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Tb=a=>{throw new R(a.eb.mb.jb.name+" instance already deleted");},Ub=!1,Vb=()=>{},Wb=a=>{if(!globalThis.FinalizationRegistry)return Wb=b=>b,a;Ub=new FinalizationRegistry(b=>{b=b.eb;--b.count.value;0===b.count.value&&(b.rb?b.wb.Db(b.rb):b.mb.jb.Db(b.ib))});+Wb=b=>{var c=b.eb;c.rb&&Ub.register(b,{eb:c},b);return b};Vb=b=>{Ub.unregister(b)};return Wb(a)},Xb=[];function Yb(){}+var Zb=(a,b)=>Object.defineProperty(b,"name",{value:a}),$b={},ac=(a,b,c)=>{if(void 0===a[b].qb){var d=a[b];a[b]=function(...e){if(!a[b].qb.hasOwnProperty(e.length))throw new R(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].qb})!`);return a[b].qb[e.length].apply(this,e)};a[b].qb=[];a[b].qb[d.Jb]=d}},bc=(a,b,c)=>{if(h.hasOwnProperty(a)){if(void 0===c||void 0!==h[a].qb&&void 0!==h[a].qb[c])throw new R(`Cannot register public name '${a}' twice`);ac(h,+a,a);if(h[a].qb.hasOwnProperty(c))throw new R(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);h[a].qb[c]=b}else h[a]=b,h[a].Jb=c},cc=a=>{a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function dc(a,b,c,d,e,f,g,k){this.name=a;this.constructor=b;this.Ob=c;this.Db=d;this.sb=e;this.qd=f;this.bc=g;this.ld=k;this.Jd=[]}+var ec=(a,b,c)=>{for(;b!==c;){if(!b.bc)throw new R(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.bc(a);b=b.sb}return a},fc=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a};+function gc(a,b){if(null===b){if(this.uc)throw new R(`null is not a valid ${this.name}`);return 0}if(!b.eb)throw new R(`Cannot pass "${fc(b)}" as a ${this.name}`);if(!b.eb.ib)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);return ec(b.eb.ib,b.eb.mb.jb,this.jb)}+function hc(a,b){if(null===b){if(this.uc)throw new R(`null is not a valid ${this.name}`);if(this.ic){var c=this.Cc();null!==a&&a.push(this.Db,c);return c}return 0}if(!b||!b.eb)throw new R(`Cannot pass "${fc(b)}" as a ${this.name}`);if(!b.eb.ib)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.hc&&b.eb.mb.hc)throw new R(`Cannot convert argument of type ${b.eb.wb?b.eb.wb.name:b.eb.mb.name} to parameter type ${this.name}`);c=ec(b.eb.ib,b.eb.mb.jb,this.jb);if(this.ic){if(void 0===+b.eb.rb)throw new R("Passing raw pointer to smart pointer is illegal");switch(this.Od){case 0:if(b.eb.wb===this)c=b.eb.rb;else throw new R(`Cannot convert argument of type ${b.eb.wb?b.eb.wb.name:b.eb.mb.name} to parameter type ${this.name}`);break;case 1:c=b.eb.rb;break;case 2:if(b.eb.wb===this)c=b.eb.rb;else{var d=b.clone();c=this.Kd(c,ic(()=>d["delete"]()));null!==a&&a.push(this.Db,c)}break;default:throw new R("Unsupported sharing policy");}}return c}+function jc(a,b){if(null===b){if(this.uc)throw new R(`null is not a valid ${this.name}`);return 0}if(!b.eb)throw new R(`Cannot pass "${fc(b)}" as a ${this.name}`);if(!b.eb.ib)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.eb.mb.hc)throw new R(`Cannot convert argument of type ${b.eb.mb.name} to parameter type ${this.name}`);return ec(b.eb.ib,b.eb.mb.jb,this.jb)}+var kc=(a,b,c)=>{if(b===c)return a;if(void 0===c.sb)return null;a=kc(a,b,c.sb);return null===a?null:c.ld(a)},lc={},mc=(a,b)=>{if(void 0===b)throw new R("ptr should not be undefined");for(;a.sb;)b=a.bc(b),a=a.sb;return lc[b]},nc=(a,b)=>{if(!b.mb||!b.ib)throw new Ob("makeClassHandle requires ptr and ptrType");if(!!b.wb!==!!b.rb)throw new Ob("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Wb(Object.create(a,{eb:{value:b,writable:!0}}))};+function oc(a,b,c,d,e,f,g,k,m,l,p){this.name=a;this.jb=b;this.uc=c;this.hc=d;this.ic=e;this.Id=f;this.Od=g;this.Uc=k;this.Cc=m;this.Kd=l;this.Db=p;e||void 0!==b.sb?this.ob=hc:(this.ob=d?gc:jc,this.pb=null)}+var pc=(a,b,c)=>{if(!h.hasOwnProperty(a))throw new Ob("Replacing nonexistent public symbol");void 0!==h[a].qb&&void 0!==c?h[a].qb[c]=b:(h[a]=b,h[a].Jb=c)},qc=[],S=(a,b)=>{a=Q(a);var c;(c=qc[b])||(qc[b]=c=rc.get(b));if("function"!=typeof c)throw new R(`unknown function pointer with signature ${a}: ${b}`);return c};class sc extends Error{}+var vc=a=>{a=tc(a);var b=Q(a);uc(a);return b},wc=(a,b)=>{function c(f){e[f]||Mb[f]||(Nb[f]?Nb[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new sc(`${a}: `+d.map(vc).join([", "]));},xc=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(x[b+4*d>>2]);return c};function yc(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].pb)return!0;return!1}+function zc(a,b,c,d,e,f){var g=b.length;if(2>g)throw new R("argTypes array size mismatch! Must at least get return value and 'this' types!");var k=null!==b[1]&&null!==c,m=yc(b);c=!b[0].Ed;var l=b[0],p=b[1];d=[a,Qb,d,e,Jb,l.kb.bind(l),p?.ob.bind(p)];for(e=2;e<g;++e)l=b[e],d.push(l.ob.bind(l));if(!m)for(e=k?1:2;e<b.length;++e)null!==b[e].pb&&d.push(b[e].pb);m=yc(b);e=b.length-2;p=[];l=["fn"];k&&l.push("thisWired");for(g=0;g<e;++g)p.push(`arg${g}`),l.push(`arg${g}Wired`);p=p.join(",");l=l.join(",");+p=`return function (${p}) {\n`;m&&(p+="var destructors = [];\n");var r=m?"destructors":"null",w="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");k&&(p+=`var thisWired = toClassParamWire(${r}, this);\n`);for(g=0;g<e;++g){var y=`toArg${g}Wire`;p+=`var arg${g}Wired = ${y}(${r}, arg${g});\n`;w.push(y)}p+=(c||f?"var rv = ":"")+`invoker(${l});\n`;if(m)p+="runDestructors(destructors);\n";else for(g=k?1:2;g<b.length;++g)f=1===g?"thisWired":"arg"+(g-2)+"Wired",+null!==b[g].pb&&(p+=`${f}_dtor(${f});\n`,w.push(`${f}_dtor`));c&&(p+="var ret = fromRetWire(rv);\nreturn ret;\n");b=(new Function(w,p+"}\n"))(...d);return Zb(a,b)}+var Ac=a=>{a=a.trim();const b=a.indexOf("(");return-1===b?a:a.slice(0,b)},Bc=[],Cc=[0,1,,1,null,1,!0,1,!1,1],ic=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=Bc.pop()||Cc.length;Cc[b]=a;Cc[b+1]=1;return b}},Dc={name:"emscripten::val",kb:a=>{if(!a)throw new R(`Cannot use deleted val. handle = ${a}`);var b=Cc[a];9<a&&0===--Cc[a+1]&&(Cc[a]=void 0,Bc.push(a));return b},ob:(a,b)=>ic(b),vb:Kb,pb:null},Ec=(a,b,c)=>{switch(b){case 1:return c?function(d){return this.kb(q[d])}:+function(d){return this.kb(t[d])};case 2:return c?function(d){return this.kb(u[d>>1])}:function(d){return this.kb(pa[d>>1])};case 4:return c?function(d){return this.kb(v[d>>2])}:function(d){return this.kb(x[d>>2])};default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Fc=a=>{var b=Mb[a];if(void 0===b)throw a=`${"enum"} has unknown type ${vc(a)}`,new R(a);return b},Hc=(a,b)=>{switch(b){case 4:return function(c){return this.kb(qa[c>>2])};case 8:return function(c){return this.kb(ra[c>>+3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},Ic=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,Jc=(a,b,c)=>{a>>=1;b=Ta(pa,a,b/2,c);if(16<b-a&&Ic)return Ic.decode(pa.subarray(a,b));for(c="";a<b;++a)c+=String.fromCharCode(pa[a]);return c},Kc=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)u[b>>1]=a.charCodeAt(e),b+=2;u[b>>1]=0;return b-d},Lc=a=>2*a.length,Mc=(a,b,c)=>{var d="";a>>=2;for(var e=0;!(e>=b/4);e++){var f=+x[a+e];if(!f&&!c)break;d+=String.fromCodePoint(f)}return d},Nc=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.codePointAt(e);65535<f&&e++;v[b>>2]=f;b+=4;if(b+4>c)break}v[b>>2]=0;return b-d},Oc=a=>{for(var b=0,c=0;c<a.length;++c)65535<a.codePointAt(c)&&c++,b+=4;return b},Pc=[],Qc=(a,b)=>{Pc.length=0;for(var c;c=t[a++];){var d=105!=c;d&=112!=c;b+=d&&b%8?4:0;Pc.push(112==c?x[b>>2]:106==c?sa[b>>3]:105==c?v[b>>2]:ra[b>>3]);b+=d?8:4}return Pc},T,Rc=a=>{var b=+a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=(c,d)=>b.vertexAttribDivisorANGLE(c,d),a.drawArraysInstanced=(c,d,e,f)=>b.drawArraysInstancedANGLE(c,d,e,f),a.drawElementsInstanced=(c,d,e,f,g)=>b.drawElementsInstancedANGLE(c,d,e,f,g))},Sc=a=>{var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=()=>b.createVertexArrayOES(),a.deleteVertexArray=c=>b.deleteVertexArrayOES(c),a.bindVertexArray=c=>b.bindVertexArrayOES(c),a.isVertexArray=c=>b.isVertexArrayOES(c))},Tc=+a=>{var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=(c,d)=>b.drawBuffersWEBGL(c,d))},Uc=a=>{var b="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");+return(a.getSupportedExtensions()||[]).filter(c=>b.includes(c))},Vc=1,Wc=[],U=[],Xc=[],Yc=[],V=[],Zc=[],$c=[],ad=[1,1,2,2,4,4,4,2,3,4,8],bd=a=>{for(var b=Vc++,c=a.length;c<b;c++)a[c]=null;for(;a[b];)b=Vc++;return b},cd=(a,b,c,d)=>{for(var e=0;e<a;e++){var f=T[c](),g=f&&bd(d);f?(f.name=g,d[g]=f):W||=1282;v[b+4*e>>2]=g}},dd=a=>{a=32-Math.clz32(0===a?0:a-1);var b=X.Qb[a];if(b)return b;b=T.getParameter(34965);X.Qb[a]=T.createBuffer();T.bindBuffer(34963,X.Qb[a]);T.bufferData(34963,1<<a,35048);T.bindBuffer(34963,+b);return X.Qb[a]},fd=a=>{ed=!1;for(var b=0;b<X.zc;++b){var c=X.Sb[b];if(c.cc&&c.enabled){ed=!0;var d=c.size;var e=c.type,f=c.stride;d=0<f?a*f:d*ad[e-5120]*a;e=32-Math.clz32(0===d?0:d-1);f=X.Rb[e];var g=X.Ib[e];X.Ib[e]=X.Ib[e]+1&63;var k=f[g];k?e=k:(k=T.getParameter(34964),f[g]=T.createBuffer(),T.bindBuffer(34962,f[g]),T.bufferData(34962,1<<e,35048),T.bindBuffer(34962,k),e=f[g]);T.bindBuffer(34962,e);T.bufferSubData(34962,0,t.subarray(c.ib,c.ib+d));c.bd.call(T,b,c.size,c.type,c.Tc,c.stride,0)}}},+hd=(a,b)=>{a.ub||(a.ub=a.getContext,a.getContext=function(d,e){e=a.ub(d,e);return"webgl"==d==e instanceof WebGLRenderingContext?e:null});var c=1<b.yc?a.getContext("webgl2",b):a.getContext("webgl",b);return c?gd(c,b):0},gd=(a,b)=>{var c=bd($c),d={handle:c,attributes:b,version:b.yc,Nb:a};a.canvas&&(a.canvas.ed=d);$c[c]=d;if("undefined"==typeof b.qc||b.qc)if((a=d)||(a=X),!a.yd){a.yd=!0;b=a.Nb;b.ne=b.getExtension("WEBGL_multi_draw");b.de=b.getExtension("EXT_polygon_offset_clamp");b.ce=b.getExtension("EXT_clip_control");+b.ye=b.getExtension("WEBGL_polygon_mode");Rc(b);Sc(b);Tc(b);b.ae=b.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");b.ke=b.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");2<=a.version&&(b.Kc=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.Kc)b.Kc=b.getExtension("EXT_disjoint_timer_query");for(var e of Uc(b))e.includes("lose_context")||e.includes("debug")||b.getExtension(e)}d.zc=d.Nb.getParameter(34921);d.Sb=[];for(e=0;e<d.zc;e++)d.Sb[e]={enabled:!1,+cc:!1,size:0,type:0,Tc:0,stride:0,ib:0,bd:null};d.Ib=[];d.nc=[];d.Ib.length=d.nc.length=22;d.Rb=[];d.$b=[];d.Rb.length=d.$b.length=22;d.Qb=[];d.Qb.length=22;for(e=0;21>=e;++e){d.Qb[e]=null;d.Ib[e]=d.nc[e]=0;d.Rb[e]=[];d.$b[e]=[];a=d.Rb[e];b=d.$b[e];a.length=b.length=64;for(var f=0;64>f;++f)a[f]=b[f]=null}return c},W,X,ed,jd=["default","low-power","high-performance"],kd=[0,globalThis.document??0,globalThis.window??0],ld={},nd=()=>{if(!md){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",+HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:da||"./this.program"},b;for(b in ld)void 0===ld[b]?delete a[b]:a[b]=ld[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);md=c}return md},md,od=a=>"]"==a.slice(-1)&&a.lastIndexOf("["),pd=a=>{a-=5120;return 0==a?q:1==a?t:2==a?u:4==a?v:6==a?qa:5==a||28922==a||28520==a||30779==a||30782==a?x:pa},qd=(a,b,c,d,e)=>{a=pd(a);b=d*(c*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*a.BYTES_PER_ELEMENT++4-1&-4);return a.subarray(e>>>31-Math.clz32(a.BYTES_PER_ELEMENT),e+b>>>31-Math.clz32(a.BYTES_PER_ELEMENT))},Y=a=>{var b=T.kd;if(b){var c=b.ac[a];"number"==typeof c&&(b.ac[a]=c=T.getUniformLocation(b,b.Zc[a]+(0<c?`[${c}]`:"")));return c}W||=1282},rd=[],sd=[],wd=(a,b,c,d)=>{var e={string:l=>{var p=0;if(null!==l&&void 0!==l&&0!==l){p=Va(l)+1;var r=td(p);G(l,t,r,p);p=r}return p},array:l=>{var p=td(l.length);q.set(l,p);return p}};a=h["_"+a];var f=[],g=0;if(d)for(var k=0;k<d.length;k++){var m=e[c[k]];m?+(0===g&&(g=ud()),f[k]=m(d[k])):f[k]=d[k]}c=a(...f);return c=function(l){0!==g&&vd(g);return"string"===b?l?D(t,l):"":"boolean"===b?!!l:l}(c)};C.$d=(a,b,c,d,e,f,g,k,m,l)=>{mb(a,b,c,d,e,k,m,l).then(f).catch(g)};C.qe=mb;C.Fb=Array(4096);C.lb(H,{},"/");C.mkdir("/tmp");C.mkdir("/home");C.mkdir("/home/web_user");+(function(){C.mkdir("/dev");Za(C.Lb(1,3),{read:()=>0,write:(d,e,f,g)=>g,tb:()=>0});Bb("/dev/null",C.Lb(1,3));Ya(C.Lb(5,0),ab);Ya(C.Lb(6,0),bb);Bb("/dev/tty",C.Lb(5,0));Bb("/dev/tty1",C.Lb(6,0));var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(Pa(a),b=a.byteLength);return a[--b]};C.Hb("/dev","random",c);C.Hb("/dev","urandom",c);C.mkdir("/dev/shm");C.mkdir("/dev/shm/tmp")})();+(function(){C.mkdir("/proc");var a=C.mkdir("/proc/self");C.mkdir("/proc/self/fd");C.lb({lb(){var b=C.createNode(a,"fd",16895,73);b.gb={tb:H.gb.tb};b.fb={lookup(c,d){c=+d;var e=O(c);c={parent:null,lb:{Sc:"fake"},fb:{readlink:()=>e.path},id:c+1};return c.parent=c},readdir(){return Array.from(C.streams.entries()).filter(([,c])=>c).map(([c])=>c.toString())}};return b}},{},"/proc/self/fd")})();C.pd={MEMFS:H};+(()=>{let a=Yb.prototype;Object.assign(a,{isAliasOf:function(c){if(!(this instanceof Yb&&c instanceof Yb))return!1;var d=this.eb.mb.jb,e=this.eb.ib;c.eb=c.eb;var f=c.eb.mb.jb;for(c=c.eb.ib;d.sb;)e=d.bc(e),d=d.sb;for(;f.sb;)c=f.bc(c),f=f.sb;return d===f&&e===c},clone:function(){this.eb.ib||Tb(this);if(this.eb.Zb)return this.eb.count.value+=1,this;var c=Wb,d=Object,e=d.create,f=Object.getPrototypeOf(this),g=this.eb;c=c(e.call(d,f,{eb:{value:{count:g.count,Vb:g.Vb,Zb:g.Zb,ib:g.ib,mb:g.mb,rb:g.rb,wb:g.wb}}}));+c.eb.count.value+=1;c.eb.Vb=!1;return c},["delete"](){this.eb.ib||Tb(this);if(this.eb.Vb&&!this.eb.Zb)throw new R("Object already scheduled for deletion");Vb(this);var c=this.eb;--c.count.value;0===c.count.value&&(c.rb?c.wb.Db(c.rb):c.mb.jb.Db(c.ib));this.eb.Zb||(this.eb.rb=void 0,this.eb.ib=void 0)},isDeleted:function(){return!this.eb.ib},deleteLater:function(){this.eb.ib||Tb(this);if(this.eb.Vb&&!this.eb.Zb)throw new R("Object already scheduled for deletion");Xb.push(this);this.eb.Vb=!0;return this}});const b=Symbol.dispose;b&&(a[b]=a["delete"])})();-Object.assign(ob.prototype,{hd(a){this.Tc&&(a=this.Tc(a));return a},Ec(a){this.vb?.(a)},rb:Ka,ib:function(a){function b(){return this.bc?nb(this.hb.Hb,{jb:this.rd,fb:c,sb:this,ob:a}):nb(this.hb.Hb,{jb:this,fb:a})}var c=this.hd(a);if(!c)return this.Ec(a),null;var d=mb(this.hb,c);if(void 0!==d){if(0===d.bb.count.value)return d.bb.fb=c,d.bb.ob=a,d.clone();d=d.clone();this.Ec(a);return d}d=this.hb.gd(c);d=$a[d];if(!d)return b.call(this);d=this.ac?d.$c:d.pointerType;var e=kb(c,this.hb,d.hb);return null===-e?b.call(this):this.bc?nb(d.hb.Hb,{jb:d,fb:e,sb:this,ob:a}):nb(d.hb.Hb,{jb:d,fb:e})}});var vd=()=>{if(T){var a=T.Lb;T.Lb=T.Sb;T.Sb=a;a=T.Bb;T.Bb=T.jc;T.jc=a;for(a=0;21>=a;++a)T.Bb[a]=0}};"undefined"!=typeof MainLoop&&MainLoop.be.push(vd);W=Array(4096);dd(V,"/");X("/tmp");X("/home");X("/home/web_user");-(function(){X("/dev");Gc(259,{read:()=>0,write:(d,e,f,g)=>g,tb:()=>0});fd("/dev/null",259);Fc(1280,Ic);Fc(1536,Jc);fd("/dev/tty",1280);fd("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(Bc(a),b=a.byteLength);return a[--b]};Y("random",c);Y("urandom",c);X("/dev/shm");X("/dev/shm/tmp")})();-(function(){X("/proc");var a=X("/proc/self");X("/proc/self/fd");dd({xb(){var b=Lc(a,"fd",16895,73);b.gb={tb:V.gb.tb};b.eb={lookup(c,d){c=+d;var e=bd(c);c={parent:null,xb:{Oc:"fake"},eb:{readlink:()=>e.path},id:c+1};return c.parent=c},readdir(){return Array.from(Rc.entries()).filter(([,c])=>c).map(([c])=>c.toString())}};return b}},"/proc/self/fd")})();for(var wd=new Int32Array(288),Z=0;288>=Z;++Z)pd[Z]=wd.subarray(0,Z);var xd=new Float32Array(288);for(Z=0;288>=Z;++Z)qd[Z]=xd.subarray(0,Z);-m.print&&(ka=m.print);m.printErr&&(n=m.printErr);m.wasmBinary&&(la=m.wasmBinary);m.thisProgram&&(da=m.thisProgram);if(m.preInit)for("function"==typeof m.preInit&&(m.preInit=[m.preInit]);0<m.preInit.length;)m.preInit.shift()();m.ccall=ud;m.cwrap=(a,b,c,d)=>{var e=!c||c.every(f=>"number"===f||"boolean"===f);return"string"!==b&&e&&!d?m["_"+a]:(...f)=>ud(a,b,c,f,d)};-var ub,Yb,J,td,rd,sd,va,rb,yd={n:(a,b,c)=>{var d=new Fa(a);y[d.fb+16>>2]=0;y[d.fb+4>>2]=b;y[d.fb+8>>2]=c;Ga=a;Ha++;throw Ga;},aa:()=>wa(""),d:a=>{var b=Ia[a];delete Ia[a];var c=b.uc,d=b.vb,e=b.Ic,f=e.map(g=>g.ld).concat(e.map(g=>g.wd));Pa([a],f,g=>{var h={},l,k;for([l,k]of e.entries()){const p=g[l],w=k.jd,t=k.kd,C=g[l+e.length],D=k.vd,G=k.xd;h[k.ed]={read:F=>p.ib(w(t,F)),write:(F,M)=>{var E=[];D(G,F,C.lb(E,M));Ja(E)},optional:p.optional}}return[{name:b.name,ib:p=>{var w={},t;for(t in h)w[t]=h[t].read(p);-d(p);return w},lb:(p,w)=>{for(var t in h)if(!(t in w||h[t].optional))throw new TypeError(`Missing field: "${t}"`);var C=c();for(t in h)h[t].write(C,w[t]);null!==p&&p.push(d,C);return C},rb:Ka,mb:d}]})},T:(a,b,c,d,e)=>{b=B(b);d=0n===d;let f=g=>g;if(d){const g=8*c;f=h=>BigInt.asUintN(g,h);e=f(e)}A(a,{name:b,ib:f,lb:(g,h)=>{"number"==typeof h&&(h=BigInt(h));return h},rb:Sa(b,c,!d),mb:null})},Ha:(a,b,c,d)=>{b=B(b);A(a,{name:b,ib:function(e){return!!e},lb:function(e,f){return f?c:d},rb:function(e){return this.ib(r[e])},-mb:null})},A:(a,b,c,d,e,f,g,h,l,k,p,w,t)=>{p=B(p);f=I(e,f);h&&=I(g,h);k&&=I(l,k);t=I(w,t);var C=cb(p);bb(C,function(){xb(`Cannot construct ${p} due to unbound types`,[d])});Pa([a,b,c],d?[d]:[],D=>{D=D[0];if(d){var G=D.hb;var F=G.Hb}else F=Ya.prototype;D=Za(p,function(...vb){if(Object.getPrototypeOf(this)!==M)throw new H(`Use 'new' to construct ${p}`);if(void 0===E.Eb)throw new H(`${p} has no accessible constructor`);var Ac=E.Eb[vb.length];if(void 0===Ac)throw new H(`Tried to invoke ctor of ${p} with invalid number of parameters (${vb.length}) - expected (${Object.keys(E.Eb).toString()}) parameters instead!`);-return Ac.apply(this,vb)});var M=Object.create(F,{constructor:{value:D}});D.prototype=M;var E=new db(p,D,M,t,G,f,h,k);if(E.pb){var ta;(ta=E.pb).zc??(ta.zc=[]);E.pb.zc.push(E)}G=new ob(p,E,!0,!1,!1);ta=new ob(p+"*",E,!1,!1,!1);F=new ob(p+" const*",E,!1,!0,!1);$a[a]={pointerType:ta,$c:F};pb(C,D);return[G,ta,F]})},da:(a,b,c,d,e,f)=>{var g=yb(b,c);e=I(d,e);Pa([],[a],h=>{h=h[0];var l=`constructor ${h.name}`;void 0===h.hb.Eb&&(h.hb.Eb=[]);if(void 0!==h.hb.Eb[b-1])throw new H(`Cannot register multiple constructors with identical number of parameters (${b--1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);h.hb.Eb[b-1]=()=>{xb(`Cannot construct ${h.name} due to unbound types`,g)};Pa([],g,k=>{k.splice(1,0,null);h.hb.Eb[b-1]=Ab(l,k,null,e,f);return[]});return[]})},b:(a,b,c,d,e,f,g,h,l)=>{var k=yb(c,d);b=B(b);b=Bb(b);f=I(e,f);Pa([],[a],p=>{function w(){xb(`Cannot call ${t} due to unbound types`,k)}p=p[0];var t=`${p.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);h&&p.hb.sd.push(b);-var C=p.hb.Hb,D=C[b];void 0===D||void 0===D.nb&&D.className!==p.name&&D.Cb===c-2?(w.Cb=c-2,w.className=p.name,C[b]=w):(ab(C,b,t),C[b].nb[c-2]=w);Pa([],k,G=>{G=Ab(t,G,p,f,g,l);void 0===C[b].nb?(G.Cb=c-2,C[b]=G):C[b].nb[c-2]=G;return[]});return[]})},Fa:a=>A(a,Eb),B:(a,b,c,d,e)=>{b=B(b);e=0===e?"object":1===e?"number":"string";switch(e){case "object":function g(){}g.values={};A(a,{name:b,constructor:g,valueType:e,ib:function(h){return this.constructor.values[h]},lb:(h,l)=>l.value,rb:Fb(b,c,d),mb:null});-bb(b,g);break;case "number":var f={};A(a,{name:b,rc:f,valueType:e,ib:h=>h,lb:(h,l)=>l,rb:Fb(b,c,d),mb:null});bb(b,f);delete m[b].Cb;break;case "string":f={},A(a,{name:b,Xc:{},Uc:{},rc:f,valueType:e,ib:function(h){return this.Uc[h]},lb:function(h,l){return this.Xc[l]},rb:Fb(b,c,d),mb:null}),bb(b,f),delete m[b].Cb}},g:(a,b,c)=>{var d=Gb(a);b=B(b);switch(d.valueType){case "object":a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Za(`${d.name}_${b}`,function(){})}});-a.values[c]=d;a[b]=d;break;case "number":d.rc[b]=c;break;case "string":d.Xc[b]=c,d.Uc[c]=b,d.rc[b]=b}},S:(a,b,c)=>{b=B(b);A(a,{name:b,ib:d=>d,lb:(d,e)=>e,rb:Hb(b,c),mb:null})},i:(a,b,c,d,e,f,g)=>{var h=yb(b,c);a=B(a);a=Bb(a);e=I(d,e);bb(a,function(){xb(`Cannot call ${a} due to unbound types`,h)},b-1);Pa([],h,l=>{l=[l[0],null].concat(l.slice(1));pb(a,Ab(a,l,null,e,f,g),b-1);return[]})},f:(a,b,c,d,e)=>{b=B(b);let f=h=>h;if(0===d){var g=32-8*c;f=h=>h<<g>>>g;e=f(e)}A(a,{name:b,ib:f,lb:(h,l)=>l,rb:Sa(b,-c,0!==d),mb:null})},c:(a,b,c)=>{function d(f){return new e(q.buffer,y[f+4>>2],y[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=B(c);A(a,{name:c,ib:d,rb:d},{md:!0})},Ga:(a,b)=>{b=B(b);A(a,{name:b,ib(c){var d=(d=c+4)?L(r,d,y[c>>2],!0):"";J(c);return d},lb(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new H("Cannot pass non-string to std::string");-var f=e?Ib(d):d.length;var g=Yb(4+f+1),h=g+4;y[g>>2]=f;e?K(d,r,h,f+1):r.set(d,h);null!==c&&c.push(J,g);return g},rb:Ka,mb(c){J(c)}})},y:(a,b,c)=>{c=B(c);if(2===b){var d=Mb;var e=Nb;var f=Ob}else d=Pb,e=Qb,f=Rb;A(a,{name:c,ib:g=>{var h=d(g+4,y[g>>2]*b,!0);J(g);return h},lb:(g,h)=>{if("string"!=typeof h)throw new H(`Cannot pass non-string to C++ string type ${c}`);var l=f(h),k=Yb(4+l+b);y[k>>2]=l/b;e(h,k+4,l+b);null!==g&&g.push(J,k);return k},rb:Ka,mb(g){J(g)}})},e:(a,b,c,d,e,f)=>{Ia[a]={name:B(b),-uc:I(c,d),vb:I(e,f),Ic:[]}},a:(a,b,c,d,e,f,g,h,l,k)=>{Ia[a].Ic.push({ed:B(b),ld:c,jd:I(d,e),kd:f,wd:g,vd:I(h,l),xd:k})},Ia:(a,b)=>{b=B(b);A(a,{od:!0,name:b,ib:()=>{},lb:()=>{}})},W:(a,b,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();y[a>>2]=60*Math.max(f,e);x[b>>2]=Number(f!=e);b=g=>{var h=Math.abs(g);return`UTC${0<=g?"-":"+"}${String(Math.floor(h/60)).padStart(2,"0")}${String(h%60).padStart(2,"0")}`};a=b(f);b=b(e);e<f?(K(a,r,-c,17),K(b,r,d,17)):(K(a,r,d,17),K(b,r,c,17))},ba:function(a,b,c){if(!(0<=a&&3>=a))return 28;qa[c>>3]=BigInt(Math.round(1E6*(0===a?Date.now():performance.now())));return 0},pa:()=>globalThis.devicePixelRatio??1,C:(a,b,c)=>{a=Tb(a);if(!a)return-4;a=Ub(a);z[b>>3]=a.width;z[c>>3]=a.height;return 0},oa:()=>performance.now(),ca:a=>{var b=r.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(a,d)/65536))--va.buffer.byteLength+65535)/65536|0;try{va.grow(d);ua();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},D:(a,b,c)=>{a=Tb(a);if(!a)return-4;a.width=b;a.height=c;return 0},ga:(a,b,c,d)=>Zb(a,b,c,d,2,"keydown"),fa:(a,b,c,d)=>Zb(a,b,c,d,3,"keyup"),ja:(a,b,c,d)=>$b(a,b,c,d,5,"mousedown"),ia:(a,b,c,d)=>$b(a,b,c,d,8,"mousemove"),ha:(a,b,c,d)=>$b(a,b,c,d,6,"mouseup"),ea:(a,b,c,d)=>ac(a,b,c,d),ka:(a,b,c,d)=>bc(a,b,c,d,25,"touchcancel"),la:(a,b,c,d)=>bc(a,b,c,d,23,"touchend"),ma:(a,b,c,d)=>bc(a,-b,c,d,24,"touchmove"),na:(a,b,c,d)=>bc(a,b,c,d,22,"touchstart"),V:(a,b)=>{var c=b>>2;b={alpha:!!q[b+0],depth:!!q[b+1],stencil:!!q[b+2],antialias:!!q[b+3],premultipliedAlpha:!!q[b+4],preserveDrawingBuffer:!!q[b+5],powerPreference:sc[x[c+2]],failIfMajorPerformanceCaveat:!!q[b+12],Mc:x[c+4],Xd:x[c+5],Gc:q[b+24],dd:q[b+25],ce:x[c+7],ge:q[b+32]};a=Tb(a);return!a||b.dd?0:rc(a,b)},G:a=>{T==a&&(T=0);T===R[a]&&(T=null);"object"==typeof N&&N.ud(R[a].Fb.canvas);R[a]?.Fb.canvas&&(R[a].Fb.canvas.Zc=void 0);R[a]=-null},U:a=>{T=R[a];m.ctx=O=T?.Fb;return!a||O?0:-5},X:(a,b)=>{var c=0,d=0,e;for(e of vc()){var f=b+c;y[a+d>>2]=f;c+=K(e,r,f,Infinity)+1;d+=4}return 0},Y:(a,b)=>{var c=vc();y[a>>2]=c.length;a=0;for(var d of c)a+=Ib(d)+1;y[b>>2]=a;return 0},Z:function(a){try{var b=bd(a);if(null===b.fd)throw new U(8);b.nc&&(b.nc=null);try{b.gb.close&&b.gb.close(b)}catch(c){throw c;}finally{Rc[b.fd]=null}b.fd=null;return 0}catch(c){if("undefined"==typeof kd||"ErrnoError"!==c.name)throw c;return c.Pb}},_:function(a,b,c,-d){try{a:{var e=bd(a);a=b;for(var f,g=b=0;g<c;g++){var h=y[a>>2],l=y[a+4>>2];a+=8;var k=e,p=h,w=l,t=f,C=q;if(0>w||0>t)throw new U(28);if(null===k.fd)throw new U(8);if(1===(k.flags&2097155))throw new U(8);if(16384===(k.node.mode&61440))throw new U(31);if(!k.gb.read)throw new U(28);var D="undefined"!=typeof t;if(!D)t=k.position;else if(!k.seekable)throw new U(70);var G=k.gb.read(k,C,p,w,t);D||(k.position+=G);var F=G;if(0>F){var M=-1;break a}b+=F;if(F<l)break;"undefined"!=typeof f&&(f+=F)}M=b}y[d>>2]=-M;return 0}catch(E){if("undefined"==typeof kd||"ErrnoError"!==E.name)throw E;return E.Pb}},$:function(a,b,c,d){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var e=bd(a);jd(e,b,c);qa[d>>3]=BigInt(e.position);e.nc&&0===b&&0===c&&(e.nc=null);return 0}catch(f){if("undefined"==typeof kd||"ErrnoError"!==f.name)throw f;return f.Pb}},z:function(a,b,c,d){try{a:{var e=bd(a);a=b;for(var f,g=b=0;g<c;g++){var h=y[a>>2],l=y[a+4>>2];a+=8;var k=e,p=h,w=l,t=f,C=q;if(0>w||0>t)throw new U(28);-if(null===k.fd)throw new U(8);if(0===(k.flags&2097155))throw new U(8);if(16384===(k.node.mode&61440))throw new U(31);if(!k.gb.write)throw new U(28);k.seekable&&k.flags&1024&&jd(k,0,2);var D="undefined"!=typeof t;if(!D)t=k.position;else if(!k.seekable)throw new U(70);var G=k.gb.write(k,C,p,w,t,void 0);D||(k.position+=G);var F=G;if(0>F){var M=-1;break a}b+=F;if(F<l)break;"undefined"!=typeof f&&(f+=F)}M=b}y[d>>2]=M;return 0}catch(E){if("undefined"==typeof kd||"ErrnoError"!==E.name)throw E;return E.Pb}},-N:a=>O.activeTexture(a),H:(a,b)=>{O.attachShader(P[a],Q[b])},j:(a,b)=>{if(b&&!hc[b]){var c=O.createBuffer();c.name=b;hc[b]=c}34962==a?O.Yb=b:34963==a&&(O.Nb=b);35051==a?O.Dc=b:35052==a&&(O.Zb=b);O.bindBuffer(a,hc[b])},m:(a,b)=>{O.bindTexture(a,ic[b])},s:a=>{O.bindVertexArray(jc[a]);a=O.getParameter(34965);O.Nb=a?a.name|0:0},x:(a,b)=>O.blendFunc(a,b),t:(a,b,c,d)=>{2<=T.version?c&&b?O.bufferData(a,r,d,c,b):O.bufferData(a,b,d):O.bufferData(a,c?r.subarray(c,c+b):b,d)},wa:(a,b,c,d)=>{2<=T.version?c&&O.bufferSubData(a,-b,r,d,c):O.bufferSubData(a,b,r.subarray(d,d+c))},l:a=>O.clear(a),r:(a,b,c,d)=>O.clearColor(a,b,c,d),J:a=>{O.compileShader(Q[a])},Da:()=>{var a=lc(P),b=O.createProgram();b.name=a;b.ec=b.cc=b.dc=0;b.yc=1;P[a]=b;return a},L:a=>{var b=lc(Q);Q[b]=O.createShader(a);return b},v:(a,b)=>{for(var c=0;c<a;c++){var d=x[b+4*c>>2],e=hc[d];e&&(O.deleteBuffer(e),e.name=0,hc[d]=null,d==O.Yb&&(O.Yb=0),d==O.Nb&&(O.Nb=0),d==O.Dc&&(O.Dc=0),d==O.Zb&&(O.Zb=0))}},M:a=>{if(a){var b=P[a];b?(O.deleteProgram(b),b.name=0,P[a]=-null):S||=1281}},h:a=>{if(a){var b=Q[a];b?(O.deleteShader(b),Q[a]=null):S||=1281}},R:(a,b)=>{for(var c=0;c<a;c++){var d=x[b+4*c>>2],e=ic[d];e&&(O.deleteTexture(e),e.name=0,ic[d]=null)}},ua:(a,b)=>{for(var c=0;c<a;c++){var d=x[b+4*c>>2];O.deleteVertexArray(jc[d]);jc[d]=null}},O:a=>O.disable(a),w:(a,b,c,d)=>{var e=0;if(!O.Nb){var f=1*kc[c-5120]*b;var g=nc(f);O.bindBuffer(34963,g);O.bufferSubData(34963,0,r.subarray(d,d+f));if(0<b)for(g=0;g<T.sc;++g)if(f=T.Mb[g],f.Xb&&f.enabled){switch(c){case 5121:e=-Uint8Array;break;case 5123:e=Uint16Array;break;case 5125:e=Uint32Array;break;default:S||=1282;return}e=(new e(r.buffer,d,b)).reduce((h,l)=>Math.max(h,l))+1;break}d=0}pc(e);O.drawElements(a,b,c,d);oc&&O.bindBuffer(34962,hc[O.Yb]);O.Nb||O.bindBuffer(34963,null)},q:a=>O.enable(a),ta:a=>{T.Mb[a].enabled=!0;O.enableVertexAttribArray(a)},u:(a,b)=>{mc(a,b,"createBuffer",hc)},Q:(a,b)=>{mc(a,b,"createTexture",ic)},va:(a,b)=>{mc(a,b,"createVertexArray",jc)},ra:a=>O.generateMipmap(a),Ba:(a,b,c,d)=>{a=O.getProgramInfoLog(P[a]);-null===a&&(a="(unknown error)");b=0<b&&d?K(a,r,d,b):0;c&&(x[c>>2]=b)},F:(a,b,c)=>{if(c)if(a>=gc)S||=1281;else if(a=P[a],35716==b)a=O.getProgramInfoLog(a),null===a&&(a="(unknown error)"),x[c>>2]=a.length+1;else if(35719==b){if(!a.ec){var d=O.getProgramParameter(a,35718);for(b=0;b<d;++b)a.ec=Math.max(a.ec,O.getActiveUniform(a,b).name.length+1)}x[c>>2]=a.ec}else if(35722==b){if(!a.cc)for(d=O.getProgramParameter(a,35721),b=0;b<d;++b)a.cc=Math.max(a.cc,O.getActiveAttrib(a,b).name.length+1);x[c>>2]=a.cc}else if(35381==-b){if(!a.dc)for(d=O.getProgramParameter(a,35382),b=0;b<d;++b)a.dc=Math.max(a.dc,O.getActiveUniformBlockName(a,b).length+1);x[c>>2]=a.dc}else x[c>>2]=O.getProgramParameter(a,b);else S||=1281},I:(a,b,c,d)=>{a=O.getShaderInfoLog(Q[a]);null===a&&(a="(unknown error)");b=0<b&&d?K(a,r,d,b):0;c&&(x[c>>2]=b)},o:(a,b,c)=>{c?35716==b?(a=O.getShaderInfoLog(Q[a]),null===a&&(a="(unknown error)"),x[c>>2]=a?a.length+1:0):35720==b?(a=O.getShaderSource(Q[a]),x[c>>2]=a?a.length+1:0):x[c>>2]=O.getShaderParameter(Q[a],-b):S||=1281},p:(a,b)=>{b=b?L(r,b):"";if(a=P[a]){var c=a,d=c.Tb,e=c.Wc,f;if(!d){c.Tb=d={};c.Vc={};var g=O.getProgramParameter(c,35718);for(f=0;f<g;++f){var h=O.getActiveUniform(c,f);var l=h.name;h=h.size;var k=ld(l);k=0<k?l.slice(0,k):l;var p=c.yc;c.yc+=h;e[k]=[h,p];for(l=0;l<h;++l)d[p]=l,c.Vc[p++]=k}}c=a.Tb;d=0;e=b;f=ld(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.Wc[e])&&d<e[0]&&(d+=e[1],c[d]=c[d]||O.getUniformLocation(a,b)))return d}else S||=1281;return-1},Ca:a=>{a=P[a];O.linkProgram(a);-a.Tb=0;a.Wc={}},K:(a,b,c,d)=>{for(var e="",f=0;f<b;++f){var g=(g=y[c+4*f>>2])?L(r,g,d?y[d+4*f>>2]:void 0):"";e+=g}O.shaderSource(Q[a],e)},P:(a,b,c,d,e,f,g,h,l)=>{if(2<=T.version){if(O.Zb){O.texImage2D(a,b,c,d,e,f,g,h,l);return}if(l){var k=md(h);l>>>=31-Math.clz32(k.BYTES_PER_ELEMENT);O.texImage2D(a,b,c,d,e,f,g,h,k,l);return}}k=l?nd(h,g,d,e,l):null;O.texImage2D(a,b,c,d,e,f,g,h,k)},k:(a,b,c)=>O.texParameteri(a,b,c),qa:(a,b,c,d,e,f,g,h,l)=>{if(2<=T.version){if(O.Zb){O.texSubImage2D(a,b,c,d,e,f,g,h,l);-return}if(l){var k=md(h);O.texSubImage2D(a,b,c,d,e,f,g,h,k,l>>>31-Math.clz32(k.BYTES_PER_ELEMENT));return}}l=l?nd(h,g,e,f,l):null;O.texSubImage2D(a,b,c,d,e,f,g,h,l)},za:(a,b)=>{O.uniform1i(od(a),b)},Ea:(a,b,c)=>{if(2<=T.version)b&&O.uniform1iv(od(a),x,c>>2,b);else{if(288>=b)for(var d=pd[b],e=0;e<b;++e)d[e]=x[c+4*e>>2];else d=x.subarray(c>>2,c+4*b>>2);O.uniform1iv(od(a),d)}},ya:(a,b,c,d,e)=>{O.uniform4f(od(a),b,c,d,e)},xa:(a,b,c,d)=>{if(2<=T.version)b&&O.uniformMatrix4fv(od(a),!!c,pa,d>>2,16*b);else{if(18>=-b){var e=qd[16*b],f=pa;d>>=2;b*=16;for(var g=0;g<b;g+=16){var h=d+g;e[g]=f[h];e[g+1]=f[h+1];e[g+2]=f[h+2];e[g+3]=f[h+3];e[g+4]=f[h+4];e[g+5]=f[h+5];e[g+6]=f[h+6];e[g+7]=f[h+7];e[g+8]=f[h+8];e[g+9]=f[h+9];e[g+10]=f[h+10];e[g+11]=f[h+11];e[g+12]=f[h+12];e[g+13]=f[h+13];e[g+14]=f[h+14];e[g+15]=f[h+15]}}else e=pa.subarray(d>>2,d+64*b>>2);O.uniformMatrix4fv(od(a),!!c,e)}},Aa:a=>{a=P[a];O.useProgram(a);O.bd=a},sa:(a,b,c,d,e,f)=>{var g=T.Mb[a];O.Yb?(g.Xb=!1,O.vertexAttribPointer(a,b,c,!!d,e,f)):(g.size=-b,g.type=c,g.Qc=d,g.stride=e,g.fb=f,g.Xb=!0,g.Yc=function(h,l,k,p,w,t){this.vertexAttribPointer(h,l,k,p,w,t)})},E:(a,b,c,d)=>O.viewport(a,b,c,d)},zd;-zd=await (async function(){function a(c){c=zd=c.exports;ub=c.La;m._es_init=c.Na;m._es_update=c.Oa;m._es_render=c.Pa;m._es_shutdown=c.Qa;m._es_on_touch=c.Ra;m._es_on_key=c.Sa;m._es_renderer_clear=c.Ta;m._es_renderer_begin_scene=c.Ua;m._es_renderer_end_scene=c.Va;m._es_renderer_draw_quad=c.Wa;m._es_renderer_draw_quad_textured=c.Xa;Yb=m._malloc=c.Ya;J=m._free=c.Za;td=c._a;rd=c.$a;sd=c.ab;va=c.Ja;rb=c.Ma;ua();return zd}var b={a:yd};if(m.instantiateWasm)return new Promise(c=>{m.instantiateWasm(b,-(d,e)=>{c(a(d,e))})});xa??=m.locateFile?m.locateFile?m.locateFile("esengine.wasm",fa):fa+"esengine.wasm":(new URL("esengine.wasm",import.meta.url)).href;return a((await Aa(b)).instance)}());-(function(){function a(){m.calledRun=!0;if(!ma){sa=!0;if(!m.noFSInit&&!Tc){var b,c;Tc=!0;b??=m.stdin;c??=m.stdout;d??=m.stderr;b?Y("stdin",b):gd("/dev/tty","/dev/stdin");c?Y("stdout",null,c):gd("/dev/tty","/dev/stdout");d?Y("stderr",null,d):gd("/dev/tty1","/dev/stderr");hd("/dev/stdin",0);hd("/dev/stdout",1);hd("/dev/stderr",1)}zd.Ka();Uc=!1;na?.(m);m.onRuntimeInitialized?.();if(m.postRun)for("function"==typeof m.postRun&&(m.postRun=[m.postRun]);m.postRun.length;){var d=m.postRun.shift();Ca.push(d)}Ba(Ca)}}-if(m.preRun)for("function"==typeof m.preRun&&(m.preRun=[m.preRun]);m.preRun.length;)Ea();Ba(Da);m.setStatus?(m.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>m.setStatus(""),1);a()},1)):a()})();sa?moduleRtn=m:moduleRtn=new Promise((a,b)=>{na=a;oa=b});+Object.assign(oc.prototype,{sd(a){this.Uc&&(a=this.Uc(a));return a},Ic(a){this.Db?.(a)},vb:Kb,kb:function(a){function b(){return this.ic?nc(this.jb.Ob,{mb:this.Id,ib:c,wb:this,rb:a}):nc(this.jb.Ob,{mb:this,ib:a})}var c=this.sd(a);if(!c)return this.Ic(a),null;var d=mc(this.jb,c);if(void 0!==d){if(0===d.eb.count.value)return d.eb.ib=c,d.eb.rb=a,d.clone();d=d.clone();this.Ic(a);return d}d=this.jb.qd(c);d=$b[d];if(!d)return b.call(this);d=this.hc?d.jd:d.pointerType;var e=kc(c,this.jb,d.jb);return null===+e?b.call(this):this.ic?nc(d.jb.Ob,{mb:d,ib:e,wb:this,rb:a}):nc(d.jb.Ob,{mb:d,ib:e})}});var xd=()=>{if(X){var a=X.Rb;X.Rb=X.$b;X.$b=a;a=X.Ib;X.Ib=X.nc;X.nc=a;for(a=0;21>=a;++a)X.Ib[a]=0}};"undefined"!=typeof MainLoop&&MainLoop.pe.push(xd);for(var yd=new Int32Array(288),Z=0;288>=Z;++Z)rd[Z]=yd.subarray(0,Z);var zd=new Float32Array(288);for(Z=0;288>=Z;++Z)sd[Z]=zd.subarray(0,Z);h.preloadPlugins&&(jb=h.preloadPlugins);h.print&&(ka=h.print);h.printErr&&(n=h.printErr);h.wasmBinary&&(la=h.wasmBinary);+h.thisProgram&&(da=h.thisProgram);if(h.preInit)for("function"==typeof h.preInit&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.shift()();h.addRunDependency=ib;h.removeRunDependency=hb;h.ccall=wd;h.cwrap=(a,b,c,d)=>{var e=!c||c.every(f=>"number"===f||"boolean"===f);return"string"!==b&&e&&!d?h["_"+a]:(...f)=>wd(a,b,c,f,d)};h.FS_preloadFile=mb;h.FS_unlink=(...a)=>C.unlink(...a);h.FS_createPath=(...a)=>Eb(...a);h.FS_createDevice=(...a)=>C.Hb(...a);h.FS=C;h.FS_createDataFile=(...a)=>lb(...a);+h.FS_createLazyFile=(...a)=>Hb(...a);+var Ad={55572:()=>{var a=h.canvas;if(!a)return console.error("[ESEngine] Module.canvas not set"),0;var b=a.getContext("webgl2",{alpha:!1,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1});b||=a.getContext("webgl",{alpha:!1,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1});return b?gd(b,{yc:0===b.getParameter(7938).indexOf("WebGL 2")?2:1,Fd:0,qc:!0}):(console.error("[ESEngine] Failed to create WebGL context"),0)},56273:()=>h.canvas?window.devicePixelRatio||+1:1},tc,Bd,uc,vd,td,ud,wa,rc,Cd={z:(a,b,c)=>{(new Fa(a)).fc(b,c);Ga=a;Ha++;throw Ga;},K:function(a,b,c){Ia=c;try{var d=O(a);switch(b){case 0:var e=B();if(0>e)break;for(;C.streams[e];)e++;return wb(d,e).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=B(),d.flags|=e,0;case 12:return e=B(),u[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof C||"ErrnoError"!==f.name)throw f;return-f.xb}},ha:function(a,b,c){Ia=c;try{var d=O(a);switch(b){case 21509:return d.tty?+0:-59;case 21505:if(!d.tty)return-59;if(d.tty.Gb.zd){a=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var e=B();v[e>>2]=25856;v[e+4>>2]=5;v[e+8>>2]=191;v[e+12>>2]=35387;for(var f=0;32>f;f++)q[e+f+17]=a[f]||0}return 0;case 21510:case 21511:case 21512:return d.tty?0:-59;case 21506:case 21507:case 21508:if(!d.tty)return-59;if(d.tty.Gb.Ad)for(e=B(),a=[],f=0;32>f;f++)a.push(q[e+f+17]);return 0;case 21519:if(!d.tty)return-59;e=B();return v[e>>2]=0;case 21520:return d.tty?-28:+-59;case 21537:case 21531:return e=B(),C.tc(d,b,e);case 21523:if(!d.tty)return-59;d.tty.Gb.Bd&&(f=[24,80],e=B(),u[e>>1]=f[0],u[e+2>>1]=f[1]);return 0;case 21524:return d.tty?0:-59;case 21515:return d.tty?0:-59;default:return-28}}catch(g){if("undefined"==typeof C||"ErrnoError"!==g.name)throw g;return-g.xb}},ia:function(a,b,c,d){Ia=d;try{b=b?D(t,b):"";var e=b;if("/"===e.charAt(0))b=e;else{var f=-100===a?C.cwd():O(a).path;if(0==e.length)throw new C.cb(44);b=f+"/"+e}var g=d?B():0;return C.open(b,c,g).fd}catch(k){if("undefined"==+typeof C||"ErrnoError"!==k.name)throw k;return-k.xb}},ja:()=>z(""),e:a=>{var b=Ib[a];delete Ib[a];var c=b.Cc,d=b.Db,e=b.Nc,f=e.map(g=>g.vd).concat(e.map(g=>g.Md));Pb([a],f,g=>{var k={},m,l;for([m,l]of e.entries()){const p=g[m],r=l.Wb,w=l.ud,y=g[m+e.length],A=l.Ld,E=l.Nd;k[l.od]={read:I=>p.kb(r(w,I)),write:(I,N)=>{var J=[];A(E,I,y.ob(J,N));Jb(J)},optional:p.optional}}return[{name:b.name,kb:p=>{var r={},w;for(w in k)r[w]=k[w].read(p);d(p);return r},ob:(p,r)=>{for(var w in k)if(!(w in r||k[w].optional))throw new TypeError(`Missing field: "${w}"`);+var y=c();for(w in k)k[w].write(y,r[w]);null!==p&&p.push(d,y);return y},vb:Kb,pb:d}]})},aa:(a,b,c,d,e)=>{b=Q(b);d=0n===d;let f=g=>g;if(d){const g=8*c;f=k=>BigInt.asUintN(g,k);e=f(e)}P(a,{name:b,kb:f,ob:(g,k)=>{"number"==typeof k&&(k=BigInt(k));return k},vb:Sb(b,c,!d),pb:null})},Ha:(a,b,c,d)=>{b=Q(b);P(a,{name:b,kb:function(e){return!!e},ob:function(e,f){return f?c:d},vb:function(e){return this.kb(t[e])},pb:null})},ba:(a,b,c,d,e,f,g,k,m,l,p,r,w)=>{p=Q(p);f=S(e,f);k&&=S(g,k);l&&=S(m,l);w=S(r,w);var y=+cc(p);bc(y,function(){wc(`Cannot construct ${p} due to unbound types`,[d])});Pb([a,b,c],d?[d]:[],A=>{A=A[0];if(d){var E=A.jb;var I=E.Ob}else I=Yb.prototype;A=Zb(p,function(...Ab){if(Object.getPrototypeOf(this)!==N)throw new R(`Use 'new' to construct ${p}`);if(void 0===J.Kb)throw new R(`${p} has no accessible constructor`);var Gc=J.Kb[Ab.length];if(void 0===Gc)throw new R(`Tried to invoke ctor of ${p} with invalid number of parameters (${Ab.length}) - expected (${Object.keys(J.Kb).toString()}) parameters instead!`);+return Gc.apply(this,Ab)});var N=Object.create(I,{constructor:{value:A}});A.prototype=N;var J=new dc(p,A,N,w,E,f,k,l);if(J.sb){var F;(F=J.sb).Ec??(F.Ec=[]);J.sb.Ec.push(J)}E=new oc(p,J,!0,!1,!1);F=new oc(p+"*",J,!1,!1,!1);I=new oc(p+" const*",J,!1,!0,!1);$b[a]={pointerType:F,jd:I};pc(y,A);return[E,F,I]})},ma:(a,b,c,d,e,f)=>{var g=xc(b,c);e=S(d,e);Pb([],[a],k=>{k=k[0];var m=`constructor ${k.name}`;void 0===k.jb.Kb&&(k.jb.Kb=[]);if(void 0!==k.jb.Kb[b-1])throw new R(`Cannot register multiple constructors with identical number of parameters (${b-+1}) for class '${k.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);k.jb.Kb[b-1]=()=>{wc(`Cannot construct ${k.name} due to unbound types`,g)};Pb([],g,l=>{l.splice(1,0,null);k.jb.Kb[b-1]=zc(m,l,null,e,f);return[]});return[]})},c:(a,b,c,d,e,f,g,k,m)=>{var l=xc(c,d);b=Q(b);b=Ac(b);f=S(e,f);Pb([],[a],p=>{function r(){wc(`Cannot call ${w} due to unbound types`,l)}p=p[0];var w=`${p.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);k&&p.jb.Jd.push(b);+var y=p.jb.Ob,A=y[b];void 0===A||void 0===A.qb&&A.className!==p.name&&A.Jb===c-2?(r.Jb=c-2,r.className=p.name,y[b]=r):(ac(y,b,w),y[b].qb[c-2]=r);Pb([],l,E=>{E=zc(w,E,p,f,g,m);void 0===y[b].qb?(E.Jb=c-2,y[b]=E):y[b].qb[c-2]=E;return[]});return[]})},Fa:a=>P(a,Dc),M:(a,b,c,d,e)=>{b=Q(b);e=0===e?"object":1===e?"number":"string";switch(e){case "object":function g(){}g.values={};P(a,{name:b,constructor:g,valueType:e,kb:function(k){return this.constructor.values[k]},ob:(k,m)=>m.value,vb:Ec(b,c,d),pb:null});+bc(b,g);break;case "number":var f={};P(a,{name:b,wc:f,valueType:e,kb:k=>k,ob:(k,m)=>m,vb:Ec(b,c,d),pb:null});bc(b,f);delete h[b].Jb;break;case "string":f={},P(a,{name:b,ad:{},Wc:{},wc:f,valueType:e,kb:function(k){return this.Wc[k]},ob:function(k,m){return this.ad[m]},vb:Ec(b,c,d),pb:null}),bc(b,f),delete h[b].Jb}},l:(a,b,c)=>{var d=Fc(a);b=Q(b);switch(d.valueType){case "object":a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Zb(`${d.name}_${b}`,function(){})}});+a.values[c]=d;a[b]=d;break;case "number":d.wc[b]=c;break;case "string":d.ad[b]=c,d.Wc[c]=b,d.wc[b]=b}},$:(a,b,c)=>{b=Q(b);P(a,{name:b,kb:d=>d,ob:(d,e)=>e,vb:Hc(b,c),pb:null})},a:(a,b,c,d,e,f,g)=>{var k=xc(b,c);a=Q(a);a=Ac(a);e=S(d,e);bc(a,function(){wc(`Cannot call ${a} due to unbound types`,k)},b-1);Pb([],k,m=>{m=[m[0],null].concat(m.slice(1));pc(a,zc(a,m,null,e,f,g),b-1);return[]})},j:(a,b,c,d,e)=>{b=Q(b);let f=k=>k;if(0===d){var g=32-8*c;f=k=>k<<g>>>g;e=f(e)}P(a,{name:b,kb:f,ob:(k,m)=>m,vb:Sb(b,+c,0!==d),pb:null})},d:(a,b,c)=>{function d(f){return new e(q.buffer,x[f+4>>2],x[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=Q(c);P(a,{name:c,kb:d,vb:d},{xd:!0})},Ga:(a,b)=>{b=Q(b);P(a,{name:b,kb(c){var d=(d=c+4)?D(t,d,x[c>>2],!0):"";uc(c);return d},ob(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new R("Cannot pass non-string to std::string");+var f=e?Va(d):d.length;var g=Bd(4+f+1),k=g+4;x[g>>2]=f;e?G(d,t,k,f+1):t.set(d,k);null!==c&&c.push(uc,g);return g},vb:Kb,pb(c){uc(c)}})},H:(a,b,c)=>{c=Q(c);if(2===b){var d=Jc;var e=Kc;var f=Lc}else d=Mc,e=Nc,f=Oc;P(a,{name:c,kb:g=>{var k=d(g+4,x[g>>2]*b,!0);uc(g);return k},ob:(g,k)=>{if("string"!=typeof k)throw new R(`Cannot pass non-string to C++ string type ${c}`);var m=f(k),l=Bd(4+m+b);x[l>>2]=m/b;e(k,l+4,m+b);null!==g&&g.push(uc,l);return l},vb:Kb,pb(g){uc(g)}})},f:(a,b,c,d,e,f)=>{Ib[a]={name:Q(b),+Cc:S(c,d),Db:S(e,f),Nc:[]}},b:(a,b,c,d,e,f,g,k,m,l)=>{Ib[a].Nc.push({od:Q(b),vd:c,Wb:S(d,e),ud:f,Md:g,Ld:S(k,m),Nd:l})},Ia:(a,b)=>{b=Q(b);P(a,{Ed:!0,name:b,kb:()=>{},ob:()=>{}})},ca:(a,b,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();x[a>>2]=60*Math.max(f,e);v[b>>2]=Number(f!=e);b=g=>{var k=Math.abs(g);return`UTC${0<=g?"-":"+"}${String(Math.floor(k/60)).padStart(2,"0")}${String(k%60).padStart(2,"0")}`};a=b(f);b=b(e);e<f?(G(a,t,+c,17),G(b,t,d,17)):(G(a,t,d,17),G(b,t,c,17))},ka:function(a,b,c){if(!(0<=a&&3>=a))return 28;sa[c>>3]=BigInt(Math.round(1E6*(0===a?Date.now():performance.now())));return 0},oa:(a,b,c)=>{b=Qc(b,c);return Ad[a](...b)},pa:(a,b,c)=>{b=Qc(b,c);return Ad[a](...b)},na:()=>performance.now(),la:a=>{var b=t.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(a,d)/65536))-wa.buffer.byteLength+65535)/65536|+0;try{wa.grow(d);va();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},Ja:(a,b)=>{var c=b>>2;b={alpha:!!q[b+0],depth:!!q[b+1],stencil:!!q[b+2],antialias:!!q[b+3],premultipliedAlpha:!!q[b+4],preserveDrawingBuffer:!!q[b+5],powerPreference:jd[v[c+2]],failIfMajorPerformanceCaveat:!!q[b+12],yc:v[c+4],Fd:v[c+5],qc:q[b+24],nd:q[b+25],re:v[c+7],ue:q[b+32]};a=2<a?a?D(t,a):"":a;a=kd[a]||globalThis.document?.querySelector(a);return!a||b.nd?0:hd(a,b)},V:a=>{X==a&&(X=0);X===$c[a]&&(X=null);"object"==+typeof JSEvents&&JSEvents.te($c[a].Nb.canvas);$c[a]?.Nb.canvas&&($c[a].Nb.canvas.ed=void 0);$c[a]=null},I:a=>{X=$c[a];h.ctx=T=X?.Nb;return!a||T?0:-5},da:(a,b)=>{var c=0,d=0,e;for(e of nd()){var f=b+c;x[a+d>>2]=f;c+=G(e,t,f,Infinity)+1;d+=4}return 0},ea:(a,b)=>{var c=nd();x[a>>2]=c.length;a=0;for(var d of c)a+=Va(d)+1;x[b>>2]=a;return 0},J:function(a){try{var b=O(a);C.close(b);return 0}catch(c){if("undefined"==typeof C||"ErrnoError"!==c.name)throw c;return c.xb}},fa:function(a,b,c,d){try{a:{var e=+O(a);a=b;for(var f,g=b=0;g<c;g++){var k=x[a>>2],m=x[a+4>>2];a+=8;var l=C.read(e,q,k,m,f);if(0>l){var p=-1;break a}b+=l;if(l<m)break;"undefined"!=typeof f&&(f+=l)}p=b}x[d>>2]=p;return 0}catch(r){if("undefined"==typeof C||"ErrnoError"!==r.name)throw r;return r.xb}},ga:function(a,b,c,d){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var e=O(a);C.tb(e,b,c);sa[d>>3]=BigInt(e.position);e.rc&&0===b&&0===c&&(e.rc=null);return 0}catch(f){if("undefined"==typeof C||"ErrnoError"!==+f.name)throw f;return f.xb}},L:function(a,b,c,d){try{a:{var e=O(a);a=b;for(var f,g=b=0;g<c;g++){var k=x[a>>2],m=x[a+4>>2];a+=8;var l=C.write(e,q,k,m,f);if(0>l){var p=-1;break a}b+=l;if(l<m)break;"undefined"!=typeof f&&(f+=l)}p=b}x[d>>2]=p;return 0}catch(r){if("undefined"==typeof C||"ErrnoError"!==r.name)throw r;return r.xb}},w:a=>T.activeTexture(a),T:(a,b)=>{T.attachShader(U[a],V[b])},i:(a,b)=>{if(b&&!Wc[b]){var c=T.createBuffer();c.name=b;Wc[b]=c}34962==a?T.Tb=b:34963==a&&(T.Ub=b);35051==a?T.Hc=+b:35052==a&&(T.dc=b);T.bindBuffer(a,Wc[b])},m:(a,b)=>{T.bindFramebuffer(a,Xc[b])},h:(a,b)=>{T.bindTexture(a,Yc[b])},v:a=>{T.bindVertexArray(Zc[a]);a=T.getParameter(34965);T.Ub=a?a.name|0:0},p:(a,b)=>T.blendFunc(a,b),q:(a,b,c,d)=>{2<=X.version?c&&b?T.bufferData(a,t,d,c,b):T.bufferData(a,b,d):T.bufferData(a,c?t.subarray(c,c+b):b,d)},R:(a,b,c,d)=>{2<=X.version?c&&T.bufferSubData(a,b,t,d,c):T.bufferSubData(a,b,t.subarray(d,d+c))},qa:a=>T.checkFramebufferStatus(a),k:a=>T.clear(a),u:(a,b,c,d)=>T.clearColor(a,+b,c,d),W:a=>{T.compileShader(V[a])},Da:()=>{var a=bd(U),b=T.createProgram();b.name=a;b.lc=b.jc=b.kc=0;b.Dc=1;U[a]=b;return a},Y:a=>{var b=bd(V);V[b]=T.createShader(a);return b},s:(a,b)=>{for(var c=0;c<a;c++){var d=v[b+4*c>>2],e=Wc[d];e&&(T.deleteBuffer(e),e.name=0,Wc[d]=null,d==T.Tb&&(T.Tb=0),d==T.Ub&&(T.Ub=0),d==T.Hc&&(T.Hc=0),d==T.dc&&(T.dc=0))}},O:(a,b)=>{for(var c=0;c<a;++c){var d=v[b+4*c>>2],e=Xc[d];e&&(T.deleteFramebuffer(e),e.name=0,Xc[d]=null)}},Z:a=>{if(a){var b=U[a];b?(T.deleteProgram(b),+b.name=0,U[a]=null):W||=1281}},n:a=>{if(a){var b=V[a];b?(T.deleteShader(b),V[a]=null):W||=1281}},t:(a,b)=>{for(var c=0;c<a;c++){var d=v[b+4*c>>2],e=Yc[d];e&&(T.deleteTexture(e),e.name=0,Yc[d]=null)}},P:(a,b)=>{for(var c=0;c<a;c++){var d=v[b+4*c>>2];T.deleteVertexArray(Zc[d]);Zc[d]=null}},G:a=>T.disable(a),_:(a,b,c)=>{fd(b+c);T.drawArrays(a,b,c);ed&&T.bindBuffer(34962,Wc[T.Tb])},D:(a,b,c,d)=>{var e=0;if(!T.Ub){var f=1*ad[c-5120]*b;var g=dd(f);T.bindBuffer(34963,g);T.bufferSubData(34963,0,t.subarray(d,+d+f));if(0<b)for(g=0;g<X.zc;++g)if(f=X.Sb[g],f.cc&&f.enabled){switch(c){case 5121:e=Uint8Array;break;case 5123:e=Uint16Array;break;case 5125:e=Uint32Array;break;default:W||=1282;return}e=(new e(t.buffer,d,b)).reduce((k,m)=>Math.max(k,m))+1;break}d=0}fd(e);T.drawElements(a,b,c,d);ed&&T.bindBuffer(34962,Wc[T.Tb]);T.Ub||T.bindBuffer(34963,null)},y:a=>T.enable(a),B:a=>{X.Sb[a].enabled=!0;T.enableVertexAttribArray(a)},N:(a,b,c,d,e)=>{T.framebufferTexture2D(a,b,c,Yc[d],e)},r:(a,b)=>{cd(a,b,"createBuffer",+Wc)},ra:(a,b)=>{cd(a,b,"createFramebuffer",Xc)},F:(a,b)=>{cd(a,b,"createTexture",Yc)},Q:(a,b)=>{cd(a,b,"createVertexArray",Zc)},ta:a=>T.generateMipmap(a),Ba:(a,b,c,d)=>{a=T.getProgramInfoLog(U[a]);null===a&&(a="(unknown error)");b=0<b&&d?G(a,t,d,b):0;c&&(v[c>>2]=b)},S:(a,b,c)=>{if(c)if(a>=Vc)W||=1281;else if(a=U[a],35716==b)a=T.getProgramInfoLog(a),null===a&&(a="(unknown error)"),v[c>>2]=a.length+1;else if(35719==b){if(!a.lc){var d=T.getProgramParameter(a,35718);for(b=0;b<d;++b)a.lc=Math.max(a.lc,+T.getActiveUniform(a,b).name.length+1)}v[c>>2]=a.lc}else if(35722==b){if(!a.jc)for(d=T.getProgramParameter(a,35721),b=0;b<d;++b)a.jc=Math.max(a.jc,T.getActiveAttrib(a,b).name.length+1);v[c>>2]=a.jc}else if(35381==b){if(!a.kc)for(d=T.getProgramParameter(a,35382),b=0;b<d;++b)a.kc=Math.max(a.kc,T.getActiveUniformBlockName(a,b).length+1);v[c>>2]=a.kc}else v[c>>2]=T.getProgramParameter(a,b);else W||=1281},U:(a,b,c,d)=>{a=T.getShaderInfoLog(V[a]);null===a&&(a="(unknown error)");b=0<b&&d?G(a,t,d,b):0;c&&+(v[c>>2]=b)},C:(a,b,c)=>{c?35716==b?(a=T.getShaderInfoLog(V[a]),null===a&&(a="(unknown error)"),v[c>>2]=a?a.length+1:0):35720==b?(a=T.getShaderSource(V[a]),v[c>>2]=a?a.length+1:0):v[c>>2]=T.getShaderParameter(V[a],b):W||=1281},o:(a,b)=>{b=b?D(t,b):"";if(a=U[a]){var c=a,d=c.ac,e=c.$c,f;if(!d){c.ac=d={};c.Zc={};var g=T.getProgramParameter(c,35718);for(f=0;f<g;++f){var k=T.getActiveUniform(c,f);var m=k.name;k=k.size;var l=od(m);l=0<l?m.slice(0,l):m;var p=c.Dc;c.Dc+=k;e[l]=[k,p];for(m=0;m<k;++m)d[p]=+m,c.Zc[p++]=l}}c=a.ac;d=0;e=b;f=od(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.$c[e])&&d<e[0]&&(d+=e[1],c[d]=c[d]||T.getUniformLocation(a,b)))return d}else W||=1281;return-1},Ca:a=>{a=U[a];T.linkProgram(a);a.ac=0;a.$c={}},X:(a,b,c,d)=>{for(var e="",f=0;f<b;++f){var g=(g=x[c+4*f>>2])?D(t,g,d?x[d+4*f>>2]:void 0):"";e+=g}T.shaderSource(V[a],e)},E:(a,b,c,d,e,f,g,k,m)=>{if(2<=X.version){if(T.dc){T.texImage2D(a,b,c,d,e,f,g,k,m);return}if(m){var l=pd(k);m>>>=31-Math.clz32(l.BYTES_PER_ELEMENT);+T.texImage2D(a,b,c,d,e,f,g,k,l,m);return}}l=m?qd(k,g,d,e,m):null;T.texImage2D(a,b,c,d,e,f,g,k,l)},g:(a,b,c)=>T.texParameteri(a,b,c),sa:(a,b,c,d,e,f,g,k,m)=>{if(2<=X.version){if(T.dc){T.texSubImage2D(a,b,c,d,e,f,g,k,m);return}if(m){var l=pd(k);T.texSubImage2D(a,b,c,d,e,f,g,k,l,m>>>31-Math.clz32(l.BYTES_PER_ELEMENT));return}}m=m?qd(k,g,e,f,m):null;T.texSubImage2D(a,b,c,d,e,f,g,k,m)},ya:(a,b)=>{T.uniform1f(Y(a),b)},za:(a,b)=>{T.uniform1i(Y(a),b)},Ea:(a,b,c)=>{if(2<=X.version)b&&T.uniform1iv(Y(a),v,c>>+2,b);else{if(288>=b)for(var d=rd[b],e=0;e<b;++e)d[e]=v[c+4*e>>2];else d=v.subarray(c>>2,c+4*b>>2);T.uniform1iv(Y(a),d)}},xa:(a,b,c)=>{T.uniform2f(Y(a),b,c)},wa:(a,b,c,d)=>{T.uniform3f(Y(a),b,c,d)},va:(a,b,c,d,e)=>{T.uniform4f(Y(a),b,c,d,e)},ua:(a,b,c,d)=>{if(2<=X.version)b&&T.uniformMatrix4fv(Y(a),!!c,qa,d>>2,16*b);else{if(18>=b){var e=sd[16*b],f=qa;d>>=2;b*=16;for(var g=0;g<b;g+=16){var k=d+g;e[g]=f[k];e[g+1]=f[k+1];e[g+2]=f[k+2];e[g+3]=f[k+3];e[g+4]=f[k+4];e[g+5]=f[k+5];e[g+6]=f[k+6];e[g+7]=f[k++7];e[g+8]=f[k+8];e[g+9]=f[k+9];e[g+10]=f[k+10];e[g+11]=f[k+11];e[g+12]=f[k+12];e[g+13]=f[k+13];e[g+14]=f[k+14];e[g+15]=f[k+15]}}else e=qa.subarray(d>>2,d+64*b>>2);T.uniformMatrix4fv(Y(a),!!c,e)}},Aa:a=>{a=U[a];T.useProgram(a);T.kd=a},A:(a,b,c,d,e,f)=>{var g=X.Sb[a];T.Tb?(g.cc=!1,T.vertexAttribPointer(a,b,c,!!d,e,f)):(g.size=b,g.type=c,g.Tc=d,g.stride=e,g.ib=f,g.cc=!0,g.bd=function(k,m,l,p,r,w){this.vertexAttribPointer(k,m,l,p,r,w)})},x:(a,b,c,d)=>T.viewport(a,b,c,d)};+function Dd(){function a(){h.calledRun=!0;if(!ma){ua=!0;h.noFSInit||C.sc||C.fc();Ed.La();C.Rc=!1;na?.(h);h.onRuntimeInitialized?.();if(h.postRun)for("function"==typeof h.postRun&&(h.postRun=[h.postRun]);h.postRun.length;){var b=h.postRun.shift();Ca.push(b)}Ba(Ca)}}if(0<fb)gb=Dd;else{if(h.preRun)for("function"==typeof h.preRun&&(h.preRun=[h.preRun]);h.preRun.length;)Ea();Ba(Da);0<fb?gb=Dd:h.setStatus?(h.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>h.setStatus(""),1);a()},1)):a()}}var Ed;+Ed=await (async function(){function a(c){c=Ed=c.exports;tc=c.Ma;h._es_init=c.Oa;h._es_update=c.Pa;h._es_render=c.Qa;h._es_shutdown=c.Ra;h._es_on_touch=c.Sa;h._es_on_key=c.Ta;h._es_renderer_clear=c.Ua;h._es_renderer_begin_scene=c.Va;h._es_renderer_end_scene=c.Wa;h._es_renderer_draw_quad=c.Xa;h._es_renderer_draw_quad_textured=c.Ya;Bd=h._malloc=c.Za;uc=h._free=c._a;vd=c.$a;td=c.ab;ud=c.bb;wa=c.Ka;rc=c.Na;va();return Ed}var b={a:Cd};if(h.instantiateWasm)return new Promise(c=>{h.instantiateWasm(b,+(d,e)=>{c(a(d,e))})});xa??=h.locateFile?h.locateFile?h.locateFile("esengine.wasm",fa):fa+"esengine.wasm":(new URL("esengine.wasm",import.meta.url)).href;return a((await Aa(b)).instance)}());Dd();ua?moduleRtn=h:moduleRtn=new Promise((a,b)=>{na=a;oa=b});;return moduleRtn}export default ESEngineModule;diff --git a/desktop/src-tauri/gen/schemas/macOS-schema.json b/desktop/src-tauri/gen/schemas/macOS-schema.jsonnew file mode 100644index 000000000..ada5d8f63--- /dev/null+++ b/desktop/src-tauri/gen/schemas/macOS-schema.json@@ -0,0 +1,6158 @@+{+ "$schema": "http://json-schema.org/draft-07/schema#",+ "title": "CapabilityFile",+ "description": "Capability formats accepted in a capability file.",+ "anyOf": [+ {+ "description": "A single capability.",+ "allOf": [+ {+ "$ref": "#/definitions/Capability"+ }+ ]+ },+ {+ "description": "A list of capabilities.",+ "type": "array",+ "items": {+ "$ref": "#/definitions/Capability"+ }+ },+ {+ "description": "A list of capabilities.",+ "type": "object",+ "required": [+ "capabilities"+ ],+ "properties": {+ "capabilities": {+ "description": "The list of capabilities.",+ "type": "array",+ "items": {+ "$ref": "#/definitions/Capability"+ }+ }+ }+ }+ ],+ "definitions": {+ "Capability": {+ "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows' and webviews' fine grained access to the Tauri core, application, or plugin commands. If a webview or its window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programmatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",+ "type": "object",+ "required": [+ "identifier",+ "permissions"+ ],+ "properties": {+ "identifier": {+ "description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",+ "type": "string"+ },+ "description": {+ "description": "Description of what the capability is intended to allow on associated windows.\n\nIt should contain a description of what the grouped permissions should allow.\n\n## Example\n\nThis capability allows the `main` window access to `filesystem` write related commands and `dialog` commands to enable programmatic access to files selected by the user.",+ "default": "",+ "type": "string"+ },+ "remote": {+ "description": "Configure remote URLs that can use the capability permissions.\n\nThis setting is optional and defaults to not being set, as our default use case is that the content is served from our local application.\n\n:::caution Make sure you understand the security implications of providing remote sources with local system access. :::\n\n## Example\n\n```json { \"urls\": [\"https://*.mydomain.dev\"] } ```",+ "anyOf": [+ {+ "$ref": "#/definitions/CapabilityRemote"+ },+ {+ "type": "null"+ }+ ]+ },+ "local": {+ "description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.",+ "default": true,+ "type": "boolean"+ },+ "windows": {+ "description": "List of windows that are affected by this capability. Can be a glob pattern.\n\nIf a window label matches any of the patterns in this list, the capability will be enabled on all the webviews of that window, regardless of the value of [`Self::webviews`].\n\nOn multiwebview windows, prefer specifying [`Self::webviews`] and omitting [`Self::windows`] for a fine grained access control.\n\n## Example\n\n`[\"main\"]`",+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ "webviews": {+ "description": "List of webviews that are affected by this capability. Can be a glob pattern.\n\nThe capability will be enabled on all the webviews whose label matches any of the patterns in this list, regardless of whether the webview's window label matches a pattern in [`Self::windows`].\n\n## Example\n\n`[\"sub-webview-one\", \"sub-webview-two\"]`",+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ "permissions": {+ "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```",+ "type": "array",+ "items": {+ "$ref": "#/definitions/PermissionEntry"+ },+ "uniqueItems": true+ },+ "platforms": {+ "description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",+ "type": [+ "array",+ "null"+ ],+ "items": {+ "$ref": "#/definitions/Target"+ }+ }+ }+ },+ "CapabilityRemote": {+ "description": "Configuration for remote URLs that are associated with the capability.",+ "type": "object",+ "required": [+ "urls"+ ],+ "properties": {+ "urls": {+ "description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ }+ },+ "PermissionEntry": {+ "description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.",+ "anyOf": [+ {+ "description": "Reference a permission or permission set by identifier.",+ "allOf": [+ {+ "$ref": "#/definitions/Identifier"+ }+ ]+ },+ {+ "description": "Reference a permission or permission set by identifier and extends its scope.",+ "type": "object",+ "allOf": [+ {+ "if": {+ "properties": {+ "identifier": {+ "anyOf": [+ {+ "description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n#### This default permission set includes:\n\n- `create-app-specific-dirs`\n- `read-app-specific-dirs-recursive`\n- `deny-default`",+ "type": "string",+ "const": "fs:default",+ "markdownDescription": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n#### This default permission set includes:\n\n- `create-app-specific-dirs`\n- `read-app-specific-dirs-recursive`\n- `deny-default`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-index`",+ "type": "string",+ "const": "fs:allow-app-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-recursive`",+ "type": "string",+ "const": "fs:allow-app-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the application folders.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app`",+ "type": "string",+ "const": "fs:allow-app-read",+ "markdownDescription": "This allows non-recursive read access to the application folders.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app`"+ },+ {+ "description": "This allows full recursive read access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app-recursive`",+ "type": "string",+ "const": "fs:allow-app-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the application folders.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app`",+ "type": "string",+ "const": "fs:allow-app-write",+ "markdownDescription": "This allows non-recursive write access to the application folders.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app`"+ },+ {+ "description": "This allows full recursive write access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app-recursive`",+ "type": "string",+ "const": "fs:allow-app-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-index`",+ "type": "string",+ "const": "fs:allow-appcache-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-recursive`",+ "type": "string",+ "const": "fs:allow-appcache-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache`",+ "type": "string",+ "const": "fs:allow-appcache-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache-recursive`",+ "type": "string",+ "const": "fs:allow-appcache-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache`",+ "type": "string",+ "const": "fs:allow-appcache-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache-recursive`",+ "type": "string",+ "const": "fs:allow-appcache-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-index`",+ "type": "string",+ "const": "fs:allow-appconfig-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-recursive`",+ "type": "string",+ "const": "fs:allow-appconfig-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig`",+ "type": "string",+ "const": "fs:allow-appconfig-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig-recursive`",+ "type": "string",+ "const": "fs:allow-appconfig-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig`",+ "type": "string",+ "const": "fs:allow-appconfig-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig-recursive`",+ "type": "string",+ "const": "fs:allow-appconfig-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-index`",+ "type": "string",+ "const": "fs:allow-appdata-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-recursive`",+ "type": "string",+ "const": "fs:allow-appdata-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata`",+ "type": "string",+ "const": "fs:allow-appdata-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata-recursive`",+ "type": "string",+ "const": "fs:allow-appdata-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata`",+ "type": "string",+ "const": "fs:allow-appdata-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata-recursive`",+ "type": "string",+ "const": "fs:allow-appdata-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-index`",+ "type": "string",+ "const": "fs:allow-applocaldata-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-recursive`",+ "type": "string",+ "const": "fs:allow-applocaldata-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata`",+ "type": "string",+ "const": "fs:allow-applocaldata-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata-recursive`",+ "type": "string",+ "const": "fs:allow-applocaldata-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata`",+ "type": "string",+ "const": "fs:allow-applocaldata-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata-recursive`",+ "type": "string",+ "const": "fs:allow-applocaldata-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-index`",+ "type": "string",+ "const": "fs:allow-applog-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-recursive`",+ "type": "string",+ "const": "fs:allow-applog-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog`",+ "type": "string",+ "const": "fs:allow-applog-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog-recursive`",+ "type": "string",+ "const": "fs:allow-applog-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog`",+ "type": "string",+ "const": "fs:allow-applog-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog-recursive`",+ "type": "string",+ "const": "fs:allow-applog-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-index`",+ "type": "string",+ "const": "fs:allow-audio-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-recursive`",+ "type": "string",+ "const": "fs:allow-audio-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio`",+ "type": "string",+ "const": "fs:allow-audio-read",+ "markdownDescription": "This allows non-recursive read access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio`"+ },+ {+ "description": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio-recursive`",+ "type": "string",+ "const": "fs:allow-audio-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio`",+ "type": "string",+ "const": "fs:allow-audio-write",+ "markdownDescription": "This allows non-recursive write access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio`"+ },+ {+ "description": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio-recursive`",+ "type": "string",+ "const": "fs:allow-audio-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-index`",+ "type": "string",+ "const": "fs:allow-cache-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-recursive`",+ "type": "string",+ "const": "fs:allow-cache-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache`",+ "type": "string",+ "const": "fs:allow-cache-read",+ "markdownDescription": "This allows non-recursive read access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache`"+ },+ {+ "description": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache-recursive`",+ "type": "string",+ "const": "fs:allow-cache-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache`",+ "type": "string",+ "const": "fs:allow-cache-write",+ "markdownDescription": "This allows non-recursive write access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache`"+ },+ {+ "description": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache-recursive`",+ "type": "string",+ "const": "fs:allow-cache-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-index`",+ "type": "string",+ "const": "fs:allow-config-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-recursive`",+ "type": "string",+ "const": "fs:allow-config-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config`",+ "type": "string",+ "const": "fs:allow-config-read",+ "markdownDescription": "This allows non-recursive read access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config`"+ },+ {+ "description": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config-recursive`",+ "type": "string",+ "const": "fs:allow-config-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config`",+ "type": "string",+ "const": "fs:allow-config-write",+ "markdownDescription": "This allows non-recursive write access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config`"+ },+ {+ "description": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config-recursive`",+ "type": "string",+ "const": "fs:allow-config-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-index`",+ "type": "string",+ "const": "fs:allow-data-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-recursive`",+ "type": "string",+ "const": "fs:allow-data-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data`",+ "type": "string",+ "const": "fs:allow-data-read",+ "markdownDescription": "This allows non-recursive read access to the `$DATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data-recursive`",+ "type": "string",+ "const": "fs:allow-data-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data`",+ "type": "string",+ "const": "fs:allow-data-write",+ "markdownDescription": "This allows non-recursive write access to the `$DATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data-recursive`",+ "type": "string",+ "const": "fs:allow-data-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-index`",+ "type": "string",+ "const": "fs:allow-desktop-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-recursive`",+ "type": "string",+ "const": "fs:allow-desktop-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop`",+ "type": "string",+ "const": "fs:allow-desktop-read",+ "markdownDescription": "This allows non-recursive read access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop-recursive`",+ "type": "string",+ "const": "fs:allow-desktop-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop`",+ "type": "string",+ "const": "fs:allow-desktop-write",+ "markdownDescription": "This allows non-recursive write access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop-recursive`",+ "type": "string",+ "const": "fs:allow-desktop-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-index`",+ "type": "string",+ "const": "fs:allow-document-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-recursive`",+ "type": "string",+ "const": "fs:allow-document-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document`",+ "type": "string",+ "const": "fs:allow-document-read",+ "markdownDescription": "This allows non-recursive read access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document-recursive`",+ "type": "string",+ "const": "fs:allow-document-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document`",+ "type": "string",+ "const": "fs:allow-document-write",+ "markdownDescription": "This allows non-recursive write access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document-recursive`",+ "type": "string",+ "const": "fs:allow-document-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-index`",+ "type": "string",+ "const": "fs:allow-download-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-recursive`",+ "type": "string",+ "const": "fs:allow-download-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download`",+ "type": "string",+ "const": "fs:allow-download-read",+ "markdownDescription": "This allows non-recursive read access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download-recursive`",+ "type": "string",+ "const": "fs:allow-download-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download`",+ "type": "string",+ "const": "fs:allow-download-write",+ "markdownDescription": "This allows non-recursive write access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download-recursive`",+ "type": "string",+ "const": "fs:allow-download-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-index`",+ "type": "string",+ "const": "fs:allow-exe-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-recursive`",+ "type": "string",+ "const": "fs:allow-exe-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$EXE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe`",+ "type": "string",+ "const": "fs:allow-exe-read",+ "markdownDescription": "This allows non-recursive read access to the `$EXE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe`"+ },+ {+ "description": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe-recursive`",+ "type": "string",+ "const": "fs:allow-exe-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$EXE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe`",+ "type": "string",+ "const": "fs:allow-exe-write",+ "markdownDescription": "This allows non-recursive write access to the `$EXE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe`"+ },+ {+ "description": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe-recursive`",+ "type": "string",+ "const": "fs:allow-exe-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-index`",+ "type": "string",+ "const": "fs:allow-font-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-recursive`",+ "type": "string",+ "const": "fs:allow-font-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$FONT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font`",+ "type": "string",+ "const": "fs:allow-font-read",+ "markdownDescription": "This allows non-recursive read access to the `$FONT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font`"+ },+ {+ "description": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font-recursive`",+ "type": "string",+ "const": "fs:allow-font-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$FONT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font`",+ "type": "string",+ "const": "fs:allow-font-write",+ "markdownDescription": "This allows non-recursive write access to the `$FONT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font`"+ },+ {+ "description": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font-recursive`",+ "type": "string",+ "const": "fs:allow-font-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-index`",+ "type": "string",+ "const": "fs:allow-home-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-recursive`",+ "type": "string",+ "const": "fs:allow-home-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$HOME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home`",+ "type": "string",+ "const": "fs:allow-home-read",+ "markdownDescription": "This allows non-recursive read access to the `$HOME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home`"+ },+ {+ "description": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home-recursive`",+ "type": "string",+ "const": "fs:allow-home-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$HOME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home`",+ "type": "string",+ "const": "fs:allow-home-write",+ "markdownDescription": "This allows non-recursive write access to the `$HOME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home`"+ },+ {+ "description": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home-recursive`",+ "type": "string",+ "const": "fs:allow-home-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-index`",+ "type": "string",+ "const": "fs:allow-localdata-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-recursive`",+ "type": "string",+ "const": "fs:allow-localdata-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata`",+ "type": "string",+ "const": "fs:allow-localdata-read",+ "markdownDescription": "This allows non-recursive read access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata`"+ },+ {+ "description": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata-recursive`",+ "type": "string",+ "const": "fs:allow-localdata-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata`",+ "type": "string",+ "const": "fs:allow-localdata-write",+ "markdownDescription": "This allows non-recursive write access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata`"+ },+ {+ "description": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata-recursive`",+ "type": "string",+ "const": "fs:allow-localdata-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-index`",+ "type": "string",+ "const": "fs:allow-log-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-recursive`",+ "type": "string",+ "const": "fs:allow-log-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$LOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log`",+ "type": "string",+ "const": "fs:allow-log-read",+ "markdownDescription": "This allows non-recursive read access to the `$LOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log`"+ },+ {+ "description": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log-recursive`",+ "type": "string",+ "const": "fs:allow-log-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$LOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log`",+ "type": "string",+ "const": "fs:allow-log-write",+ "markdownDescription": "This allows non-recursive write access to the `$LOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log`"+ },+ {+ "description": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log-recursive`",+ "type": "string",+ "const": "fs:allow-log-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-index`",+ "type": "string",+ "const": "fs:allow-picture-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-recursive`",+ "type": "string",+ "const": "fs:allow-picture-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture`",+ "type": "string",+ "const": "fs:allow-picture-read",+ "markdownDescription": "This allows non-recursive read access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture`"+ },+ {+ "description": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture-recursive`",+ "type": "string",+ "const": "fs:allow-picture-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture`",+ "type": "string",+ "const": "fs:allow-picture-write",+ "markdownDescription": "This allows non-recursive write access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture`"+ },+ {+ "description": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture-recursive`",+ "type": "string",+ "const": "fs:allow-picture-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-index`",+ "type": "string",+ "const": "fs:allow-public-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-recursive`",+ "type": "string",+ "const": "fs:allow-public-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public`",+ "type": "string",+ "const": "fs:allow-public-read",+ "markdownDescription": "This allows non-recursive read access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public`"+ },+ {+ "description": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public-recursive`",+ "type": "string",+ "const": "fs:allow-public-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public`",+ "type": "string",+ "const": "fs:allow-public-write",+ "markdownDescription": "This allows non-recursive write access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public`"+ },+ {+ "description": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public-recursive`",+ "type": "string",+ "const": "fs:allow-public-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-index`",+ "type": "string",+ "const": "fs:allow-resource-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-recursive`",+ "type": "string",+ "const": "fs:allow-resource-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource`",+ "type": "string",+ "const": "fs:allow-resource-read",+ "markdownDescription": "This allows non-recursive read access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource`"+ },+ {+ "description": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource-recursive`",+ "type": "string",+ "const": "fs:allow-resource-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource`",+ "type": "string",+ "const": "fs:allow-resource-write",+ "markdownDescription": "This allows non-recursive write access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource`"+ },+ {+ "description": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource-recursive`",+ "type": "string",+ "const": "fs:allow-resource-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-index`",+ "type": "string",+ "const": "fs:allow-runtime-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-recursive`",+ "type": "string",+ "const": "fs:allow-runtime-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime`",+ "type": "string",+ "const": "fs:allow-runtime-read",+ "markdownDescription": "This allows non-recursive read access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime`"+ },+ {+ "description": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime-recursive`",+ "type": "string",+ "const": "fs:allow-runtime-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime`",+ "type": "string",+ "const": "fs:allow-runtime-write",+ "markdownDescription": "This allows non-recursive write access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime`"+ },+ {+ "description": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime-recursive`",+ "type": "string",+ "const": "fs:allow-runtime-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-index`",+ "type": "string",+ "const": "fs:allow-temp-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-recursive`",+ "type": "string",+ "const": "fs:allow-temp-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp`",+ "type": "string",+ "const": "fs:allow-temp-read",+ "markdownDescription": "This allows non-recursive read access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp`"+ },+ {+ "description": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp-recursive`",+ "type": "string",+ "const": "fs:allow-temp-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp`",+ "type": "string",+ "const": "fs:allow-temp-write",+ "markdownDescription": "This allows non-recursive write access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp`"+ },+ {+ "description": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp-recursive`",+ "type": "string",+ "const": "fs:allow-temp-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-index`",+ "type": "string",+ "const": "fs:allow-template-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-recursive`",+ "type": "string",+ "const": "fs:allow-template-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template`",+ "type": "string",+ "const": "fs:allow-template-read",+ "markdownDescription": "This allows non-recursive read access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template`"+ },+ {+ "description": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template-recursive`",+ "type": "string",+ "const": "fs:allow-template-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template`",+ "type": "string",+ "const": "fs:allow-template-write",+ "markdownDescription": "This allows non-recursive write access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template`"+ },+ {+ "description": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template-recursive`",+ "type": "string",+ "const": "fs:allow-template-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-index`",+ "type": "string",+ "const": "fs:allow-video-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-recursive`",+ "type": "string",+ "const": "fs:allow-video-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video`",+ "type": "string",+ "const": "fs:allow-video-read",+ "markdownDescription": "This allows non-recursive read access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video`"+ },+ {+ "description": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video-recursive`",+ "type": "string",+ "const": "fs:allow-video-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video`",+ "type": "string",+ "const": "fs:allow-video-write",+ "markdownDescription": "This allows non-recursive write access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video`"+ },+ {+ "description": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video-recursive`",+ "type": "string",+ "const": "fs:allow-video-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video-recursive`"+ },+ {+ "description": "This denies access to dangerous Tauri relevant files and folders by default.\n#### This permission set includes:\n\n- `deny-webview-data-linux`\n- `deny-webview-data-windows`",+ "type": "string",+ "const": "fs:deny-default",+ "markdownDescription": "This denies access to dangerous Tauri relevant files and folders by default.\n#### This permission set includes:\n\n- `deny-webview-data-linux`\n- `deny-webview-data-windows`"+ },+ {+ "description": "Enables the copy_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-copy-file",+ "markdownDescription": "Enables the copy_file command without any pre-configured scope."+ },+ {+ "description": "Enables the create command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-create",+ "markdownDescription": "Enables the create command without any pre-configured scope."+ },+ {+ "description": "Enables the exists command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-exists",+ "markdownDescription": "Enables the exists command without any pre-configured scope."+ },+ {+ "description": "Enables the fstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-fstat",+ "markdownDescription": "Enables the fstat command without any pre-configured scope."+ },+ {+ "description": "Enables the ftruncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-ftruncate",+ "markdownDescription": "Enables the ftruncate command without any pre-configured scope."+ },+ {+ "description": "Enables the lstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-lstat",+ "markdownDescription": "Enables the lstat command without any pre-configured scope."+ },+ {+ "description": "Enables the mkdir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-mkdir",+ "markdownDescription": "Enables the mkdir command without any pre-configured scope."+ },+ {+ "description": "Enables the open command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-open",+ "markdownDescription": "Enables the open command without any pre-configured scope."+ },+ {+ "description": "Enables the read command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read",+ "markdownDescription": "Enables the read command without any pre-configured scope."+ },+ {+ "description": "Enables the read_dir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-dir",+ "markdownDescription": "Enables the read_dir command without any pre-configured scope."+ },+ {+ "description": "Enables the read_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-file",+ "markdownDescription": "Enables the read_file command without any pre-configured scope."+ },+ {+ "description": "Enables the read_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-text-file",+ "markdownDescription": "Enables the read_text_file command without any pre-configured scope."+ },+ {+ "description": "Enables the read_text_file_lines command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-text-file-lines",+ "markdownDescription": "Enables the read_text_file_lines command without any pre-configured scope."+ },+ {+ "description": "Enables the read_text_file_lines_next command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-text-file-lines-next",+ "markdownDescription": "Enables the read_text_file_lines_next command without any pre-configured scope."+ },+ {+ "description": "Enables the remove command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-remove",+ "markdownDescription": "Enables the remove command without any pre-configured scope."+ },+ {+ "description": "Enables the rename command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-rename",+ "markdownDescription": "Enables the rename command without any pre-configured scope."+ },+ {+ "description": "Enables the seek command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-seek",+ "markdownDescription": "Enables the seek command without any pre-configured scope."+ },+ {+ "description": "Enables the size command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-size",+ "markdownDescription": "Enables the size command without any pre-configured scope."+ },+ {+ "description": "Enables the stat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-stat",+ "markdownDescription": "Enables the stat command without any pre-configured scope."+ },+ {+ "description": "Enables the truncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-truncate",+ "markdownDescription": "Enables the truncate command without any pre-configured scope."+ },+ {+ "description": "Enables the unwatch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-unwatch",+ "markdownDescription": "Enables the unwatch command without any pre-configured scope."+ },+ {+ "description": "Enables the watch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-watch",+ "markdownDescription": "Enables the watch command without any pre-configured scope."+ },+ {+ "description": "Enables the write command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-write",+ "markdownDescription": "Enables the write command without any pre-configured scope."+ },+ {+ "description": "Enables the write_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-write-file",+ "markdownDescription": "Enables the write_file command without any pre-configured scope."+ },+ {+ "description": "Enables the write_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-write-text-file",+ "markdownDescription": "Enables the write_text_file command without any pre-configured scope."+ },+ {+ "description": "This permissions allows to create the application specific directories.\n",+ "type": "string",+ "const": "fs:create-app-specific-dirs",+ "markdownDescription": "This permissions allows to create the application specific directories.\n"+ },+ {+ "description": "Denies the copy_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-copy-file",+ "markdownDescription": "Denies the copy_file command without any pre-configured scope."+ },+ {+ "description": "Denies the create command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-create",+ "markdownDescription": "Denies the create command without any pre-configured scope."+ },+ {+ "description": "Denies the exists command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-exists",+ "markdownDescription": "Denies the exists command without any pre-configured scope."+ },+ {+ "description": "Denies the fstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-fstat",+ "markdownDescription": "Denies the fstat command without any pre-configured scope."+ },+ {+ "description": "Denies the ftruncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-ftruncate",+ "markdownDescription": "Denies the ftruncate command without any pre-configured scope."+ },+ {+ "description": "Denies the lstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-lstat",+ "markdownDescription": "Denies the lstat command without any pre-configured scope."+ },+ {+ "description": "Denies the mkdir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-mkdir",+ "markdownDescription": "Denies the mkdir command without any pre-configured scope."+ },+ {+ "description": "Denies the open command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-open",+ "markdownDescription": "Denies the open command without any pre-configured scope."+ },+ {+ "description": "Denies the read command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read",+ "markdownDescription": "Denies the read command without any pre-configured scope."+ },+ {+ "description": "Denies the read_dir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-dir",+ "markdownDescription": "Denies the read_dir command without any pre-configured scope."+ },+ {+ "description": "Denies the read_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-file",+ "markdownDescription": "Denies the read_file command without any pre-configured scope."+ },+ {+ "description": "Denies the read_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-text-file",+ "markdownDescription": "Denies the read_text_file command without any pre-configured scope."+ },+ {+ "description": "Denies the read_text_file_lines command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-text-file-lines",+ "markdownDescription": "Denies the read_text_file_lines command without any pre-configured scope."+ },+ {+ "description": "Denies the read_text_file_lines_next command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-text-file-lines-next",+ "markdownDescription": "Denies the read_text_file_lines_next command without any pre-configured scope."+ },+ {+ "description": "Denies the remove command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-remove",+ "markdownDescription": "Denies the remove command without any pre-configured scope."+ },+ {+ "description": "Denies the rename command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-rename",+ "markdownDescription": "Denies the rename command without any pre-configured scope."+ },+ {+ "description": "Denies the seek command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-seek",+ "markdownDescription": "Denies the seek command without any pre-configured scope."+ },+ {+ "description": "Denies the size command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-size",+ "markdownDescription": "Denies the size command without any pre-configured scope."+ },+ {+ "description": "Denies the stat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-stat",+ "markdownDescription": "Denies the stat command without any pre-configured scope."+ },+ {+ "description": "Denies the truncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-truncate",+ "markdownDescription": "Denies the truncate command without any pre-configured scope."+ },+ {+ "description": "Denies the unwatch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-unwatch",+ "markdownDescription": "Denies the unwatch command without any pre-configured scope."+ },+ {+ "description": "Denies the watch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-watch",+ "markdownDescription": "Denies the watch command without any pre-configured scope."+ },+ {+ "description": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.",+ "type": "string",+ "const": "fs:deny-webview-data-linux",+ "markdownDescription": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered."+ },+ {+ "description": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.",+ "type": "string",+ "const": "fs:deny-webview-data-windows",+ "markdownDescription": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered."+ },+ {+ "description": "Denies the write command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-write",+ "markdownDescription": "Denies the write command without any pre-configured scope."+ },+ {+ "description": "Denies the write_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-write-file",+ "markdownDescription": "Denies the write_file command without any pre-configured scope."+ },+ {+ "description": "Denies the write_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-write-text-file",+ "markdownDescription": "Denies the write_text_file command without any pre-configured scope."+ },+ {+ "description": "This enables all read related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-all",+ "markdownDescription": "This enables all read related commands without any pre-configured accessible paths."+ },+ {+ "description": "This permission allows recursive read functionality on the application\nspecific base directories. \n",+ "type": "string",+ "const": "fs:read-app-specific-dirs-recursive",+ "markdownDescription": "This permission allows recursive read functionality on the application\nspecific base directories. \n"+ },+ {+ "description": "This enables directory read and file metadata related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-dirs",+ "markdownDescription": "This enables directory read and file metadata related commands without any pre-configured accessible paths."+ },+ {+ "description": "This enables file read related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-files",+ "markdownDescription": "This enables file read related commands without any pre-configured accessible paths."+ },+ {+ "description": "This enables all index or metadata related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-meta",+ "markdownDescription": "This enables all index or metadata related commands without any pre-configured accessible paths."+ },+ {+ "description": "An empty permission you can use to modify the global scope.\n\n## Example\n\n```json\n{\n \"identifier\": \"read-documents\",\n \"windows\": [\"main\"],\n \"permissions\": [\n \"fs:allow-read\",\n {\n \"identifier\": \"fs:scope\",\n \"allow\": [\n \"$APPDATA/documents/**/*\"\n ],\n \"deny\": [\n \"$APPDATA/documents/secret.txt\"\n ]\n }\n ]\n}\n```\n",+ "type": "string",+ "const": "fs:scope",+ "markdownDescription": "An empty permission you can use to modify the global scope.\n\n## Example\n\n```json\n{\n \"identifier\": \"read-documents\",\n \"windows\": [\"main\"],\n \"permissions\": [\n \"fs:allow-read\",\n {\n \"identifier\": \"fs:scope\",\n \"allow\": [\n \"$APPDATA/documents/**/*\"\n ],\n \"deny\": [\n \"$APPDATA/documents/secret.txt\"\n ]\n }\n ]\n}\n```\n"+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the application folders.",+ "type": "string",+ "const": "fs:scope-app",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the application folders."+ },+ {+ "description": "This scope permits to list all files and folders in the application directories.",+ "type": "string",+ "const": "fs:scope-app-index",+ "markdownDescription": "This scope permits to list all files and folders in the application directories."+ },+ {+ "description": "This scope permits recursive access to the complete application folders, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-app-recursive",+ "markdownDescription": "This scope permits recursive access to the complete application folders, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.",+ "type": "string",+ "const": "fs:scope-appcache",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPCACHE`folder.",+ "type": "string",+ "const": "fs:scope-appcache-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPCACHE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-appcache-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.",+ "type": "string",+ "const": "fs:scope-appconfig",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPCONFIG`folder.",+ "type": "string",+ "const": "fs:scope-appconfig-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPCONFIG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-appconfig-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.",+ "type": "string",+ "const": "fs:scope-appdata",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPDATA`folder.",+ "type": "string",+ "const": "fs:scope-appdata-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPDATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-appdata-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.",+ "type": "string",+ "const": "fs:scope-applocaldata",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder.",+ "type": "string",+ "const": "fs:scope-applocaldata-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-applocaldata-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.",+ "type": "string",+ "const": "fs:scope-applog",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPLOG`folder.",+ "type": "string",+ "const": "fs:scope-applog-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPLOG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-applog-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.",+ "type": "string",+ "const": "fs:scope-audio",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$AUDIO`folder.",+ "type": "string",+ "const": "fs:scope-audio-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$AUDIO`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-audio-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder.",+ "type": "string",+ "const": "fs:scope-cache",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$CACHE`folder.",+ "type": "string",+ "const": "fs:scope-cache-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$CACHE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-cache-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.",+ "type": "string",+ "const": "fs:scope-config",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$CONFIG`folder.",+ "type": "string",+ "const": "fs:scope-config-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$CONFIG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-config-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DATA` folder.",+ "type": "string",+ "const": "fs:scope-data",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DATA`folder.",+ "type": "string",+ "const": "fs:scope-data-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-data-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.",+ "type": "string",+ "const": "fs:scope-desktop",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DESKTOP`folder.",+ "type": "string",+ "const": "fs:scope-desktop-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DESKTOP`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-desktop-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.",+ "type": "string",+ "const": "fs:scope-document",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DOCUMENT`folder.",+ "type": "string",+ "const": "fs:scope-document-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DOCUMENT`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-document-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.",+ "type": "string",+ "const": "fs:scope-download",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DOWNLOAD`folder.",+ "type": "string",+ "const": "fs:scope-download-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DOWNLOAD`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-download-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$EXE` folder.",+ "type": "string",+ "const": "fs:scope-exe",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$EXE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$EXE`folder.",+ "type": "string",+ "const": "fs:scope-exe-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$EXE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-exe-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$FONT` folder.",+ "type": "string",+ "const": "fs:scope-font",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$FONT` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$FONT`folder.",+ "type": "string",+ "const": "fs:scope-font-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$FONT`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-font-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$HOME` folder.",+ "type": "string",+ "const": "fs:scope-home",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$HOME` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$HOME`folder.",+ "type": "string",+ "const": "fs:scope-home-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$HOME`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-home-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.",+ "type": "string",+ "const": "fs:scope-localdata",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$LOCALDATA`folder.",+ "type": "string",+ "const": "fs:scope-localdata-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$LOCALDATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-localdata-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$LOG` folder.",+ "type": "string",+ "const": "fs:scope-log",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$LOG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$LOG`folder.",+ "type": "string",+ "const": "fs:scope-log-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$LOG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-log-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.",+ "type": "string",+ "const": "fs:scope-picture",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$PICTURE`folder.",+ "type": "string",+ "const": "fs:scope-picture-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$PICTURE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-picture-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.",+ "type": "string",+ "const": "fs:scope-public",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$PUBLIC`folder.",+ "type": "string",+ "const": "fs:scope-public-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$PUBLIC`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-public-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.",+ "type": "string",+ "const": "fs:scope-resource",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$RESOURCE`folder.",+ "type": "string",+ "const": "fs:scope-resource-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$RESOURCE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-resource-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.",+ "type": "string",+ "const": "fs:scope-runtime",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$RUNTIME`folder.",+ "type": "string",+ "const": "fs:scope-runtime-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$RUNTIME`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-runtime-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder.",+ "type": "string",+ "const": "fs:scope-temp",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$TEMP`folder.",+ "type": "string",+ "const": "fs:scope-temp-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$TEMP`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-temp-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.",+ "type": "string",+ "const": "fs:scope-template",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$TEMPLATE`folder.",+ "type": "string",+ "const": "fs:scope-template-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$TEMPLATE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-template-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.",+ "type": "string",+ "const": "fs:scope-video",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$VIDEO`folder.",+ "type": "string",+ "const": "fs:scope-video-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$VIDEO`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-video-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files."+ },+ {+ "description": "This enables all write related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:write-all",+ "markdownDescription": "This enables all write related commands without any pre-configured accessible paths."+ },+ {+ "description": "This enables all file write related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:write-files",+ "markdownDescription": "This enables all file write related commands without any pre-configured accessible paths."+ }+ ]+ }+ }+ },+ "then": {+ "properties": {+ "allow": {+ "items": {+ "title": "FsScopeEntry",+ "description": "FS scope entry.",+ "anyOf": [+ {+ "description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",+ "type": "string"+ },+ {+ "type": "object",+ "required": [+ "path"+ ],+ "properties": {+ "path": {+ "description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",+ "type": "string"+ }+ }+ }+ ]+ }+ },+ "deny": {+ "items": {+ "title": "FsScopeEntry",+ "description": "FS scope entry.",+ "anyOf": [+ {+ "description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",+ "type": "string"+ },+ {+ "type": "object",+ "required": [+ "path"+ ],+ "properties": {+ "path": {+ "description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",+ "type": "string"+ }+ }+ }+ ]+ }+ }+ }+ },+ "properties": {+ "identifier": {+ "description": "Identifier of the permission or permission set.",+ "allOf": [+ {+ "$ref": "#/definitions/Identifier"+ }+ ]+ }+ }+ },+ {+ "if": {+ "properties": {+ "identifier": {+ "anyOf": [+ {+ "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`",+ "type": "string",+ "const": "shell:default",+ "markdownDescription": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`"+ },+ {+ "description": "Enables the execute command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-execute",+ "markdownDescription": "Enables the execute command without any pre-configured scope."+ },+ {+ "description": "Enables the kill command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-kill",+ "markdownDescription": "Enables the kill command without any pre-configured scope."+ },+ {+ "description": "Enables the open command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-open",+ "markdownDescription": "Enables the open command without any pre-configured scope."+ },+ {+ "description": "Enables the spawn command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-spawn",+ "markdownDescription": "Enables the spawn command without any pre-configured scope."+ },+ {+ "description": "Enables the stdin_write command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-stdin-write",+ "markdownDescription": "Enables the stdin_write command without any pre-configured scope."+ },+ {+ "description": "Denies the execute command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-execute",+ "markdownDescription": "Denies the execute command without any pre-configured scope."+ },+ {+ "description": "Denies the kill command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-kill",+ "markdownDescription": "Denies the kill command without any pre-configured scope."+ },+ {+ "description": "Denies the open command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-open",+ "markdownDescription": "Denies the open command without any pre-configured scope."+ },+ {+ "description": "Denies the spawn command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-spawn",+ "markdownDescription": "Denies the spawn command without any pre-configured scope."+ },+ {+ "description": "Denies the stdin_write command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-stdin-write",+ "markdownDescription": "Denies the stdin_write command without any pre-configured scope."+ }+ ]+ }+ }+ },+ "then": {+ "properties": {+ "allow": {+ "items": {+ "title": "ShellScopeEntry",+ "description": "Shell scope entry.",+ "anyOf": [+ {+ "type": "object",+ "required": [+ "cmd",+ "name"+ ],+ "properties": {+ "args": {+ "description": "The allowed arguments for the command execution.",+ "allOf": [+ {+ "$ref": "#/definitions/ShellScopeEntryAllowedArgs"+ }+ ]+ },+ "cmd": {+ "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",+ "type": "string"+ },+ "name": {+ "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",+ "type": "string"+ }+ },+ "additionalProperties": false+ },+ {+ "type": "object",+ "required": [+ "name",+ "sidecar"+ ],+ "properties": {+ "args": {+ "description": "The allowed arguments for the command execution.",+ "allOf": [+ {+ "$ref": "#/definitions/ShellScopeEntryAllowedArgs"+ }+ ]+ },+ "name": {+ "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",+ "type": "string"+ },+ "sidecar": {+ "description": "If this command is a sidecar command.",+ "type": "boolean"+ }+ },+ "additionalProperties": false+ }+ ]+ }+ },+ "deny": {+ "items": {+ "title": "ShellScopeEntry",+ "description": "Shell scope entry.",+ "anyOf": [+ {+ "type": "object",+ "required": [+ "cmd",+ "name"+ ],+ "properties": {+ "args": {+ "description": "The allowed arguments for the command execution.",+ "allOf": [+ {+ "$ref": "#/definitions/ShellScopeEntryAllowedArgs"+ }+ ]+ },+ "cmd": {+ "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",+ "type": "string"+ },+ "name": {+ "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",+ "type": "string"+ }+ },+ "additionalProperties": false+ },+ {+ "type": "object",+ "required": [+ "name",+ "sidecar"+ ],+ "properties": {+ "args": {+ "description": "The allowed arguments for the command execution.",+ "allOf": [+ {+ "$ref": "#/definitions/ShellScopeEntryAllowedArgs"+ }+ ]+ },+ "name": {+ "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",+ "type": "string"+ },+ "sidecar": {+ "description": "If this command is a sidecar command.",+ "type": "boolean"+ }+ },+ "additionalProperties": false+ }+ ]+ }+ }+ }+ },+ "properties": {+ "identifier": {+ "description": "Identifier of the permission or permission set.",+ "allOf": [+ {+ "$ref": "#/definitions/Identifier"+ }+ ]+ }+ }+ },+ {+ "properties": {+ "identifier": {+ "description": "Identifier of the permission or permission set.",+ "allOf": [+ {+ "$ref": "#/definitions/Identifier"+ }+ ]+ },+ "allow": {+ "description": "Data that defines what is allowed by the scope.",+ "type": [+ "array",+ "null"+ ],+ "items": {+ "$ref": "#/definitions/Value"+ }+ },+ "deny": {+ "description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",+ "type": [+ "array",+ "null"+ ],+ "items": {+ "$ref": "#/definitions/Value"+ }+ }+ }+ }+ ],+ "required": [+ "identifier"+ ]+ }+ ]+ },+ "Identifier": {+ "description": "Permission identifier",+ "oneOf": [+ {+ "description": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`",+ "type": "string",+ "const": "core:default",+ "markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"+ },+ {+ "description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`",+ "type": "string",+ "const": "core:app:default",+ "markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`"+ },+ {+ "description": "Enables the app_hide command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-app-hide",+ "markdownDescription": "Enables the app_hide command without any pre-configured scope."+ },+ {+ "description": "Enables the app_show command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-app-show",+ "markdownDescription": "Enables the app_show command without any pre-configured scope."+ },+ {+ "description": "Enables the bundle_type command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-bundle-type",+ "markdownDescription": "Enables the bundle_type command without any pre-configured scope."+ },+ {+ "description": "Enables the default_window_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-default-window-icon",+ "markdownDescription": "Enables the default_window_icon command without any pre-configured scope."+ },+ {+ "description": "Enables the fetch_data_store_identifiers command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-fetch-data-store-identifiers",+ "markdownDescription": "Enables the fetch_data_store_identifiers command without any pre-configured scope."+ },+ {+ "description": "Enables the identifier command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-identifier",+ "markdownDescription": "Enables the identifier command without any pre-configured scope."+ },+ {+ "description": "Enables the name command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-name",+ "markdownDescription": "Enables the name command without any pre-configured scope."+ },+ {+ "description": "Enables the register_listener command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-register-listener",+ "markdownDescription": "Enables the register_listener command without any pre-configured scope."+ },+ {+ "description": "Enables the remove_data_store command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-remove-data-store",+ "markdownDescription": "Enables the remove_data_store command without any pre-configured scope."+ },+ {+ "description": "Enables the remove_listener command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-remove-listener",+ "markdownDescription": "Enables the remove_listener command without any pre-configured scope."+ },+ {+ "description": "Enables the set_app_theme command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-set-app-theme",+ "markdownDescription": "Enables the set_app_theme command without any pre-configured scope."+ },+ {+ "description": "Enables the set_dock_visibility command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-set-dock-visibility",+ "markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."+ },+ {+ "description": "Enables the tauri_version command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-tauri-version",+ "markdownDescription": "Enables the tauri_version command without any pre-configured scope."+ },+ {+ "description": "Enables the version command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:allow-version",+ "markdownDescription": "Enables the version command without any pre-configured scope."+ },+ {+ "description": "Denies the app_hide command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-app-hide",+ "markdownDescription": "Denies the app_hide command without any pre-configured scope."+ },+ {+ "description": "Denies the app_show command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-app-show",+ "markdownDescription": "Denies the app_show command without any pre-configured scope."+ },+ {+ "description": "Denies the bundle_type command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-bundle-type",+ "markdownDescription": "Denies the bundle_type command without any pre-configured scope."+ },+ {+ "description": "Denies the default_window_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-default-window-icon",+ "markdownDescription": "Denies the default_window_icon command without any pre-configured scope."+ },+ {+ "description": "Denies the fetch_data_store_identifiers command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-fetch-data-store-identifiers",+ "markdownDescription": "Denies the fetch_data_store_identifiers command without any pre-configured scope."+ },+ {+ "description": "Denies the identifier command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-identifier",+ "markdownDescription": "Denies the identifier command without any pre-configured scope."+ },+ {+ "description": "Denies the name command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-name",+ "markdownDescription": "Denies the name command without any pre-configured scope."+ },+ {+ "description": "Denies the register_listener command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-register-listener",+ "markdownDescription": "Denies the register_listener command without any pre-configured scope."+ },+ {+ "description": "Denies the remove_data_store command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-remove-data-store",+ "markdownDescription": "Denies the remove_data_store command without any pre-configured scope."+ },+ {+ "description": "Denies the remove_listener command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-remove-listener",+ "markdownDescription": "Denies the remove_listener command without any pre-configured scope."+ },+ {+ "description": "Denies the set_app_theme command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-set-app-theme",+ "markdownDescription": "Denies the set_app_theme command without any pre-configured scope."+ },+ {+ "description": "Denies the set_dock_visibility command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-set-dock-visibility",+ "markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."+ },+ {+ "description": "Denies the tauri_version command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-tauri-version",+ "markdownDescription": "Denies the tauri_version command without any pre-configured scope."+ },+ {+ "description": "Denies the version command without any pre-configured scope.",+ "type": "string",+ "const": "core:app:deny-version",+ "markdownDescription": "Denies the version command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-listen`\n- `allow-unlisten`\n- `allow-emit`\n- `allow-emit-to`",+ "type": "string",+ "const": "core:event:default",+ "markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-listen`\n- `allow-unlisten`\n- `allow-emit`\n- `allow-emit-to`"+ },+ {+ "description": "Enables the emit command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:allow-emit",+ "markdownDescription": "Enables the emit command without any pre-configured scope."+ },+ {+ "description": "Enables the emit_to command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:allow-emit-to",+ "markdownDescription": "Enables the emit_to command without any pre-configured scope."+ },+ {+ "description": "Enables the listen command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:allow-listen",+ "markdownDescription": "Enables the listen command without any pre-configured scope."+ },+ {+ "description": "Enables the unlisten command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:allow-unlisten",+ "markdownDescription": "Enables the unlisten command without any pre-configured scope."+ },+ {+ "description": "Denies the emit command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:deny-emit",+ "markdownDescription": "Denies the emit command without any pre-configured scope."+ },+ {+ "description": "Denies the emit_to command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:deny-emit-to",+ "markdownDescription": "Denies the emit_to command without any pre-configured scope."+ },+ {+ "description": "Denies the listen command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:deny-listen",+ "markdownDescription": "Denies the listen command without any pre-configured scope."+ },+ {+ "description": "Denies the unlisten command without any pre-configured scope.",+ "type": "string",+ "const": "core:event:deny-unlisten",+ "markdownDescription": "Denies the unlisten command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-from-bytes`\n- `allow-from-path`\n- `allow-rgba`\n- `allow-size`",+ "type": "string",+ "const": "core:image:default",+ "markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-from-bytes`\n- `allow-from-path`\n- `allow-rgba`\n- `allow-size`"+ },+ {+ "description": "Enables the from_bytes command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:allow-from-bytes",+ "markdownDescription": "Enables the from_bytes command without any pre-configured scope."+ },+ {+ "description": "Enables the from_path command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:allow-from-path",+ "markdownDescription": "Enables the from_path command without any pre-configured scope."+ },+ {+ "description": "Enables the new command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:allow-new",+ "markdownDescription": "Enables the new command without any pre-configured scope."+ },+ {+ "description": "Enables the rgba command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:allow-rgba",+ "markdownDescription": "Enables the rgba command without any pre-configured scope."+ },+ {+ "description": "Enables the size command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:allow-size",+ "markdownDescription": "Enables the size command without any pre-configured scope."+ },+ {+ "description": "Denies the from_bytes command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:deny-from-bytes",+ "markdownDescription": "Denies the from_bytes command without any pre-configured scope."+ },+ {+ "description": "Denies the from_path command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:deny-from-path",+ "markdownDescription": "Denies the from_path command without any pre-configured scope."+ },+ {+ "description": "Denies the new command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:deny-new",+ "markdownDescription": "Denies the new command without any pre-configured scope."+ },+ {+ "description": "Denies the rgba command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:deny-rgba",+ "markdownDescription": "Denies the rgba command without any pre-configured scope."+ },+ {+ "description": "Denies the size command without any pre-configured scope.",+ "type": "string",+ "const": "core:image:deny-size",+ "markdownDescription": "Denies the size command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-append`\n- `allow-prepend`\n- `allow-insert`\n- `allow-remove`\n- `allow-remove-at`\n- `allow-items`\n- `allow-get`\n- `allow-popup`\n- `allow-create-default`\n- `allow-set-as-app-menu`\n- `allow-set-as-window-menu`\n- `allow-text`\n- `allow-set-text`\n- `allow-is-enabled`\n- `allow-set-enabled`\n- `allow-set-accelerator`\n- `allow-set-as-windows-menu-for-nsapp`\n- `allow-set-as-help-menu-for-nsapp`\n- `allow-is-checked`\n- `allow-set-checked`\n- `allow-set-icon`",+ "type": "string",+ "const": "core:menu:default",+ "markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-append`\n- `allow-prepend`\n- `allow-insert`\n- `allow-remove`\n- `allow-remove-at`\n- `allow-items`\n- `allow-get`\n- `allow-popup`\n- `allow-create-default`\n- `allow-set-as-app-menu`\n- `allow-set-as-window-menu`\n- `allow-text`\n- `allow-set-text`\n- `allow-is-enabled`\n- `allow-set-enabled`\n- `allow-set-accelerator`\n- `allow-set-as-windows-menu-for-nsapp`\n- `allow-set-as-help-menu-for-nsapp`\n- `allow-is-checked`\n- `allow-set-checked`\n- `allow-set-icon`"+ },+ {+ "description": "Enables the append command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-append",+ "markdownDescription": "Enables the append command without any pre-configured scope."+ },+ {+ "description": "Enables the create_default command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-create-default",+ "markdownDescription": "Enables the create_default command without any pre-configured scope."+ },+ {+ "description": "Enables the get command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-get",+ "markdownDescription": "Enables the get command without any pre-configured scope."+ },+ {+ "description": "Enables the insert command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-insert",+ "markdownDescription": "Enables the insert command without any pre-configured scope."+ },+ {+ "description": "Enables the is_checked command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-is-checked",+ "markdownDescription": "Enables the is_checked command without any pre-configured scope."+ },+ {+ "description": "Enables the is_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-is-enabled",+ "markdownDescription": "Enables the is_enabled command without any pre-configured scope."+ },+ {+ "description": "Enables the items command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-items",+ "markdownDescription": "Enables the items command without any pre-configured scope."+ },+ {+ "description": "Enables the new command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-new",+ "markdownDescription": "Enables the new command without any pre-configured scope."+ },+ {+ "description": "Enables the popup command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-popup",+ "markdownDescription": "Enables the popup command without any pre-configured scope."+ },+ {+ "description": "Enables the prepend command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-prepend",+ "markdownDescription": "Enables the prepend command without any pre-configured scope."+ },+ {+ "description": "Enables the remove command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-remove",+ "markdownDescription": "Enables the remove command without any pre-configured scope."+ },+ {+ "description": "Enables the remove_at command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-remove-at",+ "markdownDescription": "Enables the remove_at command without any pre-configured scope."+ },+ {+ "description": "Enables the set_accelerator command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-accelerator",+ "markdownDescription": "Enables the set_accelerator command without any pre-configured scope."+ },+ {+ "description": "Enables the set_as_app_menu command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-as-app-menu",+ "markdownDescription": "Enables the set_as_app_menu command without any pre-configured scope."+ },+ {+ "description": "Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-as-help-menu-for-nsapp",+ "markdownDescription": "Enables the set_as_help_menu_for_nsapp command without any pre-configured scope."+ },+ {+ "description": "Enables the set_as_window_menu command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-as-window-menu",+ "markdownDescription": "Enables the set_as_window_menu command without any pre-configured scope."+ },+ {+ "description": "Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-as-windows-menu-for-nsapp",+ "markdownDescription": "Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope."+ },+ {+ "description": "Enables the set_checked command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-checked",+ "markdownDescription": "Enables the set_checked command without any pre-configured scope."+ },+ {+ "description": "Enables the set_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-enabled",+ "markdownDescription": "Enables the set_enabled command without any pre-configured scope."+ },+ {+ "description": "Enables the set_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-icon",+ "markdownDescription": "Enables the set_icon command without any pre-configured scope."+ },+ {+ "description": "Enables the set_text command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-set-text",+ "markdownDescription": "Enables the set_text command without any pre-configured scope."+ },+ {+ "description": "Enables the text command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:allow-text",+ "markdownDescription": "Enables the text command without any pre-configured scope."+ },+ {+ "description": "Denies the append command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-append",+ "markdownDescription": "Denies the append command without any pre-configured scope."+ },+ {+ "description": "Denies the create_default command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-create-default",+ "markdownDescription": "Denies the create_default command without any pre-configured scope."+ },+ {+ "description": "Denies the get command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-get",+ "markdownDescription": "Denies the get command without any pre-configured scope."+ },+ {+ "description": "Denies the insert command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-insert",+ "markdownDescription": "Denies the insert command without any pre-configured scope."+ },+ {+ "description": "Denies the is_checked command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-is-checked",+ "markdownDescription": "Denies the is_checked command without any pre-configured scope."+ },+ {+ "description": "Denies the is_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-is-enabled",+ "markdownDescription": "Denies the is_enabled command without any pre-configured scope."+ },+ {+ "description": "Denies the items command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-items",+ "markdownDescription": "Denies the items command without any pre-configured scope."+ },+ {+ "description": "Denies the new command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-new",+ "markdownDescription": "Denies the new command without any pre-configured scope."+ },+ {+ "description": "Denies the popup command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-popup",+ "markdownDescription": "Denies the popup command without any pre-configured scope."+ },+ {+ "description": "Denies the prepend command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-prepend",+ "markdownDescription": "Denies the prepend command without any pre-configured scope."+ },+ {+ "description": "Denies the remove command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-remove",+ "markdownDescription": "Denies the remove command without any pre-configured scope."+ },+ {+ "description": "Denies the remove_at command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-remove-at",+ "markdownDescription": "Denies the remove_at command without any pre-configured scope."+ },+ {+ "description": "Denies the set_accelerator command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-accelerator",+ "markdownDescription": "Denies the set_accelerator command without any pre-configured scope."+ },+ {+ "description": "Denies the set_as_app_menu command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-as-app-menu",+ "markdownDescription": "Denies the set_as_app_menu command without any pre-configured scope."+ },+ {+ "description": "Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-as-help-menu-for-nsapp",+ "markdownDescription": "Denies the set_as_help_menu_for_nsapp command without any pre-configured scope."+ },+ {+ "description": "Denies the set_as_window_menu command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-as-window-menu",+ "markdownDescription": "Denies the set_as_window_menu command without any pre-configured scope."+ },+ {+ "description": "Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-as-windows-menu-for-nsapp",+ "markdownDescription": "Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope."+ },+ {+ "description": "Denies the set_checked command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-checked",+ "markdownDescription": "Denies the set_checked command without any pre-configured scope."+ },+ {+ "description": "Denies the set_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-enabled",+ "markdownDescription": "Denies the set_enabled command without any pre-configured scope."+ },+ {+ "description": "Denies the set_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-icon",+ "markdownDescription": "Denies the set_icon command without any pre-configured scope."+ },+ {+ "description": "Denies the set_text command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-set-text",+ "markdownDescription": "Denies the set_text command without any pre-configured scope."+ },+ {+ "description": "Denies the text command without any pre-configured scope.",+ "type": "string",+ "const": "core:menu:deny-text",+ "markdownDescription": "Denies the text command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-resolve-directory`\n- `allow-resolve`\n- `allow-normalize`\n- `allow-join`\n- `allow-dirname`\n- `allow-extname`\n- `allow-basename`\n- `allow-is-absolute`",+ "type": "string",+ "const": "core:path:default",+ "markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-resolve-directory`\n- `allow-resolve`\n- `allow-normalize`\n- `allow-join`\n- `allow-dirname`\n- `allow-extname`\n- `allow-basename`\n- `allow-is-absolute`"+ },+ {+ "description": "Enables the basename command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-basename",+ "markdownDescription": "Enables the basename command without any pre-configured scope."+ },+ {+ "description": "Enables the dirname command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-dirname",+ "markdownDescription": "Enables the dirname command without any pre-configured scope."+ },+ {+ "description": "Enables the extname command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-extname",+ "markdownDescription": "Enables the extname command without any pre-configured scope."+ },+ {+ "description": "Enables the is_absolute command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-is-absolute",+ "markdownDescription": "Enables the is_absolute command without any pre-configured scope."+ },+ {+ "description": "Enables the join command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-join",+ "markdownDescription": "Enables the join command without any pre-configured scope."+ },+ {+ "description": "Enables the normalize command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-normalize",+ "markdownDescription": "Enables the normalize command without any pre-configured scope."+ },+ {+ "description": "Enables the resolve command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-resolve",+ "markdownDescription": "Enables the resolve command without any pre-configured scope."+ },+ {+ "description": "Enables the resolve_directory command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:allow-resolve-directory",+ "markdownDescription": "Enables the resolve_directory command without any pre-configured scope."+ },+ {+ "description": "Denies the basename command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-basename",+ "markdownDescription": "Denies the basename command without any pre-configured scope."+ },+ {+ "description": "Denies the dirname command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-dirname",+ "markdownDescription": "Denies the dirname command without any pre-configured scope."+ },+ {+ "description": "Denies the extname command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-extname",+ "markdownDescription": "Denies the extname command without any pre-configured scope."+ },+ {+ "description": "Denies the is_absolute command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-is-absolute",+ "markdownDescription": "Denies the is_absolute command without any pre-configured scope."+ },+ {+ "description": "Denies the join command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-join",+ "markdownDescription": "Denies the join command without any pre-configured scope."+ },+ {+ "description": "Denies the normalize command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-normalize",+ "markdownDescription": "Denies the normalize command without any pre-configured scope."+ },+ {+ "description": "Denies the resolve command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-resolve",+ "markdownDescription": "Denies the resolve command without any pre-configured scope."+ },+ {+ "description": "Denies the resolve_directory command without any pre-configured scope.",+ "type": "string",+ "const": "core:path:deny-resolve-directory",+ "markdownDescription": "Denies the resolve_directory command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-close`",+ "type": "string",+ "const": "core:resources:default",+ "markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-close`"+ },+ {+ "description": "Enables the close command without any pre-configured scope.",+ "type": "string",+ "const": "core:resources:allow-close",+ "markdownDescription": "Enables the close command without any pre-configured scope."+ },+ {+ "description": "Denies the close command without any pre-configured scope.",+ "type": "string",+ "const": "core:resources:deny-close",+ "markdownDescription": "Denies the close command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`",+ "type": "string",+ "const": "core:tray:default",+ "markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`"+ },+ {+ "description": "Enables the get_by_id command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-get-by-id",+ "markdownDescription": "Enables the get_by_id command without any pre-configured scope."+ },+ {+ "description": "Enables the new command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-new",+ "markdownDescription": "Enables the new command without any pre-configured scope."+ },+ {+ "description": "Enables the remove_by_id command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-remove-by-id",+ "markdownDescription": "Enables the remove_by_id command without any pre-configured scope."+ },+ {+ "description": "Enables the set_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-icon",+ "markdownDescription": "Enables the set_icon command without any pre-configured scope."+ },+ {+ "description": "Enables the set_icon_as_template command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-icon-as-template",+ "markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."+ },+ {+ "description": "Enables the set_menu command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-menu",+ "markdownDescription": "Enables the set_menu command without any pre-configured scope."+ },+ {+ "description": "Enables the set_show_menu_on_left_click command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-show-menu-on-left-click",+ "markdownDescription": "Enables the set_show_menu_on_left_click command without any pre-configured scope."+ },+ {+ "description": "Enables the set_temp_dir_path command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-temp-dir-path",+ "markdownDescription": "Enables the set_temp_dir_path command without any pre-configured scope."+ },+ {+ "description": "Enables the set_title command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-title",+ "markdownDescription": "Enables the set_title command without any pre-configured scope."+ },+ {+ "description": "Enables the set_tooltip command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-tooltip",+ "markdownDescription": "Enables the set_tooltip command without any pre-configured scope."+ },+ {+ "description": "Enables the set_visible command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:allow-set-visible",+ "markdownDescription": "Enables the set_visible command without any pre-configured scope."+ },+ {+ "description": "Denies the get_by_id command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-get-by-id",+ "markdownDescription": "Denies the get_by_id command without any pre-configured scope."+ },+ {+ "description": "Denies the new command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-new",+ "markdownDescription": "Denies the new command without any pre-configured scope."+ },+ {+ "description": "Denies the remove_by_id command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-remove-by-id",+ "markdownDescription": "Denies the remove_by_id command without any pre-configured scope."+ },+ {+ "description": "Denies the set_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-icon",+ "markdownDescription": "Denies the set_icon command without any pre-configured scope."+ },+ {+ "description": "Denies the set_icon_as_template command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-icon-as-template",+ "markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."+ },+ {+ "description": "Denies the set_menu command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-menu",+ "markdownDescription": "Denies the set_menu command without any pre-configured scope."+ },+ {+ "description": "Denies the set_show_menu_on_left_click command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-show-menu-on-left-click",+ "markdownDescription": "Denies the set_show_menu_on_left_click command without any pre-configured scope."+ },+ {+ "description": "Denies the set_temp_dir_path command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-temp-dir-path",+ "markdownDescription": "Denies the set_temp_dir_path command without any pre-configured scope."+ },+ {+ "description": "Denies the set_title command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-title",+ "markdownDescription": "Denies the set_title command without any pre-configured scope."+ },+ {+ "description": "Denies the set_tooltip command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-tooltip",+ "markdownDescription": "Denies the set_tooltip command without any pre-configured scope."+ },+ {+ "description": "Denies the set_visible command without any pre-configured scope.",+ "type": "string",+ "const": "core:tray:deny-set-visible",+ "markdownDescription": "Denies the set_visible command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-webviews`\n- `allow-webview-position`\n- `allow-webview-size`\n- `allow-internal-toggle-devtools`",+ "type": "string",+ "const": "core:webview:default",+ "markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-webviews`\n- `allow-webview-position`\n- `allow-webview-size`\n- `allow-internal-toggle-devtools`"+ },+ {+ "description": "Enables the clear_all_browsing_data command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-clear-all-browsing-data",+ "markdownDescription": "Enables the clear_all_browsing_data command without any pre-configured scope."+ },+ {+ "description": "Enables the create_webview command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-create-webview",+ "markdownDescription": "Enables the create_webview command without any pre-configured scope."+ },+ {+ "description": "Enables the create_webview_window command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-create-webview-window",+ "markdownDescription": "Enables the create_webview_window command without any pre-configured scope."+ },+ {+ "description": "Enables the get_all_webviews command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-get-all-webviews",+ "markdownDescription": "Enables the get_all_webviews command without any pre-configured scope."+ },+ {+ "description": "Enables the internal_toggle_devtools command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-internal-toggle-devtools",+ "markdownDescription": "Enables the internal_toggle_devtools command without any pre-configured scope."+ },+ {+ "description": "Enables the print command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-print",+ "markdownDescription": "Enables the print command without any pre-configured scope."+ },+ {+ "description": "Enables the reparent command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-reparent",+ "markdownDescription": "Enables the reparent command without any pre-configured scope."+ },+ {+ "description": "Enables the set_webview_auto_resize command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-set-webview-auto-resize",+ "markdownDescription": "Enables the set_webview_auto_resize command without any pre-configured scope."+ },+ {+ "description": "Enables the set_webview_background_color command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-set-webview-background-color",+ "markdownDescription": "Enables the set_webview_background_color command without any pre-configured scope."+ },+ {+ "description": "Enables the set_webview_focus command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-set-webview-focus",+ "markdownDescription": "Enables the set_webview_focus command without any pre-configured scope."+ },+ {+ "description": "Enables the set_webview_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-set-webview-position",+ "markdownDescription": "Enables the set_webview_position command without any pre-configured scope."+ },+ {+ "description": "Enables the set_webview_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-set-webview-size",+ "markdownDescription": "Enables the set_webview_size command without any pre-configured scope."+ },+ {+ "description": "Enables the set_webview_zoom command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-set-webview-zoom",+ "markdownDescription": "Enables the set_webview_zoom command without any pre-configured scope."+ },+ {+ "description": "Enables the webview_close command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-webview-close",+ "markdownDescription": "Enables the webview_close command without any pre-configured scope."+ },+ {+ "description": "Enables the webview_hide command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-webview-hide",+ "markdownDescription": "Enables the webview_hide command without any pre-configured scope."+ },+ {+ "description": "Enables the webview_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-webview-position",+ "markdownDescription": "Enables the webview_position command without any pre-configured scope."+ },+ {+ "description": "Enables the webview_show command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-webview-show",+ "markdownDescription": "Enables the webview_show command without any pre-configured scope."+ },+ {+ "description": "Enables the webview_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:allow-webview-size",+ "markdownDescription": "Enables the webview_size command without any pre-configured scope."+ },+ {+ "description": "Denies the clear_all_browsing_data command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-clear-all-browsing-data",+ "markdownDescription": "Denies the clear_all_browsing_data command without any pre-configured scope."+ },+ {+ "description": "Denies the create_webview command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-create-webview",+ "markdownDescription": "Denies the create_webview command without any pre-configured scope."+ },+ {+ "description": "Denies the create_webview_window command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-create-webview-window",+ "markdownDescription": "Denies the create_webview_window command without any pre-configured scope."+ },+ {+ "description": "Denies the get_all_webviews command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-get-all-webviews",+ "markdownDescription": "Denies the get_all_webviews command without any pre-configured scope."+ },+ {+ "description": "Denies the internal_toggle_devtools command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-internal-toggle-devtools",+ "markdownDescription": "Denies the internal_toggle_devtools command without any pre-configured scope."+ },+ {+ "description": "Denies the print command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-print",+ "markdownDescription": "Denies the print command without any pre-configured scope."+ },+ {+ "description": "Denies the reparent command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-reparent",+ "markdownDescription": "Denies the reparent command without any pre-configured scope."+ },+ {+ "description": "Denies the set_webview_auto_resize command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-set-webview-auto-resize",+ "markdownDescription": "Denies the set_webview_auto_resize command without any pre-configured scope."+ },+ {+ "description": "Denies the set_webview_background_color command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-set-webview-background-color",+ "markdownDescription": "Denies the set_webview_background_color command without any pre-configured scope."+ },+ {+ "description": "Denies the set_webview_focus command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-set-webview-focus",+ "markdownDescription": "Denies the set_webview_focus command without any pre-configured scope."+ },+ {+ "description": "Denies the set_webview_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-set-webview-position",+ "markdownDescription": "Denies the set_webview_position command without any pre-configured scope."+ },+ {+ "description": "Denies the set_webview_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-set-webview-size",+ "markdownDescription": "Denies the set_webview_size command without any pre-configured scope."+ },+ {+ "description": "Denies the set_webview_zoom command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-set-webview-zoom",+ "markdownDescription": "Denies the set_webview_zoom command without any pre-configured scope."+ },+ {+ "description": "Denies the webview_close command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-webview-close",+ "markdownDescription": "Denies the webview_close command without any pre-configured scope."+ },+ {+ "description": "Denies the webview_hide command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-webview-hide",+ "markdownDescription": "Denies the webview_hide command without any pre-configured scope."+ },+ {+ "description": "Denies the webview_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-webview-position",+ "markdownDescription": "Denies the webview_position command without any pre-configured scope."+ },+ {+ "description": "Denies the webview_show command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-webview-show",+ "markdownDescription": "Denies the webview_show command without any pre-configured scope."+ },+ {+ "description": "Denies the webview_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:webview:deny-webview-size",+ "markdownDescription": "Denies the webview_size command without any pre-configured scope."+ },+ {+ "description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`",+ "type": "string",+ "const": "core:window:default",+ "markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`"+ },+ {+ "description": "Enables the available_monitors command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-available-monitors",+ "markdownDescription": "Enables the available_monitors command without any pre-configured scope."+ },+ {+ "description": "Enables the center command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-center",+ "markdownDescription": "Enables the center command without any pre-configured scope."+ },+ {+ "description": "Enables the close command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-close",+ "markdownDescription": "Enables the close command without any pre-configured scope."+ },+ {+ "description": "Enables the create command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-create",+ "markdownDescription": "Enables the create command without any pre-configured scope."+ },+ {+ "description": "Enables the current_monitor command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-current-monitor",+ "markdownDescription": "Enables the current_monitor command without any pre-configured scope."+ },+ {+ "description": "Enables the cursor_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-cursor-position",+ "markdownDescription": "Enables the cursor_position command without any pre-configured scope."+ },+ {+ "description": "Enables the destroy command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-destroy",+ "markdownDescription": "Enables the destroy command without any pre-configured scope."+ },+ {+ "description": "Enables the get_all_windows command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-get-all-windows",+ "markdownDescription": "Enables the get_all_windows command without any pre-configured scope."+ },+ {+ "description": "Enables the hide command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-hide",+ "markdownDescription": "Enables the hide command without any pre-configured scope."+ },+ {+ "description": "Enables the inner_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-inner-position",+ "markdownDescription": "Enables the inner_position command without any pre-configured scope."+ },+ {+ "description": "Enables the inner_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-inner-size",+ "markdownDescription": "Enables the inner_size command without any pre-configured scope."+ },+ {+ "description": "Enables the internal_toggle_maximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-internal-toggle-maximize",+ "markdownDescription": "Enables the internal_toggle_maximize command without any pre-configured scope."+ },+ {+ "description": "Enables the is_always_on_top command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-always-on-top",+ "markdownDescription": "Enables the is_always_on_top command without any pre-configured scope."+ },+ {+ "description": "Enables the is_closable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-closable",+ "markdownDescription": "Enables the is_closable command without any pre-configured scope."+ },+ {+ "description": "Enables the is_decorated command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-decorated",+ "markdownDescription": "Enables the is_decorated command without any pre-configured scope."+ },+ {+ "description": "Enables the is_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-enabled",+ "markdownDescription": "Enables the is_enabled command without any pre-configured scope."+ },+ {+ "description": "Enables the is_focused command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-focused",+ "markdownDescription": "Enables the is_focused command without any pre-configured scope."+ },+ {+ "description": "Enables the is_fullscreen command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-fullscreen",+ "markdownDescription": "Enables the is_fullscreen command without any pre-configured scope."+ },+ {+ "description": "Enables the is_maximizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-maximizable",+ "markdownDescription": "Enables the is_maximizable command without any pre-configured scope."+ },+ {+ "description": "Enables the is_maximized command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-maximized",+ "markdownDescription": "Enables the is_maximized command without any pre-configured scope."+ },+ {+ "description": "Enables the is_minimizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-minimizable",+ "markdownDescription": "Enables the is_minimizable command without any pre-configured scope."+ },+ {+ "description": "Enables the is_minimized command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-minimized",+ "markdownDescription": "Enables the is_minimized command without any pre-configured scope."+ },+ {+ "description": "Enables the is_resizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-resizable",+ "markdownDescription": "Enables the is_resizable command without any pre-configured scope."+ },+ {+ "description": "Enables the is_visible command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-is-visible",+ "markdownDescription": "Enables the is_visible command without any pre-configured scope."+ },+ {+ "description": "Enables the maximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-maximize",+ "markdownDescription": "Enables the maximize command without any pre-configured scope."+ },+ {+ "description": "Enables the minimize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-minimize",+ "markdownDescription": "Enables the minimize command without any pre-configured scope."+ },+ {+ "description": "Enables the monitor_from_point command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-monitor-from-point",+ "markdownDescription": "Enables the monitor_from_point command without any pre-configured scope."+ },+ {+ "description": "Enables the outer_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-outer-position",+ "markdownDescription": "Enables the outer_position command without any pre-configured scope."+ },+ {+ "description": "Enables the outer_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-outer-size",+ "markdownDescription": "Enables the outer_size command without any pre-configured scope."+ },+ {+ "description": "Enables the primary_monitor command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-primary-monitor",+ "markdownDescription": "Enables the primary_monitor command without any pre-configured scope."+ },+ {+ "description": "Enables the request_user_attention command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-request-user-attention",+ "markdownDescription": "Enables the request_user_attention command without any pre-configured scope."+ },+ {+ "description": "Enables the scale_factor command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-scale-factor",+ "markdownDescription": "Enables the scale_factor command without any pre-configured scope."+ },+ {+ "description": "Enables the set_always_on_bottom command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-always-on-bottom",+ "markdownDescription": "Enables the set_always_on_bottom command without any pre-configured scope."+ },+ {+ "description": "Enables the set_always_on_top command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-always-on-top",+ "markdownDescription": "Enables the set_always_on_top command without any pre-configured scope."+ },+ {+ "description": "Enables the set_background_color command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-background-color",+ "markdownDescription": "Enables the set_background_color command without any pre-configured scope."+ },+ {+ "description": "Enables the set_badge_count command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-badge-count",+ "markdownDescription": "Enables the set_badge_count command without any pre-configured scope."+ },+ {+ "description": "Enables the set_badge_label command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-badge-label",+ "markdownDescription": "Enables the set_badge_label command without any pre-configured scope."+ },+ {+ "description": "Enables the set_closable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-closable",+ "markdownDescription": "Enables the set_closable command without any pre-configured scope."+ },+ {+ "description": "Enables the set_content_protected command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-content-protected",+ "markdownDescription": "Enables the set_content_protected command without any pre-configured scope."+ },+ {+ "description": "Enables the set_cursor_grab command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-cursor-grab",+ "markdownDescription": "Enables the set_cursor_grab command without any pre-configured scope."+ },+ {+ "description": "Enables the set_cursor_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-cursor-icon",+ "markdownDescription": "Enables the set_cursor_icon command without any pre-configured scope."+ },+ {+ "description": "Enables the set_cursor_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-cursor-position",+ "markdownDescription": "Enables the set_cursor_position command without any pre-configured scope."+ },+ {+ "description": "Enables the set_cursor_visible command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-cursor-visible",+ "markdownDescription": "Enables the set_cursor_visible command without any pre-configured scope."+ },+ {+ "description": "Enables the set_decorations command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-decorations",+ "markdownDescription": "Enables the set_decorations command without any pre-configured scope."+ },+ {+ "description": "Enables the set_effects command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-effects",+ "markdownDescription": "Enables the set_effects command without any pre-configured scope."+ },+ {+ "description": "Enables the set_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-enabled",+ "markdownDescription": "Enables the set_enabled command without any pre-configured scope."+ },+ {+ "description": "Enables the set_focus command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-focus",+ "markdownDescription": "Enables the set_focus command without any pre-configured scope."+ },+ {+ "description": "Enables the set_focusable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-focusable",+ "markdownDescription": "Enables the set_focusable command without any pre-configured scope."+ },+ {+ "description": "Enables the set_fullscreen command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-fullscreen",+ "markdownDescription": "Enables the set_fullscreen command without any pre-configured scope."+ },+ {+ "description": "Enables the set_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-icon",+ "markdownDescription": "Enables the set_icon command without any pre-configured scope."+ },+ {+ "description": "Enables the set_ignore_cursor_events command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-ignore-cursor-events",+ "markdownDescription": "Enables the set_ignore_cursor_events command without any pre-configured scope."+ },+ {+ "description": "Enables the set_max_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-max-size",+ "markdownDescription": "Enables the set_max_size command without any pre-configured scope."+ },+ {+ "description": "Enables the set_maximizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-maximizable",+ "markdownDescription": "Enables the set_maximizable command without any pre-configured scope."+ },+ {+ "description": "Enables the set_min_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-min-size",+ "markdownDescription": "Enables the set_min_size command without any pre-configured scope."+ },+ {+ "description": "Enables the set_minimizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-minimizable",+ "markdownDescription": "Enables the set_minimizable command without any pre-configured scope."+ },+ {+ "description": "Enables the set_overlay_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-overlay-icon",+ "markdownDescription": "Enables the set_overlay_icon command without any pre-configured scope."+ },+ {+ "description": "Enables the set_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-position",+ "markdownDescription": "Enables the set_position command without any pre-configured scope."+ },+ {+ "description": "Enables the set_progress_bar command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-progress-bar",+ "markdownDescription": "Enables the set_progress_bar command without any pre-configured scope."+ },+ {+ "description": "Enables the set_resizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-resizable",+ "markdownDescription": "Enables the set_resizable command without any pre-configured scope."+ },+ {+ "description": "Enables the set_shadow command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-shadow",+ "markdownDescription": "Enables the set_shadow command without any pre-configured scope."+ },+ {+ "description": "Enables the set_simple_fullscreen command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-simple-fullscreen",+ "markdownDescription": "Enables the set_simple_fullscreen command without any pre-configured scope."+ },+ {+ "description": "Enables the set_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-size",+ "markdownDescription": "Enables the set_size command without any pre-configured scope."+ },+ {+ "description": "Enables the set_size_constraints command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-size-constraints",+ "markdownDescription": "Enables the set_size_constraints command without any pre-configured scope."+ },+ {+ "description": "Enables the set_skip_taskbar command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-skip-taskbar",+ "markdownDescription": "Enables the set_skip_taskbar command without any pre-configured scope."+ },+ {+ "description": "Enables the set_theme command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-theme",+ "markdownDescription": "Enables the set_theme command without any pre-configured scope."+ },+ {+ "description": "Enables the set_title command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-title",+ "markdownDescription": "Enables the set_title command without any pre-configured scope."+ },+ {+ "description": "Enables the set_title_bar_style command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-title-bar-style",+ "markdownDescription": "Enables the set_title_bar_style command without any pre-configured scope."+ },+ {+ "description": "Enables the set_visible_on_all_workspaces command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-set-visible-on-all-workspaces",+ "markdownDescription": "Enables the set_visible_on_all_workspaces command without any pre-configured scope."+ },+ {+ "description": "Enables the show command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-show",+ "markdownDescription": "Enables the show command without any pre-configured scope."+ },+ {+ "description": "Enables the start_dragging command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-start-dragging",+ "markdownDescription": "Enables the start_dragging command without any pre-configured scope."+ },+ {+ "description": "Enables the start_resize_dragging command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-start-resize-dragging",+ "markdownDescription": "Enables the start_resize_dragging command without any pre-configured scope."+ },+ {+ "description": "Enables the theme command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-theme",+ "markdownDescription": "Enables the theme command without any pre-configured scope."+ },+ {+ "description": "Enables the title command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-title",+ "markdownDescription": "Enables the title command without any pre-configured scope."+ },+ {+ "description": "Enables the toggle_maximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-toggle-maximize",+ "markdownDescription": "Enables the toggle_maximize command without any pre-configured scope."+ },+ {+ "description": "Enables the unmaximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-unmaximize",+ "markdownDescription": "Enables the unmaximize command without any pre-configured scope."+ },+ {+ "description": "Enables the unminimize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:allow-unminimize",+ "markdownDescription": "Enables the unminimize command without any pre-configured scope."+ },+ {+ "description": "Denies the available_monitors command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-available-monitors",+ "markdownDescription": "Denies the available_monitors command without any pre-configured scope."+ },+ {+ "description": "Denies the center command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-center",+ "markdownDescription": "Denies the center command without any pre-configured scope."+ },+ {+ "description": "Denies the close command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-close",+ "markdownDescription": "Denies the close command without any pre-configured scope."+ },+ {+ "description": "Denies the create command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-create",+ "markdownDescription": "Denies the create command without any pre-configured scope."+ },+ {+ "description": "Denies the current_monitor command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-current-monitor",+ "markdownDescription": "Denies the current_monitor command without any pre-configured scope."+ },+ {+ "description": "Denies the cursor_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-cursor-position",+ "markdownDescription": "Denies the cursor_position command without any pre-configured scope."+ },+ {+ "description": "Denies the destroy command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-destroy",+ "markdownDescription": "Denies the destroy command without any pre-configured scope."+ },+ {+ "description": "Denies the get_all_windows command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-get-all-windows",+ "markdownDescription": "Denies the get_all_windows command without any pre-configured scope."+ },+ {+ "description": "Denies the hide command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-hide",+ "markdownDescription": "Denies the hide command without any pre-configured scope."+ },+ {+ "description": "Denies the inner_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-inner-position",+ "markdownDescription": "Denies the inner_position command without any pre-configured scope."+ },+ {+ "description": "Denies the inner_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-inner-size",+ "markdownDescription": "Denies the inner_size command without any pre-configured scope."+ },+ {+ "description": "Denies the internal_toggle_maximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-internal-toggle-maximize",+ "markdownDescription": "Denies the internal_toggle_maximize command without any pre-configured scope."+ },+ {+ "description": "Denies the is_always_on_top command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-always-on-top",+ "markdownDescription": "Denies the is_always_on_top command without any pre-configured scope."+ },+ {+ "description": "Denies the is_closable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-closable",+ "markdownDescription": "Denies the is_closable command without any pre-configured scope."+ },+ {+ "description": "Denies the is_decorated command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-decorated",+ "markdownDescription": "Denies the is_decorated command without any pre-configured scope."+ },+ {+ "description": "Denies the is_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-enabled",+ "markdownDescription": "Denies the is_enabled command without any pre-configured scope."+ },+ {+ "description": "Denies the is_focused command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-focused",+ "markdownDescription": "Denies the is_focused command without any pre-configured scope."+ },+ {+ "description": "Denies the is_fullscreen command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-fullscreen",+ "markdownDescription": "Denies the is_fullscreen command without any pre-configured scope."+ },+ {+ "description": "Denies the is_maximizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-maximizable",+ "markdownDescription": "Denies the is_maximizable command without any pre-configured scope."+ },+ {+ "description": "Denies the is_maximized command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-maximized",+ "markdownDescription": "Denies the is_maximized command without any pre-configured scope."+ },+ {+ "description": "Denies the is_minimizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-minimizable",+ "markdownDescription": "Denies the is_minimizable command without any pre-configured scope."+ },+ {+ "description": "Denies the is_minimized command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-minimized",+ "markdownDescription": "Denies the is_minimized command without any pre-configured scope."+ },+ {+ "description": "Denies the is_resizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-resizable",+ "markdownDescription": "Denies the is_resizable command without any pre-configured scope."+ },+ {+ "description": "Denies the is_visible command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-is-visible",+ "markdownDescription": "Denies the is_visible command without any pre-configured scope."+ },+ {+ "description": "Denies the maximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-maximize",+ "markdownDescription": "Denies the maximize command without any pre-configured scope."+ },+ {+ "description": "Denies the minimize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-minimize",+ "markdownDescription": "Denies the minimize command without any pre-configured scope."+ },+ {+ "description": "Denies the monitor_from_point command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-monitor-from-point",+ "markdownDescription": "Denies the monitor_from_point command without any pre-configured scope."+ },+ {+ "description": "Denies the outer_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-outer-position",+ "markdownDescription": "Denies the outer_position command without any pre-configured scope."+ },+ {+ "description": "Denies the outer_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-outer-size",+ "markdownDescription": "Denies the outer_size command without any pre-configured scope."+ },+ {+ "description": "Denies the primary_monitor command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-primary-monitor",+ "markdownDescription": "Denies the primary_monitor command without any pre-configured scope."+ },+ {+ "description": "Denies the request_user_attention command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-request-user-attention",+ "markdownDescription": "Denies the request_user_attention command without any pre-configured scope."+ },+ {+ "description": "Denies the scale_factor command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-scale-factor",+ "markdownDescription": "Denies the scale_factor command without any pre-configured scope."+ },+ {+ "description": "Denies the set_always_on_bottom command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-always-on-bottom",+ "markdownDescription": "Denies the set_always_on_bottom command without any pre-configured scope."+ },+ {+ "description": "Denies the set_always_on_top command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-always-on-top",+ "markdownDescription": "Denies the set_always_on_top command without any pre-configured scope."+ },+ {+ "description": "Denies the set_background_color command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-background-color",+ "markdownDescription": "Denies the set_background_color command without any pre-configured scope."+ },+ {+ "description": "Denies the set_badge_count command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-badge-count",+ "markdownDescription": "Denies the set_badge_count command without any pre-configured scope."+ },+ {+ "description": "Denies the set_badge_label command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-badge-label",+ "markdownDescription": "Denies the set_badge_label command without any pre-configured scope."+ },+ {+ "description": "Denies the set_closable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-closable",+ "markdownDescription": "Denies the set_closable command without any pre-configured scope."+ },+ {+ "description": "Denies the set_content_protected command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-content-protected",+ "markdownDescription": "Denies the set_content_protected command without any pre-configured scope."+ },+ {+ "description": "Denies the set_cursor_grab command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-cursor-grab",+ "markdownDescription": "Denies the set_cursor_grab command without any pre-configured scope."+ },+ {+ "description": "Denies the set_cursor_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-cursor-icon",+ "markdownDescription": "Denies the set_cursor_icon command without any pre-configured scope."+ },+ {+ "description": "Denies the set_cursor_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-cursor-position",+ "markdownDescription": "Denies the set_cursor_position command without any pre-configured scope."+ },+ {+ "description": "Denies the set_cursor_visible command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-cursor-visible",+ "markdownDescription": "Denies the set_cursor_visible command without any pre-configured scope."+ },+ {+ "description": "Denies the set_decorations command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-decorations",+ "markdownDescription": "Denies the set_decorations command without any pre-configured scope."+ },+ {+ "description": "Denies the set_effects command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-effects",+ "markdownDescription": "Denies the set_effects command without any pre-configured scope."+ },+ {+ "description": "Denies the set_enabled command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-enabled",+ "markdownDescription": "Denies the set_enabled command without any pre-configured scope."+ },+ {+ "description": "Denies the set_focus command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-focus",+ "markdownDescription": "Denies the set_focus command without any pre-configured scope."+ },+ {+ "description": "Denies the set_focusable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-focusable",+ "markdownDescription": "Denies the set_focusable command without any pre-configured scope."+ },+ {+ "description": "Denies the set_fullscreen command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-fullscreen",+ "markdownDescription": "Denies the set_fullscreen command without any pre-configured scope."+ },+ {+ "description": "Denies the set_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-icon",+ "markdownDescription": "Denies the set_icon command without any pre-configured scope."+ },+ {+ "description": "Denies the set_ignore_cursor_events command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-ignore-cursor-events",+ "markdownDescription": "Denies the set_ignore_cursor_events command without any pre-configured scope."+ },+ {+ "description": "Denies the set_max_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-max-size",+ "markdownDescription": "Denies the set_max_size command without any pre-configured scope."+ },+ {+ "description": "Denies the set_maximizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-maximizable",+ "markdownDescription": "Denies the set_maximizable command without any pre-configured scope."+ },+ {+ "description": "Denies the set_min_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-min-size",+ "markdownDescription": "Denies the set_min_size command without any pre-configured scope."+ },+ {+ "description": "Denies the set_minimizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-minimizable",+ "markdownDescription": "Denies the set_minimizable command without any pre-configured scope."+ },+ {+ "description": "Denies the set_overlay_icon command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-overlay-icon",+ "markdownDescription": "Denies the set_overlay_icon command without any pre-configured scope."+ },+ {+ "description": "Denies the set_position command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-position",+ "markdownDescription": "Denies the set_position command without any pre-configured scope."+ },+ {+ "description": "Denies the set_progress_bar command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-progress-bar",+ "markdownDescription": "Denies the set_progress_bar command without any pre-configured scope."+ },+ {+ "description": "Denies the set_resizable command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-resizable",+ "markdownDescription": "Denies the set_resizable command without any pre-configured scope."+ },+ {+ "description": "Denies the set_shadow command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-shadow",+ "markdownDescription": "Denies the set_shadow command without any pre-configured scope."+ },+ {+ "description": "Denies the set_simple_fullscreen command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-simple-fullscreen",+ "markdownDescription": "Denies the set_simple_fullscreen command without any pre-configured scope."+ },+ {+ "description": "Denies the set_size command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-size",+ "markdownDescription": "Denies the set_size command without any pre-configured scope."+ },+ {+ "description": "Denies the set_size_constraints command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-size-constraints",+ "markdownDescription": "Denies the set_size_constraints command without any pre-configured scope."+ },+ {+ "description": "Denies the set_skip_taskbar command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-skip-taskbar",+ "markdownDescription": "Denies the set_skip_taskbar command without any pre-configured scope."+ },+ {+ "description": "Denies the set_theme command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-theme",+ "markdownDescription": "Denies the set_theme command without any pre-configured scope."+ },+ {+ "description": "Denies the set_title command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-title",+ "markdownDescription": "Denies the set_title command without any pre-configured scope."+ },+ {+ "description": "Denies the set_title_bar_style command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-title-bar-style",+ "markdownDescription": "Denies the set_title_bar_style command without any pre-configured scope."+ },+ {+ "description": "Denies the set_visible_on_all_workspaces command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-set-visible-on-all-workspaces",+ "markdownDescription": "Denies the set_visible_on_all_workspaces command without any pre-configured scope."+ },+ {+ "description": "Denies the show command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-show",+ "markdownDescription": "Denies the show command without any pre-configured scope."+ },+ {+ "description": "Denies the start_dragging command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-start-dragging",+ "markdownDescription": "Denies the start_dragging command without any pre-configured scope."+ },+ {+ "description": "Denies the start_resize_dragging command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-start-resize-dragging",+ "markdownDescription": "Denies the start_resize_dragging command without any pre-configured scope."+ },+ {+ "description": "Denies the theme command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-theme",+ "markdownDescription": "Denies the theme command without any pre-configured scope."+ },+ {+ "description": "Denies the title command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-title",+ "markdownDescription": "Denies the title command without any pre-configured scope."+ },+ {+ "description": "Denies the toggle_maximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-toggle-maximize",+ "markdownDescription": "Denies the toggle_maximize command without any pre-configured scope."+ },+ {+ "description": "Denies the unmaximize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-unmaximize",+ "markdownDescription": "Denies the unmaximize command without any pre-configured scope."+ },+ {+ "description": "Denies the unminimize command without any pre-configured scope.",+ "type": "string",+ "const": "core:window:deny-unminimize",+ "markdownDescription": "Denies the unminimize command without any pre-configured scope."+ },+ {+ "description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`",+ "type": "string",+ "const": "dialog:default",+ "markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`"+ },+ {+ "description": "Enables the ask command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:allow-ask",+ "markdownDescription": "Enables the ask command without any pre-configured scope."+ },+ {+ "description": "Enables the confirm command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:allow-confirm",+ "markdownDescription": "Enables the confirm command without any pre-configured scope."+ },+ {+ "description": "Enables the message command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:allow-message",+ "markdownDescription": "Enables the message command without any pre-configured scope."+ },+ {+ "description": "Enables the open command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:allow-open",+ "markdownDescription": "Enables the open command without any pre-configured scope."+ },+ {+ "description": "Enables the save command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:allow-save",+ "markdownDescription": "Enables the save command without any pre-configured scope."+ },+ {+ "description": "Denies the ask command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:deny-ask",+ "markdownDescription": "Denies the ask command without any pre-configured scope."+ },+ {+ "description": "Denies the confirm command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:deny-confirm",+ "markdownDescription": "Denies the confirm command without any pre-configured scope."+ },+ {+ "description": "Denies the message command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:deny-message",+ "markdownDescription": "Denies the message command without any pre-configured scope."+ },+ {+ "description": "Denies the open command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:deny-open",+ "markdownDescription": "Denies the open command without any pre-configured scope."+ },+ {+ "description": "Denies the save command without any pre-configured scope.",+ "type": "string",+ "const": "dialog:deny-save",+ "markdownDescription": "Denies the save command without any pre-configured scope."+ },+ {+ "description": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n#### This default permission set includes:\n\n- `create-app-specific-dirs`\n- `read-app-specific-dirs-recursive`\n- `deny-default`",+ "type": "string",+ "const": "fs:default",+ "markdownDescription": "This set of permissions describes the what kind of\nfile system access the `fs` plugin has enabled or denied by default.\n\n#### Granted Permissions\n\nThis default permission set enables read access to the\napplication specific directories (AppConfig, AppData, AppLocalData, AppCache,\nAppLog) and all files and sub directories created in it.\nThe location of these directories depends on the operating system,\nwhere the application is run.\n\nIn general these directories need to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\nTherefore, it is also allowed to create all of these folders via\nthe `mkdir` command.\n\n#### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n#### This default permission set includes:\n\n- `create-app-specific-dirs`\n- `read-app-specific-dirs-recursive`\n- `deny-default`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-index`",+ "type": "string",+ "const": "fs:allow-app-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-recursive`",+ "type": "string",+ "const": "fs:allow-app-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the application folders, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-app-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the application folders.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app`",+ "type": "string",+ "const": "fs:allow-app-read",+ "markdownDescription": "This allows non-recursive read access to the application folders.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app`"+ },+ {+ "description": "This allows full recursive read access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app-recursive`",+ "type": "string",+ "const": "fs:allow-app-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-app-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the application folders.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app`",+ "type": "string",+ "const": "fs:allow-app-write",+ "markdownDescription": "This allows non-recursive write access to the application folders.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app`"+ },+ {+ "description": "This allows full recursive write access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app-recursive`",+ "type": "string",+ "const": "fs:allow-app-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete application folders, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-app-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-index`",+ "type": "string",+ "const": "fs:allow-appcache-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-recursive`",+ "type": "string",+ "const": "fs:allow-appcache-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appcache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache`",+ "type": "string",+ "const": "fs:allow-appcache-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache-recursive`",+ "type": "string",+ "const": "fs:allow-appcache-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appcache-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache`",+ "type": "string",+ "const": "fs:allow-appcache-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPCACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache-recursive`",+ "type": "string",+ "const": "fs:allow-appcache-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPCACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appcache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-index`",+ "type": "string",+ "const": "fs:allow-appconfig-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-recursive`",+ "type": "string",+ "const": "fs:allow-appconfig-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appconfig-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig`",+ "type": "string",+ "const": "fs:allow-appconfig-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig-recursive`",+ "type": "string",+ "const": "fs:allow-appconfig-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appconfig-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig`",+ "type": "string",+ "const": "fs:allow-appconfig-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPCONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig-recursive`",+ "type": "string",+ "const": "fs:allow-appconfig-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPCONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appconfig-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-index`",+ "type": "string",+ "const": "fs:allow-appdata-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-recursive`",+ "type": "string",+ "const": "fs:allow-appdata-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-appdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata`",+ "type": "string",+ "const": "fs:allow-appdata-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata-recursive`",+ "type": "string",+ "const": "fs:allow-appdata-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-appdata-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata`",+ "type": "string",+ "const": "fs:allow-appdata-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata-recursive`",+ "type": "string",+ "const": "fs:allow-appdata-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-appdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-index`",+ "type": "string",+ "const": "fs:allow-applocaldata-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-recursive`",+ "type": "string",+ "const": "fs:allow-applocaldata-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applocaldata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata`",+ "type": "string",+ "const": "fs:allow-applocaldata-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata-recursive`",+ "type": "string",+ "const": "fs:allow-applocaldata-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applocaldata-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata`",+ "type": "string",+ "const": "fs:allow-applocaldata-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPLOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata-recursive`",+ "type": "string",+ "const": "fs:allow-applocaldata-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applocaldata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-index`",+ "type": "string",+ "const": "fs:allow-applog-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-recursive`",+ "type": "string",+ "const": "fs:allow-applog-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-applog-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog`",+ "type": "string",+ "const": "fs:allow-applog-read",+ "markdownDescription": "This allows non-recursive read access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog`"+ },+ {+ "description": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog-recursive`",+ "type": "string",+ "const": "fs:allow-applog-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-applog-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog`",+ "type": "string",+ "const": "fs:allow-applog-write",+ "markdownDescription": "This allows non-recursive write access to the `$APPLOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog`"+ },+ {+ "description": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog-recursive`",+ "type": "string",+ "const": "fs:allow-applog-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$APPLOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-applog-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-index`",+ "type": "string",+ "const": "fs:allow-audio-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-recursive`",+ "type": "string",+ "const": "fs:allow-audio-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-audio-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio`",+ "type": "string",+ "const": "fs:allow-audio-read",+ "markdownDescription": "This allows non-recursive read access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio`"+ },+ {+ "description": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio-recursive`",+ "type": "string",+ "const": "fs:allow-audio-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-audio-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio`",+ "type": "string",+ "const": "fs:allow-audio-write",+ "markdownDescription": "This allows non-recursive write access to the `$AUDIO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio`"+ },+ {+ "description": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio-recursive`",+ "type": "string",+ "const": "fs:allow-audio-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$AUDIO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-audio-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-index`",+ "type": "string",+ "const": "fs:allow-cache-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-recursive`",+ "type": "string",+ "const": "fs:allow-cache-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-cache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache`",+ "type": "string",+ "const": "fs:allow-cache-read",+ "markdownDescription": "This allows non-recursive read access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache`"+ },+ {+ "description": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache-recursive`",+ "type": "string",+ "const": "fs:allow-cache-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-cache-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache`",+ "type": "string",+ "const": "fs:allow-cache-write",+ "markdownDescription": "This allows non-recursive write access to the `$CACHE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache`"+ },+ {+ "description": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache-recursive`",+ "type": "string",+ "const": "fs:allow-cache-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$CACHE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-cache-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-index`",+ "type": "string",+ "const": "fs:allow-config-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-recursive`",+ "type": "string",+ "const": "fs:allow-config-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-config-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config`",+ "type": "string",+ "const": "fs:allow-config-read",+ "markdownDescription": "This allows non-recursive read access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config`"+ },+ {+ "description": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config-recursive`",+ "type": "string",+ "const": "fs:allow-config-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-config-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config`",+ "type": "string",+ "const": "fs:allow-config-write",+ "markdownDescription": "This allows non-recursive write access to the `$CONFIG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config`"+ },+ {+ "description": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config-recursive`",+ "type": "string",+ "const": "fs:allow-config-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$CONFIG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-config-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-index`",+ "type": "string",+ "const": "fs:allow-data-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-recursive`",+ "type": "string",+ "const": "fs:allow-data-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-data-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data`",+ "type": "string",+ "const": "fs:allow-data-read",+ "markdownDescription": "This allows non-recursive read access to the `$DATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data-recursive`",+ "type": "string",+ "const": "fs:allow-data-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-data-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data`",+ "type": "string",+ "const": "fs:allow-data-write",+ "markdownDescription": "This allows non-recursive write access to the `$DATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data-recursive`",+ "type": "string",+ "const": "fs:allow-data-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-data-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-index`",+ "type": "string",+ "const": "fs:allow-desktop-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-recursive`",+ "type": "string",+ "const": "fs:allow-desktop-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-desktop-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop`",+ "type": "string",+ "const": "fs:allow-desktop-read",+ "markdownDescription": "This allows non-recursive read access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop-recursive`",+ "type": "string",+ "const": "fs:allow-desktop-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-desktop-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop`",+ "type": "string",+ "const": "fs:allow-desktop-write",+ "markdownDescription": "This allows non-recursive write access to the `$DESKTOP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop-recursive`",+ "type": "string",+ "const": "fs:allow-desktop-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DESKTOP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-desktop-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-index`",+ "type": "string",+ "const": "fs:allow-document-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-recursive`",+ "type": "string",+ "const": "fs:allow-document-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-document-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document`",+ "type": "string",+ "const": "fs:allow-document-read",+ "markdownDescription": "This allows non-recursive read access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document-recursive`",+ "type": "string",+ "const": "fs:allow-document-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-document-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document`",+ "type": "string",+ "const": "fs:allow-document-write",+ "markdownDescription": "This allows non-recursive write access to the `$DOCUMENT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document-recursive`",+ "type": "string",+ "const": "fs:allow-document-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DOCUMENT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-document-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-index`",+ "type": "string",+ "const": "fs:allow-download-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-recursive`",+ "type": "string",+ "const": "fs:allow-download-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-download-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download`",+ "type": "string",+ "const": "fs:allow-download-read",+ "markdownDescription": "This allows non-recursive read access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download`"+ },+ {+ "description": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download-recursive`",+ "type": "string",+ "const": "fs:allow-download-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-download-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download`",+ "type": "string",+ "const": "fs:allow-download-write",+ "markdownDescription": "This allows non-recursive write access to the `$DOWNLOAD` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download`"+ },+ {+ "description": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download-recursive`",+ "type": "string",+ "const": "fs:allow-download-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$DOWNLOAD` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-download-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-index`",+ "type": "string",+ "const": "fs:allow-exe-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-recursive`",+ "type": "string",+ "const": "fs:allow-exe-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-exe-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$EXE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe`",+ "type": "string",+ "const": "fs:allow-exe-read",+ "markdownDescription": "This allows non-recursive read access to the `$EXE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe`"+ },+ {+ "description": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe-recursive`",+ "type": "string",+ "const": "fs:allow-exe-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-exe-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$EXE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe`",+ "type": "string",+ "const": "fs:allow-exe-write",+ "markdownDescription": "This allows non-recursive write access to the `$EXE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe`"+ },+ {+ "description": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe-recursive`",+ "type": "string",+ "const": "fs:allow-exe-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$EXE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-exe-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-index`",+ "type": "string",+ "const": "fs:allow-font-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-recursive`",+ "type": "string",+ "const": "fs:allow-font-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-font-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$FONT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font`",+ "type": "string",+ "const": "fs:allow-font-read",+ "markdownDescription": "This allows non-recursive read access to the `$FONT` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font`"+ },+ {+ "description": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font-recursive`",+ "type": "string",+ "const": "fs:allow-font-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-font-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$FONT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font`",+ "type": "string",+ "const": "fs:allow-font-write",+ "markdownDescription": "This allows non-recursive write access to the `$FONT` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font`"+ },+ {+ "description": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font-recursive`",+ "type": "string",+ "const": "fs:allow-font-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$FONT` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-font-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-index`",+ "type": "string",+ "const": "fs:allow-home-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-recursive`",+ "type": "string",+ "const": "fs:allow-home-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-home-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$HOME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home`",+ "type": "string",+ "const": "fs:allow-home-read",+ "markdownDescription": "This allows non-recursive read access to the `$HOME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home`"+ },+ {+ "description": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home-recursive`",+ "type": "string",+ "const": "fs:allow-home-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-home-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$HOME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home`",+ "type": "string",+ "const": "fs:allow-home-write",+ "markdownDescription": "This allows non-recursive write access to the `$HOME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home`"+ },+ {+ "description": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home-recursive`",+ "type": "string",+ "const": "fs:allow-home-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$HOME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-home-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-index`",+ "type": "string",+ "const": "fs:allow-localdata-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-recursive`",+ "type": "string",+ "const": "fs:allow-localdata-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-localdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata`",+ "type": "string",+ "const": "fs:allow-localdata-read",+ "markdownDescription": "This allows non-recursive read access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata`"+ },+ {+ "description": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata-recursive`",+ "type": "string",+ "const": "fs:allow-localdata-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-localdata-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata`",+ "type": "string",+ "const": "fs:allow-localdata-write",+ "markdownDescription": "This allows non-recursive write access to the `$LOCALDATA` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata`"+ },+ {+ "description": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata-recursive`",+ "type": "string",+ "const": "fs:allow-localdata-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$LOCALDATA` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-localdata-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-index`",+ "type": "string",+ "const": "fs:allow-log-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-recursive`",+ "type": "string",+ "const": "fs:allow-log-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-log-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$LOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log`",+ "type": "string",+ "const": "fs:allow-log-read",+ "markdownDescription": "This allows non-recursive read access to the `$LOG` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log`"+ },+ {+ "description": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log-recursive`",+ "type": "string",+ "const": "fs:allow-log-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-log-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$LOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log`",+ "type": "string",+ "const": "fs:allow-log-write",+ "markdownDescription": "This allows non-recursive write access to the `$LOG` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log`"+ },+ {+ "description": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log-recursive`",+ "type": "string",+ "const": "fs:allow-log-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$LOG` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-log-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-index`",+ "type": "string",+ "const": "fs:allow-picture-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-recursive`",+ "type": "string",+ "const": "fs:allow-picture-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-picture-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture`",+ "type": "string",+ "const": "fs:allow-picture-read",+ "markdownDescription": "This allows non-recursive read access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture`"+ },+ {+ "description": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture-recursive`",+ "type": "string",+ "const": "fs:allow-picture-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-picture-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture`",+ "type": "string",+ "const": "fs:allow-picture-write",+ "markdownDescription": "This allows non-recursive write access to the `$PICTURE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture`"+ },+ {+ "description": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture-recursive`",+ "type": "string",+ "const": "fs:allow-picture-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$PICTURE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-picture-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-index`",+ "type": "string",+ "const": "fs:allow-public-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-recursive`",+ "type": "string",+ "const": "fs:allow-public-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-public-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public`",+ "type": "string",+ "const": "fs:allow-public-read",+ "markdownDescription": "This allows non-recursive read access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public`"+ },+ {+ "description": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public-recursive`",+ "type": "string",+ "const": "fs:allow-public-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-public-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public`",+ "type": "string",+ "const": "fs:allow-public-write",+ "markdownDescription": "This allows non-recursive write access to the `$PUBLIC` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public`"+ },+ {+ "description": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public-recursive`",+ "type": "string",+ "const": "fs:allow-public-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$PUBLIC` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-public-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-index`",+ "type": "string",+ "const": "fs:allow-resource-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-recursive`",+ "type": "string",+ "const": "fs:allow-resource-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-resource-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource`",+ "type": "string",+ "const": "fs:allow-resource-read",+ "markdownDescription": "This allows non-recursive read access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource`"+ },+ {+ "description": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource-recursive`",+ "type": "string",+ "const": "fs:allow-resource-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-resource-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource`",+ "type": "string",+ "const": "fs:allow-resource-write",+ "markdownDescription": "This allows non-recursive write access to the `$RESOURCE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource`"+ },+ {+ "description": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource-recursive`",+ "type": "string",+ "const": "fs:allow-resource-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$RESOURCE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-resource-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-index`",+ "type": "string",+ "const": "fs:allow-runtime-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-recursive`",+ "type": "string",+ "const": "fs:allow-runtime-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-runtime-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime`",+ "type": "string",+ "const": "fs:allow-runtime-read",+ "markdownDescription": "This allows non-recursive read access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime`"+ },+ {+ "description": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime-recursive`",+ "type": "string",+ "const": "fs:allow-runtime-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-runtime-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime`",+ "type": "string",+ "const": "fs:allow-runtime-write",+ "markdownDescription": "This allows non-recursive write access to the `$RUNTIME` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime`"+ },+ {+ "description": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime-recursive`",+ "type": "string",+ "const": "fs:allow-runtime-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$RUNTIME` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-runtime-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-index`",+ "type": "string",+ "const": "fs:allow-temp-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-recursive`",+ "type": "string",+ "const": "fs:allow-temp-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-temp-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp`",+ "type": "string",+ "const": "fs:allow-temp-read",+ "markdownDescription": "This allows non-recursive read access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp`"+ },+ {+ "description": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp-recursive`",+ "type": "string",+ "const": "fs:allow-temp-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-temp-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp`",+ "type": "string",+ "const": "fs:allow-temp-write",+ "markdownDescription": "This allows non-recursive write access to the `$TEMP` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp`"+ },+ {+ "description": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp-recursive`",+ "type": "string",+ "const": "fs:allow-temp-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$TEMP` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-temp-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-index`",+ "type": "string",+ "const": "fs:allow-template-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-recursive`",+ "type": "string",+ "const": "fs:allow-template-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-template-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template`",+ "type": "string",+ "const": "fs:allow-template-read",+ "markdownDescription": "This allows non-recursive read access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template`"+ },+ {+ "description": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template-recursive`",+ "type": "string",+ "const": "fs:allow-template-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-template-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template`",+ "type": "string",+ "const": "fs:allow-template-write",+ "markdownDescription": "This allows non-recursive write access to the `$TEMPLATE` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template`"+ },+ {+ "description": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template-recursive`",+ "type": "string",+ "const": "fs:allow-template-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$TEMPLATE` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-template-recursive`"+ },+ {+ "description": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-index`",+ "type": "string",+ "const": "fs:allow-video-meta",+ "markdownDescription": "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-index`"+ },+ {+ "description": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-recursive`",+ "type": "string",+ "const": "fs:allow-video-meta-recursive",+ "markdownDescription": "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.\n#### This permission set includes:\n\n- `read-meta`\n- `scope-video-recursive`"+ },+ {+ "description": "This allows non-recursive read access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video`",+ "type": "string",+ "const": "fs:allow-video-read",+ "markdownDescription": "This allows non-recursive read access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video`"+ },+ {+ "description": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video-recursive`",+ "type": "string",+ "const": "fs:allow-video-read-recursive",+ "markdownDescription": "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `read-all`\n- `scope-video-recursive`"+ },+ {+ "description": "This allows non-recursive write access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video`",+ "type": "string",+ "const": "fs:allow-video-write",+ "markdownDescription": "This allows non-recursive write access to the `$VIDEO` folder.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video`"+ },+ {+ "description": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video-recursive`",+ "type": "string",+ "const": "fs:allow-video-write-recursive",+ "markdownDescription": "This allows full recursive write access to the complete `$VIDEO` folder, files and subdirectories.\n#### This permission set includes:\n\n- `write-all`\n- `scope-video-recursive`"+ },+ {+ "description": "This denies access to dangerous Tauri relevant files and folders by default.\n#### This permission set includes:\n\n- `deny-webview-data-linux`\n- `deny-webview-data-windows`",+ "type": "string",+ "const": "fs:deny-default",+ "markdownDescription": "This denies access to dangerous Tauri relevant files and folders by default.\n#### This permission set includes:\n\n- `deny-webview-data-linux`\n- `deny-webview-data-windows`"+ },+ {+ "description": "Enables the copy_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-copy-file",+ "markdownDescription": "Enables the copy_file command without any pre-configured scope."+ },+ {+ "description": "Enables the create command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-create",+ "markdownDescription": "Enables the create command without any pre-configured scope."+ },+ {+ "description": "Enables the exists command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-exists",+ "markdownDescription": "Enables the exists command without any pre-configured scope."+ },+ {+ "description": "Enables the fstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-fstat",+ "markdownDescription": "Enables the fstat command without any pre-configured scope."+ },+ {+ "description": "Enables the ftruncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-ftruncate",+ "markdownDescription": "Enables the ftruncate command without any pre-configured scope."+ },+ {+ "description": "Enables the lstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-lstat",+ "markdownDescription": "Enables the lstat command without any pre-configured scope."+ },+ {+ "description": "Enables the mkdir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-mkdir",+ "markdownDescription": "Enables the mkdir command without any pre-configured scope."+ },+ {+ "description": "Enables the open command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-open",+ "markdownDescription": "Enables the open command without any pre-configured scope."+ },+ {+ "description": "Enables the read command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read",+ "markdownDescription": "Enables the read command without any pre-configured scope."+ },+ {+ "description": "Enables the read_dir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-dir",+ "markdownDescription": "Enables the read_dir command without any pre-configured scope."+ },+ {+ "description": "Enables the read_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-file",+ "markdownDescription": "Enables the read_file command without any pre-configured scope."+ },+ {+ "description": "Enables the read_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-text-file",+ "markdownDescription": "Enables the read_text_file command without any pre-configured scope."+ },+ {+ "description": "Enables the read_text_file_lines command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-text-file-lines",+ "markdownDescription": "Enables the read_text_file_lines command without any pre-configured scope."+ },+ {+ "description": "Enables the read_text_file_lines_next command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-read-text-file-lines-next",+ "markdownDescription": "Enables the read_text_file_lines_next command without any pre-configured scope."+ },+ {+ "description": "Enables the remove command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-remove",+ "markdownDescription": "Enables the remove command without any pre-configured scope."+ },+ {+ "description": "Enables the rename command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-rename",+ "markdownDescription": "Enables the rename command without any pre-configured scope."+ },+ {+ "description": "Enables the seek command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-seek",+ "markdownDescription": "Enables the seek command without any pre-configured scope."+ },+ {+ "description": "Enables the size command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-size",+ "markdownDescription": "Enables the size command without any pre-configured scope."+ },+ {+ "description": "Enables the stat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-stat",+ "markdownDescription": "Enables the stat command without any pre-configured scope."+ },+ {+ "description": "Enables the truncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-truncate",+ "markdownDescription": "Enables the truncate command without any pre-configured scope."+ },+ {+ "description": "Enables the unwatch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-unwatch",+ "markdownDescription": "Enables the unwatch command without any pre-configured scope."+ },+ {+ "description": "Enables the watch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-watch",+ "markdownDescription": "Enables the watch command without any pre-configured scope."+ },+ {+ "description": "Enables the write command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-write",+ "markdownDescription": "Enables the write command without any pre-configured scope."+ },+ {+ "description": "Enables the write_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-write-file",+ "markdownDescription": "Enables the write_file command without any pre-configured scope."+ },+ {+ "description": "Enables the write_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:allow-write-text-file",+ "markdownDescription": "Enables the write_text_file command without any pre-configured scope."+ },+ {+ "description": "This permissions allows to create the application specific directories.\n",+ "type": "string",+ "const": "fs:create-app-specific-dirs",+ "markdownDescription": "This permissions allows to create the application specific directories.\n"+ },+ {+ "description": "Denies the copy_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-copy-file",+ "markdownDescription": "Denies the copy_file command without any pre-configured scope."+ },+ {+ "description": "Denies the create command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-create",+ "markdownDescription": "Denies the create command without any pre-configured scope."+ },+ {+ "description": "Denies the exists command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-exists",+ "markdownDescription": "Denies the exists command without any pre-configured scope."+ },+ {+ "description": "Denies the fstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-fstat",+ "markdownDescription": "Denies the fstat command without any pre-configured scope."+ },+ {+ "description": "Denies the ftruncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-ftruncate",+ "markdownDescription": "Denies the ftruncate command without any pre-configured scope."+ },+ {+ "description": "Denies the lstat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-lstat",+ "markdownDescription": "Denies the lstat command without any pre-configured scope."+ },+ {+ "description": "Denies the mkdir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-mkdir",+ "markdownDescription": "Denies the mkdir command without any pre-configured scope."+ },+ {+ "description": "Denies the open command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-open",+ "markdownDescription": "Denies the open command without any pre-configured scope."+ },+ {+ "description": "Denies the read command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read",+ "markdownDescription": "Denies the read command without any pre-configured scope."+ },+ {+ "description": "Denies the read_dir command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-dir",+ "markdownDescription": "Denies the read_dir command without any pre-configured scope."+ },+ {+ "description": "Denies the read_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-file",+ "markdownDescription": "Denies the read_file command without any pre-configured scope."+ },+ {+ "description": "Denies the read_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-text-file",+ "markdownDescription": "Denies the read_text_file command without any pre-configured scope."+ },+ {+ "description": "Denies the read_text_file_lines command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-text-file-lines",+ "markdownDescription": "Denies the read_text_file_lines command without any pre-configured scope."+ },+ {+ "description": "Denies the read_text_file_lines_next command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-read-text-file-lines-next",+ "markdownDescription": "Denies the read_text_file_lines_next command without any pre-configured scope."+ },+ {+ "description": "Denies the remove command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-remove",+ "markdownDescription": "Denies the remove command without any pre-configured scope."+ },+ {+ "description": "Denies the rename command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-rename",+ "markdownDescription": "Denies the rename command without any pre-configured scope."+ },+ {+ "description": "Denies the seek command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-seek",+ "markdownDescription": "Denies the seek command without any pre-configured scope."+ },+ {+ "description": "Denies the size command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-size",+ "markdownDescription": "Denies the size command without any pre-configured scope."+ },+ {+ "description": "Denies the stat command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-stat",+ "markdownDescription": "Denies the stat command without any pre-configured scope."+ },+ {+ "description": "Denies the truncate command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-truncate",+ "markdownDescription": "Denies the truncate command without any pre-configured scope."+ },+ {+ "description": "Denies the unwatch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-unwatch",+ "markdownDescription": "Denies the unwatch command without any pre-configured scope."+ },+ {+ "description": "Denies the watch command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-watch",+ "markdownDescription": "Denies the watch command without any pre-configured scope."+ },+ {+ "description": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.",+ "type": "string",+ "const": "fs:deny-webview-data-linux",+ "markdownDescription": "This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered."+ },+ {+ "description": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.",+ "type": "string",+ "const": "fs:deny-webview-data-windows",+ "markdownDescription": "This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered."+ },+ {+ "description": "Denies the write command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-write",+ "markdownDescription": "Denies the write command without any pre-configured scope."+ },+ {+ "description": "Denies the write_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-write-file",+ "markdownDescription": "Denies the write_file command without any pre-configured scope."+ },+ {+ "description": "Denies the write_text_file command without any pre-configured scope.",+ "type": "string",+ "const": "fs:deny-write-text-file",+ "markdownDescription": "Denies the write_text_file command without any pre-configured scope."+ },+ {+ "description": "This enables all read related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-all",+ "markdownDescription": "This enables all read related commands without any pre-configured accessible paths."+ },+ {+ "description": "This permission allows recursive read functionality on the application\nspecific base directories. \n",+ "type": "string",+ "const": "fs:read-app-specific-dirs-recursive",+ "markdownDescription": "This permission allows recursive read functionality on the application\nspecific base directories. \n"+ },+ {+ "description": "This enables directory read and file metadata related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-dirs",+ "markdownDescription": "This enables directory read and file metadata related commands without any pre-configured accessible paths."+ },+ {+ "description": "This enables file read related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-files",+ "markdownDescription": "This enables file read related commands without any pre-configured accessible paths."+ },+ {+ "description": "This enables all index or metadata related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:read-meta",+ "markdownDescription": "This enables all index or metadata related commands without any pre-configured accessible paths."+ },+ {+ "description": "An empty permission you can use to modify the global scope.\n\n## Example\n\n```json\n{\n \"identifier\": \"read-documents\",\n \"windows\": [\"main\"],\n \"permissions\": [\n \"fs:allow-read\",\n {\n \"identifier\": \"fs:scope\",\n \"allow\": [\n \"$APPDATA/documents/**/*\"\n ],\n \"deny\": [\n \"$APPDATA/documents/secret.txt\"\n ]\n }\n ]\n}\n```\n",+ "type": "string",+ "const": "fs:scope",+ "markdownDescription": "An empty permission you can use to modify the global scope.\n\n## Example\n\n```json\n{\n \"identifier\": \"read-documents\",\n \"windows\": [\"main\"],\n \"permissions\": [\n \"fs:allow-read\",\n {\n \"identifier\": \"fs:scope\",\n \"allow\": [\n \"$APPDATA/documents/**/*\"\n ],\n \"deny\": [\n \"$APPDATA/documents/secret.txt\"\n ]\n }\n ]\n}\n```\n"+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the application folders.",+ "type": "string",+ "const": "fs:scope-app",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the application folders."+ },+ {+ "description": "This scope permits to list all files and folders in the application directories.",+ "type": "string",+ "const": "fs:scope-app-index",+ "markdownDescription": "This scope permits to list all files and folders in the application directories."+ },+ {+ "description": "This scope permits recursive access to the complete application folders, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-app-recursive",+ "markdownDescription": "This scope permits recursive access to the complete application folders, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.",+ "type": "string",+ "const": "fs:scope-appcache",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPCACHE`folder.",+ "type": "string",+ "const": "fs:scope-appcache-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPCACHE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-appcache-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.",+ "type": "string",+ "const": "fs:scope-appconfig",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPCONFIG`folder.",+ "type": "string",+ "const": "fs:scope-appconfig-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPCONFIG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-appconfig-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.",+ "type": "string",+ "const": "fs:scope-appdata",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPDATA`folder.",+ "type": "string",+ "const": "fs:scope-appdata-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPDATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-appdata-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.",+ "type": "string",+ "const": "fs:scope-applocaldata",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder.",+ "type": "string",+ "const": "fs:scope-applocaldata-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPLOCALDATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-applocaldata-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.",+ "type": "string",+ "const": "fs:scope-applog",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$APPLOG`folder.",+ "type": "string",+ "const": "fs:scope-applog-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$APPLOG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-applog-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.",+ "type": "string",+ "const": "fs:scope-audio",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$AUDIO`folder.",+ "type": "string",+ "const": "fs:scope-audio-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$AUDIO`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-audio-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder.",+ "type": "string",+ "const": "fs:scope-cache",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$CACHE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$CACHE`folder.",+ "type": "string",+ "const": "fs:scope-cache-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$CACHE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-cache-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.",+ "type": "string",+ "const": "fs:scope-config",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$CONFIG`folder.",+ "type": "string",+ "const": "fs:scope-config-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$CONFIG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-config-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DATA` folder.",+ "type": "string",+ "const": "fs:scope-data",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DATA`folder.",+ "type": "string",+ "const": "fs:scope-data-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-data-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.",+ "type": "string",+ "const": "fs:scope-desktop",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DESKTOP`folder.",+ "type": "string",+ "const": "fs:scope-desktop-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DESKTOP`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-desktop-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.",+ "type": "string",+ "const": "fs:scope-document",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DOCUMENT`folder.",+ "type": "string",+ "const": "fs:scope-document-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DOCUMENT`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-document-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.",+ "type": "string",+ "const": "fs:scope-download",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$DOWNLOAD`folder.",+ "type": "string",+ "const": "fs:scope-download-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$DOWNLOAD`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-download-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$EXE` folder.",+ "type": "string",+ "const": "fs:scope-exe",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$EXE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$EXE`folder.",+ "type": "string",+ "const": "fs:scope-exe-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$EXE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-exe-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$FONT` folder.",+ "type": "string",+ "const": "fs:scope-font",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$FONT` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$FONT`folder.",+ "type": "string",+ "const": "fs:scope-font-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$FONT`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-font-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$HOME` folder.",+ "type": "string",+ "const": "fs:scope-home",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$HOME` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$HOME`folder.",+ "type": "string",+ "const": "fs:scope-home-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$HOME`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-home-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.",+ "type": "string",+ "const": "fs:scope-localdata",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$LOCALDATA`folder.",+ "type": "string",+ "const": "fs:scope-localdata-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$LOCALDATA`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-localdata-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$LOG` folder.",+ "type": "string",+ "const": "fs:scope-log",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$LOG` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$LOG`folder.",+ "type": "string",+ "const": "fs:scope-log-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$LOG`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-log-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.",+ "type": "string",+ "const": "fs:scope-picture",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$PICTURE`folder.",+ "type": "string",+ "const": "fs:scope-picture-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$PICTURE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-picture-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.",+ "type": "string",+ "const": "fs:scope-public",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$PUBLIC`folder.",+ "type": "string",+ "const": "fs:scope-public-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$PUBLIC`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-public-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.",+ "type": "string",+ "const": "fs:scope-resource",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$RESOURCE`folder.",+ "type": "string",+ "const": "fs:scope-resource-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$RESOURCE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-resource-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.",+ "type": "string",+ "const": "fs:scope-runtime",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$RUNTIME`folder.",+ "type": "string",+ "const": "fs:scope-runtime-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$RUNTIME`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-runtime-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder.",+ "type": "string",+ "const": "fs:scope-temp",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$TEMP` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$TEMP`folder.",+ "type": "string",+ "const": "fs:scope-temp-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$TEMP`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-temp-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.",+ "type": "string",+ "const": "fs:scope-template",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$TEMPLATE`folder.",+ "type": "string",+ "const": "fs:scope-template-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$TEMPLATE`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-template-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files."+ },+ {+ "description": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.",+ "type": "string",+ "const": "fs:scope-video",+ "markdownDescription": "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder."+ },+ {+ "description": "This scope permits to list all files and folders in the `$VIDEO`folder.",+ "type": "string",+ "const": "fs:scope-video-index",+ "markdownDescription": "This scope permits to list all files and folders in the `$VIDEO`folder."+ },+ {+ "description": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files.",+ "type": "string",+ "const": "fs:scope-video-recursive",+ "markdownDescription": "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files."+ },+ {+ "description": "This enables all write related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:write-all",+ "markdownDescription": "This enables all write related commands without any pre-configured accessible paths."+ },+ {+ "description": "This enables all file write related commands without any pre-configured accessible paths.",+ "type": "string",+ "const": "fs:write-files",+ "markdownDescription": "This enables all file write related commands without any pre-configured accessible paths."+ },+ {+ "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`",+ "type": "string",+ "const": "shell:default",+ "markdownDescription": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`"+ },+ {+ "description": "Enables the execute command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-execute",+ "markdownDescription": "Enables the execute command without any pre-configured scope."+ },+ {+ "description": "Enables the kill command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-kill",+ "markdownDescription": "Enables the kill command without any pre-configured scope."+ },+ {+ "description": "Enables the open command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-open",+ "markdownDescription": "Enables the open command without any pre-configured scope."+ },+ {+ "description": "Enables the spawn command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-spawn",+ "markdownDescription": "Enables the spawn command without any pre-configured scope."+ },+ {+ "description": "Enables the stdin_write command without any pre-configured scope.",+ "type": "string",+ "const": "shell:allow-stdin-write",+ "markdownDescription": "Enables the stdin_write command without any pre-configured scope."+ },+ {+ "description": "Denies the execute command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-execute",+ "markdownDescription": "Denies the execute command without any pre-configured scope."+ },+ {+ "description": "Denies the kill command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-kill",+ "markdownDescription": "Denies the kill command without any pre-configured scope."+ },+ {+ "description": "Denies the open command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-open",+ "markdownDescription": "Denies the open command without any pre-configured scope."+ },+ {+ "description": "Denies the spawn command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-spawn",+ "markdownDescription": "Denies the spawn command without any pre-configured scope."+ },+ {+ "description": "Denies the stdin_write command without any pre-configured scope.",+ "type": "string",+ "const": "shell:deny-stdin-write",+ "markdownDescription": "Denies the stdin_write command without any pre-configured scope."+ }+ ]+ },+ "Value": {+ "description": "All supported ACL values.",+ "anyOf": [+ {+ "description": "Represents a null JSON value.",+ "type": "null"+ },+ {+ "description": "Represents a [`bool`].",+ "type": "boolean"+ },+ {+ "description": "Represents a valid ACL [`Number`].",+ "allOf": [+ {+ "$ref": "#/definitions/Number"+ }+ ]+ },+ {+ "description": "Represents a [`String`].",+ "type": "string"+ },+ {+ "description": "Represents a list of other [`Value`]s.",+ "type": "array",+ "items": {+ "$ref": "#/definitions/Value"+ }+ },+ {+ "description": "Represents a map of [`String`] keys to [`Value`]s.",+ "type": "object",+ "additionalProperties": {+ "$ref": "#/definitions/Value"+ }+ }+ ]+ },+ "Number": {+ "description": "A valid ACL number.",+ "anyOf": [+ {+ "description": "Represents an [`i64`].",+ "type": "integer",+ "format": "int64"+ },+ {+ "description": "Represents a [`f64`].",+ "type": "number",+ "format": "double"+ }+ ]+ },+ "Target": {+ "description": "Platform target.",+ "oneOf": [+ {+ "description": "MacOS.",+ "type": "string",+ "enum": [+ "macOS"+ ]+ },+ {+ "description": "Windows.",+ "type": "string",+ "enum": [+ "windows"+ ]+ },+ {+ "description": "Linux.",+ "type": "string",+ "enum": [+ "linux"+ ]+ },+ {+ "description": "Android.",+ "type": "string",+ "enum": [+ "android"+ ]+ },+ {+ "description": "iOS.",+ "type": "string",+ "enum": [+ "iOS"+ ]+ }+ ]+ },+ "ShellScopeEntryAllowedArg": {+ "description": "A command argument allowed to be executed by the webview API.",+ "anyOf": [+ {+ "description": "A non-configurable argument that is passed to the command in the order it was specified.",+ "type": "string"+ },+ {+ "description": "A variable that is set while calling the command from the webview API.",+ "type": "object",+ "required": [+ "validator"+ ],+ "properties": {+ "raw": {+ "description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.",+ "default": false,+ "type": "boolean"+ },+ "validator": {+ "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: <https://docs.rs/regex/latest/regex/#syntax>",+ "type": "string"+ }+ },+ "additionalProperties": false+ }+ ]+ },+ "ShellScopeEntryAllowedArgs": {+ "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.",+ "anyOf": [+ {+ "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.",+ "type": "boolean"+ },+ {+ "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.",+ "type": "array",+ "items": {+ "$ref": "#/definitions/ShellScopeEntryAllowedArg"+ }+ }+ ]+ }+ }+}\ No newline at end of filediff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.jsonindex dde01887a..96d333d2e 100644--- a/desktop/src-tauri/tauri.conf.json+++ b/desktop/src-tauri/tauri.conf.json@@ -18,7 +18,8 @@"minWidth": 1024,"minHeight": 768,"resizable": true,- "center": true+ "center": true,+ "dragDropEnabled": false}],"security": {