@datagrok/webcomponents 1.4.6 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"package-test.js","sources":["webpack://webcomponents/../../node_modules/.pnpm/fast-sha256@1.3.0/node_modules/fast-sha256/sha256.js","webpack://webcomponents/webpack/runtime/define_property_getters","webpack://webcomponents/webpack/runtime/has_own_property","webpack://webcomponents/webpack/runtime/make_namespace_object","webpack://webcomponents/../../node_modules/.pnpm/@datagrok-libraries+test@1.4.1_@playwright+test@1.63.0_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/@datagrok-libraries/test/dist/src/test.js","webpack://webcomponents/../../node_modules/.pnpm/@datagrok-libraries+test@1.4.1_@playwright+test@1.63.0_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/@datagrok-libraries/test/dist/src/dataframe-utils.js","webpack://webcomponents/./src/package-test.ts"],"sourcesContent":["(function (root, factory) {\n // Hack to make all exports of this module sha256 function object properties.\n var exports = {};\n factory(exports);\n var sha256 = exports[\"default\"];\n for (var k in exports) {\n sha256[k] = exports[k];\n }\n \n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = sha256;\n } else if (typeof define === 'function' && define.amd) {\n define(function() { return sha256; }); \n } else {\n root.sha256 = sha256;\n }\n})(this, function(exports) {\n\"use strict\";\nexports.__esModule = true;\n// SHA-256 (+ HMAC and PBKDF2) for JavaScript.\n//\n// Written in 2014-2016 by Dmitry Chestnykh.\n// Public domain, no warranty.\n//\n// Functions (accept and return Uint8Arrays):\n//\n// sha256(message) -> hash\n// sha256.hmac(key, message) -> mac\n// sha256.pbkdf2(password, salt, rounds, dkLen) -> dk\n//\n// Classes:\n//\n// new sha256.Hash()\n// new sha256.HMAC(key)\n//\nexports.digestLength = 32;\nexports.blockSize = 64;\n// SHA-256 constants\nvar K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\nfunction hashBlocks(w, v, p, pos, len) {\n var a, b, c, d, e, f, g, h, u, i, j, t1, t2;\n while (len >= 64) {\n a = v[0];\n b = v[1];\n c = v[2];\n d = v[3];\n e = v[4];\n f = v[5];\n g = v[6];\n h = v[7];\n for (i = 0; i < 16; i++) {\n j = pos + i * 4;\n w[i] = (((p[j] & 0xff) << 24) | ((p[j + 1] & 0xff) << 16) |\n ((p[j + 2] & 0xff) << 8) | (p[j + 3] & 0xff));\n }\n for (i = 16; i < 64; i++) {\n u = w[i - 2];\n t1 = (u >>> 17 | u << (32 - 17)) ^ (u >>> 19 | u << (32 - 19)) ^ (u >>> 10);\n u = w[i - 15];\n t2 = (u >>> 7 | u << (32 - 7)) ^ (u >>> 18 | u << (32 - 18)) ^ (u >>> 3);\n w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0);\n }\n for (i = 0; i < 64; i++) {\n t1 = (((((e >>> 6 | e << (32 - 6)) ^ (e >>> 11 | e << (32 - 11)) ^\n (e >>> 25 | e << (32 - 25))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n t2 = (((a >>> 2 | a << (32 - 2)) ^ (a >>> 13 | a << (32 - 13)) ^\n (a >>> 22 | a << (32 - 22))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n v[0] += a;\n v[1] += b;\n v[2] += c;\n v[3] += d;\n v[4] += e;\n v[5] += f;\n v[6] += g;\n v[7] += h;\n pos += 64;\n len -= 64;\n }\n return pos;\n}\n// Hash implements SHA256 hash algorithm.\nvar Hash = /** @class */ (function () {\n function Hash() {\n this.digestLength = exports.digestLength;\n this.blockSize = exports.blockSize;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n this.state = new Int32Array(8); // hash state\n this.temp = new Int32Array(64); // temporary state\n this.buffer = new Uint8Array(128); // buffer for data to hash\n this.bufferLength = 0; // number of bytes in buffer\n this.bytesHashed = 0; // number of total bytes hashed\n this.finished = false; // indicates whether the hash was finalized\n this.reset();\n }\n // Resets hash state making it possible\n // to re-use this instance to hash other data.\n Hash.prototype.reset = function () {\n this.state[0] = 0x6a09e667;\n this.state[1] = 0xbb67ae85;\n this.state[2] = 0x3c6ef372;\n this.state[3] = 0xa54ff53a;\n this.state[4] = 0x510e527f;\n this.state[5] = 0x9b05688c;\n this.state[6] = 0x1f83d9ab;\n this.state[7] = 0x5be0cd19;\n this.bufferLength = 0;\n this.bytesHashed = 0;\n this.finished = false;\n return this;\n };\n // Cleans internal buffers and re-initializes hash state.\n Hash.prototype.clean = function () {\n for (var i = 0; i < this.buffer.length; i++) {\n this.buffer[i] = 0;\n }\n for (var i = 0; i < this.temp.length; i++) {\n this.temp[i] = 0;\n }\n this.reset();\n };\n // Updates hash state with the given data.\n //\n // Optionally, length of the data can be specified to hash\n // fewer bytes than data.length.\n //\n // Throws error when trying to update already finalized hash:\n // instance must be reset to use it again.\n Hash.prototype.update = function (data, dataLength) {\n if (dataLength === void 0) { dataLength = data.length; }\n if (this.finished) {\n throw new Error(\"SHA256: can't update because hash was finished.\");\n }\n var dataPos = 0;\n this.bytesHashed += dataLength;\n if (this.bufferLength > 0) {\n while (this.bufferLength < 64 && dataLength > 0) {\n this.buffer[this.bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this.bufferLength === 64) {\n hashBlocks(this.temp, this.state, this.buffer, 0, 64);\n this.bufferLength = 0;\n }\n }\n if (dataLength >= 64) {\n dataPos = hashBlocks(this.temp, this.state, data, dataPos, dataLength);\n dataLength %= 64;\n }\n while (dataLength > 0) {\n this.buffer[this.bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n };\n // Finalizes hash state and puts hash into out.\n //\n // If hash was already finalized, puts the same value.\n Hash.prototype.finish = function (out) {\n if (!this.finished) {\n var bytesHashed = this.bytesHashed;\n var left = this.bufferLength;\n var bitLenHi = (bytesHashed / 0x20000000) | 0;\n var bitLenLo = bytesHashed << 3;\n var padLength = (bytesHashed % 64 < 56) ? 64 : 128;\n this.buffer[left] = 0x80;\n for (var i = left + 1; i < padLength - 8; i++) {\n this.buffer[i] = 0;\n }\n this.buffer[padLength - 8] = (bitLenHi >>> 24) & 0xff;\n this.buffer[padLength - 7] = (bitLenHi >>> 16) & 0xff;\n this.buffer[padLength - 6] = (bitLenHi >>> 8) & 0xff;\n this.buffer[padLength - 5] = (bitLenHi >>> 0) & 0xff;\n this.buffer[padLength - 4] = (bitLenLo >>> 24) & 0xff;\n this.buffer[padLength - 3] = (bitLenLo >>> 16) & 0xff;\n this.buffer[padLength - 2] = (bitLenLo >>> 8) & 0xff;\n this.buffer[padLength - 1] = (bitLenLo >>> 0) & 0xff;\n hashBlocks(this.temp, this.state, this.buffer, 0, padLength);\n this.finished = true;\n }\n for (var i = 0; i < 8; i++) {\n out[i * 4 + 0] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return this;\n };\n // Returns the final hash digest.\n Hash.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n // Internal function for use in HMAC for optimization.\n Hash.prototype._saveState = function (out) {\n for (var i = 0; i < this.state.length; i++) {\n out[i] = this.state[i];\n }\n };\n // Internal function for use in HMAC for optimization.\n Hash.prototype._restoreState = function (from, bytesHashed) {\n for (var i = 0; i < this.state.length; i++) {\n this.state[i] = from[i];\n }\n this.bytesHashed = bytesHashed;\n this.finished = false;\n this.bufferLength = 0;\n };\n return Hash;\n}());\nexports.Hash = Hash;\n// HMAC implements HMAC-SHA256 message authentication algorithm.\nvar HMAC = /** @class */ (function () {\n function HMAC(key) {\n this.inner = new Hash();\n this.outer = new Hash();\n this.blockSize = this.inner.blockSize;\n this.digestLength = this.inner.digestLength;\n var pad = new Uint8Array(this.blockSize);\n if (key.length > this.blockSize) {\n (new Hash()).update(key).finish(pad).clean();\n }\n else {\n for (var i = 0; i < key.length; i++) {\n pad[i] = key[i];\n }\n }\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36;\n }\n this.inner.update(pad);\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36 ^ 0x5c;\n }\n this.outer.update(pad);\n this.istate = new Uint32Array(8);\n this.ostate = new Uint32Array(8);\n this.inner._saveState(this.istate);\n this.outer._saveState(this.ostate);\n for (var i = 0; i < pad.length; i++) {\n pad[i] = 0;\n }\n }\n // Returns HMAC state to the state initialized with key\n // to make it possible to run HMAC over the other data with the same\n // key without creating a new instance.\n HMAC.prototype.reset = function () {\n this.inner._restoreState(this.istate, this.inner.blockSize);\n this.outer._restoreState(this.ostate, this.outer.blockSize);\n return this;\n };\n // Cleans HMAC state.\n HMAC.prototype.clean = function () {\n for (var i = 0; i < this.istate.length; i++) {\n this.ostate[i] = this.istate[i] = 0;\n }\n this.inner.clean();\n this.outer.clean();\n };\n // Updates state with provided data.\n HMAC.prototype.update = function (data) {\n this.inner.update(data);\n return this;\n };\n // Finalizes HMAC and puts the result in out.\n HMAC.prototype.finish = function (out) {\n if (this.outer.finished) {\n this.outer.finish(out);\n }\n else {\n this.inner.finish(out);\n this.outer.update(out, this.digestLength).finish(out);\n }\n return this;\n };\n // Returns message authentication code.\n HMAC.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n return HMAC;\n}());\nexports.HMAC = HMAC;\n// Returns SHA256 hash of data.\nfunction hash(data) {\n var h = (new Hash()).update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hash = hash;\n// Function hash is both available as module.hash and as default export.\nexports[\"default\"] = hash;\n// Returns HMAC-SHA256 of data under the key.\nfunction hmac(key, data) {\n var h = (new HMAC(key)).update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hmac = hmac;\n// Fills hkdf buffer like this:\n// T(1) = HMAC-Hash(PRK, T(0) | info | 0x01)\nfunction fillBuffer(buffer, hmac, info, counter) {\n // Counter is a byte value: check if it overflowed.\n var num = counter[0];\n if (num === 0) {\n throw new Error(\"hkdf: cannot expand more\");\n }\n // Prepare HMAC instance for new data with old key.\n hmac.reset();\n // Hash in previous output if it was generated\n // (i.e. counter is greater than 1).\n if (num > 1) {\n hmac.update(buffer);\n }\n // Hash in info if it exists.\n if (info) {\n hmac.update(info);\n }\n // Hash in the counter.\n hmac.update(counter);\n // Output result to buffer and clean HMAC instance.\n hmac.finish(buffer);\n // Increment counter inside typed array, this works properly.\n counter[0]++;\n}\nvar hkdfSalt = new Uint8Array(exports.digestLength); // Filled with zeroes.\nfunction hkdf(key, salt, info, length) {\n if (salt === void 0) { salt = hkdfSalt; }\n if (length === void 0) { length = 32; }\n var counter = new Uint8Array([1]);\n // HKDF-Extract uses salt as HMAC key, and key as data.\n var okm = hmac(salt, key);\n // Initialize HMAC for expanding with extracted key.\n // Ensure no collisions with `hmac` function.\n var hmac_ = new HMAC(okm);\n // Allocate buffer.\n var buffer = new Uint8Array(hmac_.digestLength);\n var bufpos = buffer.length;\n var out = new Uint8Array(length);\n for (var i = 0; i < length; i++) {\n if (bufpos === buffer.length) {\n fillBuffer(buffer, hmac_, info, counter);\n bufpos = 0;\n }\n out[i] = buffer[bufpos++];\n }\n hmac_.clean();\n buffer.fill(0);\n counter.fill(0);\n return out;\n}\nexports.hkdf = hkdf;\n// Derives a key from password and salt using PBKDF2-HMAC-SHA256\n// with the given number of iterations.\n//\n// The number of bytes returned is equal to dkLen.\n//\n// (For better security, avoid dkLen greater than hash length - 32 bytes).\nfunction pbkdf2(password, salt, iterations, dkLen) {\n var prf = new HMAC(password);\n var len = prf.digestLength;\n var ctr = new Uint8Array(4);\n var t = new Uint8Array(len);\n var u = new Uint8Array(len);\n var dk = new Uint8Array(dkLen);\n for (var i = 0; i * len < dkLen; i++) {\n var c = i + 1;\n ctr[0] = (c >>> 24) & 0xff;\n ctr[1] = (c >>> 16) & 0xff;\n ctr[2] = (c >>> 8) & 0xff;\n ctr[3] = (c >>> 0) & 0xff;\n prf.reset();\n prf.update(salt);\n prf.update(ctr);\n prf.finish(u);\n for (var j = 0; j < len; j++) {\n t[j] = u[j];\n }\n for (var j = 2; j <= iterations; j++) {\n prf.reset();\n prf.update(u).finish(u);\n for (var k = 0; k < len; k++) {\n t[k] ^= u[k];\n }\n }\n for (var j = 0; j < len && i * len + j < dkLen; j++) {\n dk[i * len + j] = t[j];\n }\n }\n for (var i = 0; i < len; i++) {\n t[i] = u[i] = 0;\n }\n for (var i = 0; i < 4; i++) {\n ctr[i] = 0;\n }\n prf.clean();\n return dk;\n}\nexports.pbkdf2 = pbkdf2;\n});\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { testData } from './dataframe-utils';\nimport { changeOptionsSaveLayout, filterAsync, loadLayout, selectFilterChangeCurrent, testViewerInternal } from './test-viewer-utils';\nconst STANDART_TIMEOUT = 30000;\nconst BENCHMARK_TIMEOUT = 10800000;\nconst stdLog = console.log.bind(console);\nconst stdInfo = console.info.bind(console);\nconst stdWarn = console.warn.bind(console);\nconst stdError = console.error.bind(console);\nexport const tests = {};\nconst autoTestsCatName = 'Auto Tests';\nconst demoCatName = 'Demo';\nconst detectorsCatName = 'Detectors';\nconst coreCatName = 'Core';\nconst wasRegistered = {};\nexport let currentCategory;\nexport var assure;\n(function (assure) {\n function notNull(value, name) {\n if (value == null)\n throw new Error(`${name == null ? 'Value' : name} not defined`);\n }\n assure.notNull = notNull;\n})(assure || (assure = {}));\nexport class TestContext {\n constructor(catchUnhandled, report, returnOnFail) {\n this.catchUnhandled = true;\n this.report = false;\n this.returnOnFail = false;\n this.closeAll = true;\n if (catchUnhandled !== undefined)\n this.catchUnhandled = catchUnhandled;\n if (report !== undefined)\n this.report = report;\n if (returnOnFail !== undefined)\n this.returnOnFail = returnOnFail;\n }\n ;\n}\nexport class Test {\n constructor(category, name, test, options) {\n this.category = category;\n this.name = name;\n options ?? (options = {});\n options.timeout ?? (options.timeout = STANDART_TIMEOUT);\n this.options = options;\n this.test = async () => {\n return new Promise(async (resolve, reject) => {\n let result = '';\n try {\n if (DG.Test.isInDebug)\n debugger;\n let res = await test();\n try {\n result = res?.toString() ?? '';\n }\n catch (e) {\n result = 'Can\\'t convert test\\'s result to string';\n console.error(`Can\\'t convert test\\'s result to string in the ${this.category}:${this.name} test`);\n }\n }\n catch (e) {\n reject(e);\n }\n resolve(result);\n });\n };\n }\n}\nexport class Category {\n}\nexport class NodeTestExecutionOptions {\n}\nexport class TestExecutionOptions {\n}\nexport async function testEvent(event, handler, trigger, ms = 0, reason = `timeout`) {\n return new Promise((resolve, reject) => {\n const sub = event.subscribe((args) => {\n try {\n handler(args);\n resolve('OK');\n }\n catch (e) {\n reject(e);\n }\n finally {\n sub.unsubscribe();\n clearTimeout(timeout);\n }\n });\n const timeout = setTimeout(() => {\n sub.unsubscribe();\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(reason);\n }, ms);\n trigger();\n });\n}\nexport async function testEventAsync(event, handler, trigger, ms = 0, reason = `timeout`) {\n return new Promise((resolve, reject) => {\n const sub = event.subscribe((args) => {\n handler(args).then(() => {\n resolve('OK');\n }).catch((e) => {\n reject(e);\n }).finally(() => {\n sub.unsubscribe();\n clearTimeout(timeout);\n });\n });\n const timeout = setTimeout(() => {\n sub.unsubscribe();\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(reason);\n }, ms);\n trigger();\n });\n}\nexport function test(name, test, options) {\n if (tests[currentCategory] == undefined)\n tests[currentCategory] = {};\n if (tests[currentCategory].tests == undefined)\n tests[currentCategory].tests = [];\n tests[currentCategory].tests.push(new Test(currentCategory, name, test, options));\n}\n/* Tests two objects for equality, throws an exception if they are not equal. */\nexport function expect(actual, expected = true, error) {\n if (error)\n error = `${error}, `;\n else\n error = '';\n if (actual !== expected)\n throw new Error(`${error}Expected \"${expected}\", got \"${actual}\"`);\n}\nexport function expectFloat(actual, expected, tolerance = 0.001, error) {\n if ((actual === Number.POSITIVE_INFINITY && expected === Number.POSITIVE_INFINITY) ||\n (actual === Number.NEGATIVE_INFINITY && expected === Number.NEGATIVE_INFINITY) ||\n (actual === Number.NaN && expected === Number.NaN) || (isNaN(actual) && isNaN(expected)))\n return;\n const areEqual = Math.abs(actual - expected) < tolerance;\n expect(areEqual, true, `${error ?? ''} (tolerance = ${tolerance}; a = ${actual}, e = ${expected})`);\n if (!areEqual)\n throw new Error(`Expected ${expected}, got ${actual} (tolerance = ${tolerance})`);\n}\n/** grok_connect ships a `bigint` column as `int` while every value in it fits int32, and upgrades\n * it back on the first chunk that overflows (`int8AsInt32`, streaming queries only — see\n * core/docs/features/connector-streaming-optimization/RESULTS_P1.md WO-1.5). The narrowing is\n * lossless, so a test that declares `bigint` must accept `int` for small values. */\nfunction isLosslessNarrowing(expected, actual) {\n return expected === DG.TYPE.BIG_INT && actual === DG.TYPE.INT;\n}\nexport function expectTable(actual, expected, error) {\n const expectedRowCount = expected.rowCount;\n const actualRowCount = actual.rowCount;\n expect(actualRowCount, expectedRowCount, `${error ?? ''}, row count`);\n for (const column of expected.columns) {\n const actualColumn = actual.columns.byName(column.name);\n if (actualColumn == null)\n throw new Error(`Column ${column.name} not found`);\n const narrowed = isLosslessNarrowing(column.type, actualColumn.type);\n if (actualColumn.type != column.type && !narrowed)\n throw new Error(`Column ${column.name} type expected ${column.type} got ${actualColumn.type}`);\n for (let i = 0; i < expectedRowCount; i++) {\n const value = column.get(i);\n const actualValue = actualColumn.get(i);\n if (column.type == DG.TYPE.FLOAT)\n expectFloat(actualValue, value, 0.0001, error);\n else if (column.type == DG.TYPE.DATE_TIME)\n expect(actualValue.isSame(value), true, error);\n else if (narrowed)\n // bigint reads back as a string, int as a number — compare the value, not the encoding.\n expect(String(actualValue), String(value), error);\n else\n expect(actualValue, value, error);\n }\n }\n}\nexport function expectObject(actual, expected) {\n for (const [expectedKey, expectedValue] of Object.entries(expected)) {\n if (!actual.hasOwnProperty(expectedKey))\n throw new Error(`Expected property \"${expectedKey}\" not found`);\n const actualValue = actual[expectedKey];\n if (actualValue instanceof Array && expectedValue instanceof Array)\n expectArray(actualValue, expectedValue);\n else if (actualValue instanceof Object && expectedValue instanceof Object)\n expectObject(actualValue, expectedValue);\n else if (Number.isFinite(actualValue) && Number.isFinite(expectedValue))\n expectFloat(actualValue, expectedValue);\n else if (actualValue != expectedValue)\n throw new Error(`Expected (${expectedValue}) for key '${expectedKey}', got (${actualValue})`);\n }\n}\nexport function expectArray(actual, expected) {\n const actualLength = actual.length;\n const expectedLength = expected.length;\n if (actualLength != expectedLength) {\n throw new Error(`Arrays are of different length: actual array length is ${actualLength} ` +\n `and expected array length is ${expectedLength}`);\n }\n for (let i = 0; i < actualLength; i++) {\n if (actual[i] instanceof Array && expected[i] instanceof Array)\n expectArray(actual[i], expected[i]);\n else if (actual[i] instanceof Object && expected[i] instanceof Object)\n expectObject(actual[i], expected[i]);\n else if (actual[i] != expected[i])\n throw new Error(`Expected ${expected[i]} at position ${i}, got ${actual[i]}`);\n }\n}\n/* Defines a test suite. */\nexport function category(category, tests_, options) {\n currentCategory = category;\n tests_();\n if (tests[currentCategory]) {\n tests[currentCategory].clear = options?.clear ?? true;\n tests[currentCategory].timeout = options?.timeout;\n tests[currentCategory].benchmarks = options?.benchmarks;\n tests[currentCategory].stressTests = options?.stressTests;\n tests[currentCategory].owner = options?.owner;\n tests[currentCategory].node = options?.node;\n }\n}\n/* Defines a function to be executed before the tests in this category are executed. */\nexport function before(before) {\n if (tests[currentCategory] == undefined)\n tests[currentCategory] = {};\n tests[currentCategory].before = before;\n}\n/* Defines a function to be executed after the tests in this category are executed. */\nexport function after(after) {\n if (tests[currentCategory] == undefined)\n tests[currentCategory] = {};\n tests[currentCategory].after = after;\n}\nfunction addNamespace(s, f) {\n return s.replace(new RegExp(f.name, 'gi'), f.nqName);\n}\n/** Whether a test matches the node/browser split requested by the run options. */\nfunction matchesNodeTarget(t, cat, options) {\n const isNode = t.options?.node ?? cat.node ?? false;\n return options.nodeOnly ? isNode : options.excludeNodeTests ? !isNode : true;\n}\nexport async function initAutoTests(package_, module) {\n const packageId = package_.id;\n if (wasRegistered[packageId])\n return;\n const moduleTests = module ? module.tests : tests;\n if (package_.name === 'DevTools' || (!!module && module._package.name === 'DevTools')) {\n for (const f of window.dartTests) {\n const arr = f.name.split(/\\s*\\|\\s*!/g);\n let name = arr.pop() ?? f.name;\n let cat = arr.length ? coreCatName + ': ' + arr.join(': ') : coreCatName;\n let fullName = name.split(' | ');\n name = fullName[fullName.length - 1];\n fullName.unshift(cat);\n fullName.pop();\n cat = fullName.join(': ');\n if (moduleTests[cat] === undefined)\n moduleTests[cat] = { tests: [], clear: true };\n moduleTests[cat].tests.push(new Test(cat, name, f.test, { isAggregated: false, timeout: f.options?.timeout ?? STANDART_TIMEOUT, skipReason: f.options?.skipReason, owner: f.options?.owner, benchmark: f.options?.benchmark ?? false }));\n }\n }\n const moduleAutoTests = [];\n const moduleDemo = [];\n const moduleDetectors = [];\n const packFunctions = await grok.dapi.functions.filter(`package.id = \"${packageId}\"`).list();\n const reg = new RegExp(/skip:\\s*([^,\\s]+)|wait:\\s*(\\d+)|cat:\\s*([^,\\s]+)|timeout:\\s*(\\d+)/g);\n for (const f of packFunctions) {\n const tests = f.options['test'];\n const demo = f.options['demoPath'];\n if ((tests && Array.isArray(tests) && tests.length)) {\n for (let i = 0; i < tests.length; i++) {\n const res = tests[i].matchAll(reg);\n const map = {};\n Array.from(res).forEach((arr) => {\n if (arr[0].startsWith('skip'))\n map['skip'] = arr[1];\n else if (arr[0].startsWith('wait'))\n map['wait'] = parseInt(arr[2]);\n else if (arr[0].startsWith('cat'))\n map['cat'] = arr[3];\n else if (arr[0].startsWith('timeout'))\n map['timeout'] = parseInt(arr[4]);\n });\n const test = new Test(map.cat ?? autoTestsCatName, tests.length === 1 ? f.name : `${f.name} ${i + 1}`, async () => {\n const res = await grok.functions.eval(addNamespace(tests[i], f));\n if (map.wait)\n await delay(map.wait);\n // eslint-disable-next-line no-throw-literal\n if (typeof res === 'boolean' && !res)\n throw `Failed: ${tests[i]}, expected true, got ${res}`;\n }, { skipReason: map.skip, timeout: DG.Test.isInBenchmark ? map.benchmarkTimeout ?? BENCHMARK_TIMEOUT : map.timeout ?? STANDART_TIMEOUT,\n // Query tests evaluate server-side (expressions like ExpectTable(Query(), OpenFile(...))\n // resolve through core functions available in the Node runtime), so they can run headless;\n // tests of client JS functions need the browser-loaded package.\n node: f instanceof DG.DataQuery });\n if (map.cat) {\n const cat = map.cat;\n if (moduleTests[cat] === undefined)\n moduleTests[cat] = { tests: [], clear: true };\n // only before/after can be defined in ts files tests under the category\n if (!moduleTests[cat].tests)\n moduleTests[cat].tests = [];\n moduleTests[cat].tests.push(test);\n }\n else\n moduleAutoTests.push(test);\n }\n }\n if (demo) {\n const wait = f.options['demoWait'] ? parseInt(f.options['demoWait']) : undefined;\n const test = new Test(demoCatName, f.friendlyName, async () => {\n await delay(300);\n grok.shell.clearLastError();\n await f.apply();\n await delay(wait ? wait : 2000);\n const unhandled = await grok.shell.lastError;\n if (unhandled)\n throw new Error(unhandled);\n }, { skipReason: f.options['demoSkip'] });\n moduleDemo.push(test);\n }\n if (f.hasTag('semTypeDetector')) {\n let detectorsTestData = testData;\n if (f.options['testData']) {\n detectorsTestData = await grok.data.files.openTable(`System:AppData/${package_.nqName}/${f.options['testData']}`);\n }\n const test = new Test(detectorsCatName, f.friendlyName, async () => {\n const arr = [];\n console.log(`System:AppData/${package_.nqName}/${f.options['testData']}`);\n for (const col of detectorsTestData.clone().columns) {\n const res = await f.apply([col]);\n arr.push(res || col.semType);\n }\n const resArr = arr.filter((i) => i);\n expect(resArr.length, 1);\n if (f.options['testDataColumnName'])\n expect(resArr[0], f.options['testDataColumnName']);\n }, { skipReason: f.options['skipTest'] });\n moduleDetectors.push(test);\n }\n }\n wasRegistered[packageId] = true;\n if (moduleAutoTests.length > 0)\n moduleTests[autoTestsCatName] = { tests: moduleAutoTests, clear: true };\n if (moduleDemo.length > 0)\n moduleTests[demoCatName] = { tests: moduleDemo, clear: true };\n if (moduleDetectors.length > 0)\n moduleTests[detectorsCatName] = { tests: moduleDetectors, clear: false };\n}\nfunction redefineConsole() {\n const logs = [];\n console.log = (...args) => {\n logs.push(...args);\n stdLog(...args);\n };\n console.info = (...args) => {\n logs.push(...args);\n stdInfo(...args);\n };\n console.warn = (...args) => {\n logs.push(...args);\n stdWarn(...args);\n };\n console.error = (...args) => {\n logs.push(...args);\n stdError(...args);\n };\n return logs;\n}\nfunction resetConsole() {\n console.log = stdLog;\n console.info = stdInfo;\n console.warn = stdWarn;\n console.error = stdError;\n}\nexport async function runTests(options) {\n var _a;\n const package_ = options?.nodeOptions ? options.nodeOptions.package : grok.functions.getCurrentCall().func.package;\n if (!package_)\n throw new Error('Can\\'t run tests outside of the package');\n const match = package_.packageOwner?.match(/<([^>]*)>/);\n const packageOwner = match ? match[1] : '';\n if (package_ != undefined)\n await initAutoTests(package_);\n const results = [];\n console.log(`Running tests...`);\n console.log(options);\n options ?? (options = {});\n (_a = options).testContext ?? (_a.testContext = new TestContext());\n grok.shell.clearLastError();\n const logs = redefineConsole();\n await invokeTests(tests, options);\n for (let r of results) {\n r.result = r.result.toString().replace(/\"/g, '\\'');\n if (r.logs != undefined)\n r.logs = r.logs.toString().replace(/\"/g, '\\'');\n }\n return results;\n async function invokeCategoryMethod(method, category) {\n let invokationResult = undefined;\n try {\n if (method !== undefined) {\n await timeout(async () => {\n await method();\n }, 100000, `before ${category}: timeout error`);\n }\n }\n catch (x) {\n invokationResult = await getResult(x);\n }\n return invokationResult;\n }\n async function invokeTestsInCategory(category, options, isTargetCategory) {\n let t = (category.tests ?? []).filter((e) => matchesNodeTarget(e, category, options));\n const res = [];\n // let memoryUsageBefore = (window?.performance as any)?.memory?.usedJSHeapSize;\n const widgetsBefore = getWidgetsCountSafe();\n if (category.clear) {\n let skippingTests = isTargetCategory && options.skipToTest != undefined;\n for (let i = 0; i < t.length; i++) {\n if (t[i].options) {\n if (t[i].options?.benchmark === undefined) {\n if (!t[i].options)\n t[i].options = {};\n t[i].options.benchmark = category.benchmarks ?? false;\n }\n }\n let test = t[i];\n if (options.test)\n if (options.test.toLowerCase() !== test.name.toLowerCase())\n continue;\n if (skippingTests) {\n if (options?.skipToTest != undefined && test.name.toLowerCase().trim() === options?.skipToTest.toLowerCase().trim()) {\n // Found the target test, stop skipping after this one\n skippingTests = false;\n }\n else\n continue;\n }\n if (test?.options) {\n test.options.owner = t[i].options?.owner ?? category?.owner ?? packageOwner ?? '';\n }\n let testRun = await execTest(test, options?.test, logs, DG.Test.isInBenchmark ? t[i].options?.benchmarkTimeout ?? BENCHMARK_TIMEOUT : t[i].options?.timeout ?? STANDART_TIMEOUT, package_.name, options.verbose);\n if (!test.options?.skipReason && window.gc)\n await window.gc();\n if (testRun) {\n res.push({ ...testRun, widgetsDifference: getWidgetsCountSafe() - widgetsBefore });\n // Return early if returnOnFail is set and test failed (but ignore failure for the skipToTest test itself)\n if (options.returnOnFail && options.skipToTest !== test.name && !testRun.success && !testRun.skipped)\n return res;\n }\n // res.push({ ...testRun, memoryDelta: (window?.performance as any)?.memory?.usedJSHeapSize - memoryUsageBefore, widgetsDelta: getWidgetsCountSafe() - widgetsBefore });\n if (!options.nodeOptions && options.testContext?.closeAll !== false) {\n grok.shell.closeAll();\n DG.Balloon.closeAll();\n }\n }\n }\n else {\n let skippingTests = isTargetCategory && options.skipToTest != undefined;\n for (let i = 0; i < t.length; i++) {\n let test = t[i];\n if (options.test)\n if (options.test.toLowerCase() !== test.name.toLowerCase())\n continue;\n if (skippingTests) {\n if (options?.skipToTest != undefined && test.name.toLowerCase().trim() === options?.skipToTest.toLowerCase().trim()) {\n // Found the target test, stop skipping after this one\n skippingTests = false;\n }\n continue; // Skip this test (including the target)\n }\n if (test?.options) {\n test.options.owner = t[i].options?.owner ?? category?.owner ?? packageOwner ?? '';\n }\n let testRun = await execTest(test, options?.test, logs, DG.Test.isInBenchmark ? t[i].options?.benchmarkTimeout ?? BENCHMARK_TIMEOUT : t[i].options?.timeout, package_.name, options.verbose);\n if (!test.options?.skipReason && window.gc)\n await window.gc();\n if (testRun) {\n res.push({ ...testRun, widgetsDifference: getWidgetsCountSafe() - widgetsBefore });\n // Return early if returnOnFail is set and test failed (but ignore failure for the skipToTest test itself)\n if (options.returnOnFail && options.skipToTest !== test.name && !testRun.success && !testRun.skipped)\n return res;\n }\n // res.push({ ...testRun, memoryDelta: (window?.performance as any)?.memory?.usedJSHeapSize - memoryUsageBefore, widgetsDifference: getWidgetsCountSafe() - widgetsBefore });\n }\n }\n return res;\n }\n function getWidgetsCountSafe() {\n if (typeof process !== 'undefined')\n return 0;\n let length = -1;\n try {\n length = DG.Widget.getAll().length;\n }\n catch (e) {\n console.warn(e.message ?? e);\n }\n return length;\n }\n async function invokeTests(categoriesToInvoke, options) {\n try {\n let skippingCategories = options?.skipToCategory != undefined;\n let isTargetCategory = false;\n for (const [key, value] of Object.entries(categoriesToInvoke)) {\n if (options.exclude?.some((c) => key.startsWith(c)))\n continue;\n if (options?.category != null && !key.toLowerCase().startsWith(options?.category.toLowerCase().trim()))\n continue;\n if (skippingCategories) {\n if (isTargetCategory)\n skippingCategories = false;\n else {\n if (options?.skipToCategory != null && key.toLowerCase().trim() === options?.skipToCategory.toLowerCase().trim()) {\n isTargetCategory = true;\n }\n else {\n // Haven't found the target category yet, keep skipping\n continue;\n }\n }\n }\n let t = (value.tests ?? []).filter((e) => matchesNodeTarget(e, value, options));\n // Node/browser split: if no tests of this category belong to the requested target,\n // skip it entirely — including before()/after().\n if ((options.nodeOnly || options.excludeNodeTests) && t.length === 0)\n continue;\n const skipped = value.tests == undefined ? undefined : t.every((e) => e.options?.skipReason\n || (options?.test != null && options.test.toLowerCase() !== e.name.toLowerCase()));\n if (!skipped) {\n const skippedCount = t.filter((e) => e.options?.skipReason || (options?.test != null && options.test.toLowerCase() !== e.name.toLowerCase())).length;\n stdLog(`Package testing: Started {{${key}}}${skippedCount > 0 ? ` skipped {{${skippedCount}}}` : ''}`);\n value.beforeStatus = await invokeCategoryMethod(value.before, key);\n }\n if (options.stressTest) {\n t = t.filter((e) => e.options?.stressTest);\n t = shuffle(t);\n }\n if ((options.tags?.length ?? 0) > 0) {\n t = t.filter((e) => e.options?.tags?.some(tag => (options?.tags ?? []).includes(tag)));\n }\n let res;\n if (value.beforeStatus) {\n res = Array.from(t.map((testElem) => {\n return {\n date: new Date().toISOString(),\n category: key,\n name: testElem.name,\n success: false,\n result: 'before() failed',\n ms: 0,\n skipped: false,\n logs: '',\n owner: packageOwner,\n package: package_.name,\n widgetsDifference: 0,\n flaking: DG.Test.isReproducing\n };\n }));\n res.forEach(async (test) => await grok.shell.reportTest('package', test));\n }\n else\n res = await invokeTestsInCategory(value, options, skippingCategories);\n const data = res.filter((d) => d.result != 'skipped');\n if (!skipped)\n value.afterStatus = await invokeCategoryMethod(value.after, key);\n // Clear after category\n // grok.shell.closeAll();\n // DG.Balloon.closeAll();\n if (value.afterStatus) {\n stdLog(`Package testing: Category after() {{${key}}} failed`);\n stdLog(`Package testing: Result for {{${key}}} after: ${value.afterStatus}`);\n data.push({\n date: new Date().toISOString(),\n category: key,\n name: 'after',\n success: false,\n result: value.afterStatus,\n ms: 0,\n skipped: false,\n logs: '',\n owner: packageOwner,\n package: package_.name,\n widgetsDifference: 0,\n flaking: DG.Test.isReproducing\n });\n }\n if (value.beforeStatus) {\n stdLog(`Package testing: Category before() {{${key}}} failed`);\n stdLog(`Package testing: Result for {{${key}}} before: ${value.beforeStatus}`);\n data.push({\n date: new Date().toISOString(),\n category: key,\n name: 'before',\n success: false,\n result: value.beforeStatus,\n ms: 0,\n skipped: false,\n logs: '',\n owner: packageOwner,\n package: package_.name,\n widgetsDifference: 0,\n flaking: DG.Test.isReproducing\n });\n }\n results.push(...data);\n // If returnOnFail is set and a test failed (other than skipToTest), stop processing more categories\n if (options.returnOnFail && data.some((d) => !d.success && !d.skipped && d.name !== options.skipToTest))\n break;\n }\n }\n finally {\n resetConsole();\n }\n if (options.testContext.catchUnhandled && (!DG.Test.isInBenchmark)) {\n await delay(1000);\n const error = await grok.shell.lastError;\n if (error != undefined) {\n const params = {\n logs: '',\n date: new Date().toISOString(),\n category: 'Unhandled exceptions',\n name: 'Exception',\n result: error ?? '',\n success: !error,\n ms: 0,\n skipped: false,\n owner: packageOwner ?? '',\n 'package': package_.name,\n widgetsDifference: 0\n };\n stdLog(`Package testing: Unhandled Exception: ${error}`);\n results.push({ ...params, 'flaking': DG.Test.isReproducing && !error });\n params.package = package_.name;\n await grok.shell.reportTest('package', params);\n }\n }\n }\n}\nasync function getResult(x) {\n return `${x.toString()}\\n${x.stack ? (await DG.Logger.translateStackTrace(x.stack)) : ''}`;\n}\nasync function execTest(t, predicate, logs, testTimeout, packageName, verbose) {\n logs.length = 0;\n let r;\n let type = 'package';\n const filter = predicate != undefined && (t.name.toLowerCase() !== predicate.toLowerCase());\n let skip = t.options?.skipReason || filter;\n let skipReason = filter ? 'skipped' : t.options?.skipReason;\n if (DG.Test.isInBenchmark && !t.options?.benchmark) {\n stdLog(`Package testing: Skipped {{${t.category}}} {{${t.name}}} doesnt available in benchmark mode`);\n return undefined;\n }\n if (skip && !DG.Test.isInBenchmark)\n stdLog(`Package testing: Skipped {{${t.category}}} {{${t.name}}}`);\n if (!skip)\n stdLog(`Package testing: Started {{${t.category}}} {{${t.name}}}`);\n const start = Date.now();\n const startDate = new Date(start).toISOString();\n try {\n if (skip)\n r = { name: t.name, owner: t.options?.owner ?? '', category: t.category, logs: '', date: startDate, success: true, result: skipReason, ms: 0, skipped: true, package: packageName ?? '', flaking: DG.Test.isReproducing };\n else {\n let timeout_ = testTimeout ?? STANDART_TIMEOUT;\n if (DG.Test.isProfiling)\n console.profile(`${t.category}: ${t.name}`);\n r = { name: t.name, owner: t.options?.owner ?? '', category: t.category, logs: '', date: startDate, success: true, result: (await timeout(t.test, timeout_)).toString() ?? 'OK', ms: 0, skipped: false, package: packageName ?? '', flaking: DG.Test.isReproducing };\n if (DG.Test.isProfiling) {\n console.profileEnd(`${t.category}: ${t.name}`);\n grok.shell.info(`Profiling of ${t.category}: ${t.name} finished \\n Please ensure that you have opened DevTools (F12) / Performance panel before test starts.`);\n }\n }\n }\n catch (x) {\n stdError(x);\n r = { name: t.name, owner: t.options?.owner ?? '', category: t.category, logs: '', date: startDate, success: false, result: await getResult(x), ms: 0, skipped: false, package: packageName ?? '', flaking: false };\n }\n if (t.options?.isAggregated && r.result.constructor === DG.DataFrame) {\n const col = r.result.col('success');\n if (col)\n r.success = col.stats.sum === col.length;\n if (!verbose) {\n const df = r.result;\n df.columns.remove('stack');\n df.rows.removeWhere((r) => r.get('success'));\n r.result = df;\n }\n r.result = r.result.toCsv();\n }\n r.logs = logs.join('\\n');\n r.ms = Date.now() - start;\n if (!skip)\n stdLog(`Package testing: Finished {{${t.category}}} {{${t.name}}} with {{${r.success ? 'success' : 'error'}}} for ${r.ms} ms`);\n if (!r.success) {\n stdLog(`Package testing: Result for {{${t.category}}} {{${t.name}}}: ${r.result}`);\n }\n r.category = t.category;\n r.name = t.name;\n r.owner = t.options?.owner ?? '';\n if (!filter) {\n let params = {\n 'success': r.success, 'result': r.result, 'ms': r.ms, 'date': r.date,\n 'skipped': r.skipped, 'category': t.category, 'name': t.name, 'logs': r.logs, 'owner': r.owner,\n 'flaking': DG.Test.isReproducing && r.success,\n 'package': r.package\n };\n if (r.result.constructor == Object) {\n const res = Object.keys(r.result).reduce((acc, k) => ({ ...acc, ['result.' + k]: r.result[k] }), {});\n params = { ...params, ...res };\n }\n if (params.result instanceof DG.DataFrame)\n params.result = JSON.stringify(params.result?.toJson()) || '';\n await grok.shell.reportTest(type, params);\n }\n return r;\n}\nexport function shuffle(array) {\n const newArr = array.slice();\n newArr.sort(() => Math.random() - 0.5);\n return newArr;\n}\n/* Waits [ms] milliseconds */\nexport async function delay(ms) {\n await new Promise((r) => setTimeout(r, ms));\n}\nexport async function awaitCheck(checkHandler, error = 'Timeout exceeded', wait = 500, interval = 50) {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n clearInterval(intervalId);\n reject(new Error(error));\n }, wait);\n // @ts-ignore\n const intervalId = setInterval(() => {\n if (checkHandler()) {\n clearInterval(intervalId);\n resolve(null);\n }\n }, interval);\n });\n}\n// Returns test execution result or an error in case of timeout\nexport async function timeout(func, testTimeout, timeoutReason = 'EXECUTION TIMEOUT') {\n let timeout = null;\n const timeoutPromise = new Promise((_, reject) => {\n timeout = setTimeout(() => {\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(timeoutReason);\n }, testTimeout);\n });\n try {\n return await Promise.race([func(), timeoutPromise]);\n }\n finally {\n if (timeout)\n clearTimeout(timeout);\n }\n}\nexport function isDialogPresent(dialogTitle) {\n const dialogs = DG.Dialog.getOpenDialogs();\n for (let i = 0; i < dialogs.length; i++) {\n if (dialogs[i].title == dialogTitle)\n return true;\n }\n return false;\n}\n/** Expects an asynchronous {@link action} to throw an exception. Use {@link check} to perform\n * deeper inspection of the exception if necessary.\n * @param {function(): Promise<void>} action\n * @param {function(any): boolean} check\n * @return {Promise<void>}\n */\nexport async function expectExceptionAsync(action, check) {\n let caught = false;\n let checked = false;\n try {\n await action();\n }\n catch (e) {\n caught = true;\n checked = !check || check(e);\n }\n finally {\n if (!caught)\n throw new Error('An exception is expected but not thrown');\n if (!checked)\n throw new Error('An expected exception is thrown, but it does not satisfy the condition');\n }\n}\nconst catDF = DG.DataFrame.fromColumns([DG.Column.fromStrings('col', ['val1', 'val2', 'val3'])]);\n/**\n * Universal test for viewers. It search viewers in DOM by tags: canvas, svg, img, input, h1, a\n * @param {string} v Viewer name\n * @param {_DG.DataFrame} df Dataframe to use. Should have at least 3 rows\n * @param {boolean} options.detectSemanticTypes Specify whether to detect semantic types or not\n * @param {boolean} options.readOnly If set to true, the dataframe will not be modified during the test\n * @param {boolean} options.arbitraryDfTest If set to false, test on arbitrary dataframe\n * (one categorical column) will not be performed\n * @param {object} options List of options (optional)\n * @return {Promise<void>} The test is considered successful if it completes without errors\n */\nexport async function testViewer(v, df, options) {\n const packageName = options?.packageName ?? '';\n if (options?.detectSemanticTypes)\n await grok.data.detectSemanticTypes(df);\n const tv = grok.shell.addTableView(df);\n try {\n //1. Open, do nothing and close\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded);\n //in case viewer with async rendering - wait for render to complete\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, undefined, options.awaitViewer);\n //2. Open viewer, run selection, filter, etc. and close\n if (!options?.readOnly) {\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, selectFilterChangeCurrent);\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, selectFilterChangeCurrent, options.awaitViewer);\n }\n //2. Open viewer, change options, save layout and close\n let propsAndLayout = null;\n propsAndLayout = await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, changeOptionsSaveLayout);\n if (options?.awaitViewer)\n propsAndLayout = await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, changeOptionsSaveLayout, options.awaitViewer);\n //3. Load layout\n await testViewerInternal(tv, v, packageName, grok.events.onViewLayoutApplied, loadLayout, undefined, propsAndLayout?.layout, { savedProps: propsAndLayout?.savedProps });\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewLayoutApplied, loadLayout, options.awaitViewer, propsAndLayout?.layout, { savedProps: propsAndLayout?.savedProps });\n //4. Open viewer on arbitary dataset\n if (options?.arbitraryDfTest !== false) {\n tv.dataFrame = catDF;\n await delay(50);\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded);\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, undefined, options.awaitViewer);\n }\n //5. Call postponed filtering\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, filterAsync);\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, filterAsync, options.awaitViewer);\n }\n finally {\n // closeAll() is handling by common test workflow\n // grok.shell.closeAll();\n // DG.Balloon.closeAll();\n }\n}\n//# sourceMappingURL=test.js.map","import * as sha256 from 'fast-sha256';\n/**\n * For columns of string type. Checks whether column contains empty values and removes corresponding rows in case user selects to remove.\n *\n */\nexport function removeEmptyStringRows(table, col) {\n const cats = col.categories;\n const emptyRawInd = cats.map((val, ind) => !val ? ind : null).filter((it) => it !== null);\n const rawData = [...col.getRawData()];\n const emptyRawsIndexes = [];\n let removedRowsCounter = 0;\n for (let i = 0; i < table.rowCount; i++) {\n if (emptyRawInd.includes(rawData[i])) {\n table.rows.removeAt(i - removedRowsCounter);\n emptyRawsIndexes.push(i);\n removedRowsCounter += 1;\n }\n }\n return emptyRawsIndexes;\n}\nexport function hashDataFrame(table, names) {\n names ?? (names = table.columns.names());\n const hasher = new sha256.Hash();\n const order = table.getSortedOrder(names);\n const encoder = new TextEncoder();\n for (const name of names) {\n const column = table.columns.byName(name);\n const dataArray = column.getRawData();\n const isString = column.type == DG.TYPE.STRING;\n const cats = column.categories;\n for (let i = 0; i < dataArray.length; i++) {\n if (isString) {\n const data = cats[dataArray[order[i]]];\n hasher.update(encoder.encode(data));\n }\n else {\n const data = dataArray[order[i]];\n hasher.update(Uint8Array.from([data]));\n }\n }\n }\n return hasher.digest();\n}\nexport const testData = DG.DataFrame.fromCsv(`countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,1,1,1QBS,1,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":2.374499797821045},{\"\"x\"\":0.6000000238418579,\"\"y\"\":2.6242473125457764},{\"\"x\"\":1.100000023841858,\"\"y\"\":2.367267608642578},{\"\"x\"\":1.600000023841858,\"\"y\"\":2.6723148822784424},{\"\"x\"\":2.0999999046325684,\"\"y\"\":2.6537344455718994},{\"\"x\"\":2.5999999046325684,\"\"y\"\":2.3651671409606934},{\"\"x\"\":3.0999999046325684,\"\"y\"\":2.5654284954071045},{\"\"x\"\":3.5999999046325684,\"\"y\"\":2.4160959720611572},{\"\"x\"\":4.099999904632568,\"\"y\"\":2.286726713180542},{\"\"x\"\":4.599999904632568,\"\"y\"\":2.5100042819976807},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.6676985025405884},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.680136501789093},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.3391543924808502},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.09038983285427094},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.19802775979042053}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":7.988070487976074},{\"\"x\"\":0.6000000238418579,\"\"y\"\":7.018453121185303},{\"\"x\"\":1.100000023841858,\"\"y\"\":8.115279197692871},{\"\"x\"\":1.600000023841858,\"\"y\"\":7.486658096313477},{\"\"x\"\":2.0999999046325684,\"\"y\"\":7.396438121795654},{\"\"x\"\":2.5999999046325684,\"\"y\"\":7.477052211761475},{\"\"x\"\":3.0999999046325684,\"\"y\"\":6.913095474243164},{\"\"x\"\":3.5999999046325684,\"\"y\"\":8.01385498046875},{\"\"x\"\":4.099999904632568,\"\"y\"\":6.985900402069092},{\"\"x\"\":4.599999904632568,\"\"y\"\":6.970335960388184},{\"\"x\"\":5.099999904632568,\"\"y\"\":5.448817253112793},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.5534818172454834},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.893947958946228},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6340042352676392},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.8403874039649963}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,2,2,1ZP8,2,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":4.751083850860596},{\"\"x\"\":0.6000000238418579,\"\"y\"\":4.203000068664551},{\"\"x\"\":1.100000023841858,\"\"y\"\":4.415858745574951},{\"\"x\"\":1.600000023841858,\"\"y\"\":4.68414306640625},{\"\"x\"\":2.0999999046325684,\"\"y\"\":4.198400974273682},{\"\"x\"\":2.5999999046325684,\"\"y\"\":4.179222106933594},{\"\"x\"\":3.0999999046325684,\"\"y\"\":4.638473987579346},{\"\"x\"\":3.5999999046325684,\"\"y\"\":4.708553314208984},{\"\"x\"\":4.099999904632568,\"\"y\"\":4.291589260101318},{\"\"x\"\":4.599999904632568,\"\"y\"\":4.038082599639893},{\"\"x\"\":5.099999904632568,\"\"y\"\":3.4349939823150635},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.2194708585739136},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.1920831203460693},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.5352635979652405},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.3346920311450958}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.2139337658882141},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.4269562065601349},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.2441573292016983},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.146635964512825},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.08818462491035461},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.2560656666755676},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.42434045672416687},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.37111231684684753},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.5581737160682678},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.183590054512024},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.5629843473434448},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.3211288452148438},{\"\"x\"\":6.099999904632568,\"\"y\"\":2.229961633682251},{\"\"x\"\":6.599999904632568,\"\"y\"\":2.2560226917266846},{\"\"x\"\":7.099999904632568,\"\"y\"\":2.2142398357391357}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,3,3,2BDJ,3,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":4.32425594329834},{\"\"x\"\":0.6000000238418579,\"\"y\"\":4.668442249298096},{\"\"x\"\":1.100000023841858,\"\"y\"\":4.379785060882568},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.0345139503479},{\"\"x\"\":2.0999999046325684,\"\"y\"\":4.878653526306152},{\"\"x\"\":2.5999999046325684,\"\"y\"\":4.3451313972473145},{\"\"x\"\":3.0999999046325684,\"\"y\"\":4.336992263793945},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.037430286407471},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.0092692375183105},{\"\"x\"\":4.599999904632568,\"\"y\"\":4.151902675628662},{\"\"x\"\":5.099999904632568,\"\"y\"\":3.4066951274871826},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.3732759952545166},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.673728108406067},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.48574790358543396},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.2783052325248718}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.4941710829734802},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.15323974192142487},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.46373432874679565},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.3370431363582611},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.5179030299186707},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.27899765968322754},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.22075064480304718},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.5789918899536133},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.21169911324977875},{\"\"x\"\":4.599999904632568,\"\"y\"\":0.27857646346092224},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.0906332731246948},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.8520300388336182},{\"\"x\"\":6.099999904632568,\"\"y\"\":2.7177059650421143},{\"\"x\"\":6.599999904632568,\"\"y\"\":2.8680918216705322},{\"\"x\"\":7.099999904632568,\"\"y\"\":3.2413077354431152}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,4,4,1IAN,4,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.8190152645111084},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.8421689867973328},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.8740922212600708},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.8924275040626526},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.8249067664146423},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.9327669143676758},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.8522974252700806},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.8174492716789246},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.8394647240638733},{\"\"x\"\":4.599999904632568,\"\"y\"\":0.7139387726783752},{\"\"x\"\":5.099999904632568,\"\"y\"\":0.5561167597770691},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.3276226818561554},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.12479474395513535},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.13006797432899475},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.059702079743146896}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":6.156993389129639},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.236701965332031},{\"\"x\"\":1.100000023841858,\"\"y\"\":6.010560512542725},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.495512962341309},{\"\"x\"\":2.0999999046325684,\"\"y\"\":6.087770462036133},{\"\"x\"\":2.5999999046325684,\"\"y\"\":5.79986572265625},{\"\"x\"\":3.0999999046325684,\"\"y\"\":5.597546577453613},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.520902156829834},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.360654354095459},{\"\"x\"\":4.599999904632568,\"\"y\"\":3.5539746284484863},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.577236294746399},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.0001264810562134},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.9305797815322876},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6033638715744019},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.4203685522079468}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,5,5,4UJ1,5,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":6.496231555938721},{\"\"x\"\":0.6000000238418579,\"\"y\"\":6.42543363571167},{\"\"x\"\":1.100000023841858,\"\"y\"\":7.040063858032227},{\"\"x\"\":1.600000023841858,\"\"y\"\":6.1115403175354},{\"\"x\"\":2.0999999046325684,\"\"y\"\":6.680728435516357},{\"\"x\"\":2.5999999046325684,\"\"y\"\":6.406774520874023},{\"\"x\"\":3.0999999046325684,\"\"y\"\":6.611269474029541},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.889094352722168},{\"\"x\"\":4.099999904632568,\"\"y\"\":6.75344705581665},{\"\"x\"\":4.599999904632568,\"\"y\"\":6.361435890197754},{\"\"x\"\":5.099999904632568,\"\"y\"\":4.1666975021362305},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.172118902206421},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.801048994064331},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.4640021026134491},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.0010357667924836278}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":1.5279096364974976},{\"\"x\"\":0.6000000238418579,\"\"y\"\":1.3559974431991577},{\"\"x\"\":1.100000023841858,\"\"y\"\":1.5246378183364868},{\"\"x\"\":1.600000023841858,\"\"y\"\":1.5567657947540283},{\"\"x\"\":2.0999999046325684,\"\"y\"\":1.4114240407943726},{\"\"x\"\":2.5999999046325684,\"\"y\"\":1.4045010805130005},{\"\"x\"\":3.0999999046325684,\"\"y\"\":1.4769829511642456},{\"\"x\"\":3.5999999046325684,\"\"y\"\":1.4875500202178955},{\"\"x\"\":4.099999904632568,\"\"y\"\":1.2991987466812134},{\"\"x\"\":4.599999904632568,\"\"y\"\":0.922961413860321},{\"\"x\"\":5.099999904632568,\"\"y\"\":0.6520044803619385},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.15350978076457977},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.1078903079032898},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.17276449501514435},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.14066608250141144}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,6,6,2BPW,6,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.0969524160027504},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.028483040630817413},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.22087176144123077},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.0068915546871721745},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.4305879771709442},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.44774115085601807},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.45346319675445557},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.2370593100786209},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.4657953977584839},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.155200719833374},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.2294070720672607},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.4311530590057373},{\"\"x\"\":6.099999904632568,\"\"y\"\":2.33846116065979},{\"\"x\"\":6.599999904632568,\"\"y\"\":2.608201026916504},{\"\"x\"\":7.099999904632568,\"\"y\"\":2.8136143684387207}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":4.95027494430542},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.1754679679870605},{\"\"x\"\":1.100000023841858,\"\"y\"\":5.276752948760986},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.589294910430908},{\"\"x\"\":2.0999999046325684,\"\"y\"\":5.616994857788086},{\"\"x\"\":2.5999999046325684,\"\"y\"\":5.120813846588135},{\"\"x\"\":3.0999999046325684,\"\"y\"\":5.340766906738281},{\"\"x\"\":3.5999999046325684,\"\"y\"\":4.876471042633057},{\"\"x\"\":4.099999904632568,\"\"y\"\":4.94999361038208},{\"\"x\"\":4.599999904632568,\"\"y\"\":5.162564754486084},{\"\"x\"\":5.099999904632568,\"\"y\"\":4.399557590484619},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.7977969646453857},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.0229872465133667},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.48275601863861084},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.10408931970596313}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,7,7,1QBS,7,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.3727470338344574},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.12365014106035233},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.48422467708587646},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.2264465093612671},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.16821794211864471},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.3879014551639557},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.5470244884490967},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.3419053554534912},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.7655120491981506},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.2346516847610474},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.453336715698242},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.9565491676330566},{\"\"x\"\":6.099999904632568,\"\"y\"\":3.335299491882324},{\"\"x\"\":6.599999904632568,\"\"y\"\":3.240290880203247},{\"\"x\"\":7.099999904632568,\"\"y\"\":3.1107218265533447}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":3.8585598468780518},{\"\"x\"\":0.6000000238418579,\"\"y\"\":3.6077206134796143},{\"\"x\"\":1.100000023841858,\"\"y\"\":3.855252265930176},{\"\"x\"\":1.600000023841858,\"\"y\"\":3.619039297103882},{\"\"x\"\":2.0999999046325684,\"\"y\"\":3.839388370513916},{\"\"x\"\":2.5999999046325684,\"\"y\"\":3.335283041000366},{\"\"x\"\":3.0999999046325684,\"\"y\"\":3.571141481399536},{\"\"x\"\":3.5999999046325684,\"\"y\"\":3.4155046939849854},{\"\"x\"\":4.099999904632568,\"\"y\"\":3.7316646575927734},{\"\"x\"\":4.599999904632568,\"\"y\"\":3.0680155754089355},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.891066551208496},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.6022753715515137},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.7652576565742493},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6875326037406921},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.5828871726989746}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,\"168-46 91ST AVE., 2ND FLR\",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,8,8,1ZP8,8,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":2.1287283897399902},{\"\"x\"\":0.6000000238418579,\"\"y\"\":2.267972230911255},{\"\"x\"\":1.100000023841858,\"\"y\"\":2.398442506790161},{\"\"x\"\":1.600000023841858,\"\"y\"\":2.5130622386932373},{\"\"x\"\":2.0999999046325684,\"\"y\"\":2.3255116939544678},{\"\"x\"\":2.5999999046325684,\"\"y\"\":2.127340793609619},{\"\"x\"\":3.0999999046325684,\"\"y\"\":2.47259783744812},{\"\"x\"\":3.5999999046325684,\"\"y\"\":2.131181478500366},{\"\"x\"\":4.099999904632568,\"\"y\"\":2.090421438217163},{\"\"x\"\":4.599999904632568,\"\"y\"\":2.02299165725708},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.1105059385299683},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.4494485855102539},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.1375635862350464},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.036351121962070465},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.1619771122932434}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":5.6585283279418945},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.911152362823486},{\"\"x\"\":1.100000023841858,\"\"y\"\":5.924920082092285},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.8469438552856445},{\"\"x\"\":2.0999999046325684,\"\"y\"\":5.929472923278809},{\"\"x\"\":2.5999999046325684,\"\"y\"\":6.190037727355957},{\"\"x\"\":3.0999999046325684,\"\"y\"\":6.236179828643799},{\"\"x\"\":3.5999999046325684,\"\"y\"\":6.141019344329834},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.295210838317871},{\"\"x\"\":4.599999904632568,\"\"y\"\":5.265801906585693},{\"\"x\"\":5.099999904632568,\"\"y\"\":3.3722851276397705},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.8299226760864258},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.32690900564193726},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6274543404579163},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.8441857099533081}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,\"168-46 91ST AVE., 2ND FLR\",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,9,9,2BDJ,9,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":3.7821109294891357},{\"\"x\"\":0.6000000238418579,\"\"y\"\":3.542433023452759},{\"\"x\"\":1.100000023841858,\"\"y\"\":3.7008674144744873},{\"\"x\"\":1.600000023841858,\"\"y\"\":3.717301607131958},{\"\"x\"\":2.0999999046325684,\"\"y\"\":4.024452209472656},{\"\"x\"\":2.5999999046325684,\"\"y\"\":4.013899326324463},{\"\"x\"\":3.0999999046325684,\"\"y\"\":3.945094347000122},{\"\"x\"\":3.5999999046325684,\"\"y\"\":3.866621971130371},{\"\"x\"\":4.099999904632568,\"\"y\"\":3.7461626529693604},{\"\"x\"\":4.599999904632568,\"\"y\"\":3.3454740047454834},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.61944317817688},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.999405026435852},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.46259793639183044},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.054134611040353775},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.05711187422275543}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":5.458079814910889},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.554427146911621},{\"\"x\"\":1.100000023841858,\"\"y\"\":5.799983024597168},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.364140033721924},{\"\"x\"\":2.0999999046325684,\"\"y\"\":5.864485740661621},{\"\"x\"\":2.5999999046325684,\"\"y\"\":5.4509806632995605},{\"\"x\"\":3.0999999046325684,\"\"y\"\":5.702574729919434},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.7314534187316895},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.5123443603515625},{\"\"x\"\":4.599999904632568,\"\"y\"\":5.724395751953125},{\"\"x\"\":5.099999904632568,\"\"y\"\":4.354506969451904},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.7307666540145874},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.6305936574935913},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.035183437168598175},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.7575169205665588}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,9,10,1IAN,10,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":1.1057683229446411},{\"\"x\"\":0.6000000238418579,\"\"y\"\":1.1019697189331055},{\"\"x\"\":1.100000023841858,\"\"y\"\":1.0818607807159424},{\"\"x\"\":1.600000023841858,\"\"y\"\":1.062997817993164},{\"\"x\"\":2.0999999046325684,\"\"y\"\":1.046447515487671},{\"\"x\"\":2.5999999046325684,\"\"y\"\":1.1217249631881714},{\"\"x\"\":3.0999999046325684,\"\"y\"\":1.2166996002197266},{\"\"x\"\":3.5999999046325684,\"\"y\"\":1.215477705001831},{\"\"x\"\":4.099999904632568,\"\"y\"\":1.0581893920898438},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.1747995615005493},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.0181127786636353},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.5344523191452026},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.2569526433944702},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.1912207305431366},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.15060538053512573}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":3.0498509407043457},{\"\"x\"\":0.6000000238418579,\"\"y\"\":2.805217742919922},{\"\"x\"\":1.100000023841858,\"\"y\"\":3.3415253162384033},{\"\"x\"\":1.600000023841858,\"\"y\"\":3.0549843311309814},{\"\"x\"\":2.0999999046325684,\"\"y\"\":3.250074863433838},{\"\"x\"\":2.5999999046325684,\"\"y\"\":3.0432586669921875},{\"\"x\"\":3.0999999046325684,\"\"y\"\":3.265852451324463},{\"\"x\"\":3.5999999046325684,\"\"y\"\":2.9475724697113037},{\"\"x\"\":4.099999904632568,\"\"y\"\":3.1929898262023926},{\"\"x\"\":4.599999904632568,\"\"y\"\":2.7460060119628906},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.6175861358642578},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.3006608486175537},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.3444803059101105},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.015537971630692482},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.5527358055114746}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\n,,,,,,,,,,,,,,,,,,,,,`);\ntestData.columns.add(DG.Column.fromList(DG.TYPE.BYTE_ARRAY, 'BinaryImage', Array.from(new Uint8Array(11))));\n//# sourceMappingURL=dataframe-utils.js.map","import * as DG from 'datagrok-api/dg';\nimport {runTests, tests, TestContext, initAutoTests as initTests} from '@datagrok-libraries/test/src/test';\n\nexport const _package = new DG.Package();\nexport {tests};\n\n//name: test\n//input: string category {optional: true}\n//input: string test {optional: true}\n//input: object testContext {optional: true}\n//output: dataframe result\nexport async function test(category: string, test: string, testContext: TestContext): Promise<DG.DataFrame> {\n const data = await runTests({category, test, testContext});\n return DG.DataFrame.fromObjects(data)!;\n}\n\n//name: initAutoTests\nexport async function initAutoTests() {\n await initTests(_package, _package.getModule('package-test.js'));\n}\n"],"names":["define","e","Uint32Array","a","c","Int32Array","Uint8Array","Error","Object","Symbol","DG","Array","console","o","Promise","m","window","grok","RegExp","parseInt","g","process","s","i","Math","Date","r","f","JSON","setTimeout","t","clearTimeout","_package","test","category","testContext","data","runTests","initAutoTests","initTests"],"mappings":"4CAAA,AAAC,SAAU,CAAI,CAAE,CAAO,EAEpB,IAAI,EAAU,CAAC,EACf,EAAQ,GACR,IAAI,EAAS,EAAQ,OAAU,CAC/B,IAAK,IAAI,KAAK,EACV,CAAM,CAAC,EAAE,CAAG,CAAO,CAAC,EAAE,AAGQ,AAA0B,WAA1B,OAAO,EAAO,OAAO,CACnD,EAAO,OAAO,CAAG,EACV,AAAkB,YAAlB,OAAOA,QAAyBA,OAAO,GAAG,CACjDA,OAAO,WAAa,OAAO,CAAQ,GAEnC,EAAK,MAAM,CAAG,CAEtB,EAAG,IAAI,CAAE,SAASC,CAAO,EACzB,YACAA,CAAAA,EAAQ,UAAU,CAAG,GAiBrBA,EAAQ,YAAY,CAAG,GACvBA,EAAQ,SAAS,CAAG,GAEpB,IAAI,EAAI,IAAIC,YAAY,CACpB,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,UAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,UAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WACvC,EACD,SAAS,EAAW,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAG,CAAE,CAAG,EAEjC,IADA,IAAIC,EAAG,EAAGC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAI,EAClC,GAAO,IAA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0/node_modules/fast-sha256/sha256.js","webpack://webcomponents/webpack/runtime/define_property_getters","webpack://webcomponents/webpack/runtime/has_own_property","webpack://webcomponents/webpack/runtime/make_namespace_object","webpack://webcomponents/../../libraries/test/src/test.ts","webpack://webcomponents/../../libraries/test/src/dataframe-utils.ts","webpack://webcomponents/./src/package-test.ts"],"sourcesContent":["(function (root, factory) {\n // Hack to make all exports of this module sha256 function object properties.\n var exports = {};\n factory(exports);\n var sha256 = exports[\"default\"];\n for (var k in exports) {\n sha256[k] = exports[k];\n }\n \n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = sha256;\n } else if (typeof define === 'function' && define.amd) {\n define(function() { return sha256; }); \n } else {\n root.sha256 = sha256;\n }\n})(this, function(exports) {\n\"use strict\";\nexports.__esModule = true;\n// SHA-256 (+ HMAC and PBKDF2) for JavaScript.\n//\n// Written in 2014-2016 by Dmitry Chestnykh.\n// Public domain, no warranty.\n//\n// Functions (accept and return Uint8Arrays):\n//\n// sha256(message) -> hash\n// sha256.hmac(key, message) -> mac\n// sha256.pbkdf2(password, salt, rounds, dkLen) -> dk\n//\n// Classes:\n//\n// new sha256.Hash()\n// new sha256.HMAC(key)\n//\nexports.digestLength = 32;\nexports.blockSize = 64;\n// SHA-256 constants\nvar K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\nfunction hashBlocks(w, v, p, pos, len) {\n var a, b, c, d, e, f, g, h, u, i, j, t1, t2;\n while (len >= 64) {\n a = v[0];\n b = v[1];\n c = v[2];\n d = v[3];\n e = v[4];\n f = v[5];\n g = v[6];\n h = v[7];\n for (i = 0; i < 16; i++) {\n j = pos + i * 4;\n w[i] = (((p[j] & 0xff) << 24) | ((p[j + 1] & 0xff) << 16) |\n ((p[j + 2] & 0xff) << 8) | (p[j + 3] & 0xff));\n }\n for (i = 16; i < 64; i++) {\n u = w[i - 2];\n t1 = (u >>> 17 | u << (32 - 17)) ^ (u >>> 19 | u << (32 - 19)) ^ (u >>> 10);\n u = w[i - 15];\n t2 = (u >>> 7 | u << (32 - 7)) ^ (u >>> 18 | u << (32 - 18)) ^ (u >>> 3);\n w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0);\n }\n for (i = 0; i < 64; i++) {\n t1 = (((((e >>> 6 | e << (32 - 6)) ^ (e >>> 11 | e << (32 - 11)) ^\n (e >>> 25 | e << (32 - 25))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n t2 = (((a >>> 2 | a << (32 - 2)) ^ (a >>> 13 | a << (32 - 13)) ^\n (a >>> 22 | a << (32 - 22))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n v[0] += a;\n v[1] += b;\n v[2] += c;\n v[3] += d;\n v[4] += e;\n v[5] += f;\n v[6] += g;\n v[7] += h;\n pos += 64;\n len -= 64;\n }\n return pos;\n}\n// Hash implements SHA256 hash algorithm.\nvar Hash = /** @class */ (function () {\n function Hash() {\n this.digestLength = exports.digestLength;\n this.blockSize = exports.blockSize;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n this.state = new Int32Array(8); // hash state\n this.temp = new Int32Array(64); // temporary state\n this.buffer = new Uint8Array(128); // buffer for data to hash\n this.bufferLength = 0; // number of bytes in buffer\n this.bytesHashed = 0; // number of total bytes hashed\n this.finished = false; // indicates whether the hash was finalized\n this.reset();\n }\n // Resets hash state making it possible\n // to re-use this instance to hash other data.\n Hash.prototype.reset = function () {\n this.state[0] = 0x6a09e667;\n this.state[1] = 0xbb67ae85;\n this.state[2] = 0x3c6ef372;\n this.state[3] = 0xa54ff53a;\n this.state[4] = 0x510e527f;\n this.state[5] = 0x9b05688c;\n this.state[6] = 0x1f83d9ab;\n this.state[7] = 0x5be0cd19;\n this.bufferLength = 0;\n this.bytesHashed = 0;\n this.finished = false;\n return this;\n };\n // Cleans internal buffers and re-initializes hash state.\n Hash.prototype.clean = function () {\n for (var i = 0; i < this.buffer.length; i++) {\n this.buffer[i] = 0;\n }\n for (var i = 0; i < this.temp.length; i++) {\n this.temp[i] = 0;\n }\n this.reset();\n };\n // Updates hash state with the given data.\n //\n // Optionally, length of the data can be specified to hash\n // fewer bytes than data.length.\n //\n // Throws error when trying to update already finalized hash:\n // instance must be reset to use it again.\n Hash.prototype.update = function (data, dataLength) {\n if (dataLength === void 0) { dataLength = data.length; }\n if (this.finished) {\n throw new Error(\"SHA256: can't update because hash was finished.\");\n }\n var dataPos = 0;\n this.bytesHashed += dataLength;\n if (this.bufferLength > 0) {\n while (this.bufferLength < 64 && dataLength > 0) {\n this.buffer[this.bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this.bufferLength === 64) {\n hashBlocks(this.temp, this.state, this.buffer, 0, 64);\n this.bufferLength = 0;\n }\n }\n if (dataLength >= 64) {\n dataPos = hashBlocks(this.temp, this.state, data, dataPos, dataLength);\n dataLength %= 64;\n }\n while (dataLength > 0) {\n this.buffer[this.bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n };\n // Finalizes hash state and puts hash into out.\n //\n // If hash was already finalized, puts the same value.\n Hash.prototype.finish = function (out) {\n if (!this.finished) {\n var bytesHashed = this.bytesHashed;\n var left = this.bufferLength;\n var bitLenHi = (bytesHashed / 0x20000000) | 0;\n var bitLenLo = bytesHashed << 3;\n var padLength = (bytesHashed % 64 < 56) ? 64 : 128;\n this.buffer[left] = 0x80;\n for (var i = left + 1; i < padLength - 8; i++) {\n this.buffer[i] = 0;\n }\n this.buffer[padLength - 8] = (bitLenHi >>> 24) & 0xff;\n this.buffer[padLength - 7] = (bitLenHi >>> 16) & 0xff;\n this.buffer[padLength - 6] = (bitLenHi >>> 8) & 0xff;\n this.buffer[padLength - 5] = (bitLenHi >>> 0) & 0xff;\n this.buffer[padLength - 4] = (bitLenLo >>> 24) & 0xff;\n this.buffer[padLength - 3] = (bitLenLo >>> 16) & 0xff;\n this.buffer[padLength - 2] = (bitLenLo >>> 8) & 0xff;\n this.buffer[padLength - 1] = (bitLenLo >>> 0) & 0xff;\n hashBlocks(this.temp, this.state, this.buffer, 0, padLength);\n this.finished = true;\n }\n for (var i = 0; i < 8; i++) {\n out[i * 4 + 0] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return this;\n };\n // Returns the final hash digest.\n Hash.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n // Internal function for use in HMAC for optimization.\n Hash.prototype._saveState = function (out) {\n for (var i = 0; i < this.state.length; i++) {\n out[i] = this.state[i];\n }\n };\n // Internal function for use in HMAC for optimization.\n Hash.prototype._restoreState = function (from, bytesHashed) {\n for (var i = 0; i < this.state.length; i++) {\n this.state[i] = from[i];\n }\n this.bytesHashed = bytesHashed;\n this.finished = false;\n this.bufferLength = 0;\n };\n return Hash;\n}());\nexports.Hash = Hash;\n// HMAC implements HMAC-SHA256 message authentication algorithm.\nvar HMAC = /** @class */ (function () {\n function HMAC(key) {\n this.inner = new Hash();\n this.outer = new Hash();\n this.blockSize = this.inner.blockSize;\n this.digestLength = this.inner.digestLength;\n var pad = new Uint8Array(this.blockSize);\n if (key.length > this.blockSize) {\n (new Hash()).update(key).finish(pad).clean();\n }\n else {\n for (var i = 0; i < key.length; i++) {\n pad[i] = key[i];\n }\n }\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36;\n }\n this.inner.update(pad);\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36 ^ 0x5c;\n }\n this.outer.update(pad);\n this.istate = new Uint32Array(8);\n this.ostate = new Uint32Array(8);\n this.inner._saveState(this.istate);\n this.outer._saveState(this.ostate);\n for (var i = 0; i < pad.length; i++) {\n pad[i] = 0;\n }\n }\n // Returns HMAC state to the state initialized with key\n // to make it possible to run HMAC over the other data with the same\n // key without creating a new instance.\n HMAC.prototype.reset = function () {\n this.inner._restoreState(this.istate, this.inner.blockSize);\n this.outer._restoreState(this.ostate, this.outer.blockSize);\n return this;\n };\n // Cleans HMAC state.\n HMAC.prototype.clean = function () {\n for (var i = 0; i < this.istate.length; i++) {\n this.ostate[i] = this.istate[i] = 0;\n }\n this.inner.clean();\n this.outer.clean();\n };\n // Updates state with provided data.\n HMAC.prototype.update = function (data) {\n this.inner.update(data);\n return this;\n };\n // Finalizes HMAC and puts the result in out.\n HMAC.prototype.finish = function (out) {\n if (this.outer.finished) {\n this.outer.finish(out);\n }\n else {\n this.inner.finish(out);\n this.outer.update(out, this.digestLength).finish(out);\n }\n return this;\n };\n // Returns message authentication code.\n HMAC.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n return HMAC;\n}());\nexports.HMAC = HMAC;\n// Returns SHA256 hash of data.\nfunction hash(data) {\n var h = (new Hash()).update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hash = hash;\n// Function hash is both available as module.hash and as default export.\nexports[\"default\"] = hash;\n// Returns HMAC-SHA256 of data under the key.\nfunction hmac(key, data) {\n var h = (new HMAC(key)).update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hmac = hmac;\n// Fills hkdf buffer like this:\n// T(1) = HMAC-Hash(PRK, T(0) | info | 0x01)\nfunction fillBuffer(buffer, hmac, info, counter) {\n // Counter is a byte value: check if it overflowed.\n var num = counter[0];\n if (num === 0) {\n throw new Error(\"hkdf: cannot expand more\");\n }\n // Prepare HMAC instance for new data with old key.\n hmac.reset();\n // Hash in previous output if it was generated\n // (i.e. counter is greater than 1).\n if (num > 1) {\n hmac.update(buffer);\n }\n // Hash in info if it exists.\n if (info) {\n hmac.update(info);\n }\n // Hash in the counter.\n hmac.update(counter);\n // Output result to buffer and clean HMAC instance.\n hmac.finish(buffer);\n // Increment counter inside typed array, this works properly.\n counter[0]++;\n}\nvar hkdfSalt = new Uint8Array(exports.digestLength); // Filled with zeroes.\nfunction hkdf(key, salt, info, length) {\n if (salt === void 0) { salt = hkdfSalt; }\n if (length === void 0) { length = 32; }\n var counter = new Uint8Array([1]);\n // HKDF-Extract uses salt as HMAC key, and key as data.\n var okm = hmac(salt, key);\n // Initialize HMAC for expanding with extracted key.\n // Ensure no collisions with `hmac` function.\n var hmac_ = new HMAC(okm);\n // Allocate buffer.\n var buffer = new Uint8Array(hmac_.digestLength);\n var bufpos = buffer.length;\n var out = new Uint8Array(length);\n for (var i = 0; i < length; i++) {\n if (bufpos === buffer.length) {\n fillBuffer(buffer, hmac_, info, counter);\n bufpos = 0;\n }\n out[i] = buffer[bufpos++];\n }\n hmac_.clean();\n buffer.fill(0);\n counter.fill(0);\n return out;\n}\nexports.hkdf = hkdf;\n// Derives a key from password and salt using PBKDF2-HMAC-SHA256\n// with the given number of iterations.\n//\n// The number of bytes returned is equal to dkLen.\n//\n// (For better security, avoid dkLen greater than hash length - 32 bytes).\nfunction pbkdf2(password, salt, iterations, dkLen) {\n var prf = new HMAC(password);\n var len = prf.digestLength;\n var ctr = new Uint8Array(4);\n var t = new Uint8Array(len);\n var u = new Uint8Array(len);\n var dk = new Uint8Array(dkLen);\n for (var i = 0; i * len < dkLen; i++) {\n var c = i + 1;\n ctr[0] = (c >>> 24) & 0xff;\n ctr[1] = (c >>> 16) & 0xff;\n ctr[2] = (c >>> 8) & 0xff;\n ctr[3] = (c >>> 0) & 0xff;\n prf.reset();\n prf.update(salt);\n prf.update(ctr);\n prf.finish(u);\n for (var j = 0; j < len; j++) {\n t[j] = u[j];\n }\n for (var j = 2; j <= iterations; j++) {\n prf.reset();\n prf.update(u).finish(u);\n for (var k = 0; k < len; k++) {\n t[k] ^= u[k];\n }\n }\n for (var j = 0; j < len && i * len + j < dkLen; j++) {\n dk[i * len + j] = t[j];\n }\n }\n for (var i = 0; i < len; i++) {\n t[i] = u[i] = 0;\n }\n for (var i = 0; i < 4; i++) {\n ctr[i] = 0;\n }\n prf.clean();\n return dk;\n}\nexports.pbkdf2 = pbkdf2;\n});\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type * as _grok from 'datagrok-api/grok';\nimport type * as _DG from 'datagrok-api/dg';\ndeclare let grok: typeof _grok, DG: typeof _DG;\n\nimport { Observable } from 'rxjs';\nimport { testData } from './dataframe-utils';\nimport Timeout = NodeJS.Timeout;\nimport { changeOptionsSaveLayout, filterAsync, loadLayout, selectFilterChangeCurrent, testViewerInternal } from './test-viewer-utils';\n\nconst STANDART_TIMEOUT = 30000;\nconst BENCHMARK_TIMEOUT = 10800000;\n/** The shortest time between two forced garbage collections of a run. A collection of the platform's heap takes\n * a few hundred ms, so one after every test costs a suite of small tests more than the tests themselves. */\nconst GC_INTERVAL = 5000;\n\nconst stdLog = console.log.bind(console);\nconst stdInfo = console.info.bind(console);\nconst stdWarn = console.warn.bind(console);\nconst stdError = console.error.bind(console);\n\nexport const tests: {\n [key: string]: Category\n} = {};\n\nconst autoTestsCatName = 'Auto Tests';\nconst demoCatName = 'Demo';\nconst detectorsCatName = 'Detectors';\nconst coreCatName = 'Core';\nconst wasRegistered: { [key: string]: boolean } = {};\nexport let currentCategory: string;\n\nexport namespace assure {\n export function notNull(value: any, name?: string) {\n if (value == null)\n throw new Error(`${name == null ? 'Value' : name} not defined`);\n }\n}\n\nexport interface TestOptions {\n timeout?: number;\n benchmarkWarnTimeout?: number;\n benchmarkTimeout?: number;\n unhandledExceptionTimeout?: number;\n skipReason?: string;\n isAggregated?: boolean;\n benchmark?: boolean;\n stressTest?: boolean;\n owner?: string;\n tags?: string[];\n /** Test needs no browser: it uses only Node-available API and can run headless under the js-api Node runtime. */\n node?: boolean;\n}\n\nexport interface TestResult {\n date: string;\n category: string;\n name: string;\n success: boolean;\n result: any;\n ms: number;\n skipped: boolean;\n logs: string;\n owner: string;\n package: string;\n flaking: boolean;\n}\n\n\nexport interface TestResultExtended extends TestResult{\n widgetsDifference: number;\n}\n\nexport interface CategoryOptions {\n clear?: boolean;\n timeout?: number;\n benchmarks?: boolean;\n stressTests?: boolean;\n owner?: string;\n /** Default for all tests in the category that don't set their own `node` option. */\n node?: boolean;\n}\n\nexport class TestContext {\n stressTest?: boolean;\n catchUnhandled = true;\n report = false;\n returnOnFail = false;\n closeAll = true;\n\n constructor(catchUnhandled?: boolean, report?: boolean, returnOnFail?: boolean) {\n if (catchUnhandled !== undefined) this.catchUnhandled = catchUnhandled;\n if (report !== undefined) this.report = report;\n if (returnOnFail !== undefined) this.returnOnFail = returnOnFail;\n };\n}\n\nexport class Test {\n test: () => Promise<any>;\n name: string;\n category: string;\n options?: TestOptions;\n\n constructor(category: string, name: string, test: () => Promise<any>, options?: TestOptions) {\n this.category = category;\n this.name = name;\n options ??= {};\n options.timeout ??= STANDART_TIMEOUT;\n this.options = options;\n this.test = async (): Promise<any> => {\n return new Promise(async (resolve, reject) => {\n let result = '';\n try {\n if (DG.Test.isInDebug)\n debugger;\n\n let res = await test();\n try {\n result = res?.toString() ?? '';\n }\n catch (e) {\n result = 'Can\\'t convert test\\'s result to string';\n console.error(`Can\\'t convert test\\'s result to string in the ${this.category}:${this.name} test`);\n }\n } catch (e: any) {\n reject(e);\n }\n resolve(result);\n });\n };\n }\n}\n\nexport class Category {\n tests?: Test[];\n before?: () => Promise<void>;\n after?: () => Promise<void>;\n\n beforeStatus?: string;\n afterStatus?: string;\n clear?: boolean;\n timeout?: number;\n benchmarks?: boolean;\n benchmarkTimeout?: number;\n stressTests?: boolean;\n owner?: string;\n node?: boolean;\n}\n\nexport class NodeTestExecutionOptions {\n package!: _DG.Package;\n}\n\nexport class TestExecutionOptions {\n category?: string;\n test?: string;\n testContext?: TestContext;\n exclude?: string[];\n verbose?: boolean;\n stressTest?: boolean;\n tags?: string[];\n nodeOptions?: NodeTestExecutionOptions;\n skipToCategory?: string;\n skipToTest?: string;\n returnOnFail?: boolean;\n /** Run only tests marked `node: true` (the headless Node pass of `grok test`). */\n nodeOnly?: boolean;\n /** Skip tests marked `node: true` (the browser pass of `grok test` after a Node pass already ran them). */\n excludeNodeTests?: boolean;\n}\n\nexport async function testEvent<T>(event: Observable<T>,\n handler: (args: T) => void, trigger: () => void, ms: number = 0, reason: string = `timeout`\n): Promise<any> {\n return new Promise((resolve, reject) => {\n const sub = event.subscribe((args: T) => {\n try {\n handler(args);\n resolve('OK');\n } catch (e) {\n reject(e);\n } finally {\n sub.unsubscribe();\n clearTimeout(timeout);\n }\n });\n const timeout = setTimeout(() => {\n sub.unsubscribe();\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(reason);\n }, ms);\n trigger();\n });\n}\n\nexport async function testEventAsync<T>(event: Observable<T>,\n handler: (args: T) => Promise<void>, trigger: () => void, ms: number = 0, reason: string = `timeout`\n): Promise<any> {\n return new Promise((resolve, reject) => {\n const sub = event.subscribe((args: T) => {\n handler(args).then(() => {\n resolve('OK');\n }).catch((e) => {\n reject(e);\n }).finally(() => {\n sub.unsubscribe();\n clearTimeout(timeout);\n });\n });\n const timeout = setTimeout(() => {\n sub.unsubscribe();\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(reason);\n }, ms);\n trigger();\n });\n}\n\nexport function test(name: string, test: () => Promise<any>, options?: TestOptions): void {\n if (tests[currentCategory] == undefined)\n tests[currentCategory] = {};\n if (tests[currentCategory].tests == undefined)\n tests[currentCategory].tests = [];\n tests[currentCategory].tests!.push(new Test(currentCategory, name, test, options));\n}\n\n/* Tests two objects for equality, throws an exception if they are not equal. */\nexport function expect(actual: any, expected: any = true, error?: string): void {\n if (error)\n error = `${error}, `;\n else error = '';\n if (actual !== expected)\n throw new Error(`${error}Expected \"${expected}\", got \"${actual}\"`);\n}\n\nexport function expectFloat(actual: number, expected: number, tolerance = 0.001, error?: string): void {\n if ((actual === Number.POSITIVE_INFINITY && expected === Number.POSITIVE_INFINITY) ||\n (actual === Number.NEGATIVE_INFINITY && expected === Number.NEGATIVE_INFINITY) ||\n (actual === Number.NaN && expected === Number.NaN) || (isNaN(actual) && isNaN(expected)))\n return;\n const areEqual = Math.abs(actual - expected) < tolerance;\n expect(areEqual, true, `${error ?? ''} (tolerance = ${tolerance}; a = ${actual}, e = ${expected})`);\n if (!areEqual)\n throw new Error(`Expected ${expected}, got ${actual} (tolerance = ${tolerance})`);\n}\n\n/** grok_connect ships a `bigint` column as `int` while every value in it fits int32, and upgrades\n * it back on the first chunk that overflows (`int8AsInt32`, streaming queries only — see\n * core/docs/features/connector-streaming-optimization/RESULTS_P1.md WO-1.5). The narrowing is\n * lossless, so a test that declares `bigint` must accept `int` for small values. */\nfunction isLosslessNarrowing(expected: string, actual: string): boolean {\n return expected === DG.TYPE.BIG_INT && actual === DG.TYPE.INT;\n}\n\nexport function expectTable(actual: _DG.DataFrame, expected: _DG.DataFrame, error?: string): void {\n const expectedRowCount = expected.rowCount;\n const actualRowCount = actual.rowCount;\n expect(actualRowCount, expectedRowCount, `${error ?? ''}, row count`);\n\n for (const column of expected.columns) {\n const actualColumn = actual.columns.byName(column.name);\n if (actualColumn == null)\n throw new Error(`Column ${column.name} not found`);\n const narrowed = isLosslessNarrowing(column.type, actualColumn.type);\n if (actualColumn.type != column.type && !narrowed)\n throw new Error(`Column ${column.name} type expected ${column.type} got ${actualColumn.type}`);\n for (let i = 0; i < expectedRowCount; i++) {\n const value = column.get(i);\n const actualValue = actualColumn.get(i);\n if (column.type == DG.TYPE.FLOAT)\n expectFloat(actualValue, value, 0.0001, error);\n else if (column.type == DG.TYPE.DATE_TIME)\n expect(actualValue.isSame(value), true, error);\n else if (narrowed)\n // bigint reads back as a string, int as a number — compare the value, not the encoding.\n expect(String(actualValue), String(value), error);\n else\n expect(actualValue, value, error);\n }\n }\n}\n\nexport function expectObject(actual: { [key: string]: any }, expected: { [key: string]: any }) {\n for (const [expectedKey, expectedValue] of Object.entries(expected)) {\n if (!actual.hasOwnProperty(expectedKey))\n throw new Error(`Expected property \"${expectedKey}\" not found`);\n\n const actualValue = actual[expectedKey];\n if (actualValue instanceof Array && expectedValue instanceof Array)\n expectArray(actualValue, expectedValue);\n else if (actualValue instanceof Object && expectedValue instanceof Object)\n expectObject(actualValue, expectedValue);\n else if (Number.isFinite(actualValue) && Number.isFinite(expectedValue))\n expectFloat(actualValue, expectedValue);\n else if (actualValue != expectedValue)\n throw new Error(`Expected (${expectedValue}) for key '${expectedKey}', got (${actualValue})`);\n }\n}\n\nexport function expectArray(actual: ArrayLike<any>, expected: ArrayLike<any>) {\n const actualLength = actual.length;\n const expectedLength = expected.length;\n\n if (actualLength != expectedLength) {\n throw new Error(`Arrays are of different length: actual array length is ${actualLength} ` +\n `and expected array length is ${expectedLength}`);\n }\n\n for (let i = 0; i < actualLength; i++) {\n if (actual[i] instanceof Array && expected[i] instanceof Array)\n expectArray(actual[i], expected[i]);\n else if (actual[i] instanceof Object && expected[i] instanceof Object)\n expectObject(actual[i], expected[i]);\n else if (actual[i] != expected[i])\n throw new Error(`Expected ${expected[i]} at position ${i}, got ${actual[i]}`);\n }\n}\n\n/* Defines a test suite. */\nexport function category(category: string, tests_: () => void, options?: CategoryOptions): void {\n currentCategory = category;\n tests_();\n if (tests[currentCategory]) {\n tests[currentCategory].clear = options?.clear ?? true;\n tests[currentCategory].timeout = options?.timeout;\n tests[currentCategory].benchmarks = options?.benchmarks;\n tests[currentCategory].stressTests = options?.stressTests;\n tests[currentCategory].owner = options?.owner;\n tests[currentCategory].node = options?.node;\n }\n}\n\n/* Defines a function to be executed before the tests in this category are executed. */\nexport function before(before: () => Promise<void>): void {\n if (tests[currentCategory] == undefined)\n tests[currentCategory] = {};\n tests[currentCategory].before = before;\n}\n\n/* Defines a function to be executed after the tests in this category are executed. */\nexport function after(after: () => Promise<void>): void {\n if (tests[currentCategory] == undefined)\n tests[currentCategory] = {};\n tests[currentCategory].after = after;\n}\n\nfunction addNamespace(s: string, f: _DG.Func): string {\n return s.replace(new RegExp(f.name, 'gi'), f.nqName);\n}\n\n/** Whether a test matches the node/browser split requested by the run options. */\nfunction matchesNodeTarget(t: Test, cat: Category, options: TestExecutionOptions): boolean {\n const isNode = t.options?.node ?? cat.node ?? false;\n return options.nodeOnly ? isNode : options.excludeNodeTests ? !isNode : true;\n}\n\nexport async function initAutoTests(package_: _DG.Package, module?: any) {\n const packageId = package_.id;\n if (wasRegistered[packageId]) return;\n const moduleTests = module ? module.tests : tests;\n if (package_.name === 'DevTools' || (!!module && module._package.name === 'DevTools')) {\n for (const f of (<any>window).dartTests) {\n const arr = f.name.split(/\\s*\\|\\s*!/g);\n let name = arr.pop() ?? f.name;\n let cat = arr.length ? coreCatName + ': ' + arr.join(': ') : coreCatName;\n let fullName: string[] = name.split(' | ');\n name = fullName[fullName.length - 1];\n fullName.unshift(cat);\n fullName.pop();\n cat = fullName.join(': ');\n if (moduleTests[cat] === undefined)\n moduleTests[cat] = { tests: [], clear: true };\n moduleTests[cat].tests.push(new Test(cat, name, f.test, { isAggregated: false, timeout: f.options?.timeout ?? STANDART_TIMEOUT, skipReason: f.options?.skipReason, owner: f.options?.owner, benchmark: f.options?.benchmark ?? false }));\n }\n }\n const moduleAutoTests = [];\n const moduleDemo = [];\n let previousDemo: string | null = null;\n const moduleDetectors = [];\n const packFunctions = await grok.dapi.functions.filter(`package.id = \"${packageId}\"`).list();\n const reg = new RegExp(/skip:\\s*([^,\\s]+)|wait:\\s*(\\d+)|cat:\\s*([^,\\s]+)|timeout:\\s*(\\d+)/g);\n for (const f of packFunctions) {\n const tests = f.options['test'];\n const demo = f.options['demoPath'];\n if ((tests && Array.isArray(tests) && tests.length)) {\n for (let i = 0; i < tests.length; i++) {\n const res = (tests[i] as string).matchAll(reg);\n const map: { skip?: string, wait?: number, cat?: string, timeout?: number, benchmarkTimeout?: number } = {};\n Array.from(res).forEach((arr) => {\n if (arr[0].startsWith('skip')) map['skip'] = arr[1];\n else if (arr[0].startsWith('wait')) map['wait'] = parseInt(arr[2]);\n else if (arr[0].startsWith('cat')) map['cat'] = arr[3];\n else if (arr[0].startsWith('timeout')) map['timeout'] = parseInt(arr[4]);\n });\n const test = new Test(map.cat ?? autoTestsCatName, tests.length === 1 ? f.name : `${f.name} ${i + 1}`, async () => {\n const res = await grok.functions.eval(addNamespace(tests[i], f));\n // `wait` marks a test that opens UI: let it finish loading rather than sleep for the given ms\n if (map.wait)\n await uiSettled(f.name);\n // eslint-disable-next-line no-throw-literal\n if (typeof res === 'boolean' && !res) throw `Failed: ${tests[i]}, expected true, got ${res}`;\n }, { skipReason: map.skip, timeout: DG.Test.isInBenchmark ? map.benchmarkTimeout ?? BENCHMARK_TIMEOUT : map.timeout ?? STANDART_TIMEOUT,\n // Query tests evaluate server-side (expressions like ExpectTable(Query(), OpenFile(...))\n // resolve through core functions available in the Node runtime), so they can run headless;\n // tests of client JS functions need the browser-loaded package.\n node: f instanceof DG.DataQuery });\n if (map.cat) {\n const cat: string = map.cat;\n if (moduleTests[cat] === undefined)\n moduleTests[cat] = { tests: [], clear: true };\n\n // only before/after can be defined in ts files tests under the category\n if (!moduleTests[cat].tests)\n moduleTests[cat].tests = [];\n moduleTests[cat].tests.push(test);\n }\n else\n moduleAutoTests.push(test);\n }\n }\n if (demo) {\n const test = new Test(demoCatName, f.friendlyName, async () => {\n await uiSettled('the views the previous test closed');\n // an error raised after the previous demo had settled surfaces here: name the demo it belongs to\n const late = previousDemo ? await grok.shell.lastError : null;\n grok.shell.clearLastError();\n if (late)\n throw new Error(`${previousDemo} raised an error after it finished: ${late}`);\n previousDemo = f.friendlyName;\n await f.apply();\n await uiSettled(f.friendlyName);\n const unhandled = await grok.shell.lastError;\n grok.shell.clearLastError();\n if (unhandled)\n throw new Error(unhandled);\n }, { skipReason: f.options['demoSkip'] });\n moduleDemo.push(test);\n }\n if (f.hasTag('semTypeDetector')) {\n let detectorsTestData = testData;\n if (f.options['testData']) {\n detectorsTestData = await grok.data.files.openTable(`System:AppData/${package_.nqName}/${f.options['testData']}`);\n }\n\n const test = new Test(detectorsCatName, f.friendlyName, async () => {\n const arr = [];\n console.log(`System:AppData/${package_.nqName}/${f.options['testData']}`);\n\n for (const col of detectorsTestData.clone().columns) {\n const res = await f.apply([col]);\n arr.push(res || col.semType);\n }\n const resArr = arr.filter((i) => i);\n expect(resArr.length, 1);\n\n if (f.options['testDataColumnName'])\n expect(resArr[0], f.options['testDataColumnName']);\n\n }, { skipReason: f.options['skipTest'] });\n moduleDetectors.push(test);\n }\n }\n wasRegistered[packageId] = true;\n if (moduleAutoTests.length > 0)\n moduleTests[autoTestsCatName] = { tests: moduleAutoTests, clear: true };\n if (moduleDemo.length > 0)\n moduleTests[demoCatName] = { tests: moduleDemo, clear: true };\n if (moduleDetectors.length > 0)\n moduleTests[detectorsCatName] = { tests: moduleDetectors, clear: false };\n}\n\nfunction redefineConsole(): any[] {\n const logs: any[] = [];\n console.log = (...args) => {\n logs.push(...args);\n stdLog(...args);\n };\n console.info = (...args) => {\n logs.push(...args);\n stdInfo(...args);\n };\n console.warn = (...args) => {\n logs.push(...args);\n stdWarn(...args);\n };\n console.error = (...args) => {\n logs.push(...args);\n stdError(...args);\n };\n return logs;\n}\n\nfunction resetConsole(): void {\n console.log = stdLog;\n console.info = stdInfo;\n console.warn = stdWarn;\n console.error = stdError;\n}\n\nexport async function runTests(options?: TestExecutionOptions) : Promise<TestResultExtended[]>{\n\n const package_: _DG.Package = options?.nodeOptions ? options.nodeOptions.package : grok.functions.getCurrentCall().func.package;\n if (!package_)\n throw new Error('Can\\'t run tests outside of the package');\n const match = package_.packageOwner?.match(/<([^>]*)>/);\n const packageOwner = match ? match[1] : '';\n if (package_ != undefined)\n await initAutoTests(package_);\n const results:TestResultExtended[] = [];\n let lastGc = Date.now();\n // A load test keeps its results in the run's own report: sending each one to the server under load is a\n // quarter of the requests that server gets.\n const reports = new ReportQueue(!options?.stressTest);\n console.log(`Running tests...`);\n console.log(options);\n options ??= {};\n options!.testContext ??= new TestContext();\n grok.shell.clearLastError();\n const logs = redefineConsole();\n\n await invokeTests(tests, options);\n // the reports still on their way; a server that stopped answering does not hold the results back\n await Promise.race([reports.sent, delay(60000)]);\n\n for (let r of results) {\n r.result = r.result.toString().replace(/\"/g, '\\'');\n if (r.logs != undefined)\n r.logs = r.logs!.toString().replace(/\"/g, '\\'');\n }\n return results;\n\n async function invokeCategoryMethod(method: (() => Promise<void>) | undefined, category: string): Promise<string | undefined> {\n let invokationResult = undefined;\n try {\n if (method !== undefined) {\n await timeout(async () => {\n await method();\n }, 100000, `before ${category}: timeout error`);\n }\n } catch (x: any) {\n invokationResult = await getResult(x);\n }\n return invokationResult\n }\n\n async function invokeTestsInCategory(category: Category, options: TestExecutionOptions, isTargetCategory: boolean): Promise<TestResultExtended[]> {\n let t = (category.tests ?? []).filter((e) => matchesNodeTarget(e, category, options));\n const res : TestResultExtended[] = [];\n // let memoryUsageBefore = (window?.performance as any)?.memory?.usedJSHeapSize;\n const widgetsBefore = getWidgetsCountSafe();\n\n if (category.clear) {\n let skippingTests = isTargetCategory && options.skipToTest != undefined;\n for (let i = 0; i < t.length; i++) {\n\n if (t[i].options) {\n if (t[i].options?.benchmark === undefined) {\n if (!t[i].options)\n t[i].options = {}\n t[i].options!.benchmark = category.benchmarks ?? false;\n }\n }\n let test = t[i];\n if (options.test)\n if (options.test.toLowerCase() !== test.name.toLowerCase())\n continue;\n if (skippingTests) {\n if (options?.skipToTest != undefined && test.name.toLowerCase().trim() === options?.skipToTest.toLowerCase().trim()) {\n // Found the target test, stop skipping after this one\n skippingTests = false;\n } else\n continue;\n }\n if (test?.options) {\n test.options.owner = t[i].options?.owner ?? category?.owner ?? packageOwner ?? '';\n }\n let testRun = await execTest(\n test,\n options?.test,\n logs, DG.Test.isInBenchmark ? t[i].options?.benchmarkTimeout ?? BENCHMARK_TIMEOUT : t[i].options?.timeout ?? STANDART_TIMEOUT,\n package_.name,\n options.verbose,\n reports\n );\n\n if (testRun && !testRun.skipped)\n await collectGarbage();\n if (testRun) {\n res.push({ ...testRun, widgetsDifference: getWidgetsCountSafe() - widgetsBefore });\n // Return early if returnOnFail is set and test failed (but ignore failure for the skipToTest test itself)\n if (options.returnOnFail && options.skipToTest !== test.name && !testRun.success && !testRun.skipped)\n return res;\n }\n // res.push({ ...testRun, memoryDelta: (window?.performance as any)?.memory?.usedJSHeapSize - memoryUsageBefore, widgetsDelta: getWidgetsCountSafe() - widgetsBefore });\n\n if (!options.nodeOptions && options.testContext?.closeAll !== false) {\n grok.shell.closeAll();\n DG.Balloon.closeAll();\n }\n }\n } else {\n let skippingTests = isTargetCategory && options.skipToTest != undefined;\n for (let i = 0; i < t.length; i++) {\n let test = t[i];\n if (options.test)\n if (options.test.toLowerCase() !== test.name.toLowerCase())\n continue;\n if (skippingTests) {\n if (options?.skipToTest != undefined && test.name.toLowerCase().trim() === options?.skipToTest.toLowerCase().trim()) {\n // Found the target test, stop skipping after this one\n skippingTests = false;\n }\n continue; // Skip this test (including the target)\n }\n\n if (test?.options) {\n test.options.owner = t[i].options?.owner ?? category?.owner ?? packageOwner ?? '';\n }\n let testRun = await execTest(\n test,\n options?.test,\n logs,\n DG.Test.isInBenchmark ? t[i].options?.benchmarkTimeout ?? BENCHMARK_TIMEOUT : t[i].options?.timeout,\n package_.name,\n options.verbose,\n reports\n );\n\n if (testRun && !testRun.skipped)\n await collectGarbage();\n\n if (testRun) {\n res.push({ ...testRun, widgetsDifference: getWidgetsCountSafe() - widgetsBefore });\n // Return early if returnOnFail is set and test failed (but ignore failure for the skipToTest test itself)\n if (options.returnOnFail && options.skipToTest !== test.name && !testRun.success && !testRun.skipped)\n return res;\n }\n // res.push({ ...testRun, memoryDelta: (window?.performance as any)?.memory?.usedJSHeapSize - memoryUsageBefore, widgetsDifference: getWidgetsCountSafe() - widgetsBefore });\n\n }\n }\n return res;\n }\n\n async function collectGarbage(): Promise<void> {\n const gc = (globalThis as any).gc;\n if (!gc || Date.now() - lastGc < GC_INTERVAL)\n return;\n await gc();\n lastGc = Date.now();\n }\n\n function getWidgetsCountSafe() {\n if (typeof process !== 'undefined')\n return 0;\n let length = -1;\n try {\n length = DG.Widget.getAll().length;\n } catch (e: any) {\n console.warn(e.message ?? e);\n }\n return length;\n }\n\n async function invokeTests(categoriesToInvoke: { [key: string]: Category }, options: TestExecutionOptions) {\n try {\n let skippingCategories = options?.skipToCategory != undefined;\n let isTargetCategory = false;\n for (const [key, value] of Object.entries(categoriesToInvoke)) {\n if (options.exclude?.some((c) => key.startsWith(c)))\n continue;\n if (options?.category != null && !key.toLowerCase().startsWith(options?.category.toLowerCase().trim()))\n continue;\n\n if (skippingCategories) {\n if (isTargetCategory)\n skippingCategories = false;\n else {\n if (options?.skipToCategory != null && key.toLowerCase().trim() === options?.skipToCategory.toLowerCase().trim()) {\n isTargetCategory = true;\n } else {\n // Haven't found the target category yet, keep skipping\n continue;\n }\n }\n }\n let t = (value.tests ?? []).filter((e) => matchesNodeTarget(e, value, options));\n // Node/browser split: if no tests of this category belong to the requested target,\n // skip it entirely — including before()/after().\n if ((options.nodeOnly || options.excludeNodeTests) && t.length === 0)\n continue;\n\n // A benchmark run takes only the tests marked for it: a category with none of them is not entered,\n // so its before() and after() do not run for nothing.\n if (DG.Test.isInBenchmark && !t.some((e) => e.options?.benchmark ?? value.benchmarks ?? false))\n continue;\n\n const skipped = value.tests == undefined ? undefined : t.every((e: Test) => e.options?.skipReason\n || (options?.test != null && options.test.toLowerCase() !== e.name.toLowerCase()));\n\n if (!skipped) {\n const skippedCount = t.filter((e: Test) =>\n e.options?.skipReason || (options?.test != null && options.test.toLowerCase() !== e.name.toLowerCase())\n ).length;\n stdLog(`Package testing: Started {{${key}}}${skippedCount > 0 ? ` skipped {{${skippedCount}}}` : ''}`);\n value.beforeStatus = await invokeCategoryMethod(value.before, key);\n }\n\n if (options.stressTest) {\n t = t.filter((e) => e.options?.stressTest);\n t = shuffle(t);\n }\n\n if ((options.tags?.length ?? 0) > 0) {\n t = t.filter((e) =>\n e.options?.tags?.some(tag => (options?.tags ?? []).includes(tag))\n );\n }\n\n let res: TestResultExtended[];\n if (value.beforeStatus) {\n // the first line of the reason: the stack trace stays in the category's `before` row\n const reason = value.beforeStatus.split('\\n')[0].trim();\n res = Array.from(t.map((testElem) => {\n return {\n date: new Date().toISOString(),\n category: key,\n name: testElem.name,\n success: false,\n result: reason ? `before() failed: ${reason}` : 'before() failed',\n ms: 0,\n skipped: false,\n logs: '',\n owner: packageOwner,\n package: package_.name,\n widgetsDifference: 0,\n flaking: DG.Test.isReproducing\n };\n }));\n res.forEach((test) => reports.add('package', test));\n } else\n res = await invokeTestsInCategory(value, options, skippingCategories);\n const data: TestResultExtended[] = res.filter((d) => d.result != 'skipped');\n\n if (!skipped)\n value.afterStatus = await invokeCategoryMethod(value.after, key);\n\n // Clear after category\n // grok.shell.closeAll();\n // DG.Balloon.closeAll();\n if (value.afterStatus) {\n stdLog(`Package testing: Category after() {{${key}}} failed`);\n stdLog(`Package testing: Result for {{${key}}} after: ${value.afterStatus}`);\n data.push({\n date: new Date().toISOString(),\n category: key,\n name: 'after',\n success: false,\n result: value.afterStatus,\n ms: 0,\n skipped: false,\n logs: '',\n owner: packageOwner,\n package: package_.name,\n widgetsDifference: 0,\n flaking: DG.Test.isReproducing\n });\n }\n if (value.beforeStatus) {\n stdLog(`Package testing: Category before() {{${key}}} failed`);\n stdLog(`Package testing: Result for {{${key}}} before: ${value.beforeStatus}`);\n data.push({\n date: new Date().toISOString(),\n category: key,\n name: 'before',\n success: false,\n result: value.beforeStatus,\n ms: 0,\n skipped: false,\n logs: '',\n owner: packageOwner,\n package: package_.name,\n widgetsDifference: 0,\n flaking: DG.Test.isReproducing\n });\n }\n results.push(...data);\n\n // If returnOnFail is set and a test failed (other than skipToTest), stop processing more categories\n if (options.returnOnFail && data.some((d) => !d.success && !d.skipped && d.name !== options.skipToTest))\n break;\n }\n } finally {\n resetConsole();\n }\n if (options.testContext!.catchUnhandled && (!DG.Test.isInBenchmark)) {\n let error: string | undefined;\n try {\n await uiSettled('the last test');\n error = await grok.shell.lastError;\n }\n catch (e: any) {\n error = e.message;\n }\n if (error != undefined) {\n const params: any = {\n logs: '',\n date: new Date().toISOString(),\n category: 'Unhandled exceptions',\n name: 'Exception',\n result: error ?? '',\n success: !error,\n ms: 0,\n skipped: false,\n owner: packageOwner ?? '',\n 'package': package_.name,\n widgetsDifference: 0\n };\n stdLog(`Package testing: Unhandled Exception: ${error}`);\n\n results.push({...params, 'flaking': DG.Test.isReproducing && !error});\n (<any>params).package = package_.name;\n reports.add('package', params);\n }\n }\n }\n}\n\n/** The results of one run on their way to the server, one at a time and behind the tests: a test does not wait\n * until the result of the previous one is stored, and a result the server did not take does not fail the run.\n * A queue per run: the runs of a load test share a process, and one queue for all of them made every run wait\n * for the results of all the others. */\nclass ReportQueue {\n sent: Promise<void> = Promise.resolve();\n\n constructor(private enabled: boolean = true) {}\n\n add(type: string, params: object): void {\n if (!this.enabled)\n return;\n this.sent = this.sent.then(() => grok.shell.reportTest(type, params))\n .catch((e: any) => stdWarn(`A test result was not reported: ${e?.message ?? e}`));\n }\n}\n\nasync function getResult(x: any): Promise<string> {\n return `${x.toString()}\\n${x.stack ? (await DG.Logger.translateStackTrace(x.stack)) : ''}`;\n}\n\nasync function execTest(t: Test, predicate: string | undefined, logs: any[],\n testTimeout?: number, packageName?: string, verbose?: boolean, reports: ReportQueue = new ReportQueue()\n): Promise<TestResult | undefined> {\n logs.length = 0;\n let r: TestResult;\n let type: string = 'package';\n const filter = predicate != undefined && (t.name.toLowerCase() !== predicate.toLowerCase());\n let skip = t.options?.skipReason || filter;\n let skipReason = filter ? 'skipped' : t.options?.skipReason;\n\n if (DG.Test.isInBenchmark && !t.options?.benchmark) {\n stdLog(`Package testing: Skipped {{${t.category}}} {{${t.name}}} doesnt available in benchmark mode`);\n return undefined;\n }\n\n if (skip && !DG.Test.isInBenchmark)\n stdLog(`Package testing: Skipped {{${t.category}}} {{${t.name}}}`);\n if (!skip)\n stdLog(`Package testing: Started {{${t.category}}} {{${t.name}}}`);\n const start = Date.now();\n const startDate = new Date(start).toISOString();\n try {\n if (skip)\n r = { name: t.name, owner:t.options?.owner ?? '', category: t.category, logs: '', date: startDate, success: true, result: skipReason!, ms: 0, skipped: true, package: packageName ?? '', flaking: DG.Test.isReproducing};\n else {\n let timeout_ = testTimeout ?? STANDART_TIMEOUT;\n\n if (DG.Test.isProfiling)\n console.profile(`${t.category}: ${t.name}`);\n\n r = { name: t.name, owner:t.options?.owner ?? '', category: t.category, logs: '', date: startDate, success: true, result: (await timeout(t.test, timeout_)).toString() ?? 'OK', ms: 0, skipped: false , package: packageName ?? '', flaking: DG.Test.isReproducing};\n\n if (DG.Test.isProfiling) {\n console.profileEnd(`${t.category}: ${t.name}`);\n grok.shell.info(`Profiling of ${t.category}: ${t.name} finished \\n Please ensure that you have opened DevTools (F12) / Performance panel before test starts.`);\n }\n }\n } catch (x: any) {\n stdError(x);\n r = { name: t.name, owner:t.options?.owner ?? '', category: t.category, logs: '', date: startDate, success: false, result: await getResult(x), ms: 0, skipped: false, package: packageName ?? '', flaking: false};\n }\n if (t.options?.isAggregated && r.result.constructor === DG.DataFrame) {\n const col = r.result.col('success');\n if (col)\n r.success = col.stats.sum === col.length;\n if (!verbose) {\n const df = r.result;\n df.columns.remove('stack');\n df.rows.removeWhere((r) => r.get('success'));\n r.result = df;\n }\n r.result = r.result.toCsv();\n }\n r.logs = logs.join('\\n');\n r.ms = Date.now() - start;\n if (!skip)\n stdLog(`Package testing: Finished {{${t.category}}} {{${t.name}}} with {{${r.success ? 'success' : 'error'}}} for ${r.ms} ms`);\n if (!r.success) {\n stdLog(`Package testing: Result for {{${t.category}}} {{${t.name}}}: ${r.result}`);\n }\n r.category = t.category;\n r.name = t.name;\n r.owner = t.options?.owner ?? '';\n if (!filter) {\n let params = {\n 'success': r.success, 'result': r.result, 'ms': r.ms, 'date': r.date,\n 'skipped': r.skipped, 'category': t.category, 'name': t.name, 'logs': r.logs, 'owner': r.owner,\n 'flaking': DG.Test.isReproducing && r.success,\n 'package': r.package\n };\n if (r.result.constructor == Object) {\n const res = Object.keys(r.result).reduce((acc, k) => ({ ...acc, ['result.' + k]: r.result[k] }), {});\n params = { ...params, ...res };\n }\n\n if (params.result instanceof DG.DataFrame)\n params.result = JSON.stringify(params.result?.toJson()) || '';\n reports.add(type, params);\n }\n return r;\n}\n\nexport function shuffle(array: any[]): any[] {\n const newArr = array.slice();\n newArr.sort(() => Math.random() - 0.5);\n return newArr;\n}\n\n/* Waits [ms] milliseconds */\nexport async function delay(ms: number) {\n await new Promise((r) => setTimeout(r, ms));\n}\n\nexport async function awaitCheck(checkHandler: () => boolean,\n error: string = 'Timeout exceeded', wait: number = 500, interval: number = 50): Promise<any> {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n clearInterval(intervalId);\n reject(new Error(error));\n }, wait);\n // @ts-ignore\n const intervalId: Timeout = setInterval(() => {\n if (checkHandler()) {\n clearInterval(intervalId);\n resolve(null);\n }\n }, interval);\n });\n}\n\n/** Resolves once [condition] holds, checked right away and then every [interval] ms; rejects with [error] after\n * [timeout] ms. Unlike {@link awaitCheck}, it does not wait before the first check, and its default timeout leaves\n * room for a loaded machine. Pass [error] as a function to report the state at the time of the failure. */\nexport async function waitUntil(condition: () => boolean, error: string | (() => string), timeout: number = 10000,\n interval: number = 20): Promise<void> {\n const start = Date.now();\n while (!condition()) {\n if (Date.now() - start > timeout)\n throw new Error(`${typeof error === 'string' ? error : error()} (after ${timeout} ms)`);\n await delay(interval);\n }\n}\n\n/** {@link waitUntil} for a condition that has to ask the server: resolves once [condition] resolves to true, asked\n * right away and again [interval] ms after each answer; rejects with [error] after [timeout] ms. */\nexport async function waitUntilAsync(condition: () => Promise<boolean>, error: string | (() => string),\n timeout: number = 10000, interval: number = 100): Promise<void> {\n const start = Date.now();\n const fail = () => new Error(`${typeof error === 'string' ? error : error()} (after ${timeout} ms)`);\n const expired = new Promise<boolean>((_, reject) => setTimeout(() => reject(fail()), timeout));\n expired.catch(() => {});\n while (!(await Promise.race([condition(), expired]))) {\n if (Date.now() - start > timeout)\n throw fail();\n await delay(interval);\n }\n}\n\n/** Resolves once [viewer] has a box and nothing on its way to the screen on two checks in a row: a resize is\n * noticed only after the layout that caused it. */\nexport async function settled(viewer: _DG.Viewer, timeout: number = 10000): Promise<void> {\n let held = 0;\n await waitUntil(() => {\n const box = viewer.root.getBoundingClientRect();\n held = box.width > 0 && box.height > 0 && !renderPending(viewer) ? held + 1 : 0;\n return held >= 2;\n }, `${viewer.type} is still rendering`, timeout, 16);\n}\n\n/** Resolves once nothing is on its way to the screen, on two checks in a row: no viewer shown in a table view is\n * rendering, and the current view and open dialogs show no loader (`ui.wait`, `ui.setUpdateIndicator`) or busy region\n * (`aria-busy`); rejects after [timeout] ms, naming [what] was still loading. The rest of the shell is not looked at:\n * a test runner's tree and the context panel show loaders of their own while tests run. Resolves at once under\n * Node.js, which has no UI. */\nexport async function uiSettled(what: string, timeout: number = 20000): Promise<void> {\n if (typeof process !== 'undefined')\n return;\n const loading = '.grok-wait .grok-loader, .d4-update-shadow, [aria-busy=\"true\"]';\n const busy = () => [grok.shell.v?.root, ...document.querySelectorAll('.d4-dialog')]\n .some((root) => root != null && Array.from(root.querySelectorAll<HTMLElement>(loading))\n .some((e) => e.offsetParent !== null)) ||\n Array.from(grok.shell.tableViews).some((tv) => Array.from(tv.viewers)\n .some((v) => v.root.offsetParent !== null && renderPending(v)));\n let held = 0;\n await waitUntil(() => {\n held = busy() ? 0 : held + 1;\n return held >= 2;\n }, `${what}: still loading`, timeout, 16);\n}\n\n// platforms before 2026-09 do not report pending renders\nfunction renderPending(viewer: _DG.Viewer): boolean {\n try {\n return viewer.isRenderPending;\n }\n catch (_) {\n return false;\n }\n}\n\n// Returns test execution result or an error in case of timeout\nexport async function timeout(func: () => Promise<any>, testTimeout: number, timeoutReason: string = 'EXECUTION TIMEOUT'): Promise<any> {\n let timeout: any = null;\n const timeoutPromise = new Promise<any>((_, reject) => {\n timeout = setTimeout(() => {\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(timeoutReason);\n }, testTimeout);\n });\n try {\n return await Promise.race([func(), timeoutPromise]);\n } finally {\n if (timeout)\n clearTimeout(timeout);\n }\n}\n\nexport function isDialogPresent(dialogTitle: string): boolean {\n const dialogs = DG.Dialog.getOpenDialogs();\n for (let i = 0; i < dialogs.length; i++) {\n if (dialogs[i].title == dialogTitle)\n return true;\n }\n return false;\n}\n\n/** Expects an asynchronous {@link action} to throw an exception. Use {@link check} to perform\n * deeper inspection of the exception if necessary.\n * @param {function(): Promise<void>} action\n * @param {function(any): boolean} check\n * @return {Promise<void>}\n */\nexport async function expectExceptionAsync(action: () => Promise<void>,\n check?: (exception: any) => boolean): Promise<void> {\n let caught: boolean = false;\n let checked: boolean = false;\n try {\n await action();\n } catch (e) {\n caught = true;\n checked = !check || check(e);\n } finally {\n if (!caught)\n throw new Error('An exception is expected but not thrown');\n if (!checked)\n throw new Error('An expected exception is thrown, but it does not satisfy the condition');\n }\n}\n\nconst catDF = DG.DataFrame.fromColumns([DG.Column.fromStrings('col', ['val1', 'val2', 'val3'])]);\n\n/**\n * Universal test for viewers. It search viewers in DOM by tags: canvas, svg, img, input, h1, a\n * @param {string} v Viewer name\n * @param {_DG.DataFrame} df Dataframe to use. Should have at least 3 rows\n * @param {boolean} options.detectSemanticTypes Specify whether to detect semantic types or not\n * @param {boolean} options.readOnly If set to true, the dataframe will not be modified during the test\n * @param {boolean} options.arbitraryDfTest If set to false, test on arbitrary dataframe\n * (one categorical column) will not be performed\n * @param {object} options List of options (optional)\n * @return {Promise<void>} The test is considered successful if it completes without errors\n */\nexport async function testViewer(v: string, df: _DG.DataFrame, options?: {\n detectSemanticTypes?: boolean, readOnly?: boolean, arbitraryDfTest?: boolean,\n packageName?: string, awaitViewer?: (viewer: _DG.Viewer) => Promise<void>\n}): Promise<void> {\n const packageName = options?.packageName ?? '';\n if (options?.detectSemanticTypes)\n await grok.data.detectSemanticTypes(df);\n const tv = grok.shell.addTableView(df);\n\n try {\n //1. Open, do nothing and close\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded);\n //in case viewer with async rendering - wait for render to complete\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, undefined, options!.awaitViewer);\n\n //2. Open viewer, run selection, filter, etc. and close\n if (!options?.readOnly) {\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, selectFilterChangeCurrent);\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, selectFilterChangeCurrent, options!.awaitViewer);\n }\n\n //2. Open viewer, change options, save layout and close\n let propsAndLayout: { layout: any, savedProps: any } | null = null;\n propsAndLayout = await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, changeOptionsSaveLayout);\n if (options?.awaitViewer)\n propsAndLayout = await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded,\n changeOptionsSaveLayout, options!.awaitViewer)\n\n //3. Load layout\n await testViewerInternal(tv, v, packageName, grok.events.onViewLayoutApplied, loadLayout, undefined, propsAndLayout?.layout,\n { savedProps: propsAndLayout?.savedProps });\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewLayoutApplied, loadLayout, options!.awaitViewer,\n propsAndLayout?.layout, { savedProps: propsAndLayout?.savedProps });\n\n //4. Open viewer on arbitary dataset\n if (options?.arbitraryDfTest !== false) {\n tv.dataFrame = catDF;\n await settled(tv.grid);\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded);\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, undefined, options!.awaitViewer);\n }\n\n //5. Call postponed filtering\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, filterAsync);\n if (options?.awaitViewer)\n await testViewerInternal(tv, v, packageName, grok.events.onViewerAdded, filterAsync, options!.awaitViewer);\n\n } finally {\n // closeAll() is handling by common test workflow\n // grok.shell.closeAll();\n // DG.Balloon.closeAll();\n }\n}\n","/* eslint-disable max-len */\nimport type * as _DG from 'datagrok-api/dg';\ndeclare let DG: typeof _DG;\nimport * as sha256 from 'fast-sha256';\n/**\n * For columns of string type. Checks whether column contains empty values and removes corresponding rows in case user selects to remove.\n *\n */\nexport function removeEmptyStringRows(table: _DG.DataFrame, col: _DG.Column): number[] {\n const cats = col.categories;\n const emptyRawInd = cats.map((val, ind) => !val ? ind : null).filter((it) => it !== null);\n const rawData = [...col.getRawData()];\n const emptyRawsIndexes = [];\n let removedRowsCounter = 0;\n for (let i = 0; i < table.rowCount; i++) {\n if (emptyRawInd.includes(rawData[i])) {\n table.rows.removeAt(i - removedRowsCounter);\n emptyRawsIndexes.push(i);\n removedRowsCounter += 1;\n }\n }\n return emptyRawsIndexes;\n}\n\nexport function hashDataFrame(table: _DG.DataFrame, names?: string[]): Uint8Array {\n names ??= table.columns.names();\n const hasher = new sha256.Hash();\n const order = table.getSortedOrder(names);\n const encoder = new TextEncoder();\n for (const name of names) {\n const column = table.columns.byName(name);\n const dataArray = column.getRawData();\n const isString = column.type == DG.TYPE.STRING;\n const cats = column.categories;\n for (let i = 0; i < dataArray.length; i++) {\n if (isString) {\n const data = cats[dataArray[order[i]]];\n hasher.update(encoder.encode(data));\n } else {\n const data = dataArray[order[i]];\n hasher.update(Uint8Array.from([data]));\n }\n }\n }\n return hasher.digest();\n}\n\nexport const testData = DG.DataFrame.fromCsv(`countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,1,1,1QBS,1,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":2.374499797821045},{\"\"x\"\":0.6000000238418579,\"\"y\"\":2.6242473125457764},{\"\"x\"\":1.100000023841858,\"\"y\"\":2.367267608642578},{\"\"x\"\":1.600000023841858,\"\"y\"\":2.6723148822784424},{\"\"x\"\":2.0999999046325684,\"\"y\"\":2.6537344455718994},{\"\"x\"\":2.5999999046325684,\"\"y\"\":2.3651671409606934},{\"\"x\"\":3.0999999046325684,\"\"y\"\":2.5654284954071045},{\"\"x\"\":3.5999999046325684,\"\"y\"\":2.4160959720611572},{\"\"x\"\":4.099999904632568,\"\"y\"\":2.286726713180542},{\"\"x\"\":4.599999904632568,\"\"y\"\":2.5100042819976807},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.6676985025405884},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.680136501789093},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.3391543924808502},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.09038983285427094},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.19802775979042053}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":7.988070487976074},{\"\"x\"\":0.6000000238418579,\"\"y\"\":7.018453121185303},{\"\"x\"\":1.100000023841858,\"\"y\"\":8.115279197692871},{\"\"x\"\":1.600000023841858,\"\"y\"\":7.486658096313477},{\"\"x\"\":2.0999999046325684,\"\"y\"\":7.396438121795654},{\"\"x\"\":2.5999999046325684,\"\"y\"\":7.477052211761475},{\"\"x\"\":3.0999999046325684,\"\"y\"\":6.913095474243164},{\"\"x\"\":3.5999999046325684,\"\"y\"\":8.01385498046875},{\"\"x\"\":4.099999904632568,\"\"y\"\":6.985900402069092},{\"\"x\"\":4.599999904632568,\"\"y\"\":6.970335960388184},{\"\"x\"\":5.099999904632568,\"\"y\"\":5.448817253112793},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.5534818172454834},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.893947958946228},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6340042352676392},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.8403874039649963}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,2,2,1ZP8,2,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":4.751083850860596},{\"\"x\"\":0.6000000238418579,\"\"y\"\":4.203000068664551},{\"\"x\"\":1.100000023841858,\"\"y\"\":4.415858745574951},{\"\"x\"\":1.600000023841858,\"\"y\"\":4.68414306640625},{\"\"x\"\":2.0999999046325684,\"\"y\"\":4.198400974273682},{\"\"x\"\":2.5999999046325684,\"\"y\"\":4.179222106933594},{\"\"x\"\":3.0999999046325684,\"\"y\"\":4.638473987579346},{\"\"x\"\":3.5999999046325684,\"\"y\"\":4.708553314208984},{\"\"x\"\":4.099999904632568,\"\"y\"\":4.291589260101318},{\"\"x\"\":4.599999904632568,\"\"y\"\":4.038082599639893},{\"\"x\"\":5.099999904632568,\"\"y\"\":3.4349939823150635},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.2194708585739136},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.1920831203460693},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.5352635979652405},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.3346920311450958}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.2139337658882141},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.4269562065601349},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.2441573292016983},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.146635964512825},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.08818462491035461},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.2560656666755676},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.42434045672416687},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.37111231684684753},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.5581737160682678},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.183590054512024},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.5629843473434448},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.3211288452148438},{\"\"x\"\":6.099999904632568,\"\"y\"\":2.229961633682251},{\"\"x\"\":6.599999904632568,\"\"y\"\":2.2560226917266846},{\"\"x\"\":7.099999904632568,\"\"y\"\":2.2142398357391357}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,3,3,2BDJ,3,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":4.32425594329834},{\"\"x\"\":0.6000000238418579,\"\"y\"\":4.668442249298096},{\"\"x\"\":1.100000023841858,\"\"y\"\":4.379785060882568},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.0345139503479},{\"\"x\"\":2.0999999046325684,\"\"y\"\":4.878653526306152},{\"\"x\"\":2.5999999046325684,\"\"y\"\":4.3451313972473145},{\"\"x\"\":3.0999999046325684,\"\"y\"\":4.336992263793945},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.037430286407471},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.0092692375183105},{\"\"x\"\":4.599999904632568,\"\"y\"\":4.151902675628662},{\"\"x\"\":5.099999904632568,\"\"y\"\":3.4066951274871826},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.3732759952545166},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.673728108406067},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.48574790358543396},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.2783052325248718}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.4941710829734802},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.15323974192142487},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.46373432874679565},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.3370431363582611},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.5179030299186707},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.27899765968322754},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.22075064480304718},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.5789918899536133},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.21169911324977875},{\"\"x\"\":4.599999904632568,\"\"y\"\":0.27857646346092224},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.0906332731246948},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.8520300388336182},{\"\"x\"\":6.099999904632568,\"\"y\"\":2.7177059650421143},{\"\"x\"\":6.599999904632568,\"\"y\"\":2.8680918216705322},{\"\"x\"\":7.099999904632568,\"\"y\"\":3.2413077354431152}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,4,4,1IAN,4,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.8190152645111084},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.8421689867973328},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.8740922212600708},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.8924275040626526},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.8249067664146423},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.9327669143676758},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.8522974252700806},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.8174492716789246},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.8394647240638733},{\"\"x\"\":4.599999904632568,\"\"y\"\":0.7139387726783752},{\"\"x\"\":5.099999904632568,\"\"y\"\":0.5561167597770691},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.3276226818561554},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.12479474395513535},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.13006797432899475},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.059702079743146896}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":6.156993389129639},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.236701965332031},{\"\"x\"\":1.100000023841858,\"\"y\"\":6.010560512542725},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.495512962341309},{\"\"x\"\":2.0999999046325684,\"\"y\"\":6.087770462036133},{\"\"x\"\":2.5999999046325684,\"\"y\"\":5.79986572265625},{\"\"x\"\":3.0999999046325684,\"\"y\"\":5.597546577453613},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.520902156829834},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.360654354095459},{\"\"x\"\":4.599999904632568,\"\"y\"\":3.5539746284484863},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.577236294746399},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.0001264810562134},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.9305797815322876},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6033638715744019},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.4203685522079468}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,5,5,4UJ1,5,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":6.496231555938721},{\"\"x\"\":0.6000000238418579,\"\"y\"\":6.42543363571167},{\"\"x\"\":1.100000023841858,\"\"y\"\":7.040063858032227},{\"\"x\"\":1.600000023841858,\"\"y\"\":6.1115403175354},{\"\"x\"\":2.0999999046325684,\"\"y\"\":6.680728435516357},{\"\"x\"\":2.5999999046325684,\"\"y\"\":6.406774520874023},{\"\"x\"\":3.0999999046325684,\"\"y\"\":6.611269474029541},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.889094352722168},{\"\"x\"\":4.099999904632568,\"\"y\"\":6.75344705581665},{\"\"x\"\":4.599999904632568,\"\"y\"\":6.361435890197754},{\"\"x\"\":5.099999904632568,\"\"y\"\":4.1666975021362305},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.172118902206421},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.801048994064331},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.4640021026134491},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.0010357667924836278}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":1.5279096364974976},{\"\"x\"\":0.6000000238418579,\"\"y\"\":1.3559974431991577},{\"\"x\"\":1.100000023841858,\"\"y\"\":1.5246378183364868},{\"\"x\"\":1.600000023841858,\"\"y\"\":1.5567657947540283},{\"\"x\"\":2.0999999046325684,\"\"y\"\":1.4114240407943726},{\"\"x\"\":2.5999999046325684,\"\"y\"\":1.4045010805130005},{\"\"x\"\":3.0999999046325684,\"\"y\"\":1.4769829511642456},{\"\"x\"\":3.5999999046325684,\"\"y\"\":1.4875500202178955},{\"\"x\"\":4.099999904632568,\"\"y\"\":1.2991987466812134},{\"\"x\"\":4.599999904632568,\"\"y\"\":0.922961413860321},{\"\"x\"\":5.099999904632568,\"\"y\"\":0.6520044803619385},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.15350978076457977},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.1078903079032898},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.17276449501514435},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.14066608250141144}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,6,6,2BPW,6,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.0969524160027504},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.028483040630817413},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.22087176144123077},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.0068915546871721745},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.4305879771709442},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.44774115085601807},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.45346319675445557},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.2370593100786209},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.4657953977584839},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.155200719833374},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.2294070720672607},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.4311530590057373},{\"\"x\"\":6.099999904632568,\"\"y\"\":2.33846116065979},{\"\"x\"\":6.599999904632568,\"\"y\"\":2.608201026916504},{\"\"x\"\":7.099999904632568,\"\"y\"\":2.8136143684387207}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":4.95027494430542},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.1754679679870605},{\"\"x\"\":1.100000023841858,\"\"y\"\":5.276752948760986},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.589294910430908},{\"\"x\"\":2.0999999046325684,\"\"y\"\":5.616994857788086},{\"\"x\"\":2.5999999046325684,\"\"y\"\":5.120813846588135},{\"\"x\"\":3.0999999046325684,\"\"y\"\":5.340766906738281},{\"\"x\"\":3.5999999046325684,\"\"y\"\":4.876471042633057},{\"\"x\"\":4.099999904632568,\"\"y\"\":4.94999361038208},{\"\"x\"\":4.599999904632568,\"\"y\"\":5.162564754486084},{\"\"x\"\":5.099999904632568,\"\"y\"\":4.399557590484619},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.7977969646453857},{\"\"x\"\":6.099999904632568,\"\"y\"\":1.0229872465133667},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.48275601863861084},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.10408931970596313}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,7,7,1QBS,7,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":0.3727470338344574},{\"\"x\"\":0.6000000238418579,\"\"y\"\":0.12365014106035233},{\"\"x\"\":1.100000023841858,\"\"y\"\":0.48422467708587646},{\"\"x\"\":1.600000023841858,\"\"y\"\":0.2264465093612671},{\"\"x\"\":2.0999999046325684,\"\"y\"\":0.16821794211864471},{\"\"x\"\":2.5999999046325684,\"\"y\"\":0.3879014551639557},{\"\"x\"\":3.0999999046325684,\"\"y\"\":0.5470244884490967},{\"\"x\"\":3.5999999046325684,\"\"y\"\":0.3419053554534912},{\"\"x\"\":4.099999904632568,\"\"y\"\":0.7655120491981506},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.2346516847610474},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.453336715698242},{\"\"x\"\":5.599999904632568,\"\"y\"\":2.9565491676330566},{\"\"x\"\":6.099999904632568,\"\"y\"\":3.335299491882324},{\"\"x\"\":6.599999904632568,\"\"y\"\":3.240290880203247},{\"\"x\"\":7.099999904632568,\"\"y\"\":3.1107218265533447}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":3.8585598468780518},{\"\"x\"\":0.6000000238418579,\"\"y\"\":3.6077206134796143},{\"\"x\"\":1.100000023841858,\"\"y\"\":3.855252265930176},{\"\"x\"\":1.600000023841858,\"\"y\"\":3.619039297103882},{\"\"x\"\":2.0999999046325684,\"\"y\"\":3.839388370513916},{\"\"x\"\":2.5999999046325684,\"\"y\"\":3.335283041000366},{\"\"x\"\":3.0999999046325684,\"\"y\"\":3.571141481399536},{\"\"x\"\":3.5999999046325684,\"\"y\"\":3.4155046939849854},{\"\"x\"\":4.099999904632568,\"\"y\"\":3.7316646575927734},{\"\"x\"\":4.599999904632568,\"\"y\"\":3.0680155754089355},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.891066551208496},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.6022753715515137},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.7652576565742493},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6875326037406921},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.5828871726989746}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,\"168-46 91ST AVE., 2ND FLR\",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,8,8,1ZP8,8,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":2.1287283897399902},{\"\"x\"\":0.6000000238418579,\"\"y\"\":2.267972230911255},{\"\"x\"\":1.100000023841858,\"\"y\"\":2.398442506790161},{\"\"x\"\":1.600000023841858,\"\"y\"\":2.5130622386932373},{\"\"x\"\":2.0999999046325684,\"\"y\"\":2.3255116939544678},{\"\"x\"\":2.5999999046325684,\"\"y\"\":2.127340793609619},{\"\"x\"\":3.0999999046325684,\"\"y\"\":2.47259783744812},{\"\"x\"\":3.5999999046325684,\"\"y\"\":2.131181478500366},{\"\"x\"\":4.099999904632568,\"\"y\"\":2.090421438217163},{\"\"x\"\":4.599999904632568,\"\"y\"\":2.02299165725708},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.1105059385299683},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.4494485855102539},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.1375635862350464},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.036351121962070465},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.1619771122932434}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":5.6585283279418945},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.911152362823486},{\"\"x\"\":1.100000023841858,\"\"y\"\":5.924920082092285},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.8469438552856445},{\"\"x\"\":2.0999999046325684,\"\"y\"\":5.929472923278809},{\"\"x\"\":2.5999999046325684,\"\"y\"\":6.190037727355957},{\"\"x\"\":3.0999999046325684,\"\"y\"\":6.236179828643799},{\"\"x\"\":3.5999999046325684,\"\"y\"\":6.141019344329834},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.295210838317871},{\"\"x\"\":4.599999904632568,\"\"y\"\":5.265801906585693},{\"\"x\"\":5.099999904632568,\"\"y\"\":3.3722851276397705},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.8299226760864258},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.32690900564193726},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.6274543404579163},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.8441857099533081}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,\"168-46 91ST AVE., 2ND FLR\",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,9,9,2BDJ,9,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":3.7821109294891357},{\"\"x\"\":0.6000000238418579,\"\"y\"\":3.542433023452759},{\"\"x\"\":1.100000023841858,\"\"y\"\":3.7008674144744873},{\"\"x\"\":1.600000023841858,\"\"y\"\":3.717301607131958},{\"\"x\"\":2.0999999046325684,\"\"y\"\":4.024452209472656},{\"\"x\"\":2.5999999046325684,\"\"y\"\":4.013899326324463},{\"\"x\"\":3.0999999046325684,\"\"y\"\":3.945094347000122},{\"\"x\"\":3.5999999046325684,\"\"y\"\":3.866621971130371},{\"\"x\"\":4.099999904632568,\"\"y\"\":3.7461626529693604},{\"\"x\"\":4.599999904632568,\"\"y\"\":3.3454740047454834},{\"\"x\"\":5.099999904632568,\"\"y\"\":2.61944317817688},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.999405026435852},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.46259793639183044},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.054134611040353775},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.05711187422275543}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":5.458079814910889},{\"\"x\"\":0.6000000238418579,\"\"y\"\":5.554427146911621},{\"\"x\"\":1.100000023841858,\"\"y\"\":5.799983024597168},{\"\"x\"\":1.600000023841858,\"\"y\"\":5.364140033721924},{\"\"x\"\":2.0999999046325684,\"\"y\"\":5.864485740661621},{\"\"x\"\":2.5999999046325684,\"\"y\"\":5.4509806632995605},{\"\"x\"\":3.0999999046325684,\"\"y\"\":5.702574729919434},{\"\"x\"\":3.5999999046325684,\"\"y\"\":5.7314534187316895},{\"\"x\"\":4.099999904632568,\"\"y\"\":5.5123443603515625},{\"\"x\"\":4.599999904632568,\"\"y\"\":5.724395751953125},{\"\"x\"\":5.099999904632568,\"\"y\"\":4.354506969451904},{\"\"x\"\":5.599999904632568,\"\"y\"\":1.7307666540145874},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.6305936574935913},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.035183437168598175},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.7575169205665588}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,\"COMPND \nATOM \nEND\",flag,9,10,1IAN,10,1.23,<chart></chart>,\"{\"\"series\"\":[{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitFunction\"\":\"\"sigmoid\"\",\"\"fitLineColor\"\":\"\"#1f77b4\"\",\"\"pointColor\"\":\"\"#1f77b4\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":1.1057683229446411},{\"\"x\"\":0.6000000238418579,\"\"y\"\":1.1019697189331055},{\"\"x\"\":1.100000023841858,\"\"y\"\":1.0818607807159424},{\"\"x\"\":1.600000023841858,\"\"y\"\":1.062997817993164},{\"\"x\"\":2.0999999046325684,\"\"y\"\":1.046447515487671},{\"\"x\"\":2.5999999046325684,\"\"y\"\":1.1217249631881714},{\"\"x\"\":3.0999999046325684,\"\"y\"\":1.2166996002197266},{\"\"x\"\":3.5999999046325684,\"\"y\"\":1.215477705001831},{\"\"x\"\":4.099999904632568,\"\"y\"\":1.0581893920898438},{\"\"x\"\":4.599999904632568,\"\"y\"\":1.1747995615005493},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.0181127786636353},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.5344523191452026},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.2569526433944702},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.1912207305431366},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.15060538053512573}]},{\"\"name\"\":\"\"Run:2023-08-08\"\",\"\"fitLineColor\"\":\"\"#ffbb78\"\",\"\"pointColor\"\":\"\"#ffbb78\"\",\"\"showPoints\"\":\"\"points\"\",\"\"parameters\"\":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],\"\"points\"\":[{\"\"x\"\":0.10000000149011612,\"\"y\"\":3.0498509407043457},{\"\"x\"\":0.6000000238418579,\"\"y\"\":2.805217742919922},{\"\"x\"\":1.100000023841858,\"\"y\"\":3.3415253162384033},{\"\"x\"\":1.600000023841858,\"\"y\"\":3.0549843311309814},{\"\"x\"\":2.0999999046325684,\"\"y\"\":3.250074863433838},{\"\"x\"\":2.5999999046325684,\"\"y\"\":3.0432586669921875},{\"\"x\"\":3.0999999046325684,\"\"y\"\":3.265852451324463},{\"\"x\"\":3.5999999046325684,\"\"y\"\":2.9475724697113037},{\"\"x\"\":4.099999904632568,\"\"y\"\":3.1929898262023926},{\"\"x\"\":4.599999904632568,\"\"y\"\":2.7460060119628906},{\"\"x\"\":5.099999904632568,\"\"y\"\":1.6175861358642578},{\"\"x\"\":5.599999904632568,\"\"y\"\":0.3006608486175537},{\"\"x\"\":6.099999904632568,\"\"y\"\":0.3444803059101105},{\"\"x\"\":6.599999904632568,\"\"y\"\":0.015537971630692482},{\"\"x\"\":7.099999904632568,\"\"y\"\":0.5527358055114746}]}],\"\"chartOptions\"\":{\"\"xAxisName\"\":\"\"Conc.\"\",\"\"yAxisName\"\":\"\"Activity\"\",\"\"title\"\":\"\"Dose-Response curves\"\"}}\",text,,\n,,,,,,,,,,,,,,,,,,,,,`);\nconst png = Uint8Array.from(atob('iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAIAAACDRijCAAAAQElEQVR4nGO8Y2PDQA3ARBVTGKhoEAucpXz4MBn6' +\n '79ra0sxFaDYQBMqoPhh8gc00fA1iQeOTl5oYqOgixuGbaQF0Bgp24E7RmwAAAABJRU5ErkJggg=='), (c) => c.charCodeAt(0));\ntestData.columns.add(DG.Column.fromList(DG.TYPE.BYTE_ARRAY, 'BinaryImage', Array.from({length: 11}, () => png)));\n","import * as DG from 'datagrok-api/dg';\nimport {runTests, tests, TestContext, initAutoTests as initTests} from '@datagrok-libraries/test/src/test';\n\nexport const _package = new DG.Package();\nexport {tests};\n\n//name: test\n//input: string category {optional: true}\n//input: string test {optional: true}\n//input: object testContext {optional: true}\n//output: dataframe result\nexport async function test(category: string, test: string, testContext: TestContext): Promise<DG.DataFrame> {\n const data = await runTests({category, test, testContext});\n return DG.DataFrame.fromObjects(data)!;\n}\n\n//name: initAutoTests\nexport async function initAutoTests() {\n await initTests(_package, _package.getModule('package-test.js'));\n}\n"],"names":["define","e","Uint32Array","f","Int32Array","Uint8Array","Error","Object","Symbol","DG","atob","Array","console","o","Promise","i","window","n","grok","RegExp","r","parseInt","Date","JSON","setTimeout","t","process","document","clearTimeout","_package","test","category","testContext","data","Math","s","globalThis","initAutoTests","initTests"],"mappings":"4CAAA,AAAC,SAAU,CAAI,CAAE,CAAO,EAEpB,IAAI,EAAU,CAAC,EACf,EAAQ,GACR,IAAI,EAAS,EAAQ,OAAU,CAC/B,IAAK,IAAI,KAAK,EACV,CAAM,CAAC,EAAE,CAAG,CAAO,CAAC,EAAE,AAGQ,AAA0B,WAA1B,OAAO,EAAO,OAAO,CACnD,EAAO,OAAO,CAAG,EACV,AAAkB,YAAlB,OAAOA,QAAyBA,OAAO,GAAG,CACjDA,OAAO,WAAa,OAAO,CAAQ,GAEnC,EAAK,MAAM,CAAG,CAEtB,EAAG,IAAI,CAAE,SAASC,CAAO,EACzB,YACAA,CAAAA,EAAQ,UAAU,CAAG,GAiBrBA,EAAQ,YAAY,CAAG,GACvBA,EAAQ,SAAS,CAAG,GAEpB,IAAI,EAAI,IAAIC,YAAY,CACpB,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,UAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,UAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WAAY,WAChD,WAAY,WAAY,WAAY,WACvC,EACD,SAAS,EAAW,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAA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