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MAAME,QAAU,SACvDL,GACP,CA6BQ0B,EAER,CAEKC,E","sources":["webpack://ch.enlightware.gamecreator/webpack/runtime/async module","webpack://ch.enlightware.gamecreator/webpack/runtime/load script","webpack://ch.enlightware.gamecreator/./src/apps/common/parameters.ts","webpack://ch.enlightware.gamecreator/./src/apps/common/products.ts","webpack://ch.enlightware.gamecreator/./src/apps/common/roles.ts","webpack://ch.enlightware.gamecreator/./src/apps/common/version.ts","webpack://ch.enlightware.gamecreator/./src/translator/translator.ts","webpack://ch.enlightware.gamecreator/./src/utils/async.ts","webpack://ch.enlightware.gamecreator/./src/utils/buffers.ts","webpack://ch.enlightware.gamecreator/./src/utils/text.ts","webpack://ch.enlightware.gamecreator/./src/utils/types.ts","webpack://ch.enlightware.gamecreator/./src/utils/uuid-generator.ts","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/native.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/regex.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/rng.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/v1.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/v4.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/parse.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/sha1.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/v5.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/v35.js","webpack://ch.enlightware.gamecreator/./node_modules/uuid/dist/esm-browser/validate.js","webpack://ch.enlightware.gamecreator/webpack/bootstrap","webpack://ch.enlightware.gamecreator/webpack/runtime/compat get default export","webpack://ch.enlightware.gamecreator/webpack/runtime/define property getters","webpack://ch.enlightware.gamecreator/webpack/runtime/ensure chunk","webpack://ch.enlightware.gamecreator/webpack/runtime/get javascript chunk filename","webpack://ch.enlightware.gamecreator/webpack/runtime/get mini-css chunk filename","webpack://ch.enlightware.gamecreator/webpack/runtime/global","webpack://ch.enlightware.gamecreator/webpack/runtime/hasOwnProperty shorthand","webpack://ch.enlightware.gamecreator/webpack/runtime/make namespace object","webpack://ch.enlightware.gamecreator/webpack/runtime/wasm loading","webpack://ch.enlightware.gamecreator/webpack/runtime/publicPath","webpack://ch.enlightware.gamecreator/webpack/runtime/jsonp chunk loading","webpack://ch.enlightware.gamecreator/./src/apps/full/bootstrap.ts","webpack://ch.enlightware.gamecreator/./src/apps/common/bootstrap-failed.ts"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var inProgress = {};\nvar dataWebpackPrefix = \"ch.enlightware.gamecreator:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { LoggedInUserInfo, OrganisationMembershipApi } from 'network/api-types';\nimport { productsProvideFeature } from './products';\nimport { roleProvidesFeature } from './roles';\n\nlet loggedInUserInfo: LoggedInUserInfo | null = null;\n\nexport function setLoggedInUserInfo(userInfo: LoggedInUserInfo | null) {\n\tloggedInUserInfo = userInfo;\n}\nexport function getLoggedInUserInfo() {\n\treturn loggedInUserInfo;\n}\nexport function isUserLoggedIn() {\n\treturn loggedInUserInfo !== null;\n}\n\n// Get url parameters and page name\nexport const urlParams = new URLSearchParams(window.location.search);\nconst [hasHtmlExt, pageStemName] = ((): [boolean, string] => {\n\tconst pathname = window.location.pathname;\n\tconst lastPathSlashPos = pathname.lastIndexOf('/');\n\tconst pageName = pathname.substring(lastPathSlashPos + 1);\n\tconst hasHtmlExt = pageName.endsWith('.html');\n\treturn [\n\t\thasHtmlExt,\n\t\thasHtmlExt ? pageName.substring(0, pageName.length - 5) : pageName\n\t];\n})();\nexport const urlParamsFirstElement = (() => {\n\tconst iter = urlParams.entries().next();\n\treturn (\n\t\titer.done\n\t\t|| iter.value[1] !== '' // When the first key has a non empty value assigned then the key is not the value we are interested in.\n\t) ? null : iter.value[0];\n})();\n\n// code for redirects\nconst isShowRedirect = pageStemName === 'show' && !hasHtmlExt;\nconst isPlayRedirect = pageStemName === 'play' && !hasHtmlExt;\n\nconst LanguageKey = 'gc-settingsLang';\n\nconst DEV_PATH_PREFIX = '/dev/';\n\nexport function extractBranchFromPath(path?: string) {\n\tif (path === undefined) {\n\t\treturn null;\n\t}\n\tif (path.startsWith(DEV_PATH_PREFIX)) {\n\t\tconst indexNextSlash = path.indexOf('/', DEV_PATH_PREFIX.length);\n\t\treturn path.substring(DEV_PATH_PREFIX.length, indexNextSlash === -1 ? path.length : indexNextSlash);\n\t} else {\n\t\treturn null;\n\t}\n}\n\n// Get parameters and features from URL\nexport class Parameters {\n\tstatic readonly storageLocation = urlParams.get('storage');\n\tstatic readonly remoteCamId = urlParams.get('remoteCam');\n\tstatic readonly auth = urlParams.get('auth');\n\tstatic readonly jsId = urlParams.get('jsId');\n\tstatic readonly isUnderTest = urlParams.get('__testing__') !== null;\n\tstatic readonly workspaceIdFromUrl = isShowRedirect ?\n\t\turlParamsFirstElement :\n\t\turlParams.get('ws');\n\tstatic readonly primaryWorkspaceIdFromUrl = urlParams.get('pws');\n\tstatic readonly gameIdFromUrl = isPlayRedirect ?\n\t\turlParamsFirstElement :\n\t\turlParams.get('game');\n\tstatic readonly forumUriFromUrl = urlParams.get('forum');\n\tstatic readonly devBranch = extractBranchFromPath(window.location.pathname);\n\tstatic get customExampleWorkspaceId() {\n\t\treturn urlParams.get('ews') || loggedInUserInfo?.attributes.get('exampleWs') || null;\n\t}\n\tstatic get customTemplateWorkspaceId() {\n\t\treturn urlParams.get('tws') || loggedInUserInfo?.attributes.get('templateWs') || null;\n\t}\n\tstatic readonly trailer = urlParams.get('trailer');\n\tstatic readonly trailerDelay = urlParams.get('trailerDelay');\n\tstatic readonly llmAccount = urlParams.get('llmAccount');\n\tstatic readonly llmAuth = urlParams.get('llmAuth');\n\tstatic get language() {\n\t\treturn (\n\t\t\turlParams.get('lang') ??\n\t\t\tlocalStorage.getItem(LanguageKey) ??\n\t\t\tnavigator.language.substring(0, 2)\n\t\t);\n\t}\n\tstatic set language(lang: string) {\n\t\tlocalStorage.setItem(LanguageKey, lang);\n\t\tlocation.reload();\n\t}\n}\nif (Parameters.workspaceIdFromUrl) {\n\tconsole.info(`From URL: workspaceId = '${Parameters.workspaceIdFromUrl}'`);\n}\nif (Parameters.gameIdFromUrl) {\n\tconsole.info(`From URL: gameId = '${Parameters.gameIdFromUrl}.`);\n}\n\n// optimisation, as devMode is queried often\n// eslint-disable-next-line no-underscore-dangle\nconst _devMode = (Parameters.storageLocation === 'local') || urlParams.get('dev') !== null;\n\nconst AnalyticsEnabledKey = 'gc-analyticsEnabled';\n\nconst FeatureNames = [\n\t'hideForum',\n\t'automaticLogin',\n\t'paidBasic',\n\t'hideShareToDuplicate',\n\t'assumeOnboarded',\n\t'canManageUsers',\n\t'canShop',\n\t'teacher'\n] as const;\nexport type FeatureName = typeof FeatureNames[number];\n\nfunction organisationsProvidesFeature(org: OrganisationMembershipApi | null, featureName: FeatureName) {\n\treturn roleProvidesFeature(org?.role ?? null, featureName);\n}\n\nexport class Features {\n\tprivate static get(featureName: FeatureName, allowUrlParameterOverride = false) {\n\t\treturn (\n\t\t\tallowUrlParameterOverride && urlParams.get(featureName) !== null\n\t\t\t||\n\t\t\tloggedInUserInfo && (\n\t\t\t\tloggedInUserInfo.features.includes(featureName)\n\t\t\t\t|| productsProvideFeature(loggedInUserInfo.userInfo.products, featureName)\n\t\t\t)\n\t\t\t||\n\t\t\torganisationsProvidesFeature(loggedInUserInfo?.userInfo?.organisationMembership ?? null, featureName)\n\t\t\t||\n\t\t\tfalse\n\t\t);\n\t}\n\n\t// Current feature state\n\tstatic readonly devMode = _devMode;\n\tstatic readonly localhost = window.location.hostname === 'localhost';\n\tstatic readonly masterBranch = window.location.pathname.startsWith('/dev/master/');\n\tstatic readonly testAuthentication = Parameters.auth === 'test' || (Features.localhost && !Parameters.storageLocation);\n\tstatic readonly experimentalMode = urlParams.get('experimental') !== null;\n\tstatic readonly forceGL1 = urlParams.get('gl1') !== null;\n\tstatic readonly debugPaint = urlParams.get('debugPaint') !== null;\n\tstatic readonly assumeMousePresent = urlParams.get('assumeMousePresent') !== null;\n\tstatic readonly barePlayIntro = urlParams.get('barePlayIntro') !== null;\n\tstatic readonly hideRuntimeMore = urlParams.get('hideRuntimeMore') !== null;\n\tstatic readonly disableFullscreen = urlParams.get('disableFullscreen') !== null;\n\tstatic readonly hideVariablesInPlay = urlParams.get('hideVars') !== null;\n\tstatic readonly logOnLocalhost = urlParams.get('logOnLocalhost') !== null;\n\n\tstatic get loggedIn() {\n\t\treturn loggedInUserInfo !== null;\n\t}\n\n\tstatic paidOverride = this.localhost;\n\tstatic get paid() {\n\t\treturn Features.paidOverride || (Features.get('paidBasic') ?? false);\n\t}\n\tstatic get automaticLogin() {\n\t\treturn Features.get('automaticLogin', true);\n\t}\n\tstatic get hideForum() {\n\t\treturn Features.get('hideForum', true);\n\t}\n\tstatic get hideShareToDuplicate() {\n\t\treturn Features.get('hideShareToDuplicate', true);\n\t}\n\tstatic get assumeOnboarded() {\n\t\treturn Features.get('assumeOnboarded', true);\n\t}\n\tstatic get canManageUsers() {\n\t\treturn Features.get('canManageUsers');\n\t}\n\tstatic get canShop() {\n\t\treturn Features.get('canShop');\n\t}\n\tstatic get teacher() {\n\t\treturn Features.get('teacher');\n\t}\n\n\tstatic get analyticsEnabled() {\n\t\tconst value = localStorage.getItem(AnalyticsEnabledKey);\n\t\treturn value !== null ? value === 'true' : true;\n\t}\n\tstatic set analyticsEnabled(value: boolean) {\n\t\tlocalStorage.setItem(AnalyticsEnabledKey, value.toString());\n\t}\n\n\tstatic pnnsOverride = this.localhost;\n\tstatic get pnnScript() {\n\t\treturn Features.pnnsOverride ||\n\t\t\t(loggedInUserInfo ? loggedInUserInfo.userInfo.groups.includes('f/pnnScript') : false);\n\t}\n\n\tstatic readonly twoPlayers = true;\n}\n\nif (Features.devMode) {\n\tconsole.info(`Running in developer mode. (storage = ${Parameters.storageLocation})`);\n}\n\n\n","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { Product, ProductWithLicenceId } from 'network/api-types';\nimport { FeatureName } from './parameters';\n\nconst ProductFeatures: [Product, FeatureName[]][] = [\n\t['HomePremium', ['paidBasic']],\n\t['Classroom', ['paidBasic', 'assumeOnboarded']],\n];\nconst ProductFeaturesMap: ReadonlyMap = new Map(ProductFeatures);\n\nexport function latestFeatureExpiration(products: ProductWithLicenceId[], feature: FeatureName) {\n\tlet delta = Number.NEGATIVE_INFINITY;\n\tfor (const { product, expiresInSecs } of products) {\n\t\tif (ProductFeaturesMap.get(product)?.includes(feature) ?? false) {\n\t\t\tif (expiresInSecs === null) {\n\t\t\t\tdelta = Number.POSITIVE_INFINITY;\n\t\t\t} else {\n\t\t\t\tdelta = Math.max(delta, expiresInSecs);\n\t\t\t}\n\t\t}\n\t}\n\treturn delta;\n}\n\nexport function productsProvideFeature(products: ProductWithLicenceId[], feature: FeatureName) {\n\treturn latestFeatureExpiration(products, feature) >= 0;\n}\n","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { FeatureName } from './parameters';\nimport { OrganisationRole } from 'network/api-types';\n\nconst FeatureRoles: [FeatureName, (OrganisationRole | null)[]][] = [\n\t['canManageUsers', ['SchoolOwner', 'Teacher']],\n\t['canShop', ['SchoolOwner', 'HomeOwner', null]],\n\t['teacher', ['Teacher', 'SchoolOwner']],\n];\nconst FeatureRoleMap: ReadonlyMap = new Map(FeatureRoles);\n\nexport function roleProvidesFeature(role: OrganisationRole | null, feature: FeatureName) {\n\treturn FeatureRoleMap.get(feature)?.includes(role) ?? false;\n}\n","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __CODE_VERSION__: string;\nexport const CodeVersion = __CODE_VERSION__;\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __RUST_VERSION__: string;\nexport const RustVersion = __RUST_VERSION__;\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __BUILD_FLAGS__: string;\nexport const BuildFlags = __BUILD_FLAGS__;\n\nexport const UserVersion = 'alpha 1';\n\nexport function showVersion(backendVersion?: string) {\n\tconst serverVersion = backendVersion !== undefined ? backendVersion : 'unknown backend';\n\tconst buildFlags = __BUILD_FLAGS__.length !== 0 ? `, ${__BUILD_FLAGS__}` : '';\n\tconsole.info(`Version ${UserVersion}. Build ${CodeVersion} (${RustVersion}${buildFlags}), ${serverVersion}.`);\n\t// const userText = `${UserVersion}
${CodeVersion}`;\n\tconst userText = `${CodeVersion}`;\n\tfor (const element of document.getElementsByClassName('version-userText')) {\n\t\telement.innerHTML = userText;\n\t}\n\tconst fullText = `Candli ver. ${UserVersion} (build ${CodeVersion}${buildFlags}, ${serverVersion})`;\n\tfor (const element of document.getElementsByClassName('version-fullText')) {\n\t\telement.innerHTML = fullText;\n\t}\n}\n","/**\n * The runtime part of the l10n\n * @module translator\n * @preferred\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { defined, dynamicCast, toStr } from 'utils/types';\n\ninterface FormattableString {\n\targs(...args: any[]): string;\n}\n\ntype TranslationVariants = [string, string][];\nexport type TranslationDictionary = Map;\nexport type IntlTranslations = Map;\n\nlet lang = 'en';\nlet dictionary: TranslationDictionary | null = null;\n\nfunction setTranslations(newDictionary: TranslationDictionary) {\n\tdictionary = newDictionary;\n}\n\nexport function addTranslations(translations: IntlTranslations) {\n\tconst newDictionary = translations.get(lang);\n\tif (newDictionary !== undefined) {\n\t\tif (dictionary === null) {\n\t\t\tdictionary = newDictionary;\n\t\t} else {\n\t\t\tdictionary = new Map([...newDictionary, ...dictionary]);\n\t\t}\n\t} else {\n\t\tif (lang !== 'en') {\n\t\t\tconsole.warn(`Language \"${lang}\" not found in provided translations!`);\n\t\t}\n\t}\n}\n\nfunction getVariant(variants: TranslationVariants, disambiguation?: string) {\n\tif (disambiguation !== undefined) {\n\t\tfor (const [variant, translation] of variants) {\n\t\t\tif (variant === disambiguation) {\n\t\t\t\treturn translation;\n\t\t\t}\n\t\t}\n\t}\n\treturn defined(variants[0])[1];\n}\n\nexport function qsTr(s: string, disambiguation?: string): FormattableString {\n\tconst variants = dictionary?.get(s);\n\tif (variants !== undefined) {\n\t\treturn new TranslatedString(getVariant(variants, disambiguation));\n\t} else {\n\t\treturn new TranslatedString(s);\n\t}\n}\n\nexport function qsT(s: string, disambiguation?: string): string {\n\tconst variants = dictionary?.get(s);\n\tif (variants !== undefined) {\n\t\treturn getVariant(variants, disambiguation);\n\t} else {\n\t\treturn s;\n\t}\n}\n\nexport function capitalise(s: string): string {\n\tif (s.length === 0) {\n\t\treturn '';\n\t}\n\treturn s.charAt(0).toUpperCase() + s.slice(1);\n}\n\nexport class TranslatedString implements FormattableString {\n\tconstructor(private translatedString: string) { }\n\targs(...args: any[]): string {\n\t\tlet s = this.translatedString;\n\t\tlet index = 1;\n\t\tfor (const arg of args) {\n\t\t\tconst pattern = `%${index}`;\n\t\t\ts = s.replaceAll(pattern, toStr(arg));\n\t\t\tindex += 1;\n\t\t}\n\t\treturn s;\n\t}\n\ttoString() {\n\t\treturn this.translatedString;\n\t}\n}\n\nfunction translateDOM(dict: TranslationDictionary) {\n\tconst translateNode = (node: Node, doTranslate = true) => {\n\t\tconst elementNode = dynamicCast(Element, node);\n\t\tif (elementNode !== null) {\n\t\t\tfor (const attr of elementNode.attributes) {\n\t\t\t\tif (attr.name === 'title' && doTranslate) {\n\t\t\t\t\tconst key = attr.value;\n\t\t\t\t\tconst translation = dict.get(key);\n\t\t\t\t\tif (translation !== undefined) {\n\t\t\t\t\t\tattr.value = defined(translation[0])[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.debug(`No translation found for title \"${key}\"`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (attr.name === 'translate') {\n\t\t\t\t\tdoTranslate = attr.value !== 'no';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst textNode = dynamicCast(Text, node);\n\t\tif (textNode !== null) {\n\t\t\tif (!doTranslate) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst key = textNode.data;\n\t\t\tconst trimmedKey = key.trim();\n\t\t\tif (trimmedKey.length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst translation = dict.get(key);\n\t\t\tif (translation !== undefined) {\n\t\t\t\ttextNode.data = defined(translation[0])[1];\n\t\t\t} else {\n\t\t\t\tconsole.debug(`No translation found for text \"${key}\"`);\n\t\t\t}\n\t\t} else {\n\t\t\tfor (const child of node.childNodes) {\n\t\t\t\ttranslateNode(child, doTranslate);\n\t\t\t}\n\t\t}\n\t};\n\ttranslateNode(document.getRootNode());\n}\n\nexport type TranslationPairs = Array<[string, string] | [string, string, string]>;\n\nexport function translationJsonToDictionary(pairs: TranslationPairs) {\n\tconst dict: TranslationDictionary = new Map();\n\tfor (const [key, translation, disambiguation] of pairs) {\n\t\tconst disambiguationText = disambiguation ?? '';\n\t\tconst entry = dict.get(key) ?? [];\n\t\tentry.push([disambiguationText, translation]);\n\t\tentry.sort((a, b) => a[0].localeCompare(b[0]));\n\t\tdict.set(key, entry);\n\t}\n\treturn dict;\n}\n\nimport TranslationFrHTML from '../../translations/translation-html-fr.json';\nimport TranslationDeHTML from '../../translations/translation-html-de.json';\nimport TranslationPtHTML from '../../translations/translation-html-pt.json';\nimport TranslationThHTML from '../../translations/translation-html-th.json';\nconst TranslationsHTML: IntlTranslations = new Map([\n\t['fr', translationJsonToDictionary(TranslationFrHTML as TranslationPairs)],\n\t['de', translationJsonToDictionary(TranslationDeHTML as TranslationPairs)],\n\t['pt', translationJsonToDictionary(TranslationPtHTML as TranslationPairs)],\n\t['th', translationJsonToDictionary(TranslationThHTML as TranslationPairs)]\n]);\n\nimport TranslationFrTS from '../../translations/translation-typescript-fr.json';\nimport TranslationDeTS from '../../translations/translation-typescript-de.json';\nimport TranslationPtTS from '../../translations/translation-typescript-pt.json';\nimport TranslationThTS from '../../translations/translation-typescript-th.json';\nimport { Parameters } from 'apps/common/parameters';\nconst TranslationsTS: IntlTranslations = new Map([\n\t['fr', translationJsonToDictionary(TranslationFrTS as TranslationPairs)],\n\t['de', translationJsonToDictionary(TranslationDeTS as TranslationPairs)],\n\t['pt', translationJsonToDictionary(TranslationPtTS as TranslationPairs)],\n\t['th', translationJsonToDictionary(TranslationThTS as TranslationPairs)]\n]);\n\nexport function loadBrowserLanguage() {\n\tconst newLang = Parameters.language;\n\tconsole.debug(`Detected language \"${newLang}\" from localStorage, URL search params or browser language.`);\n\tif (newLang === 'en') {\n\t\tconsole.debug('Not loading translations for English!');\n\t\treturn;\n\t}\n\tconst htmlTranslation = TranslationsHTML.get(newLang);\n\tconst tsTranslation = TranslationsTS.get(newLang);\n\tif (htmlTranslation !== undefined && tsTranslation !== undefined) {\n\t\ttranslateDOM(htmlTranslation);\n\t\tsetTranslations(tsTranslation);\n\t\tdocument.documentElement.setAttribute('lang', newLang);\n\t\tlang = newLang;\n\t} else {\n\t\tif (htmlTranslation === undefined) {\n\t\t\tconsole.warn(`No HTML translation found for language \"${newLang}\", not changing language.`);\n\t\t}\n\t\tif (tsTranslation === undefined) {\n\t\t\tconsole.warn(`No Typescript translation found for language \"${newLang}\", not changing language.`);\n\t\t}\n\t}\n}\n\nexport function getLanguage() {\n\treturn lang;\n}","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nexport async function sleep(durationSeconds: number) {\n\treturn new Promise((resolve) => { setTimeout(resolve, durationSeconds * 1000); });\n}\n\nexport function promiseAny(promises: PromiseLike[]): PromiseLike {\n\treturn Promise.all(\n\t\tpromises.map((promise) =>\n\t\t\tpromise.then((val) => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/only-throw-error\n\t\t\t\tthrow val;\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\t}, (reason) => reason)\n\t\t)\n\t).then((reasons) => {\n\t\t// eslint-disable-next-line @typescript-eslint/only-throw-error\n\t\tthrow reasons;\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t}, (firstResolved) => firstResolved);\n}\n\nexport async function asyncFilter(arr: T[], predicate: (_: T) => PromiseLike): Promise {\n\tconst results = await Promise.all(arr.map(predicate));\n\treturn arr.filter((_v, index) => results[index]);\n}\n\ntype CallbackObject = {\n\t[K in CN]: null | ((_: CA) => void);\n};\n\ninterface CancellableCallbackPromiseInterface extends PromiseLike {\n\treadonly identifier: string;\n\tcancelCallback(): void;\n}\n\n// Note: due to a bug in Typescript, if argument callbackHolder is before testFn, compilation fails.\n// Note: the executor is called twice, see\n// https://stackoverflow.com/questions/53146565/constructor-of-a-custom-promise-class-is-called-twice-extending-standard-promis\n// and https://v8.dev/blog/fast-async#await-under-the-hood\nexport class CancellableCallbackPromise\n\textends Promise\n\timplements CancellableCallbackPromiseInterface {\n\tconstructor(\n\t\tpublic identifier: string,\n\t\ttestFn: (arg: CA) => boolean,\n\t\tprivate callbackHolder: CallbackObject,\n\t\tprivate callbackName: CN\n\t) {\n\t\tsuper(\n\t\t\t(resolve, _) => {\n\t\t\t\tcallbackHolder[callbackName] = (arg: CA) => {\n\t\t\t\t\tif (testFn(arg)) {\n\t\t\t\t\t\tcallbackHolder[callbackName] = null;\n\t\t\t\t\t\tconsole.debug(`CancellableCallbackPromise: Resolving ${identifier}`);\n\t\t\t\t\t\tresolve(identifier);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t\tconsole.debug(`CancellableCallbackPromise: Creating ${identifier}`);\n\t}\n\tcancelCallback() {\n\t\tthis.callbackHolder[this.callbackName] = null;\n\t\tconsole.debug(`CancellableCallbackPromise: Cancelling ${this.identifier}`);\n\t}\n}\n// HACK to work around the way await deals with promise creation (see above)\nCancellableCallbackPromise.prototype.constructor = Promise;\n\n// we have to do this because keyof GlobalEventHandlers is too hard to parse for Typescript :-(\ntype CallbackAbleEvents = 'onclick';\n\nexport class CancellableEventPromise\n\textends Promise\n\timplements CancellableCallbackPromiseInterface {\n\tconstructor(\n\t\tpublic identifier: string,\n\t\tprivate target: HTMLElement,\n\t\tprivate eventName: K\n\t) {\n\t\tsuper(\n\t\t\t(resolve, _) => {\n\t\t\t\ttarget[eventName] = () => {\n\t\t\t\t\ttarget[eventName] = null;\n\t\t\t\t\tconsole.debug(`CancellableEventPromise: Resolving ${identifier}`);\n\t\t\t\t\tresolve(identifier);\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t\tconsole.debug(`CancellableEventPromise: Creating ${identifier}`);\n\t}\n\tcancelCallback() {\n\t\tthis.target[this.eventName] = null;\n\t\tconsole.debug(`CancellableEventPromise: Cancelling ${this.identifier}`);\n\t}\n}\n// HACK to work around the way await deals with promise creation (see above)\nCancellableEventPromise.prototype.constructor = Promise;\n\nexport async function waitAny(promises: CancellableCallbackPromiseInterface[]) {\n\tconsole.debug(`CancellableCallbackPromise: Waiting on ${promises.map((c) => c.identifier).join(', ')}`);\n\tconst result = await promiseAny(promises);\n\tfor (const promise of promises) {\n\t\tif (promise.identifier !== result) {\n\t\t\tpromise.cancelCallback();\n\t\t}\n\t}\n\tconsole.debug(`CancellableCallbackPromise: Done waiting on ${promises.map((c) => c.identifier).join(', ')}`);\n\treturn result;\n}\n\nexport async function domEvent(event: K, element: HTMLElement) {\n\treturn new Promise(\n\t\t(resolve, _) => {\n\t\t\telement.addEventListener(event.substring(2), () => resolve());\n\t\t}\n\t);\n}\n\nexport function constantPromise(value: T): Promise {\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\treturn (async () => value)();\n}\n\nexport function makeSync(f: () => Promise) {\n\treturn () => { void f() };\n}\n\nexport function awaitClick(element: HTMLElement, onclick = (_pos: [number, number]) => {}): Promise<[number, number]> {\n\treturn new Promise<[number, number]>((resolve, _) => {\n\t\telement.onclick = (e: MouseEvent) => {\n\t\t\telement.onclick = null;\n\t\t\tonclick([e.clientX, e.clientY]);\n\t\t\tresolve([e.clientX, e.clientY]);\n\t\t}\n\t});\n}\n\nexport function readFileAsync(file: File): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tconst reader = new FileReader();\n\n\t\treader.onload = () => {\n\t\t\tresolve(reader.result);\n\t\t};\n\n\t\treader.onerror = reject;\n\n\t\treader.readAsArrayBuffer(file);\n\t})\n}\n\nexport function readFileAsTextAsync(file: File): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tconst reader = new FileReader();\n\n\t\treader.onload = () => {\n\t\t\tresolve(reader.result);\n\t\t};\n\n\t\treader.onerror = reject;\n\n\t\treader.readAsText(file);\n\t})\n}\n\nexport function readFileAsDataUrlAsync(file: File): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tconst reader = new FileReader();\n\n\t\treader.onload = () => {\n\t\t\tresolve(reader.result);\n\t\t};\n\n\t\treader.onerror = reject;\n\n\t\treader.readAsDataURL(file);\n\t})\n}\n\nexport function loadImageAsync(src: string): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tconst image = new Image();\n\n\t\timage.onload = () => {\n\t\t\tresolve(image);\n\t\t};\n\n\t\timage.onerror = reject;\n\n\t\timage.src = src;\n\t})\n}","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\n/**\n * Perform bit-by-bit XOR operation between two buffers.\n * If buffers differ in length, the overlapping part is XORed and the rest copied from the longest buffer.\n * @param bufferA first buffer\n * @param bufferB second buffer\n * @return the XORed buffer\n */\nexport function xorBuffers(bufferA: ArrayBuffer, bufferB: ArrayBuffer) {\n\tconst totalLength = Math.max(bufferA.byteLength, bufferB.byteLength);\n\tconst overlapLength = Math.min(bufferA.byteLength, bufferB.byteLength);\n\tconst srcA = new Uint8Array(bufferA);\n\tconst srcB = new Uint8Array(bufferB);\n\tconst dest = new Uint8Array(totalLength);\n\tfor (let i = 0; i < overlapLength; ++i) {\n\t\tdest[i] = srcA[i]! ^ srcB[i]!;\n\t}\n\tconst srcLeft = bufferA.byteLength < totalLength ? srcB : srcA;\n\tfor (let i = overlapLength; i < totalLength; ++i) {\n\t\tdest[i] = srcLeft[i]!;\n\t}\n\treturn dest;\n}\n\n// buffer <-> hexadecimal conversion\n\n// TODO find faster version of bufferToHex\nexport function bufferToHex(buffer: ArrayBuffer) {\n\treturn Array\n\t\t.from(new Uint8Array(buffer))\n\t\t.map((b) => b.toString(16).padStart(2, '0'))\n\t\t.join('');\n}\n\nexport function hexToBuffer(hex: string) {\n\tconst buffer = new Uint8Array(16);\n\tfor (let i = 0; i < 16; ++i) {\n\t\tbuffer[i] = parseInt(hex.substring(i*2, (i+1)*2), 16);\n\t}\n\treturn buffer;\n}","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { integer } from './types';\n\nexport function toShortInteger(value: number) {\n\tinteger(value);\n\tif (value < 1000) {\n\t\treturn value.toString();\n\t} else if (value < 1000000) {\n\t\tconst flooredValue = Math.trunc(value / 100) / 10;\n\t\treturn flooredValue.toString() + ' k';\n\t} else {\n\t\tconst flooredValue = Math.trunc(value / 100000) / 10;\n\t\treturn flooredValue.toString() + ' M';\n\t}\n}\n\nexport function humanDuration(seconds: number) {\n\tif (seconds <= 0) {\n\t\treturn '0 s';\n\t} else if (seconds < 10) {\n\t\treturn `${seconds.toFixed(1)} s`;\n\t} else if (seconds < 60) {\n\t\treturn `${seconds.toFixed()} s`;\n\t} else if (seconds < 3600) {\n\t\treturn `${(seconds / 60).toFixed()} min`;\n\t} else {\n\t\treturn `${(seconds / 3600).toFixed()} h`;\n\t}\n}\n\nfunction makeCircularReplacer(): (key: string, value: any) => any {\n\tconst seen = new WeakSet();\n\treturn (_key: string, value: any): any => {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tif (seen.has(value)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tseen.add(value);\n\t\t}\n\t\treturn value;\n\t};\n}\n\nexport function robustStringify(value: any) {\n\treturn JSON.stringify(value, makeCircularReplacer());\n}\n\n/// Returns true if the given string is a valid identifier, with Uniicode support.\n/// A valid identifier must start with a letter or underscore, and can contain letters, digits, and underscores.\nexport function isValidIdentifier(identifier: string) {\n\t// Note: 'u' flag enables Unicode support in the regex\n\tconst regex = /^[\\p{L}_][\\p{L}\\p{N}_]*$/u;\n\treturn regex.test(identifier);\n}","/**\n * A collection of utilities related to types, serialization, rendering and HTML/DOM.\n * @module utils\n * @preferred\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { robustStringify } from './text';\n\n/**\n * Perform a logical XOR.\n * @param lhs -left hand side\n * @param rhs - right hand side\n * @returns lhs XOR rhs\n */\nexport function logicalXor(lhs: boolean, rhs: boolean): boolean {\n\treturn ((lhs ? 1 : 0) ^ (rhs ? 1 : 0)) !== 0;\n}\n\n/**\n * Return [[value]], throw if null.\n * @param value - Value of type T | null\n * @param message - An optional user message to send with the exception\n * @return value of type T or throw if value is null\n */\nexport function nonnull(value: T | null, message: string | null = null): T {\n\tconst userMessage = message !== null ? message : 'value is null';\n\tif (value === null) {\n\t\tthrow new TypeError(`nonnull: ${userMessage}`);\n\t}\n\treturn value;\n}\n\n/**\n * Return [[value]], throw if null, only call messageF if value is null.\n * @param value - Value of type T | null\n * @param messageF - A function generating the user message to send with the exception\n * @return value of type T or throw if value is null\n */\nexport function nonnullOr(value: T | null, messageF: () => string): T {\n\tif (value === null) {\n\t\tthrow new TypeError(`nonnull: ${messageF()}`);\n\t}\n\treturn value;\n}\n\n/**\n * Return [[value]], throw if undefined.\n * @param value - Value of type T | undefined\n * @param message - An optional user message to send with the exception\n * @return value of type T or throw if value is undefined\n */\nexport function defined(value: T | undefined, message: string | null = null): T {\n\tconst userMessage = message !== null ? message : 'value is undefined';\n\tif (value === undefined) {\n\t\tthrow new TypeError(`defined: ${userMessage}`);\n\t}\n\treturn value;\n}\n\n/**\n * Return [[value]], throw if undefined, only call messageF if value is undefined.\n * @param value - Value of type T | undefined\n * @param messageF - A function generating the user message to send with the exception\n * @return value of type T or throw if value is undefined\n */\nexport function definedOr(value: T | undefined, messageF: () => string): T {\n\tif (value === undefined) {\n\t\tthrow new TypeError(`defined: ${messageF()}`);\n\t}\n\treturn value;\n}\n\n/** Return a string version of value */\nexport function toStr(value: any): string {\n\tif (Object(value) !== value) {\n\t\t// primitive value\n\t\treturn value + '';\n\t}\n\tif (value instanceof Error) {\n\t\treturn value.toString();\n\t}\n\tconst className = value.constructor?.name;\n\tconst textValue = robustStringify(value);\n\tif (className !== undefined) {\n\t\treturn `${className}(${textValue})`;\n\t} else {\n\t\treturn textValue;\n\t}\n}\n\n// downcast, for a discussion why it is cumbersome, see\n// https://github.com/Microsoft/TypeScript/issues/2444\n// https://stackoverflow.com/questions/36886082/abstract-constructor-type-in-typescript\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport type Constructor = Function & { prototype: T };\n\n/**\n * Return a value casted to U. Throws if cast fails.\n * @param type - The type to cast to, this allows to pass abstract classes using [[Constructor]] type.\n * @param value - The value to cast from.\n * @return object of type U or throw if cannot cast to U.\n */\nexport function cast(type: Constructor, value: unknown): U {\n\tif (!(value instanceof type)) {\n\t\tthrow new TypeError(`cast error: value ${toStr(value)} is not an instance of ${type.toString()}`);\n\t}\n\treturn value as U;\n}\n\n/**\n * Return an object of type T downcasted to U. Throws if downcast fails.\n * @param type - The type to downcast to, this allows to pass abstract classes using [[Constructor]] type.\n * @param object - The object to downcast from.\n * @return object of type U or throw if cannot cast to U.\n */\nexport function downcast(type: Constructor, object: T): U {\n\treturn cast(type, object);\n}\n\n/**\n * Return an object of type T downcasted to U if it is of type U, null otherwise.\n * @param type - The type to downcast to, this allows to pass abstract classes using [[Constructor]] type.\n * @param object - The object to downcast from, possibly null.\n * @return object of type U or null cannot cast to U.\n */\nexport function dynamicCast(type: Constructor, object: T | null): U | null {\n\tif (!(object instanceof type)) {\n\t\treturn null;\n\t}\n\treturn object as U;\n}\n\n/**\n * Return a value casted to string (the value, not the wrapper object). Throws if cast fails.\n * @param value - The value to cast from.\n * @return string or throw if value is not a string.\n */\nexport function castStringValue(value: unknown): string{\n\tif (!(typeof value === 'string')) {\n\t\tthrow new TypeError(`cast error: value ${toStr(value)} is not a string`);\n\t}\n\treturn value;\n}\n\nexport function isRunningInJest() {\n\treturn !!(global as any).IS_RUNNING_IN_JEST;\n}\n\nexport function castArrayWithTypeChecker(typeChecker: (value: unknown) => boolean, typename: string, values: unknown): U[] {\n\tif (isRunningInJest()) {\n\t\treturn values as U[];\n\t}\n\n\tif (!(values instanceof Array)) {\n\t\tthrow new TypeError(`cast error: value '${toStr(values)}' is not an array (of type ${typename}), it is a ${typeof values}`);\n\t}\n\tif (values.length > 0) {\n\t\tfor (let i = 0; i < values.length; ++i) {\n\t\t\tconst value = values[i] as unknown;\n\t\t\tif (!typeChecker(value)) {\n\t\t\t\tthrow new TypeError(`cast error: value '${toStr(value)}' at index ${i} is not an instance of ${typename}`);\n\t\t\t}\n\t\t}\n\t}\n\treturn values as U[];\n}\n\n/**\n * Return an array of values casted to U. Throws if cast fails. Slow as each element of the array must be checked for being of type U.\n * @param type - The type to cast to, this allows to pass abstract classes using [[Constructor]] type.\n * @param object - The values to downcast from.\n * @return objects of type U or throw if any cannot cast to U.\n */\nexport function castArray(type: Constructor, values: unknown): U[] {\n\treturn castArrayWithTypeChecker((value: unknown) => value instanceof type, type.toString(), values);\n}\n\n/**\n * Return an array of values casted to strings. Throws if cast fails. Slow as each element of the array must be checked for being of type string.\n * @param object - The values to downcast from.\n * @return string array or throw if any cannot cast to string.\n */\nexport function castStringArray(values: unknown): string[] {\n\treturn castArrayWithTypeChecker((value: unknown) => typeof value === 'string', 'string', values);\n}\n\n/**\n * Return an array of elements of type T downcasted to U. Throws if downcast fails. Slow as each element of the array must be checked for being of type U.\n * @param type - The type to downcast to, this allows to pass abstract classes using [[Constructor]] type.\n * @param object - The objects to downcast from.\n * @return objects of type U or throw if any cannot cast to U.\n */\nexport function downcastArray(type: Constructor, objects: T[]): U[] {\n\treturn castArray(type, objects);\n}\n\n/**\n * Return an array of elements of type T downcasted to U if all elements are of type U, null otherwise. Slow as each element of the array must be checked for being of type U.\n * @param type - The type to downcast to, this allows to pass abstract classes using [[Constructor]] type.\n * @param object - The objects to downcast from.\n * @return objects of type U or null if not all elements can be casted to U.\n */\nexport function dynamicCastArray(type: Constructor, objects: (T | null)[]): U[] | null {\n\tif (objects.length > 0) {\n\t\tfor (const object of objects) {\n\t\t\tif (!(object instanceof type)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\treturn objects as U[];\n}\n\n/**\n * Return [[value]], throw if not an integer\n * @param value the number to check for being an integer\n * @return value if it is an integer or throw if not\n */\nexport function integer(value: number) {\n\tif (!Number.isInteger(value)) {\n\t\tthrow new TypeError(`value ${toStr(value)} is not an integer`);\n\t}\n\treturn value | 0;\n}\n\n/**\n * Return [[value]], throw if not an unsigned integer\n * @param value the number to check for being an unsigned integer\n * @return value if it is an unsigned integer or throw if not\n */\nexport function unsigned(value: number) {\n\tconst intValue = integer(value);\n\tif (intValue < 0) {\n\t\tthrow new TypeError(`value ${toStr(value)} is not unsigned`);\n\t}\n\treturn value;\n}\n\n/**\n * Return whether [[obj]] has a property for the key [[key]] without failing the TS type checking.\n * Taken from: https://dev.to/kingdaro/indexing-objects-in-typescript-1cgi\n * @param obj Some object\n * @param key Some potential key\n * @return whether [[obj]] has a property for the key [[key]]\n */\nexport function objectHasKey(obj: O, key: keyof any): key is keyof O {\n\treturn key in obj;\n}\n\n/**\n * Return [[obj]][[[key]]] or null if [[key]] is not a property of [[obj]].\n * @param obj Some object\n * @param key Some potential key\n * @return [[obj]][[[key]]] or null if [[key]] is not a property of [[obj]]\n */\nexport function getPropByNameOrNull(obj: O, key: keyof any) {\n\treturn objectHasKey(obj, key) ? obj[key] : null;\n}\n\n/** Cast to this to access readonly members of T */\nexport type Mutable = { -readonly [P in keyof T]: T[P] };\n\n/** Return whether value is an ArrayBuffer */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n\treturn (\n\t\t(typeof value === 'object' && value !== null && 'BYTES_PER_ELEMENT' in value) ||\n\t\tvalue instanceof ArrayBuffer\n\t);\n}\n\nexport type TypeOfReturnValues = 'undefined'| 'number' | 'string' | 'boolean'| 'bigint' | 'symbol' | 'object' | 'function';\n\nexport type RemoveIndex = {\n\t[ K in keyof T as string extends K ? never : number extends K ? never : K ] : T[K]\n};\n\nexport type KnownKeys = keyof RemoveIndex;\n","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { v1 as uuidv1, v4 as uuidv4, v5 as uuidv5 } from 'uuid';\n\nexport function createCurrentLocationBasedNamespace(suffix: string): string {\n\treturn uuidv5(window.location.search + suffix, uuidv5.DNS);\n}\n\nexport function createCurrentHostBasedUuid(namespace?: string): string {\n\tconst macAddressAndTimeBasedUuid = uuidv1();\n\treturn namespace ?\n\t\tuuidv5(macAddressAndTimeBasedUuid, namespace)\n\t\t: macAddressAndTimeBasedUuid;\n}\n\nexport function createCurrentHostBasedUuidBuffer(namespace: string) {\n\tconst buffer = new Uint8Array(16);\n\tconst macAddressAndTimeBasedUuid = uuidv1();\n\tuuidv5(macAddressAndTimeBasedUuid, namespace, buffer);\n\treturn buffer;\n}\n\nexport function createRandomUuidBuffer() {\n\tconst buffer = new Uint8Array(16);\n\tuuidv4(null, buffer);\n\treturn buffer;\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport { unsafeStringify } from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || unsafeStringify(b);\n}\n\nexport default v1;","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;","import { unsafeStringify } from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + {\"62\":\"38f02f14304b324aa258\",\"1283\":\"884a22dfcc52716de37d\",\"1284\":\"359b75b9f4977c27495e\",\"1797\":\"9d09bd0cca5d9eea31e4\",\"2148\":\"d74fb1537ddef39702cf\",\"2173\":\"10d447dce01aee29a115\",\"2547\":\"8ac598bb22b6edb11682\",\"2622\":\"4757045ac7e264168113\",\"2967\":\"986982f4d719728c4051\",\"3653\":\"653c0bec162b5ca95a97\",\"4499\":\"ea39ca55cc544dc45f9f\",\"4927\":\"210b6b27119c03232bbd\",\"5071\":\"f119170b920ff531588a\",\"6437\":\"87e501d328279d7565a3\",\"7329\":\"1ac844a7f9d87da4f22c\",\"8482\":\"e39b346109fd099cf420\",\"8564\":\"0ecd209ce7185d42480b\",\"9873\":\"741de91ed0c06254f176\"}[chunkId] + \".chunk.js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\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};","__webpack_require__.v = (exports, wasmModuleId, wasmModuleHash, importsObj) => {\n\n\tvar req = fetch(__webpack_require__.p + \"\" + wasmModuleHash + \".module.wasm\");\n\tvar fallback = () => (req\n\t\t.then((x) => (x.arrayBuffer()))\n\t\t.then((bytes) => (WebAssembly.instantiate(bytes, importsObj)))\n\t\t.then((res) => (Object.assign(exports, res.instance.exports))));\n\treturn req.then((res) => {\n\t\tif (typeof WebAssembly.instantiateStreaming === \"function\") {\n\n\t\t\treturn WebAssembly.instantiateStreaming(res, importsObj)\n\t\t\t\t.then(\n\t\t\t\t\t(res) => (Object.assign(exports, res.instance.exports)),\n\t\t\t\t\t(e) => {\n\t\t\t\t\t\tif(res.headers.get(\"Content-Type\") !== \"application/wasm\") {\n\t\t\t\t\t\t\tconsole.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\t\t\t\t\t\t\treturn fallback();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t}\n\t\treturn fallback();\n\t});\n};","__webpack_require__.p = \"\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1687: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkch_enlightware_gamecreator\"] = self[\"webpackChunkch_enlightware_gamecreator\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","/**\n * @module full-app\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport './full-app.scss';\n\nimport { loadBrowserLanguage } from 'translator/translator';\nimport { bootstrapFailed } from 'apps/common/bootstrap-failed';\nimport { awaitClick } from 'utils/async';\n\nconst AgreeKey = 'gc-agree';\nconst AgreeValue = 'agreed';\n\nfunction doAgree() {\n\tlocalStorage.setItem(AgreeKey, AgreeValue);\n}\n\nasync function load() {\n\ttry {\n\t\t// working around webpack bug with WASM\n\t\t// see https://github.com/webpack/webpack/issues/6615\n\t\tawait import('./full-app');\n\t} catch (e) {\n\t\tbootstrapFailed('create', e);\n\t}\n}\n\nasync function askForAgreement() {\n\tdocument.getElementById('consent')!.style.display = '';\n\tdocument.getElementById('mainmenu-loading')!.style.display = 'none';\n\tawait awaitClick(document.getElementById('consent-button')!);\n\tdoAgree();\n\tdocument.getElementById('consent')!.style.display = 'none';\n\tdocument.getElementById('mainmenu-loading')!.style.display = '';\n\tawait load();\n}\n\nasync function init() {\n\t// hide font loading hack\n\tdocument.getElementById('font-loading-hack')!.style.display = 'none';\n\n\t// load translations\n\tloadBrowserLanguage();\n\n\t// disable double-click (to prevent zooming on iOS)\n\tdocument.ondblclick = (e) => e.preventDefault();\n\n\t// agreement by URL\n\tconst url = new URL(window.location.href);\n\tconst agreedByUrl = url.searchParams.get('agreed') !== null;\n\tif (agreedByUrl) {\n\t\tdoAgree();\n\t\turl.searchParams.delete('agreed')\n\t\thistory.replaceState('', '', url);\n\t}\n\n\t// agreement by local storage\n\tconst agreedByLocalStorage = localStorage.getItem(AgreeKey) === AgreeValue;\n\n\t// decided depending on agreement\n\tconst agreed = agreedByUrl || agreedByLocalStorage;\n\tif (agreed) {\n\t\tawait load();\n\t} else {\n\t\tawait askForAgreement();\n\t}\n}\n\nvoid init();\n","/**\n * @module utils\n */\n/** comment to work-around limitation of typedoc module plugin */\n\n// Copyright 2018-2024 Enlightware GmbH, Switzerland\n\nimport { createRandomUuidBuffer } from 'utils/uuid-generator';\nimport { bufferToHex } from 'utils/buffers';\nimport { CodeVersion } from 'apps/common/version';\n\nexport function bootstrapFailed(app: string, error: any) {\n\tconsole.error('Error importing `full-app.ts`:', error);\n\tconst element = document.getElementById('fatal-box')!;\n\telement.innerHTML = 'Unsupported browser or network error, please make sure you use a recent version of Chrome, Firefox, Safari or Edge and try again.';\n\telement.style.backgroundColor = 'rgb(255, 200, 200)';\n\telement.style.display = '';\n\tconst msg = (error ? 'Reason: ' + error.reason : 'Error is falsy') + `, with browser \"${window.navigator.userAgent}\"`;\n\tconst record = [\n\t\t`${app}BootstrapFailed`,\n\t\tDate.now(),\n\t\tbufferToHex(createRandomUuidBuffer()),\n\t\t0,\n\t\tnull,\n\t\t{\n\t\t\tcodeVersion: CodeVersion,\n\t\t\tmsg,\n\t\t\terror: error ? error.toString() : 'Error is falsy',\n\t\t\tstack: error ? error.stack : undefined,\n\t\t},\n\t];\n\tconst blob = new Blob([JSON.stringify(record)], {type : 'application/json'});\n\tconst baseUrl = location.href.replace(/\\/[^?#/]*([?#].*)?$/, '');\n\tnavigator.sendBeacon(baseUrl + '/analytics/v0/err', blob);\n}\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","inProgress","dataWebpackPrefix","loggedInUserInfo","setLoggedInUserInfo","userInfo","getLoggedInUserInfo","isUserLoggedIn","urlParams","URLSearchParams","window","location","search","hasHtmlExt","pageStemName","pathname","lastPathSlashPos","lastIndexOf","pageName","substring","endsWith","length","urlParamsFirstElement","iter","entries","next","done","value","isShowRedirect","isPlayRedirect","LanguageKey","DEV_PATH_PREFIX","Parameters","static","get","path","undefined","startsWith","indexNextSlash","indexOf","extractBranchFromPath","customExampleWorkspaceId","attributes","customTemplateWorkspaceId","language","localStorage","getItem","navigator","lang","setItem","reload","workspaceIdFromUrl","console","info","gameIdFromUrl","_devMode","storageLocation","AnalyticsEnabledKey","Features","featureName","allowUrlParameterOverride","features","includes","products","org","role","organisationsProvidesFeature","organisationMembership","hostname","auth","localhost","loggedIn","this","paid","paidOverride","automaticLogin","hideForum","hideShareToDuplicate","assumeOnboarded","canManageUsers","canShop","teacher","analyticsEnabled","toString","pnnScript","pnnsOverride","groups","devMode","ProductFeaturesMap","Map","latestFeatureExpiration","feature","delta","Number","NEGATIVE_INFINITY","product","expiresInSecs","POSITIVE_INFINITY","Math","max","productsProvideFeature","FeatureRoleMap","roleProvidesFeature","CodeVersion","RustVersion","BuildFlags","UserVersion","showVersion","backendVersion","serverVersion","userText","element","document","getElementsByClassName","innerHTML","fullText","dictionary","addTranslations","translations","newDictionary","warn","getVariant","variants","disambiguation","variant","translation","qsTr","s","TranslatedString","qsT","capitalise","charAt","toUpperCase","slice","translatedString","constructor","args","index","arg","pattern","replaceAll","translationJsonToDictionary","pairs","dict","key","disambiguationText","entry","push","sort","a","b","localeCompare","set","TranslationsHTML","TranslationsTS","loadBrowserLanguage","newLang","debug","htmlTranslation","tsTranslation","translateNode","node","doTranslate","elementNode","Element","attr","name","textNode","Text","data","trim","child","childNodes","getRootNode","translateDOM","documentElement","setAttribute","getLanguage","async","sleep","durationSeconds","Promise","resolve","setTimeout","asyncFilter","arr","predicate","results","all","map","filter","_v","identifier","callbackHolder","callbackName","testFn","super","_","cancelCallback","prototype","constantPromise","makeSync","f","awaitClick","onclick","_pos","e","clientX","clientY","readFileAsync","file","reject","reader","FileReader","onload","result","onerror","readAsArrayBuffer","readFileAsTextAsync","readAsText","readFileAsDataUrlAsync","readAsDataURL","loadImageAsync","src","image","Image","target","eventName","bufferToHex","buffer","Array","from","Uint8Array","padStart","join","hexToBuffer","hex","i","parseInt","toShortInteger","trunc","humanDuration","seconds","toFixed","robustStringify","JSON","stringify","seen","WeakSet","_key","has","add","makeCircularReplacer","isValidIdentifier","test","nonnull","message","TypeError","defined","definedOr","messageF","toStr","Object","Error","className","textValue","cast","type","downcast","object","dynamicCast","castStringValue","isRunningInJest","g","IS_RUNNING_IN_JEST","castArrayWithTypeChecker","typeChecker","typename","values","downcastArray","objects","castArray","integer","isInteger","unsigned","getPropByNameOrNull","obj","objectHasKey","isArrayBuffer","ArrayBuffer","createCurrentLocationBasedNamespace","suffix","DNS","createCurrentHostBasedUuid","namespace","macAddressAndTimeBasedUuid","createCurrentHostBasedUuidBuffer","createRandomUuidBuffer","randomUUID","crypto","bind","getRandomValues","rnds8","rng","byteToHex","unsafeStringify","offset","_nodeId","_clockseq","_lastMSecs","_lastNSecs","options","buf","clockseq","seedBytes","random","msecs","Date","now","nsecs","dt","tl","tmh","n","rnds","uuid","validate","v","x","y","z","ROTL","v5","version","hashfunc","generateUUID","_namespace","str","unescape","encodeURIComponent","bytes","charCodeAt","stringToBytes","err","URL","v35","K","H","msg","isArray","call","l","N","ceil","M","Uint32Array","j","pow","floor","W","t","c","d","T","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","id","__webpack_modules__","m","Symbol","queue","forEach","fn","r","body","hasAwait","currentDeps","outerResolve","depQueues","Set","promise","rej","deps","dep","then","ret","wrapDeps","getResult","fnQueue","q","getter","__esModule","definition","o","defineProperty","enumerable","chunkId","keys","reduce","promises","u","miniCssF","globalThis","Function","prop","hasOwnProperty","url","script","needAttach","scripts","getElementsByTagName","getAttribute","createElement","charset","timeout","nc","onScriptComplete","prev","event","clearTimeout","doneFns","parentNode","removeChild","head","appendChild","toStringTag","wasmModuleId","wasmModuleHash","importsObj","req","fetch","p","fallback","arrayBuffer","WebAssembly","instantiate","res","assign","instance","instantiateStreaming","headers","installedChunks","installedChunkData","error","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","AgreeKey","AgreeValue","doAgree","load","app","getElementById","style","backgroundColor","display","reason","userAgent","record","codeVersion","stack","blob","Blob","baseUrl","href","replace","sendBeacon","bootstrapFailed","ondblclick","preventDefault","agreedByUrl","searchParams","delete","history","replaceState","agreedByLocalStorage","askForAgreement","init"],"sourceRoot":""}