@jsenv/core 25.3.0-alpha.0 → 25.4.2

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.
Files changed (107) hide show
  1. package/dist/browser_runtime/asset-manifest.json +2 -2
  2. package/dist/browser_runtime/{browser_runtime_91c5a3b8.js → browser_runtime_0e3396a1.js} +15 -16
  3. package/dist/browser_runtime/{browser_runtime_91c5a3b8.js.map → browser_runtime_0e3396a1.js.map} +13 -13
  4. package/dist/build_manifest.js +5 -5
  5. package/dist/compile_proxy/asset-manifest.json +2 -2
  6. package/dist/compile_proxy/compile_proxy.html__inline__20_f4285042.js.map +343 -0
  7. package/dist/compile_proxy/{compile_proxy_8dfaee51.html → compile_proxy_ab528227.html} +358 -397
  8. package/dist/redirector/asset-manifest.json +2 -2
  9. package/dist/redirector/redirector.html__inline__12_404b8295.js.map +349 -0
  10. package/dist/redirector/{redirector_3e9a97b9.html → redirector_6df2620a.html} +369 -407
  11. package/dist/toolbar/asset-manifest.json +2 -2
  12. package/dist/toolbar/toolbar.main_279b3a68.js.map +764 -0
  13. package/dist/toolbar/{toolbar_361afb84.html → toolbar_0a91ca3b.html} +1509 -1583
  14. package/dist/toolbar_injector/asset-manifest.json +2 -2
  15. package/dist/toolbar_injector/{toolbar_injector_fac1e995.js → toolbar_injector_34f6ad8e.js} +18 -15
  16. package/dist/toolbar_injector/{toolbar_injector_fac1e995.js.map → toolbar_injector_34f6ad8e.js.map} +15 -15
  17. package/package.json +10 -10
  18. package/src/buildProject.js +31 -26
  19. package/src/dev_server.js +111 -92
  20. package/src/execute.js +3 -8
  21. package/src/importUsingChildProcess.js +1 -0
  22. package/src/internal/browser_launcher/{browser_runtime_report.js → browser_runtime_profile.js} +21 -15
  23. package/src/internal/browser_launcher/executeHtmlFile.js +22 -14
  24. package/src/internal/browser_launcher/from_playwright.js +6 -4
  25. package/src/internal/browser_runtime/browser_runtime.js +12 -14
  26. package/src/internal/browser_runtime/createBrowserRuntime.js +7 -6
  27. package/src/internal/browser_utils/fetchAndEvalUsingFetch.js +1 -1
  28. package/src/internal/browser_utils/fetchJson.js +1 -1
  29. package/src/internal/browser_utils/{fetch-browser.js → fetch_browser.js} +0 -2
  30. package/src/internal/building/buildUsingRollup.js +41 -57
  31. package/src/internal/building/rollup_plugin_jsenv.js +28 -8
  32. package/src/internal/compiling/babel_parse_error.js +9 -0
  33. package/src/internal/{babel_plugin_transform_import_meta.js → compiling/babel_plugin_transform_import_meta.js} +53 -36
  34. package/src/internal/compiling/compileFile.js +2 -2
  35. package/src/internal/compiling/compileHtml.js +1 -1
  36. package/src/internal/compiling/createCompiledFileService.js +25 -74
  37. package/src/internal/compiling/js-compilation-service/transformJs.js +151 -23
  38. package/src/internal/compiling/jsenvCompilerForHtml.js +29 -32
  39. package/src/internal/compiling/jsenvCompilerForImportmap.js +2 -2
  40. package/src/internal/compiling/jsenvCompilerForJavaScript.js +2 -4
  41. package/src/internal/compiling/jsenv_directory/comparison_utils.js +24 -0
  42. package/src/internal/compiling/{compile-directory/compile-asset.js → jsenv_directory/compile_asset.js} +0 -0
  43. package/src/internal/compiling/jsenv_directory/compile_context.js +68 -0
  44. package/src/internal/compiling/jsenv_directory/compile_profile.js +218 -0
  45. package/src/internal/compiling/{compile-directory/createLockRegistry.js → jsenv_directory/file_lock_registry.js} +0 -0
  46. package/src/internal/compiling/{compile-directory/createLockRegistry.test.js → jsenv_directory/file_lock_registry.test.js} +2 -1
  47. package/src/internal/compiling/{compile-directory → jsenv_directory}/fs-optimized-for-cache.js +0 -0
  48. package/src/internal/compiling/{compile-directory → jsenv_directory}/getOrGenerateCompiledFile.js +2 -2
  49. package/src/internal/compiling/jsenv_directory/jsenv_directory.js +174 -0
  50. package/src/internal/compiling/{compile-directory → jsenv_directory}/updateMeta.js +1 -1
  51. package/src/internal/compiling/{compile-directory → jsenv_directory}/validateCache.js +0 -0
  52. package/src/internal/compiling/sse_service/sse_service.js +369 -0
  53. package/src/internal/compiling/startCompileServer.js +157 -804
  54. package/src/internal/compiling/transformResultToCompilationResult.js +2 -2
  55. package/src/internal/dev_server/exploring/exploring.js +10 -8
  56. package/src/internal/dev_server/toolbar/compilation/toolbar.compilation.js +92 -78
  57. package/src/internal/dev_server/toolbar/settings/toolbar.settings.js +13 -0
  58. package/src/internal/dev_server/toolbar/toolbar.html +46 -16
  59. package/src/internal/dev_server/toolbar/toolbar.injector.js +17 -15
  60. package/src/internal/dev_server/toolbar/toolbar.main.js +12 -16
  61. package/src/internal/executing/executeConcurrently.js +1 -1
  62. package/src/internal/executing/executePlan.js +2 -3
  63. package/src/internal/{generateGroupMap → features}/babel_plugins_compatibility.js +8 -8
  64. package/src/internal/features/browser_feature_detection/browser_feature_detect_dynamic_import.js +20 -0
  65. package/src/internal/features/browser_feature_detection/browser_feature_detect_import_assertions_css.js +23 -0
  66. package/src/internal/features/browser_feature_detection/browser_feature_detect_import_assertions_json.js +25 -0
  67. package/src/internal/features/browser_feature_detection/browser_feature_detect_importmap.js +37 -0
  68. package/src/internal/features/browser_feature_detection/browser_feature_detect_new_stylesheet.js +9 -0
  69. package/src/internal/features/browser_feature_detection/browser_feature_detect_top_level_await.js +14 -0
  70. package/src/internal/features/browser_feature_detection/browser_feature_detection.js +89 -0
  71. package/src/internal/{browser_feature_detection → features/browser_feature_detection}/compile_proxy.html +1 -1
  72. package/src/internal/features/browser_feature_detection/execute_with_script_module.js +24 -0
  73. package/src/internal/features/features_compat_from_runtime.js +38 -0
  74. package/src/internal/features/features_compat_from_runtime_support.js +31 -0
  75. package/src/internal/{generateGroupMap → features}/features_compatibility.js +3 -3
  76. package/src/internal/{node_feature_detection → features/node_feature_detection}/feature_detect_dynamic_import.mjs +0 -0
  77. package/src/internal/{node_feature_detection → features/node_feature_detection}/feature_detect_top_level_await.mjs +0 -0
  78. package/src/internal/{node_feature_detection/nodeSupportsDynamicImport.js → features/node_feature_detection/node_feature_detect_dynamic_import.js} +0 -0
  79. package/src/internal/{node_feature_detection/nodeSupportsTopLevelAwait.js → features/node_feature_detection/node_feature_detect_top_level_await.js} +0 -0
  80. package/src/internal/features/node_feature_detection/node_feature_detection.js +66 -0
  81. package/src/internal/node_launcher/createControllableNodeProcess.js +4 -6
  82. package/src/internal/node_launcher/node_runtime_report.js +15 -9
  83. package/src/internal/node_runtime/fetchSource.js +2 -4
  84. package/src/internal/node_runtime/nodeControllableFile.mjs +1 -5
  85. package/src/internal/node_runtime/node_execution_systemjs.js +2 -5
  86. package/src/internal/redirector/redirector.html +40 -0
  87. package/src/internal/{generateGroupMap/jsenvRuntimeSupport.js → runtime_support/jsenv_runtime_support.js} +0 -0
  88. package/src/internal/{generateGroupMap → runtime_support}/runtime_support.js +0 -0
  89. package/src/internal/url_conversion.js +12 -17
  90. package/src/launchNode.js +29 -41
  91. package/dist/compile_proxy/compile_proxy.html__inline__20_809f35f7.js.map +0 -392
  92. package/dist/redirector/redirector.html__inline__15_e391410e.js.map +0 -397
  93. package/dist/toolbar/toolbar.main_6c1b3d82.js.map +0 -802
  94. package/src/internal/CONSTANTS.js +0 -11
  95. package/src/internal/browser_feature_detection/browser_feature_detection.js +0 -274
  96. package/src/internal/compiling/js-compilation-service/jsenvTransform.js +0 -242
  97. package/src/internal/dev_server/redirector/redirector.html +0 -48
  98. package/src/internal/generateGroupMap/generateGroupMap.js +0 -65
  99. package/src/internal/generateGroupMap/one_runtime_compat.js +0 -38
  100. package/src/internal/generateGroupMap/runtime_compat.js +0 -34
  101. package/src/internal/generateGroupMap/runtime_compat_composition.js +0 -76
  102. package/src/internal/generateGroupMap/shake_babel_plugin_map.js +0 -21
  103. package/src/internal/node_feature_detection/node_feature_detection.js +0 -117
  104. package/src/internal/node_runtime/detectNode.js +0 -3
  105. package/src/internal/runtime/computeCompileIdFromGroupId.js +0 -30
  106. package/src/internal/runtime/resolveGroup.js +0 -13
  107. package/src/internal/runtime/resolveRuntimeGroup.js +0 -11
@@ -0,0 +1,764 @@
1
+ {
2
+ "version": 3,
3
+ "file": "toolbar.main.js",
4
+ "sources": [
5
+ "../../helpers/babel/arrayLikeToArray/arrayLikeToArray.js",
6
+ "../../helpers/babel/arrayWithoutHoles/arrayWithoutHoles.js",
7
+ "../../helpers/babel/iterableToArray/iterableToArray.js",
8
+ "../../helpers/babel/unsupportedIterableToArray/unsupportedIterableToArray.js",
9
+ "../../helpers/babel/nonIterableSpread/nonIterableSpread.js",
10
+ "../../helpers/babel/toConsumableArray/toConsumableArray.js",
11
+ "../../helpers/babel/typeof/typeof.js",
12
+ "../../node_modules/@jsenv/filesystem/src/urlIsInsideOf.js",
13
+ "../../node_modules/@jsenv/filesystem/src/internal/getCommonPathname.js",
14
+ "../../node_modules/@jsenv/filesystem/src/internal/pathnameToParentPathname.js",
15
+ "../../node_modules/@jsenv/filesystem/src/urlToRelativeUrl.js",
16
+ "../../helpers/babel/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js",
17
+ "../../helpers/babel/objectWithoutProperties/objectWithoutProperties.js",
18
+ "../../src/internal/dev_server/toolbar/util/dom.js",
19
+ "../../src/internal/dev_server/toolbar/util/animation.js",
20
+ "../../src/internal/dev_server/toolbar/focus/toolbar.focus.js",
21
+ "../../src/internal/dev_server/toolbar/util/preferences.js",
22
+ "../../src/internal/dev_server/toolbar/tooltip/tooltip.js",
23
+ "../../src/internal/dev_server/toolbar/variant/variant.js",
24
+ "../../src/internal/dev_server/toolbar/settings/toolbar.settings.js",
25
+ "../../helpers/babel/defineProperty/defineProperty.js",
26
+ "../../helpers/babel/objectSpread2/objectSpread2.js",
27
+ "../../src/internal/dev_server/toolbar/notification/toolbar.notification.js",
28
+ "../../src/internal/dev_server/toolbar/theme/toolbar.theme.js",
29
+ "../../src/internal/dev_server/toolbar/animation/toolbar.animation.js",
30
+ "../../src/internal/dev_server/toolbar/util/responsive.js",
31
+ "../../src/internal/dev_server/toolbar/execution/toolbar.execution.js",
32
+ "../../src/internal/browser_utils/fetchUsingXHR.js",
33
+ "../../src/internal/browser_utils/fetch_browser.js",
34
+ "../../src/internal/browser_utils/fetchJson.js",
35
+ "../../src/internal/browser_detection/user_agent_data.js",
36
+ "../../src/internal/browser_detection/util.js",
37
+ "../../src/internal/browser_detection/detectAndroid.js",
38
+ "../../src/internal/browser_detection/detectInternetExplorer.js",
39
+ "../../src/internal/browser_detection/detectOpera.js",
40
+ "../../src/internal/browser_detection/detectEdge.js",
41
+ "../../src/internal/browser_detection/detectFirefox.js",
42
+ "../../src/internal/browser_detection/detectChrome.js",
43
+ "../../src/internal/browser_detection/detectSafari.js",
44
+ "../../src/internal/browser_detection/detectElectron.js",
45
+ "../../src/internal/browser_detection/detectIOS.js",
46
+ "../../src/internal/browser_detection/browser_detection.js",
47
+ "../../src/internal/features/browser_feature_detection/execute_with_script_module.js",
48
+ "../../src/internal/features/browser_feature_detection/browser_feature_detect_importmap.js",
49
+ "../../src/internal/features/browser_feature_detection/browser_feature_detect_dynamic_import.js",
50
+ "../../src/internal/features/browser_feature_detection/browser_feature_detect_top_level_await.js",
51
+ "../../src/internal/features/browser_feature_detection/browser_feature_detect_import_assertions_json.js",
52
+ "../../src/internal/features/browser_feature_detection/browser_feature_detect_import_assertions_css.js",
53
+ "../../src/internal/features/browser_feature_detection/browser_feature_detect_new_stylesheet.js",
54
+ "../../src/internal/features/browser_feature_detection/browser_feature_detection.js",
55
+ "../../src/internal/dev_server/toolbar/compilation/toolbar.compilation.js",
56
+ "../../src/internal/dev_server/toolbar/eventsource/toolbar.eventsource.js",
57
+ "../../src/internal/dev_server/toolbar/responsive/toolbar.responsive.js",
58
+ "../../src/internal/dev_server/toolbar/toolbar.main.js"
59
+ ],
60
+ "sourcesContent": [
61
+ "/* eslint-disable no-eq-null, eqeqeq */\nexport default function arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length\n var arr2 = new Array(len)\n for (var i = 0; i < len; i++) arr2[i] = arr[i]\n return arr2\n}\n",
62
+ "import arrayLikeToArray from \"../arrayLikeToArray/arrayLikeToArray.js\"\n\n// eslint-disable-next-line consistent-return\nexport default (arr) => {\n if (Array.isArray(arr)) return arrayLikeToArray(arr)\n}\n",
63
+ "export default function _iterableToArray(iter) {\n if (\n (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null) ||\n iter[\"@@iterator\"] != null\n )\n return Array.from(iter)\n}\n",
64
+ "/* eslint-disable consistent-return */\nimport arrayLikeToArray from \"../arrayLikeToArray/arrayLikeToArray.js\"\n\nexport default function unsupportedIterableToArray(o, minLen) {\n if (!o) return\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen)\n var n = Object.prototype.toString.call(o).slice(8, -1)\n if (n === \"Object\" && o.constructor) n = o.constructor.name\n if (n === \"Map\" || n === \"Set\") return Array.from(o)\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))\n return arrayLikeToArray(o, minLen)\n}\n",
65
+ "export default () => {\n throw new TypeError(\n \"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\",\n )\n}\n",
66
+ "import arrayWithoutHoles from \"../arrayWithoutHoles/arrayWithoutHoles.js\"\nimport iterableToArray from \"../iterableToArray/iterableToArray.js\"\nimport unsupportedIterableToArray from \"../unsupportedIterableToArray/unsupportedIterableToArray.js\"\nimport nonIterableSpread from \"../nonIterableSpread/nonIterableSpread.js\"\n\nexport default (arr) =>\n arrayWithoutHoles(arr) ||\n iterableToArray(arr) ||\n unsupportedIterableToArray(arr) ||\n nonIterableSpread()\n",
67
+ "const nativeTypeOf = (obj) => typeof obj\n\nconst customTypeOf = (obj) => {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n}\n\nexport default typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? nativeTypeOf\n : customTypeOf\n",
68
+ "export const urlIsInsideOf = (url, otherUrl) => {\n const urlObject = new URL(url)\n const otherUrlObject = new URL(otherUrl)\n\n if (urlObject.origin !== otherUrlObject.origin) {\n return false\n }\n\n const urlPathname = urlObject.pathname\n const otherUrlPathname = otherUrlObject.pathname\n if (urlPathname === otherUrlPathname) {\n return false\n }\n\n const isInside = urlPathname.startsWith(otherUrlPathname)\n return isInside\n}\n",
69
+ "export const getCommonPathname = (pathname, otherPathname) => {\n const firstDifferentCharacterIndex = findFirstDifferentCharacterIndex(\n pathname,\n otherPathname,\n )\n\n // pathname and otherpathname are exactly the same\n if (firstDifferentCharacterIndex === -1) {\n return pathname\n }\n\n const commonString = pathname.slice(0, firstDifferentCharacterIndex + 1)\n\n // the first different char is at firstDifferentCharacterIndex\n if (pathname.charAt(firstDifferentCharacterIndex) === \"/\") {\n return commonString\n }\n\n if (otherPathname.charAt(firstDifferentCharacterIndex) === \"/\") {\n return commonString\n }\n\n const firstDifferentSlashIndex = commonString.lastIndexOf(\"/\")\n return pathname.slice(0, firstDifferentSlashIndex + 1)\n}\n\nconst findFirstDifferentCharacterIndex = (string, otherString) => {\n const maxCommonLength = Math.min(string.length, otherString.length)\n let i = 0\n while (i < maxCommonLength) {\n const char = string.charAt(i)\n const otherChar = otherString.charAt(i)\n if (char !== otherChar) {\n return i\n }\n i++\n }\n if (string.length === otherString.length) {\n return -1\n }\n // they differ at maxCommonLength\n return maxCommonLength\n}\n",
70
+ "export const pathnameToParentPathname = (pathname) => {\n const slashLastIndex = pathname.lastIndexOf(\"/\")\n if (slashLastIndex === -1) {\n return \"/\"\n }\n\n return pathname.slice(0, slashLastIndex + 1)\n}\n",
71
+ "import { getCommonPathname } from \"./internal/getCommonPathname.js\"\nimport { pathnameToParentPathname } from \"./internal/pathnameToParentPathname.js\"\n\nexport const urlToRelativeUrl = (url, baseUrl) => {\n const urlObject = new URL(url)\n const baseUrlObject = new URL(baseUrl)\n\n if (urlObject.protocol !== baseUrlObject.protocol) {\n const urlAsString = String(url)\n return urlAsString\n }\n\n if (\n urlObject.username !== baseUrlObject.username ||\n urlObject.password !== baseUrlObject.password ||\n urlObject.host !== baseUrlObject.host\n ) {\n const afterUrlScheme = String(url).slice(urlObject.protocol.length)\n return afterUrlScheme\n }\n\n const { pathname, hash, search } = urlObject\n if (pathname === \"/\") {\n const baseUrlRessourceWithoutLeadingSlash = baseUrlObject.pathname.slice(1)\n return baseUrlRessourceWithoutLeadingSlash\n }\n\n const basePathname = baseUrlObject.pathname\n const commonPathname = getCommonPathname(pathname, basePathname)\n if (!commonPathname) {\n const urlAsString = String(url)\n return urlAsString\n }\n\n const specificPathname = pathname.slice(commonPathname.length)\n const baseSpecificPathname = basePathname.slice(commonPathname.length)\n if (baseSpecificPathname.includes(\"/\")) {\n const baseSpecificParentPathname =\n pathnameToParentPathname(baseSpecificPathname)\n const relativeDirectoriesNotation = baseSpecificParentPathname.replace(\n /.*?\\//g,\n \"../\",\n )\n const relativeUrl = `${relativeDirectoriesNotation}${specificPathname}${search}${hash}`\n return relativeUrl\n }\n\n const relativeUrl = `${specificPathname}${search}${hash}`\n return relativeUrl\n}\n",
72
+ "export default (source, excluded) => {\n if (source === null) return {}\n var target = {}\n var sourceKeys = Object.keys(source)\n var key\n var i\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i]\n if (excluded.indexOf(key) >= 0) continue\n target[key] = source[key]\n }\n return target\n}\n",
73
+ "import objectWithoutPropertiesLoose from \"../objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js\"\n\nexport default (source, excluded) => {\n if (source === null) return {}\n\n var target = objectWithoutPropertiesLoose(source, excluded)\n var key\n var i\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source)\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i]\n if (excluded.indexOf(key) >= 0) continue\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue\n target[key] = source[key]\n }\n }\n return target\n}\n",
74
+ "export const updateIframeOverflowOnParentWindow = () => {\n if (!window.parent) {\n // can happen while parent iframe reloads\n return\n }\n\n const aTooltipIsOpened =\n document.querySelector(\"[data-tooltip-visible]\") ||\n document.querySelector(\"[data-tooltip-auto-visible]\")\n const settingsAreOpened = document.querySelector(\"#settings[data-active]\")\n\n if (aTooltipIsOpened || settingsAreOpened) {\n enableIframeOverflowOnParentWindow()\n } else {\n disableIframeOverflowOnParentWindow()\n }\n}\n\nlet iframeOverflowEnabled = false\nconst enableIframeOverflowOnParentWindow = () => {\n if (iframeOverflowEnabled) return\n iframeOverflowEnabled = true\n\n const iframe = getToolbarIframe()\n const transitionDuration = iframe.style.transitionDuration\n setStyles(iframe, { \"height\": \"100%\", \"transition-duration\": \"0ms\" })\n if (transitionDuration) {\n setTimeout(() => {\n setStyles(iframe, { \"transition-duration\": transitionDuration })\n })\n }\n}\n\nconst disableIframeOverflowOnParentWindow = () => {\n if (!iframeOverflowEnabled) return\n iframeOverflowEnabled = false\n\n const iframe = getToolbarIframe()\n const transitionDuration = iframe.style.transitionDuration\n setStyles(iframe, { \"height\": \"40px\", \"transition-duration\": \"0ms\" })\n if (transitionDuration) {\n setTimeout(() => {\n setStyles(iframe, { \"transition-duration\": transitionDuration })\n })\n }\n}\n\nexport const getToolbarIframe = () => {\n const iframes = Array.from(window.parent.document.querySelectorAll(\"iframe\"))\n return iframes.find((iframe) => iframe.contentWindow === window)\n}\n\nexport const forceHideElement = (element) => {\n element.setAttribute(\"data-force-hide\", \"\")\n}\n\nexport const removeForceHideElement = (element) => {\n element.removeAttribute(\"data-force-hide\")\n}\n\nexport const setStyles = (element, styles) => {\n const elementStyle = element.style\n const restoreStyles = Object.keys(styles).map((styleName) => {\n let restore\n if (styleName in elementStyle) {\n const currentStyle = elementStyle[styleName]\n restore = () => {\n elementStyle[styleName] = currentStyle\n }\n } else {\n restore = () => {\n delete elementStyle[styleName]\n }\n }\n\n elementStyle[styleName] = styles[styleName]\n\n return restore\n })\n return () => {\n restoreStyles.forEach((restore) => restore())\n }\n}\n\nexport const setAttributes = (element, attributes) => {\n Object.keys(attributes).forEach((name) => {\n element.setAttribute(name, attributes[name])\n })\n}\n\nexport const getDocumentScroll = () => {\n return {\n x: document.documentElement.scrollLeft,\n y: document.documentElement.scrollTop,\n }\n}\n\nexport const toolbarSectionIsActive = (element) => {\n return element.hasAttribute(\"data-active\")\n}\n\nexport const activateToolbarSection = (element) => {\n element.setAttribute(\"data-active\", \"\")\n}\n\nexport const deactivateToolbarSection = (element) => {\n element.removeAttribute(\"data-active\")\n}\n",
75
+ "import { setStyles } from \"./dom.js\"\n\nconst animateFallback = () => {\n return Promise.resolve()\n}\n\nconst animateNative = (node, keyframes, { signal, ...options } = {}) => {\n const animation = node.animate(keyframes, options)\n if (signal) {\n signal.addEventListener(\"abort\", () => {\n animation.cancel()\n })\n }\n return new Promise((resolve) => {\n animation.onfinish = resolve\n })\n}\n\nexport const canUseAnimation = () =>\n typeof HTMLElement.prototype.animate === \"function\"\n\nexport const animateElement = canUseAnimation()\n ? animateNative\n : animateFallback\n\nexport const fadeIn = (node, options) =>\n animateElement(\n node,\n [\n {\n opacity: 0,\n },\n {\n opacity: 1,\n },\n ],\n options,\n )\n\nexport const fadeOut = (node, options) =>\n animateElement(\n node,\n [\n {\n opacity: 1,\n },\n {\n opacity: 0,\n },\n ],\n options,\n )\n\nexport const move = (fromNode, toNode, options) => {\n const fromComputedStyle = window.getComputedStyle(fromNode)\n const toComputedStyle = window.getComputedStyle(toNode)\n // get positions of input in toolbar and aElement\n const fromPosition = fromNode.getBoundingClientRect()\n const toPosition = toNode.getBoundingClientRect()\n\n // we'll do the animation in a div preventing overflow and pointer events\n const div = document.createElement(\"div\")\n div.style.position = \"absolute\"\n div.style.left = 0\n div.style.top = 0\n div.style.width = `${document.documentElement.scrollWidth}px`\n div.style.height = `${document.documentElement.scrollHeight}px`\n div.style.overflow = \"hidden\"\n div.style.pointerEvents = \"none\"\n\n const documentScroll = {\n left: window.pageXOffset || document.documentElement.scrollLeft,\n top: window.pageYOffset || document.documentElement.scrollTop,\n }\n\n // clone node and style it\n const copy = fromNode.cloneNode(true)\n copy.style.position = \"absolute\"\n copy.style.left = `${documentScroll.left + fromPosition.left}px`\n copy.style.top = `${documentScroll.top + fromPosition.top}px`\n copy.style.maxWidth = `${fromPosition.right - fromPosition.left}px`\n copy.style.overflow = toComputedStyle.overflow\n copy.style.textOverflow = toComputedStyle.textOverflow\n div.appendChild(copy)\n document.body.appendChild(div)\n\n const left =\n toPosition.left -\n fromPosition.left -\n (parseInt(fromComputedStyle.paddingLeft) || 0)\n const top =\n toPosition.top -\n fromPosition.top -\n (parseInt(fromComputedStyle.paddingTop) || 0)\n // define final position of new element and the duration\n const translate = `translate(${left}px, ${top}px)`\n\n // animate new element\n return animateElement(\n copy,\n [\n {\n transform: \"translate(0px, 0px)\",\n backgroundColor: fromComputedStyle.backgroundColor,\n color: fromComputedStyle.color,\n fontSize: fromComputedStyle.fontSize,\n height: `${fromPosition.bottom - fromPosition.top}px`,\n width: \"100%\",\n },\n {\n offset: 0.9,\n backgroundColor: fromComputedStyle.backgroundColor,\n color: fromComputedStyle.color,\n },\n {\n transform: translate,\n backgroundColor: toComputedStyle.backgroundColor,\n color: toComputedStyle.color,\n fontSize: toComputedStyle.fontSize,\n height: `${toPosition.bottom - toPosition.top}px`,\n width: toComputedStyle.width,\n },\n ],\n options,\n ).then(() => {\n div.parentNode.removeChild(div)\n })\n}\n\n// the whole point of this toolbar animation wass to flight a visual imperfection when it's done by css transition.\n// This imperfection is a white line sometimes flickering at the bottom of the page.\n// It got fixed by removing the usage of calc(100vh - 40px)\n// It was hapenning in chrome, safari but not inside Firefox\n// I assume it's because Firefox does not read parent element min-height while\n// chrome use it to compute min-height: 100%\nexport const createToolbarAnimation = () => {\n const collapsedState = {\n \"#page\": { paddingBottom: 0 },\n \"footer\": { height: 0 },\n \"#toolbar\": { visibility: \"hidden\" },\n }\n const expandedState = {\n \"#page\": { paddingBottom: \"40px\" },\n \"footer\": { height: \"40px\" },\n \"#toolbar\": { visibility: \"visible\" },\n }\n const expandTransition = transit(collapsedState, expandedState, {\n duration: 300,\n })\n\n const expand = () => {\n expandTransition.play()\n }\n\n const collapse = () => {\n expandTransition.reverse()\n }\n\n return { expand, collapse }\n}\n\nexport const transit = (\n fromState,\n toState,\n { commitStyles = true, fill = \"both\", duration = 300 } = {},\n) => {\n const steps = []\n Object.keys(fromState).forEach((selector) => {\n const fromStyles = {}\n const toStyles = {}\n const element = document.querySelector(selector)\n\n const keyframes = []\n const fromProperties = fromState[selector]\n const toProperties = toState[selector]\n Object.keys(fromProperties).forEach((propertyName) => {\n const from = fromProperties[propertyName]\n const to = toProperties[propertyName]\n fromStyles[propertyName] = from\n toStyles[propertyName] = to\n })\n keyframes.push(fromStyles, toStyles)\n\n let animation\n if (canUseAnimation()) {\n const effect = new KeyframeEffect(element, keyframes, { fill, duration })\n animation = new Animation(effect)\n } else {\n animation = {\n playbackRate: 1,\n play: () => {\n animation.onfinish()\n },\n reverse: () => {\n animation.playbackRate = -1\n animation.onfinish()\n },\n finish: () => {},\n onfinish: () => {},\n }\n }\n\n steps.push({\n element,\n animation,\n fromStyles,\n toStyles,\n })\n })\n\n const play = async () => {\n await Promise.all(\n steps.map(({ animation, element, toStyles }) => {\n return new Promise((resolve) => {\n animation.onfinish = () => {\n if (commitStyles) {\n setStyles(element, toStyles)\n }\n resolve()\n }\n if (animation.playbackRate === -1) {\n animation.reverse()\n } else {\n animation.play()\n }\n })\n }),\n )\n }\n\n const reverse = async () => {\n await Promise.all(\n steps.map(({ animation, element, fromStyles }) => {\n return new Promise((resolve) => {\n animation.onfinish = () => {\n if (commitStyles) {\n setStyles(element, fromStyles)\n }\n resolve()\n }\n animation.reverse()\n })\n }),\n )\n }\n\n const finish = async () => {\n steps.forEach(({ animation }) => {\n animation.finish()\n })\n }\n\n return { play, reverse, finish }\n}\n\nexport const startJavaScriptAnimation = ({\n duration = 300,\n timingFunction = (t) => t,\n onProgress = () => {},\n onCancel = () => {},\n onComplete = () => {},\n}) => {\n if (isNaN(duration)) {\n // console.warn(`duration must be a number, received ${duration}`)\n return () => {}\n }\n duration = parseInt(duration, 10)\n const startMs = performance.now()\n let currentRequestAnimationFrameId\n let done = false\n let rawProgress = 0\n let progress = 0\n const handler = () => {\n currentRequestAnimationFrameId = null\n const nowMs = performance.now()\n rawProgress = Math.min((nowMs - startMs) / duration, 1)\n progress = timingFunction(rawProgress)\n done = rawProgress === 1\n onProgress({\n done,\n rawProgress,\n progress,\n })\n if (done) {\n onComplete()\n } else {\n currentRequestAnimationFrameId = window.requestAnimationFrame(handler)\n }\n }\n handler()\n const stop = () => {\n if (currentRequestAnimationFrameId) {\n window.cancelAnimationFrame(currentRequestAnimationFrameId)\n currentRequestAnimationFrameId = null\n }\n if (!done) {\n done = true\n onCancel({\n rawProgress,\n progress,\n })\n }\n }\n return stop\n}\n",
76
+ "// handle data-last-interaction attr on html (focusring)\nwindow.addEventListener(\"mousedown\", (mousedownEvent) => {\n if (mousedownEvent.defaultPrevented) {\n return\n }\n document.documentElement.setAttribute(\"data-last-interaction\", \"mouse\")\n})\nwindow.addEventListener(\"touchstart\", (touchstartEvent) => {\n if (touchstartEvent.defaultPrevented) {\n return\n }\n document.documentElement.setAttribute(\"data-last-interaction\", \"mouse\")\n})\nwindow.addEventListener(\"keydown\", (keydownEvent) => {\n if (keydownEvent.defaultPrevented) {\n return\n }\n document.documentElement.setAttribute(\"data-last-interaction\", \"keyboard\")\n})\n",
77
+ "export const createPreference = (name) => {\n return {\n has: () => localStorage.hasOwnProperty(name),\n get: () =>\n localStorage.hasOwnProperty(name)\n ? JSON.parse(localStorage.getItem(name))\n : undefined,\n set: (value) => localStorage.setItem(name, JSON.stringify(value)),\n }\n}\n",
78
+ "import { updateIframeOverflowOnParentWindow } from \"../util/dom.js\"\n\nexport const toggleTooltip = (element) => {\n if (element.hasAttribute(\"data-tooltip-visible\")) {\n hideTooltip(element)\n } else {\n showTooltip(element)\n }\n}\n\nexport const hideTooltip = (element) => {\n element.removeAttribute(\"data-tooltip-visible\")\n element.removeAttribute(\"data-tooltip-auto-visible\")\n updateIframeOverflowOnParentWindow()\n}\n\nexport const showTooltip = (element) => {\n element.setAttribute(\"data-tooltip-visible\", \"\")\n updateIframeOverflowOnParentWindow()\n}\n\nexport const autoShowTooltip = (element) => {\n element.setAttribute(\"data-tooltip-auto-visible\", \"\")\n updateIframeOverflowOnParentWindow()\n}\n\nexport const removeAutoShowTooltip = (element) => {\n element.removeAttribute(\"data-tooltip-auto-visible\")\n updateIframeOverflowOnParentWindow()\n}\n\nexport const hideAllTooltip = () => {\n const elementsWithTooltip = Array.from(\n document.querySelectorAll(\"[data-tooltip-visible]\"),\n )\n elementsWithTooltip.forEach((elementWithTooltip) => {\n hideTooltip(elementWithTooltip)\n })\n}\n",
79
+ "export const enableVariant = (rootNode, variables) => {\n const nodesNotMatching = Array.from(\n rootNode.querySelectorAll(`[${attributeIndicatingACondition}]`),\n )\n nodesNotMatching.forEach((nodeNotMatching) => {\n const conditionAttributeValue = nodeNotMatching.getAttribute(\n attributeIndicatingACondition,\n )\n const matches = testCondition(conditionAttributeValue, variables)\n if (matches) {\n renameAttribute(\n nodeNotMatching,\n attributeIndicatingACondition,\n attributeIndicatingAMatch,\n )\n }\n })\n\n const nodesMatching = Array.from(\n rootNode.querySelectorAll(`[${attributeIndicatingAMatch}]`),\n )\n nodesMatching.forEach((nodeMatching) => {\n const conditionAttributeValue = nodeMatching.getAttribute(\n attributeIndicatingAMatch,\n )\n const matches = testCondition(conditionAttributeValue, variables)\n if (!matches) {\n renameAttribute(\n nodeMatching,\n attributeIndicatingAMatch,\n attributeIndicatingACondition,\n )\n }\n })\n}\n\nconst testCondition = (conditionAttributeValue, variables) => {\n const condition = parseCondition(conditionAttributeValue)\n return Object.keys(variables).some((key) => {\n if (condition.key !== key) {\n return false\n }\n // the condition do not specify a value, any value is ok\n if (condition.value === undefined) {\n return true\n }\n if (condition.value === variables[key]) {\n return true\n }\n return false\n })\n}\n\nconst parseCondition = (conditionAttributeValue) => {\n const colonIndex = conditionAttributeValue.indexOf(\":\")\n if (colonIndex === -1) {\n return {\n key: conditionAttributeValue,\n value: undefined,\n }\n }\n return {\n key: conditionAttributeValue.slice(0, colonIndex),\n value: conditionAttributeValue.slice(colonIndex + 1),\n }\n}\n\nconst attributeIndicatingACondition = `data-when`\nconst attributeIndicatingAMatch = `data-when-active`\n\nconst renameAttribute = (node, name, newName) => {\n node.setAttribute(newName, node.getAttribute(name))\n node.removeAttribute(name)\n}\n",
80
+ "import {\n toolbarSectionIsActive,\n deactivateToolbarSection,\n activateToolbarSection,\n updateIframeOverflowOnParentWindow,\n} from \"../util/dom.js\"\nimport { enableVariant } from \"../variant/variant.js\"\n\nexport const renderToolbarSettings = () => {\n document.querySelector(\"#settings-button\").onclick = toggleSettings\n document.querySelector(\"#button-close-settings\").onclick = toggleSettings\n}\n\nconst toggleSettings = () => {\n if (settingsAreVisible()) {\n hideSettings()\n } else {\n showSettings()\n }\n}\n\nexport const enableWarningStyle = () => {\n enableVariant(document.querySelector(\"#settings-button\"), {\n has_warning: \"yes\",\n })\n}\n\nexport const disableWarningStyle = () => {\n enableVariant(document.querySelector(\"#settings-button\"), {\n has_warning: \"no\",\n })\n}\n\nexport const settingsAreVisible = () => {\n return toolbarSectionIsActive(document.querySelector(`#settings`))\n}\n\nexport const hideSettings = () => {\n deactivateToolbarSection(document.querySelector(`#settings`))\n updateIframeOverflowOnParentWindow()\n}\n\nexport const showSettings = () => {\n activateToolbarSection(document.querySelector(`#settings`))\n updateIframeOverflowOnParentWindow()\n}\n",
81
+ "export default (obj, key, value) => {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true,\n })\n } else {\n obj[key] = value\n }\n return obj\n}\n",
82
+ "import defineProperty from \"../defineProperty/defineProperty.js\"\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object)\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object)\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable\n })\n }\n keys.push.apply(keys, symbols)\n }\n return keys\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {}\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key])\n })\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source))\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key))\n })\n }\n }\n return target\n}\n",
83
+ "import { createPreference } from \"../util/preferences.js\"\nimport { enableVariant } from \"../variant/variant.js\"\n\nconst notificationAvailable = typeof window.Notification === \"function\"\nconst notificationPreference = createPreference(\"notification\")\n\nconst arrayOfOpenedNotifications = []\nexport const renderToolbarNotification = () => {\n const notifCheckbox = document.querySelector(\"#toggle-notifs\")\n if (!notificationAvailable) {\n const notifSetting = document.querySelector(\".settings-notification\")\n notifSetting.setAttribute(\"data-disabled\", \"true\")\n notifSetting.setAttribute(\n \"title\",\n `Notification not available in the browser`,\n )\n notifCheckbox.disabled = true\n return\n }\n\n const updatePermission = () => {\n if (Notification.permission === \"denied\") {\n const notifSetting = document.querySelector(\".settings-notification\")\n notifSetting.setAttribute(\"data-disabled\", \"true\")\n notifSetting.setAttribute(\"title\", `Notification denied`)\n notifCheckbox.disabled = true\n return\n }\n\n notifCheckbox.checked = getNotificationPreference()\n notifCheckbox.onchange = () => {\n setNotificationPreference(notifCheckbox.checked)\n if (!notifCheckbox.checked) {\n // slice because arrayOfOpenedNotifications can be mutated while looping\n arrayOfOpenedNotifications.slice().forEach((notification) => {\n notification.close()\n })\n }\n }\n const notifPermission = Notification.permission\n enableVariant(document.querySelector(\".notification-text\"), {\n notif_permission: notifPermission === \"granted\" ? \"yes\" : \"no\",\n })\n if (notifPermission === \"default\") {\n document.querySelector(\"a.request_notification_permission\").onclick =\n () => {\n requestPermission().then(() => {\n updatePermission()\n })\n }\n }\n }\n updatePermission()\n}\n\nexport const notifyExecutionResult = (\n executedFileRelativeUrl,\n execution,\n previousExecution,\n) => {\n const notificationEnabled = getNotificationPreference()\n if (!notificationEnabled) return\n\n const notificationOptions = {\n lang: \"en\",\n icon: getFaviconHref(),\n clickToFocus: true,\n clickToClose: true,\n }\n\n if (execution.status === \"errored\") {\n if (previousExecution) {\n if (previousExecution.status === \"completed\") {\n notify(\"Broken\", {\n ...notificationOptions,\n body: `${executedFileRelativeUrl} execution now failing.`,\n })\n } else {\n notify(\"Still failing\", {\n ...notificationOptions,\n body: `${executedFileRelativeUrl} execution still failing.`,\n })\n }\n } else {\n notify(\"Failing\", {\n ...notificationOptions,\n body: `${executedFileRelativeUrl} execution failed.`,\n })\n }\n } else if (previousExecution && previousExecution.status === \"errored\") {\n notify(\"Fixed\", {\n ...notificationOptions,\n body: `${executedFileRelativeUrl} execution fixed.`,\n })\n }\n}\n\nconst getNotificationPreference = () =>\n notificationPreference.has() ? notificationPreference.get() : true\n\nconst setNotificationPreference = (value) => notificationPreference.set(value)\n\nconst getFaviconHref = () => {\n const link = document.querySelector('link[rel=\"icon\"]')\n return link ? link.href : undefined\n}\n\nlet permission = \"default\"\n\nconst notify = notificationAvailable\n ? async (\n title,\n { clickToFocus = false, clickToClose = false, ...options } = {},\n ) => {\n if (permission !== \"granted\") {\n return null\n }\n\n const notification = new Notification(title, options)\n arrayOfOpenedNotifications.push(notification)\n notification.onclick = () => {\n // but if the user navigated inbetween\n // focusing window will show something else\n // in that case it could be great to do something\n // maybe like showing a message saying this execution\n // is no longer visible\n // we could also navigauate to this file execution but\n // there is no guarantee re-executing the file would give same output\n // and it would also trigger an other notification\n if (clickToFocus) window.focus()\n if (clickToClose) notification.close()\n }\n notification.onclose = () => {\n const index = arrayOfOpenedNotifications.indexOf(notification)\n if (index > -1) {\n arrayOfOpenedNotifications.splice(index, 1)\n }\n }\n return notification\n }\n : () => {}\n\nlet requestPromise\nconst requestPermission = notificationAvailable\n ? async () => {\n if (requestPromise) return requestPromise\n requestPromise = Notification.requestPermission()\n permission = await requestPromise\n requestPromise = undefined\n return permission\n }\n : () => Promise.resolve(\"default\")\n",
84
+ "import { createPreference } from \"../util/preferences.js\"\n\nconst DARK_THEME = \"dark\"\nconst LIGHT_THEME = \"light\"\nconst themePreference = createPreference(\"theme\")\n\nexport const renderToolbarTheme = () => {\n const theme = getThemePreference()\n const checkbox = document.querySelector(\"#checkbox-dark-theme\")\n checkbox.checked = theme === DARK_THEME\n setTheme(theme)\n checkbox.onchange = () => {\n if (checkbox.checked) {\n setThemePreference(DARK_THEME)\n setTheme(DARK_THEME)\n } else {\n setThemePreference(LIGHT_THEME)\n setTheme(LIGHT_THEME)\n }\n }\n}\n\nconst getThemePreference = () => {\n return themePreference.has() ? themePreference.get() : DARK_THEME\n}\n\nconst setThemePreference = (value) => {\n themePreference.set(value)\n setTheme(value)\n}\n\nconst setTheme = (theme) => {\n document.querySelector(\"html\").setAttribute(\"data-theme\", theme)\n}\n",
85
+ "import { createPreference } from \"../util/preferences.js\"\n\nconst animationPreference = createPreference(\"animation\")\n\nexport const renderToolbarAnimation = () => {\n const animCheckbox = document.querySelector(\"#toggle-anims\")\n animCheckbox.checked = getAnimationPreference()\n animCheckbox.onchange = () => {\n setAnimationPreference(animCheckbox.checked)\n onPreferenceChange(animCheckbox.checked)\n }\n onPreferenceChange()\n\n // enable toolbar transition only after first render\n setTimeout(() => {\n document.querySelector(\"#toolbar\").setAttribute(\"data-animate\", \"\")\n })\n}\n\nconst onPreferenceChange = (value = getAnimationPreference()) => {\n if (value) {\n enableAnimation()\n } else {\n disableAnimation()\n }\n}\n\nconst getAnimationPreference = () =>\n animationPreference.has() ? animationPreference.get() : true\n\nconst setAnimationPreference = (value) => animationPreference.set(value)\n\nconst enableAnimation = () => {\n document.documentElement.removeAttribute(\"data-animation-disabled\")\n}\n\nconst disableAnimation = () => {\n document.documentElement.setAttribute(\"data-animation-disabled\", \"\")\n}\n",
86
+ "export const createHorizontalBreakpoint = (breakpointValue) => {\n return createBreakpoint(windowWidthMeasure, breakpointValue)\n}\n\nconst createMeasure = ({ compute, register }) => {\n let currentValue = compute()\n\n const get = () => compute()\n\n const changed = createSignal()\n\n let unregister = () => {}\n if (register) {\n unregister = register(() => {\n const value = compute()\n if (value !== currentValue) {\n const previousValue = value\n currentValue = value\n changed.notify(value, previousValue)\n }\n })\n }\n\n return { get, changed, unregister }\n}\n\nconst createSignal = () => {\n const callbackArray = []\n\n const listen = (callback) => {\n callbackArray.push(callback)\n return () => {\n const index = callbackArray.indexOf(callback)\n if (index > -1) {\n callbackArray.splice(index, 1)\n }\n }\n }\n\n const notify = (...args) => {\n callbackArray.slice().forEach((callback) => {\n callback(...args)\n })\n }\n\n return { listen, notify }\n}\n\nconst windowWidthMeasure = createMeasure({\n name: \"window-width\",\n compute: () => window.innerWidth,\n register: (onchange) => {\n window.addEventListener(\"resize\", onchange)\n window.addEventListener(\"orientationchange\", onchange)\n return () => {\n window.removeEventListener(\"resize\", onchange)\n window.removeEventListener(\"orientationchange\", onchange)\n }\n },\n})\n\nconst createBreakpoint = (measure, breakpointValue) => {\n const getBreakpointState = () => {\n const value = measure.get()\n\n if (value < breakpointValue) {\n return \"below\"\n }\n if (value > breakpointValue) {\n return \"above\"\n }\n return \"equals\"\n }\n\n let currentBreakpointState = getBreakpointState()\n\n const isAbove = () => {\n return measure.get() > breakpointValue\n }\n\n const isBelow = () => {\n return measure.get() < breakpointValue\n }\n\n const breakpointChanged = createSignal()\n\n measure.changed.listen(() => {\n const breakpointState = getBreakpointState()\n if (breakpointState !== currentBreakpointState) {\n const breakpointStatePrevious = currentBreakpointState\n currentBreakpointState = breakpointState\n breakpointChanged.notify(breakpointState, breakpointStatePrevious)\n }\n })\n\n return {\n isAbove,\n isBelow,\n changed: breakpointChanged,\n }\n}\n\n// const windowScrollTop = createMeasure({\n// name: \"window-scroll-top\",\n// compute: () => window.scrollTop,\n// register: (onchange) => {\n// window.addEventListener(\"scroll\", onchange)\n// return () => {\n// window.removeEventListener(\"scroll\", onchange)\n// }\n// },\n// })\n",
87
+ "import { removeForceHideElement, activateToolbarSection } from \"../util/dom.js\"\nimport { enableVariant } from \"../variant/variant.js\"\nimport { createHorizontalBreakpoint } from \"../util/responsive.js\"\nimport { toggleTooltip } from \"../tooltip/tooltip.js\"\nimport { notifyExecutionResult } from \"../notification/toolbar.notification.js\"\n\nconst WINDOW_MEDIUM_WIDTH = 570\n\nexport const renderExecutionInToolbar = ({ executedFileRelativeUrl }) => {\n // reset file execution indicator ui\n applyExecutionIndicator()\n removeForceHideElement(document.querySelector(\"#execution-indicator\"))\n\n // apply responsive design on fileInput if needed + add listener on resize screen\n const input = document.querySelector(\"#file-input\")\n const fileWidthBreakpoint = createHorizontalBreakpoint(WINDOW_MEDIUM_WIDTH)\n const handleFileWidthBreakpoint = () => {\n resizeInput(input, fileWidthBreakpoint)\n }\n handleFileWidthBreakpoint()\n fileWidthBreakpoint.changed.listen(handleFileWidthBreakpoint)\n input.value = executedFileRelativeUrl\n resizeInput(input, fileWidthBreakpoint)\n\n activateToolbarSection(document.querySelector(\"#file\"))\n removeForceHideElement(document.querySelector(\"#file\"))\n\n window.parent.__jsenv__.executionResultPromise.then(\n ({ status, startTime, endTime }) => {\n const execution = { status, startTime, endTime }\n applyExecutionIndicator(execution)\n\n const executionStorageKey = executedFileRelativeUrl\n const previousExecution = sessionStorage.hasOwnProperty(\n executionStorageKey,\n )\n ? JSON.parse(sessionStorage.getItem(executionStorageKey))\n : undefined\n notifyExecutionResult(\n executedFileRelativeUrl,\n execution,\n previousExecution,\n )\n\n sessionStorage.setItem(executedFileRelativeUrl, JSON.stringify(execution))\n },\n )\n}\n\nconst applyExecutionIndicator = ({\n status = \"running\",\n startTime,\n endTime,\n} = {}) => {\n const executionIndicator = document.querySelector(\"#execution-indicator\")\n enableVariant(executionIndicator, { execution: status })\n const variantNode = executionIndicator.querySelector(\"[data-when-active]\")\n\n variantNode.querySelector(\"button\").onclick = () =>\n toggleTooltip(executionIndicator)\n variantNode.querySelector(\".tooltip\").textContent = computeText({\n status,\n startTime,\n endTime,\n })\n}\n\nconst computeText = ({ status, startTime, endTime }) => {\n if (status === \"completed\") {\n return `Execution completed in ${endTime - startTime}ms`\n }\n\n if (status === \"errored\") {\n return `Execution failed in ${endTime - startTime}ms`\n }\n\n if (status === \"running\") {\n return \"Executing...\"\n }\n\n return \"\"\n}\n\nconst resizeInput = (input, fileWidthBreakpoint) => {\n const size = fileWidthBreakpoint.isBelow() ? 20 : 40\n if (input.value.length > size) {\n input.style.width = `${size}ch`\n } else {\n input.style.width = `${input.value.length}ch`\n }\n}\n",
88
+ "/* eslint-env browser */\n\nexport const fetchUsingXHR = async (\n url,\n {\n signal,\n method = \"GET\",\n credentials = \"same-origin\",\n headers = {},\n body = null,\n } = {},\n) => {\n const headersPromise = createPromiseAndHooks()\n const bodyPromise = createPromiseAndHooks()\n\n const xhr = new XMLHttpRequest()\n\n const failure = (error) => {\n // if it was already resolved, we must reject the body promise\n if (headersPromise.settled) {\n bodyPromise.reject(error)\n } else {\n headersPromise.reject(error)\n }\n }\n\n const cleanup = () => {\n xhr.ontimeout = null\n xhr.onerror = null\n xhr.onload = null\n xhr.onreadystatechange = null\n }\n\n xhr.ontimeout = () => {\n cleanup()\n failure(new Error(`xhr request timeout on ${url}.`))\n }\n\n xhr.onerror = (error) => {\n cleanup()\n // unfortunately with have no clue why it fails\n // might be cors for instance\n failure(createRequestError(error, { url }))\n }\n\n xhr.onload = () => {\n cleanup()\n bodyPromise.resolve()\n }\n\n signal.addEventListener(\"abort\", () => {\n xhr.abort()\n const abortError = new Error(\"aborted\")\n abortError.name = \"AbortError\"\n failure(abortError)\n })\n\n xhr.onreadystatechange = () => {\n // https://developer.mozilla.org/fr/docs/Web/API/XMLHttpRequest/readyState\n const { readyState } = xhr\n\n if (readyState === 2) {\n headersPromise.resolve()\n } else if (readyState === 4) {\n cleanup()\n bodyPromise.resolve()\n }\n }\n\n xhr.open(method, url, true)\n Object.keys(headers).forEach((key) => {\n xhr.setRequestHeader(key, headers[key])\n })\n xhr.withCredentials = computeWithCredentials({ credentials, url })\n if (\"responseType\" in xhr && hasBlob) {\n xhr.responseType = \"blob\"\n }\n xhr.send(body)\n\n await headersPromise\n\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseURL\n const responseUrl =\n \"responseURL\" in xhr ? xhr.responseURL : headers[\"x-request-url\"]\n let responseStatus = xhr.status\n const responseStatusText = xhr.statusText\n const responseHeaders = getHeadersFromXHR(xhr)\n\n const readBody = async () => {\n await bodyPromise\n\n const { status } = xhr\n // in Chrome on file:/// URLs, status is 0\n if (status === 0) {\n responseStatus = 200\n }\n\n const body = \"response\" in xhr ? xhr.response : xhr.responseText\n\n return {\n responseBody: body,\n responseBodyType: detectBodyType(body),\n }\n }\n\n const text = async () => {\n const { responseBody, responseBodyType } = await readBody()\n\n if (responseBodyType === \"blob\") {\n return blobToText(responseBody)\n }\n if (responseBodyType === \"formData\") {\n throw new Error(\"could not read FormData body as text\")\n }\n if (responseBodyType === \"dataView\") {\n return arrayBufferToText(responseBody.buffer)\n }\n if (responseBodyType === \"arrayBuffer\") {\n return arrayBufferToText(responseBody)\n }\n // if (responseBodyType === \"text\" || responseBodyType === 'searchParams') {\n // return body\n // }\n return String(responseBody)\n }\n\n const json = async () => {\n const responseText = await text()\n return JSON.parse(responseText)\n }\n\n const blob = async () => {\n if (!hasBlob) {\n throw new Error(`blob not supported`)\n }\n\n const { responseBody, responseBodyType } = await readBody()\n\n if (responseBodyType === \"blob\") {\n return responseBody\n }\n if (responseBodyType === \"dataView\") {\n return new Blob([cloneBuffer(responseBody.buffer)])\n }\n if (responseBodyType === \"arrayBuffer\") {\n return new Blob([cloneBuffer(responseBody)])\n }\n if (responseBodyType === \"formData\") {\n throw new Error(\"could not read FormData body as blob\")\n }\n return new Blob([String(responseBody)])\n }\n\n const arrayBuffer = async () => {\n const { responseBody, responseBodyType } = await readBody()\n\n if (responseBodyType === \"arrayBuffer\") {\n return cloneBuffer(responseBody)\n }\n const responseBlob = await blob()\n return blobToArrayBuffer(responseBlob)\n }\n\n const formData = async () => {\n if (!hasFormData) {\n throw new Error(`formData not supported`)\n }\n const responseText = await text()\n return textToFormData(responseText)\n }\n\n return {\n url: responseUrl,\n status: responseStatus,\n statusText: responseStatusText,\n headers: responseHeaders,\n text,\n json,\n blob,\n arrayBuffer,\n formData,\n }\n}\n\nconst canUseBlob = () => {\n if (typeof window.FileReader !== \"function\") return false\n\n if (typeof window.Blob !== \"function\") return false\n\n try {\n // eslint-disable-next-line no-new\n new Blob()\n return true\n } catch (e) {\n return false\n }\n}\n\nconst hasBlob = canUseBlob()\n\nconst hasFormData = typeof window.FormData === \"function\"\n\nconst hasArrayBuffer = typeof window.ArrayBuffer === \"function\"\n\nconst hasSearchParams = typeof window.URLSearchParams === \"function\"\n\nconst createRequestError = (error, { url }) => {\n return new Error(\n `error during xhr request on ${url}.\n--- error stack ---\n${error.stack}`,\n )\n}\n\nconst createPromiseAndHooks = () => {\n let resolve\n let reject\n const promise = new Promise((res, rej) => {\n resolve = (value) => {\n promise.settled = true\n res(value)\n }\n reject = (value) => {\n promise.settled = true\n rej(value)\n }\n })\n promise.resolve = resolve\n promise.reject = reject\n return promise\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch\nconst computeWithCredentials = ({ credentials, url }) => {\n if (credentials === \"same-origin\") {\n return originSameAsGlobalOrigin(url)\n }\n return credentials === \"include\"\n}\n\nconst originSameAsGlobalOrigin = (url) => {\n // if we cannot read globalOrigin from window.location.origin, let's consider it's ok\n if (typeof window !== \"object\") return true\n if (typeof window.location !== \"object\") return true\n const globalOrigin = window.location.origin\n if (globalOrigin === \"null\") return true\n return hrefToOrigin(url) === globalOrigin\n}\n\nconst detectBodyType = (body) => {\n if (!body) {\n return \"\"\n }\n if (typeof body === \"string\") {\n return \"text\"\n }\n if (hasBlob && Blob.prototype.isPrototypeOf(body)) {\n return \"blob\"\n }\n if (hasFormData && FormData.prototype.isPrototypeOf(body)) {\n return \"formData\"\n }\n if (hasArrayBuffer) {\n if (hasBlob && isDataView(body)) {\n return `dataView`\n }\n if (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body)) {\n return `arrayBuffer`\n }\n }\n if (hasSearchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n return \"searchParams\"\n }\n return \"\"\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders#Example\nconst getHeadersFromXHR = (xhr) => {\n const headerMap = {}\n\n const headersString = xhr.getAllResponseHeaders()\n if (headersString === \"\") return headerMap\n\n const lines = headersString.trim().split(/[\\r\\n]+/)\n lines.forEach((line) => {\n const parts = line.split(\": \")\n const name = parts.shift()\n const value = parts.join(\": \")\n headerMap[name.toLowerCase()] = value\n })\n\n return headerMap\n}\n\nconst hrefToOrigin = (href) => {\n const scheme = hrefToScheme(href)\n\n if (scheme === \"file\") {\n return \"file://\"\n }\n\n if (scheme === \"http\" || scheme === \"https\") {\n const secondProtocolSlashIndex = scheme.length + \"://\".length\n const pathnameSlashIndex = href.indexOf(\"/\", secondProtocolSlashIndex)\n\n if (pathnameSlashIndex === -1) return href\n return href.slice(0, pathnameSlashIndex)\n }\n\n return href.slice(0, scheme.length + 1)\n}\n\nconst hrefToScheme = (href) => {\n const colonIndex = href.indexOf(\":\")\n if (colonIndex === -1) return \"\"\n return href.slice(0, colonIndex)\n}\n\nconst isDataView = (obj) => {\n return obj && DataView.prototype.isPrototypeOf(obj)\n}\n\nconst isArrayBufferView =\n ArrayBuffer.isView ||\n (() => {\n const viewClasses = [\n \"[object Int8Array]\",\n \"[object Uint8Array]\",\n \"[object Uint8ClampedArray]\",\n \"[object Int16Array]\",\n \"[object Uint16Array]\",\n \"[object Int32Array]\",\n \"[object Uint32Array]\",\n \"[object Float32Array]\",\n \"[object Float64Array]\",\n ]\n\n return (value) => {\n return (\n value && viewClasses.includes(Object.prototype.toString.call(value))\n )\n }\n })()\n\nconst textToFormData = (text) => {\n const form = new FormData()\n text\n .trim()\n .split(\"&\")\n .forEach(function (bytes) {\n if (bytes) {\n const split = bytes.split(\"=\")\n const name = split.shift().replace(/\\+/g, \" \")\n const value = split.join(\"=\").replace(/\\+/g, \" \")\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n}\n\nconst blobToArrayBuffer = async (blob) => {\n const reader = new FileReader()\n const promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n}\n\nconst blobToText = (blob) => {\n const reader = new FileReader()\n const promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n}\n\nconst arrayBufferToText = (arrayBuffer) => {\n const view = new Uint8Array(arrayBuffer)\n const chars = new Array(view.length)\n let i = 0\n while (i < view.length) {\n chars[i] = String.fromCharCode(view[i])\n\n i++\n }\n return chars.join(\"\")\n}\n\nconst fileReaderReady = (reader) => {\n return new Promise(function (resolve, reject) {\n reader.onload = function () {\n resolve(reader.result)\n }\n reader.onerror = function () {\n reject(reader.error)\n }\n })\n}\n\nconst cloneBuffer = (buffer) => {\n if (buffer.slice) {\n return buffer.slice(0)\n }\n const view = new Uint8Array(buffer.byteLength)\n view.set(new Uint8Array(buffer))\n return view.buffer\n}\n",
89
+ "import { fetchUsingXHR } from \"./fetchUsingXHR.js\"\n\nconst fetchNative = async (url, { mode = \"cors\", ...options } = {}) => {\n const response = await window.fetch(url, {\n mode,\n ...options,\n })\n\n return {\n url: response.url,\n status: response.status,\n statusText: \"\",\n headers: responseToHeaders(response),\n text: () => response.text(),\n json: () => response.json(),\n blob: () => response.blob(),\n arrayBuffer: () => response.arrayBuffer(),\n formData: () => response.formData(),\n }\n}\n\nconst responseToHeaders = (response) => {\n const headers = {}\n response.headers.forEach((value, name) => {\n headers[name] = value\n })\n return headers\n}\n\nexport const fetchUrl =\n typeof window.fetch === \"function\" &&\n typeof window.AbortController === \"function\"\n ? fetchNative\n : fetchUsingXHR\n",
90
+ "import { fetchUrl } from \"./fetch_browser.js\"\n\nexport const fetchJson = async (url, options = {}) => {\n const response = await fetchUrl(url, options)\n const object = await response.json()\n return object\n}\n",
91
+ "/*\n * Prefer window.navigator.userAgentData before resorting to\n * window.navigator.userAgent because of\n * https://blog.chromium.org/2021/09/user-agent-reduction-origin-trial-and-dates.html\n */\n\nexport const detectFromUserAgentData = () => {\n const { userAgentData } = window.navigator\n if (!userAgentData) {\n return null\n }\n\n const { brands } = userAgentData\n let i = 0\n while (i < brands.length) {\n const { brand, version } = brands[i]\n i++\n if (brand === \"chromium\" || brand === \"Google Chrome\") {\n return {\n name: \"chrome\",\n version,\n }\n }\n }\n return null\n}\n",
92
+ "export const firstMatch = (regexp, string) => {\n const match = string.match(regexp)\n return match && match.length > 0 ? match[1] || undefined : undefined\n}\n\nexport const secondMatch = (regexp, string) => {\n const match = string.match(regexp)\n return match && match.length > 1 ? match[2] || undefined : undefined\n}\n\nexport const userAgentToVersion = (userAgent) => {\n return firstMatch(/version\\/(\\d+(\\.?_?\\d+)+)/i, userAgent) || undefined\n}\n",
93
+ "import { firstMatch } from \"./util.js\"\n\nexport const detectAndroid = () => navigatorToBrowser(window.navigator)\n\nconst navigatorToBrowser = ({ userAgent, appVersion }) => {\n if (/(android)/i.test(userAgent)) {\n return {\n name: \"android\",\n version: firstMatch(/Android (\\d+(\\.?_?\\d+)+)/i, appVersion),\n }\n }\n return null\n}\n",
94
+ "import { firstMatch } from \"./util.js\"\n\nexport const detectInternetExplorer = () =>\n userAgentToBrowser(window.navigator.userAgent)\n\nconst userAgentToBrowser = (userAgent) => {\n if (/msie|trident/i.test(userAgent)) {\n return {\n name: \"ie\",\n version: firstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i, userAgent),\n }\n }\n return null\n}\n",
95
+ "import { firstMatch, userAgentToVersion } from \"./util.js\"\n\nexport const detectOpera = () => userAgentToBrowser(window.navigator.userAgent)\n\nconst userAgentToBrowser = (userAgent) => {\n // opera below 13\n if (/opera/i.test(userAgent)) {\n return {\n name: \"opera\",\n version:\n userAgentToVersion(userAgent) ||\n firstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i, userAgent),\n }\n }\n\n // opera above 13\n if (/opr\\/|opios/i.test(userAgent)) {\n return {\n name: \"opera\",\n version:\n firstMatch(/(?:opr|opios)[\\s/](\\S+)/i, userAgent) ||\n userAgentToVersion(userAgent),\n }\n }\n\n return null\n}\n",
96
+ "import { secondMatch } from \"./util.js\"\n\nexport const detectEdge = () => userAgentToBrowser(window.navigator.userAgent)\n\nconst userAgentToBrowser = (userAgent) => {\n if (/edg([ea]|ios)/i.test(userAgent)) {\n return {\n name: \"edge\",\n version: secondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i, userAgent),\n }\n }\n return null\n}\n",
97
+ "import { firstMatch } from \"./util.js\"\n\nexport const detectFirefox = () =>\n userAgentToBrowser(window.navigator.userAgent)\n\nconst userAgentToBrowser = (userAgent) => {\n if (/firefox|iceweasel|fxios/i.test(userAgent)) {\n return {\n name: \"firefox\",\n version: firstMatch(\n /(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,\n userAgent,\n ),\n }\n }\n return null\n}\n",
98
+ "import { userAgentToVersion, firstMatch } from \"./util.js\"\n\nexport const detectChrome = () => {\n return userAgentToBrowser(window.navigator.userAgent)\n}\n\nconst userAgentToBrowser = (userAgent) => {\n if (/chromium/i.test(userAgent)) {\n return {\n name: \"chrome\",\n version:\n firstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i, userAgent) ||\n userAgentToVersion(userAgent),\n }\n }\n\n if (/chrome|crios|crmo/i.test(userAgent)) {\n return {\n name: \"chrome\",\n version: firstMatch(\n /(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i,\n userAgent,\n ),\n }\n }\n\n return null\n}\n",
99
+ "import { userAgentToVersion } from \"./util.js\"\n\nexport const detectSafari = () => userAgentToBrowser(window.navigator.userAgent)\n\nconst userAgentToBrowser = (userAgent) => {\n if (/safari|applewebkit/i.test(userAgent)) {\n return {\n name: \"safari\",\n version: userAgentToVersion(userAgent),\n }\n }\n return null\n}\n",
100
+ "export const detectElectron = () => null // TODO\n",
101
+ "import { firstMatch } from \"./util.js\"\n\nexport const detectIOS = () => navigatorToBrowser(window.navigator)\n\nconst navigatorToBrowser = ({ userAgent, appVersion }) => {\n if (/iPhone;/.test(userAgent)) {\n return {\n name: \"ios\",\n version: firstMatch(/OS (\\d+(\\.?_?\\d+)+)/i, appVersion),\n }\n }\n if (/iPad;/.test(userAgent)) {\n return {\n name: \"ios\",\n version: firstMatch(/OS (\\d+(\\.?_?\\d+)+)/i, appVersion),\n }\n }\n return null\n}\n",
102
+ "// https://github.com/Ahmdrza/detect-browser/blob/26254f85cf92795655a983bfd759d85f3de850c6/detect-browser.js#L1\n// https://github.com/lancedikson/bowser/blob/master/src/parser-browsers.js#L1\n\nimport { detectFromUserAgentData } from \"./user_agent_data.js\"\nimport { detectAndroid } from \"./detectAndroid.js\"\nimport { detectInternetExplorer } from \"./detectInternetExplorer.js\"\nimport { detectOpera } from \"./detectOpera.js\"\nimport { detectEdge } from \"./detectEdge.js\"\nimport { detectFirefox } from \"./detectFirefox.js\"\nimport { detectChrome } from \"./detectChrome.js\"\nimport { detectSafari } from \"./detectSafari.js\"\nimport { detectElectron } from \"./detectElectron.js\"\nimport { detectIOS } from \"./detectIOS.js\"\n\nconst detectorCompose = (detectors) => () => {\n let i = 0\n while (i < detectors.length) {\n const detector = detectors[i]\n i++\n const result = detector()\n if (result) {\n return result\n }\n }\n return null\n}\n\nconst detector = detectorCompose([\n detectFromUserAgentData, // keep this first\n detectOpera,\n detectInternetExplorer,\n detectEdge,\n detectFirefox,\n detectChrome,\n detectSafari,\n detectElectron,\n detectIOS,\n detectAndroid,\n])\n\nexport const detectBrowser = () => {\n const { name = \"other\", version = \"unknown\" } = detector() || {}\n\n return {\n name: normalizeName(name),\n version: normalizeVersion(version),\n }\n}\n\nconst normalizeName = (name) => {\n return name.toLowerCase()\n}\n\nconst normalizeVersion = (version) => {\n if (version.indexOf(\".\") > -1) {\n const parts = version.split(\".\")\n // remove extraneous .\n return parts.slice(0, 3).join(\".\")\n }\n\n if (version.indexOf(\"_\") > -1) {\n const parts = version.split(\"_\")\n // remove extraneous _\n return parts.slice(0, 3).join(\"_\")\n }\n\n return version\n}\n",
103
+ "export const executeWithScriptModuleInjection = (code) => {\n const scriptModule = document.createElement(\"script\")\n scriptModule.type = \"module\"\n\n const loadPromise = new Promise((resolve, reject) => {\n scriptModule.onload = () => {\n document.body.removeChild(scriptModule)\n resolve()\n }\n scriptModule.onerror = () => {\n document.body.removeChild(scriptModule)\n reject()\n }\n document.body.appendChild(scriptModule)\n })\n\n scriptModule.src = asBase64Url(code)\n\n return loadPromise\n}\n\nexport const asBase64Url = (text, mimeType = \"application/javascript\") => {\n return `data:${mimeType};base64,${window.btoa(text)}`\n}\n",
104
+ "import {\n asBase64Url,\n executeWithScriptModuleInjection,\n} from \"./execute_with_script_module.js\"\n\nexport const supportsImportmap = async ({ remote = true } = {}) => {\n const specifier = asBase64Url(`export default false`)\n const importMap = {\n imports: {\n [specifier]: asBase64Url(`export default true`),\n },\n }\n const importmapScript = document.createElement(\"script\")\n const importmapString = JSON.stringify(importMap, null, \" \")\n importmapScript.type = \"importmap\"\n if (remote) {\n importmapScript.src = `data:application/json;base64,${window.btoa(\n importmapString,\n )}`\n } else {\n importmapScript.textContent = importmapString\n }\n document.body.appendChild(importmapScript)\n\n try {\n await executeWithScriptModuleInjection(\n `import supported from \"${specifier}\"; window.__jsenv_runtime_test_importmap__ = supported`,\n )\n document.body.removeChild(importmapScript)\n const supported = window.__jsenv_runtime_test_importmap__\n delete window.__jsenv_runtime_test_importmap__\n return supported\n } catch (e) {\n document.body.removeChild(importmapScript)\n return false\n }\n}\n",
105
+ "import {\n asBase64Url,\n executeWithScriptModuleInjection,\n} from \"./execute_with_script_module.js\"\n\nexport const supportsDynamicImport = async () => {\n const moduleSource = asBase64Url(`export default 42`)\n try {\n await executeWithScriptModuleInjection(\n `window.__jsenv_runtime_test_dynamic_import__ = import(${JSON.stringify(\n moduleSource,\n )})`,\n )\n const namespace = await window.__jsenv_runtime_test_dynamic_import__\n delete window.__jsenv_runtime_test_dynamic_import__\n return namespace.default === 42\n } catch (e) {\n return false\n }\n}\n",
106
+ "import { executeWithScriptModuleInjection } from \"./execute_with_script_module.js\"\n\nexport const supportsTopLevelAwait = async () => {\n try {\n await executeWithScriptModuleInjection(\n `window.__jsenv_runtime_test_top_level_await__ = await Promise.resolve(42)`,\n )\n const supported = window.__jsenv_runtime_test_top_level_await__ === 42\n delete window.__jsenv_runtime_test_top_level_await__\n return supported\n } catch (e) {\n return false\n }\n}\n",
107
+ "import {\n asBase64Url,\n executeWithScriptModuleInjection,\n} from \"./execute_with_script_module.js\"\n\nexport const supportsJsonImportAssertions = async () => {\n const jsonBase64Url = asBase64Url(\"42\", \"application/json\")\n const moduleSource = asBase64Url(\n `import data from \"${jsonBase64Url}\" assert { type: \"json\" }\n export default data`,\n )\n try {\n await executeWithScriptModuleInjection(\n `window.__jsenv_runtime_test_json_import_assertion__ = import(${JSON.stringify(\n moduleSource,\n )})`,\n )\n const namespace = await window.__jsenv_runtime_test_json_import_assertion__\n const supported = namespace.default === 42\n delete window.__jsenv_runtime_test_json_import_assertion__\n return supported\n } catch (e) {\n return false\n }\n}\n",
108
+ "import {\n asBase64Url,\n executeWithScriptModuleInjection,\n} from \"./execute_with_script_module.js\"\n\nexport const supportsCssImportAssertions = async () => {\n const cssBase64Url = asBase64Url(\"p { color: red; }\", \"text/css\")\n const moduleSource = asBase64Url(\n `import css from \"${cssBase64Url}\" assert { type: \"css\" }\n export default css`,\n )\n try {\n await executeWithScriptModuleInjection(\n `window.__jsenv_runtime_test_css_import_assertion__ = import(${JSON.stringify(\n moduleSource,\n )})`,\n )\n const namespace = await window.__jsenv_runtime_test_css_import_assertion__\n return namespace.default instanceof CSSStyleSheet\n } catch (e) {\n return false\n }\n}\n",
109
+ "export const supportsNewStylesheet = () => {\n try {\n // eslint-disable-next-line no-new\n new CSSStyleSheet()\n return true\n } catch (e) {\n return false\n }\n}\n",
110
+ "import { fetchJson } from \"../../browser_utils/fetchJson.js\"\nimport { detectBrowser } from \"../../browser_detection/browser_detection.js\"\n\nimport { supportsImportmap } from \"./browser_feature_detect_importmap.js\"\nimport { supportsDynamicImport } from \"./browser_feature_detect_dynamic_import.js\"\nimport { supportsTopLevelAwait } from \"./browser_feature_detect_top_level_await.js\"\nimport { supportsJsonImportAssertions } from \"./browser_feature_detect_import_assertions_json.js\"\nimport { supportsCssImportAssertions } from \"./browser_feature_detect_import_assertions_css.js\"\nimport { supportsNewStylesheet } from \"./browser_feature_detect_new_stylesheet.js\"\n\nexport const scanBrowserRuntimeFeatures = async ({\n coverageHandledFromOutside = false,\n forceCompilation = false,\n forceSource = false,\n} = {}) => {\n const jsenvCompileProfileUrl = \"/__jsenv_compile_profile__\"\n const {\n jsenvDirectoryRelativeUrl,\n inlineImportMapIntoHTML,\n availableCompileIds,\n } = await fetchJson(jsenvCompileProfileUrl)\n const { name, version } = detectBrowser()\n const featuresReport = await detectSupportedFeatures({\n coverageHandledFromOutside,\n inlineImportMapIntoHTML,\n })\n const runtimeReport = {\n env: { browser: true },\n name,\n version,\n featuresReport,\n forceSource,\n forceCompilation,\n }\n const { compileProfile, compileId } = await fetchJson(\n jsenvCompileProfileUrl,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(runtimeReport),\n },\n )\n return {\n jsenvDirectoryRelativeUrl,\n inlineImportMapIntoHTML,\n availableCompileIds,\n runtimeReport,\n compileProfile,\n compileId,\n }\n}\n\nconst detectSupportedFeatures = async ({\n coverageHandledFromOutside,\n inlineImportMapIntoHTML,\n}) => {\n const featuresReport = {}\n featuresReport[\"import_http\"] = true\n featuresReport[\"coverage_js\"] = coverageHandledFromOutside\n // new CSSStyleSheet\n featuresReport[\"new_stylesheet\"] = supportsNewStylesheet()\n // importmap\n // start testing importmap support first and not in paralell\n // so that there is not module script loaded beore importmap is injected\n // it would log an error in chrome console and return undefined\n featuresReport.importmap = await supportsImportmap({\n // chrome supports inline but not remote importmap\n // https://github.com/WICG/import-maps/issues/235\n // at this stage we won't know if the html file will use\n // an importmap or not and if that importmap is inline or specified with an src\n // so we should test if browser support local and remote importmap.\n // But there exploring server can inline importmap by transforming html\n // and in that case we can test only the local importmap support\n // so we test importmap support and the remote one\n remote: !inlineImportMapIntoHTML,\n })\n // dynamic import\n featuresReport[\"import_dynamic\"] = await supportsDynamicImport()\n // top level await\n featuresReport[\"top_level_await\"] = await supportsTopLevelAwait()\n // import assertions\n featuresReport[\"import_assertion_type_json\"] =\n await supportsJsonImportAssertions()\n featuresReport[\"import_assertion_type_css\"] =\n await supportsCssImportAssertions()\n return featuresReport\n}\n",
111
+ "import { scanBrowserRuntimeFeatures } from \"../../../features/browser_feature_detection/browser_feature_detection.js\"\nimport { removeForceHideElement } from \"../util/dom.js\"\nimport { enableVariant } from \"../variant/variant.js\"\nimport {\n enableWarningStyle,\n disableWarningStyle,\n} from \"../settings/toolbar.settings.js\"\n\nexport const renderCompilationInToolbar = ({ compileGroup }) => {\n const browserSupportRootNode = document.querySelector(\"#browser_support\")\n const filesCompilationRootNode = document.querySelector(\"#files_compilation\")\n\n removeForceHideElement(browserSupportRootNode)\n removeForceHideElement(filesCompilationRootNode)\n\n scanBrowserRuntimeFeatures().then(\n ({\n jsenvDirectoryRelativeUrl,\n inlineImportMapIntoHTML,\n compileProfile,\n compileId,\n runtimeReport,\n }) => {\n const browserSupport = compileId\n ? \"no\"\n : inlineImportMapIntoHTML\n ? \"partial\"\n : \"full\"\n enableVariant(browserSupportRootNode, {\n browserSupport,\n })\n if (browserSupport === \"no\") {\n browserSupportRootNode.querySelector(\n `a.browser_support_read_more_link`,\n ).onclick = () => {\n // eslint-disable-next-line no-alert\n window.alert(\n `Source files needs to be compiled to be executable in this browser because: ${listWhatIsMissing(\n {\n compileProfile,\n },\n )}`,\n )\n }\n } else if (browserSupport === \"partial\") {\n browserSupportRootNode.querySelector(\n `a.browser_support_read_more_link`,\n ).onclick = () => {\n // eslint-disable-next-line no-alert\n window.alert(\n `Source files (except html) can be executed directly in this browser because: ${listWhatIsSupported(\n {\n inlineImportMapIntoHTML,\n },\n )}`,\n )\n }\n } else if (browserSupport === \"full\") {\n browserSupportRootNode.querySelector(\n `a.browser_support_read_more_link`,\n ).onclick = () => {\n // eslint-disable-next-line no-alert\n window.alert(\n `Source files can be executed directly in this browser because: ${listWhatIsSupported(\n {\n inlineImportMapIntoHTML,\n },\n )}`,\n )\n }\n }\n\n const actualCompileId = compileGroup.compileId\n const expectedCompiledId = compileId\n const shouldSwitchCompileId =\n expectedCompiledId &&\n actualCompileId &&\n actualCompileId !== expectedCompiledId\n const shouldCompile = !actualCompileId && browserSupport === \"no\"\n const filesCompilation = shouldSwitchCompileId\n ? \"mismatch\"\n : actualCompileId\n ? \"yes\"\n : inlineImportMapIntoHTML\n ? \"html_only\"\n : \"no\"\n const hasWarning = shouldCompile || shouldSwitchCompileId\n\n enableVariant(filesCompilationRootNode, {\n filesCompilation,\n compilation_link: shouldSwitchCompileId\n ? \"mismatch\"\n : actualCompileId\n ? \"source\"\n : expectedCompiledId\n ? \"compiled\"\n : \"force\",\n })\n if (filesCompilation === \"yes\") {\n document.querySelector(\n \".files_compilation_text\",\n ).innerHTML = `Files shown are compiled for ${runtimeReport.name}@${runtimeReport.version}`\n }\n filesCompilationRootNode.querySelector(\"a.link_to_source_files\").onclick =\n () => {\n window.parent.location.href = `/${compileGroup.fileRelativeUrl}`\n }\n filesCompilationRootNode.querySelector(\n \"a.link_to_compiled_files\",\n ).onclick = () => {\n window.parent.location.href = `/${jsenvDirectoryRelativeUrl}${expectedCompiledId}/${compileGroup.fileRelativeUrl}`\n }\n filesCompilationRootNode.querySelector(\n \"a.link_to_compilation_forced_files\",\n ).onclick = () => {\n window.parent.location.href = `/${jsenvDirectoryRelativeUrl}force/${compileGroup.fileRelativeUrl}`\n }\n filesCompilationRootNode.querySelector(\n \"a.link_to_appropriate_files\",\n ).onclick = () => {\n window.parent.location.href = `/${jsenvDirectoryRelativeUrl}${expectedCompiledId}/${compileGroup.fileRelativeUrl}`\n }\n\n if (hasWarning) {\n enableWarningStyle()\n document\n .querySelector(\".files_compilation_text\")\n .setAttribute(\"data-warning\", \"\")\n document\n .querySelector(\".browser_support_text\")\n .setAttribute(\"data-warning\", \"\")\n document\n .querySelector(\"#settings-button\")\n .setAttribute(\"data-warning\", \"\")\n } else {\n disableWarningStyle()\n document\n .querySelector(\".files_compilation_text\")\n .removeAttribute(\"data-warning\")\n document\n .querySelector(\".browser_support_text\")\n .removeAttribute(\"data-warning\")\n document\n .querySelector(\"#settings-button\")\n .removeAttribute(\"data-warning\")\n }\n },\n )\n}\n\nconst listWhatIsSupported = ({ inlineImportMapIntoHTML }) => {\n const parts = []\n if (inlineImportMapIntoHTML) {\n parts.push(`importmaps are supported (only when inlined in html files)`)\n } else {\n parts.push(`importmaps are supported`)\n }\n parts.push(`dynamic imports are supported`)\n parts.push(`top level await is supported`)\n parts.push(`all features are natively supported`)\n return `\n- ${parts.join(`\n- `)}`\n}\n\nconst listWhatIsMissing = ({ compileProfile }) => {\n const parts = []\n const { missingFeatures } = compileProfile\n if (missingFeatures.importmap) {\n parts.push(`importmaps are not supported`)\n }\n if (missingFeatures.dynamicImport) {\n parts.push(`dynamic imports are not supported`)\n }\n if (missingFeatures.topLevelAwait) {\n parts.push(`top level await is not supported`)\n }\n const missingFeatureNames = Object.keys(missingFeatures).filter((name) => {\n return (\n name !== \"importmap\" &&\n name !== \"dynamicImport\" &&\n name !== \"topLevelAwait\" &&\n name !== \"custom_compiler_patterns\"\n )\n })\n const missingFeatureCount = missingFeatureNames.length\n if (missingFeatureCount > 0) {\n parts.push(\n `${missingFeatureCount} features are missing: ${missingFeatureNames}`,\n )\n }\n const { custom_compiler_patterns } = missingFeatures\n if (custom_compiler_patterns) {\n parts.push(\n `${custom_compiler_patterns.length} custom compilers enabled: ${custom_compiler_patterns}`,\n )\n }\n return `\n- ${parts.join(`\n- `)}`\n}\n",
112
+ "import { removeForceHideElement } from \"../util/dom.js\"\nimport { enableVariant } from \"../variant/variant.js\"\nimport {\n toggleTooltip,\n removeAutoShowTooltip,\n autoShowTooltip,\n} from \"../tooltip/tooltip.js\"\n\nlet livereloadingAvailableOnServer = false\nconst parentEventSourceClient = window.parent.__jsenv_event_source_client__\n\nexport const initToolbarEventSource = ({ livereloading }) => {\n removeForceHideElement(document.querySelector(\"#eventsource-indicator\"))\n livereloadingAvailableOnServer = livereloading\n if (!livereloadingAvailableOnServer) {\n disableLivereloadSetting()\n }\n parentEventSourceClient.setConnectionStatusChangeCallback(() => {\n updateEventSourceIndicator()\n })\n const livereloadCheckbox = document.querySelector(\"#toggle-livereload\")\n livereloadCheckbox.checked = parentEventSourceClient.isLivereloadEnabled()\n livereloadCheckbox.onchange = () => {\n parentEventSourceClient.setLivereloadPreference(livereloadCheckbox.checked)\n updateEventSourceIndicator()\n }\n updateEventSourceIndicator()\n}\n\nconst updateEventSourceIndicator = () => {\n const eventSourceIndicator = document.querySelector(\"#eventsource-indicator\")\n const fileChanges = parentEventSourceClient.getFileChanges()\n const changeCount = Object.keys(fileChanges).length\n const eventSourceConnectionState =\n parentEventSourceClient.getConnectionStatus()\n enableVariant(eventSourceIndicator, {\n eventsource: eventSourceConnectionState,\n livereload: parentEventSourceClient.isLivereloadEnabled() ? \"on\" : \"off\",\n changes: changeCount > 0 ? \"yes\" : \"no\",\n })\n\n const variantNode = document.querySelector(\n \"#eventsource-indicator > [data-when-active]\",\n )\n variantNode.querySelector(\"button\").onclick = () => {\n toggleTooltip(eventSourceIndicator)\n }\n\n if (eventSourceConnectionState === \"connecting\") {\n variantNode.querySelector(\"a\").onclick = () => {\n parentEventSourceClient.disconnect()\n }\n } else if (eventSourceConnectionState === \"connected\") {\n removeAutoShowTooltip(eventSourceIndicator)\n if (changeCount) {\n const changeLink = variantNode.querySelector(\".eventsource-changes-link\")\n changeLink.innerHTML = changeCount\n changeLink.onclick = () => {\n console.log(JSON.stringify(fileChanges, null, \" \"), fileChanges)\n // eslint-disable-next-line no-alert\n window.parent.alert(JSON.stringify(fileChanges, null, \" \"))\n }\n variantNode.querySelector(\".eventsource-reload-link\").onclick = () => {\n parentEventSourceClient.reloadIfNeeded()\n }\n }\n } else if (eventSourceConnectionState === \"disconnected\") {\n autoShowTooltip(eventSourceIndicator)\n variantNode.querySelector(\"a\").onclick = () => {\n parentEventSourceClient.connect()\n }\n }\n}\n\nconst disableLivereloadSetting = () => {\n document\n .querySelector(\".settings-livereload\")\n .setAttribute(\"data-disabled\", \"true\")\n document\n .querySelector(\".settings-livereload\")\n .setAttribute(\"title\", `Livereload not available: disabled by server`)\n document.querySelector(\"#toggle-livereload\").disabled = true\n}\n",
113
+ "import {\n forceHideElement,\n removeForceHideElement,\n deactivateToolbarSection,\n} from \"../util/dom.js\"\nimport { createHorizontalBreakpoint } from \"../util/responsive.js\"\nimport { hideTooltip } from \"../tooltip/tooltip.js\"\n\nconst WINDOW_SMALL_WIDTH = 420\n\nexport const makeToolbarResponsive = () => {\n // apply responsive design on toolbar icons if needed + add listener on resize screen\n // ideally we should listen breakpoint once, for now restore toolbar\n const overflowMenuBreakpoint = createHorizontalBreakpoint(WINDOW_SMALL_WIDTH)\n const handleOverflowMenuBreakpoint = () => {\n responsiveToolbar(overflowMenuBreakpoint)\n }\n handleOverflowMenuBreakpoint()\n overflowMenuBreakpoint.changed.listen(handleOverflowMenuBreakpoint)\n\n // overflow menu\n document.querySelector(\"#overflow-menu-button\").onclick = () =>\n toggleOverflowMenu()\n}\n\nconst responsiveToolbar = (overflowMenuBreakpoint) => {\n // close all tooltips in case opened\n hideTooltip(document.querySelector(\"#eventsource-indicator\"))\n hideTooltip(document.querySelector(\"#execution-indicator\"))\n // close settings box in case opened\n deactivateToolbarSection(document.querySelector(\"#settings\"))\n\n if (overflowMenuBreakpoint.isBelow()) {\n enableOverflow()\n } else {\n disableOverflow()\n }\n}\n\nlet moves = []\n\nconst enableOverflow = () => {\n // move elements from toolbar to overflow menu\n const responsiveToolbarElements = document.querySelectorAll(\n \"[data-responsive-toolbar-element]\",\n )\n const overflowMenu = document.querySelector(\"#overflow-menu\")\n\n // keep a placeholder element to know where to move them back\n moves = Array.from(responsiveToolbarElements).map((element) => {\n const placeholder = document.createElement(\"div\")\n placeholder.style.display = \"none\"\n placeholder.setAttribute(\"data-placeholder\", \"\")\n element.parentNode.replaceChild(placeholder, element)\n overflowMenu.appendChild(element)\n return { element, placeholder }\n })\n\n document\n .querySelector(\"#toolbar\")\n .setAttribute(\"data-overflow-menu-enabled\", \"\")\n removeForceHideElement(document.querySelector(\"#overflow-menu-button\"))\n}\n\nconst disableOverflow = () => {\n // close overflow menu in case it's open & unselect toggleOverflowMenu button in case it's selected\n hideOverflowMenu()\n deactivateToolbarSection(document.querySelector(\"#overflow-menu\"))\n moves.forEach(({ element, placeholder }) => {\n placeholder.parentNode.replaceChild(element, placeholder)\n })\n moves = []\n\n document\n .querySelector(\"#toolbar\")\n .removeAttribute(\"data-overflow-menu-enabled\")\n forceHideElement(document.querySelector(\"#overflow-menu-button\"))\n}\n\nconst toggleOverflowMenu = () => {\n if (overflowMenuIsVisible()) {\n hideOverflowMenu()\n } else {\n showOverflowMenu()\n }\n}\n\nconst overflowMenuIsVisible = () => {\n const toolbar = document.querySelector(\"#toolbar\")\n return toolbar.hasAttribute(\"data-overflow-menu-visible\")\n}\n\nconst showOverflowMenu = () => {\n const toolbar = document.querySelector(\"#toolbar\")\n document.querySelector(\"#overflow-menu\").setAttribute(\"data-animate\", \"\")\n toolbar.setAttribute(\"data-overflow-menu-visible\", \"\")\n}\n\nconst hideOverflowMenu = () => {\n const toolbar = document.querySelector(\"#toolbar\")\n toolbar.removeAttribute(\"data-overflow-menu-visible\")\n document.querySelector(\"#overflow-menu\").removeAttribute(\"data-animate\")\n}\n",
114
+ "import { urlIsInsideOf } from \"@jsenv/filesystem/src/urlIsInsideOf.js\"\nimport { urlToRelativeUrl } from \"@jsenv/filesystem/src/urlToRelativeUrl.js\"\n\nimport { startJavaScriptAnimation } from \"../toolbar/util/animation.js\"\nimport \"./focus/toolbar.focus.js\"\nimport {\n getToolbarIframe,\n deactivateToolbarSection,\n setStyles,\n} from \"./util/dom.js\"\nimport { createPreference } from \"./util/preferences.js\"\nimport { hideTooltip, hideAllTooltip } from \"./tooltip/tooltip.js\"\nimport {\n renderToolbarSettings,\n hideSettings,\n} from \"./settings/toolbar.settings.js\"\nimport { renderToolbarNotification } from \"./notification/toolbar.notification.js\"\nimport { renderToolbarTheme } from \"./theme/toolbar.theme.js\"\nimport { renderToolbarAnimation } from \"./animation/toolbar.animation.js\"\nimport { renderExecutionInToolbar } from \"./execution/toolbar.execution.js\"\nimport { renderCompilationInToolbar } from \"./compilation/toolbar.compilation.js\"\nimport { initToolbarEventSource } from \"./eventsource/toolbar.eventsource.js\"\nimport { makeToolbarResponsive } from \"./responsive/toolbar.responsive.js\"\n\nconst toolbarVisibilityPreference = createPreference(\"toolbar\")\n\nconst renderToolbar = async ({ exploringJSON }) => {\n const executedFileCompiledUrl = window.parent.location.href\n const compileServerOrigin = window.parent.location.origin\n // this should not block the whole toolbar rendering + interactivity\n const { jsenvDirectoryRelativeUrl, livereloading } = exploringJSON\n const compileGroup = getCompileGroup({\n executedFileCompiledUrl,\n jsenvDirectoryRelativeUrl,\n compileServerOrigin,\n })\n const executedFileRelativeUrl = compileGroup.fileRelativeUrl\n\n const toolbarOverlay = document.querySelector(\"#toolbar-overlay\")\n toolbarOverlay.onclick = () => {\n hideAllTooltip()\n hideSettings()\n }\n\n const toolbarVisible = toolbarVisibilityPreference.has()\n ? toolbarVisibilityPreference.get()\n : true\n\n if (toolbarVisible) {\n showToolbar({ animate: false })\n } else {\n hideToolbar({ animate: false })\n }\n\n document.querySelector(\".toolbar-icon-wrapper\").onclick = () => {\n window.parent.location.href = \"/\"\n }\n\n renderToolbarNotification()\n makeToolbarResponsive()\n renderToolbarSettings()\n renderToolbarAnimation()\n renderToolbarTheme()\n renderExecutionInToolbar({ executedFileRelativeUrl })\n renderCompilationInToolbar({ compileGroup })\n // this might become active but we need to detect this somehow\n deactivateToolbarSection(document.querySelector(\"#file-list-link\"))\n initToolbarEventSource({\n executedFileRelativeUrl,\n livereloading,\n })\n\n // if user click enter or space quickly while closing toolbar\n // it will cancel the closing\n // that's why I used toggleToolbar and not hideToolbar\n document.querySelector(\"#button-close-toolbar\").onclick = () =>\n toogleToolbar()\n}\n\nconst toogleToolbar = () => {\n if (toolbarIsVisible()) {\n hideToolbar()\n } else {\n showToolbar()\n }\n}\n\nconst toolbarIsVisible = () =>\n document.documentElement.hasAttribute(\"data-toolbar-visible\")\n\nlet hideToolbar = () => {\n // toolbar hidden by default, nothing to do to hide it by default\n sendEventToParent(\"toolbar-visibility-change\", false)\n}\n\n// (by the way it might be cool to have the toolbar auto show when)\n// it has something to say (being disconnected from livereload server)\nconst showToolbar = ({ animate = true } = {}) => {\n toolbarVisibilityPreference.set(true)\n if (animate) {\n document.documentElement.setAttribute(\"data-toolbar-animation\", \"\")\n } else {\n document.documentElement.removeAttribute(\"data-toolbar-animation\")\n }\n document.documentElement.setAttribute(\"data-toolbar-visible\", \"\")\n\n sendEventToParent(\"toolbar-visibility-change\", true)\n\n const toolbarIframe = getToolbarIframe()\n const toolbarIframeParent = toolbarIframe.parentNode\n const parentWindow = window.parent\n const parentDocumentElement =\n parentWindow.document.compatMode === \"CSS1Compat\"\n ? parentWindow.document.documentElement\n : parentWindow.document.body\n\n const scrollYMax =\n parentDocumentElement.scrollHeight - parentWindow.innerHeight\n const scrollY = parentDocumentElement.scrollTop\n const scrollYRemaining = scrollYMax - scrollY\n\n setStyles(toolbarIframeParent, {\n \"transition-property\": \"padding-bottom\",\n \"transition-duration\": \"300ms\",\n })\n // maybe we should use js animation here because we would not conflict with css\n const restoreToolbarIframeParentStyles = setStyles(toolbarIframeParent, {\n \"scroll-padding-bottom\": \"40px\", // same here we should add 40px\n \"padding-bottom\": \"40px\", // if there is already one we should add 40px\n })\n const restoreToolbarIframeStyles = setStyles(toolbarIframe, {\n height: \"40px\",\n visibility: \"visible\",\n })\n\n if (scrollYRemaining < 40 && scrollYMax > 0) {\n const scrollEnd = scrollY + 40\n startJavaScriptAnimation({\n duration: 300,\n onProgress: ({ progress }) => {\n const value = scrollY + (scrollEnd - scrollY) * progress\n parentDocumentElement.scrollTop = value\n },\n })\n }\n\n hideToolbar = () => {\n restoreToolbarIframeParentStyles()\n restoreToolbarIframeStyles()\n\n hideTooltip(document.querySelector(\"#eventsource-indicator\"))\n hideTooltip(document.querySelector(\"#execution-indicator\"))\n toolbarVisibilityPreference.set(false)\n if (animate) {\n document.documentElement.setAttribute(\"data-toolbar-animation\", \"\")\n } else {\n document.documentElement.removeAttribute(\"data-toolbar-animation\")\n }\n document.documentElement.removeAttribute(\"data-toolbar-visible\")\n sendEventToParent(\"toolbar-visibility-change\", false)\n }\n}\n\nconst getCompileGroup = ({\n executedFileCompiledUrl,\n jsenvDirectoryRelativeUrl,\n compileServerOrigin,\n}) => {\n const jsenvDirectoryServerUrl = new URL(\n jsenvDirectoryRelativeUrl,\n compileServerOrigin,\n ).href\n if (urlIsInsideOf(executedFileCompiledUrl, jsenvDirectoryServerUrl)) {\n const afterCompileDirectory = urlToRelativeUrl(\n executedFileCompiledUrl,\n jsenvDirectoryServerUrl,\n )\n const slashIndex = afterCompileDirectory.indexOf(\"/\")\n const fileRelativeUrl = afterCompileDirectory.slice(slashIndex + 1)\n return {\n fileRelativeUrl,\n compileId: afterCompileDirectory.slice(0, slashIndex),\n }\n }\n return {\n fileRelativeUrl: new URL(executedFileCompiledUrl).pathname.slice(1),\n compileId: null,\n }\n}\n\nconst addExternalCommandCallback = (command, callback) => {\n const messageEventCallback = (messageEvent) => {\n const { data } = messageEvent\n if (typeof data !== \"object\") {\n return\n }\n const { __jsenv__ } = data\n if (!__jsenv__) {\n return\n }\n\n if (__jsenv__.command !== command) {\n return\n }\n\n callback(...__jsenv__.args)\n }\n\n window.addEventListener(\"message\", messageEventCallback)\n return () => {\n window.removeEventListener(\"message\", messageEventCallback)\n }\n}\n\nconst sendEventToParent = (name, data) => {\n window.parent.postMessage(\n {\n __jsenv__: {\n event: name,\n data,\n },\n },\n \"*\",\n )\n}\n\nwindow.toolbar = {\n show: showToolbar,\n hide: () => hideToolbar(),\n}\n\naddExternalCommandCallback(\"renderToolbar\", (data) => {\n renderToolbar(data)\n})\naddExternalCommandCallback(\"showToolbar\", () => {\n showToolbar()\n})\naddExternalCommandCallback(\"hideToolbar\", () => {\n hideToolbar()\n})\nsendEventToParent(\"toolbar_ready\")\n"
115
+ ],
116
+ "names": [
117
+ "arrayLikeToArray",
118
+ "arr",
119
+ "len",
120
+ "length",
121
+ "arr2",
122
+ "Array",
123
+ "i",
124
+ "isArray",
125
+ "_iterableToArray",
126
+ "iter",
127
+ "Symbol",
128
+ "iterator",
129
+ "from",
130
+ "unsupportedIterableToArray",
131
+ "o",
132
+ "minLen",
133
+ "n",
134
+ "Object",
135
+ "prototype",
136
+ "toString",
137
+ "call",
138
+ "slice",
139
+ "constructor",
140
+ "name",
141
+ "test",
142
+ "TypeError",
143
+ "arrayWithoutHoles",
144
+ "iterableToArray",
145
+ "nonIterableSpread",
146
+ "nativeTypeOf",
147
+ "obj",
148
+ "customTypeOf",
149
+ "urlIsInsideOf",
150
+ "url",
151
+ "otherUrl",
152
+ "urlObject",
153
+ "URL",
154
+ "otherUrlObject",
155
+ "origin",
156
+ "urlPathname",
157
+ "pathname",
158
+ "otherUrlPathname",
159
+ "isInside",
160
+ "startsWith",
161
+ "getCommonPathname",
162
+ "otherPathname",
163
+ "firstDifferentCharacterIndex",
164
+ "findFirstDifferentCharacterIndex",
165
+ "commonString",
166
+ "charAt",
167
+ "firstDifferentSlashIndex",
168
+ "lastIndexOf",
169
+ "string",
170
+ "otherString",
171
+ "maxCommonLength",
172
+ "Math",
173
+ "min",
174
+ "char",
175
+ "otherChar",
176
+ "pathnameToParentPathname",
177
+ "slashLastIndex",
178
+ "urlToRelativeUrl",
179
+ "baseUrl",
180
+ "baseUrlObject",
181
+ "protocol",
182
+ "urlAsString",
183
+ "String",
184
+ "username",
185
+ "password",
186
+ "host",
187
+ "afterUrlScheme",
188
+ "hash",
189
+ "search",
190
+ "baseUrlRessourceWithoutLeadingSlash",
191
+ "basePathname",
192
+ "commonPathname",
193
+ "specificPathname",
194
+ "baseSpecificPathname",
195
+ "includes",
196
+ "baseSpecificParentPathname",
197
+ "relativeDirectoriesNotation",
198
+ "replace",
199
+ "relativeUrl",
200
+ "source",
201
+ "excluded",
202
+ "target",
203
+ "sourceKeys",
204
+ "keys",
205
+ "key",
206
+ "indexOf",
207
+ "objectWithoutPropertiesLoose",
208
+ "getOwnPropertySymbols",
209
+ "sourceSymbolKeys",
210
+ "propertyIsEnumerable",
211
+ "updateIframeOverflowOnParentWindow",
212
+ "window",
213
+ "parent",
214
+ "aTooltipIsOpened",
215
+ "document",
216
+ "querySelector",
217
+ "settingsAreOpened",
218
+ "enableIframeOverflowOnParentWindow",
219
+ "disableIframeOverflowOnParentWindow",
220
+ "iframeOverflowEnabled",
221
+ "iframe",
222
+ "getToolbarIframe",
223
+ "transitionDuration",
224
+ "style",
225
+ "setStyles",
226
+ "setTimeout",
227
+ "iframes",
228
+ "querySelectorAll",
229
+ "find",
230
+ "contentWindow",
231
+ "forceHideElement",
232
+ "element",
233
+ "setAttribute",
234
+ "removeForceHideElement",
235
+ "removeAttribute",
236
+ "styles",
237
+ "elementStyle",
238
+ "restoreStyles",
239
+ "map",
240
+ "styleName",
241
+ "restore",
242
+ "currentStyle",
243
+ "forEach",
244
+ "toolbarSectionIsActive",
245
+ "hasAttribute",
246
+ "activateToolbarSection",
247
+ "deactivateToolbarSection",
248
+ "startJavaScriptAnimation",
249
+ "duration",
250
+ "timingFunction",
251
+ "t",
252
+ "onProgress",
253
+ "onCancel",
254
+ "onComplete",
255
+ "isNaN",
256
+ "parseInt",
257
+ "startMs",
258
+ "performance",
259
+ "now",
260
+ "currentRequestAnimationFrameId",
261
+ "done",
262
+ "rawProgress",
263
+ "progress",
264
+ "handler",
265
+ "nowMs",
266
+ "requestAnimationFrame",
267
+ "stop",
268
+ "cancelAnimationFrame",
269
+ "addEventListener",
270
+ "mousedownEvent",
271
+ "defaultPrevented",
272
+ "documentElement",
273
+ "touchstartEvent",
274
+ "keydownEvent",
275
+ "createPreference",
276
+ "has",
277
+ "localStorage",
278
+ "hasOwnProperty",
279
+ "get",
280
+ "JSON",
281
+ "parse",
282
+ "getItem",
283
+ "undefined",
284
+ "set",
285
+ "value",
286
+ "setItem",
287
+ "stringify",
288
+ "toggleTooltip",
289
+ "hideTooltip",
290
+ "showTooltip",
291
+ "autoShowTooltip",
292
+ "removeAutoShowTooltip",
293
+ "hideAllTooltip",
294
+ "elementsWithTooltip",
295
+ "elementWithTooltip",
296
+ "enableVariant",
297
+ "rootNode",
298
+ "variables",
299
+ "nodesNotMatching",
300
+ "attributeIndicatingACondition",
301
+ "nodeNotMatching",
302
+ "conditionAttributeValue",
303
+ "getAttribute",
304
+ "matches",
305
+ "testCondition",
306
+ "renameAttribute",
307
+ "attributeIndicatingAMatch",
308
+ "nodesMatching",
309
+ "nodeMatching",
310
+ "condition",
311
+ "parseCondition",
312
+ "some",
313
+ "colonIndex",
314
+ "node",
315
+ "newName",
316
+ "renderToolbarSettings",
317
+ "onclick",
318
+ "toggleSettings",
319
+ "settingsAreVisible",
320
+ "hideSettings",
321
+ "showSettings",
322
+ "enableWarningStyle",
323
+ "has_warning",
324
+ "disableWarningStyle",
325
+ "defineProperty",
326
+ "enumerable",
327
+ "configurable",
328
+ "writable",
329
+ "ownKeys",
330
+ "object",
331
+ "enumerableOnly",
332
+ "symbols",
333
+ "filter",
334
+ "sym",
335
+ "getOwnPropertyDescriptor",
336
+ "push",
337
+ "apply",
338
+ "_objectSpread2",
339
+ "arguments",
340
+ "getOwnPropertyDescriptors",
341
+ "defineProperties",
342
+ "_async",
343
+ "f",
344
+ "args",
345
+ "Promise",
346
+ "resolve",
347
+ "e",
348
+ "reject",
349
+ "_await",
350
+ "then",
351
+ "direct",
352
+ "notificationAvailable",
353
+ "Notification",
354
+ "notificationPreference",
355
+ "arrayOfOpenedNotifications",
356
+ "renderToolbarNotification",
357
+ "notifCheckbox",
358
+ "notifSetting",
359
+ "disabled",
360
+ "updatePermission",
361
+ "permission",
362
+ "checked",
363
+ "getNotificationPreference",
364
+ "onchange",
365
+ "setNotificationPreference",
366
+ "notification",
367
+ "close",
368
+ "notifPermission",
369
+ "notif_permission",
370
+ "requestPermission",
371
+ "notifyExecutionResult",
372
+ "executedFileRelativeUrl",
373
+ "execution",
374
+ "previousExecution",
375
+ "notificationEnabled",
376
+ "notificationOptions",
377
+ "lang",
378
+ "icon",
379
+ "getFaviconHref",
380
+ "clickToFocus",
381
+ "clickToClose",
382
+ "status",
383
+ "notify",
384
+ "body",
385
+ "link",
386
+ "href",
387
+ "title",
388
+ "options",
389
+ "focus",
390
+ "onclose",
391
+ "index",
392
+ "splice",
393
+ "requestPromise",
394
+ "DARK_THEME",
395
+ "LIGHT_THEME",
396
+ "themePreference",
397
+ "renderToolbarTheme",
398
+ "theme",
399
+ "getThemePreference",
400
+ "checkbox",
401
+ "setTheme",
402
+ "setThemePreference",
403
+ "animationPreference",
404
+ "renderToolbarAnimation",
405
+ "animCheckbox",
406
+ "getAnimationPreference",
407
+ "setAnimationPreference",
408
+ "onPreferenceChange",
409
+ "enableAnimation",
410
+ "disableAnimation",
411
+ "createHorizontalBreakpoint",
412
+ "breakpointValue",
413
+ "createBreakpoint",
414
+ "windowWidthMeasure",
415
+ "createMeasure",
416
+ "compute",
417
+ "register",
418
+ "currentValue",
419
+ "changed",
420
+ "createSignal",
421
+ "unregister",
422
+ "previousValue",
423
+ "callbackArray",
424
+ "listen",
425
+ "callback",
426
+ "innerWidth",
427
+ "removeEventListener",
428
+ "measure",
429
+ "getBreakpointState",
430
+ "currentBreakpointState",
431
+ "isAbove",
432
+ "isBelow",
433
+ "breakpointChanged",
434
+ "breakpointState",
435
+ "breakpointStatePrevious",
436
+ "WINDOW_MEDIUM_WIDTH",
437
+ "renderExecutionInToolbar",
438
+ "applyExecutionIndicator",
439
+ "input",
440
+ "fileWidthBreakpoint",
441
+ "handleFileWidthBreakpoint",
442
+ "resizeInput",
443
+ "__jsenv__",
444
+ "executionResultPromise",
445
+ "startTime",
446
+ "endTime",
447
+ "executionStorageKey",
448
+ "sessionStorage",
449
+ "executionIndicator",
450
+ "variantNode",
451
+ "textContent",
452
+ "computeText",
453
+ "size",
454
+ "width",
455
+ "result",
456
+ "fetchUsingXHR",
457
+ "signal",
458
+ "method",
459
+ "credentials",
460
+ "headers",
461
+ "headersPromise",
462
+ "createPromiseAndHooks",
463
+ "bodyPromise",
464
+ "xhr",
465
+ "XMLHttpRequest",
466
+ "failure",
467
+ "error",
468
+ "settled",
469
+ "cleanup",
470
+ "ontimeout",
471
+ "onerror",
472
+ "onload",
473
+ "onreadystatechange",
474
+ "Error",
475
+ "createRequestError",
476
+ "abort",
477
+ "abortError",
478
+ "readyState",
479
+ "open",
480
+ "setRequestHeader",
481
+ "withCredentials",
482
+ "computeWithCredentials",
483
+ "hasBlob",
484
+ "responseType",
485
+ "send",
486
+ "responseUrl",
487
+ "responseURL",
488
+ "responseStatus",
489
+ "responseStatusText",
490
+ "statusText",
491
+ "responseHeaders",
492
+ "getHeadersFromXHR",
493
+ "readBody",
494
+ "response",
495
+ "responseText",
496
+ "responseBody",
497
+ "responseBodyType",
498
+ "detectBodyType",
499
+ "text",
500
+ "blobToText",
501
+ "arrayBufferToText",
502
+ "buffer",
503
+ "json",
504
+ "blob",
505
+ "Blob",
506
+ "cloneBuffer",
507
+ "arrayBuffer",
508
+ "blobToArrayBuffer",
509
+ "formData",
510
+ "hasFormData",
511
+ "textToFormData",
512
+ "canUseBlob",
513
+ "FileReader",
514
+ "FormData",
515
+ "hasArrayBuffer",
516
+ "ArrayBuffer",
517
+ "hasSearchParams",
518
+ "URLSearchParams",
519
+ "stack",
520
+ "promise",
521
+ "res",
522
+ "rej",
523
+ "originSameAsGlobalOrigin",
524
+ "_typeof",
525
+ "location",
526
+ "globalOrigin",
527
+ "hrefToOrigin",
528
+ "isPrototypeOf",
529
+ "isDataView",
530
+ "isArrayBufferView",
531
+ "headerMap",
532
+ "headersString",
533
+ "getAllResponseHeaders",
534
+ "lines",
535
+ "trim",
536
+ "split",
537
+ "line",
538
+ "parts",
539
+ "shift",
540
+ "join",
541
+ "toLowerCase",
542
+ "scheme",
543
+ "hrefToScheme",
544
+ "secondProtocolSlashIndex",
545
+ "pathnameSlashIndex",
546
+ "DataView",
547
+ "isView",
548
+ "viewClasses",
549
+ "form",
550
+ "bytes",
551
+ "append",
552
+ "decodeURIComponent",
553
+ "reader",
554
+ "fileReaderReady",
555
+ "readAsArrayBuffer",
556
+ "readAsText",
557
+ "view",
558
+ "Uint8Array",
559
+ "chars",
560
+ "fromCharCode",
561
+ "byteLength",
562
+ "fetchNative",
563
+ "mode",
564
+ "fetch",
565
+ "responseToHeaders",
566
+ "fetchUrl",
567
+ "AbortController",
568
+ "fetchJson",
569
+ "detectFromUserAgentData",
570
+ "userAgentData",
571
+ "navigator",
572
+ "brands",
573
+ "brand",
574
+ "version",
575
+ "firstMatch",
576
+ "regexp",
577
+ "match",
578
+ "secondMatch",
579
+ "userAgentToVersion",
580
+ "userAgent",
581
+ "detectAndroid",
582
+ "navigatorToBrowser",
583
+ "appVersion",
584
+ "detectInternetExplorer",
585
+ "userAgentToBrowser",
586
+ "detectOpera",
587
+ "detectEdge",
588
+ "detectFirefox",
589
+ "detectChrome",
590
+ "detectSafari",
591
+ "detectElectron",
592
+ "detectIOS",
593
+ "detectorCompose",
594
+ "detectors",
595
+ "detector",
596
+ "detectBrowser",
597
+ "normalizeName",
598
+ "normalizeVersion",
599
+ "executeWithScriptModuleInjection",
600
+ "code",
601
+ "scriptModule",
602
+ "createElement",
603
+ "type",
604
+ "loadPromise",
605
+ "removeChild",
606
+ "appendChild",
607
+ "src",
608
+ "asBase64Url",
609
+ "mimeType",
610
+ "btoa",
611
+ "recover",
612
+ "supportsImportmap",
613
+ "remote",
614
+ "specifier",
615
+ "importMap",
616
+ "imports",
617
+ "importmapScript",
618
+ "importmapString",
619
+ "supported",
620
+ "__jsenv_runtime_test_importmap__",
621
+ "supportsDynamicImport",
622
+ "moduleSource",
623
+ "__jsenv_runtime_test_dynamic_import__",
624
+ "namespace",
625
+ "default",
626
+ "supportsTopLevelAwait",
627
+ "__jsenv_runtime_test_top_level_await__",
628
+ "supportsJsonImportAssertions",
629
+ "jsonBase64Url",
630
+ "__jsenv_runtime_test_json_import_assertion__",
631
+ "supportsCssImportAssertions",
632
+ "cssBase64Url",
633
+ "__jsenv_runtime_test_css_import_assertion__",
634
+ "CSSStyleSheet",
635
+ "supportsNewStylesheet",
636
+ "scanBrowserRuntimeFeatures",
637
+ "coverageHandledFromOutside",
638
+ "forceCompilation",
639
+ "forceSource",
640
+ "jsenvCompileProfileUrl",
641
+ "jsenvDirectoryRelativeUrl",
642
+ "inlineImportMapIntoHTML",
643
+ "availableCompileIds",
644
+ "detectSupportedFeatures",
645
+ "featuresReport",
646
+ "runtimeReport",
647
+ "env",
648
+ "browser",
649
+ "compileProfile",
650
+ "compileId",
651
+ "importmap",
652
+ "renderCompilationInToolbar",
653
+ "compileGroup",
654
+ "browserSupportRootNode",
655
+ "filesCompilationRootNode",
656
+ "browserSupport",
657
+ "alert",
658
+ "listWhatIsMissing",
659
+ "listWhatIsSupported",
660
+ "actualCompileId",
661
+ "expectedCompiledId",
662
+ "shouldSwitchCompileId",
663
+ "shouldCompile",
664
+ "filesCompilation",
665
+ "hasWarning",
666
+ "compilation_link",
667
+ "innerHTML",
668
+ "fileRelativeUrl",
669
+ "missingFeatures",
670
+ "dynamicImport",
671
+ "topLevelAwait",
672
+ "missingFeatureNames",
673
+ "missingFeatureCount",
674
+ "custom_compiler_patterns",
675
+ "livereloadingAvailableOnServer",
676
+ "parentEventSourceClient",
677
+ "__jsenv_event_source_client__",
678
+ "initToolbarEventSource",
679
+ "livereloading",
680
+ "disableLivereloadSetting",
681
+ "setConnectionStatusChangeCallback",
682
+ "updateEventSourceIndicator",
683
+ "livereloadCheckbox",
684
+ "isLivereloadEnabled",
685
+ "setLivereloadPreference",
686
+ "eventSourceIndicator",
687
+ "fileChanges",
688
+ "getFileChanges",
689
+ "changeCount",
690
+ "eventSourceConnectionState",
691
+ "getConnectionStatus",
692
+ "eventsource",
693
+ "livereload",
694
+ "changes",
695
+ "disconnect",
696
+ "changeLink",
697
+ "console",
698
+ "log",
699
+ "reloadIfNeeded",
700
+ "connect",
701
+ "WINDOW_SMALL_WIDTH",
702
+ "makeToolbarResponsive",
703
+ "overflowMenuBreakpoint",
704
+ "handleOverflowMenuBreakpoint",
705
+ "responsiveToolbar",
706
+ "toggleOverflowMenu",
707
+ "enableOverflow",
708
+ "disableOverflow",
709
+ "moves",
710
+ "responsiveToolbarElements",
711
+ "overflowMenu",
712
+ "placeholder",
713
+ "display",
714
+ "parentNode",
715
+ "replaceChild",
716
+ "hideOverflowMenu",
717
+ "overflowMenuIsVisible",
718
+ "showOverflowMenu",
719
+ "toolbar",
720
+ "toolbarVisibilityPreference",
721
+ "renderToolbar",
722
+ "exploringJSON",
723
+ "executedFileCompiledUrl",
724
+ "compileServerOrigin",
725
+ "getCompileGroup",
726
+ "toolbarOverlay",
727
+ "toolbarVisible",
728
+ "showToolbar",
729
+ "animate",
730
+ "hideToolbar",
731
+ "toogleToolbar",
732
+ "toolbarIsVisible",
733
+ "sendEventToParent",
734
+ "toolbarIframe",
735
+ "toolbarIframeParent",
736
+ "parentWindow",
737
+ "parentDocumentElement",
738
+ "compatMode",
739
+ "scrollYMax",
740
+ "scrollHeight",
741
+ "innerHeight",
742
+ "scrollY",
743
+ "scrollTop",
744
+ "scrollYRemaining",
745
+ "restoreToolbarIframeParentStyles",
746
+ "restoreToolbarIframeStyles",
747
+ "height",
748
+ "visibility",
749
+ "scrollEnd",
750
+ "jsenvDirectoryServerUrl",
751
+ "afterCompileDirectory",
752
+ "slashIndex",
753
+ "addExternalCommandCallback",
754
+ "command",
755
+ "messageEventCallback",
756
+ "messageEvent",
757
+ "data",
758
+ "postMessage",
759
+ "event",
760
+ "show",
761
+ "hide"
762
+ ],
763
+ "mappings": ";;;;;AAAA;AACe,eAASA,gBAAT,CAA0BC,GAA1B,EAA+BC,GAA/B,EAAoC;YAC7CA,GAAG,IAAI,IAAPA,IAAeA,GAAG,GAAGD,GAAG,CAACE,QAAQD,GAAG,GAAGD,GAAG,CAACE,MAAVD;YACjCE,IAAI,GAAG,IAAIC,KAAJ,CAAUH,GAAV;;aACN,IAAII,CAAC,GAAG,GAAGA,CAAC,GAAGJ,KAAKI,CAAC;AAAIF,UAAAA,IAAI,CAACE,CAAD,CAAJF,GAAUH,GAAG,CAACK,CAAD,CAAbF;;;eACvBA;;;8BCFM,UAACH,GAAD,EAAS;YAClBI,KAAK,CAACE,OAANF,CAAcJ,GAAdI,GAAoB,OAAOL,gBAAgB,CAACC,GAAD,CAAvB;AAD1B;;ACHe,eAASO,gBAAT,CAA0BC,IAA1B,EAAgC;YAE1C,OAAOC,MAAP,KAAkB,WAAlB,IAAiCD,IAAI,CAACC,MAAM,CAACC,QAAR,CAAJF,IAAyB,IAA1D,IACDA,IAAI,CAAC,YAAD,CAAJA,IAAsB,MAEtB,OAAOJ,KAAK,CAACO,IAANP,CAAWI,IAAXJ,CAAP;;ACLJ;;;AAGe,eAASQ,0BAAT,CAAoCC,CAApC,EAAuCC,MAAvC,EAA+C;YACxD,CAACD,GAAG;Y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