From 51df654c173a90ef55914cb599eed7798689326c Mon Sep 17 00:00:00 2001 From: hschneider Date: Sun, 14 Jan 2024 13:29:02 +0100 Subject: [PATCH] New Extension Binding Adapted to NeutralinoJS > 4.15.0 --- extensions/python/NeutralinoExtension.py | 44 +++++++++++++++++------- neutralino.config.json | 2 +- resources/js/neutralino.js.map | 2 +- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/extensions/python/NeutralinoExtension.py b/extensions/python/NeutralinoExtension.py index ce1e596..8027b53 100644 --- a/extensions/python/NeutralinoExtension.py +++ b/extensions/python/NeutralinoExtension.py @@ -6,7 +6,7 @@ # pypy -m pip install --no-binary :all: simple-websocket # pypy -m pip install --no-binary :all: simple-websocket-server # -# (c)2023 Harald Schneider - marketmix.com +# (c)2023-2024 Harald Schneider - marketmix.com from argparse import * import uuid, json, time, asyncio, sys, os, signal, subprocess @@ -17,13 +17,7 @@ class NeutralinoExtension: def __init__(self, debug=False): - self.version = "1.1.9" - - parser = ArgumentParser() - parser.add_argument('--nl-port') - parser.add_argument('--nl-token') - parser.add_argument('--nl-extension-id') - args = parser.parse_args() + self.version = "1.2.1" self.debug = debug self.debugTermColors = True # Use terminal colors @@ -31,15 +25,40 @@ def __init__(self, debug=False): self.debugTermColorCALL = "\033[91m" # Red: Incoming function calls self.debugTermColorOUT = "\033[33m" # Yellow: Outgoing events - self.port = args.nl_port - self.token = args.nl_token - self.idExtension = args.nl_extension_id - self.urlSocket = f"ws://127.0.0.1:{self.port}?extensionId={self.idExtension}" + if len(sys.argv) > 1: + parser = ArgumentParser() + parser.add_argument('--nl-port') + parser.add_argument('--nl-token') + parser.add_argument('--nl-extension-id') + args = parser.parse_args() + + self.port = args.nl_port + self.token = args.nl_token + self.idExtension = args.nl_extension_id + self.connectToken = '' + self.urlSocket = f"ws://127.0.0.1:{self.port}?extensionId={self.idExtension}" + else: + conf = json.loads(sys.stdin.read()) + self.port = conf['nlPort'] + self.token = conf['nlToken'] + self.idExtension = conf['nlExtensionId'] + self.connectToken = conf['nlConnectToken'] + self.urlSocket = f"ws://127.0.0.1:{self.port}?extensionId={self.idExtension}&connectToken={self.connectToken}" + + self.debugLog('---') + self.debugLog("Received extension config via stdin:") + self.debugLog(json.dumps(conf, indent=4)) + self.debugLog('---') + self.debugLog('WebSocket URL is:') + self.debugLog(self.urlSocket) + self.qSend = Queue() self.termOnWindowClose = True # Terminate on windowCloseEvent message + self.debugLog('---') self.debugLog(f"{self.idExtension} running on port {self.port}") + self.debugLog('---') def sendMessage(self, event, data=None): """ @@ -104,6 +123,7 @@ async def run(self, onReceiveMessage): onReceiveMessage(msg) except (KeyboardInterrupt, EOFError, ConnectionClosed): + self.debugLog('WebSocket closed.') await self.socket.close() def parseFunctionCall(self, d): diff --git a/neutralino.config.json b/neutralino.config.json index 9531cad..e9ef345 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -41,7 +41,7 @@ "resourcesPath": "/resources/", "extensionsPath": "/extensions/", "clientLibrary": "/resources/js/neutralino.js", - "binaryVersion": "4.15.0", + "binaryVersion": "nightly", "clientVersion": "3.13.0" }, "extensions": [ diff --git a/resources/js/neutralino.js.map b/resources/js/neutralino.js.map index 2b01cac..7b5867b 100644 --- a/resources/js/neutralino.js.map +++ b/resources/js/neutralino.js.map @@ -1 +1 @@ -{"version":3,"file":"neutralino.js","sources":["node_modules/tslib/tslib.es6.js","src/api/extensions.ts","src/browser/events.ts","src/helpers.ts","src/ws/websocket.ts","src/api/filesystem.ts","src/api/os.ts","src/api/computer.ts","src/api/storage.ts","src/api/debug.ts","src/api/app.ts","src/api/window.ts","src/api/events.ts","src/api/updater.ts","src/api/clipboard.ts","src/api/custom.ts","src/api/init.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import * as websocket from '../ws/websocket';\n\nexport interface ExtensionStats {\n loaded: string[];\n connected: string[];\n}\n\nexport function dispatch(extensionId: string, event: string, data?: any): Promise {\n return new Promise(async (resolve: any, reject: any) => {\n let stats = await getStats();\n if(!stats.loaded.includes(extensionId)) {\n reject({\n code: 'NE_EX_EXTNOTL',\n message: `${extensionId} is not loaded`\n });\n }\n else if(stats.connected.includes(extensionId)) {\n try {\n let result = await websocket.sendMessage('extensions.dispatch', {extensionId, event, data});\n resolve(result);\n }\n catch(err: any) {\n reject(err);\n }\n }\n else {\n // loaded but not connected yet.\n websocket.sendWhenExtReady(extensionId, {\n method: 'extensions.dispatch',\n data: {extensionId, event, data}, resolve, reject\n });\n }\n });\n};\n\nexport function broadcast(event: string, data?: any): Promise {\n return websocket.sendMessage('extensions.broadcast', {event, data});\n};\n\nexport function getStats(): Promise {\n return websocket.sendMessage('extensions.getStats');\n};\n","export interface Response {\n success: boolean;\n message: string;\n}\n\nexport type Builtin =\n 'ready' |\n 'trayMenuItemClicked' |\n 'windowClose' |\n 'serverOffline' |\n 'clientConnect' |\n 'clientDisconnect' |\n 'appClientConnect' |\n 'appClientDisconnect' |\n 'extClientConnect' |\n 'extClientDisconnect' |\n 'extensionReady' |\n 'neuDev_reloadApp'\n\nexport function on(event: string, handler: (ev: CustomEvent) => void): Promise {\n window.addEventListener(event, handler);\n return Promise.resolve({\n success: true,\n message: 'Event listener added'\n });\n};\n\nexport function off(event: string, handler: (ev: CustomEvent) => void): Promise {\n window.removeEventListener(event, handler);\n return Promise.resolve({\n success: true,\n message: 'Event listener removed'\n });\n};\n\nexport function dispatch(event: string, data?: any): Promise {\n let customEvent = new CustomEvent(event, {detail: data});\n window.dispatchEvent(customEvent);\n return Promise.resolve({\n success: true,\n message: 'Message dispatched'\n });\n};\n","export function base64ToBytesArray(data: string): ArrayBuffer {\n let binaryData: string = window.atob(data);\n let len: number = binaryData.length;\n let bytes: Uint8Array = new Uint8Array(len);\n\n for (let i = 0; i < len; i++) {\n bytes[i] = binaryData.charCodeAt(i);\n }\n\n return bytes.buffer;\n}\n","import * as extensions from '../api/extensions';\nimport * as events from '../browser/events';\nimport { base64ToBytesArray } from '../helpers';\n\nlet ws;\nlet nativeCalls = {};\nlet offlineMessageQueue = [];\nlet extensionMessageQueue = {}\n\nexport function init() {\n initAuth();\n ws = new WebSocket(`ws://${window.location.hostname}:${window.NL_PORT}`);\n registerLibraryEvents();\n registerSocketEvents();\n}\n\nexport function sendMessage(method: string, data?: any): Promise {\n return new Promise((resolve: any, reject: any) => {\n\n if(ws?.readyState != WebSocket.OPEN) {\n sendWhenReady({method, data, resolve, reject});\n return;\n }\n\n const id: string = uuidv4();\n const accessToken: string = getAuthToken();\n\n nativeCalls[id] = {resolve, reject};\n\n ws.send(JSON.stringify({\n id,\n method,\n data,\n accessToken\n }));\n\n });\n}\n\nexport function sendWhenReady(message: any) {\n offlineMessageQueue.push(message);\n}\n\nexport function sendWhenExtReady(extensionId: string, message: any) {\n if(extensionId in extensionMessageQueue) {\n extensionMessageQueue[extensionId].push(message);\n }\n else {\n extensionMessageQueue[extensionId] = [message];\n }\n}\n\nfunction registerLibraryEvents() {\n events.on('ready', async () => {\n await processQueue(offlineMessageQueue);\n\n if(!window.NL_EXTENABLED) {\n return;\n }\n\n let stats = await extensions.getStats();\n for(let extension of stats.connected) {\n events.dispatch('extensionReady', extension);\n }\n });\n\n events.on('extClientConnect', (evt) => {\n events.dispatch('extensionReady', evt.detail);\n });\n\n if(!window.NL_EXTENABLED) {\n return;\n }\n\n events.on('extensionReady', async (evt) => {\n if(evt.detail in extensionMessageQueue) {\n await processQueue(extensionMessageQueue[evt.detail]);\n delete extensionMessageQueue[evt.detail];\n }\n });\n}\n\nfunction registerSocketEvents() {\n ws.addEventListener('message', (event) => {\n const message = JSON.parse(event.data);\n\n if(message.id && message.id in nativeCalls) {\n // Native call response\n if(message.data?.error) {\n nativeCalls[message.id].reject(message.data.error);\n if(message.data.error.code == 'NE_RT_INVTOKN') {\n // critical auth error\n // Perhaps, someone tried to open app from anoher client,\n // with 'one-time' token mode\n handleAuthError();\n }\n }\n else if(message.data?.success) {\n nativeCalls[message.id]\n .resolve(message.data.hasOwnProperty('returnValue') ? message.data.returnValue\n : message.data);\n }\n delete nativeCalls[message.id];\n }\n else if(message.event) {\n // Event from process\n if(message.event == 'openedFile' && message?.data?.action == 'dataBinary') {\n message.data.data = base64ToBytesArray(message.data.data);\n }\n events.dispatch(message.event, message.data);\n }\n });\n\n ws.addEventListener('open', async (event) => {\n events.dispatch('ready');\n });\n\n ws.addEventListener('close', async (event) => {\n let error = {\n code: 'NE_CL_NSEROFF',\n message: 'Neutralino server is offline. Try restarting the application'\n };\n events.dispatch('serverOffline', error);\n });\n}\n\nasync function processQueue(messageQueue: any[]) {\n while(messageQueue.length > 0) {\n let message = messageQueue.shift();\n try {\n let response = await sendMessage(message.method, message.data);\n message.resolve(response);\n }\n catch(err: any) {\n message.reject(err);\n }\n }\n}\n\nfunction handleAuthError() {\n ws.close();\n document.body.innerText = '';\n document.write('NE_RT_INVTOKN: Neutralinojs application configuration' +\n ' prevents accepting native calls from this client.');\n}\n\nfunction initAuth() {\n if (window.NL_TOKEN) {\n sessionStorage.setItem('NL_TOKEN', window.NL_TOKEN);\n }\n}\nfunction getAuthToken() {\n return window.NL_TOKEN || sessionStorage.getItem('NL_TOKEN') || '';\n}\n\n// From: https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid\nfunction uuidv4(): string {\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, (c: any) =>\n (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)\n );\n}\n","import { sendMessage } from '../ws/websocket';\nimport { base64ToBytesArray } from '../helpers';\n\nexport interface DirectoryEntry {\n entry: string;\n type: string;\n}\n\nexport interface FileReaderOptions {\n pos: number;\n size: number;\n}\n\nexport interface OpenedFile {\n id: number;\n eof: boolean;\n pos: number;\n lastRead: number;\n}\n\nexport interface Stats {\n size: number;\n isFile: boolean;\n isDirectory: boolean;\n createdAt: number;\n modifiedAt: number;\n}\n\nexport interface Watcher {\n id: number;\n path: string;\n}\n\nexport function createDirectory(path: string): Promise {\n return sendMessage('filesystem.createDirectory', { path });\n};\n\nexport function removeDirectory(path: string): Promise {\n return sendMessage('filesystem.removeDirectory', { path });\n};\n\nexport function writeFile(path: string, data: string): Promise {\n return sendMessage('filesystem.writeFile', { path, data });\n};\n\nexport function appendFile(path: string, data: string): Promise {\n return sendMessage('filesystem.appendFile', { path, data });\n};\n\nexport function writeBinaryFile(path: string, data: ArrayBuffer): Promise {\n return sendMessage('filesystem.writeBinaryFile', {\n path,\n data: arrayBufferToBase64(data)\n });\n};\n\nexport function appendBinaryFile(path: string, data: ArrayBuffer): Promise {\n return sendMessage('filesystem.appendBinaryFile', {\n path,\n data: arrayBufferToBase64(data)\n });\n};\n\nexport function readFile(path: string, options?: FileReaderOptions): Promise {\n return sendMessage('filesystem.readFile', { path, ...options });\n};\n\nexport function readBinaryFile(path: string, options?: FileReaderOptions): Promise {\n return new Promise((resolve: any, reject: any) => {\n sendMessage('filesystem.readBinaryFile', { path, ...options })\n .then((base64Data: string) => {\n resolve(base64ToBytesArray(base64Data));\n })\n .catch((error: any) => {\n reject(error);\n });\n });\n};\n\nexport function openFile(path: string): Promise {\n return sendMessage('filesystem.openFile', { path });\n};\n\nexport function createWatcher(path: string): Promise {\n return sendMessage('filesystem.createWatcher', { path });\n};\n\nexport function removeWatcher(id: number): Promise {\n return sendMessage('filesystem.removeWatcher', { id });\n};\n\nexport function getWatchers(): Promise {\n return sendMessage('filesystem.getWatchers');\n};\n\nexport function updateOpenedFile(id: number, event: string, data?: any): Promise {\n return sendMessage('filesystem.updateOpenedFile', { id, event, data });\n};\n\nexport function getOpenedFileInfo(id: number): Promise {\n return sendMessage('filesystem.getOpenedFileInfo', { id });\n};\n\nexport function removeFile(path: string): Promise {\n return sendMessage('filesystem.removeFile', { path });\n};\n\nexport function readDirectory(path: string): Promise {\n return sendMessage('filesystem.readDirectory', { path });\n};\n\nexport function copyFile(source: string, destination: string): Promise {\n return sendMessage('filesystem.copyFile', { source, destination } );\n};\n\nexport function moveFile(source: string, destination: string): Promise {\n return sendMessage('filesystem.moveFile', { source, destination });\n};\n\nexport function getStats(path: string): Promise {\n return sendMessage('filesystem.getStats', { path });\n};\n\nfunction arrayBufferToBase64(data: ArrayBuffer): string {\n let bytes: Uint8Array = new Uint8Array(data);\n let asciiStr: string = '';\n\n for(let byte of bytes) {\n asciiStr += String.fromCharCode(byte);\n }\n\n return window.btoa(asciiStr);\n};\n\n\n","import { sendMessage } from '../ws/websocket';\n\nexport interface ExecCommandOptions {\n stdIn?: string;\n background?: boolean;\n cwd?: string;\n}\n\nexport interface ExecCommandResult {\n pid: number;\n stdOut: string;\n stdErr: string;\n exitCode: number;\n}\n\nexport interface SpawnedProcess {\n id: number;\n pid: number;\n}\n\nexport interface Envs {\n [key: string]: string;\n}\n\nexport interface OpenDialogOptions {\n multiSelections?: boolean;\n filters?: Filter[];\n defaultPath?: string;\n}\n\nexport interface FolderDialogOptions {\n defaultPath?: string;\n}\n\nexport interface SaveDialogOptions {\n forceOverwrite?: boolean;\n filters?: Filter[];\n defaultPath?: string;\n}\n\nexport interface Filter {\n name: string;\n extensions: string[];\n}\n\nexport interface TrayOptions {\n icon: string;\n menuItems: TrayMenuItem[];\n}\n\nexport interface TrayMenuItem {\n id?: string;\n text: string;\n isDisabled?: boolean;\n isChecked?: boolean;\n}\n\nexport enum Icon {\n WARNING = 'WARNING',\n ERROR = 'ERROR',\n INFO = 'INFO',\n QUESTION = 'QUESTION'\n};\n\nexport enum MessageBoxChoice {\n OK = 'OK',\n OK_CANCEL = 'OK_CANCEL',\n YES_NO = 'YES_NO',\n YES_NO_CANCEL = 'YES_NO_CANCEL',\n RETRY_CANCEL = 'RETRY_CANCEL',\n ABORT_RETRY_IGNORE = 'ABORT_RETRY_IGNORE'\n};\n\nexport type KnownPath =\n 'config' |\n 'data' |\n 'cache' |\n 'documents' |\n 'pictures' |\n 'music' |\n 'video' |\n 'downloads' |\n 'savedGames1' |\n 'savedGames2'\n\nexport function execCommand(command: string, options?: ExecCommandOptions): Promise {\n return sendMessage('os.execCommand', { command, ...options });\n};\n\nexport function spawnProcess(command: string, cwd?: string): Promise {\n return sendMessage('os.spawnProcess', { command, cwd });\n};\n\nexport function updateSpawnedProcess(id: number, event: string, data?: any): Promise {\n return sendMessage('os.updateSpawnedProcess', { id, event, data });\n};\n\nexport function getSpawnedProcesses(): Promise {\n return sendMessage('os.getSpawnedProcesses');\n};\n\nexport function getEnv(key: string): Promise {\n return sendMessage('os.getEnv', { key });\n};\n\nexport function getEnvs(): Promise {\n return sendMessage('os.getEnvs');\n};\n\nexport function showOpenDialog(title?: string, options?: OpenDialogOptions): Promise {\n return sendMessage('os.showOpenDialog', { title, ...options });\n};\n\nexport function showFolderDialog(title?: string, options?: FolderDialogOptions): Promise {\n return sendMessage('os.showFolderDialog', { title, ...options });\n};\n\nexport function showSaveDialog(title?: string, options?: SaveDialogOptions): Promise {\n return sendMessage('os.showSaveDialog', { title, ...options });\n};\n\nexport function showNotification(title: string, content: string, icon?: Icon): Promise {\n return sendMessage('os.showNotification', { title, content, icon });\n};\n\nexport function showMessageBox(title: string, content: string,\n choice?: MessageBoxChoice, icon?: Icon): Promise {\n return sendMessage('os.showMessageBox', { title, content, choice, icon });\n};\n\nexport function setTray(options: TrayOptions): Promise {\n return sendMessage('os.setTray', options);\n};\n\nexport function open(url: string): Promise {\n return sendMessage('os.open', { url });\n};\n\nexport function getPath(name: KnownPath): Promise {\n return sendMessage('os.getPath', { name });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport interface MemoryInfo {\n total: number;\n available: number;\n}\n\nexport interface KernelInfo {\n variant: string;\n version: string;\n}\n\nexport interface OSInfo {\n name: string;\n description: string;\n version: string;\n}\n\nexport interface CPUInfo {\n vendor: string;\n model: string;\n frequency: number;\n architecture: string;\n logicalThreads: number;\n physicalCores: number;\n physicalUnits: number;\n}\n\nexport interface Display {\n id: number;\n resolution: Resolution;\n dpi: number;\n bpp: number;\n refreshRate: number;\n}\n\ninterface Resolution {\n width: number;\n height: number;\n}\n\ninterface MousePosition {\n x: number;\n y: number;\n}\n\nexport function getMemoryInfo(): Promise {\n return sendMessage('computer.getMemoryInfo');\n};\n\nexport function getArch(): Promise {\n return sendMessage('computer.getArch');\n};\n\nexport function getKernelInfo(): Promise {\n return sendMessage('computer.getKernelInfo');\n};\n\nexport function getOSInfo(): Promise {\n return sendMessage('computer.getOSInfo');\n};\n\nexport function getCPUInfo(): Promise {\n return sendMessage('computer.getCPUInfo');\n};\n\nexport function getDisplays(): Promise {\n return sendMessage('computer.getDisplays');\n};\n\nexport function getMousePosition(): Promise {\n return sendMessage('computer.getMousePosition');\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport function setData(key: string, data: string): Promise {\n return sendMessage('storage.setData', { key, data });\n};\n\nexport function getData(key: string): Promise {\n return sendMessage('storage.getData', { key });\n};\n\nexport function getKeys(): Promise {\n return sendMessage('storage.getKeys');\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport enum LoggerType {\n WARNING = 'WARNING',\n ERROR = 'ERROR',\n INFO = 'INFO'\n};\n\nexport function log(message: string, type?: LoggerType): Promise {\n return sendMessage('debug.log', { message, type });\n};\n","import { sendMessage } from '../ws/websocket';\nimport * as os from './os';\n\nexport interface OpenActionOptions {\n url: string;\n}\n\nexport interface RestartOptions {\n args: string;\n}\n\nexport function exit(code?: number): Promise {\n return sendMessage('app.exit', { code });\n};\n\nexport function killProcess(): Promise {\n return sendMessage('app.killProcess');\n};\n\nexport function restartProcess(options?: RestartOptions): Promise {\n return new Promise(async (resolve: () => void) => {\n let command = window.NL_ARGS.reduce((acc: string, arg: string) => {\n if(arg.includes(' ')) {\n arg = `\"${arg}\"`\n }\n acc += ' ' + arg;\n return acc;\n }, '');\n\n if(options?.args) {\n command += ' ' + options.args;\n }\n\n await os.execCommand(command, {background: true});\n exit();\n resolve();\n });\n};\n\nexport function getConfig(): Promise {\n return sendMessage('app.getConfig');\n};\n\nexport function broadcast(event: string, data?: any): Promise {\n return sendMessage('app.broadcast', {event, data});\n};\n","import { sendMessage } from '../ws/websocket';\nimport * as os from './os';\n\nconst draggableRegions: WeakMap = new WeakMap();\n\nexport interface WindowOptions extends WindowSizeOptions, WindowPosOptions {\n title?: string;\n icon?: string;\n fullScreen?: boolean;\n alwaysOnTop?: boolean;\n enableInspector?: boolean;\n borderless?: boolean;\n maximize?: boolean;\n hidden?: boolean;\n maximizable?: boolean;\n useSavedState?: boolean;\n processArgs?: string;\n}\n\nexport interface WindowSizeOptions {\n width?: number;\n height?: number;\n minWidth?: number;\n minHeight?: number;\n maxWidth?: number;\n maxHeight?: number;\n resizable?: boolean;\n}\n\nexport interface WindowPosOptions {\n x: number;\n y: number;\n}\n\nexport function setTitle(title: string): Promise {\n return sendMessage('window.setTitle', { title });\n};\n\nexport function getTitle(): Promise {\n return sendMessage('window.getTitle');\n};\n\nexport function maximize(): Promise {\n return sendMessage('window.maximize');\n};\n\nexport function unmaximize(): Promise {\n return sendMessage('window.unmaximize');\n};\n\nexport function isMaximized(): Promise {\n return sendMessage('window.isMaximized');\n};\n\nexport function minimize(): Promise {\n return sendMessage('window.minimize');\n};\n\nexport function setFullScreen(): Promise {\n return sendMessage('window.setFullScreen');\n};\n\nexport function exitFullScreen(): Promise {\n return sendMessage('window.exitFullScreen');\n};\n\nexport function isFullScreen(): Promise {\n return sendMessage('window.isFullScreen');\n};\n\nexport function show(): Promise {\n return sendMessage('window.show');\n};\n\nexport function hide(): Promise {\n return sendMessage('window.hide');\n};\n\nexport function isVisible(): Promise {\n return sendMessage('window.isVisible');\n};\n\nexport function focus(): Promise {\n return sendMessage('window.focus');\n};\n\nexport function setIcon(icon: string): Promise {\n return sendMessage('window.setIcon', { icon });\n};\n\nexport function move(x: number, y: number): Promise {\n return sendMessage('window.move', { x, y });\n};\n\nexport function center(): Promise {\n return sendMessage('window.center');\n};\n\nexport function setDraggableRegion(domElementOrId: string | HTMLElement): Promise {\n return new Promise((resolve: any, reject: any) => {\n const draggableRegion: HTMLElement = domElementOrId instanceof Element ?\n domElementOrId : document.getElementById(domElementOrId);\n let initialClientX: number = 0;\n let initialClientY: number = 0;\n let absDragMovementDistance: number = 0; \n let isPointerCaptured = false;\n let lastMoveTimestamp = performance.now();\n\n if (!draggableRegion) {\n return reject({\n code: 'NE_WD_DOMNOTF',\n message: 'Unable to find DOM element'\n });\n }\n\n if (draggableRegions.has(draggableRegion)) {\n return reject({\n code: 'NE_WD_ALRDREL',\n message: 'This DOM element is already an active draggable region'\n });\n }\n\n draggableRegion.addEventListener('pointerdown', startPointerCapturing);\n draggableRegion.addEventListener('pointerup', endPointerCapturing);\n\n draggableRegions.set(draggableRegion, { pointerdown: startPointerCapturing, pointerup: endPointerCapturing });\n\n async function onPointerMove(evt: PointerEvent) { \n\n if (isPointerCaptured) { \n\n const currentMilliseconds = performance.now();\n const timeTillLastMove = currentMilliseconds - lastMoveTimestamp;\n // Limit move calls to 1 per every 5ms - TODO: introduce constant instead of magic number?\n if (timeTillLastMove < 5) {\n // Do not execute move more often than 1x every 5ms or performance will drop \n return;\n }\n\n // Store current time minus the offset\n lastMoveTimestamp = currentMilliseconds - (timeTillLastMove - 5);\n\n await move(\n evt.screenX - initialClientX,\n evt.screenY - initialClientY\n );\n\n return;\n }\n\n // Add absolute drag distance \n absDragMovementDistance = Math.sqrt(evt.movementX * evt.movementX + evt.movementY * evt.movementY);\n // Only start pointer capturing when the user dragged more than a certain amount of distance \n // This ensures that the user can also click on the dragable area, e.g. if the area is menu / navbar\n if (absDragMovementDistance >= 10) { // TODO: introduce constant instead of magic number? \n isPointerCaptured = true;\n draggableRegion.setPointerCapture(evt.pointerId);\n }\n }\n\n function startPointerCapturing(evt: PointerEvent) {\n if (evt.button !== 0) return;\n initialClientX = evt.clientX;\n initialClientY = evt.clientY;\n draggableRegion.addEventListener('pointermove', onPointerMove); \n }\n\n function endPointerCapturing(evt: PointerEvent) {\n draggableRegion.removeEventListener('pointermove', onPointerMove);\n draggableRegion.releasePointerCapture(evt.pointerId);\n }\n\n resolve({\n success: true,\n message: 'Draggable region was activated'\n });\n });\n};\n\nexport function unsetDraggableRegion(domElementOrId: string | HTMLElement): Promise {\n return new Promise((resolve: any, reject: any) => {\n const draggableRegion: HTMLElement = domElementOrId instanceof Element ?\n domElementOrId : document.getElementById(domElementOrId);\n\n if (!draggableRegion) {\n return reject({\n code: 'NE_WD_DOMNOTF',\n message: 'Unable to find DOM element'\n });\n }\n if (!draggableRegions.has(draggableRegion)) {\n return reject({\n code: 'NE_WD_NOTDRRE',\n message: 'DOM element is not an active draggable region'\n });\n }\n\n const { pointerdown, pointerup } = draggableRegions.get(draggableRegion);\n draggableRegion.removeEventListener('pointerdown', pointerdown);\n draggableRegion.removeEventListener('pointerup', pointerup);\n draggableRegions.delete(draggableRegion);\n\n resolve({\n success: true,\n message: 'Draggable region was deactivated'\n });\n });\n}\n\nexport function setSize(options: WindowSizeOptions): Promise {\n return new Promise(async (resolve: any, reject: any) => {\n let sizeOptions = await getSize();\n\n options = {...sizeOptions, ...options}; // merge prioritizing options arg\n\n sendMessage('window.setSize', options)\n .then((response: any) => {\n resolve(response);\n })\n .catch((error: any) => {\n reject(error);\n });\n });\n};\n\nexport function getSize(): Promise {\n return sendMessage('window.getSize');\n};\n\nexport function getPosition(): Promise {\n return sendMessage('window.getPosition');\n};\n\nexport function setAlwaysOnTop(onTop: boolean): Promise {\n return sendMessage('window.setAlwaysOnTop', { onTop });\n};\n\nexport function create(url: string, options?: WindowOptions): Promise {\n return new Promise((resolve: any, reject: any) => {\n\n options = { ...options, useSavedState: false };\n // useSavedState: false -> Child windows won't save their states\n\n function normalize(arg: any) {\n if(typeof arg != \"string\")\n return arg;\n arg = arg.trim();\n if(arg.includes(\" \")) {\n arg = `\"${arg}\"`;\n }\n return arg;\n }\n\n let command = window.NL_ARGS.reduce((acc: string, arg: string, index: number) => {\n if(arg.includes(\"--path=\") || arg.includes(\"--debug-mode\") ||\n arg.includes(\"--load-dir-res\") || index == 0) {\n acc += \" \" + normalize(arg);\n }\n return acc;\n }, \"\");\n\n command += \" --url=\" + normalize(url);\n\n for(let key in options) {\n if(key == \"processArgs\")\n continue;\n\n let cliKey: string = key.replace(/[A-Z]|^[a-z]/g, (token: string) => (\n \"-\" + token.toLowerCase()\n ));\n command += ` --window${cliKey}=${normalize(options[key])}`\n }\n\n if(options && options.processArgs)\n command += \" \" + options.processArgs;\n\n os.execCommand(command, { background: true })\n .then((processInfo: any) => {\n resolve(processInfo);\n })\n .catch((error: any) => {\n reject(error);\n });\n });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport * from '../browser/events';\n\nexport function broadcast(event: string, data?: any): Promise {\n return sendMessage('events.broadcast', {event, data});\n};\n","import * as filesystem from './filesystem';\nimport { Error } from './protocol';\n\nexport interface Manifest {\n applicationId: string;\n version: string;\n resourcesURL: string;\n}\n\nlet manifest: Manifest = null;\n\nexport function checkForUpdates(url: string): Promise {\n function isValidManifest(manifest: any): manifest is Manifest {\n if(manifest.applicationId && manifest.applicationId == window.NL_APPID\n && manifest.version && manifest.resourcesURL) {\n return true;\n }\n return false;\n }\n\n return new Promise(async (resolve: (m: Manifest) => void, reject: (e: Error) => void) => {\n if(!url) {\n return reject({\n code: 'NE_RT_NATRTER',\n message: 'Missing require parameter: url'\n });\n }\n try {\n let response = await fetch(url);\n manifest = JSON.parse(await response.text());\n\n if(isValidManifest(manifest)) {\n resolve(manifest);\n }\n else {\n reject({\n code: 'NE_UP_CUPDMER',\n message: 'Invalid update manifest or mismatching applicationId'\n });\n }\n }\n catch(err) {\n reject({\n code: 'NE_UP_CUPDERR',\n message: 'Unable to fetch update manifest'\n });\n }\n\n });\n};\n\nexport function install(): Promise {\n return new Promise(async (resolve: any, reject: any) => {\n if(!manifest) {\n return reject({\n code: 'NE_UP_UPDNOUF',\n message: 'No update manifest loaded'\n });\n }\n try {\n let response = await fetch(manifest.resourcesURL);\n let resourcesBuffer = await response.arrayBuffer();\n await filesystem.writeBinaryFile(window.NL_PATH + \"/resources.neu\", resourcesBuffer);\n\n resolve({\n success: true,\n message: 'Update installed. Restart the process to see updates'\n });\n }\n catch(err) {\n reject({\n code: 'NE_UP_UPDINER',\n message: 'Update installation error'\n });\n }\n\n });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport function readText(key: string, data: string): Promise {\n return sendMessage('clipboard.readText', { key, data });\n\n};\n\nexport function writeText(data: string): Promise {\n return sendMessage('clipboard.writeText', { data });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport function getMethods(): Promise {\n return sendMessage('custom.getMethods');\n};\n","import { version } from '../../package.json';\nimport * as websocket from '../ws/websocket';\nimport * as debug from './debug';\nimport * as events from './events';\n\nlet initialized = false;\n\nexport interface InitOptions {\n exportCustomMethods?: boolean;\n}\n\nexport function init(options: InitOptions = {}): void {\n options = { exportCustomMethods: true ,...options };\n\n if(initialized) {\n return;\n }\n\n websocket.init();\n\n if(window.NL_ARGS.find((arg) => arg == '--neu-dev-auto-reload')) {\n events.on('neuDev_reloadApp', async () => {\n await debug.log('Reloading the application...');\n location.reload();\n });\n }\n\n if(options.exportCustomMethods && window.NL_CMETHODS && window.NL_CMETHODS.length > 0) {\n for(let method of window.NL_CMETHODS) {\n Neutralino.custom[method] = (...args) => {\n let data = {};\n for(let [argi, argv] of args.entries()) {\n if(typeof argv == 'object' && !Array.isArray(argv) && argv != null) {\n data = {...data, ...argv};\n }\n else {\n data = {...data, ['arg' + argi]: argv};\n }\n }\n return websocket.sendMessage('custom.' + method, data);\n };\n }\n }\n\n window.NL_CVERSION = version;\n window.NL_CCOMMIT = '57919080e8f792b034dba5ca677e19420d7b0201'; // only the build server will update this\n initialized = true;\n}\n"],"names":["dispatch","getStats","websocket.sendMessage","websocket.sendWhenExtReady","broadcast","init","events.on","extensions.getStats","events.dispatch","os.execCommand","filesystem.writeBinaryFile","websocket.init","debug.log"],"mappings":";;;IAqEO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;IAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;IAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;IAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;IACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CA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AC,CAAC,GAAG,KAAK,GAAG,IAAI,uBAAuB,CAAC,EAAE;YAC7DL,EAAS,CAAC,kBAAkB,EAAE;gBAC1B,MAAMM,GAAS,CAAC,8BAA8B,CAAC,CAAC;gBAChD,QAAQ,CAAC,MAAM,EAAE,CAAC;aACrB,CAAA,CAAC,CAAC;SACN;QAED,IAAG,OAAO,CAAC,mBAAmB,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACnF,KAAI,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE;gBAClC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI;oBAChC,IAAI,IAAI,GAAG,EAAE,CAAC;oBACd,KAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;wBACpC,IAAG,OAAO,IAAI,IAAI,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,EAAE;4BAChE,IAAI,mCAAO,IAAI,GAAK,IAAI,CAAC,CAAC;yBAC7B;6BACI;4BACD,IAAI,mCAAO,IAAI,KAAE,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,GAAC,CAAC;yBAC1C;qBACJ;oBACD,OAAOV,WAAqB,CAAC,SAAS,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC;iBAC1D,CAAC;aACL;SACJ;QAED,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC;QAC7B,MAAM,CAAC,UAAU,GAAG,0CAA0C,CAAC;QAC/D,WAAW,GAAG,IAAI,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"neutralino.js","sources":["node_modules/tslib/tslib.es6.js","src/api/extensions.ts","src/browser/events.ts","src/helpers.ts","src/ws/websocket.ts","src/api/filesystem.ts","src/api/os.ts","src/api/computer.ts","src/api/storage.ts","src/api/debug.ts","src/api/app.ts","src/api/window.ts","src/api/events.ts","src/api/updater.ts","src/api/clipboard.ts","src/api/custom.ts","src/api/init.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import * as websocket from '../ws/websocket';\n\nexport interface ExtensionStats {\n loaded: string[];\n connected: string[];\n}\n\nexport function dispatch(extensionId: string, event: string, data?: any): Promise {\n return new Promise(async (resolve: any, reject: any) => {\n let stats = await getStats();\n if(!stats.loaded.includes(extensionId)) {\n reject({\n code: 'NE_EX_EXTNOTL',\n message: `${extensionId} is not loaded`\n });\n }\n else if(stats.connected.includes(extensionId)) {\n try {\n let result = await websocket.sendMessage('extensions.dispatch', {extensionId, event, data});\n resolve(result);\n }\n catch(err: any) {\n reject(err);\n }\n }\n else {\n // loaded but not connected yet.\n websocket.sendWhenExtReady(extensionId, {\n method: 'extensions.dispatch',\n data: {extensionId, event, data}, resolve, reject\n });\n }\n });\n};\n\nexport function broadcast(event: string, data?: any): Promise {\n return websocket.sendMessage('extensions.broadcast', {event, data});\n};\n\nexport function getStats(): Promise {\n return websocket.sendMessage('extensions.getStats');\n};\n","export interface Response {\n success: boolean;\n message: string;\n}\n\nexport type Builtin =\n 'ready' |\n 'trayMenuItemClicked' |\n 'windowClose' |\n 'serverOffline' |\n 'clientConnect' |\n 'clientDisconnect' |\n 'appClientConnect' |\n 'appClientDisconnect' |\n 'extClientConnect' |\n 'extClientDisconnect' |\n 'extensionReady' |\n 'neuDev_reloadApp'\n\nexport function on(event: string, handler: (ev: CustomEvent) => void): Promise {\n window.addEventListener(event, handler);\n return Promise.resolve({\n success: true,\n message: 'Event listener added'\n });\n};\n\nexport function off(event: string, handler: (ev: CustomEvent) => void): Promise {\n window.removeEventListener(event, handler);\n return Promise.resolve({\n success: true,\n message: 'Event listener removed'\n });\n};\n\nexport function dispatch(event: string, data?: any): Promise {\n let customEvent = new CustomEvent(event, {detail: data});\n window.dispatchEvent(customEvent);\n return Promise.resolve({\n success: true,\n message: 'Message dispatched'\n });\n};\n","export function base64ToBytesArray(data: string): ArrayBuffer {\n let binaryData: string = window.atob(data);\n let len: number = binaryData.length;\n let bytes: Uint8Array = new Uint8Array(len);\n\n for (let i = 0; i < len; i++) {\n bytes[i] = binaryData.charCodeAt(i);\n }\n\n return bytes.buffer;\n}\n","import * as extensions from '../api/extensions';\nimport * as events from '../browser/events';\nimport { base64ToBytesArray } from '../helpers';\n\nlet ws;\nlet nativeCalls = {};\nlet offlineMessageQueue = [];\nlet extensionMessageQueue = {}\n\nexport function init() {\n initAuth();\n const connectToken: string = getAuthToken().split('.')[1];\n ws = new WebSocket(`ws://${window.location.hostname}:${window.NL_PORT}?connectToken=${connectToken}`);\n registerLibraryEvents();\n registerSocketEvents();\n}\n\nexport function sendMessage(method: string, data?: any): Promise {\n return new Promise((resolve: any, reject: any) => {\n\n if(ws?.readyState != WebSocket.OPEN) {\n sendWhenReady({method, data, resolve, reject});\n return;\n }\n\n const id: string = uuidv4();\n const accessToken: string = getAuthToken();\n\n nativeCalls[id] = {resolve, reject};\n\n ws.send(JSON.stringify({\n id,\n method,\n data,\n accessToken\n }));\n\n });\n}\n\nexport function sendWhenReady(message: any) {\n offlineMessageQueue.push(message);\n}\n\nexport function sendWhenExtReady(extensionId: string, message: any) {\n if(extensionId in extensionMessageQueue) {\n extensionMessageQueue[extensionId].push(message);\n }\n else {\n extensionMessageQueue[extensionId] = [message];\n }\n}\n\nfunction registerLibraryEvents() {\n events.on('ready', async () => {\n await processQueue(offlineMessageQueue);\n\n if(!window.NL_EXTENABLED) {\n return;\n }\n\n let stats = await extensions.getStats();\n for(let extension of stats.connected) {\n events.dispatch('extensionReady', extension);\n }\n });\n\n events.on('extClientConnect', (evt) => {\n events.dispatch('extensionReady', evt.detail);\n });\n\n if(!window.NL_EXTENABLED) {\n return;\n }\n\n events.on('extensionReady', async (evt) => {\n if(evt.detail in extensionMessageQueue) {\n await processQueue(extensionMessageQueue[evt.detail]);\n delete extensionMessageQueue[evt.detail];\n }\n });\n}\n\nfunction registerSocketEvents() {\n ws.addEventListener('message', (event) => {\n const message = JSON.parse(event.data);\n\n if(message.id && message.id in nativeCalls) {\n // Native call response\n if(message.data?.error) {\n nativeCalls[message.id].reject(message.data.error);\n if(message.data.error.code == 'NE_RT_INVTOKN') {\n // Invalid native method token\n handleNativeMethodTokenError();\n }\n }\n else if(message.data?.success) {\n nativeCalls[message.id]\n .resolve(message.data.hasOwnProperty('returnValue') ? message.data.returnValue\n : message.data);\n }\n delete nativeCalls[message.id];\n }\n else if(message.event) {\n // Event from process\n if(message.event == 'openedFile' && message?.data?.action == 'dataBinary') {\n message.data.data = base64ToBytesArray(message.data.data);\n }\n events.dispatch(message.event, message.data);\n }\n });\n\n ws.addEventListener('open', async (event) => {\n events.dispatch('ready');\n });\n\n ws.addEventListener('close', async (event) => {\n let error = {\n code: 'NE_CL_NSEROFF',\n message: 'Neutralino server is offline. Try restarting the application'\n };\n events.dispatch('serverOffline', error);\n });\n\n ws.addEventListener('error', async (event) => {\n handleConnectError();\n });\n}\n\nasync function processQueue(messageQueue: any[]) {\n while(messageQueue.length > 0) {\n let message = messageQueue.shift();\n try {\n let response = await sendMessage(message.method, message.data);\n message.resolve(response);\n }\n catch(err: any) {\n message.reject(err);\n }\n }\n}\n\nfunction handleNativeMethodTokenError() {\n ws.close();\n document.body.innerText = '';\n document.write('NE_RT_INVTOKN: Neutralinojs application cannot' +\n ' execute native methods since NL_TOKEN is invalid.');\n}\n\nfunction handleConnectError() {\n document.body.innerText = '';\n document.write('NE_CL_IVCTOKN: Neutralinojs application cannot' +\n ' connect with the framework core using NL_TOKEN.');\n}\n\nfunction initAuth() {\n if (window.NL_TOKEN) {\n sessionStorage.setItem('NL_TOKEN', window.NL_TOKEN);\n }\n}\nfunction getAuthToken() {\n return window.NL_TOKEN || sessionStorage.getItem('NL_TOKEN') || '';\n}\n\n// From: https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid\nfunction uuidv4(): string {\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, (c: any) =>\n (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)\n );\n}\n","import { sendMessage } from '../ws/websocket';\nimport { base64ToBytesArray } from '../helpers';\n\nexport interface DirectoryEntry {\n entry: string;\n path: string;\n type: string;\n}\n\nexport interface FileReaderOptions {\n pos: number;\n size: number;\n}\n\nexport interface DirectoryReaderOptions {\n recursive: boolean;\n}\n\nexport interface OpenedFile {\n id: number;\n eof: boolean;\n pos: number;\n lastRead: number;\n}\n\nexport interface Stats {\n size: number;\n isFile: boolean;\n isDirectory: boolean;\n createdAt: number;\n modifiedAt: number;\n}\n\nexport interface Watcher {\n id: number;\n path: string;\n}\n\nexport function createDirectory(path: string): Promise {\n return sendMessage('filesystem.createDirectory', { path });\n};\n\nexport function remove(path: string): Promise {\n return sendMessage('filesystem.remove', { path });\n};\n\nexport function writeFile(path: string, data: string): Promise {\n return sendMessage('filesystem.writeFile', { path, data });\n};\n\nexport function appendFile(path: string, data: string): Promise {\n return sendMessage('filesystem.appendFile', { path, data });\n};\n\nexport function writeBinaryFile(path: string, data: ArrayBuffer): Promise {\n return sendMessage('filesystem.writeBinaryFile', {\n path,\n data: arrayBufferToBase64(data)\n });\n};\n\nexport function appendBinaryFile(path: string, data: ArrayBuffer): Promise {\n return sendMessage('filesystem.appendBinaryFile', {\n path,\n data: arrayBufferToBase64(data)\n });\n};\n\nexport function readFile(path: string, options?: FileReaderOptions): Promise {\n return sendMessage('filesystem.readFile', { path, ...options });\n};\n\nexport function readBinaryFile(path: string, options?: FileReaderOptions): Promise {\n return new Promise((resolve: any, reject: any) => {\n sendMessage('filesystem.readBinaryFile', { path, ...options })\n .then((base64Data: string) => {\n resolve(base64ToBytesArray(base64Data));\n })\n .catch((error: any) => {\n reject(error);\n });\n });\n};\n\nexport function openFile(path: string): Promise {\n return sendMessage('filesystem.openFile', { path });\n};\n\nexport function createWatcher(path: string): Promise {\n return sendMessage('filesystem.createWatcher', { path });\n};\n\nexport function removeWatcher(id: number): Promise {\n return sendMessage('filesystem.removeWatcher', { id });\n};\n\nexport function getWatchers(): Promise {\n return sendMessage('filesystem.getWatchers');\n};\n\nexport function updateOpenedFile(id: number, event: string, data?: any): Promise {\n return sendMessage('filesystem.updateOpenedFile', { id, event, data });\n};\n\nexport function getOpenedFileInfo(id: number): Promise {\n return sendMessage('filesystem.getOpenedFileInfo', { id });\n};\n\nexport function readDirectory(path: string, options?: DirectoryReaderOptions): Promise {\n return sendMessage('filesystem.readDirectory', { path, ...options });\n};\n\nexport function copy(source: string, destination: string): Promise {\n return sendMessage('filesystem.copy', { source, destination } );\n};\n\nexport function move(source: string, destination: string): Promise {\n return sendMessage('filesystem.move', { source, destination });\n};\n\nexport function getStats(path: string): Promise {\n return sendMessage('filesystem.getStats', { path });\n};\n\nfunction arrayBufferToBase64(data: ArrayBuffer): string {\n let bytes: Uint8Array = new Uint8Array(data);\n let asciiStr: string = '';\n\n for(let byte of bytes) {\n asciiStr += String.fromCharCode(byte);\n }\n\n return window.btoa(asciiStr);\n};\n\n\n","import { sendMessage } from '../ws/websocket';\n\nexport interface ExecCommandOptions {\n stdIn?: string;\n background?: boolean;\n cwd?: string;\n}\n\nexport interface ExecCommandResult {\n pid: number;\n stdOut: string;\n stdErr: string;\n exitCode: number;\n}\n\nexport interface SpawnedProcess {\n id: number;\n pid: number;\n}\n\nexport interface Envs {\n [key: string]: string;\n}\n\nexport interface OpenDialogOptions {\n multiSelections?: boolean;\n filters?: Filter[];\n defaultPath?: string;\n}\n\nexport interface FolderDialogOptions {\n defaultPath?: string;\n}\n\nexport interface SaveDialogOptions {\n forceOverwrite?: boolean;\n filters?: Filter[];\n defaultPath?: string;\n}\n\nexport interface Filter {\n name: string;\n extensions: string[];\n}\n\nexport interface TrayOptions {\n icon: string;\n menuItems: TrayMenuItem[];\n}\n\nexport interface TrayMenuItem {\n id?: string;\n text: string;\n isDisabled?: boolean;\n isChecked?: boolean;\n}\n\nexport enum Icon {\n WARNING = 'WARNING',\n ERROR = 'ERROR',\n INFO = 'INFO',\n QUESTION = 'QUESTION'\n};\n\nexport enum MessageBoxChoice {\n OK = 'OK',\n OK_CANCEL = 'OK_CANCEL',\n YES_NO = 'YES_NO',\n YES_NO_CANCEL = 'YES_NO_CANCEL',\n RETRY_CANCEL = 'RETRY_CANCEL',\n ABORT_RETRY_IGNORE = 'ABORT_RETRY_IGNORE'\n};\n\nexport type KnownPath =\n 'config' |\n 'data' |\n 'cache' |\n 'documents' |\n 'pictures' |\n 'music' |\n 'video' |\n 'downloads' |\n 'savedGames1' |\n 'savedGames2'\n\nexport function execCommand(command: string, options?: ExecCommandOptions): Promise {\n return sendMessage('os.execCommand', { command, ...options });\n};\n\nexport function spawnProcess(command: string, cwd?: string): Promise {\n return sendMessage('os.spawnProcess', { command, cwd });\n};\n\nexport function updateSpawnedProcess(id: number, event: string, data?: any): Promise {\n return sendMessage('os.updateSpawnedProcess', { id, event, data });\n};\n\nexport function getSpawnedProcesses(): Promise {\n return sendMessage('os.getSpawnedProcesses');\n};\n\nexport function getEnv(key: string): Promise {\n return sendMessage('os.getEnv', { key });\n};\n\nexport function getEnvs(): Promise {\n return sendMessage('os.getEnvs');\n};\n\nexport function showOpenDialog(title?: string, options?: OpenDialogOptions): Promise {\n return sendMessage('os.showOpenDialog', { title, ...options });\n};\n\nexport function showFolderDialog(title?: string, options?: FolderDialogOptions): Promise {\n return sendMessage('os.showFolderDialog', { title, ...options });\n};\n\nexport function showSaveDialog(title?: string, options?: SaveDialogOptions): Promise {\n return sendMessage('os.showSaveDialog', { title, ...options });\n};\n\nexport function showNotification(title: string, content: string, icon?: Icon): Promise {\n return sendMessage('os.showNotification', { title, content, icon });\n};\n\nexport function showMessageBox(title: string, content: string,\n choice?: MessageBoxChoice, icon?: Icon): Promise {\n return sendMessage('os.showMessageBox', { title, content, choice, icon });\n};\n\nexport function setTray(options: TrayOptions): Promise {\n return sendMessage('os.setTray', options);\n};\n\nexport function open(url: string): Promise {\n return sendMessage('os.open', { url });\n};\n\nexport function getPath(name: KnownPath): Promise {\n return sendMessage('os.getPath', { name });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport interface MemoryInfo {\n total: number;\n available: number;\n}\n\nexport interface KernelInfo {\n variant: string;\n version: string;\n}\n\nexport interface OSInfo {\n name: string;\n description: string;\n version: string;\n}\n\nexport interface CPUInfo {\n vendor: string;\n model: string;\n frequency: number;\n architecture: string;\n logicalThreads: number;\n physicalCores: number;\n physicalUnits: number;\n}\n\nexport interface Display {\n id: number;\n resolution: Resolution;\n dpi: number;\n bpp: number;\n refreshRate: number;\n}\n\ninterface Resolution {\n width: number;\n height: number;\n}\n\ninterface MousePosition {\n x: number;\n y: number;\n}\n\nexport function getMemoryInfo(): Promise {\n return sendMessage('computer.getMemoryInfo');\n};\n\nexport function getArch(): Promise {\n return sendMessage('computer.getArch');\n};\n\nexport function getKernelInfo(): Promise {\n return sendMessage('computer.getKernelInfo');\n};\n\nexport function getOSInfo(): Promise {\n return sendMessage('computer.getOSInfo');\n};\n\nexport function getCPUInfo(): Promise {\n return sendMessage('computer.getCPUInfo');\n};\n\nexport function getDisplays(): Promise {\n return sendMessage('computer.getDisplays');\n};\n\nexport function getMousePosition(): Promise {\n return sendMessage('computer.getMousePosition');\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport function setData(key: string, data: string): Promise {\n return sendMessage('storage.setData', { key, data });\n};\n\nexport function getData(key: string): Promise {\n return sendMessage('storage.getData', { key });\n};\n\nexport function getKeys(): Promise {\n return sendMessage('storage.getKeys');\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport enum LoggerType {\n WARNING = 'WARNING',\n ERROR = 'ERROR',\n INFO = 'INFO'\n};\n\nexport function log(message: string, type?: LoggerType): Promise {\n return sendMessage('debug.log', { message, type });\n};\n","import { sendMessage } from '../ws/websocket';\nimport * as os from './os';\n\nexport interface OpenActionOptions {\n url: string;\n}\n\nexport interface RestartOptions {\n args: string;\n}\n\nexport function exit(code?: number): Promise {\n return sendMessage('app.exit', { code });\n};\n\nexport function killProcess(): Promise {\n return sendMessage('app.killProcess');\n};\n\nexport function restartProcess(options?: RestartOptions): Promise {\n return new Promise(async (resolve: () => void) => {\n let command = window.NL_ARGS.reduce((acc: string, arg: string) => {\n if(arg.includes(' ')) {\n arg = `\"${arg}\"`\n }\n acc += ' ' + arg;\n return acc;\n }, '');\n\n if(options?.args) {\n command += ' ' + options.args;\n }\n\n await os.execCommand(command, {background: true});\n exit();\n resolve();\n });\n};\n\nexport function getConfig(): Promise {\n return sendMessage('app.getConfig');\n};\n\nexport function broadcast(event: string, data?: any): Promise {\n return sendMessage('app.broadcast', {event, data});\n};\n\nexport function readProcessInput(readAll?: boolean): Promise {\n return sendMessage('app.readProcessInput', { readAll });\n};\n\nexport function writeProcessOutput(data: string): Promise {\n return sendMessage('app.writeProcessOutput', { data });\n};\n\nexport function writeProcessError(data: string): Promise {\n return sendMessage('app.writeProcessError', { data });\n};\n","import { sendMessage } from '../ws/websocket';\nimport * as os from './os';\n\nconst draggableRegions: WeakMap = new WeakMap();\n\nexport interface WindowOptions extends WindowSizeOptions, WindowPosOptions {\n title?: string;\n icon?: string;\n fullScreen?: boolean;\n alwaysOnTop?: boolean;\n enableInspector?: boolean;\n borderless?: boolean;\n maximize?: boolean;\n hidden?: boolean;\n maximizable?: boolean;\n useSavedState?: boolean;\n exitProcessOnClose?: boolean;\n extendUserAgentWith?: string;\n processArgs?: string;\n}\n\nexport interface WindowSizeOptions {\n width?: number;\n height?: number;\n minWidth?: number;\n minHeight?: number;\n maxWidth?: number;\n maxHeight?: number;\n resizable?: boolean;\n}\n\nexport interface WindowPosOptions {\n x: number;\n y: number;\n}\n\nexport function setTitle(title: string): Promise {\n return sendMessage('window.setTitle', { title });\n};\n\nexport function getTitle(): Promise {\n return sendMessage('window.getTitle');\n};\n\nexport function maximize(): Promise {\n return sendMessage('window.maximize');\n};\n\nexport function unmaximize(): Promise {\n return sendMessage('window.unmaximize');\n};\n\nexport function isMaximized(): Promise {\n return sendMessage('window.isMaximized');\n};\n\nexport function minimize(): Promise {\n return sendMessage('window.minimize');\n};\n\nexport function setFullScreen(): Promise {\n return sendMessage('window.setFullScreen');\n};\n\nexport function exitFullScreen(): Promise {\n return sendMessage('window.exitFullScreen');\n};\n\nexport function isFullScreen(): Promise {\n return sendMessage('window.isFullScreen');\n};\n\nexport function show(): Promise {\n return sendMessage('window.show');\n};\n\nexport function hide(): Promise {\n return sendMessage('window.hide');\n};\n\nexport function isVisible(): Promise {\n return sendMessage('window.isVisible');\n};\n\nexport function focus(): Promise {\n return sendMessage('window.focus');\n};\n\nexport function setIcon(icon: string): Promise {\n return sendMessage('window.setIcon', { icon });\n};\n\nexport function move(x: number, y: number): Promise {\n return sendMessage('window.move', { x, y });\n};\n\nexport function center(): Promise {\n return sendMessage('window.center');\n};\n\nexport function setDraggableRegion(domElementOrId: string | HTMLElement): Promise {\n return new Promise((resolve: any, reject: any) => {\n const draggableRegion: HTMLElement = domElementOrId instanceof Element ?\n domElementOrId : document.getElementById(domElementOrId);\n let initialClientX: number = 0;\n let initialClientY: number = 0;\n let absDragMovementDistance: number = 0;\n let isPointerCaptured = false;\n let lastMoveTimestamp = performance.now();\n\n if (!draggableRegion) {\n return reject({\n code: 'NE_WD_DOMNOTF',\n message: 'Unable to find DOM element'\n });\n }\n\n if (draggableRegions.has(draggableRegion)) {\n return reject({\n code: 'NE_WD_ALRDREL',\n message: 'This DOM element is already an active draggable region'\n });\n }\n\n draggableRegion.addEventListener('pointerdown', startPointerCapturing);\n draggableRegion.addEventListener('pointerup', endPointerCapturing);\n\n draggableRegions.set(draggableRegion, { pointerdown: startPointerCapturing, pointerup: endPointerCapturing });\n\n async function onPointerMove(evt: PointerEvent) {\n\n if (isPointerCaptured) {\n\n const currentMilliseconds = performance.now();\n const timeTillLastMove = currentMilliseconds - lastMoveTimestamp;\n // Limit move calls to 1 per every 5ms - TODO: introduce constant instead of magic number?\n if (timeTillLastMove < 5) {\n // Do not execute move more often than 1x every 5ms or performance will drop\n return;\n }\n\n // Store current time minus the offset\n lastMoveTimestamp = currentMilliseconds - (timeTillLastMove - 5);\n\n await move(\n evt.screenX - initialClientX,\n evt.screenY - initialClientY\n );\n\n return;\n }\n\n // Add absolute drag distance\n absDragMovementDistance = Math.sqrt(evt.movementX * evt.movementX + evt.movementY * evt.movementY);\n // Only start pointer capturing when the user dragged more than a certain amount of distance\n // This ensures that the user can also click on the dragable area, e.g. if the area is menu / navbar\n if (absDragMovementDistance >= 10) { // TODO: introduce constant instead of magic number?\n isPointerCaptured = true;\n draggableRegion.setPointerCapture(evt.pointerId);\n }\n }\n\n function startPointerCapturing(evt: PointerEvent) {\n if (evt.button !== 0) return;\n initialClientX = evt.clientX;\n initialClientY = evt.clientY;\n draggableRegion.addEventListener('pointermove', onPointerMove);\n }\n\n function endPointerCapturing(evt: PointerEvent) {\n draggableRegion.removeEventListener('pointermove', onPointerMove);\n draggableRegion.releasePointerCapture(evt.pointerId);\n }\n\n resolve({\n success: true,\n message: 'Draggable region was activated'\n });\n });\n};\n\nexport function unsetDraggableRegion(domElementOrId: string | HTMLElement): Promise {\n return new Promise((resolve: any, reject: any) => {\n const draggableRegion: HTMLElement = domElementOrId instanceof Element ?\n domElementOrId : document.getElementById(domElementOrId);\n\n if (!draggableRegion) {\n return reject({\n code: 'NE_WD_DOMNOTF',\n message: 'Unable to find DOM element'\n });\n }\n if (!draggableRegions.has(draggableRegion)) {\n return reject({\n code: 'NE_WD_NOTDRRE',\n message: 'DOM element is not an active draggable region'\n });\n }\n\n const { pointerdown, pointerup } = draggableRegions.get(draggableRegion);\n draggableRegion.removeEventListener('pointerdown', pointerdown);\n draggableRegion.removeEventListener('pointerup', pointerup);\n draggableRegions.delete(draggableRegion);\n\n resolve({\n success: true,\n message: 'Draggable region was deactivated'\n });\n });\n}\n\nexport function setSize(options: WindowSizeOptions): Promise {\n return new Promise(async (resolve: any, reject: any) => {\n let sizeOptions = await getSize();\n\n options = {...sizeOptions, ...options}; // merge prioritizing options arg\n\n sendMessage('window.setSize', options)\n .then((response: any) => {\n resolve(response);\n })\n .catch((error: any) => {\n reject(error);\n });\n });\n};\n\nexport function getSize(): Promise {\n return sendMessage('window.getSize');\n};\n\nexport function getPosition(): Promise {\n return sendMessage('window.getPosition');\n};\n\nexport function setAlwaysOnTop(onTop: boolean): Promise {\n return sendMessage('window.setAlwaysOnTop', { onTop });\n};\n\nexport function create(url: string, options?: WindowOptions): Promise {\n return new Promise((resolve: any, reject: any) => {\n\n options = { ...options, useSavedState: false };\n // useSavedState: false -> Child windows won't save their states\n\n function normalize(arg: any) {\n if(typeof arg != \"string\")\n return arg;\n arg = arg.trim();\n if(arg.includes(\" \")) {\n arg = `\"${arg}\"`;\n }\n return arg;\n }\n\n let command = window.NL_ARGS.reduce((acc: string, arg: string, index: number) => {\n if(arg.includes(\"--path=\") || arg.includes(\"--debug-mode\") ||\n arg.includes(\"--load-dir-res\") || index == 0) {\n acc += \" \" + normalize(arg);\n }\n return acc;\n }, \"\");\n\n command += \" --url=\" + normalize(url);\n\n for(let key in options) {\n if(key == \"processArgs\")\n continue;\n\n let cliKey: string = key.replace(/[A-Z]|^[a-z]/g, (token: string) => (\n \"-\" + token.toLowerCase()\n ));\n command += ` --window${cliKey}=${normalize(options[key])}`\n }\n\n if(options && options.processArgs)\n command += \" \" + options.processArgs;\n\n os.execCommand(command, { background: true })\n .then((processInfo: any) => {\n resolve(processInfo);\n })\n .catch((error: any) => {\n reject(error);\n });\n });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport * from '../browser/events';\n\nexport function broadcast(event: string, data?: any): Promise {\n return sendMessage('events.broadcast', {event, data});\n};\n","import * as filesystem from './filesystem';\nimport { Error } from './protocol';\n\nexport interface Manifest {\n applicationId: string;\n version: string;\n resourcesURL: string;\n}\n\nlet manifest: Manifest = null;\n\nexport function checkForUpdates(url: string): Promise {\n function isValidManifest(manifest: any): manifest is Manifest {\n if(manifest.applicationId && manifest.applicationId == window.NL_APPID\n && manifest.version && manifest.resourcesURL) {\n return true;\n }\n return false;\n }\n\n return new Promise(async (resolve: (m: Manifest) => void, reject: (e: Error) => void) => {\n if(!url) {\n return reject({\n code: 'NE_RT_NATRTER',\n message: 'Missing require parameter: url'\n });\n }\n try {\n let response = await fetch(url);\n manifest = JSON.parse(await response.text());\n\n if(isValidManifest(manifest)) {\n resolve(manifest);\n }\n else {\n reject({\n code: 'NE_UP_CUPDMER',\n message: 'Invalid update manifest or mismatching applicationId'\n });\n }\n }\n catch(err) {\n reject({\n code: 'NE_UP_CUPDERR',\n message: 'Unable to fetch update manifest'\n });\n }\n\n });\n};\n\nexport function install(): Promise {\n return new Promise(async (resolve: any, reject: any) => {\n if(!manifest) {\n return reject({\n code: 'NE_UP_UPDNOUF',\n message: 'No update manifest loaded'\n });\n }\n try {\n let response = await fetch(manifest.resourcesURL);\n let resourcesBuffer = await response.arrayBuffer();\n await filesystem.writeBinaryFile(window.NL_PATH + \"/resources.neu\", resourcesBuffer);\n\n resolve({\n success: true,\n message: 'Update installed. Restart the process to see updates'\n });\n }\n catch(err) {\n reject({\n code: 'NE_UP_UPDINER',\n message: 'Update installation error'\n });\n }\n\n });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport function readText(key: string, data: string): Promise {\n return sendMessage('clipboard.readText', { key, data });\n\n};\n\nexport function writeText(data: string): Promise {\n return sendMessage('clipboard.writeText', { data });\n};\n","import { sendMessage } from '../ws/websocket';\n\nexport function getMethods(): Promise {\n return sendMessage('custom.getMethods');\n};\n","import { version } from '../../package.json';\nimport * as websocket from '../ws/websocket';\nimport * as debug from './debug';\nimport * as events from './events';\n\nlet initialized = false;\n\nexport interface InitOptions {\n exportCustomMethods?: boolean;\n}\n\nexport function init(options: InitOptions = {}): void {\n options = { exportCustomMethods: true ,...options };\n\n if(initialized) {\n return;\n }\n\n websocket.init();\n\n if(window.NL_ARGS.find((arg) => arg == '--neu-dev-auto-reload')) {\n events.on('neuDev_reloadApp', async () => {\n await debug.log('Reloading the application...');\n location.reload();\n });\n }\n\n if(options.exportCustomMethods && window.NL_CMETHODS && window.NL_CMETHODS.length > 0) {\n for(let method of window.NL_CMETHODS) {\n Neutralino.custom[method] = (...args) => {\n let data = {};\n for(let [argi, argv] of args.entries()) {\n if(typeof argv == 'object' && !Array.isArray(argv) && argv != null) {\n data = {...data, ...argv};\n }\n else {\n data = {...data, ['arg' + argi]: argv};\n }\n }\n return websocket.sendMessage('custom.' + method, data);\n };\n }\n }\n\n window.NL_CVERSION = version;\n window.NL_CCOMMIT = 'a20aeef8bda0a66bf0bfa8aff7d2570a3d0e2a3e'; // only the build server will update this\n initialized = true;\n}\n"],"names":["dispatch","getStats","websocket.sendMessage","websocket.sendWhenExtReady","broadcast","init","events.on","extensions.getStats","events.dispatch","move","os.execCommand","filesystem.writeBinaryFile","websocket.init","debug.log"],"mappings":";;;IAqEO,SAAS,SAAS,C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