\n","package.json":'{\n\t"name": "tutorial",\n\t"version": "0.0.1",\n\t"scripts": {\n\t\t"dev": "./node_modules/vite/bin/vite.js dev",\n\t\t"build": "./node_modules/vite/bin/vite.js build",\n\t\t"preview": "./node_modules/vite/bin/vite.js preview"\n\t},\n\t"devDependencies": {\n\t\t"@rollup/wasm-node": "^4.25.0",\n\t\t"@sveltejs/kit": "^2.20.0",\n\t\t"esbuild-wasm": "^0.21.5",\n\t\t"svelte": "^5.0.0",\n\t\t"vite": "^6"\n\t},\n\t"type": "module"\n}\n',"src/__client.js":"function post(data) {\n\tparent.postMessage(data, '*');\n}\n\nfunction update_path(path) {\n\tpost({ type: 'path', path });\n}\n\nfunction ping() {\n\tpost({ type: 'ping' });\n}\n\nfunction pause() {\n\tpost({ type: 'ping-pause' });\n}\n\n// Hack into the alert that's used in some tutorials and send a message prior to the alert,\n// else the parent thinks we lost contact and wrongfully reloads the page.\n// The drawback is that alert is no longer blocking, but no tutorial relies on this.\nconst alert = window.alert;\nwindow.alert = (message) => {\n\tpause();\n\n\tsetTimeout(() => {\n\t\talert(message);\n\t});\n};\n\nlet can_focus = false;\n\nwindow.addEventListener('pointerdown', (e) => (can_focus = true));\nwindow.addEventListener('pointerup', (e) => (can_focus = false));\nwindow.addEventListener('keydown', (e) => (can_focus = true));\nwindow.addEventListener('keyup', (e) => (can_focus = false));\n\n/**\n * The iframe sometimes takes focus control in ways we can't prevent\n * while the editor is focused. Refocus the editor in these cases.\n */\nwindow.addEventListener('focusin', (e) => {\n\t// if focusin happened as a result of a mouse/keyboard event, allow it\n\tif (can_focus) return;\n\n\t// if `e.target` is the `` and there's a `relatedTarget`,\n\t// assume the focusin was the result of a user navigation — allow it\n\tif (e.target.tagName === 'BODY' && e.relatedTarget) return;\n\n\t// otherwise, broadcast an event that causes the editor to reclaim focus\n\tpost({ type: 'iframe_took_focus' });\n});\n\nlet previous_href = location.href;\n\nwindow.addEventListener('click', (e) => {\n\tlet node = e.target;\n\twhile (node) {\n\t\tif (node.nodeName === 'A') {\n\t\t\tconst href = node.href;\n\t\t\tconst url = new URL(href);\n\n\t\t\tif (url.origin !== location.origin) {\n\t\t\t\te.preventDefault();\n\t\t\t\t/* blocked window.open */;\n\t\t\t} else {\n\t\t\t\tif (location.href !== url.href) {\n\t\t\t\t\tprevious_href = url.href;\n\t\t\t\t\tupdate_path(url.pathname + url.search + url.hash);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tnode = node.parent;\n\t}\n});\n\nwindow.addEventListener('visibilitychange', () => {\n\tif (document.visibilityState === 'visible') {\n\t\tping();\n\t} else {\n\t\tpause();\n\t}\n});\n\nconst url_observer = new MutationObserver(() => {\n\tif (location.href !== previous_href) {\n\t\tprevious_href = location.href;\n\t\tupdate_path(location.pathname + location.search + location.hash);\n\t}\n});\n\nurl_observer.observe(document, {\n\tsubtree: true,\n\tchildList: true,\n\tattributes: true\n});\n\nsetInterval(ping, 100);\nping();\n\nif (import.meta.hot) {\n\timport.meta.hot.on('vite:beforeUpdate', (event) => {\n\t\tpost({ type: 'hmr', data: event.updates });\n\t});\n}\n","src/app.html":'\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t%sveltekit.head%\n\n\t\t\x3c!-- duplication with svelte.dev/static/shared.css needed, else styles aren\'t applied during local dev --\x3e\n\t\t\n\t\n\t\n\t\t