diff --git a/.dialyzer_ignore.exs b/.dialyzer_ignore.exs index 1f8b4aa6..fe51488c 100644 --- a/.dialyzer_ignore.exs +++ b/.dialyzer_ignore.exs @@ -1,3 +1 @@ -[ - {"lib/beacon/live_admin/components.ex", :unknown_function} -] +[] diff --git a/.github/workflows/elixir.yml b/.github/workflows/ci.yml similarity index 95% rename from .github/workflows/elixir.yml rename to .github/workflows/ci.yml index 54f517d8..6da7bfaf 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Elixir CI +name: CI on: push: @@ -119,10 +119,10 @@ jobs: - run: mix deps.get - - run: mix tailwind.install --no-assets - - run: mix compile --warnings-as-errors - - run: mix format --check-formatted + - run: mix assets.setup + + - run: mix format.all.check - - run: mix deps.unlock --check-unused + - run: mix deps.unlock --check-unused \ No newline at end of file diff --git a/.gitignore b/.gitignore index defaa7f2..8c52f362 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,15 @@ npm-debug.log # Local iex config .iex.exs + +# Ignore automatically generated Svelte files by the ~V sigil +/assets/svelte/_build/ + +# Ignore ssr build for svelte. +/priv/svelte/ + +# Ignore automatically generated Svelte files by the ~V sigil +/assets/svelte/_build/ + +# Ignore ssr build for svelte. +/priv/svelte/ diff --git a/assets/.eslintrc.js b/assets/.eslintrc.js new file mode 100644 index 00000000..c06cf280 --- /dev/null +++ b/assets/.eslintrc.js @@ -0,0 +1,15 @@ +module.exports = { + env: { + browser: true, + node: true, + es2021: true, + }, + extends: ["eslint:recommended", "prettier"], + globals: { + global: "writable", + }, + parserOptions: { + ecmaVersion: 12, + sourceType: "module", + }, +} diff --git a/assets/.prettierignore b/assets/.prettierignore new file mode 100644 index 00000000..af5a59c8 --- /dev/null +++ b/assets/.prettierignore @@ -0,0 +1,2 @@ +css/app.css +/vendor/ \ No newline at end of file diff --git a/assets/.prettierrc.js b/assets/.prettierrc.js new file mode 100644 index 00000000..255c9bb5 --- /dev/null +++ b/assets/.prettierrc.js @@ -0,0 +1,6 @@ +module.exports = { + printWidth: 120, + semi: false, + plugins: ["prettier-plugin-svelte"], + overrides: [{ files: "*.svelte", options: { parser: "svelte" } }], +} diff --git a/assets/build.js b/assets/build.js new file mode 100644 index 00000000..bf5dbca8 --- /dev/null +++ b/assets/build.js @@ -0,0 +1,80 @@ +const esbuild = require("esbuild") +const sveltePlugin = require("esbuild-svelte") +const importGlobPlugin = require("esbuild-plugin-import-glob").default +const sveltePreprocess = require("svelte-preprocess") + +const args = process.argv.slice(2) +const watch = args.includes("--watch") +const deploy = args.includes("--deploy") + +let optsClient = { + entryPoints: ["js/beacon_live_admin.js"], + globalName: "BeaconLiveAdmin", + format: "iife", + loader: { + ".ttf": "dataurl", + ".woff": "dataurl", + ".woff2": "dataurl", + }, + bundle: true, + minify: deploy, + target: "es2020", + conditions: ["svelte", "browser"], + outfile: deploy ? "../priv/static/beacon_live_admin.min.js" : "../priv/static/beacon_live_admin.js", + logLevel: "info", + sourcemap: "external", + tsconfig: "./tsconfig.json", + plugins: [ + importGlobPlugin(), + sveltePlugin({ + preprocess: sveltePreprocess(), + compilerOptions: { + dev: !deploy, + hydratable: true, + css: "injected", + customElement: true, + }, + }), + ], +} + +let optsServer = { + entryPoints: ["js/server.js"], + platform: "node", + bundle: true, + minify: deploy, + target: "node19.6.1", + conditions: ["svelte"], + outdir: "../priv/svelte", + logLevel: "info", + sourcemap: "external", + tsconfig: "./tsconfig.json", + plugins: [ + importGlobPlugin(), + sveltePlugin({ + preprocess: sveltePreprocess(), + compilerOptions: { + dev: !deploy, + hydratable: true, + generate: "ssr", + customElement: true, + }, + }), + ], +} + +esbuild.build(optsServer) + +if (watch) { + esbuild + .context(optsClient) + .then((ctx) => { + ctx.watch() + }) + .catch((error) => { + console.log(error) + process.exit(1) + }) +} else { + esbuild.build(optsClient) +} diff --git a/assets/css/beacon_live_admin.css b/assets/css/beacon_live_admin.css index 923b2848..11232c7a 100644 --- a/assets/css/beacon_live_admin.css +++ b/assets/css/beacon_live_admin.css @@ -2,4 +2,4 @@ @import "tailwindcss/components"; @import "tailwindcss/utilities"; @import "../../deps/live_monaco_editor/priv/static/live_monaco_editor.min.css"; -@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;700;800&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display=swap"); diff --git a/assets/js/beacon_live_admin.js b/assets/js/beacon_live_admin.js index 9991d38d..6178b63d 100644 --- a/assets/js/beacon_live_admin.js +++ b/assets/js/beacon_live_admin.js @@ -1,60 +1,54 @@ import topbar from "../vendor/topbar" import { CodeEditorHook } from "../../deps/live_monaco_editor/priv/static/live_monaco_editor.esm" - +import { getHooks } from "live_svelte" +import * as Components from "../svelte/**/*.svelte" let Hooks = {} Hooks.CodeEditorHook = CodeEditorHook - -topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"}) - -window.addEventListener("phx:page-loading-start", (_event) => { - topbar.show(300) -}) - -window.addEventListener("phx:page-loading-stop", (_event) => { - topbar.hide() -}) +topbar.config({ barColors: { 0: "#29d" }, shadowColor: "rgba(0, 0, 0, .3)" }) +window.addEventListener("phx:page-loading-start", (_info) => topbar.show(300)) +window.addEventListener("phx:page-loading-stop", (_info) => topbar.hide()) window.addEventListener("beacon_admin:clipcopy", (event) => { const result_id = `${event.target.id}-copy-to-clipboard-result` - const el = document.getElementById(result_id); + const el = document.getElementById(result_id) if ("clipboard" in navigator) { if (event.target.tagName === "INPUT") { - txt = event.target.value; + txt = event.target.value } else { - txt = event.target.textContent; + txt = event.target.textContent } - navigator.clipboard.writeText(txt).then(() => { - el.innerText = 'Copied to clipboard'; - // Make it visible - el.classList.remove('invisible', 'text-red-500', 'opacity-0'); - // Fade in and translate upwards - el.classList.add('text-green-500', 'opacity-100', '-translate-y-2'); - - setTimeout(function() { - el.classList.remove('text-green-500', 'opacity-100', '-translate-y-2'); - el.classList.add('invisible', 'text-red-500', 'opacity-0'); - }, 2000); - - }).catch(() => { - el.innerText = 'Could not copy'; - // Make it visible - el.classList.remove('invisible', 'text-green-500', 'opacity-0'); - // Fade in and translate upwards - el.classList.add('text-red-500', 'opacity-100', '-translate-y-2'); - }) + navigator.clipboard + .writeText(txt) + .then(() => { + el.innerText = "Copied to clipboard" + // Make it visible + el.classList.remove("invisible", "text-red-500", "opacity-0") + // Fade in and translate upwards + el.classList.add("text-green-500", "opacity-100", "-translate-y-2") + + setTimeout(function () { + el.classList.remove("text-green-500", "opacity-100", "-translate-y-2") + el.classList.add("invisible", "text-red-500", "opacity-0") + }, 2000) + }) + .catch(() => { + el.innerText = "Could not copy" + // Make it visible + el.classList.remove("invisible", "text-green-500", "opacity-0") + // Fade in and translate upwards + el.classList.add("text-red-500", "opacity-100", "-translate-y-2") + }) } else { - alert( - "Sorry, your browser does not support clipboard copy." - ); + alert("Sorry, your browser does not support clipboard copy.") } -}); +}) let socketPath = document.querySelector("html").getAttribute("phx-socket") || "/live" -let csrfToken = document .querySelector("meta[name='csrf-token']") .getAttribute("content") +let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content") let liveSocket = new LiveView.LiveSocket(socketPath, Phoenix.Socket, { - hooks: Hooks, + hooks: { ...getHooks(Components), ...Hooks }, params: { _csrf_token: csrfToken }, }) liveSocket.connect() diff --git a/assets/js/server.js b/assets/js/server.js new file mode 100644 index 00000000..290ce641 --- /dev/null +++ b/assets/js/server.js @@ -0,0 +1,4 @@ +import * as Components from "../svelte/**/*.svelte" +import { getRender } from "live_svelte" + +export const render = getRender(Components) diff --git a/assets/package-lock.json b/assets/package-lock.json index 96f1b252..3f3c6aa7 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -1,11 +1,60 @@ { "name": "assets", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { + "dependencies": { + "@monaco-editor/loader": "^1.4", + "live_svelte": "file:../deps/live_svelte", + "phoenix": "file:../deps/phoenix", + "phoenix_html": "file:../deps/phoenix_html", + "phoenix_live_view": "file:../deps/phoenix_live_view" + }, + "devDependencies": { + "@tailwindcss/container-queries": "^0.1.1", + "esbuild": "^0.20", + "esbuild-plugin-import-glob": "^0.1", + "esbuild-svelte": "^0.8", + "eslint": "^8.57", + "eslint-config-prettier": "^9.1", + "prettier": "^3.2", + "prettier-plugin-svelte": "^3.2", + "svelte": "^4.2", + "svelte-preprocess": "^5.1", + "typescript": "^5.3" + } + }, + "../deps/live_svelte": { + "version": "0.12.0", + "license": "MIT", + "devDependencies": { + "prettier": "2.8.7", + "prettier-plugin-svelte": "^2.10.0", + "svelte": "^3.55.1" + } + }, + "../deps/phoenix": { + "version": "1.7.11", + "license": "MIT" + }, + "../deps/phoenix_html": { + "version": "4.0.0" + }, + "../deps/phoenix_live_view": { + "version": "0.20.5", + "license": "MIT", "devDependencies": { - "@tailwindcss/container-queries": "^0.1.1" + "@playwright/test": "^1.41.0" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, "node_modules/@alloc/quick-lru": { @@ -21,1771 +70,2901 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, - "peer": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz", + "integrity": "sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==", + "cpu": [ + "ppc64" + ], "dev": true, - "peer": true, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=6.0.0" + "node": ">=12" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "node_modules/@esbuild/android-arm": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.1.tgz", + "integrity": "sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==", + "cpu": [ + "arm" + ], "dev": true, - "peer": true, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6.0.0" + "node": ">=12" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "node_modules/@esbuild/android-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz", + "integrity": "sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==", + "cpu": [ + "arm64" + ], "dev": true, - "peer": true + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "node_modules/@esbuild/android-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.1.tgz", + "integrity": "sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz", + "integrity": "sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==", + "cpu": [ + "arm64" + ], "dev": true, - "peer": true + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz", + "integrity": "sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz", + "integrity": "sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==", + "cpu": [ + "arm64" + ], "dev": true, - "peer": true, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz", + "integrity": "sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@tailwindcss/container-queries": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz", - "integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==", + "node_modules/@esbuild/linux-arm": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz", + "integrity": "sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==", + "cpu": [ + "arm" + ], "dev": true, - "peerDependencies": { - "tailwindcss": ">=3.2.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz", + "integrity": "sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==", + "cpu": [ + "arm64" + ], "dev": true, - "peer": true + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz", + "integrity": "sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==", + "cpu": [ + "ia32" + ], "dev": true, - "peer": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz", + "integrity": "sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==", + "cpu": [ + "loong64" + ], "dev": true, - "peer": true + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz", + "integrity": "sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==", + "cpu": [ + "mips64el" + ], "dev": true, - "peer": true + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz", + "integrity": "sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==", + "cpu": [ + "ppc64" + ], "dev": true, - "peer": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz", + "integrity": "sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==", + "cpu": [ + "riscv64" + ], "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz", + "integrity": "sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==", + "cpu": [ + "s390x" + ], "dev": true, - "peer": true, - "dependencies": { - "fill-range": "^7.0.1" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "node_modules/@esbuild/linux-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz", + "integrity": "sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 6" + "node": ">=12" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz", + "integrity": "sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==", + "cpu": [ + "x64" + ], "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } + "optional": true, + "os": [ + "netbsd" ], - "peer": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "node": ">=12" } }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz", + "integrity": "sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, - "dependencies": { - "is-glob": "^4.0.1" - }, + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">= 6" + "node": ">=12" } }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "node_modules/@esbuild/sunos-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz", + "integrity": "sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">= 6" + "node": ">=12" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "node_modules/@esbuild/win32-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz", + "integrity": "sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==", + "cpu": [ + "arm64" + ], "dev": true, - "peer": true - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "peer": true, - "bin": { - "cssesc": "bin/cssesc" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "node_modules/@esbuild/win32-ia32": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz", + "integrity": "sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==", + "cpu": [ + "ia32" + ], "dev": true, - "peer": true + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "node_modules/@esbuild/win32-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz", + "integrity": "sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==", + "cpu": [ + "x64" + ], "dev": true, - "peer": true + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, - "peer": true, "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=8.6.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, - "peer": true, "dependencies": { - "is-glob": "^4.0.1" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">= 6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, - "peer": true, - "dependencies": { - "reusify": "^1.0.4" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, - "peer": true, "dependencies": { - "to-regex-range": "^5.0.1" + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" }, "engines": { - "node": ">=8" + "node": ">=10.10.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "peer": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "peer": true, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true, - "peer": true + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "peer": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": "*" + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "peer": true, "dependencies": { - "is-glob": "^4.0.3" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=10.13.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.4.tgz", + "integrity": "sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw==", "dev": true, - "peer": true, "dependencies": { - "function-bind": "^1.1.1" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { - "node": ">= 0.4.0" + "node": ">=6.0.0" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "peer": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "engines": { + "node": ">=6.0.0" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, - "peer": true + "engines": { + "node": ">=6.0.0" + } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.23.tgz", + "integrity": "sha512-9/4foRoUKp8s96tSkh8DlAAc5A0Ty8vLXld+l9gjKKY6ckwI8G15f0hskGmuLZu78ZlGa1vtsfOa+lnB4vG6Jg==", "dev": true, - "peer": true, "dependencies": { - "binary-extensions": "^2.0.0" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@monaco-editor/loader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.4.0.tgz", + "integrity": "sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==", + "dependencies": { + "state-local": "^1.0.6" }, - "engines": { - "node": ">=8" + "peerDependencies": { + "monaco-editor": ">= 0.21.0 < 1" } }, - "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "peer": true, "dependencies": { - "has": "^1.0.3" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 8" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "peer": true, "dependencies": { - "is-extglob": "^2.1.1" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "optional": true, "peer": true, "engines": { - "node": ">=0.12.0" + "node": ">=14" } }, - "node_modules/jiti": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.19.1.tgz", - "integrity": "sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==", + "node_modules/@tailwindcss/container-queries": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz", + "integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==", "dev": true, - "peer": true, - "bin": { - "jiti": "bin/jiti.js" + "peerDependencies": { + "tailwindcss": ">=3.2.0" } }, - "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/pug": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.10.tgz", + "integrity": "sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==", + "dev": true + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, - "peer": true, + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=10" + "node": ">=0.4.0" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "peer": true + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "peer": true, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "peer": true, "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=8.6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "peer": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "peer": true, "dependencies": { - "brace-expansion": "^1.1.7" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": "*" + "node": ">= 8" } }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true, + "peer": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, - "peer": true, "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" + "dequal": "^2.0.3" } }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "node_modules/axobject-query": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", + "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "dependencies": { + "dequal": "^2.0.3" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "peer": true, + "dependencies": { + "fill-range": "^7.0.1" + }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, - "peer": true, - "dependencies": { - "wrappy": "1" + "engines": { + "node": "*" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", "dev": true, - "peer": true + "peer": true, + "engines": { + "node": ">= 6" + } }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "peer": true + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "peer": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, "engines": { - "node": ">=8.6" + "node": ">= 8.10.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 6" } }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "node_modules/code-red": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", + "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1", + "acorn": "^8.10.0", + "estree-walker": "^3.0.3", + "periscopic": "^3.1.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, "peer": true, "engines": { "node": ">= 6" } }, - "node_modules/postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "peer": true, "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": "^10 || ^12 || >=14" + "node": ">= 8" } }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", "dev": true, - "peer": true, "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" }, "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, - "node_modules/postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, "peer": true, - "dependencies": { - "camelcase-css": "^2.0.1" + "bin": { + "cssesc": "bin/cssesc" }, "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" + "node": ">=4" } }, - "node_modules/postcss-load-config": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", - "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "peer": true, "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^2.1.1" + "ms": "2.1.2" }, "engines": { - "node": ">= 14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" + "node": ">=6.0" }, "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { + "supports-color": { "optional": true } } }, - "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", "dev": true, - "peer": true, - "dependencies": { - "postcss-selector-parser": "^6.0.11" - }, "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.14" + "node": ">=6" } }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, - "peer": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "dev": true, "peer": true }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "peer": true }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "peer": true, "dependencies": { - "pify": "^2.3.0" + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, - "peer": true, - "dependencies": { - "picomatch": "^2.2.1" + "peer": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "peer": true + }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", + "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": ">=8.10.0" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.1", + "@esbuild/android-arm": "0.20.1", + "@esbuild/android-arm64": "0.20.1", + "@esbuild/android-x64": "0.20.1", + "@esbuild/darwin-arm64": "0.20.1", + "@esbuild/darwin-x64": "0.20.1", + "@esbuild/freebsd-arm64": "0.20.1", + "@esbuild/freebsd-x64": "0.20.1", + "@esbuild/linux-arm": "0.20.1", + "@esbuild/linux-arm64": "0.20.1", + "@esbuild/linux-ia32": "0.20.1", + "@esbuild/linux-loong64": "0.20.1", + "@esbuild/linux-mips64el": "0.20.1", + "@esbuild/linux-ppc64": "0.20.1", + "@esbuild/linux-riscv64": "0.20.1", + "@esbuild/linux-s390x": "0.20.1", + "@esbuild/linux-x64": "0.20.1", + "@esbuild/netbsd-x64": "0.20.1", + "@esbuild/openbsd-x64": "0.20.1", + "@esbuild/sunos-x64": "0.20.1", + "@esbuild/win32-arm64": "0.20.1", + "@esbuild/win32-ia32": "0.20.1", + "@esbuild/win32-x64": "0.20.1" + } + }, + "node_modules/esbuild-plugin-import-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/esbuild-plugin-import-glob/-/esbuild-plugin-import-glob-0.1.1.tgz", + "integrity": "sha512-yAFH+9AoIcsQkODSx0KUPRv1FeJUN6Tef8vkPQMcuVkc2vXYneYKsHhOiFS/yIsg5bQ70HHtAlXVA1uTjgoJXg==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.5" } }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "node_modules/esbuild-svelte": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/esbuild-svelte/-/esbuild-svelte-0.8.0.tgz", + "integrity": "sha512-uKcPf1kl2UGMjrfHChv4dLxGAvCNhf9s72mHo19ZhKP+LrVOuQkOM/g8GE7MiGpoqjpk8UHqL08uLRbSKXhmhw==", "dev": true, - "peer": true, "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" + "@jridgewell/trace-mapping": "^0.3.19" }, - "bin": { - "resolve": "bin/resolve" + "engines": { + "node": ">=14" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "esbuild": ">=0.9.6", + "svelte": ">=3.43.0 <5" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "peer": true, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peer": true, "dependencies": { - "queue-microtask": "^1.2.2" + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/sucrase": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz", - "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==", + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "peer": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "7.1.6", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=8" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "peer": true, "engines": { - "node": ">= 0.4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/eslint" } }, - "node_modules/tailwindcss": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz", - "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, - "peer": true, "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.2.12", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.18.2", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": ">=14.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, - "peer": true, "dependencies": { - "any-promise": "^1.0.0" + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "peer": true, "dependencies": { - "thenify": ">= 3.1.0 < 4" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=0.8" + "node": ">=4.0" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "peer": true, - "dependencies": { - "is-number": "^7.0.0" - }, "engines": { - "node": ">=8.0" + "node": ">=4.0" } }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, - "peer": true + "dependencies": { + "@types/estree": "^1.0.0" + } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "peer": true + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "peer": true + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, - "node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dev": true, + "peer": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "peer": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "peer": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-reference": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", + "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "peer": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", "dev": true, "peer": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, "engines": { - "node": ">= 14" + "node": ">= 0.8.0" } - } - }, - "dependencies": { - "@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true, "peer": true }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "node_modules/live_svelte": { + "resolved": "../deps/live_svelte", + "link": true + }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "dev": true + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, "peer": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "engines": { + "node": "14 || >=16.14" } }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "node_modules/magic-string": { + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", "dev": true, - "peer": true + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "peer": true + "engines": { + "node": ">= 8" + } }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, - "peer": true + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } }, - "@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, "peer": true, - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/monaco-editor": { + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.46.0.tgz", + "integrity": "sha512-ADwtLIIww+9FKybWscd7OCfm9odsFYHImBRI1v9AviGce55QY8raT+9ihH8jX/E/e6QVSGM+pKj4jSUSRmALNQ==", + "peer": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "peer": true, "dependencies": { - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true, - "peer": true + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" } + ], + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "peer": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "engines": { + "node": ">=0.10.0" } }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, - "peer": true + "peer": true, + "engines": { + "node": ">=0.10.0" + } }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", "dev": true, "peer": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "engines": { + "node": ">= 6" } }, - "@tailwindcss/container-queries": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz", - "integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "requires": {} + "dependencies": { + "wrappy": "1" + } }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, - "peer": true + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "peer": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "peer": true + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "peer": true + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "peer": true + "engines": { + "node": ">=8" + } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "peer": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">=0.10.0" } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "peer": true, - "requires": { - "fill-range": "^7.0.1" + "engines": { + "node": ">=8" } }, - "camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true, "peer": true }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, "peer": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "peer": true, - "requires": { - "is-glob": "^4.0.1" - } - } + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "node_modules/periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", "dev": true, - "peer": true + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "peer": true + "node_modules/phoenix": { + "resolved": "../deps/phoenix", + "link": true }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "peer": true + "node_modules/phoenix_html": { + "resolved": "../deps/phoenix_html", + "link": true }, - "didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true, - "peer": true + "node_modules/phoenix_live_view": { + "resolved": "../deps/phoenix_live_view", + "link": true }, - "dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true, "peer": true }, - "fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "peer": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "engines": { + "node": ">=8.6" }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "peer": true, - "requires": { - "is-glob": "^4.0.1" - } - } + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, "peer": true, - "requires": { - "reusify": "^1.0.4" + "engines": { + "node": ">=0.10.0" } }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "peer": true, - "requires": { - "to-regex-range": "^5.0.1" + "engines": { + "node": ">= 6" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "peer": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true, - "peer": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true, - "peer": true - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "node_modules/postcss": { + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "peer": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" } }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", "dev": true, "peer": true, - "requires": { - "is-glob": "^4.0.3" + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", "dev": true, "peer": true, - "requires": { - "function-bind": "^1.1.1" + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" } }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "peer": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "node_modules/postcss-load-config/node_modules/lilconfig": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", "dev": true, - "peer": true + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/postcss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", + "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", "dev": true, "peer": true, - "requires": { - "binary-extensions": "^2.0.0" + "dependencies": { + "postcss-selector-parser": "^6.0.11" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" } }, - "is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "node_modules/postcss-selector-parser": { + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", "dev": true, "peer": true, - "requires": { - "has": "^1.0.3" + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" } }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true, "peer": true }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "peer": true, - "requires": { - "is-extglob": "^2.1.1" + "engines": { + "node": ">= 0.8.0" } }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "peer": true - }, - "jiti": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.19.1.tgz", - "integrity": "sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==", + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, - "peer": true + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } }, - "lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "node_modules/prettier-plugin-svelte": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.2.2.tgz", + "integrity": "sha512-ZzzE/wMuf48/1+Lf2Ffko0uDa6pyCfgHV6+uAhtg2U0AAXGrhCSW88vEJNAkAxW5qyrFY1y1zZ4J8TgHrjW++Q==", "dev": true, - "peer": true + "peerDependencies": { + "prettier": "^3.0.0", + "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" + } }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, - "peer": true + "engines": { + "node": ">=6" + } }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, - "peer": true + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", "dev": true, "peer": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "dependencies": { + "pify": "^2.3.0" } }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "peer": true, - "requires": { - "brace-expansion": "^1.1.7" + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" } }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "peer": true, - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "peer": true + "engines": { + "node": ">=4" + } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "peer": true + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "peer": true + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "peer": true + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==", "dev": true, - "peer": true, - "requires": { - "wrappy": "1" + "dependencies": { + "es6-promise": "^3.1.2", + "graceful-fs": "^4.1.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.2" } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "node_modules/sander/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, - "peer": true + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "peer": true + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "peer": true + "engines": { + "node": ">=8" + } }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "peer": true + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "node_modules/sorcery": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz", + "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==", "dev": true, - "peer": true + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.14", + "buffer-crc32": "^0.2.5", + "minimist": "^1.2.0", + "sander": "^0.5.0" + }, + "bin": { + "sorcery": "bin/sorcery" + } }, - "pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true, - "peer": true + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/state-local": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz", + "integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==" }, - "postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "peer": true, - "requires": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "peer": true, - "requires": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "peer": true + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "peer": true, - "requires": { - "camelcase-css": "^2.0.1" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "postcss-load-config": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", - "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "peer": true, - "requires": { - "lilconfig": "^2.0.5", - "yaml": "^2.1.1" + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "postcss-nested": { + "node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "peer": true, - "requires": { - "postcss-selector-parser": "^6.0.11" + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "peer": true, - "requires": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "peer": true + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "peer": true + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", "dev": true, "peer": true, - "requires": { - "pify": "^2.3.0" + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "peer": true, - "requires": { - "picomatch": "^2.2.1" + "dependencies": { + "balanced-match": "^1.0.0" } }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "node_modules/sucrase/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "peer": true, - "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "peer": true - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "peer": true, - "requires": { - "queue-microtask": "^1.2.2" + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, - "peer": true - }, - "sucrase": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz", - "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "peer": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "7.1.6", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "supports-preserve-symlinks-flag": { + "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "peer": true + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svelte": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.12.tgz", + "integrity": "sha512-d8+wsh5TfPwqVzbm4/HCXC783/KPHV60NvwitJnyTA5lWn1elhXMNWhXGCJ7PwPa8qFUnyJNIyuIRt2mT0WMug==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/estree": "^1.0.1", + "acorn": "^8.9.0", + "aria-query": "^5.3.0", + "axobject-query": "^4.0.0", + "code-red": "^1.0.3", + "css-tree": "^2.3.1", + "estree-walker": "^3.0.3", + "is-reference": "^3.0.1", + "locate-character": "^3.0.0", + "magic-string": "^0.30.4", + "periscopic": "^3.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/svelte-preprocess": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.3.tgz", + "integrity": "sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@types/pug": "^2.0.6", + "detect-indent": "^6.1.0", + "magic-string": "^0.30.5", + "sorcery": "^0.11.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">= 16.0.0", + "pnpm": "^8.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.10.2", + "coffeescript": "^2.5.1", + "less": "^3.11.3 || ^4.0.0", + "postcss": "^7 || ^8", + "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", + "pug": "^3.0.0", + "sass": "^1.26.8", + "stylus": "^0.55.0", + "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", + "svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0", + "typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "coffeescript": { + "optional": true + }, + "less": { + "optional": true + }, + "postcss": { + "optional": true + }, + "postcss-load-config": { + "optional": true + }, + "pug": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "typescript": { + "optional": true + } + } }, - "tailwindcss": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz", - "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==", + "node_modules/tailwindcss": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", + "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", "dev": true, "peer": true, - "requires": { + "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", "chokidar": "^3.5.3", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.0", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.18.2", + "jiti": "^1.19.1", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", @@ -1799,65 +2978,262 @@ "postcss-selector-parser": "^6.0.11", "resolve": "^1.22.2", "sucrase": "^3.32.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" } }, - "thenify": { + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, "peer": true, - "requires": { + "dependencies": { "any-promise": "^1.0.0" } }, - "thenify-all": { + "node_modules/thenify-all": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, "peer": true, - "requires": { + "dependencies": { "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" } }, - "to-regex-range": { + "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "peer": true, - "requires": { + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "ts-interface-checker": { + "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true, "peer": true }, - "util-deprecate": { + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true, "peer": true }, - "wrappy": { + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "peer": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.0.tgz", + "integrity": "sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==", "dev": true, - "peer": true + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } }, - "yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "peer": true + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/assets/package.json b/assets/package.json index dd03424f..57122b84 100644 --- a/assets/package.json +++ b/assets/package.json @@ -1,6 +1,27 @@ { "private": true, + "scripts": { + "format": "prettier --write .", + "format-check": "prettier --check ." + }, "devDependencies": { - "@tailwindcss/container-queries": "^0.1.1" + "@tailwindcss/container-queries": "^0.1.1", + "esbuild": "^0.20", + "esbuild-plugin-import-glob": "^0.1", + "esbuild-svelte": "^0.8", + "eslint": "^8.57", + "eslint-config-prettier": "^9.1", + "prettier": "^3.2", + "prettier-plugin-svelte": "^3.2", + "svelte": "^4.2", + "svelte-preprocess": "^5.1", + "typescript": "^5.3" + }, + "dependencies": { + "@monaco-editor/loader": "^1.4", + "live_svelte": "file:../deps/live_svelte", + "phoenix": "file:../deps/phoenix", + "phoenix_html": "file:../deps/phoenix_html", + "phoenix_live_view": "file:../deps/phoenix_live_view" } } diff --git a/assets/svelte/components/Backdrop.svelte b/assets/svelte/components/Backdrop.svelte new file mode 100644 index 00000000..0335c22a --- /dev/null +++ b/assets/svelte/components/Backdrop.svelte @@ -0,0 +1,10 @@ + + +{#if $backdropVisible} +
+{/if} diff --git a/assets/svelte/components/BrowserFrame.svelte b/assets/svelte/components/BrowserFrame.svelte new file mode 100644 index 00000000..3dfa4d6e --- /dev/null +++ b/assets/svelte/components/BrowserFrame.svelte @@ -0,0 +1,31 @@ + + +
+
+
+ + + +
+
+
+ {getPageName(page)} +
+
+
+ +
+
+ +
diff --git a/assets/svelte/components/CodeEditor.svelte b/assets/svelte/components/CodeEditor.svelte new file mode 100644 index 00000000..9961125e --- /dev/null +++ b/assets/svelte/components/CodeEditor.svelte @@ -0,0 +1,40 @@ + + +
diff --git a/assets/svelte/components/ComponentsSidebar.svelte b/assets/svelte/components/ComponentsSidebar.svelte new file mode 100644 index 00000000..6fdcf2cd --- /dev/null +++ b/assets/svelte/components/ComponentsSidebar.svelte @@ -0,0 +1,147 @@ + + + + + +{#if showExamples} +
+{/if} + + diff --git a/assets/svelte/components/LayoutAstNode.svelte b/assets/svelte/components/LayoutAstNode.svelte new file mode 100644 index 00000000..7ae3a908 --- /dev/null +++ b/assets/svelte/components/LayoutAstNode.svelte @@ -0,0 +1,29 @@ + + +{#if isAstElement(node)} + {#if node.tag === "html_comment"} + {@html ""} + {:else if node.tag === "eex_comment"} + {@html ""} + {:else if node.tag === "eex" && node.content[0] === "@inner_content"} + + {:else if node.rendered_html} + {@html node.rendered_html} + {:else if node.attrs?.selfClose} + + {:else} + + {#if node.content} + {#each node.content as subnode, index} + + {/each} + {/if} + + {/if} +{:else} + {node} +{/if} diff --git a/assets/svelte/components/PageAstNode.svelte b/assets/svelte/components/PageAstNode.svelte new file mode 100644 index 00000000..5540248a --- /dev/null +++ b/assets/svelte/components/PageAstNode.svelte @@ -0,0 +1,122 @@ + + +{#if isAstElement(node)} + {#if node.tag === "html_comment"} + {@html ""} + {:else if node.tag === "eex_comment"} + {@html ""} + {:else if node.tag === "eex" && node.content[0] === "@inner_content"} + + {:else if node.rendered_html} +
($selectedAstElementId = nodeId)} + use:highlightContent={{ selected: $selectedAstElement === node, highlighted: $highlightedAstElement === node }} + > + {@html node.rendered_html} +
+ {:else if node.attrs?.selfClose} + + {:else} + ($selectedAstElementId = nodeId)} + > + {#each node.content as subnode, index} + + {/each} + + {/if} +{:else} + {node} +{/if} diff --git a/assets/svelte/components/PagePreview.svelte b/assets/svelte/components/PagePreview.svelte new file mode 100644 index 00000000..a214c21e --- /dev/null +++ b/assets/svelte/components/PagePreview.svelte @@ -0,0 +1,94 @@ + + +
+ {#if $page} + +
+
+ +
+
+
+ {/if} +
+ + diff --git a/assets/svelte/components/PageWrapper.svelte b/assets/svelte/components/PageWrapper.svelte new file mode 100644 index 00000000..a6ef5a34 --- /dev/null +++ b/assets/svelte/components/PageWrapper.svelte @@ -0,0 +1,61 @@ + + + + + +
+ {#each $page.layout.ast as layoutAstNode} + + {#each $page.ast as astNode, index} + + {/each} + + {/each} +
+ + diff --git a/assets/svelte/components/Pill.svelte b/assets/svelte/components/Pill.svelte new file mode 100644 index 00000000..a1d55b22 --- /dev/null +++ b/assets/svelte/components/Pill.svelte @@ -0,0 +1,22 @@ + + +
+ + +
diff --git a/assets/svelte/components/PropertiesSidebar.svelte b/assets/svelte/components/PropertiesSidebar.svelte new file mode 100644 index 00000000..33f595ae --- /dev/null +++ b/assets/svelte/components/PropertiesSidebar.svelte @@ -0,0 +1,244 @@ + + +
+
+ {#if $selectedAstElement} +
+ {sidebarTitle} + {#if !isRootNode} + + {/if} + +
+ {#if attributesEditable} + + Classes + + {#each classList as className} + deleteClass(className)}>{className} + {/each} + + + {#each editableAttrs as entry (entry)} + {@const [name, value] = entry} + updateAttribute(name, e)} + placeholder="Set {name}" + > + {name} + + {/each} + {/if} + {#if $selectedAstElement.tag === "eex_block"} + + Block argument + + + + Block content + +

The content of eex blocks can't be edited from the visual editor yet. Please use the code editor.

+
+
+ {/if} + +
+ {#if $draggedObject && $draggedObject.category === "basic"} +
(isDraggingOver = false)} + > +
+ Drop components here +
+
+ {/if} + {#if $selectedAstElement.content?.length > 0} + updateText(e)} + on:nodesChange={changeNodes} + > + Content + + {/if} +
+ + + Delete + + + + + {:else} +
Select a component to edit its properties
+ {/if} +
+
diff --git a/assets/svelte/components/SidebarSection.svelte b/assets/svelte/components/SidebarSection.svelte new file mode 100644 index 00000000..415530d2 --- /dev/null +++ b/assets/svelte/components/SidebarSection.svelte @@ -0,0 +1,187 @@ + + +
+
+ + +
+ {#if $$slots["value"]} + + + +
+ {:else if expanded} + + {#if internalValue} + {#if large} + + + {:else} + + {/if} + {#if $$slots["value"]} +
+ {/if} + {:else if astElements} + {#each astElements as astElement, idx} + +
highlightAstElement(astElement)} + on:mouseleave={() => unhighlightAstElement()} + class="mt-5" + > +
+ <{astElement.tag}> + +
+
+ + +
+
+ {/each} + {/if} +
+ {/if} +
diff --git a/assets/svelte/components/UiBuilder.svelte b/assets/svelte/components/UiBuilder.svelte new file mode 100644 index 00000000..7c77f0c5 --- /dev/null +++ b/assets/svelte/components/UiBuilder.svelte @@ -0,0 +1,35 @@ + + + +
+ + + + + + + + addBasicComponentToTarget(e.detail)} /> +
diff --git a/assets/svelte/stores/currentComponentCategory.ts b/assets/svelte/stores/currentComponentCategory.ts new file mode 100644 index 00000000..c9cdc9d8 --- /dev/null +++ b/assets/svelte/stores/currentComponentCategory.ts @@ -0,0 +1,5 @@ +import { writable } from "svelte/store" +import type { Writable } from "svelte/store" +import type { ComponentCategory } from "../types" + +export const currentComponentCategory: Writable = writable(null) diff --git a/assets/svelte/stores/dragAndDrop.ts b/assets/svelte/stores/dragAndDrop.ts new file mode 100644 index 00000000..fb2b2356 --- /dev/null +++ b/assets/svelte/stores/dragAndDrop.ts @@ -0,0 +1,5 @@ +import { writable } from "svelte/store" +import type { Writable } from "svelte/store" +import type { ComponentDefinition } from "../types" + +export const draggedObject: Writable = writable(null) diff --git a/assets/svelte/stores/page.ts b/assets/svelte/stores/page.ts new file mode 100644 index 00000000..3f7d97c0 --- /dev/null +++ b/assets/svelte/stores/page.ts @@ -0,0 +1,56 @@ +import { writable, derived, get } from "svelte/store" +import type { Writable, Readable } from "svelte/store" +import type { AstElement, AstNode, Page } from "$lib/types" + +export const page: Writable = writable() +export const selectedAstElementId: Writable = writable() +// export const highlightedAstElementId: Writable = writable(); +export const highlightedAstElement: Writable = writable() +export const slotTargetElement: Writable = writable() + +export const rootAstElement: Readable = derived([page], ([$page]) => { + // This is a virtual AstElement intended to simulate the page itself to reorder the components at the first level. + return { tag: "root", attrs: {}, content: $page.ast } +}) +export const selectedAstElement: Readable = derived( + [page, selectedAstElementId], + ([$page, $selectedAstElementId]) => { + if ($selectedAstElementId) { + if ($selectedAstElementId === "root") return get(rootAstElement) + return findAstElement($page.ast, $selectedAstElementId) + } + }, +) + +export function isAstElement(maybeNode: AstNode): maybeNode is AstElement { + return typeof maybeNode !== "string" +} + +export function findAstElement(ast: AstNode[], id: string): AstElement { + let indexes = id.split(".").map((s) => parseInt(s, 10)) + let node: AstNode = ast[indexes[0]] as AstElement + ast = node.content + for (let i = 1; i < indexes.length; i++) { + node = ast[indexes[i]] as AstElement + ast = node.content + } + return node +} +export function findAstElementId(astNode: AstNode): string | undefined { + let $page = get(page) + return _findAstElementId($page.ast, astNode, "") +} + +export function _findAstElementId(ast: AstNode[], astNode: AstNode, id: string): string | undefined { + for (let i = 0; i < ast.length; i++) { + let currentNode = ast[i] + if (currentNode === astNode) { + return id + i + } else if (isAstElement(currentNode)) { + let result = _findAstElementId(currentNode.content, astNode, id + i + ".") + if (result) { + return result + } + } + } +} diff --git a/assets/svelte/stores/tailwindConfig.ts b/assets/svelte/stores/tailwindConfig.ts new file mode 100644 index 00000000..2a622670 --- /dev/null +++ b/assets/svelte/stores/tailwindConfig.ts @@ -0,0 +1,4 @@ +import { writable } from "svelte/store" +import type { Writable } from "svelte/store" + +export const tailwindConfig: Writable = writable() diff --git a/assets/svelte/stores/tailwindInput.ts b/assets/svelte/stores/tailwindInput.ts new file mode 100644 index 00000000..0e4b1cef --- /dev/null +++ b/assets/svelte/stores/tailwindInput.ts @@ -0,0 +1,4 @@ +import { writable } from "svelte/store" +import type { Writable } from "svelte/store" + +export const tailwindInput: Writable = writable() diff --git a/assets/svelte/types.ts b/assets/svelte/types.ts new file mode 100644 index 00000000..c25328e9 --- /dev/null +++ b/assets/svelte/types.ts @@ -0,0 +1,90 @@ +export type AstNode = AstElement | string +export interface AstElement { + tag: string + attrs: Record + content: AstNode[] + rendered_html?: string + arg?: string +} + +export enum ComponentCategoryId { + navigations = "nav", + headers = "header", + signup = "sign_up", + stats = "stats", + footers = "footer", + signin = "sign_in", + basics = "basic", +} + +export enum ComponentDefinitionId { + nav_1 = "nav_1", + nav_2 = "nav_2", + nav_3 = "nav_3", + nav_4 = "nav_4", + header_1 = "header_1", + header_2 = "header_2", + header_3 = "header_3", + signup_1 = "signup_1", + signup_2 = "signup_2", + signup_3 = "signup_3", + stats_1 = "stats_1", + stats_2 = "stats_2", + stats_3 = "stats_3", + footer_1 = "footer_1", + footer_2 = "footer_2", + footer_3 = "footer_3", + signin_1 = "signin_1", + signin_2 = "signin_2", + signin_3 = "signin_3", + title = "title", + button = "button", + link = "link", + paragraph = "paragraph", + aside = "aside", +} +export interface ComponentCategory { + id: ComponentCategoryId + name: string +} + +export interface MenuCategory { + name: string + items: ComponentCategory[] +} + +export interface ComponentDefinition { + id: ComponentDefinitionId + category: ComponentCategoryId + name: string + thumbnail: string +} + +export interface Component { + definitionId: ComponentDefinitionId + attributes: { + id: string + class: string[] + href?: string + } + slot?: boolean + content: (string | Component)[] +} +export interface RootComponent extends Component { + pageId: string + rendered_html: string | null +} + +export interface Layout { + ast: AstNode[] +} +export interface Page { + id: string + path: string + template: string + site: string + layoutId: string + layout: Layout + components: RootComponent[] + ast: AstNode[] +} diff --git a/assets/svelte/utils/animations.ts b/assets/svelte/utils/animations.ts new file mode 100644 index 00000000..373fdf6a --- /dev/null +++ b/assets/svelte/utils/animations.ts @@ -0,0 +1,7 @@ +export function translate(_node: HTMLElement, { delay = 0, duration = 300, x = 0, y = 0 }) { + return { + delay, + duration, + css: (t: number) => `transform: translate(${x * t}px, ${y * t}px)`, + } +} diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js index fec1e1d7..31e97108 100644 --- a/assets/tailwind.config.js +++ b/assets/tailwind.config.js @@ -5,30 +5,27 @@ // See the Tailwind configuration guide for advanced usage // https://tailwindcss.com/docs/configuration // const colors = require('tailwindcss/colors') -const defaultTheme = require('tailwindcss/defaultTheme') +const defaultTheme = require("tailwindcss/defaultTheme") const plugin = require("tailwindcss/plugin") const fs = require("fs") const path = require("path") module.exports = { - content: [ - "./js/**/*.js", - "../lib/beacon/live_admin/**/*.*ex" - ], + content: ["./js/**/*.js", "../lib/beacon/live_admin/**/*.*ex", "./svelte/**/*.svelte"], theme: { extend: { colors: { brand: "#FD4F00", }, fontFamily: { - sans: ["Plus Jakarta Sans", 'sans-serif', ...defaultTheme.fontFamily.sans], + sans: ["Plus Jakarta Sans", "sans-serif", ...defaultTheme.fontFamily.sans], }, }, }, plugins: [ require("@tailwindcss/forms"), - require('@tailwindcss/container-queries'), + require("@tailwindcss/container-queries"), // Allows prefixing tailwind classes with LiveView classes to add rules // only when LiveView classes are applied, for example: // @@ -42,35 +39,41 @@ module.exports = { // Embeds Hero Icons (https://heroicons.com) into your app.css bundle // See your `CoreComponents.icon/1` for more information. // - plugin(function({ matchComponents, theme }) { + plugin(function ({ matchComponents, theme }) { let iconsDir = path.join(__dirname, "./vendor/heroicons/optimized") let values = {} let icons = [ ["", "/24/outline"], ["-solid", "/24/solid"], - ["-mini", "/20/solid"] + ["-mini", "/20/solid"], ] icons.forEach(([suffix, dir]) => { - fs.readdirSync(path.join(iconsDir, dir)).map(file => { + fs.readdirSync(path.join(iconsDir, dir)).map((file) => { let name = path.basename(file, ".svg") + suffix values[name] = { name, fullPath: path.join(iconsDir, dir, file) } }) }) - matchComponents({ - "hero": ({ name, fullPath }) => { - let content = fs.readFileSync(fullPath).toString().replace(/\r?\n|\r/g, "") - return { - [`--hero-${name}`]: `url('data:image/svg+xml;utf8,${content}')`, - "-webkit-mask": `var(--hero-${name})`, - "mask": `var(--hero-${name})`, - "background-color": "currentColor", - "vertical-align": "middle", - "display": "inline-block", - "width": theme("spacing.5"), - "height": theme("spacing.5") - } - } - }, { values }) - }) - ] + matchComponents( + { + hero: ({ name, fullPath }) => { + let content = fs + .readFileSync(fullPath) + .toString() + .replace(/\r?\n|\r/g, "") + return { + [`--hero-${name}`]: `url('data:image/svg+xml;utf8,${content}')`, + "-webkit-mask": `var(--hero-${name})`, + mask: `var(--hero-${name})`, + "background-color": "currentColor", + "vertical-align": "middle", + display: "inline-block", + width: theme("spacing.5"), + height: theme("spacing.5"), + } + }, + }, + { values }, + ) + }), + ], } diff --git a/assets/tsconfig.json b/assets/tsconfig.json new file mode 100644 index 00000000..2e2f98f2 --- /dev/null +++ b/assets/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "types": ["node"], + "baseUrl": ".", + "paths": { + "$lib": ["svelte"], + "$lib/*": ["svelte/*"] + } + } +} diff --git a/assets/vendor/heroicons/LICENSE.md b/assets/vendor/heroicons/LICENSE.md index 1ac3e409..64c08166 100644 --- a/assets/vendor/heroicons/LICENSE.md +++ b/assets/vendor/heroicons/LICENSE.md @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/assets/vendor/topbar.js b/assets/vendor/topbar.js index 41957274..4f1a923d 100644 --- a/assets/vendor/topbar.js +++ b/assets/vendor/topbar.js @@ -4,35 +4,33 @@ * https://buunguyen.github.io/topbar * Copyright (c) 2021 Buu Nguyen */ -(function (window, document) { - "use strict"; +;(function (window, document) { + "use strict" // https://gist.github.com/paulirish/1579671 - (function () { - var lastTime = 0; - var vendors = ["ms", "moz", "webkit", "o"]; + ;(function () { + var lastTime = 0 + var vendors = ["ms", "moz", "webkit", "o"] for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { - window.requestAnimationFrame = - window[vendors[x] + "RequestAnimationFrame"]; + window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"] window.cancelAnimationFrame = - window[vendors[x] + "CancelAnimationFrame"] || - window[vendors[x] + "CancelRequestAnimationFrame"]; + window[vendors[x] + "CancelAnimationFrame"] || window[vendors[x] + "CancelRequestAnimationFrame"] } if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback, element) { - var currTime = new Date().getTime(); - var timeToCall = Math.max(0, 16 - (currTime - lastTime)); + var currTime = new Date().getTime() + var timeToCall = Math.max(0, 16 - (currTime - lastTime)) var id = window.setTimeout(function () { - callback(currTime + timeToCall); - }, timeToCall); - lastTime = currTime + timeToCall; - return id; - }; + callback(currTime + timeToCall) + }, timeToCall) + lastTime = currTime + timeToCall + return id + } if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) { - clearTimeout(id); - }; - })(); + clearTimeout(id) + } + })() var canvas, currentProgress, @@ -41,9 +39,9 @@ fadeTimerId = null, delayTimerId = null, addEvent = function (elem, type, handler) { - if (elem.addEventListener) elem.addEventListener(type, handler, false); - else if (elem.attachEvent) elem.attachEvent("on" + type, handler); - else elem["on" + type] = handler; + if (elem.addEventListener) elem.addEventListener(type, handler, false) + else if (elem.attachEvent) elem.attachEvent("on" + type, handler) + else elem["on" + type] = handler }, options = { autoRun: true, @@ -60,106 +58,96 @@ className: null, }, repaint = function () { - canvas.width = window.innerWidth; - canvas.height = options.barThickness * 5; // need space for shadow + canvas.width = window.innerWidth + canvas.height = options.barThickness * 5 // need space for shadow - var ctx = canvas.getContext("2d"); - ctx.shadowBlur = options.shadowBlur; - ctx.shadowColor = options.shadowColor; + var ctx = canvas.getContext("2d") + ctx.shadowBlur = options.shadowBlur + ctx.shadowColor = options.shadowColor - var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0); - for (var stop in options.barColors) - lineGradient.addColorStop(stop, options.barColors[stop]); - ctx.lineWidth = options.barThickness; - ctx.beginPath(); - ctx.moveTo(0, options.barThickness / 2); - ctx.lineTo( - Math.ceil(currentProgress * canvas.width), - options.barThickness / 2 - ); - ctx.strokeStyle = lineGradient; - ctx.stroke(); + var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0) + for (var stop in options.barColors) lineGradient.addColorStop(stop, options.barColors[stop]) + ctx.lineWidth = options.barThickness + ctx.beginPath() + ctx.moveTo(0, options.barThickness / 2) + ctx.lineTo(Math.ceil(currentProgress * canvas.width), options.barThickness / 2) + ctx.strokeStyle = lineGradient + ctx.stroke() }, createCanvas = function () { - canvas = document.createElement("canvas"); - var style = canvas.style; - style.position = "fixed"; - style.top = style.left = style.right = style.margin = style.padding = 0; - style.zIndex = 100001; - style.display = "none"; - if (options.className) canvas.classList.add(options.className); - document.body.appendChild(canvas); - addEvent(window, "resize", repaint); + canvas = document.createElement("canvas") + var style = canvas.style + style.position = "fixed" + style.top = style.left = style.right = style.margin = style.padding = 0 + style.zIndex = 100001 + style.display = "none" + if (options.className) canvas.classList.add(options.className) + document.body.appendChild(canvas) + addEvent(window, "resize", repaint) }, topbar = { config: function (opts) { - for (var key in opts) - if (options.hasOwnProperty(key)) options[key] = opts[key]; + for (var key in opts) if (options.hasOwnProperty(key)) options[key] = opts[key] }, show: function (delay) { - if (showing) return; + if (showing) return if (delay) { - if (delayTimerId) return; - delayTimerId = setTimeout(() => topbar.show(), delay); - } else { - showing = true; - if (fadeTimerId !== null) window.cancelAnimationFrame(fadeTimerId); - if (!canvas) createCanvas(); - canvas.style.opacity = 1; - canvas.style.display = "block"; - topbar.progress(0); + if (delayTimerId) return + delayTimerId = setTimeout(() => topbar.show(), delay) + } else { + showing = true + if (fadeTimerId !== null) window.cancelAnimationFrame(fadeTimerId) + if (!canvas) createCanvas() + canvas.style.opacity = 1 + canvas.style.display = "block" + topbar.progress(0) if (options.autoRun) { - (function loop() { - progressTimerId = window.requestAnimationFrame(loop); - topbar.progress( - "+" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2) - ); - })(); + ;(function loop() { + progressTimerId = window.requestAnimationFrame(loop) + topbar.progress("+" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2)) + })() } } }, progress: function (to) { - if (typeof to === "undefined") return currentProgress; + if (typeof to === "undefined") return currentProgress if (typeof to === "string") { - to = - (to.indexOf("+") >= 0 || to.indexOf("-") >= 0 - ? currentProgress - : 0) + parseFloat(to); + to = (to.indexOf("+") >= 0 || to.indexOf("-") >= 0 ? currentProgress : 0) + parseFloat(to) } - currentProgress = to > 1 ? 1 : to; - repaint(); - return currentProgress; + currentProgress = to > 1 ? 1 : to + repaint() + return currentProgress }, hide: function () { - clearTimeout(delayTimerId); - delayTimerId = null; - if (!showing) return; - showing = false; + clearTimeout(delayTimerId) + delayTimerId = null + if (!showing) return + showing = false if (progressTimerId != null) { - window.cancelAnimationFrame(progressTimerId); - progressTimerId = null; + window.cancelAnimationFrame(progressTimerId) + progressTimerId = null } - (function loop() { + ;(function loop() { if (topbar.progress("+.1") >= 1) { - canvas.style.opacity -= 0.05; + canvas.style.opacity -= 0.05 if (canvas.style.opacity <= 0.05) { - canvas.style.display = "none"; - fadeTimerId = null; - return; + canvas.style.display = "none" + fadeTimerId = null + return } } - fadeTimerId = window.requestAnimationFrame(loop); - })(); + fadeTimerId = window.requestAnimationFrame(loop) + })() }, - }; + } if (typeof module === "object" && typeof module.exports === "object") { - module.exports = topbar; + module.exports = topbar } else if (typeof define === "function" && define.amd) { define(function () { - return topbar; - }); + return topbar + }) } else { - this.topbar = topbar; + this.topbar = topbar } -}.call(this, window, document)); +}).call(this, window, document) diff --git a/config/config.exs b/config/config.exs index 7ed05d96..0f61edc2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -7,32 +7,6 @@ config :logger, :console, config :phoenix, :json_library, Jason if Mix.env() == :dev do - esbuild = fn args -> - [ - args: ~w( - ./js/beacon_live_admin.js - --bundle - --sourcemap - --loader:.ttf=dataurl - --loader:.woff=dataurl - --loader:.woff2=dataurl - ) ++ args, - cd: Path.expand("../assets", __DIR__), - env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)} - ] - end - - config :esbuild, - version: "0.20.0", - cdn: - esbuild.( - ~w(--format=iife --target=es2016 --global-name=BeaconLiveAdmin --outfile=../priv/static/beacon_live_admin.js) - ), - cdn_min: - esbuild.( - ~w(--format=iife --target=es2016 --global-name=BeaconLiveAdmin --minify --outfile=../priv/static/beacon_live_admin.min.js) - ) - config :tailwind, version: "3.4.1", default: [ @@ -45,3 +19,5 @@ if Mix.env() == :dev do cd: Path.expand("../assets", __DIR__) ] end + +import_config "#{config_env()}.exs" diff --git a/config/dev.exs b/config/dev.exs new file mode 100644 index 00000000..becde769 --- /dev/null +++ b/config/dev.exs @@ -0,0 +1 @@ +import Config diff --git a/config/runtime.exs b/config/runtime.exs new file mode 100644 index 00000000..becde769 --- /dev/null +++ b/config/runtime.exs @@ -0,0 +1 @@ +import Config diff --git a/config/test.exs b/config/test.exs new file mode 100644 index 00000000..f1005927 --- /dev/null +++ b/config/test.exs @@ -0,0 +1,3 @@ +import Config + +config :logger, level: :error diff --git a/dev.exs b/dev.exs index 2229145b..572a3a85 100644 --- a/dev.exs +++ b/dev.exs @@ -19,8 +19,8 @@ Application.put_env(:beacon_live_admin, DemoWeb.Endpoint, check_origin: false, pubsub_server: Demo.PubSub, watchers: [ - esbuild: {Esbuild, :install_and_run, [:cdn_min, ~w(--watch)]}, - tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]} + tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}, + node: ["build.js", "--watch", cd: Path.expand("./assets", __DIR__)] ], live_reload: [ patterns: [ diff --git a/lib/beacon/live_admin/cluster.ex b/lib/beacon/live_admin/cluster.ex index dd0a481c..db66af2c 100644 --- a/lib/beacon/live_admin/cluster.ex +++ b/lib/beacon/live_admin/cluster.ex @@ -51,6 +51,11 @@ defmodule Beacon.LiveAdmin.Cluster do :ok """ + def call(site, mod, fun, args) when is_binary(site) do + site = String.to_existing_atom(site) + call(site, mod, fun, args) + end + def call(site, mod, fun, args) when is_atom(site) and is_atom(mod) and is_atom(fun) and is_list(args) do case find_node(site) do diff --git a/lib/beacon/live_admin/components/layouts.ex b/lib/beacon/live_admin/components/layouts.ex index a7f86cf3..024c3df2 100644 --- a/lib/beacon/live_admin/components/layouts.ex +++ b/lib/beacon/live_admin/components/layouts.ex @@ -1,4 +1,6 @@ defmodule Beacon.LiveAdmin.Layouts do + @moduledoc false + use Beacon.LiveAdmin.Web, :html embed_templates "layouts/*" diff --git a/lib/beacon/live_admin/content.ex b/lib/beacon/live_admin/content.ex index 5f90d2d4..4748b308 100644 --- a/lib/beacon/live_admin/content.ex +++ b/lib/beacon/live_admin/content.ex @@ -8,6 +8,10 @@ defmodule Beacon.LiveAdmin.Content do import Beacon.LiveAdmin.Cluster, only: [call: 4] + def list_stylesheets(site) do + call(site, Beacon.Content, :list_stylesheets, [site]) + end + def change_layout(site, layout, attrs \\ %{}) do call(site, Beacon.Content, :change_layout, [layout, attrs]) end diff --git a/lib/beacon/live_admin/controllers/assets_controller.ex b/lib/beacon/live_admin/controllers/assets_controller.ex index 7ac778e8..dbd99284 100644 --- a/lib/beacon/live_admin/controllers/assets_controller.ex +++ b/lib/beacon/live_admin/controllers/assets_controller.ex @@ -13,7 +13,13 @@ defmodule Beacon.LiveAdmin.AssetsController do @external_resource css_path @css File.read!(css_path) - js_path = Path.join(__DIR__, "../../../../priv/static/beacon_live_admin.min.js") + js_path = + if Code.ensure_loaded?(Mix.Project) and Mix.env() == :dev do + Path.join(__DIR__, "../../../../priv/static/beacon_live_admin.js") + else + Path.join(__DIR__, "../../../../priv/static/beacon_live_admin.min.js") + end + @external_resource js_path @js """ @@ -40,6 +46,7 @@ defmodule Beacon.LiveAdmin.AssetsController do end defp contents_and_type(:css), do: {@css, "text/css"} + defp contents_and_type(:js), do: {@js, "text/javascript"} @doc """ diff --git a/lib/beacon/live_admin/live/page_editor_live/edit.ex b/lib/beacon/live_admin/live/page_editor_live/edit.ex index 4cfd9341..f25ac5fb 100644 --- a/lib/beacon/live_admin/live/page_editor_live/edit.ex +++ b/lib/beacon/live_admin/live/page_editor_live/edit.ex @@ -3,20 +3,35 @@ defmodule Beacon.LiveAdmin.PageEditorLive.Edit do use Beacon.LiveAdmin.PageBuilder alias Beacon.LiveAdmin.Content + alias Beacon.LiveAdmin.WebAPI @impl true def menu_link("/pages", :edit), do: {:submenu, "Pages"} def menu_link(_, _), do: :skip @impl true - def mount(_params, _session, socket) do - {:ok, assign(socket, page: nil)} - end + def handle_params(params, _url, socket) do + editor = Map.get(params, "editor", "code") + %{site: site} = socket.assigns.beacon_page - @impl true - def handle_params(%{"id" => id}, _url, socket) do - page = Content.get_page(socket.assigns.beacon_page.site, id) - {:noreply, assign(socket, page_title: "Edit Page", page: page)} + socket = + socket + |> assign_new(:layouts, fn -> Content.list_layouts(site) end) + |> assign_new(:components, fn -> + components = Content.list_components(site, per_page: :infinity) + %{data: components} = BeaconWeb.API.ComponentJSON.index(%{components: components}) + components + end) + |> assign_new(:page, fn -> Content.get_page(site, params["id"], preloads: [:layout]) end) + + socket = + socket + |> assign( + page_title: "Edit Page", + editor: editor + ) + + {:noreply, socket} end @impl true @@ -29,16 +44,54 @@ defmodule Beacon.LiveAdmin.PageEditorLive.Edit do {:noreply, socket} end + def handle_event("enable_editor", %{"editor" => editor}, socket) do + path = + Beacon.LiveAdmin.Router.beacon_live_admin_path( + socket, + socket.assigns.beacon_page.site, + "/pages/#{socket.assigns.page.id}", + %{editor: editor} + ) + + {:noreply, push_patch(socket, to: path)} + end + + def handle_event( + "render_component_in_page", + %{"component_id" => component_id, "page_id" => page_id}, + socket + ) do + page = Content.get_page(socket.assigns.beacon_page.site, page_id) + component = Content.get_component(socket.assigns.beacon_page.site, component_id) + + %{data: %{ast: ast}} = + WebAPI.Component.show_ast(socket.assigns.beacon_page.site, component, page) + + {:reply, %{"ast" => ast}, socket} + end + + def handle_event("update_page_ast", %{"ast" => ast}, socket) do + send_update(Beacon.LiveAdmin.PageEditorLive.FormComponent, + id: "page-editor-form-edit", + ast: ast + ) + + {:noreply, socket} + end + @impl true def render(assigns) do ~H""" <.live_component module={Beacon.LiveAdmin.PageEditorLive.FormComponent} id="page-editor-form-edit" - site={@beacon_page.site} - page_title={@page_title} live_action={@live_action} + page_title={@page_title} + site={@beacon_page.site} + layouts={@layouts} page={@page} + components={@components} + editor={@editor} patch="/pages" /> """ diff --git a/lib/beacon/live_admin/live/page_editor_live/form_component.ex b/lib/beacon/live_admin/live/page_editor_live/form_component.ex index c163a521..02d47624 100644 --- a/lib/beacon/live_admin/live/page_editor_live/form_component.ex +++ b/lib/beacon/live_admin/live/page_editor_live/form_component.ex @@ -3,28 +3,83 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do alias Beacon.LiveAdmin.Config alias Beacon.LiveAdmin.Content + alias Beacon.LiveAdmin.RuntimeCSS + alias Beacon.LiveAdmin.WebAPI + alias Ecto.Changeset @impl true def update(%{site: site, page: page} = assigns, socket) do - changeset = Content.change_page(site, page) - layouts = Content.list_layouts(site) + changeset = + case socket.assigns do + %{form: form} -> + Content.change_page(site, page, form.params) + + _ -> + Content.change_page(site, page) + end {:ok, socket |> assign(assigns) |> assign_form(changeset) - |> assign(:layouts, layouts) + |> maybe_assign_builder_page(changeset) |> assign(:language, language(page.format)) - |> assign_extra_fields(changeset)} + |> assign_extra_fields(changeset) + |> assign_new(:tailwind_config, fn -> RuntimeCSS.config(site) end) + |> assign_new(:tailwind_input, fn -> + tailwind = [ + "@tailwind base;", + "\n", + "@tailwind components;", + "\n", + "@tailwind utilities;", + "\n" + ] + + site = + site + |> Content.list_stylesheets() + |> Enum.map(fn stylesheet -> + ["\n", "/* ", stylesheet.name, " */", "\n", stylesheet.content, "\n"] + end) + + IO.iodata_to_binary(tailwind ++ site) + end)} end - def update(%{template: value}, socket) do - params = Map.merge(socket.assigns.form.params, %{"template" => value}) + def update(%{template: _template}, %{assigns: %{editor: "visual"}} = socket) do + {:ok, socket} + end + + def update(%{template: template}, %{assigns: %{editor: "code"}} = socket) do + params = Map.merge(socket.assigns.form.params, %{"template" => template}) changeset = Content.change_page(socket.assigns.site, socket.assigns.page, params) + {:ok, assign_form(socket, changeset)} end + def update(%{ast: _ast}, %{assigns: %{editor: "code"}} = socket) do + {:ok, socket} + end + + def update(%{ast: ast}, %{assigns: %{editor: "visual"}} = socket) do + template = Beacon.Template.HEEx.HEExDecoder.decode(ast) + params = Map.merge(socket.assigns.form.params, %{"template" => template}) + changeset = Content.change_page(socket.assigns.site, socket.assigns.page, params) + + {:ok, + socket + |> LiveMonacoEditor.set_value(template, to: "template") + |> assign_form(changeset) + |> maybe_assign_builder_page(changeset)} + end + @impl true + # ignore change events from the editor field + def handle_event("validate", %{"_target" => ["live_monaco_editor", "template"]}, socket) do + {:noreply, socket} + end + def handle_event( "validate", %{"_target" => ["page", "format"], "page" => page_params}, @@ -38,7 +93,10 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do |> Content.validate_page(socket.assigns.page, page_params) |> Map.put(:action, :validate) - {:noreply, assign_form(socket, changeset)} + {:noreply, + socket + |> assign_form(changeset) + |> maybe_assign_builder_page(changeset)} end def handle_event("validate", %{"page" => page_params}, socket) do @@ -50,6 +108,7 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do {:noreply, socket |> assign_form(changeset) + |> maybe_assign_builder_page(changeset) |> assign_extra_fields(changeset)} end @@ -82,7 +141,7 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do {:noreply, socket |> put_flash(:info, "Page created successfully") - |> push_patch(to: to)} + |> push_navigate(to: to)} {:error, changeset} -> changeset = Map.put(changeset, :action, :insert) @@ -112,7 +171,63 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do assign(socket, :form, to_form(changeset)) end + defp maybe_assign_builder_page(%{assigns: %{editor: "visual"}} = socket, changeset) do + with :heex <- Changeset.get_field(changeset, :format), + {:ok, page} <- Changeset.apply_action(changeset, :update), + %{data: builder_page} <- WebAPI.Page.show(page.site, page) do + assign(socket, :builder_page, builder_page) + else + # TODO: handle errors + _ -> + assign(socket, :builder_page, nil) + end + end + + defp maybe_assign_builder_page(socket, _changeset), do: assign(socket, :builder_page, nil) + + defp assign_extra_fields(socket, changeset) do + params = Ecto.Changeset.get_field(changeset, :extra) + + extra_fields = + Content.page_extra_fields( + socket.assigns.site, + socket.assigns.form, + params, + changeset.errors + ) + + assign(socket, :extra_fields, extra_fields) + end + + defp layouts_to_options(layouts) do + Enum.map(layouts, &{&1.title, &1.id}) + end + + defp template_format_options(site) do + template_formats = Config.template_formats(site) + + Keyword.new(template_formats, fn {identifier, description} -> + {String.to_atom(description), identifier} + end) + end + + defp language("heex" = _format), do: "html" + defp language(:heex), do: "html" + defp language(format), do: to_string(format) + + defp extra_page_fields(site), do: Config.extra_page_fields(site) + + defp extra_page_field(site, extra_fields, mod) do + name = Content.page_field_name(site, mod) + html = Content.render_page_field(site, mod, extra_fields[name], __ENV__) + {:safe, html} + end + + defp svelte_page_builder_class("code" = _editor), do: "hidden" + defp svelte_page_builder_class("visual" = _editor), do: "mt-4 relative" + @impl true + @spec render(any()) :: Phoenix.LiveView.Rendered.t() def render(assigns) do ~H"""
@@ -121,6 +236,8 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do <.header> <%= @page_title %> <:actions> + <.button :if={@live_action == :edit && @editor == "code" && @page.format == :heex} type="button" phx-click="enable_editor" phx-value-editor="visual" class="uppercase">Visual Editor + <.button :if={@live_action == :edit && @editor == "visual"} type="button" phx-click="enable_editor" phx-value-editor="code" class="uppercase">Code Editor <.button :if={@live_action == :new} phx-disable-with="Saving..." form="page-form" class="uppercase">Create Draft Page <.button :if={@live_action == :edit} phx-disable-with="Saving..." form="page-form" class="uppercase">Save Changes <.button :if={@live_action == :edit} phx-click={show_modal("publish-confirm-modal")} phx-target={@myself} class="uppercase">Publish @@ -152,7 +269,25 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do
-
+ <.svelte + :if={@editor == "visual"} + name="components/UiBuilder" + class={svelte_page_builder_class(@editor)} + props={ + %{ + components: @components, + page: @builder_page, + tailwindConfig: @tailwind_config, + tailwindInput: @tailwind_input + } + } + socket={@socket} + /> + +
<.form :let={f} for={@form} id="page-form" class="space-y-8" phx-target={@myself} phx-change="validate" phx-submit="save"> Page settings @@ -161,7 +296,7 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do <.input field={f[:description]} type="textarea" label="Description" /> <.input field={f[:layout_id]} type="select" options={layouts_to_options(@layouts)} label="Layout" /> <.input field={f[:format]} type="select" label="Format" options={template_format_options(@site)} /> - + <.input field={f[:template]} type="hidden" name="page[template]" id="page-form_template" value={Phoenix.HTML.Form.input_value(f, :template)} /> <%= for mod <- extra_page_fields(@site) do %> <%= extra_page_field(@site, @extra_fields, mod) %> @@ -174,9 +309,9 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do @language})} + change="set_template" />
@@ -184,42 +319,4 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do
""" end - - defp assign_extra_fields(socket, changeset) do - params = Ecto.Changeset.get_field(changeset, :extra) - - extra_fields = - Content.page_extra_fields( - socket.assigns.site, - socket.assigns.form, - params, - changeset.errors - ) - - assign(socket, :extra_fields, extra_fields) - end - - defp layouts_to_options(layouts) do - Enum.map(layouts, &{&1.title, &1.id}) - end - - defp template_format_options(site) do - template_formats = Config.template_formats(site) - - Keyword.new(template_formats, fn {identifier, description} -> - {String.to_atom(description), identifier} - end) - end - - defp language("heex" = _format), do: "html" - defp language(:heex), do: "html" - defp language(format), do: to_string(format) - - defp extra_page_fields(site), do: Config.extra_page_fields(site) - - defp extra_page_field(site, extra_fields, mod) do - name = Content.page_field_name(site, mod) - html = Content.render_page_field(site, mod, extra_fields[name], __ENV__) - {:safe, html} - end end diff --git a/lib/beacon/live_admin/live/page_editor_live/new.ex b/lib/beacon/live_admin/live/page_editor_live/new.ex index 44663378..a3059017 100644 --- a/lib/beacon/live_admin/live/page_editor_live/new.ex +++ b/lib/beacon/live_admin/live/page_editor_live/new.ex @@ -2,19 +2,53 @@ defmodule Beacon.LiveAdmin.PageEditorLive.New do @moduledoc false use Beacon.LiveAdmin.PageBuilder - alias Beacon.Content + alias Beacon.LiveAdmin.Content + alias Beacon.LiveAdmin.WebAPI @impl true def menu_link("/pages", :new), do: {:submenu, "Pages"} def menu_link(_, _), do: :skip @impl true - def handle_params(_params, _url, socket) do - {:noreply, assigns(socket)} + def handle_params(params, _url, socket) do + editor = Map.get(params, "editor", "code") + %{site: site} = socket.assigns.beacon_page + + socket = + socket + |> assign_new(:layouts, fn -> Content.list_layouts(site) end) + |> assign_new(:components, fn -> + components = Content.list_components(site, per_page: :infinity) + %{data: components} = BeaconWeb.API.ComponentJSON.index(%{components: components}) + components + end) + + socket = + assign(socket, + page_title: "Create New Page", + editor: editor, + page: build_new_page(site, socket.assigns.layouts) + ) + + {:noreply, socket} end - defp assigns(socket) do - assign(socket, page_title: "Create New Page", page: %Content.Page{}) + defp build_new_page(site, [layout | _] = _layouts) do + %Beacon.Content.Page{ + path: "", + site: site, + layout_id: layout.id, + layout: layout + } + end + + defp build_new_page(site, _layouts) do + %Beacon.Content.Page{ + path: "", + site: site, + layout_id: nil, + layout: nil + } end @impl true @@ -27,16 +61,54 @@ defmodule Beacon.LiveAdmin.PageEditorLive.New do {:noreply, socket} end + def handle_event("enable_editor", %{"editor" => editor}, socket) do + path = + Beacon.LiveAdmin.Router.beacon_live_admin_path( + socket, + socket.assigns.beacon_page.site, + "/pages/new", + %{editor: editor} + ) + + {:noreply, push_patch(socket, to: path)} + end + + @impl true + def handle_event( + "render_component_in_page", + %{"component_id" => component_id}, + socket + ) do + component = Content.get_component(socket.assigns.beacon_page.site, component_id) + + %{data: %{ast: ast}} = + WebAPI.Component.show_ast(socket.assigns.beacon_page.site, component, socket.assigns.page) + + {:reply, %{"ast" => ast}, socket} + end + + def handle_event("update_page_ast", %{"ast" => ast}, socket) do + send_update(Beacon.LiveAdmin.PageEditorLive.FormComponent, + id: "page-editor-form-new", + ast: ast + ) + + {:noreply, socket} + end + @impl true def render(assigns) do ~H""" <.live_component module={Beacon.LiveAdmin.PageEditorLive.FormComponent} id="page-editor-form-new" - site={@beacon_page.site} - page_title={@page_title} live_action={@live_action} + page_title={@page_title} + site={@beacon_page.site} + layouts={@layouts} page={@page} + components={@components} + editor={@editor} patch="/pages" /> """ diff --git a/lib/beacon/live_admin/page_builder.ex b/lib/beacon/live_admin/page_builder.ex index 9614a36e..2fb428dd 100644 --- a/lib/beacon/live_admin/page_builder.ex +++ b/lib/beacon/live_admin/page_builder.ex @@ -59,8 +59,6 @@ defmodule Beacon.LiveAdmin.PageBuilder do defmacro __using__(opts) do quote location: :keep, bind_quoted: [opts: opts] do use Phoenix.Component - import Beacon.LiveAdmin.AdminComponents - import Beacon.LiveAdmin.Components, only: [template_error: 1] import Beacon.LiveAdmin.Router, only: [ @@ -71,6 +69,10 @@ defmodule Beacon.LiveAdmin.PageBuilder do ] import Phoenix.LiveView + import Beacon.LiveAdmin.AdminComponents + import Beacon.LiveAdmin.Components, only: [template_error: 1] + import LiveSvelte + alias Phoenix.LiveView.JS alias Beacon.LiveAdmin.PageBuilder.Table diff --git a/lib/beacon/live_admin/page_live.ex b/lib/beacon/live_admin/page_live.ex index 07cbbafc..3c15cc6b 100644 --- a/lib/beacon/live_admin/page_live.ex +++ b/lib/beacon/live_admin/page_live.ex @@ -122,6 +122,11 @@ defmodule Beacon.LiveAdmin.PageLive do maybe_apply_module(socket, :handle_info, [msg], &{:noreply, &1}) end + @impl true + def handle_call(msg, from, socket) do + maybe_apply_module(socket, :handle_call, [msg, from], &{:noreply, &1}) + end + defp lookup_page!(socket, url) do %URI{host: host, path: path} = URI.parse(url) @@ -199,20 +204,13 @@ defmodule Beacon.LiveAdmin.PageLive do defp maybe_apply_module(socket, fun, params, default) do mod = socket.assigns.beacon_page.module + params = params ++ [socket] - if exported?(mod, fun, length(params) + 1) do - Logger.debug(""" - Applying #{fun} in #{mod} - Parameters: #{inspect(params)} - """) - - apply(mod, fun, params ++ [socket]) + if exported?(mod, fun, length(params)) do + Logger.debug("calling #{Exception.format_mfa(mod, fun, params)}") + apply(mod, fun, params) else - Logger.debug(""" - Module/Function not exported: #{inspect(mod)}/#{inspect(fun)} - Parameters: #{inspect(params)} - """) - + Logger.debug("not exported #{Exception.format_mfa(mod, fun, params)}") default.(socket) end end @@ -248,7 +246,8 @@ defmodule Beacon.LiveAdmin.PageLive do path = Beacon.LiveAdmin.Router.beacon_live_admin_path(socket, page.site, path) assigns = %{text: text, icon: icon, path: path} - # force redirect to re-execute plug to fecth current url + # use href to force redirecting to re-execute plug to fecth current url + # more info at https://github.com/phoenixframework/phoenix_live_view/pull/2654 ~H""" <.link href={@path} diff --git a/lib/beacon/live_admin/private.ex b/lib/beacon/live_admin/private.ex index a9812a49..a697ebbf 100644 --- a/lib/beacon/live_admin/private.ex +++ b/lib/beacon/live_admin/private.ex @@ -1,8 +1,8 @@ defmodule Beacon.LiveAdmin.Private do @doc false - # Call to private APIs. - # Those should be handled carefully and not be spread over the codebase. + # Concentrate calls to private APIs so it's easier to track breaking changes. + # Should be avoided as much as possible. @phoenix_live_view_version to_string(Application.spec(:phoenix_live_view)[:vsn]) diff --git a/lib/beacon/live_admin/runtime_css.ex b/lib/beacon/live_admin/runtime_css.ex new file mode 100644 index 00000000..41a7a8cb --- /dev/null +++ b/lib/beacon/live_admin/runtime_css.ex @@ -0,0 +1,7 @@ +defmodule Beacon.LiveAdmin.RuntimeCSS do + import Beacon.LiveAdmin.Cluster, only: [call: 4] + + def config(site) when is_atom(site) do + call(site, Beacon.RuntimeCSS, :config, [site]) + end +end diff --git a/lib/beacon/live_admin/web.ex b/lib/beacon/live_admin/web.ex index abb22ddc..72809d52 100644 --- a/lib/beacon/live_admin/web.ex +++ b/lib/beacon/live_admin/web.ex @@ -62,6 +62,7 @@ defmodule Beacon.LiveAdmin.Web do import Beacon.LiveAdmin.AdminComponents import Beacon.LiveAdmin.Components, only: [template_error: 1] import Beacon.LiveAdmin.Gettext + import LiveSvelte import Beacon.LiveAdmin.Router, only: [ diff --git a/lib/beacon/live_admin/web_api/component.ex b/lib/beacon/live_admin/web_api/component.ex new file mode 100644 index 00000000..b83e9f38 --- /dev/null +++ b/lib/beacon/live_admin/web_api/component.ex @@ -0,0 +1,16 @@ +defmodule Beacon.LiveAdmin.WebAPI.Component do + @moduledoc """ + Calls Beacon Web API through the cluster. + """ + + import Beacon.LiveAdmin.Cluster, only: [call: 4] + + def show_ast(site, component, page) do + path = for segment <- String.split(page.path, "/"), segment != "", do: segment + beacon_live_data = call(site, BeaconWeb.DataSource, :live_data, [site, path]) + + call(site, BeaconWeb.API.ComponentJSON, :show_ast, [ + %{component: component, assigns: %{beacon_live_data: beacon_live_data}} + ]) + end +end diff --git a/lib/beacon/live_admin/web_api/page.ex b/lib/beacon/live_admin/web_api/page.ex new file mode 100644 index 00000000..665c5acd --- /dev/null +++ b/lib/beacon/live_admin/web_api/page.ex @@ -0,0 +1,11 @@ +defmodule Beacon.LiveAdmin.WebAPI.Page do + @moduledoc """ + Calls Beacon Web API through the cluster. + """ + + import Beacon.LiveAdmin.Cluster, only: [call: 4] + + def show(site, page) do + call(site, BeaconWeb.API.PageJSON, :show, [%{page: page}]) + end +end diff --git a/mix.exs b/mix.exs index 00d07785..0c1459f9 100644 --- a/mix.exs +++ b/mix.exs @@ -35,11 +35,11 @@ defmodule Beacon.LiveAdmin.MixProject do {:phoenix_live_reload, "~> 1.2", only: :dev}, phoenix_live_view_dep(), {:floki, ">= 0.30.0", only: :test}, - {:esbuild, "~> 0.5", only: :dev}, {:tailwind, "~> 0.2"}, {:gettext, "~> 0.20"}, {:jason, "~> 1.0"}, - {:plug_cowboy, "~> 2.5"} + {:plug_cowboy, "~> 2.5"}, + {:live_svelte, "~> 0.12"} ] end @@ -76,14 +76,24 @@ defmodule Beacon.LiveAdmin.MixProject do defp aliases do [ setup: ["deps.get", "assets.setup", "assets.build"], + "format.all": ["format", "cmd npm run format --prefix ./assets"], + "format.all.check": [ + "format --check-formatted", + "cmd npm run format-check --prefix ./assets" + ], dev: "run --no-halt dev.exs", "assets.setup": [ "cmd npm install --prefix assets", - "tailwind.install --if-missing --no-assets", - "esbuild.install --if-missing" + "tailwind.install --if-missing --no-assets" + ], + "assets.build": [ + "tailwind default", + "cmd --cd assets node build.js" ], - "assets.build": ["tailwind default", "esbuild cdn", "esbuild cdn_min"], - "assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"] + "assets.deploy": [ + "tailwind default --minify", + "cmd --cd assets node build.js --deploy" + ] ] end end diff --git a/mix.lock b/mix.lock index f2dcbfa1..d0f5e4b6 100644 --- a/mix.lock +++ b/mix.lock @@ -11,7 +11,6 @@ "ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"}, "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, "elixir_make": {:hex, :elixir_make, "0.7.8", "505026f266552ee5aabca0b9f9c229cbb496c689537c9f922f3eb5431157efc7", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.0", [hex: :certifi, repo: "hexpm", optional: true]}], "hexpm", "7a71945b913d37ea89b06966e1342c85cfe549b15e6d6d081e8081c493062c07"}, - "esbuild": {:hex, :esbuild, "0.8.1", "0cbf919f0eccb136d2eeef0df49c4acf55336de864e63594adcea3814f3edf41", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "25fc876a67c13cb0a776e7b5d7974851556baeda2085296c14ab48555ea7560f"}, "ex_aws": {:hex, :ex_aws, "2.4.3", "6c6d88ba7b9c07e3b0f4b70406d5fccb9f5358f5ef18138f7bd396f7863e8255", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8 or ~> 3.0", [hex: :jsx, repo: "hexpm", optional: true]}, {:mime, "~> 1.2 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "67f61f8b6aec740150d483a21f551fabce26a481d9917305ed2bb47717007519"}, "ex_aws_s3": {:hex, :ex_aws_s3, "2.4.0", "ce8decb6b523381812798396bc0e3aaa62282e1b40520125d1f4eff4abdff0f4", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "85dda6e27754d94582869d39cba3241d9ea60b6aa4167f9c88e309dc687e56bb"}, "ex_brotli": {:hex, :ex_brotli, "0.3.0", "69d5f3720df70d5c89d1395d8fbe49ba37466b626834aaf6d77c72e0c93cf975", [:mix], [{:phoenix, ">= 0.0.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:rustler, "~> 0.29", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.6", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "8e46982f7d20069419ca8c8c54f9f3ebd9fa0e1d094c54cbf8ce3d636d84dfa7"}, @@ -22,10 +21,12 @@ "image": {:hex, :image, "0.42.0", "aa561f15b53c40ac571e7880083cecf1419ff405fc45dc95675c58aa308eaa22", [:mix], [{:bumblebee, "~> 0.3", [hex: :bumblebee, repo: "hexpm", optional: true]}, {:evision, "~> 0.1.33", [hex: :evision, repo: "hexpm", optional: true]}, {:exla, "~> 0.5", [hex: :exla, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: true]}, {:kino, "~> 0.7", [hex: :kino, repo: "hexpm", optional: true]}, {:nx, "~> 0.5", [hex: :nx, repo: "hexpm", optional: true]}, {:nx_image, "~> 0.1", [hex: :nx_image, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.1 or ~> 3.2 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: true]}, {:rustler, "> 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: false]}, {:vix, "~> 0.23", [hex: :vix, repo: "hexpm", optional: false]}], "hexpm", "19972043abadc40e2d77dc38fc57f52382859791f89a962b0f1425ae64262f7d"}, "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, "live_monaco_editor": {:hex, :live_monaco_editor, "0.1.8", "149c02cab1c595fe2d2049cffb0a424db2a329a5fa848ee8b778d5acd8694733", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.7", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.18", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "9a56e88a61cdf6d58081627e4842f4e3a8e3a75dd8749f271a464164ad4530f1"}, + "live_svelte": {:hex, :live_svelte, "0.12.0", "95f894b36e149dc897e63000d8fa779577a1c4b882c0df08ea42587ac14aae98", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:nodejs, "~> 2.0", [hex: :nodejs, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, ">= 3.3.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, ">= 0.18.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "4b86828187db41d832e35cda2b7f23efd2cfeba453525b4469b8c5709b0371e9"}, "mdex": {:hex, :mdex, "0.1.12", "bf56aa5dfc9b4bd51e98c38a7f57ae58c3a20f7b091287a121c1f5219b5d5824", [:mix], [{:rustler, "~> 0.29", [hex: :rustler, repo: "hexpm", optional: false]}, {:rustler_precompiled, "~> 0.6", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "9a0151217cf27055753a747ee3d6aa10609eaa5299d6c82ce1445d32035abbea"}, "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, "mix_test_watch": {:hex, :mix_test_watch, "1.1.0", "330bb91c8ed271fe408c42d07e0773340a7938d8a0d281d57a14243eae9dc8c3", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm", "52b6b1c476cbb70fd899ca5394506482f12e5f6b0d6acff9df95c7f1e0812ec3"}, "nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"}, + "nodejs": {:hex, :nodejs, "2.0.0", "9a00d00eabf84ba7a04269de46863e0f87bdf6bc488d5a20972b38ade9012764", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:poolboy, "~> 1.5.1", [hex: :poolboy, repo: "hexpm", optional: false]}], "hexpm", "3a03df7dbfba435223b4534fbf276db8be5287fbf83c828f2749bf1ffe73e930"}, "phoenix": {:hex, :phoenix, "1.7.11", "1d88fc6b05ab0c735b250932c4e6e33bfa1c186f76dcf623d8dd52f07d6379c7", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "b1ec57f2e40316b306708fe59b92a16b9f6f4bf50ccfa41aa8c7feb79e0ec02a"}, "phoenix_ecto": {:hex, :phoenix_ecto, "4.4.3", "86e9878f833829c3f66da03d75254c155d91d72a201eb56ae83482328dc7ca93", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d36c401206f3011fefd63d04e8ef626ec8791975d9d107f9a0817d426f61ac07"}, "phoenix_html": {:hex, :phoenix_html, "4.0.0", "4857ec2edaccd0934a923c2b0ba526c44a173c86b847e8db725172e9e51d11d6", [:mix], [], "hexpm", "cee794a052f243291d92fa3ccabcb4c29bb8d236f655fb03bcbdc3a8214b8d13"}, @@ -37,6 +38,7 @@ "plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"}, "plug_cowboy": {:hex, :plug_cowboy, "2.7.0", "3ae9369c60641084363b08fe90267cbdd316df57e3557ea522114b30b63256ea", [:mix], [{:cowboy, "~> 2.7.0 or ~> 2.8.0 or ~> 2.9.0 or ~> 2.10.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d85444fb8aa1f2fc62eabe83bbe387d81510d773886774ebdcb429b3da3c1a4a"}, "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, + "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"}, "postgrex": {:hex, :postgrex, "0.17.1", "01c29fd1205940ee55f7addb8f1dc25618ca63a8817e56fac4f6846fc2cddcbe", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "14b057b488e73be2beee508fb1955d8db90d6485c6466428fe9ccf1d6692a555"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "rustler": {:hex, :rustler, "0.30.0", "cefc49922132b072853fa9b0ca4dc2ffcb452f68fb73b779042b02d545e097fb", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:toml, "~> 0.6", [hex: :toml, repo: "hexpm", optional: false]}], "hexpm", "9ef1abb6a7dda35c47cfc649e6a5a61663af6cf842a55814a554a84607dee389"}, diff --git a/priv/static/beacon_live_admin.js b/priv/static/beacon_live_admin.js index 8aa22428..1c2d54e3 100644 --- a/priv/static/beacon_live_admin.js +++ b/priv/static/beacon_live_admin.js @@ -5,9 +5,21 @@ var BeaconLiveAdmin = (() => { var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; - var __commonJS = (cb, mod) => function __require() { + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] + }) : x)(function(x) { + if (typeof require !== "undefined") + return require.apply(this, arguments); + throw Error('Dynamic require of "' + x + '" is not supported'); + }); + var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; + var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); + }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) @@ -24,6 +36,10 @@ var BeaconLiveAdmin = (() => { isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); + var __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + return value; + }; // vendor/topbar.js var require_topbar = __commonJS({ @@ -38,7 +54,7 @@ var BeaconLiveAdmin = (() => { window2.cancelAnimationFrame = window2[vendors[x] + "CancelAnimationFrame"] || window2[vendors[x] + "CancelRequestAnimationFrame"]; } if (!window2.requestAnimationFrame) - window2.requestAnimationFrame = function(callback, element) { + window2.requestAnimationFrame = function(callback, element2) { var currTime = (/* @__PURE__ */ new Date()).getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window2.setTimeout(function() { @@ -84,10 +100,7 @@ var BeaconLiveAdmin = (() => { ctx.lineWidth = options.barThickness; ctx.beginPath(); ctx.moveTo(0, options.barThickness / 2); - ctx.lineTo( - Math.ceil(currentProgress * canvas.width), - options.barThickness / 2 - ); + ctx.lineTo(Math.ceil(currentProgress * canvas.width), options.barThickness / 2); ctx.strokeStyle = lineGradient; ctx.stroke(); }, createCanvas = function() { @@ -124,11 +137,10 @@ var BeaconLiveAdmin = (() => { canvas.style.display = "block"; topbar2.progress(0); if (options.autoRun) { - (function loop() { - progressTimerId = window2.requestAnimationFrame(loop); - topbar2.progress( - "+" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2) - ); + ; + (function loop2() { + progressTimerId = window2.requestAnimationFrame(loop2); + topbar2.progress("+" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2)); })(); } } @@ -153,7 +165,8 @@ var BeaconLiveAdmin = (() => { window2.cancelAnimationFrame(progressTimerId); progressTimerId = null; } - (function loop() { + ; + (function loop2() { if (topbar2.progress("+.1") >= 1) { canvas.style.opacity -= 0.05; if (canvas.style.opacity <= 0.05) { @@ -162,7 +175,7 @@ var BeaconLiveAdmin = (() => { return; } } - fadeTimerId = window2.requestAnimationFrame(loop); + fadeTimerId = window2.requestAnimationFrame(loop2); })(); } }; @@ -421,8 +434,8 @@ var BeaconLiveAdmin = (() => { if (isEmpty(initial)) errorHandler("initialContent"); } - function throwError(errorMessages3, type) { - throw new Error(errorMessages3[type] || errorMessages3["default"]); + function throwError(errorMessages32, type) { + throw new Error(errorMessages32[type] || errorMessages32["default"]); } var errorMessages = { initialIsRequired: "initial state is required", @@ -450,20 +463,20 @@ var BeaconLiveAdmin = (() => { current: initial }; var didUpdate = curry(didStateUpdate)(state, handler); - var update = curry(updateState)(state); + var update2 = curry(updateState)(state); var validate = curry(validators.changes)(initial); var getChanges = curry(extractChanges)(state); - function getState2() { + function getState22() { var selector = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(state2) { return state2; }; validators.selector(selector); return selector(state.current); } - function setState2(causedChanges) { - compose(didUpdate, update, validate, getChanges)(causedChanges); + function setState22(causedChanges) { + compose(didUpdate, update2, validate, getChanges)(causedChanges); } - return [getState2, setState2]; + return [getState22, setState22]; } function extractChanges(state, causedChanges) { return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges; @@ -508,26 +521,26 @@ var BeaconLiveAdmin = (() => { return {}.toString.call(value).includes("Object"); } var isObject_default = isObject2; - function validateConfig(config3) { - if (!config3) + function validateConfig(config32) { + if (!config32) errorHandler2("configIsRequired"); - if (!isObject_default(config3)) + if (!isObject_default(config32)) errorHandler2("configType"); - if (config3.urls) { + if (config32.urls) { informAboutDeprecation(); return { paths: { - vs: config3.urls.monacoBase + vs: config32.urls.monacoBase } }; } - return config3; + return config32; } function informAboutDeprecation() { console.warn(errorMessages2.deprecation); } - function throwError2(errorMessages3, type) { - throw new Error(errorMessages3[type] || errorMessages3["default"]); + function throwError2(errorMessages32, type) { + throw new Error(errorMessages32[type] || errorMessages32["default"]); } var errorMessages2 = { configIsRequired: "the configuration object is required", @@ -566,13 +579,13 @@ var BeaconLiveAdmin = (() => { type: "cancelation", msg: "operation is manually canceled" }; - function makeCancelable(promise) { + function makeCancelable(promise2) { var hasCanceled_ = false; var wrappedPromise = new Promise(function(resolve, reject) { - promise.then(function(val) { + promise2.then(function(val) { return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val); }); - promise["catch"](reject); + promise2["catch"](reject); }); return wrappedPromise.cancel = function() { return hasCanceled_ = true; @@ -590,10 +603,10 @@ var BeaconLiveAdmin = (() => { var getState = _state$create2[0]; var setState = _state$create2[1]; function config2(globalConfig) { - var _validators$config = validators_default.config(globalConfig), monaco = _validators$config.monaco, config3 = _objectWithoutProperties(_validators$config, ["monaco"]); + var _validators$config = validators_default.config(globalConfig), monaco = _validators$config.monaco, config32 = _objectWithoutProperties(_validators$config, ["monaco"]); setState(function(state) { return { - config: deepMerge_default(state.config, config3), + config: deepMerge_default(state.config, config32), monaco }; }); @@ -631,26 +644,26 @@ var BeaconLiveAdmin = (() => { var script = document.createElement("script"); return src && (script.src = src), script; } - function getMonacoLoaderScript(configureLoader2) { + function getMonacoLoaderScript(configureLoader22) { var state = getState(function(_ref2) { - var config3 = _ref2.config, reject = _ref2.reject; + var config32 = _ref2.config, reject = _ref2.reject; return { - config: config3, + config: config32, reject }; }); var loaderScript = createScript("".concat(state.config.paths.vs, "/loader.js")); loaderScript.onload = function() { - return configureLoader2(); + return configureLoader22(); }; loaderScript.onerror = state.reject; return loaderScript; } function configureLoader() { var state = getState(function(_ref3) { - var config3 = _ref3.config, resolve = _ref3.resolve, reject = _ref3.reject; + var config32 = _ref3.config, resolve = _ref3.resolve, reject = _ref3.reject; return { - config: config3, + config: config32, resolve, reject }; @@ -917,48 +930,11786 @@ var BeaconLiveAdmin = (() => { } }; - // js/beacon_live_admin.js - var Hooks = {}; - Hooks.CodeEditorHook = CodeEditorHook; - import_topbar.default.config({ barColors: { 0: "#29d" }, shadowColor: "rgba(0, 0, 0, .3)" }); - window.addEventListener("phx:page-loading-start", (_event) => { - import_topbar.default.show(300); + // ../deps/live_svelte/priv/static/live_svelte.esm.js + function normalizeComponents(components) { + if (!Array.isArray(components.default) || !Array.isArray(components.filenames)) + return components; + const normalized = {}; + for (const [index3, module] of components.default.entries()) { + const Component = module.default; + const name = components.filenames[index3].replace("../svelte/", "").replace(".svelte", ""); + normalized[name] = Component; + } + return normalized; + } + function getAttributeJson(ref, attributeName) { + const data = ref.el.getAttribute(attributeName); + return data ? JSON.parse(data) : {}; + } + function detach(node) { + node.parentNode?.removeChild(node); + } + function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + function noop() { + } + function getSlots(ref) { + const slots = {}; + for (const slotName in getAttributeJson(ref, "data-slots")) { + const slot = () => { + return { + getElement() { + const base64 = getAttributeJson(ref, "data-slots")[slotName]; + const element2 = document.createElement("div"); + element2.innerHTML = atob(base64).trim(); + return element2; + }, + update() { + detach(this.savedElement); + this.savedElement = this.getElement(); + insert(this.savedTarget, this.savedElement, this.savedAnchor); + }, + c: noop, + m(target, anchor) { + this.savedTarget = target; + this.savedAnchor = anchor; + this.savedElement = this.getElement(); + insert(this.savedTarget, this.savedElement, this.savedAnchor); + }, + d(detaching) { + if (detaching) + detach(this.savedElement); + }, + l: noop + }; + }; + slots[slotName] = [slot]; + } + return slots; + } + function getLiveJsonProps(ref) { + const json = getAttributeJson(ref, "data-live-json"); + if (!Array.isArray(json)) + return json; + const liveJsonData = {}; + for (const liveJsonVariable of json) { + const data = window[liveJsonVariable]; + if (data) + liveJsonData[liveJsonVariable] = data; + } + return liveJsonData; + } + function getProps(ref) { + return { + ...getAttributeJson(ref, "data-props"), + ...getLiveJsonProps(ref), + live: ref, + $$slots: getSlots(ref), + $$scope: {} + }; + } + function findSlotCtx(component) { + return component.$$.ctx.find((ctxElement) => ctxElement?.default); + } + function getHooks(components) { + components = normalizeComponents(components); + const SvelteHook = { + mounted() { + const componentName = this.el.getAttribute("data-name"); + if (!componentName) { + throw new Error("Component name must be provided"); + } + const Component = components[componentName]; + if (!Component) { + throw new Error(`Unable to find ${componentName} component.`); + } + for (const liveJsonElement of Object.keys(getAttributeJson(this, "data-live-json"))) { + window.addEventListener(`${liveJsonElement}_initialized`, (event) => this._instance.$set(getProps(this)), false); + window.addEventListener(`${liveJsonElement}_patched`, (event) => this._instance.$set(getProps(this)), false); + } + this._instance = new Component({ + target: this.el, + props: getProps(this), + hydrate: this.el.hasAttribute("data-ssr") + }); + }, + updated() { + this._instance.$set(getProps(this)); + const slotCtx = findSlotCtx(this._instance); + for (const key in slotCtx) { + slotCtx[key][0]().update(); + } + }, + destroyed() { + } + }; + return { + SvelteHook + }; + } + + // import-glob:../svelte/**/*.svelte + var __exports = {}; + __export(__exports, { + default: () => __default, + filenames: () => filenames }); - window.addEventListener("phx:page-loading-stop", (_event) => { - import_topbar.default.hide(); + + // svelte/components/Backdrop.svelte + var Backdrop_exports = {}; + __export(Backdrop_exports, { + backdropVisible: () => backdropVisible, + default: () => Backdrop_default }); - window.addEventListener("beacon_admin:clipcopy", (event) => { - const result_id = `${event.target.id}-copy-to-clipboard-result`; - const el = document.getElementById(result_id); - if ("clipboard" in navigator) { - if (event.target.tagName === "INPUT") { - txt = event.target.value; + + // node_modules/svelte/src/runtime/internal/utils.js + function noop2() { + } + var identity = (x) => x; + function assign(tar, src) { + for (const k in src) + tar[k] = src[k]; + return ( + /** @type {T & S} */ + tar + ); + } + function add_location(element2, file13, line, column, char) { + element2.__svelte_meta = { + loc: { file: file13, line, column, char } + }; + } + function run(fn) { + return fn(); + } + function blank_object() { + return /* @__PURE__ */ Object.create(null); + } + function run_all(fns) { + fns.forEach(run); + } + function is_function(thing) { + return typeof thing === "function"; + } + function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || a && typeof a === "object" || typeof a === "function"; + } + var src_url_equal_anchor; + function src_url_equal(element_src, url) { + if (element_src === url) + return true; + if (!src_url_equal_anchor) { + src_url_equal_anchor = document.createElement("a"); + } + src_url_equal_anchor.href = url; + return element_src === src_url_equal_anchor.href; + } + function is_empty(obj) { + return Object.keys(obj).length === 0; + } + function validate_store(store, name) { + if (store != null && typeof store.subscribe !== "function") { + throw new Error(`'${name}' is not a store with a 'subscribe' method`); + } + } + function subscribe(store, ...callbacks) { + if (store == null) { + for (const callback of callbacks) { + callback(void 0); + } + return noop2; + } + const unsub = store.subscribe(...callbacks); + return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; + } + function get_store_value(store) { + let value; + subscribe(store, (_) => value = _)(); + return value; + } + function component_subscribe(component, store, callback) { + component.$$.on_destroy.push(subscribe(store, callback)); + } + function create_slot(definition, ctx, $$scope, fn) { + if (definition) { + const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); + return definition[0](slot_ctx); + } + } + function get_slot_context(definition, ctx, $$scope, fn) { + return definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx; + } + function get_slot_changes(definition, $$scope, dirty, fn) { + if (definition[2] && fn) { + const lets = definition[2](fn(dirty)); + if ($$scope.dirty === void 0) { + return lets; + } + if (typeof lets === "object") { + const merged = []; + const len = Math.max($$scope.dirty.length, lets.length); + for (let i = 0; i < len; i += 1) { + merged[i] = $$scope.dirty[i] | lets[i]; + } + return merged; + } + return $$scope.dirty | lets; + } + return $$scope.dirty; + } + function update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) { + if (slot_changes) { + const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); + slot.p(slot_context, slot_changes); + } + } + function get_all_dirty_from_scope($$scope) { + if ($$scope.ctx.length > 32) { + const dirty = []; + const length = $$scope.ctx.length / 32; + for (let i = 0; i < length; i++) { + dirty[i] = -1; + } + return dirty; + } + return -1; + } + function compute_slots(slots) { + const result = {}; + for (const key in slots) { + result[key] = true; + } + return result; + } + function set_store_value(store, ret, value) { + store.set(value); + return ret; + } + function action_destroyer(action_result) { + return action_result && is_function(action_result.destroy) ? action_result.destroy : noop2; + } + + // node_modules/svelte/src/runtime/internal/environment.js + var is_client = typeof window !== "undefined"; + var now = is_client ? () => window.performance.now() : () => Date.now(); + var raf = is_client ? (cb) => requestAnimationFrame(cb) : noop2; + + // node_modules/svelte/src/runtime/internal/loop.js + var tasks = /* @__PURE__ */ new Set(); + function run_tasks(now2) { + tasks.forEach((task) => { + if (!task.c(now2)) { + tasks.delete(task); + task.f(); + } + }); + if (tasks.size !== 0) + raf(run_tasks); + } + function loop(callback) { + let task; + if (tasks.size === 0) + raf(run_tasks); + return { + promise: new Promise((fulfill) => { + tasks.add(task = { c: callback, f: fulfill }); + }), + abort() { + tasks.delete(task); + } + }; + } + + // node_modules/svelte/src/runtime/internal/globals.js + var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : ( + // @ts-ignore Node typings have this + global + ); + + // node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js + var ResizeObserverSingleton = class _ResizeObserverSingleton { + /** @param {ResizeObserverOptions} options */ + constructor(options) { + /** + * @private + * @readonly + * @type {WeakMap} + */ + __publicField(this, "_listeners", "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0); + /** + * @private + * @type {ResizeObserver} + */ + __publicField(this, "_observer"); + /** @type {ResizeObserverOptions} */ + __publicField(this, "options"); + this.options = options; + } + /** + * @param {Element} element + * @param {import('./private.js').Listener} listener + * @returns {() => void} + */ + observe(element2, listener) { + this._listeners.set(element2, listener); + this._getObserver().observe(element2, this.options); + return () => { + this._listeners.delete(element2); + this._observer.unobserve(element2); + }; + } + /** + * @private + */ + _getObserver() { + return this._observer ?? (this._observer = new ResizeObserver((entries) => { + for (const entry of entries) { + _ResizeObserverSingleton.entries.set(entry.target, entry); + this._listeners.get(entry.target)?.(entry); + } + })); + } + }; + ResizeObserverSingleton.entries = "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0; + + // node_modules/svelte/src/runtime/internal/dom.js + var is_hydrating = false; + function start_hydrating() { + is_hydrating = true; + } + function end_hydrating() { + is_hydrating = false; + } + function upper_bound(low, high, key, value) { + while (low < high) { + const mid = low + (high - low >> 1); + if (key(mid) <= value) { + low = mid + 1; } else { - txt = event.target.textContent; + high = mid; } - navigator.clipboard.writeText(txt).then(() => { - el.innerText = "Copied to clipboard"; - el.classList.remove("invisible", "text-red-500", "opacity-0"); - el.classList.add("text-green-500", "opacity-100", "-translate-y-2"); - setTimeout(function() { - el.classList.remove("text-green-500", "opacity-100", "-translate-y-2"); - el.classList.add("invisible", "text-red-500", "opacity-0"); - }, 2e3); - }).catch(() => { - el.innerText = "Could not copy"; - el.classList.remove("invisible", "text-green-500", "opacity-0"); - el.classList.add("text-red-500", "opacity-100", "-translate-y-2"); - }); + } + return low; + } + function init_hydrate(target) { + if (target.hydrate_init) + return; + target.hydrate_init = true; + let children2 = ( + /** @type {ArrayLike} */ + target.childNodes + ); + if (target.nodeName === "HEAD") { + const my_children = []; + for (let i = 0; i < children2.length; i++) { + const node = children2[i]; + if (node.claim_order !== void 0) { + my_children.push(node); + } + } + children2 = my_children; + } + const m = new Int32Array(children2.length + 1); + const p = new Int32Array(children2.length); + m[0] = -1; + let longest = 0; + for (let i = 0; i < children2.length; i++) { + const current = children2[i].claim_order; + const seq_len = (longest > 0 && children2[m[longest]].claim_order <= current ? longest + 1 : upper_bound(1, longest, (idx) => children2[m[idx]].claim_order, current)) - 1; + p[i] = m[seq_len] + 1; + const new_len = seq_len + 1; + m[new_len] = i; + longest = Math.max(new_len, longest); + } + const lis = []; + const to_move = []; + let last = children2.length - 1; + for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) { + lis.push(children2[cur - 1]); + for (; last >= cur; last--) { + to_move.push(children2[last]); + } + last--; + } + for (; last >= 0; last--) { + to_move.push(children2[last]); + } + lis.reverse(); + to_move.sort((a, b) => a.claim_order - b.claim_order); + for (let i = 0, j = 0; i < to_move.length; i++) { + while (j < lis.length && to_move[i].claim_order >= lis[j].claim_order) { + j++; + } + const anchor = j < lis.length ? lis[j] : null; + target.insertBefore(to_move[i], anchor); + } + } + function append(target, node) { + target.appendChild(node); + } + function append_styles(target, style_sheet_id, styles) { + const append_styles_to = get_root_for_style(target); + if (!append_styles_to.getElementById(style_sheet_id)) { + const style = element("style"); + style.id = style_sheet_id; + style.textContent = styles; + append_stylesheet(append_styles_to, style); + } + } + function get_root_for_style(node) { + if (!node) + return document; + const root = node.getRootNode ? node.getRootNode() : node.ownerDocument; + if (root && /** @type {ShadowRoot} */ + root.host) { + return ( + /** @type {ShadowRoot} */ + root + ); + } + return node.ownerDocument; + } + function append_empty_stylesheet(node) { + const style_element = element("style"); + style_element.textContent = "/* empty */"; + append_stylesheet(get_root_for_style(node), style_element); + return style_element.sheet; + } + function append_stylesheet(node, style) { + append( + /** @type {Document} */ + node.head || node, + style + ); + return style.sheet; + } + function append_hydration(target, node) { + if (is_hydrating) { + init_hydrate(target); + if (target.actual_end_child === void 0 || target.actual_end_child !== null && target.actual_end_child.parentNode !== target) { + target.actual_end_child = target.firstChild; + } + while (target.actual_end_child !== null && target.actual_end_child.claim_order === void 0) { + target.actual_end_child = target.actual_end_child.nextSibling; + } + if (node !== target.actual_end_child) { + if (node.claim_order !== void 0 || node.parentNode !== target) { + target.insertBefore(node, target.actual_end_child); + } + } else { + target.actual_end_child = node.nextSibling; + } + } else if (node.parentNode !== target || node.nextSibling !== null) { + target.appendChild(node); + } + } + function insert2(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + function insert_hydration(target, node, anchor) { + if (is_hydrating && !anchor) { + append_hydration(target, node); + } else if (node.parentNode !== target || node.nextSibling != anchor) { + target.insertBefore(node, anchor || null); + } + } + function detach2(node) { + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) + iterations[i].d(detaching); + } + } + function element(name) { + return document.createElement(name); + } + function svg_element(name) { + return document.createElementNS("http://www.w3.org/2000/svg", name); + } + function text(data) { + return document.createTextNode(data); + } + function space() { + return text(" "); + } + function empty() { + return text(""); + } + function listen(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); + } + function prevent_default(fn) { + return function(event) { + event.preventDefault(); + return fn.call(this, event); + }; + } + function stop_propagation(fn) { + return function(event) { + event.stopPropagation(); + return fn.call(this, event); + }; + } + function attr(node, attribute, value) { + if (value == null) + node.removeAttribute(attribute); + else if (node.getAttribute(attribute) !== value) + node.setAttribute(attribute, value); + } + var always_set_through_set_attribute = ["width", "height"]; + function set_attributes(node, attributes) { + const descriptors = Object.getOwnPropertyDescriptors(node.__proto__); + for (const key in attributes) { + if (attributes[key] == null) { + node.removeAttribute(key); + } else if (key === "style") { + node.style.cssText = attributes[key]; + } else if (key === "__value") { + node.value = node[key] = attributes[key]; + } else if (descriptors[key] && descriptors[key].set && always_set_through_set_attribute.indexOf(key) === -1) { + node[key] = attributes[key]; + } else { + attr(node, key, attributes[key]); + } + } + } + function set_custom_element_data_map(node, data_map) { + Object.keys(data_map).forEach((key) => { + set_custom_element_data(node, key, data_map[key]); + }); + } + function set_custom_element_data(node, prop, value) { + const lower = prop.toLowerCase(); + if (lower in node) { + node[lower] = typeof node[lower] === "boolean" && value === "" ? true : value; + } else if (prop in node) { + node[prop] = typeof node[prop] === "boolean" && value === "" ? true : value; + } else { + attr(node, prop, value); + } + } + function set_dynamic_element_data(tag) { + return /-/.test(tag) ? set_custom_element_data_map : set_attributes; + } + function get_svelte_dataset(node) { + return node.dataset.svelteH; + } + function children(element2) { + return Array.from(element2.childNodes); + } + function init_claim_info(nodes) { + if (nodes.claim_info === void 0) { + nodes.claim_info = { last_index: 0, total_claimed: 0 }; + } + } + function claim_node(nodes, predicate, process_node, create_node, dont_update_last_index = false) { + init_claim_info(nodes); + const result_node = (() => { + for (let i = nodes.claim_info.last_index; i < nodes.length; i++) { + const node = nodes[i]; + if (predicate(node)) { + const replacement = process_node(node); + if (replacement === void 0) { + nodes.splice(i, 1); + } else { + nodes[i] = replacement; + } + if (!dont_update_last_index) { + nodes.claim_info.last_index = i; + } + return node; + } + } + for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) { + const node = nodes[i]; + if (predicate(node)) { + const replacement = process_node(node); + if (replacement === void 0) { + nodes.splice(i, 1); + } else { + nodes[i] = replacement; + } + if (!dont_update_last_index) { + nodes.claim_info.last_index = i; + } else if (replacement === void 0) { + nodes.claim_info.last_index--; + } + return node; + } + } + return create_node(); + })(); + result_node.claim_order = nodes.claim_info.total_claimed; + nodes.claim_info.total_claimed += 1; + return result_node; + } + function claim_element_base(nodes, name, attributes, create_element) { + return claim_node( + nodes, + /** @returns {node is Element | SVGElement} */ + (node) => node.nodeName === name, + /** @param {Element} node */ + (node) => { + const remove = []; + for (let j = 0; j < node.attributes.length; j++) { + const attribute = node.attributes[j]; + if (!attributes[attribute.name]) { + remove.push(attribute.name); + } + } + remove.forEach((v) => node.removeAttribute(v)); + return void 0; + }, + () => create_element(name) + ); + } + function claim_element(nodes, name, attributes) { + return claim_element_base(nodes, name, attributes, element); + } + function claim_svg_element(nodes, name, attributes) { + return claim_element_base(nodes, name, attributes, svg_element); + } + function claim_text(nodes, data) { + return claim_node( + nodes, + /** @returns {node is Text} */ + (node) => node.nodeType === 3, + /** @param {Text} node */ + (node) => { + const data_str = "" + data; + if (node.data.startsWith(data_str)) { + if (node.data.length !== data_str.length) { + return node.splitText(data_str.length); + } + } else { + node.data = data_str; + } + }, + () => text(data), + true + // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements + ); + } + function claim_space(nodes) { + return claim_text(nodes, " "); + } + function get_comment_idx(nodes, text2, start) { + for (let i = start; i < nodes.length; i += 1) { + const node = nodes[i]; + if (node.nodeType === 8 && node.textContent.trim() === text2) { + return i; + } + } + return -1; + } + function claim_html_tag(nodes, is_svg) { + const start_index = get_comment_idx(nodes, "HTML_TAG_START", 0); + const end_index = get_comment_idx(nodes, "HTML_TAG_END", start_index + 1); + if (start_index === -1 || end_index === -1) { + return new HtmlTagHydration(is_svg); + } + init_claim_info(nodes); + const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1); + detach2(html_tag_nodes[0]); + detach2(html_tag_nodes[html_tag_nodes.length - 1]); + const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1); + if (claimed_nodes.length === 0) { + return new HtmlTagHydration(is_svg); + } + for (const n of claimed_nodes) { + n.claim_order = nodes.claim_info.total_claimed; + nodes.claim_info.total_claimed += 1; + } + return new HtmlTagHydration(is_svg, claimed_nodes); + } + function set_style(node, key, value, important) { + if (value == null) { + node.style.removeProperty(key); } else { - alert( - "Sorry, your browser does not support clipboard copy." + node.style.setProperty(key, value, important ? "important" : ""); + } + } + function toggle_class(element2, name, toggle) { + element2.classList.toggle(name, !!toggle); + } + function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) { + return new CustomEvent(type, { detail, bubbles, cancelable }); + } + var HtmlTag = class { + constructor(is_svg = false) { + /** + * @private + * @default false + */ + __publicField(this, "is_svg", false); + /** parent for creating node */ + __publicField(this, "e"); + /** html tag nodes */ + __publicField(this, "n"); + /** target */ + __publicField(this, "t"); + /** anchor */ + __publicField(this, "a"); + this.is_svg = is_svg; + this.e = this.n = null; + } + /** + * @param {string} html + * @returns {void} + */ + c(html) { + this.h(html); + } + /** + * @param {string} html + * @param {HTMLElement | SVGElement} target + * @param {HTMLElement | SVGElement} anchor + * @returns {void} + */ + m(html, target, anchor = null) { + if (!this.e) { + if (this.is_svg) + this.e = svg_element( + /** @type {keyof SVGElementTagNameMap} */ + target.nodeName + ); + else + this.e = element( + /** @type {keyof HTMLElementTagNameMap} */ + target.nodeType === 11 ? "TEMPLATE" : target.nodeName + ); + this.t = target.tagName !== "TEMPLATE" ? target : ( + /** @type {HTMLTemplateElement} */ + target.content + ); + this.c(html); + } + this.i(anchor); + } + /** + * @param {string} html + * @returns {void} + */ + h(html) { + this.e.innerHTML = html; + this.n = Array.from( + this.e.nodeName === "TEMPLATE" ? this.e.content.childNodes : this.e.childNodes ); } + /** + * @returns {void} */ + i(anchor) { + for (let i = 0; i < this.n.length; i += 1) { + insert2(this.t, this.n[i], anchor); + } + } + /** + * @param {string} html + * @returns {void} + */ + p(html) { + this.d(); + this.h(html); + this.i(this.a); + } + /** + * @returns {void} */ + d() { + this.n.forEach(detach2); + } + }; + var HtmlTagHydration = class extends HtmlTag { + constructor(is_svg = false, claimed_nodes) { + super(is_svg); + /** @type {Element[]} hydration claimed nodes */ + __publicField(this, "l"); + this.e = this.n = null; + this.l = claimed_nodes; + } + /** + * @param {string} html + * @returns {void} + */ + c(html) { + if (this.l) { + this.n = this.l; + } else { + super.c(html); + } + } + /** + * @returns {void} */ + i(anchor) { + for (let i = 0; i < this.n.length; i += 1) { + insert_hydration(this.t, this.n[i], anchor); + } + } + }; + function get_custom_elements_slots(element2) { + const result = {}; + element2.childNodes.forEach( + /** @param {Element} node */ + (node) => { + result[node.slot || "default"] = true; + } + ); + return result; + } + + // node_modules/svelte/src/runtime/internal/style_manager.js + var managed_styles = /* @__PURE__ */ new Map(); + var active = 0; + function hash(str) { + let hash2 = 5381; + let i = str.length; + while (i--) + hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i); + return hash2 >>> 0; + } + function create_style_information(doc, node) { + const info = { stylesheet: append_empty_stylesheet(node), rules: {} }; + managed_styles.set(doc, info); + return info; + } + function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { + const step = 16.666 / duration; + let keyframes = "{\n"; + for (let p = 0; p <= 1; p += step) { + const t = a + (b - a) * ease(p); + keyframes += p * 100 + `%{${fn(t, 1 - t)}} +`; + } + const rule = keyframes + `100% {${fn(b, 1 - b)}} +}`; + const name = `__svelte_${hash(rule)}_${uid}`; + const doc = get_root_for_style(node); + const { stylesheet, rules: rules2 } = managed_styles.get(doc) || create_style_information(doc, node); + if (!rules2[name]) { + rules2[name] = true; + stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); + } + const animation = node.style.animation || ""; + node.style.animation = `${animation ? `${animation}, ` : ""}${name} ${duration}ms linear ${delay}ms 1 both`; + active += 1; + return name; + } + function delete_rule(node, name) { + const previous = (node.style.animation || "").split(", "); + const next = previous.filter( + name ? (anim) => anim.indexOf(name) < 0 : (anim) => anim.indexOf("__svelte") === -1 + // remove all Svelte animations + ); + const deleted = previous.length - next.length; + if (deleted) { + node.style.animation = next.join(", "); + active -= deleted; + if (!active) + clear_rules(); + } + } + function clear_rules() { + raf(() => { + if (active) + return; + managed_styles.forEach((info) => { + const { ownerNode } = info.stylesheet; + if (ownerNode) + detach2(ownerNode); + }); + managed_styles.clear(); + }); + } + + // node_modules/svelte/src/runtime/internal/lifecycle.js + var current_component; + function set_current_component(component) { + current_component = component; + } + function get_current_component() { + if (!current_component) + throw new Error("Function called outside component initialization"); + return current_component; + } + function onMount(fn) { + get_current_component().$$.on_mount.push(fn); + } + function onDestroy(fn) { + get_current_component().$$.on_destroy.push(fn); + } + function createEventDispatcher() { + const component = get_current_component(); + return (type, detail, { cancelable = false } = {}) => { + const callbacks = component.$$.callbacks[type]; + if (callbacks) { + const event = custom_event( + /** @type {string} */ + type, + detail, + { cancelable } + ); + callbacks.slice().forEach((fn) => { + fn.call(component, event); + }); + return !event.defaultPrevented; + } + return true; + }; + } + + // node_modules/svelte/src/runtime/internal/scheduler.js + var dirty_components = []; + var binding_callbacks = []; + var render_callbacks = []; + var flush_callbacks = []; + var resolved_promise = /* @__PURE__ */ Promise.resolve(); + var update_scheduled = false; + function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } + } + function tick() { + schedule_update(); + return resolved_promise; + } + function add_render_callback(fn) { + render_callbacks.push(fn); + } + var seen_callbacks = /* @__PURE__ */ new Set(); + var flushidx = 0; + function flush() { + if (flushidx !== 0) { + return; + } + const saved_component = current_component; + do { + try { + while (flushidx < dirty_components.length) { + const component = dirty_components[flushidx]; + flushidx++; + set_current_component(component); + update(component.$$); + } + } catch (e) { + dirty_components.length = 0; + flushidx = 0; + throw e; + } + set_current_component(null); + dirty_components.length = 0; + flushidx = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + seen_callbacks.clear(); + set_current_component(saved_component); + } + function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } + } + function flush_render_callbacks(fns) { + const filtered = []; + const targets = []; + render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)); + targets.forEach((c) => c()); + render_callbacks = filtered; + } + + // node_modules/svelte/src/runtime/internal/transitions.js + var promise; + function wait() { + if (!promise) { + promise = Promise.resolve(); + promise.then(() => { + promise = null; + }); + } + return promise; + } + function dispatch(node, direction, kind) { + node.dispatchEvent(custom_event(`${direction ? "intro" : "outro"}${kind}`)); + } + var outroing = /* @__PURE__ */ new Set(); + var outros; + function group_outros() { + outros = { + r: 0, + c: [], + p: outros + // parent group + }; + } + function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; + } + function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } + } + function transition_out(block, local, detach3, callback) { + if (block && block.o) { + if (outroing.has(block)) + return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach3) + block.d(1); + callback(); + } + }); + block.o(local); + } else if (callback) { + callback(); + } + } + var null_transition = { duration: 0 }; + function create_bidirectional_transition(node, fn, params, intro) { + const options = { direction: "both" }; + let config5 = fn(node, params, options); + let t = intro ? 0 : 1; + let running_program = null; + let pending_program = null; + let animation_name = null; + let original_inert_value; + function clear_animation() { + if (animation_name) + delete_rule(node, animation_name); + } + function init4(program, duration) { + const d = ( + /** @type {Program['d']} */ + program.b - t + ); + duration *= Math.abs(d); + return { + a: t, + b: program.b, + d, + duration, + start: program.start, + end: program.start + duration, + group: program.group + }; + } + function go(b) { + const { + delay = 0, + duration = 300, + easing = identity, + tick: tick2 = noop2, + css + } = config5 || null_transition; + const program = { + start: now() + delay, + b + }; + if (!b) { + program.group = outros; + outros.r += 1; + } + if ("inert" in node) { + if (b) { + if (original_inert_value !== void 0) { + node.inert = original_inert_value; + } + } else { + original_inert_value = /** @type {HTMLElement} */ + node.inert; + node.inert = true; + } + } + if (running_program || pending_program) { + pending_program = program; + } else { + if (css) { + clear_animation(); + animation_name = create_rule(node, t, b, duration, delay, easing, css); + } + if (b) + tick2(0, 1); + running_program = init4(program, duration); + add_render_callback(() => dispatch(node, b, "start")); + loop((now2) => { + if (pending_program && now2 > pending_program.start) { + running_program = init4(pending_program, duration); + pending_program = null; + dispatch(node, running_program.b, "start"); + if (css) { + clear_animation(); + animation_name = create_rule( + node, + t, + running_program.b, + running_program.duration, + 0, + easing, + config5.css + ); + } + } + if (running_program) { + if (now2 >= running_program.end) { + tick2(t = running_program.b, 1 - t); + dispatch(node, running_program.b, "end"); + if (!pending_program) { + if (running_program.b) { + clear_animation(); + } else { + if (!--running_program.group.r) + run_all(running_program.group.c); + } + } + running_program = null; + } else if (now2 >= running_program.start) { + const p = now2 - running_program.start; + t = running_program.a + running_program.d * easing(p / running_program.duration); + tick2(t, 1 - t); + } + } + return !!(running_program || pending_program); + }); + } + } + return { + run(b) { + if (is_function(config5)) { + wait().then(() => { + const opts = { direction: b ? "in" : "out" }; + config5 = config5(opts); + go(b); + }); + } else { + go(b); + } + }, + end() { + clear_animation(); + running_program = pending_program = null; + } + }; + } + + // node_modules/svelte/src/runtime/internal/each.js + function ensure_array_like(array_like_or_iterator) { + return array_like_or_iterator?.length !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator); + } + function outro_and_destroy_block(block, lookup) { + transition_out(block, 1, 1, () => { + lookup.delete(block.key); + }); + } + function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block7, next, get_context) { + let o = old_blocks.length; + let n = list.length; + let i = o; + const old_indexes = {}; + while (i--) + old_indexes[old_blocks[i].key] = i; + const new_blocks = []; + const new_lookup = /* @__PURE__ */ new Map(); + const deltas = /* @__PURE__ */ new Map(); + const updates = []; + i = n; + while (i--) { + const child_ctx = get_context(ctx, list, i); + const key = get_key(child_ctx); + let block = lookup.get(key); + if (!block) { + block = create_each_block7(key, child_ctx); + block.c(); + } else if (dynamic) { + updates.push(() => block.p(child_ctx, dirty)); + } + new_lookup.set(key, new_blocks[i] = block); + if (key in old_indexes) + deltas.set(key, Math.abs(i - old_indexes[key])); + } + const will_move = /* @__PURE__ */ new Set(); + const did_move = /* @__PURE__ */ new Set(); + function insert3(block) { + transition_in(block, 1); + block.m(node, next); + lookup.set(block.key, block); + next = block.first; + n--; + } + while (o && n) { + const new_block = new_blocks[n - 1]; + const old_block = old_blocks[o - 1]; + const new_key = new_block.key; + const old_key = old_block.key; + if (new_block === old_block) { + next = new_block.first; + o--; + n--; + } else if (!new_lookup.has(old_key)) { + destroy(old_block, lookup); + o--; + } else if (!lookup.has(new_key) || will_move.has(new_key)) { + insert3(new_block); + } else if (did_move.has(old_key)) { + o--; + } else if (deltas.get(new_key) > deltas.get(old_key)) { + did_move.add(new_key); + insert3(new_block); + } else { + will_move.add(old_key); + o--; + } + } + while (o--) { + const old_block = old_blocks[o]; + if (!new_lookup.has(old_block.key)) + destroy(old_block, lookup); + } + while (n) + insert3(new_blocks[n - 1]); + run_all(updates); + return new_blocks; + } + function validate_each_keys(ctx, list, get_context, get_key) { + const keys = /* @__PURE__ */ new Map(); + for (let i = 0; i < list.length; i++) { + const key = get_key(get_context(ctx, list, i)); + if (keys.has(key)) { + let value = ""; + try { + value = `with value '${String(key)}' `; + } catch (e) { + } + throw new Error( + `Cannot have duplicate keys in a keyed each: Keys at index ${keys.get( + key + )} and ${i} ${value}are duplicates` + ); + } + keys.set(key, i); + } + } + + // node_modules/svelte/src/runtime/internal/spread.js + function get_spread_update(levels, updates) { + const update2 = {}; + const to_null_out = {}; + const accounted_for = { $$scope: 1 }; + let i = levels.length; + while (i--) { + const o = levels[i]; + const n = updates[i]; + if (n) { + for (const key in o) { + if (!(key in n)) + to_null_out[key] = 1; + } + for (const key in n) { + if (!accounted_for[key]) { + update2[key] = n[key]; + accounted_for[key] = 1; + } + } + levels[i] = n; + } else { + for (const key in o) { + accounted_for[key] = 1; + } + } + } + for (const key in to_null_out) { + if (!(key in update2)) + update2[key] = void 0; + } + return update2; + } + + // node_modules/svelte/src/shared/boolean_attributes.js + var _boolean_attributes = ( + /** @type {const} */ + [ + "allowfullscreen", + "allowpaymentrequest", + "async", + "autofocus", + "autoplay", + "checked", + "controls", + "default", + "defer", + "disabled", + "formnovalidate", + "hidden", + "inert", + "ismap", + "loop", + "multiple", + "muted", + "nomodule", + "novalidate", + "open", + "playsinline", + "readonly", + "required", + "reversed", + "selected" + ] + ); + var boolean_attributes = /* @__PURE__ */ new Set([..._boolean_attributes]); + + // node_modules/svelte/src/shared/utils/names.js + var void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/; + function is_void(name) { + return void_element_names.test(name) || name.toLowerCase() === "!doctype"; + } + + // node_modules/svelte/src/runtime/internal/Component.js + function create_component(block) { + block && block.c(); + } + function claim_component(block, parent_nodes) { + block && block.l(parent_nodes); + } + function mount_component(component, target, anchor) { + const { fragment, after_update } = component.$$; + fragment && fragment.m(target, anchor); + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } else { + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + after_update.forEach(add_render_callback); + } + function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + flush_render_callbacks($$.after_update); + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } + } + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[i / 31 | 0] |= 1 << i % 31; + } + function init2(component, options, instance13, create_fragment13, not_equal, props, append_styles2 = null, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const $$ = component.$$ = { + fragment: null, + ctx: [], + // state + props, + update: noop2, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false, + root: options.target || parent_component.$$.root + }; + append_styles2 && append_styles2($$.root); + let ready = false; + $$.ctx = instance13 ? instance13(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) : []; + $$.update(); + ready = true; + run_all($$.before_update); + $$.fragment = create_fragment13 ? create_fragment13($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + start_hydrating(); + const nodes = children(options.target); + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach2); + } else { + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor); + end_hydrating(); + flush(); + } + set_current_component(parent_component); + } + var SvelteElement; + if (typeof HTMLElement === "function") { + SvelteElement = class extends HTMLElement { + constructor($$componentCtor, $$slots, use_shadow_dom) { + super(); + /** The Svelte component constructor */ + __publicField(this, "$$ctor"); + /** Slots */ + __publicField(this, "$$s"); + /** The Svelte component instance */ + __publicField(this, "$$c"); + /** Whether or not the custom element is connected */ + __publicField(this, "$$cn", false); + /** Component props data */ + __publicField(this, "$$d", {}); + /** `true` if currently in the process of reflecting component props back to attributes */ + __publicField(this, "$$r", false); + /** @type {Record} Props definition (name, reflected, type etc) */ + __publicField(this, "$$p_d", {}); + /** @type {Record} Event listeners */ + __publicField(this, "$$l", {}); + /** @type {Map} Event listener unsubscribe functions */ + __publicField(this, "$$l_u", /* @__PURE__ */ new Map()); + this.$$ctor = $$componentCtor; + this.$$s = $$slots; + if (use_shadow_dom) { + this.attachShadow({ mode: "open" }); + } + } + addEventListener(type, listener, options) { + this.$$l[type] = this.$$l[type] || []; + this.$$l[type].push(listener); + if (this.$$c) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); + } + super.addEventListener(type, listener, options); + } + removeEventListener(type, listener, options) { + super.removeEventListener(type, listener, options); + if (this.$$c) { + const unsub = this.$$l_u.get(listener); + if (unsub) { + unsub(); + this.$$l_u.delete(listener); + } + } + } + async connectedCallback() { + this.$$cn = true; + if (!this.$$c) { + let create_slot2 = function(name) { + return () => { + let node; + const obj = { + c: function create3() { + node = element("slot"); + if (name !== "default") { + attr(node, "name", name); + } + }, + /** + * @param {HTMLElement} target + * @param {HTMLElement} [anchor] + */ + m: function mount(target, anchor) { + insert2(target, node, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach2(node); + } + } + }; + return obj; + }; + }; + await Promise.resolve(); + if (!this.$$cn || this.$$c) { + return; + } + const $$slots = {}; + const existing_slots = get_custom_elements_slots(this); + for (const name of this.$$s) { + if (name in existing_slots) { + $$slots[name] = [create_slot2(name)]; + } + } + for (const attribute of this.attributes) { + const name = this.$$g_p(attribute.name); + if (!(name in this.$$d)) { + this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp"); + } + } + for (const key in this.$$p_d) { + if (!(key in this.$$d) && this[key] !== void 0) { + this.$$d[key] = this[key]; + delete this[key]; + } + } + this.$$c = new this.$$ctor({ + target: this.shadowRoot || this, + props: { + ...this.$$d, + $$slots, + $$scope: { + ctx: [] + } + } + }); + const reflect_attributes = () => { + this.$$r = true; + for (const key in this.$$p_d) { + this.$$d[key] = this.$$c.$$.ctx[this.$$c.$$.props[key]]; + if (this.$$p_d[key].reflect) { + const attribute_value = get_custom_element_value( + key, + this.$$d[key], + this.$$p_d, + "toAttribute" + ); + if (attribute_value == null) { + this.removeAttribute(this.$$p_d[key].attribute || key); + } else { + this.setAttribute(this.$$p_d[key].attribute || key, attribute_value); + } + } + } + this.$$r = false; + }; + this.$$c.$$.after_update.push(reflect_attributes); + reflect_attributes(); + for (const type in this.$$l) { + for (const listener of this.$$l[type]) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); + } + } + this.$$l = {}; + } + } + // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte + // and setting attributes through setAttribute etc, this is helpful + attributeChangedCallback(attr2, _oldValue, newValue) { + if (this.$$r) + return; + attr2 = this.$$g_p(attr2); + this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp"); + this.$$c?.$set({ [attr2]: this.$$d[attr2] }); + } + disconnectedCallback() { + this.$$cn = false; + Promise.resolve().then(() => { + if (!this.$$cn) { + this.$$c.$destroy(); + this.$$c = void 0; + } + }); + } + $$g_p(attribute_name) { + return Object.keys(this.$$p_d).find( + (key) => this.$$p_d[key].attribute === attribute_name || !this.$$p_d[key].attribute && key.toLowerCase() === attribute_name + ) || attribute_name; + } + }; + } + function get_custom_element_value(prop, value, props_definition, transform) { + const type = props_definition[prop]?.type; + value = type === "Boolean" && typeof value !== "boolean" ? value != null : value; + if (!transform || !props_definition[prop]) { + return value; + } else if (transform === "toAttribute") { + switch (type) { + case "Object": + case "Array": + return value == null ? null : JSON.stringify(value); + case "Boolean": + return value ? "" : null; + case "Number": + return value == null ? null : value; + default: + return value; + } + } else { + switch (type) { + case "Object": + case "Array": + return value && JSON.parse(value); + case "Boolean": + return value; + case "Number": + return value != null ? +value : value; + default: + return value; + } + } + } + function create_custom_element(Component, props_definition, slots, accessors, use_shadow_dom, extend) { + let Class = class extends SvelteElement { + constructor() { + super(Component, slots, use_shadow_dom); + this.$$p_d = props_definition; + } + static get observedAttributes() { + return Object.keys(props_definition).map( + (key) => (props_definition[key].attribute || key).toLowerCase() + ); + } + }; + Object.keys(props_definition).forEach((prop) => { + Object.defineProperty(Class.prototype, prop, { + get() { + return this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop]; + }, + set(value) { + value = get_custom_element_value(prop, value, props_definition); + this.$$d[prop] = value; + this.$$c?.$set({ [prop]: value }); + } + }); + }); + accessors.forEach((accessor) => { + Object.defineProperty(Class.prototype, accessor, { + get() { + return this.$$c?.[accessor]; + } + }); + }); + if (extend) { + Class = extend(Class); + } + Component.element = /** @type {any} */ + Class; + return Class; + } + var SvelteComponent = class { + constructor() { + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + __publicField(this, "$$"); + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + __publicField(this, "$$set"); + } + /** @returns {void} */ + $destroy() { + destroy_component(this, 1); + this.$destroy = noop2; + } + /** + * @template {Extract} K + * @param {K} type + * @param {((e: Events[K]) => void) | null | undefined} callback + * @returns {() => void} + */ + $on(type, callback) { + if (!is_function(callback)) { + return noop2; + } + const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); + callbacks.push(callback); + return () => { + const index3 = callbacks.indexOf(callback); + if (index3 !== -1) + callbacks.splice(index3, 1); + }; + } + /** + * @param {Partial} props + * @returns {void} + */ + $set(props) { + if (this.$$set && !is_empty(props)) { + this.$$.skip_bound = true; + this.$$set(props); + this.$$.skip_bound = false; + } + } + }; + + // node_modules/svelte/src/shared/version.js + var VERSION = "4.2.12"; + var PUBLIC_VERSION = "4"; + + // node_modules/svelte/src/runtime/internal/dev.js + function dispatch_dev(type, detail) { + document.dispatchEvent(custom_event(type, { version: VERSION, ...detail }, { bubbles: true })); + } + function append_hydration_dev(target, node) { + dispatch_dev("SvelteDOMInsert", { target, node }); + append_hydration(target, node); + } + function insert_hydration_dev(target, node, anchor) { + dispatch_dev("SvelteDOMInsert", { target, node, anchor }); + insert_hydration(target, node, anchor); + } + function detach_dev(node) { + dispatch_dev("SvelteDOMRemove", { node }); + detach2(node); + } + function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation, has_stop_immediate_propagation) { + const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : []; + if (has_prevent_default) + modifiers.push("preventDefault"); + if (has_stop_propagation) + modifiers.push("stopPropagation"); + if (has_stop_immediate_propagation) + modifiers.push("stopImmediatePropagation"); + dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers }); + const dispose = listen(node, event, handler, options); + return () => { + dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers }); + dispose(); + }; + } + function attr_dev(node, attribute, value) { + attr(node, attribute, value); + if (value == null) + dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute }); + else + dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value }); + } + function prop_dev(node, property, value) { + node[property] = value; + dispatch_dev("SvelteDOMSetProperty", { node, property, value }); + } + function set_data_dev(text2, data) { + data = "" + data; + if (text2.data === data) + return; + dispatch_dev("SvelteDOMSetData", { node: text2, data }); + text2.data = /** @type {string} */ + data; + } + function ensure_array_like_dev(arg) { + if (typeof arg !== "string" && !(arg && typeof arg === "object" && "length" in arg) && !(typeof Symbol === "function" && arg && Symbol.iterator in arg)) { + throw new Error("{#each} only works with iterable values."); + } + return ensure_array_like(arg); + } + function validate_slots(name, slot, keys) { + for (const slot_key of Object.keys(slot)) { + if (!~keys.indexOf(slot_key)) { + console.warn(`<${name}> received an unexpected slot "${slot_key}".`); + } + } + } + function validate_dynamic_element(tag) { + const is_string = typeof tag === "string"; + if (tag && !is_string) { + throw new Error(' expects "this" attribute to be a string.'); + } + } + function validate_void_dynamic_element(tag) { + if (tag && is_void(tag)) { + console.warn(` is self-closing and cannot have content.`); + } + } + var SvelteComponentDev = class extends SvelteComponent { + /** @param {import('./public.js').ComponentConstructorOptions} options */ + constructor(options) { + if (!options || !options.target && !options.$$inline) { + throw new Error("'target' is a required option"); + } + super(); + /** + * For type checking capabilities only. + * Does not exist at runtime. + * ### DO NOT USE! + * + * @type {Props} + */ + __publicField(this, "$$prop_def"); + /** + * For type checking capabilities only. + * Does not exist at runtime. + * ### DO NOT USE! + * + * @type {Events} + */ + __publicField(this, "$$events_def"); + /** + * For type checking capabilities only. + * Does not exist at runtime. + * ### DO NOT USE! + * + * @type {Slots} + */ + __publicField(this, "$$slot_def"); + } + /** @returns {void} */ + $destroy() { + super.$destroy(); + this.$destroy = () => { + console.warn("Component was already destroyed"); + }; + } + /** @returns {void} */ + $capture_state() { + } + /** @returns {void} */ + $inject_state() { + } + }; + + // node_modules/svelte/src/runtime/internal/disclose-version/index.js + if (typeof window !== "undefined") + (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(PUBLIC_VERSION); + + // node_modules/svelte/src/runtime/transition/index.js + function fade(node, { delay = 0, duration = 400, easing = identity } = {}) { + const o = +getComputedStyle(node).opacity; + return { + delay, + duration, + easing, + css: (t) => `opacity: ${t * o}` + }; + } + + // node_modules/svelte/src/runtime/store/index.js + var subscriber_queue = []; + function readable(value, start) { + return { + subscribe: writable(value, start).subscribe + }; + } + function writable(value, start = noop2) { + let stop; + const subscribers = /* @__PURE__ */ new Set(); + function set(new_value) { + if (safe_not_equal(value, new_value)) { + value = new_value; + if (stop) { + const run_queue = !subscriber_queue.length; + for (const subscriber of subscribers) { + subscriber[1](); + subscriber_queue.push(subscriber, value); + } + if (run_queue) { + for (let i = 0; i < subscriber_queue.length; i += 2) { + subscriber_queue[i][0](subscriber_queue[i + 1]); + } + subscriber_queue.length = 0; + } + } + } + } + function update2(fn) { + set(fn(value)); + } + function subscribe2(run2, invalidate = noop2) { + const subscriber = [run2, invalidate]; + subscribers.add(subscriber); + if (subscribers.size === 1) { + stop = start(set, update2) || noop2; + } + run2(value); + return () => { + subscribers.delete(subscriber); + if (subscribers.size === 0 && stop) { + stop(); + stop = null; + } + }; + } + return { set, update: update2, subscribe: subscribe2 }; + } + function derived(stores, fn, initial_value) { + const single = !Array.isArray(stores); + const stores_array = single ? [stores] : stores; + if (!stores_array.every(Boolean)) { + throw new Error("derived() expects stores as input, got a falsy value"); + } + const auto = fn.length < 2; + return readable(initial_value, (set, update2) => { + let started = false; + const values = []; + let pending = 0; + let cleanup = noop2; + const sync = () => { + if (pending) { + return; + } + cleanup(); + const result = fn(single ? values[0] : values, set, update2); + if (auto) { + set(result); + } else { + cleanup = is_function(result) ? result : noop2; + } + }; + const unsubscribers = stores_array.map( + (store, i) => subscribe( + store, + (value) => { + values[i] = value; + pending &= ~(1 << i); + if (started) { + sync(); + } + }, + () => { + pending |= 1 << i; + } + ) + ); + started = true; + sync(); + return function stop() { + run_all(unsubscribers); + cleanup(); + started = false; + }; + }); + } + + // svelte/components/Backdrop.svelte + var file = "svelte/components/Backdrop.svelte"; + function create_if_block(ctx) { + let div; + let div_transition; + let current; + const block = { + c: function create3() { + div = element("div"); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { class: true, "data-test-id": true }); + children(div).forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "bg-black/50 absolute inset-0 z-30"); + attr_dev(div, "data-test-id", "backdrop"); + add_location(div, file, 8, 2, 202); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + current = true; + }, + i: function intro(local) { + if (current) + return; + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, fade, {}, true); + div_transition.run(1); + }); + } + current = true; + }, + o: function outro(local) { + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, fade, {}, false); + div_transition.run(0); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + if (detaching && div_transition) + div_transition.end(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block.name, + type: "if", + source: "(6:0) {#if $backdropVisible}", + ctx + }); + return block; + } + function create_fragment(ctx) { + let if_block_anchor; + let if_block = ( + /*$backdropVisible*/ + ctx[0] && create_if_block(ctx) + ); + const block = { + c: function create3() { + if (if_block) + if_block.c(); + if_block_anchor = empty(); + }, + l: function claim(nodes) { + if (if_block) + if_block.l(nodes); + if_block_anchor = empty(); + }, + m: function mount(target, anchor) { + if (if_block) + if_block.m(target, anchor); + insert_hydration_dev(target, if_block_anchor, anchor); + }, + p: function update2(ctx2, [dirty]) { + if ( + /*$backdropVisible*/ + ctx2[0] + ) { + if (if_block) { + if (dirty & /*$backdropVisible*/ + 1) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); + } + }, + i: function intro(local) { + transition_in(if_block); + }, + o: function outro(local) { + transition_out(if_block); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(if_block_anchor); + } + if (if_block) + if_block.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment.name, + type: "component", + source: "", + ctx + }); + return block; + } + var backdropVisible = writable(false); + function instance($$self, $$props, $$invalidate) { + let $backdropVisible, $$unsubscribe_backdropVisible = noop2, $$subscribe_backdropVisible = () => ($$unsubscribe_backdropVisible(), $$unsubscribe_backdropVisible = subscribe(backdropVisible, ($$value) => $$invalidate(0, $backdropVisible = $$value)), backdropVisible); + validate_store(backdropVisible, "backdropVisible"); + component_subscribe($$self, backdropVisible, ($$value) => $$invalidate(0, $backdropVisible = $$value)); + $$self.$$.on_destroy.push(() => $$unsubscribe_backdropVisible()); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Backdrop", slots, []); + const writable_props = []; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + $$self.$capture_state = () => ({ + writable, + fade, + backdropVisible, + $backdropVisible + }); + return [$backdropVisible]; + } + var Backdrop = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance, create_fragment, safe_not_equal, {}); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Backdrop", + options, + id: create_fragment.name + }); + } + }; + create_custom_element(Backdrop, {}, [], [], true); + var Backdrop_default = Backdrop; + + // svelte/components/BrowserFrame.svelte + var BrowserFrame_exports = {}; + __export(BrowserFrame_exports, { + default: () => BrowserFrame_default + }); + var file2 = "svelte/components/BrowserFrame.svelte"; + function create_fragment2(ctx) { + let div5; + let div4; + let div0; + let span0; + let t0; + let span1; + let t1; + let span2; + let t2; + let div2; + let div1; + let span3; + let t3_value = getPageName( + /*page*/ + ctx[0] + ) + ""; + let t3; + let t4; + let div3; + let textContent = ``; + let t5; + let current; + const default_slot_template = ( + /*#slots*/ + ctx[2].default + ); + const default_slot = create_slot( + default_slot_template, + ctx, + /*$$scope*/ + ctx[1], + null + ); + const block = { + c: function create3() { + div5 = element("div"); + div4 = element("div"); + div0 = element("div"); + span0 = element("span"); + t0 = space(); + span1 = element("span"); + t1 = space(); + span2 = element("span"); + t2 = space(); + div2 = element("div"); + div1 = element("div"); + span3 = element("span"); + t3 = text(t3_value); + t4 = space(); + div3 = element("div"); + div3.innerHTML = textContent; + t5 = space(); + if (default_slot) + default_slot.c(); + this.h(); + }, + l: function claim(nodes) { + div5 = claim_element(nodes, "DIV", { class: true, "data-test-id": true }); + var div5_nodes = children(div5); + div4 = claim_element(div5_nodes, "DIV", { class: true, "data-test-id": true }); + var div4_nodes = children(div4); + div0 = claim_element(div4_nodes, "DIV", { class: true }); + var div0_nodes = children(div0); + span0 = claim_element(div0_nodes, "SPAN", { class: true }); + children(span0).forEach(detach_dev); + t0 = claim_space(div0_nodes); + span1 = claim_element(div0_nodes, "SPAN", { class: true }); + children(span1).forEach(detach_dev); + t1 = claim_space(div0_nodes); + span2 = claim_element(div0_nodes, "SPAN", { class: true }); + children(span2).forEach(detach_dev); + div0_nodes.forEach(detach_dev); + t2 = claim_space(div4_nodes); + div2 = claim_element(div4_nodes, "DIV", { class: true }); + var div2_nodes = children(div2); + div1 = claim_element(div2_nodes, "DIV", { class: true }); + var div1_nodes = children(div1); + span3 = claim_element(div1_nodes, "SPAN", { "data-test-id": true }); + var span3_nodes = children(span3); + t3 = claim_text(span3_nodes, t3_value); + span3_nodes.forEach(detach_dev); + div1_nodes.forEach(detach_dev); + div2_nodes.forEach(detach_dev); + t4 = claim_space(div4_nodes); + div3 = claim_element(div4_nodes, "DIV", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(div3) !== "svelte-1czp51h") + div3.innerHTML = textContent; + div4_nodes.forEach(detach_dev); + t5 = claim_space(div5_nodes); + if (default_slot) + default_slot.l(div5_nodes); + div5_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(span0, "class", "inline-block h-2 w-2 ml-2 rounded-full bg-red-800"); + add_location(span0, file2, 16, 6, 367); + attr_dev(span1, "class", "inline-block h-2 w-2 ml-2 rounded-full bg-amber-400"); + add_location(span1, file2, 17, 6, 445); + attr_dev(span2, "class", "inline-block h-2 w-2 ml-2 rounded-full bg-lime-600"); + add_location(span2, file2, 18, 6, 525); + attr_dev(div0, "class", "py-2"); + add_location(div0, file2, 15, 4, 342); + attr_dev(span3, "data-test-id", "url-box"); + add_location(span3, file2, 22, 8, 782); + attr_dev(div1, "class", "rounded bg-gray-50 border-b border-gray-200 shadow max-w-xs mx-auto text-center py-0.5 relative"); + add_location(div1, file2, 21, 6, 664); + attr_dev(div2, "class", "flex-1 py-2.5 overflow-visible"); + add_location(div2, file2, 20, 4, 613); + attr_dev(div3, "class", "py-3"); + add_location(div3, file2, 25, 4, 866); + attr_dev(div4, "class", "bg-gray-50 border-b border-gray-200 border-solid rounded-t-xl h-12 px-3.5 flex"); + attr_dev(div4, "data-test-id", "address-bar"); + add_location(div4, file2, 11, 2, 207); + attr_dev(div5, "class", "flex-1 flex flex-col"); + attr_dev(div5, "data-test-id", "fake-browser"); + add_location(div5, file2, 10, 0, 142); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div5, anchor); + append_hydration_dev(div5, div4); + append_hydration_dev(div4, div0); + append_hydration_dev(div0, span0); + append_hydration_dev(div0, t0); + append_hydration_dev(div0, span1); + append_hydration_dev(div0, t1); + append_hydration_dev(div0, span2); + append_hydration_dev(div4, t2); + append_hydration_dev(div4, div2); + append_hydration_dev(div2, div1); + append_hydration_dev(div1, span3); + append_hydration_dev(span3, t3); + append_hydration_dev(div4, t4); + append_hydration_dev(div4, div3); + append_hydration_dev(div5, t5); + if (default_slot) { + default_slot.m(div5, null); + } + current = true; + }, + p: function update2(ctx2, [dirty]) { + if ((!current || dirty & /*page*/ + 1) && t3_value !== (t3_value = getPageName( + /*page*/ + ctx2[0] + ) + "")) + set_data_dev(t3, t3_value); + if (default_slot) { + if (default_slot.p && (!current || dirty & /*$$scope*/ + 2)) { + update_slot_base( + default_slot, + default_slot_template, + ctx2, + /*$$scope*/ + ctx2[1], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[1] + ) : get_slot_changes( + default_slot_template, + /*$$scope*/ + ctx2[1], + dirty, + null + ), + null + ); + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(default_slot, local); + current = true; + }, + o: function outro(local) { + transition_out(default_slot, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div5); + } + if (default_slot) + default_slot.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment2.name, + type: "component", + source: "", + ctx + }); + return block; + } + function getPageName(page2) { + return !page2.path || page2.path === "" ? "index" : page2.path; + } + function instance2($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("BrowserFrame", slots, ["default"]); + let { page: page2 } = $$props; + $$self.$$.on_mount.push(function() { + if (page2 === void 0 && !("page" in $$props || $$self.$$.bound[$$self.$$.props["page"]])) { + console.warn(" was created without expected prop 'page'"); + } + }); + const writable_props = ["page"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + $$self.$$set = ($$props2) => { + if ("page" in $$props2) + $$invalidate(0, page2 = $$props2.page); + if ("$$scope" in $$props2) + $$invalidate(1, $$scope = $$props2.$$scope); + }; + $$self.$capture_state = () => ({ page: page2, getPageName }); + $$self.$inject_state = ($$props2) => { + if ("page" in $$props2) + $$invalidate(0, page2 = $$props2.page); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + return [page2, $$scope, slots]; + } + var BrowserFrame = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance2, create_fragment2, safe_not_equal, { page: 0 }); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "BrowserFrame", + options, + id: create_fragment2.name + }); + } + get page() { + return this.$$.ctx[0]; + } + set page(page2) { + this.$$set({ page: page2 }); + flush(); + } + }; + create_custom_element(BrowserFrame, { "page": {} }, ["default"], [], true); + var BrowserFrame_default = BrowserFrame; + + // svelte/components/CodeEditor.svelte + var CodeEditor_exports = {}; + __export(CodeEditor_exports, { + default: () => CodeEditor_default + }); + + // node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js + function _defineProperty3(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function ownKeys3(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread23(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys3(Object(source), true).forEach(function(key) { + _defineProperty3(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys3(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + return target; + } + function _objectWithoutPropertiesLoose2(source, excluded) { + if (source == null) + return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) + continue; + target[key] = source[key]; + } + return target; + } + function _objectWithoutProperties2(source, excluded) { + if (source == null) + return {}; + var target = _objectWithoutPropertiesLoose2(source, excluded); + var key, i; + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) + continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) + continue; + target[key] = source[key]; + } + } + return target; + } + function _slicedToArray2(arr, i) { + return _arrayWithHoles2(arr) || _iterableToArrayLimit2(arr, i) || _unsupportedIterableToArray2(arr, i) || _nonIterableRest2(); + } + function _arrayWithHoles2(arr) { + if (Array.isArray(arr)) + return arr; + } + function _iterableToArrayLimit2(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) + return; + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) + break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) + _i["return"](); + } finally { + if (_d) + throw _e; + } + } + return _arr; + } + function _unsupportedIterableToArray2(o, minLen) { + if (!o) + return; + if (typeof o === "string") + return _arrayLikeToArray2(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) + n = o.constructor.name; + if (n === "Map" || n === "Set") + return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray2(o, minLen); + } + function _arrayLikeToArray2(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) + arr2[i] = arr[i]; + return arr2; + } + function _nonIterableRest2() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + // node_modules/state-local/lib/es/state-local.js + function _defineProperty4(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function ownKeys4(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread24(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys4(Object(source), true).forEach(function(key) { + _defineProperty4(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys4(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + return target; + } + function compose4() { + for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) { + fns[_key] = arguments[_key]; + } + return function(x) { + return fns.reduceRight(function(y, f) { + return f(y); + }, x); + }; + } + function curry3(fn) { + return function curried() { + var _this = this; + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + return args.length >= fn.length ? fn.apply(this, args) : function() { + for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + nextArgs[_key3] = arguments[_key3]; + } + return curried.apply(_this, [].concat(args, nextArgs)); + }; + }; + } + function isObject3(value) { + return {}.toString.call(value).includes("Object"); + } + function isEmpty2(obj) { + return !Object.keys(obj).length; + } + function isFunction2(value) { + return typeof value === "function"; + } + function hasOwnProperty2(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + } + function validateChanges2(initial, changes) { + if (!isObject3(changes)) + errorHandler3("changeType"); + if (Object.keys(changes).some(function(field) { + return !hasOwnProperty2(initial, field); + })) + errorHandler3("changeField"); + return changes; + } + function validateSelector2(selector) { + if (!isFunction2(selector)) + errorHandler3("selectorType"); + } + function validateHandler2(handler) { + if (!(isFunction2(handler) || isObject3(handler))) + errorHandler3("handlerType"); + if (isObject3(handler) && Object.values(handler).some(function(_handler) { + return !isFunction2(_handler); + })) + errorHandler3("handlersType"); + } + function validateInitial2(initial) { + if (!initial) + errorHandler3("initialIsRequired"); + if (!isObject3(initial)) + errorHandler3("initialType"); + if (isEmpty2(initial)) + errorHandler3("initialContent"); + } + function throwError3(errorMessages5, type) { + throw new Error(errorMessages5[type] || errorMessages5["default"]); + } + var errorMessages3 = { + initialIsRequired: "initial state is required", + initialType: "initial state should be an object", + initialContent: "initial state shouldn't be an empty object", + handlerType: "handler should be an object or a function", + handlersType: "all handlers should be a functions", + selectorType: "selector should be a function", + changeType: "provided value of changes should be an object", + changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state', + "default": "an unknown error accured in `state-local` package" + }; + var errorHandler3 = curry3(throwError3)(errorMessages3); + var validators3 = { + changes: validateChanges2, + selector: validateSelector2, + handler: validateHandler2, + initial: validateInitial2 + }; + function create2(initial) { + var handler = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + validators3.initial(initial); + validators3.handler(handler); + var state = { + current: initial + }; + var didUpdate = curry3(didStateUpdate2)(state, handler); + var update2 = curry3(updateState2)(state); + var validate = curry3(validators3.changes)(initial); + var getChanges = curry3(extractChanges2)(state); + function getState3() { + var selector = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(state2) { + return state2; + }; + validators3.selector(selector); + return selector(state.current); + } + function setState3(causedChanges) { + compose4(didUpdate, update2, validate, getChanges)(causedChanges); + } + return [getState3, setState3]; + } + function extractChanges2(state, causedChanges) { + return isFunction2(causedChanges) ? causedChanges(state.current) : causedChanges; + } + function updateState2(state, changes) { + state.current = _objectSpread24(_objectSpread24({}, state.current), changes); + return changes; + } + function didStateUpdate2(state, handler, changes) { + isFunction2(handler) ? handler(state.current) : Object.keys(changes).forEach(function(field) { + var _handler$field; + return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]); + }); + return changes; + } + var index2 = { + create: create2 + }; + var state_local_default2 = index2; + + // node_modules/@monaco-editor/loader/lib/es/config/index.js + var config3 = { + paths: { + vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs" + } + }; + var config_default2 = config3; + + // node_modules/@monaco-editor/loader/lib/es/utils/curry.js + function curry4(fn) { + return function curried() { + var _this = this; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return args.length >= fn.length ? fn.apply(this, args) : function() { + for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + nextArgs[_key2] = arguments[_key2]; + } + return curried.apply(_this, [].concat(args, nextArgs)); + }; + }; + } + var curry_default2 = curry4; + + // node_modules/@monaco-editor/loader/lib/es/utils/isObject.js + function isObject4(value) { + return {}.toString.call(value).includes("Object"); + } + var isObject_default2 = isObject4; + + // node_modules/@monaco-editor/loader/lib/es/validators/index.js + function validateConfig2(config5) { + if (!config5) + errorHandler4("configIsRequired"); + if (!isObject_default2(config5)) + errorHandler4("configType"); + if (config5.urls) { + informAboutDeprecation2(); + return { + paths: { + vs: config5.urls.monacoBase + } + }; + } + return config5; + } + function informAboutDeprecation2() { + console.warn(errorMessages4.deprecation); + } + function throwError4(errorMessages5, type) { + throw new Error(errorMessages5[type] || errorMessages5["default"]); + } + var errorMessages4 = { + configIsRequired: "the configuration object is required", + configType: "the configuration object should be an object", + "default": "an unknown error accured in `@monaco-editor/loader` package", + deprecation: "Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n " + }; + var errorHandler4 = curry_default2(throwError4)(errorMessages4); + var validators4 = { + config: validateConfig2 + }; + var validators_default2 = validators4; + + // node_modules/@monaco-editor/loader/lib/es/utils/compose.js + var compose5 = function compose6() { + for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) { + fns[_key] = arguments[_key]; + } + return function(x) { + return fns.reduceRight(function(y, f) { + return f(y); + }, x); + }; + }; + var compose_default2 = compose5; + + // node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js + function merge2(target, source) { + Object.keys(source).forEach(function(key) { + if (source[key] instanceof Object) { + if (target[key]) { + Object.assign(source[key], merge2(target[key], source[key])); + } + } + }); + return _objectSpread23(_objectSpread23({}, target), source); + } + var deepMerge_default2 = merge2; + + // node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js + var CANCELATION_MESSAGE2 = { + type: "cancelation", + msg: "operation is manually canceled" + }; + function makeCancelable2(promise2) { + var hasCanceled_ = false; + var wrappedPromise = new Promise(function(resolve, reject) { + promise2.then(function(val) { + return hasCanceled_ ? reject(CANCELATION_MESSAGE2) : resolve(val); + }); + promise2["catch"](reject); + }); + return wrappedPromise.cancel = function() { + return hasCanceled_ = true; + }, wrappedPromise; + } + var makeCancelable_default2 = makeCancelable2; + + // node_modules/@monaco-editor/loader/lib/es/loader/index.js + var _state$create3 = state_local_default2.create({ + config: config_default2, + isInitialized: false, + resolve: null, + reject: null, + monaco: null + }); + var _state$create22 = _slicedToArray2(_state$create3, 2); + var getState2 = _state$create22[0]; + var setState2 = _state$create22[1]; + function config4(globalConfig) { + var _validators$config = validators_default2.config(globalConfig), monaco = _validators$config.monaco, config5 = _objectWithoutProperties2(_validators$config, ["monaco"]); + setState2(function(state) { + return { + config: deepMerge_default2(state.config, config5), + monaco + }; + }); + } + function init3() { + var state = getState2(function(_ref) { + var monaco = _ref.monaco, isInitialized = _ref.isInitialized, resolve = _ref.resolve; + return { + monaco, + isInitialized, + resolve + }; + }); + if (!state.isInitialized) { + setState2({ + isInitialized: true + }); + if (state.monaco) { + state.resolve(state.monaco); + return makeCancelable_default2(wrapperPromise2); + } + if (window.monaco && window.monaco.editor) { + storeMonacoInstance2(window.monaco); + state.resolve(window.monaco); + return makeCancelable_default2(wrapperPromise2); + } + compose_default2(injectScripts2, getMonacoLoaderScript2)(configureLoader2); + } + return makeCancelable_default2(wrapperPromise2); + } + function injectScripts2(script) { + return document.body.appendChild(script); + } + function createScript2(src) { + var script = document.createElement("script"); + return src && (script.src = src), script; + } + function getMonacoLoaderScript2(configureLoader3) { + var state = getState2(function(_ref2) { + var config5 = _ref2.config, reject = _ref2.reject; + return { + config: config5, + reject + }; + }); + var loaderScript = createScript2("".concat(state.config.paths.vs, "/loader.js")); + loaderScript.onload = function() { + return configureLoader3(); + }; + loaderScript.onerror = state.reject; + return loaderScript; + } + function configureLoader2() { + var state = getState2(function(_ref3) { + var config5 = _ref3.config, resolve = _ref3.resolve, reject = _ref3.reject; + return { + config: config5, + resolve, + reject + }; + }); + var require2 = window.require; + require2.config(state.config); + require2(["vs/editor/editor.main"], function(monaco) { + storeMonacoInstance2(monaco); + state.resolve(monaco); + }, function(error) { + state.reject(error); + }); + } + function storeMonacoInstance2(monaco) { + if (!getState2().monaco) { + setState2({ + monaco + }); + } + } + function __getMonacoInstance2() { + return getState2(function(_ref4) { + var monaco = _ref4.monaco; + return monaco; + }); + } + var wrapperPromise2 = new Promise(function(resolve, reject) { + return setState2({ + resolve, + reject + }); + }); + var loader2 = { + config: config4, + init: init3, + __getMonacoInstance: __getMonacoInstance2 + }; + var loader_default2 = loader2; + + // svelte/components/CodeEditor.svelte + var file3 = "svelte/components/CodeEditor.svelte"; + function create_fragment3(ctx) { + let div; + const block = { + c: function create3() { + div = element("div"); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { class: true }); + children(div).forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "w-52 h-24 py-0.5 px-0.5 bg-gray-100"); + add_location(div, file3, 39, 0, 1662); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + ctx[2](div); + }, + p: noop2, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + ctx[2](null); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment3.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance3($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("CodeEditor", slots, []); + var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value2) { + return value2 instanceof P ? value2 : new P(function(resolve) { + resolve(value2); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value2) { + try { + step(generator.next(value2)); + } catch (e) { + reject(e); + } + } + function rejected(value2) { + try { + step(generator["throw"](value2)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + let { value } = $$props; + let dispatch2 = createEventDispatcher(); + let editor; + let monaco; + let editorContainer; + onMount(() => __awaiter(void 0, void 0, void 0, function* () { + loader_default2.config({ + paths: { vs: "/node_modules/monaco-editor/min/vs" } + }); + monaco = yield loader_default2.init(); + const editor2 = monaco.editor.create(editorContainer, { + value, + language: "elixir", + minimap: { enabled: false }, + lineNumbers: "off", + automaticLayout: true + }); + editor2.onDidBlurEditorWidget((e) => { + let content = editor2.getValue(); + dispatch2("change", content); + }); + })); + onDestroy(() => { + monaco === null || monaco === void 0 ? void 0 : monaco.editor.getModels().forEach((model) => model.dispose()); + }); + $$self.$$.on_mount.push(function() { + if (value === void 0 && !("value" in $$props || $$self.$$.bound[$$self.$$.props["value"]])) { + console.warn(" was created without expected prop 'value'"); + } + }); + const writable_props = ["value"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + function div_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + editorContainer = $$value; + $$invalidate(0, editorContainer); + }); + } + $$self.$$set = ($$props2) => { + if ("value" in $$props2) + $$invalidate(1, value = $$props2.value); + }; + $$self.$capture_state = () => ({ + __awaiter, + loader: loader_default2, + onDestroy, + onMount, + value, + createEventDispatcher, + dispatch: dispatch2, + editor, + monaco, + editorContainer + }); + $$self.$inject_state = ($$props2) => { + if ("__awaiter" in $$props2) + __awaiter = $$props2.__awaiter; + if ("value" in $$props2) + $$invalidate(1, value = $$props2.value); + if ("dispatch" in $$props2) + dispatch2 = $$props2.dispatch; + if ("editor" in $$props2) + $$invalidate(6, editor = $$props2.editor); + if ("monaco" in $$props2) + monaco = $$props2.monaco; + if ("editorContainer" in $$props2) + $$invalidate(0, editorContainer = $$props2.editorContainer); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*value*/ + 2) { + $: { + if (editor) { + editor.setValue(value); + } + } + } + }; + return [editorContainer, value, div_binding]; + } + var CodeEditor2 = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance3, create_fragment3, safe_not_equal, { value: 1 }); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "CodeEditor", + options, + id: create_fragment3.name + }); + } + get value() { + return this.$$.ctx[1]; + } + set value(value) { + this.$$set({ value }); + flush(); + } + }; + create_custom_element(CodeEditor2, { "value": {} }, [], [], true); + var CodeEditor_default = CodeEditor2; + + // svelte/components/ComponentsSidebar.svelte + var ComponentsSidebar_exports = {}; + __export(ComponentsSidebar_exports, { + default: () => ComponentsSidebar_default + }); + + // svelte/utils/animations.ts + function translate(_node, { delay = 0, duration = 300, x = 0, y = 0 }) { + return { + delay, + duration, + css: (t) => `transform: translate(${x * t}px, ${y * t}px)` + }; + } + + // svelte/stores/currentComponentCategory.ts + var currentComponentCategory = writable(null); + + // svelte/stores/dragAndDrop.ts + var draggedObject = writable(null); + + // svelte/components/ComponentsSidebar.svelte + var file4 = "svelte/components/ComponentsSidebar.svelte"; + function add_css(target) { + append_styles(target, "svelte-uvq63b", "#left-sidebar.svelte-uvq63b{z-index:1000}#backdrop.svelte-uvq63b{z-index:999}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tcG9uZW50c1NpZGViYXIuc3ZlbHRlIiwibWFwcGluZ3MiOiJBQTRJRSwyQkFBYyxDQUNaLE9BQU8sQ0FBRSxJQUNYLENBQ0EsdUJBQVUsQ0FDUixPQUFPLENBQUUsR0FDWCIsIm5hbWVzIjpbXSwic291cmNlcyI6WyJDb21wb25lbnRzU2lkZWJhci5zdmVsdGUiXX0= */"); + } + function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[17] = list[i]; + return child_ctx; + } + function get_each_context_1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[20] = list[i]; + return child_ctx; + } + function get_each_context_2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[23] = list[i]; + return child_ctx; + } + function create_each_block_2(ctx) { + let li; + let div; + let t0_value = ( + /*sectionTitles*/ + ctx[4][ + /*item*/ + ctx[23].name + ] + "" + ); + let t0; + let t1; + let mounted; + let dispose; + function mouseenter_handler() { + return ( + /*mouseenter_handler*/ + ctx[13]( + /*item*/ + ctx[23] + ) + ); + } + const block = { + c: function create3() { + li = element("li"); + div = element("div"); + t0 = text(t0_value); + t1 = space(); + this.h(); + }, + l: function claim(nodes) { + li = claim_element(nodes, "LI", { class: true, "data-test-id": true }); + var li_nodes = children(li); + div = claim_element(li_nodes, "DIV", {}); + var div_nodes = children(div); + t0 = claim_text(div_nodes, t0_value); + div_nodes.forEach(detach_dev); + t1 = claim_space(li_nodes); + li_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + add_location(div, file4, 87, 12, 2587); + attr_dev(li, "class", "p-2 pl-6 hover:bg-slate-50 hover:cursor-pointer"); + attr_dev(li, "data-test-id", "nav-item"); + add_location(li, file4, 81, 10, 2347); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, li, anchor); + append_hydration_dev(li, div); + append_hydration_dev(div, t0); + append_hydration_dev(li, t1); + if (!mounted) { + dispose = [ + listen_dev(li, "mouseenter", mouseenter_handler, false, false, false, false), + listen_dev( + li, + "mouseleave", + /*collapseCategoryMenu*/ + ctx[5], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(new_ctx, dirty) { + ctx = new_ctx; + if (dirty & /*menuCategories*/ + 2 && t0_value !== (t0_value = /*sectionTitles*/ + ctx[4][ + /*item*/ + ctx[23].name + ] + "")) + set_data_dev(t0, t0_value); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(li); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block_2.name, + type: "each", + source: "(70:8) {#each category.items as item}", + ctx + }); + return block; + } + function create_each_block_1(ctx) { + let li; + let h3; + let t0_value = ( + /*category*/ + ctx[20].name + "" + ); + let t0; + let t1; + let each_1_anchor; + let each_value_2 = ensure_array_like_dev( + /*category*/ + ctx[20].items + ); + let each_blocks = []; + for (let i = 0; i < each_value_2.length; i += 1) { + each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); + } + const block = { + c: function create3() { + li = element("li"); + h3 = element("h3"); + t0 = text(t0_value); + t1 = space(); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + this.h(); + }, + l: function claim(nodes) { + li = claim_element(nodes, "LI", { class: true, "data-test-id": true }); + var li_nodes = children(li); + h3 = claim_element(li_nodes, "H3", { class: true }); + var h3_nodes = children(h3); + t0 = claim_text(h3_nodes, t0_value); + h3_nodes.forEach(detach_dev); + li_nodes.forEach(detach_dev); + t1 = claim_space(nodes); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(nodes); + } + each_1_anchor = empty(); + this.h(); + }, + h: function hydrate() { + attr_dev(h3, "class", "text-xs font-bold uppercase"); + add_location(h3, file4, 78, 10, 2223); + attr_dev(li, "class", "mb-1 px-4"); + attr_dev(li, "data-test-id", "nav-item"); + add_location(li, file4, 77, 8, 2166); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, li, anchor); + append_hydration_dev(li, h3); + append_hydration_dev(h3, t0); + insert_hydration_dev(target, t1, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert_hydration_dev(target, each_1_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*menuCategories*/ + 2 && t0_value !== (t0_value = /*category*/ + ctx2[20].name + "")) + set_data_dev(t0, t0_value); + if (dirty & /*expandCategoryMenu, menuCategories, collapseCategoryMenu, sectionTitles*/ + 178) { + each_value_2 = ensure_array_like_dev( + /*category*/ + ctx2[20].items + ); + let i; + for (i = 0; i < each_value_2.length; i += 1) { + const child_ctx = get_each_context_2(ctx2, each_value_2, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block_2(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + each_blocks.length = each_value_2.length; + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(li); + detach_dev(t1); + detach_dev(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block_1.name, + type: "each", + source: "(66:6) {#each menuCategories as category}", + ctx + }); + return block; + } + function create_if_block_1(ctx) { + let each_1_anchor; + let each_value = ensure_array_like_dev( + /*currentDefinitions*/ + ctx[3] + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); + } + const block = { + c: function create3() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + l: function claim(nodes) { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(nodes); + } + each_1_anchor = empty(); + }, + m: function mount(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert_hydration_dev(target, each_1_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*dragStart, currentDefinitions, dragEnd*/ + 776) { + each_value = ensure_array_like_dev( + /*currentDefinitions*/ + ctx2[3] + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + each_blocks.length = each_value.length; + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_1.name, + type: "if", + source: "(96:6) {#if currentDefinitions}", + ctx + }); + return block; + } + function create_each_block(ctx) { + let div; + let p; + let t0_value = ( + /*example*/ + ctx[17].name + "" + ); + let t0; + let t1; + let img; + let img_src_value; + let img_alt_value; + let t2; + let mounted; + let dispose; + function dragstart_handler(...args) { + return ( + /*dragstart_handler*/ + ctx[14]( + /*example*/ + ctx[17], + ...args + ) + ); + } + const block = { + c: function create3() { + div = element("div"); + p = element("p"); + t0 = text(t0_value); + t1 = space(); + img = element("img"); + t2 = space(); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { + draggable: true, + class: true, + "data-test-id": true + }); + var div_nodes = children(div); + p = claim_element(div_nodes, "P", { class: true }); + var p_nodes = children(p); + t0 = claim_text(p_nodes, t0_value); + p_nodes.forEach(detach_dev); + t1 = claim_space(div_nodes); + img = claim_element(div_nodes, "IMG", { class: true, src: true, alt: true }); + t2 = claim_space(div_nodes); + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(p, "class", "mb-1 text-xs font-bold uppercase tracking-wider"); + add_location(p, file4, 116, 12, 3811); + attr_dev(img, "class", "w-full h-auto rounded ring-offset-2 ring-blue-500 transition hover:cursor-grab hover:ring-2"); + if (!src_url_equal(img.src, img_src_value = /*example*/ + ctx[17].thumbnail ? ( + /*example*/ + ctx[17].thumbnail + ) : `https://placehold.co/400x75?text=${/*example*/ + ctx[17].name}`)) + attr_dev(img, "src", img_src_value); + attr_dev(img, "alt", img_alt_value = /*example*/ + ctx[17].name); + add_location(img, file4, 118, 12, 3974); + attr_dev(div, "draggable", "true"); + attr_dev(div, "class", "pt-6"); + attr_dev(div, "data-test-id", "component-preview-card"); + add_location(div, file4, 109, 10, 3589); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + append_hydration_dev(div, p); + append_hydration_dev(p, t0); + append_hydration_dev(div, t1); + append_hydration_dev(div, img); + append_hydration_dev(div, t2); + if (!mounted) { + dispose = [ + listen_dev(div, "dragstart", dragstart_handler, false, false, false, false), + listen_dev( + div, + "dragend", + /*dragEnd*/ + ctx[9], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(new_ctx, dirty) { + ctx = new_ctx; + if (dirty & /*currentDefinitions*/ + 8 && t0_value !== (t0_value = /*example*/ + ctx[17].name + "")) + set_data_dev(t0, t0_value); + if (dirty & /*currentDefinitions*/ + 8 && !src_url_equal(img.src, img_src_value = /*example*/ + ctx[17].thumbnail ? ( + /*example*/ + ctx[17].thumbnail + ) : `https://placehold.co/400x75?text=${/*example*/ + ctx[17].name}`)) { + attr_dev(img, "src", img_src_value); + } + if (dirty & /*currentDefinitions*/ + 8 && img_alt_value !== (img_alt_value = /*example*/ + ctx[17].name)) { + attr_dev(img, "alt", img_alt_value); + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block.name, + type: "each", + source: "(97:8) {#each currentDefinitions as example}", + ctx + }); + return block; + } + function create_if_block2(ctx) { + let div; + let div_transition; + let current; + const block = { + c: function create3() { + div = element("div"); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { + class: true, + id: true, + "data-test-id": true + }); + children(div).forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "bg-black/50 absolute inset-0 z-50 svelte-uvq63b"); + attr_dev(div, "id", "backdrop"); + attr_dev(div, "data-test-id", "backdrop"); + add_location(div, file4, 131, 2, 4346); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + current = true; + }, + i: function intro(local) { + if (current) + return; + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, fade, { duration: 300 }, true); + div_transition.run(1); + }); + } + current = true; + }, + o: function outro(local) { + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, fade, { duration: 300 }, false); + div_transition.run(0); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + if (detaching && div_transition) + div_transition.end(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block2.name, + type: "if", + source: "(120:0) {#if showExamples}", + ctx + }); + return block; + } + function create_fragment4(ctx) { + let div3; + let div2; + let div0; + let h2; + let textContent = "Components"; + let t1; + let ul; + let t2; + let div1; + let h4; + let t3_value = ( + /*sectionTitles*/ + ctx[4][ + /*$currentComponentCategory*/ + ctx[0]?.name + ] + "" + ); + let t3; + let t4; + let p; + let textContent_1 = "Select a component \u{1F447} and drag it to the canvas \u{1F449}"; + let t6; + let div1_transition; + let t7; + let if_block1_anchor; + let current; + let mounted; + let dispose; + let each_value_1 = ensure_array_like_dev( + /*menuCategories*/ + ctx[1] + ); + let each_blocks = []; + for (let i = 0; i < each_value_1.length; i += 1) { + each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); + } + let if_block0 = ( + /*currentDefinitions*/ + ctx[3] && create_if_block_1(ctx) + ); + let if_block1 = ( + /*showExamples*/ + ctx[2] && create_if_block2(ctx) + ); + const block = { + c: function create3() { + div3 = element("div"); + div2 = element("div"); + div0 = element("div"); + h2 = element("h2"); + h2.textContent = textContent; + t1 = space(); + ul = element("ul"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + t2 = space(); + div1 = element("div"); + h4 = element("h4"); + t3 = text(t3_value); + t4 = space(); + p = element("p"); + p.textContent = textContent_1; + t6 = space(); + if (if_block0) + if_block0.c(); + t7 = space(); + if (if_block1) + if_block1.c(); + if_block1_anchor = empty(); + this.h(); + }, + l: function claim(nodes) { + div3 = claim_element(nodes, "DIV", { + class: true, + id: true, + "data-test-id": true + }); + var div3_nodes = children(div3); + div2 = claim_element(div3_nodes, "DIV", { class: true }); + var div2_nodes = children(div2); + div0 = claim_element(div2_nodes, "DIV", { class: true, "data-test-id": true }); + var div0_nodes = children(div0); + h2 = claim_element(div0_nodes, "H2", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(h2) !== "svelte-1ke8ds1") + h2.textContent = textContent; + div0_nodes.forEach(detach_dev); + t1 = claim_space(div2_nodes); + ul = claim_element(div2_nodes, "UL", { class: true, "data-test-id": true }); + var ul_nodes = children(ul); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(ul_nodes); + } + ul_nodes.forEach(detach_dev); + t2 = claim_space(div2_nodes); + div1 = claim_element(div2_nodes, "DIV", { + class: true, + id: true, + "data-test-id": true + }); + var div1_nodes = children(div1); + h4 = claim_element(div1_nodes, "H4", { class: true }); + var h4_nodes = children(h4); + t3 = claim_text(h4_nodes, t3_value); + h4_nodes.forEach(detach_dev); + t4 = claim_space(div1_nodes); + p = claim_element(div1_nodes, "P", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(p) !== "svelte-6fsgsi") + p.textContent = textContent_1; + t6 = claim_space(div1_nodes); + if (if_block0) + if_block0.l(div1_nodes); + div1_nodes.forEach(detach_dev); + div2_nodes.forEach(detach_dev); + div3_nodes.forEach(detach_dev); + t7 = claim_space(nodes); + if (if_block1) + if_block1.l(nodes); + if_block1_anchor = empty(); + this.h(); + }, + h: function hydrate() { + attr_dev(h2, "class", "text-lg font-bold"); + add_location(h2, file4, 73, 6, 1969); + attr_dev(div0, "class", "border-b border-slate-100 border-solid py-4 px-4"); + attr_dev(div0, "data-test-id", "logo"); + add_location(div0, file4, 72, 4, 1880); + attr_dev(ul, "class", "py-4 h-[calc(100vh_-_61px)] overflow-y-auto"); + attr_dev(ul, "data-test-id", "component-tree"); + add_location(ul, file4, 75, 4, 2030); + attr_dev(h4, "class", "mb-4 font-bold text-2xl"); + add_location(h4, file4, 104, 6, 3259); + attr_dev(p, "class", "font-medium"); + add_location(p, file4, 105, 6, 3355); + attr_dev(div1, "class", "absolute w-96 left-0 bg-slate-50 inset-y-0 shadow-sm z-50 pt-3 pb-4 px-5 transition-transform duration-500 opacity-0 invisible overflow-y-auto min-h-screen"); + attr_dev(div1, "id", "component-previews"); + attr_dev(div1, "data-test-id", "component-previews"); + toggle_class( + div1, + "translate-x-[255px]", + /*showExamples*/ + ctx[2] + ); + toggle_class( + div1, + "!opacity-100", + /*showExamples*/ + ctx[2] + ); + toggle_class( + div1, + "!visible", + /*showExamples*/ + ctx[2] + ); + add_location(div1, file4, 93, 4, 2748); + attr_dev(div2, "class", "sticky top-0"); + add_location(div2, file4, 71, 2, 1849); + attr_dev(div3, "class", "w-64 bg-white border-slate-100 border-solid border-r svelte-uvq63b"); + attr_dev(div3, "id", "left-sidebar"); + attr_dev(div3, "data-test-id", "left-sidebar"); + add_location(div3, file4, 70, 0, 1734); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div3, anchor); + append_hydration_dev(div3, div2); + append_hydration_dev(div2, div0); + append_hydration_dev(div0, h2); + append_hydration_dev(div2, t1); + append_hydration_dev(div2, ul); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(ul, null); + } + } + append_hydration_dev(div2, t2); + append_hydration_dev(div2, div1); + append_hydration_dev(div1, h4); + append_hydration_dev(h4, t3); + append_hydration_dev(div1, t4); + append_hydration_dev(div1, p); + append_hydration_dev(div1, t6); + if (if_block0) + if_block0.m(div1, null); + insert_hydration_dev(target, t7, anchor); + if (if_block1) + if_block1.m(target, anchor); + insert_hydration_dev(target, if_block1_anchor, anchor); + current = true; + if (!mounted) { + dispose = [ + listen_dev( + div1, + "mouseenter", + /*abortCollapseCategoryMenu*/ + ctx[6], + false, + false, + false, + false + ), + listen_dev( + div1, + "mouseleave", + /*collapseCategoryMenu*/ + ctx[5], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(ctx2, [dirty]) { + if (dirty & /*menuCategories, expandCategoryMenu, collapseCategoryMenu, sectionTitles*/ + 178) { + each_value_1 = ensure_array_like_dev( + /*menuCategories*/ + ctx2[1] + ); + let i; + for (i = 0; i < each_value_1.length; i += 1) { + const child_ctx = get_each_context_1(ctx2, each_value_1, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block_1(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(ul, null); + } + } + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + each_blocks.length = each_value_1.length; + } + if ((!current || dirty & /*$currentComponentCategory*/ + 1) && t3_value !== (t3_value = /*sectionTitles*/ + ctx2[4][ + /*$currentComponentCategory*/ + ctx2[0]?.name + ] + "")) + set_data_dev(t3, t3_value); + if ( + /*currentDefinitions*/ + ctx2[3] + ) { + if (if_block0) { + if_block0.p(ctx2, dirty); + } else { + if_block0 = create_if_block_1(ctx2); + if_block0.c(); + if_block0.m(div1, null); + } + } else if (if_block0) { + if_block0.d(1); + if_block0 = null; + } + if (!current || dirty & /*showExamples*/ + 4) { + toggle_class( + div1, + "translate-x-[255px]", + /*showExamples*/ + ctx2[2] + ); + } + if (!current || dirty & /*showExamples*/ + 4) { + toggle_class( + div1, + "!opacity-100", + /*showExamples*/ + ctx2[2] + ); + } + if (!current || dirty & /*showExamples*/ + 4) { + toggle_class( + div1, + "!visible", + /*showExamples*/ + ctx2[2] + ); + } + if ( + /*showExamples*/ + ctx2[2] + ) { + if (if_block1) { + if (dirty & /*showExamples*/ + 4) { + transition_in(if_block1, 1); + } + } else { + if_block1 = create_if_block2(ctx2); + if_block1.c(); + transition_in(if_block1, 1); + if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); + } + } else if (if_block1) { + group_outros(); + transition_out(if_block1, 1, 1, () => { + if_block1 = null; + }); + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, translate, { x: 384 }, true); + div1_transition.run(1); + }); + } + transition_in(if_block1); + current = true; + }, + o: function outro(local) { + if (local) { + if (!div1_transition) + div1_transition = create_bidirectional_transition(div1, translate, { x: 384 }, false); + div1_transition.run(0); + } + transition_out(if_block1); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div3); + detach_dev(t7); + detach_dev(if_block1_anchor); + } + destroy_each(each_blocks, detaching); + if (if_block0) + if_block0.d(); + if (detaching && div1_transition) + div1_transition.end(); + if (if_block1) + if_block1.d(detaching); + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment4.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance4($$self, $$props, $$invalidate) { + let componentDefinitions; + let componentDefinitionsByCategory; + let currentDefinitions; + let $draggedObject; + let $currentComponentCategory; + validate_store(draggedObject, "draggedObject"); + component_subscribe($$self, draggedObject, ($$value) => $$invalidate(16, $draggedObject = $$value)); + validate_store(currentComponentCategory, "currentComponentCategory"); + component_subscribe($$self, currentComponentCategory, ($$value) => $$invalidate(0, $currentComponentCategory = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("ComponentsSidebar", slots, []); + let { components } = $$props; + let menuCategories = []; + const sectionTitles = { + nav: "Navs", + header: "Headers", + sign_in: "Sign ins", + sign_up: "Sign ups", + stats: "Stats", + footer: "Footers", + basic: "Basics", + other: "Other" + }; + let showExamples = false; + let hideComponentTimer; + function collapseCategoryMenu() { + hideComponentTimer = setTimeout( + () => { + $$invalidate(2, showExamples = false); + }, + 400 + ); + } + function abortCollapseCategoryMenu() { + clearTimeout(hideComponentTimer); + } + function expandCategoryMenu(componentCategory) { + if ($draggedObject) + return; + clearTimeout(hideComponentTimer); + set_store_value(currentComponentCategory, $currentComponentCategory = componentCategory, $currentComponentCategory); + $$invalidate(2, showExamples = true); + } + function dragStart(componentDefinition, e) { + setTimeout( + () => { + set_store_value(draggedObject, $draggedObject = componentDefinition, $draggedObject); + $$invalidate(2, showExamples = false); + }, + 100 + ); + } + function dragEnd() { + set_store_value(draggedObject, $draggedObject = null, $draggedObject); + } + $$self.$$.on_mount.push(function() { + if (components === void 0 && !("components" in $$props || $$self.$$.bound[$$self.$$.props["components"]])) { + console.warn(" was created without expected prop 'components'"); + } + }); + const writable_props = ["components"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + const mouseenter_handler = (item) => expandCategoryMenu(item); + const dragstart_handler = (example, e) => dragStart(example, e); + $$self.$$set = ($$props2) => { + if ("components" in $$props2) + $$invalidate(10, components = $$props2.components); + }; + $$self.$capture_state = () => ({ + fade, + translate, + currentComponentCategory, + draggedObject, + components, + menuCategories, + sectionTitles, + showExamples, + hideComponentTimer, + collapseCategoryMenu, + abortCollapseCategoryMenu, + expandCategoryMenu, + dragStart, + dragEnd, + componentDefinitionsByCategory, + currentDefinitions, + componentDefinitions, + $draggedObject, + $currentComponentCategory + }); + $$self.$inject_state = ($$props2) => { + if ("components" in $$props2) + $$invalidate(10, components = $$props2.components); + if ("menuCategories" in $$props2) + $$invalidate(1, menuCategories = $$props2.menuCategories); + if ("showExamples" in $$props2) + $$invalidate(2, showExamples = $$props2.showExamples); + if ("hideComponentTimer" in $$props2) + hideComponentTimer = $$props2.hideComponentTimer; + if ("componentDefinitionsByCategory" in $$props2) + $$invalidate(11, componentDefinitionsByCategory = $$props2.componentDefinitionsByCategory); + if ("currentDefinitions" in $$props2) + $$invalidate(3, currentDefinitions = $$props2.currentDefinitions); + if ("componentDefinitions" in $$props2) + $$invalidate(12, componentDefinitions = $$props2.componentDefinitions); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*components*/ + 1024) { + $: + $$invalidate(12, componentDefinitions = components); + } + if ($$self.$$.dirty & /*componentDefinitions*/ + 4096) { + $: + $$invalidate(1, menuCategories = [ + { + name: "Base", + items: Array.from(new Set(componentDefinitions.map((d) => d.category))).map((id) => ({ id, name: id })) + } + ]); + } + if ($$self.$$.dirty & /*componentDefinitions*/ + 4096) { + $: + $$invalidate(11, componentDefinitionsByCategory = (componentDefinitions || []).reduce( + (acc, comp) => { + var _a; + acc[_a = comp.category] || (acc[_a] = []); + acc[comp.category].push(comp); + return acc; + }, + {} + )); + } + if ($$self.$$.dirty & /*$currentComponentCategory, componentDefinitionsByCategory*/ + 2049) { + $: + $$invalidate(3, currentDefinitions = $currentComponentCategory ? componentDefinitionsByCategory[$currentComponentCategory.id] : []); + } + }; + return [ + $currentComponentCategory, + menuCategories, + showExamples, + currentDefinitions, + sectionTitles, + collapseCategoryMenu, + abortCollapseCategoryMenu, + expandCategoryMenu, + dragStart, + dragEnd, + components, + componentDefinitionsByCategory, + componentDefinitions, + mouseenter_handler, + dragstart_handler + ]; + } + var ComponentsSidebar = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance4, create_fragment4, safe_not_equal, { components: 10 }, add_css); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "ComponentsSidebar", + options, + id: create_fragment4.name + }); + } + get components() { + return this.$$.ctx[10]; + } + set components(components) { + this.$$set({ components }); + flush(); + } + }; + create_custom_element(ComponentsSidebar, { "components": {} }, [], [], true); + var ComponentsSidebar_default = ComponentsSidebar; + + // svelte/components/LayoutAstNode.svelte + var LayoutAstNode_exports = {}; + __export(LayoutAstNode_exports, { + default: () => LayoutAstNode_default + }); + + // svelte/stores/page.ts + var page = writable(); + var selectedAstElementId = writable(); + var highlightedAstElement = writable(); + var slotTargetElement = writable(); + var rootAstElement = derived([page], ([$page]) => { + return { tag: "root", attrs: {}, content: $page.ast }; + }); + var selectedAstElement = derived( + [page, selectedAstElementId], + ([$page, $selectedAstElementId]) => { + if ($selectedAstElementId) { + if ($selectedAstElementId === "root") + return get_store_value(rootAstElement); + return findAstElement($page.ast, $selectedAstElementId); + } + } + ); + function isAstElement(maybeNode) { + return typeof maybeNode !== "string"; + } + function findAstElement(ast, id) { + let indexes = id.split(".").map((s) => parseInt(s, 10)); + let node = ast[indexes[0]]; + ast = node.content; + for (let i = 1; i < indexes.length; i++) { + node = ast[indexes[i]]; + ast = node.content; + } + return node; + } + function findAstElementId(astNode) { + let $page = get_store_value(page); + return _findAstElementId($page.ast, astNode, ""); + } + function _findAstElementId(ast, astNode, id) { + for (let i = 0; i < ast.length; i++) { + let currentNode = ast[i]; + if (currentNode === astNode) { + return id + i; + } else if (isAstElement(currentNode)) { + let result = _findAstElementId(currentNode.content, astNode, id + i + "."); + if (result) { + return result; + } + } + } + } + + // svelte/components/LayoutAstNode.svelte + var file5 = "svelte/components/LayoutAstNode.svelte"; + function get_each_context2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[3] = list[i]; + child_ctx[5] = i; + return child_ctx; + } + function create_else_block_1(ctx) { + let t; + const block = { + c: function create3() { + t = text( + /*node*/ + ctx[0] + ); + }, + l: function claim(nodes) { + t = claim_text( + nodes, + /*node*/ + ctx[0] + ); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1) + set_data_dev( + t, + /*node*/ + ctx2[0] + ); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_else_block_1.name, + type: "else", + source: "(25:0) {:else}", + ctx + }); + return block; + } + function create_if_block3(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [ + create_if_block_12, + create_if_block_2, + create_if_block_3, + create_if_block_4, + create_if_block_5, + create_else_block + ]; + const if_blocks = []; + function select_block_type_1(ctx2, dirty) { + if ( + /*node*/ + ctx2[0].tag === "html_comment" + ) + return 0; + if ( + /*node*/ + ctx2[0].tag === "eex_comment" + ) + return 1; + if ( + /*node*/ + ctx2[0].tag === "eex" && /*node*/ + ctx2[0].content[0] === "@inner_content" + ) + return 2; + if ( + /*node*/ + ctx2[0].rendered_html + ) + return 3; + if ( + /*node*/ + ctx2[0].attrs?.selfClose + ) + return 4; + return 5; + } + current_block_type_index = select_block_type_1(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + const block = { + c: function create3() { + if_block.c(); + if_block_anchor = empty(); + }, + l: function claim(nodes) { + if_block.l(nodes); + if_block_anchor = empty(); + }, + m: function mount(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert_hydration_dev(target, if_block_anchor, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type_1(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block3.name, + type: "if", + source: "(5:0) {#if isAstElement(node)}", + ctx + }); + return block; + } + function create_else_block(ctx) { + let previous_tag = ( + /*node*/ + ctx[0].tag + ); + let svelte_element_anchor; + let current; + validate_dynamic_element( + /*node*/ + ctx[0].tag + ); + validate_void_dynamic_element( + /*node*/ + ctx[0].tag + ); + let svelte_element = ( + /*node*/ + ctx[0].tag && create_dynamic_element_1(ctx) + ); + const block = { + c: function create3() { + if (svelte_element) + svelte_element.c(); + svelte_element_anchor = empty(); + }, + l: function claim(nodes) { + if (svelte_element) + svelte_element.l(nodes); + svelte_element_anchor = empty(); + }, + m: function mount(target, anchor) { + if (svelte_element) + svelte_element.m(target, anchor); + insert_hydration_dev(target, svelte_element_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if ( + /*node*/ + ctx2[0].tag + ) { + if (!previous_tag) { + svelte_element = create_dynamic_element_1(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else if (safe_not_equal( + previous_tag, + /*node*/ + ctx2[0].tag + )) { + svelte_element.d(1); + validate_dynamic_element( + /*node*/ + ctx2[0].tag + ); + validate_void_dynamic_element( + /*node*/ + ctx2[0].tag + ); + svelte_element = create_dynamic_element_1(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else { + svelte_element.p(ctx2, dirty); + } + } else if (previous_tag) { + svelte_element.d(1); + svelte_element = null; + previous_tag = /*node*/ + ctx2[0].tag; + } + }, + i: noop2, + o: function outro(local) { + transition_out(svelte_element, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element_anchor); + } + if (svelte_element) + svelte_element.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_else_block.name, + type: "else", + source: "(16:2) {:else}", + ctx + }); + return block; + } + function create_if_block_5(ctx) { + let previous_tag = ( + /*node*/ + ctx[0].tag + ); + let svelte_element_anchor; + validate_dynamic_element( + /*node*/ + ctx[0].tag + ); + let svelte_element = ( + /*node*/ + ctx[0].tag && create_dynamic_element(ctx) + ); + const block = { + c: function create3() { + if (svelte_element) + svelte_element.c(); + svelte_element_anchor = empty(); + }, + l: function claim(nodes) { + if (svelte_element) + svelte_element.l(nodes); + svelte_element_anchor = empty(); + }, + m: function mount(target, anchor) { + if (svelte_element) + svelte_element.m(target, anchor); + insert_hydration_dev(target, svelte_element_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if ( + /*node*/ + ctx2[0].tag + ) { + if (!previous_tag) { + svelte_element = create_dynamic_element(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else if (safe_not_equal( + previous_tag, + /*node*/ + ctx2[0].tag + )) { + svelte_element.d(1); + validate_dynamic_element( + /*node*/ + ctx2[0].tag + ); + svelte_element = create_dynamic_element(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else { + svelte_element.p(ctx2, dirty); + } + } else if (previous_tag) { + svelte_element.d(1); + svelte_element = null; + previous_tag = /*node*/ + ctx2[0].tag; + } + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element_anchor); + } + if (svelte_element) + svelte_element.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_5.name, + type: "if", + source: "(14:34) ", + ctx + }); + return block; + } + function create_if_block_4(ctx) { + let html_tag; + let raw_value = ( + /*node*/ + ctx[0].rendered_html + "" + ); + let html_anchor; + const block = { + c: function create3() { + html_tag = new HtmlTagHydration(false); + html_anchor = empty(); + this.h(); + }, + l: function claim(nodes) { + html_tag = claim_html_tag(nodes, false); + html_anchor = empty(); + this.h(); + }, + h: function hydrate() { + html_tag.a = html_anchor; + }, + m: function mount(target, anchor) { + html_tag.m(raw_value, target, anchor); + insert_hydration_dev(target, html_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1 && raw_value !== (raw_value = /*node*/ + ctx2[0].rendered_html + "")) + html_tag.p(raw_value); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(html_anchor); + html_tag.d(); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_4.name, + type: "if", + source: "(12:31) ", + ctx + }); + return block; + } + function create_if_block_3(ctx) { + let current; + const default_slot_template = ( + /*#slots*/ + ctx[2].default + ); + const default_slot = create_slot( + default_slot_template, + ctx, + /*$$scope*/ + ctx[1], + null + ); + const block = { + c: function create3() { + if (default_slot) + default_slot.c(); + }, + l: function claim(nodes) { + if (default_slot) + default_slot.l(nodes); + }, + m: function mount(target, anchor) { + if (default_slot) { + default_slot.m(target, anchor); + } + current = true; + }, + p: function update2(ctx2, dirty) { + if (default_slot) { + if (default_slot.p && (!current || dirty & /*$$scope*/ + 2)) { + update_slot_base( + default_slot, + default_slot_template, + ctx2, + /*$$scope*/ + ctx2[1], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[1] + ) : get_slot_changes( + default_slot_template, + /*$$scope*/ + ctx2[1], + dirty, + null + ), + null + ); + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(default_slot, local); + current = true; + }, + o: function outro(local) { + transition_out(default_slot, local); + current = false; + }, + d: function destroy(detaching) { + if (default_slot) + default_slot.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_3.name, + type: "if", + source: "(10:71) ", + ctx + }); + return block; + } + function create_if_block_2(ctx) { + let html_tag; + let raw_value = ""; + let html_anchor; + const block = { + c: function create3() { + html_tag = new HtmlTagHydration(false); + html_anchor = empty(); + this.h(); + }, + l: function claim(nodes) { + html_tag = claim_html_tag(nodes, false); + html_anchor = empty(); + this.h(); + }, + h: function hydrate() { + html_tag.a = html_anchor; + }, + m: function mount(target, anchor) { + html_tag.m(raw_value, target, anchor); + insert_hydration_dev(target, html_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1 && raw_value !== (raw_value = "")) + html_tag.p(raw_value); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(html_anchor); + html_tag.d(); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_2.name, + type: "if", + source: "(8:39) ", + ctx + }); + return block; + } + function create_if_block_12(ctx) { + let html_tag; + let raw_value = ""; + let html_anchor; + const block = { + c: function create3() { + html_tag = new HtmlTagHydration(false); + html_anchor = empty(); + this.h(); + }, + l: function claim(nodes) { + html_tag = claim_html_tag(nodes, false); + html_anchor = empty(); + this.h(); + }, + h: function hydrate() { + html_tag.a = html_anchor; + }, + m: function mount(target, anchor) { + html_tag.m(raw_value, target, anchor); + insert_hydration_dev(target, html_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1 && raw_value !== (raw_value = "")) + html_tag.p(raw_value); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(html_anchor); + html_tag.d(); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_12.name, + type: "if", + source: '(6:2) {#if node.tag === \\"html_comment\\"}', + ctx + }); + return block; + } + function create_if_block_6(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like_dev( + /*node*/ + ctx[0].content + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block2(get_each_context2(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + const block = { + c: function create3() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + l: function claim(nodes) { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(nodes); + } + each_1_anchor = empty(); + }, + m: function mount(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert_hydration_dev(target, each_1_anchor, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1) { + each_value = ensure_array_like_dev( + /*node*/ + ctx2[0].content + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context2(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block2(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o: function outro(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_6.name, + type: "if", + source: "(18:6) {#if node.content}", + ctx + }); + return block; + } + function create_each_block2(ctx) { + let layoutastnode; + let current; + layoutastnode = new LayoutAstNode({ + props: { node: ( + /*subnode*/ + ctx[3] + ) }, + $$inline: true + }); + const block = { + c: function create3() { + create_component(layoutastnode.$$.fragment); + }, + l: function claim(nodes) { + claim_component(layoutastnode.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(layoutastnode, target, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const layoutastnode_changes = {}; + if (dirty & /*node*/ + 1) + layoutastnode_changes.node = /*subnode*/ + ctx2[3]; + layoutastnode.$set(layoutastnode_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(layoutastnode.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(layoutastnode.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(layoutastnode, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block2.name, + type: "each", + source: "(19:8) {#each node.content as subnode, index}", + ctx + }); + return block; + } + function create_dynamic_element_1(ctx) { + let svelte_element; + let current; + let if_block = ( + /*node*/ + ctx[0].content && create_if_block_6(ctx) + ); + let svelte_element_levels = [ + /*node*/ + ctx[0].attrs + ]; + let svelte_element_data = {}; + for (let i = 0; i < svelte_element_levels.length; i += 1) { + svelte_element_data = assign(svelte_element_data, svelte_element_levels[i]); + } + const block = { + c: function create3() { + svelte_element = element( + /*node*/ + ctx[0].tag + ); + if (if_block) + if_block.c(); + this.h(); + }, + l: function claim(nodes) { + svelte_element = claim_element( + nodes, + /*node*/ + (ctx[0].tag || "null").toUpperCase(), + {} + ); + var svelte_element_nodes = children(svelte_element); + if (if_block) + if_block.l(svelte_element_nodes); + svelte_element_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + set_dynamic_element_data( + /*node*/ + ctx[0].tag + )(svelte_element, svelte_element_data); + add_location(svelte_element, file5, 18, 4, 532); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, svelte_element, anchor); + if (if_block) + if_block.m(svelte_element, null); + current = true; + }, + p: function update2(ctx2, dirty) { + if ( + /*node*/ + ctx2[0].content + ) { + if (if_block) { + if_block.p(ctx2, dirty); + if (dirty & /*node*/ + 1) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block_6(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(svelte_element, null); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); + } + set_dynamic_element_data( + /*node*/ + ctx2[0].tag + )(svelte_element, svelte_element_data = get_spread_update(svelte_element_levels, [dirty & /*node*/ + 1 && /*node*/ + ctx2[0].attrs])); + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element); + } + if (if_block) + if_block.d(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_dynamic_element_1.name, + type: "child_dynamic_element", + source: "(17:4) ", + ctx + }); + return block; + } + function create_dynamic_element(ctx) { + let svelte_element; + let svelte_element_levels = [ + /*node*/ + ctx[0].attrs + ]; + let svelte_element_data = {}; + for (let i = 0; i < svelte_element_levels.length; i += 1) { + svelte_element_data = assign(svelte_element_data, svelte_element_levels[i]); + } + const block = { + c: function create3() { + svelte_element = element( + /*node*/ + ctx[0].tag + ); + this.h(); + }, + l: function claim(nodes) { + svelte_element = claim_element( + nodes, + /*node*/ + (ctx[0].tag || "null").toUpperCase(), + {} + ); + children(svelte_element).forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + set_dynamic_element_data( + /*node*/ + ctx[0].tag + )(svelte_element, svelte_element_data); + add_location(svelte_element, file5, 16, 4, 467); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, svelte_element, anchor); + }, + p: function update2(ctx2, dirty) { + set_dynamic_element_data( + /*node*/ + ctx2[0].tag + )(svelte_element, svelte_element_data = get_spread_update(svelte_element_levels, [dirty & /*node*/ + 1 && /*node*/ + ctx2[0].attrs])); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_dynamic_element.name, + type: "child_dynamic_element", + source: "(15:4) ", + ctx + }); + return block; + } + function create_fragment5(ctx) { + let show_if; + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block3, create_else_block_1]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if (dirty & /*node*/ + 1) + show_if = null; + if (show_if == null) + show_if = !!isAstElement( + /*node*/ + ctx2[0] + ); + if (show_if) + return 0; + return 1; + } + current_block_type_index = select_block_type(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + const block = { + c: function create3() { + if_block.c(); + if_block_anchor = empty(); + }, + l: function claim(nodes) { + if_block.l(nodes); + if_block_anchor = empty(); + }, + m: function mount(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert_hydration_dev(target, if_block_anchor, anchor); + current = true; + }, + p: function update2(ctx2, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment5.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance5($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("LayoutAstNode", slots, ["default"]); + let { node } = $$props; + $$self.$$.on_mount.push(function() { + if (node === void 0 && !("node" in $$props || $$self.$$.bound[$$self.$$.props["node"]])) { + console.warn(" was created without expected prop 'node'"); + } + }); + const writable_props = ["node"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + $$self.$$set = ($$props2) => { + if ("node" in $$props2) + $$invalidate(0, node = $$props2.node); + if ("$$scope" in $$props2) + $$invalidate(1, $$scope = $$props2.$$scope); + }; + $$self.$capture_state = () => ({ isAstElement, node }); + $$self.$inject_state = ($$props2) => { + if ("node" in $$props2) + $$invalidate(0, node = $$props2.node); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + return [node, $$scope, slots]; + } + var LayoutAstNode = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance5, create_fragment5, safe_not_equal, { node: 0 }); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "LayoutAstNode", + options, + id: create_fragment5.name + }); + } + get node() { + return this.$$.ctx[0]; + } + set node(node) { + this.$$set({ node }); + flush(); + } + }; + create_custom_element(LayoutAstNode, { "node": {} }, ["default"], [], true); + var LayoutAstNode_default = LayoutAstNode; + + // svelte/components/PageAstNode.svelte + var PageAstNode_exports = {}; + __export(PageAstNode_exports, { + default: () => PageAstNode_default + }); + var file6 = "svelte/components/PageAstNode.svelte"; + function get_each_context3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[16] = list[i]; + child_ctx[18] = i; + return child_ctx; + } + function create_else_block_12(ctx) { + let t; + const block = { + c: function create3() { + t = text( + /*node*/ + ctx[0] + ); + }, + l: function claim(nodes) { + t = claim_text( + nodes, + /*node*/ + ctx[0] + ); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1) + set_data_dev( + t, + /*node*/ + ctx2[0] + ); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_else_block_12.name, + type: "else", + source: "(106:0) {:else}", + ctx + }); + return block; + } + function create_if_block4(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [ + create_if_block_13, + create_if_block_22, + create_if_block_32, + create_if_block_42, + create_if_block_52, + create_else_block2 + ]; + const if_blocks = []; + function select_block_type_1(ctx2, dirty) { + if ( + /*node*/ + ctx2[0].tag === "html_comment" + ) + return 0; + if ( + /*node*/ + ctx2[0].tag === "eex_comment" + ) + return 1; + if ( + /*node*/ + ctx2[0].tag === "eex" && /*node*/ + ctx2[0].content[0] === "@inner_content" + ) + return 2; + if ( + /*node*/ + ctx2[0].rendered_html + ) + return 3; + if ( + /*node*/ + ctx2[0].attrs?.selfClose + ) + return 4; + return 5; + } + current_block_type_index = select_block_type_1(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + const block = { + c: function create3() { + if_block.c(); + if_block_anchor = empty(); + }, + l: function claim(nodes) { + if_block.l(nodes); + if_block_anchor = empty(); + }, + m: function mount(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert_hydration_dev(target, if_block_anchor, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type_1(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block4.name, + type: "if", + source: "(58:0) {#if isAstElement(node)}", + ctx + }); + return block; + } + function create_else_block2(ctx) { + let previous_tag = ( + /*node*/ + ctx[0].tag + ); + let svelte_element_anchor; + let current; + validate_dynamic_element( + /*node*/ + ctx[0].tag + ); + validate_void_dynamic_element( + /*node*/ + ctx[0].tag + ); + let svelte_element = ( + /*node*/ + ctx[0].tag && create_dynamic_element_12(ctx) + ); + const block = { + c: function create3() { + if (svelte_element) + svelte_element.c(); + svelte_element_anchor = empty(); + }, + l: function claim(nodes) { + if (svelte_element) + svelte_element.l(nodes); + svelte_element_anchor = empty(); + }, + m: function mount(target, anchor) { + if (svelte_element) + svelte_element.m(target, anchor); + insert_hydration_dev(target, svelte_element_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if ( + /*node*/ + ctx2[0].tag + ) { + if (!previous_tag) { + svelte_element = create_dynamic_element_12(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else if (safe_not_equal( + previous_tag, + /*node*/ + ctx2[0].tag + )) { + svelte_element.d(1); + validate_dynamic_element( + /*node*/ + ctx2[0].tag + ); + validate_void_dynamic_element( + /*node*/ + ctx2[0].tag + ); + svelte_element = create_dynamic_element_12(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else { + svelte_element.p(ctx2, dirty); + } + } else if (previous_tag) { + svelte_element.d(1); + svelte_element = null; + previous_tag = /*node*/ + ctx2[0].tag; + } + }, + i: noop2, + o: function outro(local) { + transition_out(svelte_element, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element_anchor); + } + if (svelte_element) + svelte_element.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_else_block2.name, + type: "else", + source: "(88:2) {:else}", + ctx + }); + return block; + } + function create_if_block_52(ctx) { + let previous_tag = ( + /*node*/ + ctx[0].tag + ); + let svelte_element_anchor; + validate_dynamic_element( + /*node*/ + ctx[0].tag + ); + let svelte_element = ( + /*node*/ + ctx[0].tag && create_dynamic_element2(ctx) + ); + const block = { + c: function create3() { + if (svelte_element) + svelte_element.c(); + svelte_element_anchor = empty(); + }, + l: function claim(nodes) { + if (svelte_element) + svelte_element.l(nodes); + svelte_element_anchor = empty(); + }, + m: function mount(target, anchor) { + if (svelte_element) + svelte_element.m(target, anchor); + insert_hydration_dev(target, svelte_element_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if ( + /*node*/ + ctx2[0].tag + ) { + if (!previous_tag) { + svelte_element = create_dynamic_element2(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else if (safe_not_equal( + previous_tag, + /*node*/ + ctx2[0].tag + )) { + svelte_element.d(1); + validate_dynamic_element( + /*node*/ + ctx2[0].tag + ); + svelte_element = create_dynamic_element2(ctx2); + previous_tag = /*node*/ + ctx2[0].tag; + svelte_element.c(); + svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor); + } else { + svelte_element.p(ctx2, dirty); + } + } else if (previous_tag) { + svelte_element.d(1); + svelte_element = null; + previous_tag = /*node*/ + ctx2[0].tag; + } + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element_anchor); + } + if (svelte_element) + svelte_element.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_52.name, + type: "if", + source: "(75:34) ", + ctx + }); + return block; + } + function create_if_block_42(ctx) { + let div; + let html_tag; + let raw_value = ( + /*node*/ + ctx[0].rendered_html + "" + ); + let highlightContent_action; + let mounted; + let dispose; + const block = { + c: function create3() { + div = element("div"); + html_tag = new HtmlTagHydration(false); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { class: true }); + var div_nodes = children(div); + html_tag = claim_html_tag(div_nodes, false); + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + html_tag.a = null; + attr_dev(div, "class", "contents"); + add_location(div, file6, 79, 4, 2659); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + html_tag.m(raw_value, div); + if (!mounted) { + dispose = [ + listen_dev(div, "mouseover", stop_propagation( + /*handleMouseOver*/ + ctx[8] + ), false, false, true, false), + listen_dev(div, "mouseout", stop_propagation( + /*handleMouseOut*/ + ctx[9] + ), false, false, true, false), + listen_dev(div, "click", stop_propagation(prevent_default( + /*click_handler*/ + ctx[13] + )), false, true, true, false), + action_destroyer(highlightContent_action = highlightContent.call(null, div, { + selected: ( + /*$selectedAstElement*/ + ctx[5] === /*node*/ + ctx[0] + ), + highlighted: ( + /*$highlightedAstElement*/ + ctx[3] === /*node*/ + ctx[0] + ) + })) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1 && raw_value !== (raw_value = /*node*/ + ctx2[0].rendered_html + "")) + html_tag.p(raw_value); + if (highlightContent_action && is_function(highlightContent_action.update) && dirty & /*$selectedAstElement, node, $highlightedAstElement*/ + 41) + highlightContent_action.update.call(null, { + selected: ( + /*$selectedAstElement*/ + ctx2[5] === /*node*/ + ctx2[0] + ), + highlighted: ( + /*$highlightedAstElement*/ + ctx2[3] === /*node*/ + ctx2[0] + ) + }); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_42.name, + type: "if", + source: "(65:31) ", + ctx + }); + return block; + } + function create_if_block_32(ctx) { + let current; + const default_slot_template = ( + /*#slots*/ + ctx[12].default + ); + const default_slot = create_slot( + default_slot_template, + ctx, + /*$$scope*/ + ctx[11], + null + ); + const block = { + c: function create3() { + if (default_slot) + default_slot.c(); + }, + l: function claim(nodes) { + if (default_slot) + default_slot.l(nodes); + }, + m: function mount(target, anchor) { + if (default_slot) { + default_slot.m(target, anchor); + } + current = true; + }, + p: function update2(ctx2, dirty) { + if (default_slot) { + if (default_slot.p && (!current || dirty & /*$$scope*/ + 2048)) { + update_slot_base( + default_slot, + default_slot_template, + ctx2, + /*$$scope*/ + ctx2[11], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[11] + ) : get_slot_changes( + default_slot_template, + /*$$scope*/ + ctx2[11], + dirty, + null + ), + null + ); + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(default_slot, local); + current = true; + }, + o: function outro(local) { + transition_out(default_slot, local); + current = false; + }, + d: function destroy(detaching) { + if (default_slot) + default_slot.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_32.name, + type: "if", + source: "(63:71) ", + ctx + }); + return block; + } + function create_if_block_22(ctx) { + let html_tag; + let raw_value = ""; + let html_anchor; + const block = { + c: function create3() { + html_tag = new HtmlTagHydration(false); + html_anchor = empty(); + this.h(); + }, + l: function claim(nodes) { + html_tag = claim_html_tag(nodes, false); + html_anchor = empty(); + this.h(); + }, + h: function hydrate() { + html_tag.a = html_anchor; + }, + m: function mount(target, anchor) { + html_tag.m(raw_value, target, anchor); + insert_hydration_dev(target, html_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1 && raw_value !== (raw_value = "")) + html_tag.p(raw_value); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(html_anchor); + html_tag.d(); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_22.name, + type: "if", + source: "(61:39) ", + ctx + }); + return block; + } + function create_if_block_13(ctx) { + let html_tag; + let raw_value = ""; + let html_anchor; + const block = { + c: function create3() { + html_tag = new HtmlTagHydration(false); + html_anchor = empty(); + this.h(); + }, + l: function claim(nodes) { + html_tag = claim_html_tag(nodes, false); + html_anchor = empty(); + this.h(); + }, + h: function hydrate() { + html_tag.a = html_anchor; + }, + m: function mount(target, anchor) { + html_tag.m(raw_value, target, anchor); + insert_hydration_dev(target, html_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node*/ + 1 && raw_value !== (raw_value = "")) + html_tag.p(raw_value); + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(html_anchor); + html_tag.d(); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_13.name, + type: "if", + source: '(59:2) {#if node.tag === \\"html_comment\\"}', + ctx + }); + return block; + } + function create_each_block3(ctx) { + let pageastnode; + let current; + pageastnode = new PageAstNode({ + props: { + node: ( + /*subnode*/ + ctx[16] + ), + nodeId: ( + /*nodeId*/ + ctx[1] + "." + /*index*/ + ctx[18] + ) + }, + $$inline: true + }); + const block = { + c: function create3() { + create_component(pageastnode.$$.fragment); + }, + l: function claim(nodes) { + claim_component(pageastnode.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(pageastnode, target, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const pageastnode_changes = {}; + if (dirty & /*node*/ + 1) + pageastnode_changes.node = /*subnode*/ + ctx2[16]; + if (dirty & /*nodeId*/ + 2) + pageastnode_changes.nodeId = /*nodeId*/ + ctx2[1] + "." + /*index*/ + ctx2[18]; + pageastnode.$set(pageastnode_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(pageastnode.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(pageastnode.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(pageastnode, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block3.name, + type: "each", + source: "(101:6) {#each node.content as subnode, index}", + ctx + }); + return block; + } + function create_dynamic_element_12(ctx) { + let svelte_element; + let svelte_element_data_selected_value; + let svelte_element_data_highlighted_value; + let svelte_element_data_slot_target_value; + let current; + let mounted; + let dispose; + let each_value = ensure_array_like_dev( + /*node*/ + ctx[0].content + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block3(get_each_context3(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + let svelte_element_levels = [ + /*node*/ + ctx[0].attrs, + { + "data-selected": svelte_element_data_selected_value = /*$selectedAstElement*/ + ctx[5] === /*node*/ + ctx[0] + }, + { + "data-highlighted": svelte_element_data_highlighted_value = /*$highlightedAstElement*/ + ctx[3] === /*node*/ + ctx[0] + }, + { + "data-slot-target": svelte_element_data_slot_target_value = /*$slotTargetElement*/ + ctx[4] === /*node*/ + ctx[0] + } + ]; + let svelte_element_data = {}; + for (let i = 0; i < svelte_element_levels.length; i += 1) { + svelte_element_data = assign(svelte_element_data, svelte_element_levels[i]); + } + const block = { + c: function create3() { + svelte_element = element( + /*node*/ + ctx[0].tag + ); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + this.h(); + }, + l: function claim(nodes) { + svelte_element = claim_element( + nodes, + /*node*/ + (ctx[0].tag || "null").toUpperCase(), + { + "data-selected": true, + "data-highlighted": true, + "data-slot-target": true + } + ); + var svelte_element_nodes = children(svelte_element); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(svelte_element_nodes); + } + svelte_element_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + set_dynamic_element_data( + /*node*/ + ctx[0].tag + )(svelte_element, svelte_element_data); + add_location(svelte_element, file6, 102, 4, 3636); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, svelte_element, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(svelte_element, null); + } + } + current = true; + if (!mounted) { + dispose = [ + listen_dev(svelte_element, "dragenter", stop_propagation( + /*handleDragEnter*/ + ctx[6] + ), false, false, true, false), + listen_dev(svelte_element, "dragleave", stop_propagation( + /*handleDragLeave*/ + ctx[7] + ), false, false, true, false), + listen_dev(svelte_element, "mouseover", stop_propagation( + /*handleMouseOver*/ + ctx[8] + ), false, false, true, false), + listen_dev(svelte_element, "mouseout", stop_propagation( + /*handleMouseOut*/ + ctx[9] + ), false, false, true, false), + listen_dev(svelte_element, "click", stop_propagation(prevent_default( + /*click_handler_1*/ + ctx[14] + )), false, true, true, false) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty & /*node, nodeId*/ + 3) { + each_value = ensure_array_like_dev( + /*node*/ + ctx2[0].content + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context3(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block3(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(svelte_element, null); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + set_dynamic_element_data( + /*node*/ + ctx2[0].tag + )(svelte_element, svelte_element_data = get_spread_update(svelte_element_levels, [ + dirty & /*node*/ + 1 && /*node*/ + ctx2[0].attrs, + (!current || dirty & /*$selectedAstElement, node*/ + 33 && svelte_element_data_selected_value !== (svelte_element_data_selected_value = /*$selectedAstElement*/ + ctx2[5] === /*node*/ + ctx2[0])) && { + "data-selected": svelte_element_data_selected_value + }, + (!current || dirty & /*$highlightedAstElement, node*/ + 9 && svelte_element_data_highlighted_value !== (svelte_element_data_highlighted_value = /*$highlightedAstElement*/ + ctx2[3] === /*node*/ + ctx2[0])) && { + "data-highlighted": svelte_element_data_highlighted_value + }, + (!current || dirty & /*$slotTargetElement, node*/ + 17 && svelte_element_data_slot_target_value !== (svelte_element_data_slot_target_value = /*$slotTargetElement*/ + ctx2[4] === /*node*/ + ctx2[0])) && { + "data-slot-target": svelte_element_data_slot_target_value + } + ])); + }, + i: function intro(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o: function outro(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element); + } + destroy_each(each_blocks, detaching); + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_dynamic_element_12.name, + type: "child_dynamic_element", + source: "(89:4) ($selectedAstElementId = nodeId)} >", + ctx + }); + return block; + } + function create_dynamic_element2(ctx) { + let svelte_element; + let svelte_element_data_selected_value; + let svelte_element_data_highlighted_value; + let svelte_element_data_slot_target_value; + let mounted; + let dispose; + let svelte_element_levels = [ + /*node*/ + ctx[0].attrs, + { + "data-selected": svelte_element_data_selected_value = /*$selectedAstElement*/ + ctx[5] === /*node*/ + ctx[0] + }, + { + "data-highlighted": svelte_element_data_highlighted_value = /*$highlightedAstElement*/ + ctx[3] === /*node*/ + ctx[0] + }, + { + "data-slot-target": svelte_element_data_slot_target_value = /*$slotTargetElement*/ + ctx[4] === /*node*/ + ctx[0] && !/*$slotTargetElement*/ + ctx[4].attrs.selfClose + } + ]; + let svelte_element_data = {}; + for (let i = 0; i < svelte_element_levels.length; i += 1) { + svelte_element_data = assign(svelte_element_data, svelte_element_levels[i]); + } + const block = { + c: function create3() { + svelte_element = element( + /*node*/ + ctx[0].tag + ); + this.h(); + }, + l: function claim(nodes) { + svelte_element = claim_element( + nodes, + /*node*/ + (ctx[0].tag || "null").toUpperCase(), + { + "data-selected": true, + "data-highlighted": true, + "data-slot-target": true + } + ); + children(svelte_element).forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + set_dynamic_element_data( + /*node*/ + ctx[0].tag + )(svelte_element, svelte_element_data); + add_location(svelte_element, file6, 89, 4, 3085); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, svelte_element, anchor); + if (!mounted) { + dispose = [ + listen_dev(svelte_element, "dragenter", stop_propagation( + /*handleDragEnter*/ + ctx[6] + ), false, false, true, false), + listen_dev(svelte_element, "dragleave", stop_propagation( + /*handleDragLeave*/ + ctx[7] + ), false, false, true, false), + listen_dev(svelte_element, "mouseover", stop_propagation( + /*handleMouseOver*/ + ctx[8] + ), false, false, true, false), + listen_dev(svelte_element, "mouseout", stop_propagation( + /*handleMouseOut*/ + ctx[9] + ), false, false, true, false), + listen_dev(svelte_element, "click", stop_propagation(prevent_default( + /*handleClick*/ + ctx[10] + )), false, true, true, false) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + set_dynamic_element_data( + /*node*/ + ctx2[0].tag + )(svelte_element, svelte_element_data = get_spread_update(svelte_element_levels, [ + dirty & /*node*/ + 1 && /*node*/ + ctx2[0].attrs, + dirty & /*$selectedAstElement, node*/ + 33 && svelte_element_data_selected_value !== (svelte_element_data_selected_value = /*$selectedAstElement*/ + ctx2[5] === /*node*/ + ctx2[0]) && { + "data-selected": svelte_element_data_selected_value + }, + dirty & /*$highlightedAstElement, node*/ + 9 && svelte_element_data_highlighted_value !== (svelte_element_data_highlighted_value = /*$highlightedAstElement*/ + ctx2[3] === /*node*/ + ctx2[0]) && { + "data-highlighted": svelte_element_data_highlighted_value + }, + dirty & /*$slotTargetElement, node*/ + 17 && svelte_element_data_slot_target_value !== (svelte_element_data_slot_target_value = /*$slotTargetElement*/ + ctx2[4] === /*node*/ + ctx2[0] && !/*$slotTargetElement*/ + ctx2[4].attrs.selfClose) && { + "data-slot-target": svelte_element_data_slot_target_value + } + ])); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(svelte_element); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_dynamic_element2.name, + type: "child_dynamic_element", + source: "(76:4) ", + ctx + }); + return block; + } + function create_fragment6(ctx) { + let show_if; + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block4, create_else_block_12]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if (dirty & /*node*/ + 1) + show_if = null; + if (show_if == null) + show_if = !!isAstElement( + /*node*/ + ctx2[0] + ); + if (show_if) + return 0; + return 1; + } + current_block_type_index = select_block_type(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + const block = { + c: function create3() { + if_block.c(); + if_block_anchor = empty(); + }, + l: function claim(nodes) { + if_block.l(nodes); + if_block_anchor = empty(); + }, + m: function mount(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert_hydration_dev(target, if_block_anchor, anchor); + current = true; + }, + p: function update2(ctx2, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment6.name, + type: "component", + source: "", + ctx + }); + return block; + } + function highlightContent(wrapperDiv, { selected, highlighted }) { + let startsWithOneChildren = wrapperDiv.children.length === 1; + if (startsWithOneChildren) { + let child = wrapperDiv.children[0]; + child.setAttribute("data-selected", String(selected)); + child.setAttribute("data-highlighted", String(highlighted)); + } + return { + update({ selected: selected2, highlighted: highlighted2 }) { + if (wrapperDiv.children.length === 1) { + let child = wrapperDiv.children[0]; + child.setAttribute("data-selected", String(selected2)); + child.setAttribute("data-highlighted", String(highlighted2)); + } else if (wrapperDiv.children.length === 0 && wrapperDiv.childNodes.length === 1) { + wrapperDiv.setAttribute("data-nochildren", "true"); + wrapperDiv.setAttribute("data-selected", String(selected2)); + wrapperDiv.setAttribute("data-highlighted", String(highlighted2)); + } else if (startsWithOneChildren) { + Array.from(wrapperDiv.children).forEach((child) => { + child.removeAttribute("data-selected"); + child.removeAttribute("data-highlighted"); + }); + } + }, + destroy() { + } + // noop + // noop + }; + } + function instance6($$self, $$props, $$invalidate) { + let $selectedAstElementId; + let $highlightedAstElement; + let $slotTargetElement; + let $draggedObject; + let $selectedAstElement; + validate_store(selectedAstElementId, "selectedAstElementId"); + component_subscribe($$self, selectedAstElementId, ($$value) => $$invalidate(2, $selectedAstElementId = $$value)); + validate_store(highlightedAstElement, "highlightedAstElement"); + component_subscribe($$self, highlightedAstElement, ($$value) => $$invalidate(3, $highlightedAstElement = $$value)); + validate_store(slotTargetElement, "slotTargetElement"); + component_subscribe($$self, slotTargetElement, ($$value) => $$invalidate(4, $slotTargetElement = $$value)); + validate_store(draggedObject, "draggedObject"); + component_subscribe($$self, draggedObject, ($$value) => $$invalidate(15, $draggedObject = $$value)); + validate_store(selectedAstElement, "selectedAstElement"); + component_subscribe($$self, selectedAstElement, ($$value) => $$invalidate(5, $selectedAstElement = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("PageAstNode", slots, ["default"]); + let { node } = $$props; + let { nodeId } = $$props; + function handleDragEnter() { + if (isAstElement(node) && ($draggedObject === null || $draggedObject === void 0 ? void 0 : $draggedObject.category) === "basic") { + set_store_value(slotTargetElement, $slotTargetElement = node, $slotTargetElement); + } + } + function handleDragLeave() { + if (isAstElement(node) && ($draggedObject === null || $draggedObject === void 0 ? void 0 : $draggedObject.category) === "basic" && $slotTargetElement === node) { + set_store_value(slotTargetElement, $slotTargetElement = void 0, $slotTargetElement); + } + } + function handleMouseOver() { + isAstElement(node) && set_store_value(highlightedAstElement, $highlightedAstElement = node, $highlightedAstElement); + } + function handleMouseOut() { + set_store_value(highlightedAstElement, $highlightedAstElement = void 0, $highlightedAstElement); + } + function handleClick() { + set_store_value(selectedAstElementId, $selectedAstElementId = nodeId, $selectedAstElementId); + } + $$self.$$.on_mount.push(function() { + if (node === void 0 && !("node" in $$props || $$self.$$.bound[$$self.$$.props["node"]])) { + console.warn(" was created without expected prop 'node'"); + } + if (nodeId === void 0 && !("nodeId" in $$props || $$self.$$.bound[$$self.$$.props["nodeId"]])) { + console.warn(" was created without expected prop 'nodeId'"); + } + }); + const writable_props = ["node", "nodeId"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + const click_handler = () => set_store_value(selectedAstElementId, $selectedAstElementId = nodeId, $selectedAstElementId); + const click_handler_1 = () => set_store_value(selectedAstElementId, $selectedAstElementId = nodeId, $selectedAstElementId); + $$self.$$set = ($$props2) => { + if ("node" in $$props2) + $$invalidate(0, node = $$props2.node); + if ("nodeId" in $$props2) + $$invalidate(1, nodeId = $$props2.nodeId); + if ("$$scope" in $$props2) + $$invalidate(11, $$scope = $$props2.$$scope); + }; + $$self.$capture_state = () => ({ + selectedAstElement, + slotTargetElement, + selectedAstElementId, + highlightedAstElement, + isAstElement, + node, + nodeId, + draggedObject, + handleDragEnter, + handleDragLeave, + handleMouseOver, + handleMouseOut, + handleClick, + highlightContent, + $selectedAstElementId, + $highlightedAstElement, + $slotTargetElement, + $draggedObject, + $selectedAstElement + }); + $$self.$inject_state = ($$props2) => { + if ("node" in $$props2) + $$invalidate(0, node = $$props2.node); + if ("nodeId" in $$props2) + $$invalidate(1, nodeId = $$props2.nodeId); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + return [ + node, + nodeId, + $selectedAstElementId, + $highlightedAstElement, + $slotTargetElement, + $selectedAstElement, + handleDragEnter, + handleDragLeave, + handleMouseOver, + handleMouseOut, + handleClick, + $$scope, + slots, + click_handler, + click_handler_1 + ]; + } + var PageAstNode = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance6, create_fragment6, safe_not_equal, { node: 0, nodeId: 1 }); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "PageAstNode", + options, + id: create_fragment6.name + }); + } + get node() { + return this.$$.ctx[0]; + } + set node(node) { + this.$$set({ node }); + flush(); + } + get nodeId() { + return this.$$.ctx[1]; + } + set nodeId(nodeId) { + this.$$set({ nodeId }); + flush(); + } + }; + create_custom_element(PageAstNode, { "node": {}, "nodeId": {} }, ["default"], [], true); + var PageAstNode_default = PageAstNode; + + // svelte/components/PagePreview.svelte + var PagePreview_exports = {}; + __export(PagePreview_exports, { + default: () => PagePreview_default + }); + var file7 = "svelte/components/PagePreview.svelte"; + function add_css2(target) { + append_styles(target, "svelte-1fsqk14", '.contents[data-nochildren="true"], .contents[data-nochildren="true"]{display:inline}[data-slot-target="true"]{outline-color:red;outline-width:2px;outline-style:dashed}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGFnZVByZXZpZXcuc3ZlbHRlIiwibWFwcGluZ3MiOiJBQWtGVSxvRUFBc0UsQ0FJNUUsT0FBTyxDQUFFLE1BQ1gsQ0FDUSx5QkFBMkIsQ0FDakMsYUFBYSxDQUFFLEdBQUcsQ0FDbEIsYUFBYSxDQUFFLEdBQUcsQ0FDbEIsYUFBYSxDQUFFLE1BQ2pCIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIlBhZ2VQcmV2aWV3LnN2ZWx0ZSJdfQ== */'); + } + function create_if_block5(ctx) { + let browserframe; + let current; + browserframe = new BrowserFrame_default({ + props: { + page: ( + /*$page*/ + ctx[1] + ), + $$slots: { default: [create_default_slot] }, + $$scope: { ctx } + }, + $$inline: true + }); + const block = { + c: function create3() { + create_component(browserframe.$$.fragment); + }, + l: function claim(nodes) { + claim_component(browserframe.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(browserframe, target, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const browserframe_changes = {}; + if (dirty & /*$page*/ + 2) + browserframe_changes.page = /*$page*/ + ctx2[1]; + if (dirty & /*$$scope, isDraggingOver, $selectedAstElementId*/ + 2053) { + browserframe_changes.$$scope = { dirty, ctx: ctx2 }; + } + browserframe.$set(browserframe_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(browserframe.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(browserframe.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(browserframe, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block5.name, + type: "if", + source: "(63:2) {#if $page}", + ctx + }); + return block; + } + function create_default_slot(ctx) { + let div1; + let div0; + let page_wrapper; + let div0_data_selected_value; + let div1_class_value; + let mounted; + let dispose; + const block = { + c: function create3() { + div1 = element("div"); + div0 = element("div"); + page_wrapper = element("page-wrapper"); + this.h(); + }, + l: function claim(nodes) { + div1 = claim_element(nodes, "DIV", { + role: true, + style: true, + id: true, + class: true, + "data-test-id": true + }); + var div1_nodes = children(div1); + div0 = claim_element(div1_nodes, "DIV", { + id: true, + class: true, + "data-selected": true + }); + var div0_nodes = children(div0); + page_wrapper = claim_element(div0_nodes, "PAGE-WRAPPER", {}); + children(page_wrapper).forEach(detach_dev); + div0_nodes.forEach(detach_dev); + div1_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + add_location(page_wrapper, file7, 69, 10, 3394); + attr_dev(div0, "id", "page-wrapper"); + attr_dev(div0, "class", "p-1 m-1"); + attr_dev(div0, "data-selected", div0_data_selected_value = /*$selectedAstElementId*/ + ctx[2] === "root"); + add_location(div0, file7, 68, 8, 3295); + attr_dev(div1, "role", "document"); + set_style(div1, "--outlined-id", "title-1"); + attr_dev(div1, "id", "fake-browser-content"); + attr_dev(div1, "class", div1_class_value = "bg-white rounded-b-xl relative overflow-hidden flex-1 " + /*isDraggingOver*/ + (ctx[0] && "border-dashed border-blue-500 border-2")); + attr_dev(div1, "data-test-id", "browser-content"); + add_location(div1, file7, 58, 6, 2903); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div1, anchor); + append_hydration_dev(div1, div0); + append_hydration_dev(div0, page_wrapper); + if (!mounted) { + dispose = [ + listen_dev(div1, "drop", prevent_default( + /*handleDragDrop*/ + ctx[3] + ), false, true, false, false), + listen_dev(div1, "dragover", prevent_default( + /*dragOver*/ + ctx[4] + ), false, true, false, false) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty & /*$selectedAstElementId*/ + 4 && div0_data_selected_value !== (div0_data_selected_value = /*$selectedAstElementId*/ + ctx2[2] === "root")) { + attr_dev(div0, "data-selected", div0_data_selected_value); + } + if (dirty & /*isDraggingOver*/ + 1 && div1_class_value !== (div1_class_value = "bg-white rounded-b-xl relative overflow-hidden flex-1 " + /*isDraggingOver*/ + (ctx2[0] && "border-dashed border-blue-500 border-2"))) { + attr_dev(div1, "class", div1_class_value); + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div1); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_default_slot.name, + type: "slot", + source: "(64:4) ", + ctx + }); + return block; + } + function create_fragment7(ctx) { + let div; + let current; + let if_block = ( + /*$page*/ + ctx[1] && create_if_block5(ctx) + ); + const block = { + c: function create3() { + div = element("div"); + if (if_block) + if_block.c(); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { class: true, "data-test-id": true }); + var div_nodes = children(div); + if (if_block) + if_block.l(div_nodes); + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "flex-1 px-8 pb-4 flex max-h-full"); + attr_dev(div, "data-test-id", "main"); + add_location(div, file7, 55, 0, 2784); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + if (if_block) + if_block.m(div, null); + current = true; + }, + p: function update2(ctx2, [dirty]) { + if ( + /*$page*/ + ctx2[1] + ) { + if (if_block) { + if_block.p(ctx2, dirty); + if (dirty & /*$page*/ + 2) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block5(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(div, null); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + if (if_block) + if_block.d(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment7.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance7($$self, $$props, $$invalidate) { + let $page; + let $slotTargetElement; + let $draggedObject; + let $currentComponentCategory; + let $selectedAstElementId; + validate_store(page, "page"); + component_subscribe($$self, page, ($$value) => $$invalidate(1, $page = $$value)); + validate_store(slotTargetElement, "slotTargetElement"); + component_subscribe($$self, slotTargetElement, ($$value) => $$invalidate(6, $slotTargetElement = $$value)); + validate_store(draggedObject, "draggedObject"); + component_subscribe($$self, draggedObject, ($$value) => $$invalidate(7, $draggedObject = $$value)); + validate_store(currentComponentCategory, "currentComponentCategory"); + component_subscribe($$self, currentComponentCategory, ($$value) => $$invalidate(8, $currentComponentCategory = $$value)); + validate_store(selectedAstElementId, "selectedAstElementId"); + component_subscribe($$self, selectedAstElementId, ($$value) => $$invalidate(2, $selectedAstElementId = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("PagePreview", slots, []); + var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + let { live } = $$props; + let isDraggingOver = false; + function handleDragDrop(e) { + return __awaiter(this, void 0, void 0, function* () { + let { target } = e; + set_store_value(currentComponentCategory, $currentComponentCategory = null, $currentComponentCategory); + if (!$draggedObject) + return; + if ($draggedObject.category === "basic") { + if (!(target instanceof HTMLElement)) + return; + if (target.id === "fake-browser-content") + return; + if (!$slotTargetElement) + return; + if ($slotTargetElement.attrs.selfClose) + return; + addBasicComponentToTarget2($slotTargetElement); + } else { + live.pushEvent( + "render_component_in_page", + { + component_id: $draggedObject.id, + page_id: $page.id + }, + ({ ast }) => { + live.pushEvent("update_page_ast", { + id: $page.id, + ast: [...$page.ast, ...ast] + }); + } + ); + } + $$invalidate(0, isDraggingOver = false); + }); + } + function addBasicComponentToTarget2(astElement) { + return __awaiter(this, void 0, void 0, function* () { + if (!$draggedObject) + return; + let componentDefinition = $draggedObject; + set_store_value(draggedObject, $draggedObject = null, $draggedObject); + let targetNode = astElement; + live.pushEvent( + "render_component_in_page", + { + component_id: componentDefinition.id, + page_id: $page.id + }, + ({ ast }) => { + targetNode === null || targetNode === void 0 ? void 0 : targetNode.content.push(...ast); + set_store_value(slotTargetElement, $slotTargetElement = void 0, $slotTargetElement); + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + } + ); + }); + } + function dragOver() { + $$invalidate(0, isDraggingOver = true); + } + $$self.$$.on_mount.push(function() { + if (live === void 0 && !("live" in $$props || $$self.$$.bound[$$self.$$.props["live"]])) { + console.warn(" was created without expected prop 'live'"); + } + }); + const writable_props = ["live"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + $$self.$$set = ($$props2) => { + if ("live" in $$props2) + $$invalidate(5, live = $$props2.live); + }; + $$self.$capture_state = () => ({ + __awaiter, + BrowserFrame: BrowserFrame_default, + selectedAstElementId, + currentComponentCategory, + page, + slotTargetElement, + draggedObject, + live, + isDraggingOver, + handleDragDrop, + addBasicComponentToTarget: addBasicComponentToTarget2, + dragOver, + $page, + $slotTargetElement, + $draggedObject, + $currentComponentCategory, + $selectedAstElementId + }); + $$self.$inject_state = ($$props2) => { + if ("__awaiter" in $$props2) + __awaiter = $$props2.__awaiter; + if ("live" in $$props2) + $$invalidate(5, live = $$props2.live); + if ("isDraggingOver" in $$props2) + $$invalidate(0, isDraggingOver = $$props2.isDraggingOver); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + return [isDraggingOver, $page, $selectedAstElementId, handleDragDrop, dragOver, live]; + } + var PagePreview = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance7, create_fragment7, safe_not_equal, { live: 5 }, add_css2); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "PagePreview", + options, + id: create_fragment7.name + }); + } + get live() { + return this.$$.ctx[5]; + } + set live(live) { + this.$$set({ live }); + flush(); + } + }; + create_custom_element(PagePreview, { "live": {} }, [], [], true); + var PagePreview_default = PagePreview; + + // svelte/components/PageWrapper.svelte + var PageWrapper_exports = {}; + __export(PageWrapper_exports, { + default: () => PageWrapper_default + }); + + // svelte/stores/tailwindConfig.ts + var tailwindConfig = writable(); + + // svelte/stores/tailwindInput.ts + var tailwindInput = writable(); + + // svelte/components/PageWrapper.svelte + var file8 = "svelte/components/PageWrapper.svelte"; + function add_css3(target) { + append_styles(target, "svelte-xbvayw", '[data-selected="true"], [data-highlighted="true"]{outline-color:#06b6d4;outline-width:2px;outline-style:dashed}:before, :after{pointer-events:none}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGFnZVdyYXBwZXIuc3ZlbHRlIiwibWFwcGluZ3MiOiJBQW1EVSxpREFBbUQsQ0FDekQsYUFBYSxDQUFFLE9BQU8sQ0FDdEIsYUFBYSxDQUFFLEdBQUcsQ0FDbEIsYUFBYSxDQUFFLE1BQ2pCLENBRVEsZUFBaUIsQ0FDdkIsY0FBYyxDQUFFLElBQ2xCIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIlBhZ2VXcmFwcGVyLnN2ZWx0ZSJdfQ== */'); + } + function get_each_context4(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[12] = list[i]; + return child_ctx; + } + function get_each_context_12(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[15] = list[i]; + child_ctx[17] = i; + return child_ctx; + } + function create_each_block_12(ctx) { + let pageastnode; + let current; + pageastnode = new PageAstNode_default({ + props: { + node: ( + /*astNode*/ + ctx[15] + ), + nodeId: String( + /*index*/ + ctx[17] + ) + }, + $$inline: true + }); + const block = { + c: function create3() { + create_component(pageastnode.$$.fragment); + }, + l: function claim(nodes) { + claim_component(pageastnode.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(pageastnode, target, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const pageastnode_changes = {}; + if (dirty & /*$page*/ + 4) + pageastnode_changes.node = /*astNode*/ + ctx2[15]; + pageastnode.$set(pageastnode_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(pageastnode.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(pageastnode.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(pageastnode, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block_12.name, + type: "each", + source: "(47:6) {#each $page.ast as astNode, index}", + ctx + }); + return block; + } + function create_default_slot2(ctx) { + let t; + let current; + let each_value_1 = ensure_array_like_dev( + /*$page*/ + ctx[2].ast + ); + let each_blocks = []; + for (let i = 0; i < each_value_1.length; i += 1) { + each_blocks[i] = create_each_block_12(get_each_context_12(ctx, each_value_1, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + const block = { + c: function create3() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + t = space(); + }, + l: function claim(nodes) { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(nodes); + } + t = claim_space(nodes); + }, + m: function mount(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert_hydration_dev(target, t, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + if (dirty & /*$page, String*/ + 4) { + each_value_1 = ensure_array_like_dev( + /*$page*/ + ctx2[2].ast + ); + let i; + for (i = 0; i < each_value_1.length; i += 1) { + const child_ctx = get_each_context_12(ctx2, each_value_1, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block_12(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(t.parentNode, t); + } + } + group_outros(); + for (i = each_value_1.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + for (let i = 0; i < each_value_1.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o: function outro(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + destroy_each(each_blocks, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_default_slot2.name, + type: "slot", + source: "(46:4) ", + ctx + }); + return block; + } + function create_each_block4(ctx) { + let layoutastnode; + let current; + layoutastnode = new LayoutAstNode_default({ + props: { + node: ( + /*layoutAstNode*/ + ctx[12] + ), + $$slots: { default: [create_default_slot2] }, + $$scope: { ctx } + }, + $$inline: true + }); + const block = { + c: function create3() { + create_component(layoutastnode.$$.fragment); + }, + l: function claim(nodes) { + claim_component(layoutastnode.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(layoutastnode, target, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const layoutastnode_changes = {}; + if (dirty & /*$page*/ + 4) + layoutastnode_changes.node = /*layoutAstNode*/ + ctx2[12]; + if (dirty & /*$$scope, $page*/ + 262148) { + layoutastnode_changes.$$scope = { dirty, ctx: ctx2 }; + } + layoutastnode.$set(layoutastnode_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(layoutastnode.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(layoutastnode.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(layoutastnode, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block4.name, + type: "each", + source: "(45:2) {#each $page.layout.ast as layoutAstNode}", + ctx + }); + return block; + } + function create_fragment8(ctx) { + let span; + let t; + let div; + let current; + let each_value = ensure_array_like_dev( + /*$page*/ + ctx[2].layout.ast + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block4(get_each_context4(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + const block = { + c: function create3() { + span = element("span"); + t = space(); + div = element("div"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + this.h(); + }, + l: function claim(nodes) { + span = claim_element(nodes, "SPAN", {}); + children(span).forEach(detach_dev); + t = claim_space(nodes); + div = claim_element(nodes, "DIV", {}); + var div_nodes = children(div); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(div_nodes); + } + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + add_location(span, file8, 39, 0, 2267); + add_location(div, file8, 40, 0, 2306); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, span, anchor); + ctx[3](span); + insert_hydration_dev(target, t, anchor); + insert_hydration_dev(target, div, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(div, null); + } + } + ctx[4](div); + current = true; + }, + p: function update2(ctx2, [dirty]) { + if (dirty & /*$page, String*/ + 4) { + each_value = ensure_array_like_dev( + /*$page*/ + ctx2[2].layout.ast + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context4(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block4(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(div, null); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o: function outro(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(span); + detach_dev(t); + detach_dev(div); + } + ctx[3](null); + destroy_each(each_blocks, detaching); + ctx[4](null); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment8.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance8($$self, $$props, $$invalidate) { + let $tailwindInput; + let $tailwindConfig; + let $page; + validate_store(tailwindInput, "tailwindInput"); + component_subscribe($$self, tailwindInput, ($$value) => $$invalidate(5, $tailwindInput = $$value)); + validate_store(tailwindConfig, "tailwindConfig"); + component_subscribe($$self, tailwindConfig, ($$value) => $$invalidate(6, $tailwindConfig = $$value)); + validate_store(page, "page"); + component_subscribe($$self, page, ($$value) => $$invalidate(2, $page = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("page-wrapper", slots, []); + var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + const tailwindJitPromise = import("https://unpkg.com/@mhsdesign/jit-browser-tailwindcss@0.4.0/dist/cdn.min.js"); + let wrapper; + let styleWrapper; + let twConfig = $tailwindConfig; + let b64moduleData = "data:text/javascript;base64," + btoa(twConfig.replace("module.exports = ", "export default ")); + let configPromise = import(b64moduleData); + onMount(() => __awaiter(void 0, void 0, void 0, function* () { + const [_, { default: tailwindConfig2 }] = yield Promise.all([tailwindJitPromise, configPromise]); + const tailwind = window.createTailwindcss({ tailwindConfig: tailwindConfig2 }); + const reloadStylesheet = () => __awaiter(void 0, void 0, void 0, function* () { + const content = wrapper.outerHTML; + const css = yield tailwind.generateStylesFromContent($tailwindInput, [content]); + let styleEl = document.createElement("style"); + styleEl.textContent = css; + styleWrapper.appendChild(styleEl); + }); + window.reloadStylesheet = reloadStylesheet; + reloadStylesheet(); + })); + page.subscribe(({ ast }) => __awaiter(void 0, void 0, void 0, function* () { + yield tick(); + window.reloadStylesheet && window.reloadStylesheet(); + })); + const writable_props = []; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + function span_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + styleWrapper = $$value; + $$invalidate(1, styleWrapper); + }); + } + function div_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + wrapper = $$value; + $$invalidate(0, wrapper); + }); + } + $$self.$capture_state = () => ({ + __awaiter, + LayoutAstNode: LayoutAstNode_default, + PageAstNode: PageAstNode_default, + page, + tailwindConfig, + tailwindInput, + onMount, + tick, + tailwindJitPromise, + wrapper, + styleWrapper, + twConfig, + b64moduleData, + configPromise, + $tailwindInput, + $tailwindConfig, + $page + }); + $$self.$inject_state = ($$props2) => { + if ("__awaiter" in $$props2) + __awaiter = $$props2.__awaiter; + if ("wrapper" in $$props2) + $$invalidate(0, wrapper = $$props2.wrapper); + if ("styleWrapper" in $$props2) + $$invalidate(1, styleWrapper = $$props2.styleWrapper); + if ("twConfig" in $$props2) + twConfig = $$props2.twConfig; + if ("b64moduleData" in $$props2) + b64moduleData = $$props2.b64moduleData; + if ("configPromise" in $$props2) + configPromise = $$props2.configPromise; + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + return [wrapper, styleWrapper, $page, span_binding, div_binding]; + } + var PageWrapper = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance8, create_fragment8, safe_not_equal, {}, add_css3); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "PageWrapper", + options, + id: create_fragment8.name + }); + } + }; + customElements.define("page-wrapper", create_custom_element(PageWrapper, {}, [], [], true)); + var PageWrapper_default = PageWrapper; + + // svelte/components/Pill.svelte + var Pill_exports = {}; + __export(Pill_exports, { + default: () => Pill_default + }); + var file9 = "svelte/components/Pill.svelte"; + function create_fragment9(ctx) { + let div; + let t0; + let button; + let span; + let t1; + let t2; + let svg; + let path; + let current; + let mounted; + let dispose; + const default_slot_template = ( + /*#slots*/ + ctx[2].default + ); + const default_slot = create_slot( + default_slot_template, + ctx, + /*$$scope*/ + ctx[1], + null + ); + const default_slot_template_1 = ( + /*#slots*/ + ctx[2].default + ); + const default_slot_1 = create_slot( + default_slot_template_1, + ctx, + /*$$scope*/ + ctx[1], + null + ); + const block = { + c: function create3() { + div = element("div"); + if (default_slot) + default_slot.c(); + t0 = space(); + button = element("button"); + span = element("span"); + t1 = text("Delete class: "); + if (default_slot_1) + default_slot_1.c(); + t2 = space(); + svg = svg_element("svg"); + path = svg_element("path"); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { class: true }); + var div_nodes = children(div); + if (default_slot) + default_slot.l(div_nodes); + t0 = claim_space(div_nodes); + button = claim_element(div_nodes, "BUTTON", { class: true, type: true }); + var button_nodes = children(button); + span = claim_element(button_nodes, "SPAN", { class: true }); + var span_nodes = children(span); + t1 = claim_text(span_nodes, "Delete class: "); + if (default_slot_1) + default_slot_1.l(span_nodes); + span_nodes.forEach(detach_dev); + t2 = claim_space(button_nodes); + svg = claim_svg_element(button_nodes, "svg", { + xmlns: true, + viewBox: true, + fill: true, + class: true + }); + var svg_nodes = children(svg); + path = claim_svg_element(svg_nodes, "path", { + "fill-rule": true, + d: true, + "clip-rule": true + }); + children(path).forEach(detach_dev); + svg_nodes.forEach(detach_dev); + button_nodes.forEach(detach_dev); + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(span, "class", "sr-only"); + add_location(span, file9, 12, 4, 436); + attr_dev(path, "fill-rule", "evenodd"); + attr_dev(path, "d", "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z"); + attr_dev(path, "clip-rule", "evenodd"); + add_location(path, file9, 14, 6, 595); + attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); + attr_dev(svg, "viewBox", "0 0 24 24"); + attr_dev(svg, "fill", "currentColor"); + attr_dev(svg, "class", "w-3 h-3"); + add_location(svg, file9, 13, 4, 492); + attr_dev(button, "class", "p-2 rounded-full inline-block bg-slate-700 text-white hover:text-blue-400 active:text-blue-500"); + attr_dev(button, "type", "button"); + add_location(button, file9, 7, 2, 240); + attr_dev(div, "class", "inline-flex items-center rounded-full bg-slate-700 text-white text-xs px-3 pr-0 m-1 leading-4"); + add_location(div, file9, 5, 0, 119); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + if (default_slot) { + default_slot.m(div, null); + } + append_hydration_dev(div, t0); + append_hydration_dev(div, button); + append_hydration_dev(button, span); + append_hydration_dev(span, t1); + if (default_slot_1) { + default_slot_1.m(span, null); + } + append_hydration_dev(button, t2); + append_hydration_dev(button, svg); + append_hydration_dev(svg, path); + current = true; + if (!mounted) { + dispose = listen_dev(button, "click", prevent_default( + /*click_handler*/ + ctx[3] + ), false, true, false, false); + mounted = true; + } + }, + p: function update2(ctx2, [dirty]) { + if (default_slot) { + if (default_slot.p && (!current || dirty & /*$$scope*/ + 2)) { + update_slot_base( + default_slot, + default_slot_template, + ctx2, + /*$$scope*/ + ctx2[1], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[1] + ) : get_slot_changes( + default_slot_template, + /*$$scope*/ + ctx2[1], + dirty, + null + ), + null + ); + } + } + if (default_slot_1) { + if (default_slot_1.p && (!current || dirty & /*$$scope*/ + 2)) { + update_slot_base( + default_slot_1, + default_slot_template_1, + ctx2, + /*$$scope*/ + ctx2[1], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[1] + ) : get_slot_changes( + default_slot_template_1, + /*$$scope*/ + ctx2[1], + dirty, + null + ), + null + ); + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(default_slot, local); + transition_in(default_slot_1, local); + current = true; + }, + o: function outro(local) { + transition_out(default_slot, local); + transition_out(default_slot_1, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + if (default_slot) + default_slot.d(detaching); + if (default_slot_1) + default_slot_1.d(detaching); + mounted = false; + dispose(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment9.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance9($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("Pill", slots, ["default"]); + const dispatch2 = createEventDispatcher(); + const writable_props = []; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + const click_handler = () => dispatch2("delete"); + $$self.$$set = ($$props2) => { + if ("$$scope" in $$props2) + $$invalidate(1, $$scope = $$props2.$$scope); + }; + $$self.$capture_state = () => ({ createEventDispatcher, dispatch: dispatch2 }); + return [dispatch2, $$scope, slots, click_handler]; + } + var Pill = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance9, create_fragment9, safe_not_equal, {}); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Pill", + options, + id: create_fragment9.name + }); + } + }; + create_custom_element(Pill, {}, ["default"], [], true); + var Pill_default = Pill; + + // svelte/components/PropertiesSidebar.svelte + var PropertiesSidebar_exports = {}; + __export(PropertiesSidebar_exports, { + default: () => PropertiesSidebar_default + }); + + // svelte/components/SidebarSection.svelte + var SidebarSection_exports = {}; + __export(SidebarSection_exports, { + default: () => SidebarSection_default + }); + var file10 = "svelte/components/SidebarSection.svelte"; + function get_each_context5(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[26] = list[i]; + child_ctx[28] = i; + return child_ctx; + } + var get_value_slot_changes_1 = (dirty) => ({}); + var get_value_slot_context_1 = (ctx) => ({}); + var get_input_slot_changes_1 = (dirty) => ({}); + var get_input_slot_context_1 = (ctx) => ({}); + var get_value_slot_changes = (dirty) => ({}); + var get_value_slot_context = (ctx) => ({}); + var get_input_slot_changes = (dirty) => ({}); + var get_input_slot_context = (ctx) => ({}); + var get_heading_slot_changes = (dirty) => ({}); + var get_heading_slot_context = (ctx) => ({}); + function create_if_block_14(ctx) { + let current; + const input_slot_template = ( + /*#slots*/ + ctx[16].input + ); + const input_slot = create_slot( + input_slot_template, + ctx, + /*$$scope*/ + ctx[15], + get_input_slot_context_1 + ); + const input_slot_or_fallback = input_slot || fallback_block_1(ctx); + const block = { + c: function create3() { + if (input_slot_or_fallback) + input_slot_or_fallback.c(); + }, + l: function claim(nodes) { + if (input_slot_or_fallback) + input_slot_or_fallback.l(nodes); + }, + m: function mount(target, anchor) { + if (input_slot_or_fallback) { + input_slot_or_fallback.m(target, anchor); + } + current = true; + }, + p: function update2(ctx2, dirty) { + if (input_slot) { + if (input_slot.p && (!current || dirty & /*$$scope*/ + 32768)) { + update_slot_base( + input_slot, + input_slot_template, + ctx2, + /*$$scope*/ + ctx2[15], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[15] + ) : get_slot_changes( + input_slot_template, + /*$$scope*/ + ctx2[15], + dirty, + get_input_slot_changes_1 + ), + get_input_slot_context_1 + ); + } + } else { + if (input_slot_or_fallback && input_slot_or_fallback.p && (!current || dirty & /*$$scope, $$slots, placeholder, internalValue, large, astElements*/ + 34846)) { + input_slot_or_fallback.p(ctx2, !current ? -1 : dirty); + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(input_slot_or_fallback, local); + current = true; + }, + o: function outro(local) { + transition_out(input_slot_or_fallback, local); + current = false; + }, + d: function destroy(detaching) { + if (input_slot_or_fallback) + input_slot_or_fallback.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_14.name, + type: "if", + source: "(99:21) ", + ctx + }); + return block; + } + function create_if_block6(ctx) { + let t; + let div; + let current; + const input_slot_template = ( + /*#slots*/ + ctx[16].input + ); + const input_slot = create_slot( + input_slot_template, + ctx, + /*$$scope*/ + ctx[15], + get_input_slot_context + ); + const input_slot_or_fallback = input_slot || fallback_block(ctx); + const value_slot_template = ( + /*#slots*/ + ctx[16].value + ); + const value_slot = create_slot( + value_slot_template, + ctx, + /*$$scope*/ + ctx[15], + get_value_slot_context + ); + const block = { + c: function create3() { + if (input_slot_or_fallback) + input_slot_or_fallback.c(); + t = space(); + div = element("div"); + if (value_slot) + value_slot.c(); + this.h(); + }, + l: function claim(nodes) { + if (input_slot_or_fallback) + input_slot_or_fallback.l(nodes); + t = claim_space(nodes); + div = claim_element(nodes, "DIV", { class: true }); + var div_nodes = children(div); + if (value_slot) + value_slot.l(div_nodes); + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "pt-3"); + add_location(div, file10, 100, 4, 3239); + }, + m: function mount(target, anchor) { + if (input_slot_or_fallback) { + input_slot_or_fallback.m(target, anchor); + } + insert_hydration_dev(target, t, anchor); + insert_hydration_dev(target, div, anchor); + if (value_slot) { + value_slot.m(div, null); + } + current = true; + }, + p: function update2(ctx2, dirty) { + if (input_slot) { + if (input_slot.p && (!current || dirty & /*$$scope*/ + 32768)) { + update_slot_base( + input_slot, + input_slot_template, + ctx2, + /*$$scope*/ + ctx2[15], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[15] + ) : get_slot_changes( + input_slot_template, + /*$$scope*/ + ctx2[15], + dirty, + get_input_slot_changes + ), + get_input_slot_context + ); + } + } else { + if (input_slot_or_fallback && input_slot_or_fallback.p && (!current || dirty & /*placeholder, internalValue*/ + 10)) { + input_slot_or_fallback.p(ctx2, !current ? -1 : dirty); + } + } + if (value_slot) { + if (value_slot.p && (!current || dirty & /*$$scope*/ + 32768)) { + update_slot_base( + value_slot, + value_slot_template, + ctx2, + /*$$scope*/ + ctx2[15], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[15] + ) : get_slot_changes( + value_slot_template, + /*$$scope*/ + ctx2[15], + dirty, + get_value_slot_changes + ), + get_value_slot_context + ); + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(input_slot_or_fallback, local); + transition_in(value_slot, local); + current = true; + }, + o: function outro(local) { + transition_out(input_slot_or_fallback, local); + transition_out(value_slot, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + detach_dev(div); + } + if (input_slot_or_fallback) + input_slot_or_fallback.d(detaching); + if (value_slot) + value_slot.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block6.name, + type: "if", + source: '(87:2) {#if $$slots[\\"value\\"]}', + ctx + }); + return block; + } + function create_if_block_53(ctx) { + let each_1_anchor; + let each_value = ensure_array_like_dev( + /*astElements*/ + ctx[4] + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block5(get_each_context5(ctx, each_value, i)); + } + const block = { + c: function create3() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + l: function claim(nodes) { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(nodes); + } + each_1_anchor = empty(); + }, + m: function mount(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert_hydration_dev(target, each_1_anchor, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty & /*highlightAstElement, astElements, unhighlightAstElement, moveAstElement, select*/ + 1648) { + each_value = ensure_array_like_dev( + /*astElements*/ + ctx2[4] + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context5(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block5(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + each_blocks.length = each_value.length; + } + }, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_53.name, + type: "if", + source: "(124:28) ", + ctx + }); + return block; + } + function create_if_block_23(ctx) { + let t; + let if_block1_anchor; + let current; + function select_block_type_2(ctx2, dirty) { + if ( + /*large*/ + ctx2[2] + ) + return create_if_block_43; + return create_else_block3; + } + let current_block_type = select_block_type_2(ctx, -1); + let if_block0 = current_block_type(ctx); + let if_block1 = ( + /*$$slots*/ + ctx[11]["value"] && create_if_block_33(ctx) + ); + const block = { + c: function create3() { + if_block0.c(); + t = space(); + if (if_block1) + if_block1.c(); + if_block1_anchor = empty(); + }, + l: function claim(nodes) { + if_block0.l(nodes); + t = claim_space(nodes); + if (if_block1) + if_block1.l(nodes); + if_block1_anchor = empty(); + }, + m: function mount(target, anchor) { + if_block0.m(target, anchor); + insert_hydration_dev(target, t, anchor); + if (if_block1) + if_block1.m(target, anchor); + insert_hydration_dev(target, if_block1_anchor, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + if (current_block_type === (current_block_type = select_block_type_2(ctx2, dirty)) && if_block0) { + if_block0.p(ctx2, dirty); + } else { + if_block0.d(1); + if_block0 = current_block_type(ctx2); + if (if_block0) { + if_block0.c(); + if_block0.m(t.parentNode, t); + } + } + if ( + /*$$slots*/ + ctx2[11]["value"] + ) { + if (if_block1) { + if_block1.p(ctx2, dirty); + if (dirty & /*$$slots*/ + 2048) { + transition_in(if_block1, 1); + } + } else { + if_block1 = create_if_block_33(ctx2); + if_block1.c(); + transition_in(if_block1, 1); + if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); + } + } else if (if_block1) { + group_outros(); + transition_out(if_block1, 1, 1, () => { + if_block1 = null; + }); + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block1); + current = true; + }, + o: function outro(local) { + transition_out(if_block1); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + detach_dev(if_block1_anchor); + } + if_block0.d(detaching); + if (if_block1) + if_block1.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_23.name, + type: "if", + source: "(101:6) {#if internalValue}", + ctx + }); + return block; + } + function create_each_block5(ctx) { + let div2; + let div0; + let span0; + let code; + let t0; + let t1_value = ( + /*astElement*/ + ctx[26].tag + "" + ); + let t1; + let t2; + let t3; + let button0; + let t4; + let span1; + let t5_value = ( + /*astElement*/ + ctx[26].tag + "" + ); + let t5; + let t6; + let t7; + let svg0; + let path0; + let path1; + let t8; + let div1; + let button1; + let span3; + let t9; + let span2; + let t10_value = ( + /*astElement*/ + ctx[26].tag + "" + ); + let t10; + let t11; + let t12; + let t13; + let svg1; + let path2; + let button1_disabled_value; + let t14; + let button2; + let span5; + let t15; + let span4; + let t16_value = ( + /*astElement*/ + ctx[26].tag + "" + ); + let t16; + let t17; + let t18; + let t19; + let svg2; + let path3; + let button2_disabled_value; + let t20; + let mounted; + let dispose; + function click_handler_1() { + return ( + /*click_handler_1*/ + ctx[18]( + /*astElement*/ + ctx[26] + ) + ); + } + function click_handler_2() { + return ( + /*click_handler_2*/ + ctx[19]( + /*astElement*/ + ctx[26] + ) + ); + } + function click_handler_3() { + return ( + /*click_handler_3*/ + ctx[20]( + /*astElement*/ + ctx[26] + ) + ); + } + function mouseenter_handler() { + return ( + /*mouseenter_handler*/ + ctx[21]( + /*astElement*/ + ctx[26] + ) + ); + } + const block = { + c: function create3() { + div2 = element("div"); + div0 = element("div"); + span0 = element("span"); + code = element("code"); + t0 = text("<"); + t1 = text(t1_value); + t2 = text(">"); + t3 = space(); + button0 = element("button"); + t4 = text("Edit "); + span1 = element("span"); + t5 = text(t5_value); + t6 = text(" element"); + t7 = space(); + svg0 = svg_element("svg"); + path0 = svg_element("path"); + path1 = svg_element("path"); + t8 = space(); + div1 = element("div"); + button1 = element("button"); + span3 = element("span"); + t9 = text("Move "); + span2 = element("span"); + t10 = text(t10_value); + t11 = text(" element"); + t12 = text(" up"); + t13 = space(); + svg1 = svg_element("svg"); + path2 = svg_element("path"); + t14 = space(); + button2 = element("button"); + span5 = element("span"); + t15 = text("Move "); + span4 = element("span"); + t16 = text(t16_value); + t17 = text(" element"); + t18 = text(" down"); + t19 = space(); + svg2 = svg_element("svg"); + path3 = svg_element("path"); + t20 = space(); + this.h(); + }, + l: function claim(nodes) { + div2 = claim_element(nodes, "DIV", { class: true }); + var div2_nodes = children(div2); + div0 = claim_element(div2_nodes, "DIV", { class: true }); + var div0_nodes = children(div0); + span0 = claim_element(div0_nodes, "SPAN", {}); + var span0_nodes = children(span0); + code = claim_element(span0_nodes, "CODE", {}); + var code_nodes = children(code); + t0 = claim_text(code_nodes, "<"); + t1 = claim_text(code_nodes, t1_value); + t2 = claim_text(code_nodes, ">"); + code_nodes.forEach(detach_dev); + span0_nodes.forEach(detach_dev); + t3 = claim_space(div0_nodes); + button0 = claim_element(div0_nodes, "BUTTON", { class: true }); + var button0_nodes = children(button0); + t4 = claim_text(button0_nodes, "Edit "); + span1 = claim_element(button0_nodes, "SPAN", { class: true }); + var span1_nodes = children(span1); + t5 = claim_text(span1_nodes, t5_value); + t6 = claim_text(span1_nodes, " element"); + span1_nodes.forEach(detach_dev); + t7 = claim_space(button0_nodes); + svg0 = claim_svg_element(button0_nodes, "svg", { + xmlns: true, + viewBox: true, + fill: true, + class: true + }); + var svg0_nodes = children(svg0); + path0 = claim_svg_element(svg0_nodes, "path", { d: true }); + children(path0).forEach(detach_dev); + path1 = claim_svg_element(svg0_nodes, "path", { d: true }); + children(path1).forEach(detach_dev); + svg0_nodes.forEach(detach_dev); + button0_nodes.forEach(detach_dev); + div0_nodes.forEach(detach_dev); + t8 = claim_space(div2_nodes); + div1 = claim_element(div2_nodes, "DIV", { class: true }); + var div1_nodes = children(div1); + button1 = claim_element(div1_nodes, "BUTTON", { class: true }); + var button1_nodes = children(button1); + span3 = claim_element(button1_nodes, "SPAN", {}); + var span3_nodes = children(span3); + t9 = claim_text(span3_nodes, "Move "); + span2 = claim_element(span3_nodes, "SPAN", { class: true }); + var span2_nodes = children(span2); + t10 = claim_text(span2_nodes, t10_value); + t11 = claim_text(span2_nodes, " element"); + span2_nodes.forEach(detach_dev); + t12 = claim_text(span3_nodes, " up"); + span3_nodes.forEach(detach_dev); + t13 = claim_space(button1_nodes); + svg1 = claim_svg_element(button1_nodes, "svg", { + xmlns: true, + viewBox: true, + fill: true, + class: true + }); + var svg1_nodes = children(svg1); + path2 = claim_svg_element(svg1_nodes, "path", { + "fill-rule": true, + d: true, + "clip-rule": true + }); + children(path2).forEach(detach_dev); + svg1_nodes.forEach(detach_dev); + button1_nodes.forEach(detach_dev); + t14 = claim_space(div1_nodes); + button2 = claim_element(div1_nodes, "BUTTON", { class: true }); + var button2_nodes = children(button2); + span5 = claim_element(button2_nodes, "SPAN", {}); + var span5_nodes = children(span5); + t15 = claim_text(span5_nodes, "Move "); + span4 = claim_element(span5_nodes, "SPAN", { class: true }); + var span4_nodes = children(span4); + t16 = claim_text(span4_nodes, t16_value); + t17 = claim_text(span4_nodes, " element"); + span4_nodes.forEach(detach_dev); + t18 = claim_text(span5_nodes, " down"); + span5_nodes.forEach(detach_dev); + t19 = claim_space(button2_nodes); + svg2 = claim_svg_element(button2_nodes, "svg", { + xmlns: true, + viewBox: true, + fill: true, + class: true + }); + var svg2_nodes = children(svg2); + path3 = claim_svg_element(svg2_nodes, "path", { + "fill-rule": true, + d: true, + "clip-rule": true + }); + children(path3).forEach(detach_dev); + svg2_nodes.forEach(detach_dev); + button2_nodes.forEach(detach_dev); + div1_nodes.forEach(detach_dev); + t20 = claim_space(div2_nodes); + div2_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + add_location(code, file10, 135, 20, 4585); + add_location(span0, file10, 135, 14, 4579); + attr_dev(span1, "class", "sr-only"); + add_location(span1, file10, 140, 21, 4952); + attr_dev(path0, "d", "M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"); + add_location(path0, file10, 142, 18, 5137); + attr_dev(path1, "d", "M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"); + add_location(path1, file10, 145, 18, 5448); + attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg"); + attr_dev(svg0, "viewBox", "0 0 24 24"); + attr_dev(svg0, "fill", "currentColor"); + attr_dev(svg0, "class", "w-3 h-3"); + add_location(svg0, file10, 141, 16, 5022); + attr_dev(button0, "class", "flex items-center justify-center gap-x-0.5 px-2 py-1 bg-cyan-300 font-bold text-xs uppercase tracking-wide rounded transition-colors hover:bg-cyan-900 active:bg-cyan-700 hover:text-white"); + add_location(button0, file10, 136, 14, 4644); + attr_dev(div0, "class", "flex items-center justify-between"); + add_location(div0, file10, 134, 12, 4517); + attr_dev(span2, "class", "sr-only"); + add_location(span2, file10, 157, 27, 6223); + add_location(span3, file10, 157, 16, 6212); + attr_dev(path2, "fill-rule", "evenodd"); + attr_dev(path2, "d", "M11.47 2.47a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06l-6.22-6.22V21a.75.75 0 0 1-1.5 0V4.81l-6.22 6.22a.75.75 0 1 1-1.06-1.06l7.5-7.5Z"); + attr_dev(path2, "clip-rule", "evenodd"); + add_location(path2, file10, 159, 18, 6418); + attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg"); + attr_dev(svg1, "viewBox", "0 0 24 24"); + attr_dev(svg1, "fill", "currentColor"); + attr_dev(svg1, "class", "w-3 h-3"); + add_location(svg1, file10, 158, 16, 6303); + attr_dev(button1, "class", "flex items-center justify-center gap-x-0.5 px-1.5 py-1 bg-cyan-800 font-bold text-xs uppercase tracking-wide rounded hover:bg-cyan-950 active:bg-cyan-700 disabled:bg-gray-300 disabled:cursor-not-allowed text-white"); + button1.disabled = button1_disabled_value = /*idx*/ + ctx[28] === 0; + add_location(button1, file10, 152, 14, 5833); + attr_dev(span4, "class", "sr-only"); + add_location(span4, file10, 171, 27, 7164); + add_location(span5, file10, 171, 16, 7153); + attr_dev(path3, "fill-rule", "evenodd"); + attr_dev(path3, "d", "M12 2.25a.75.75 0 0 1 .75.75v16.19l6.22-6.22a.75.75 0 1 1 1.06 1.06l-7.5 7.5a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 1 1 1.06-1.06l6.22 6.22V3a.75.75 0 0 1 .75-.75Z"); + attr_dev(path3, "clip-rule", "evenodd"); + add_location(path3, file10, 173, 18, 7361); + attr_dev(svg2, "xmlns", "http://www.w3.org/2000/svg"); + attr_dev(svg2, "viewBox", "0 0 24 24"); + attr_dev(svg2, "fill", "currentColor"); + attr_dev(svg2, "class", "w-3 h-3"); + add_location(svg2, file10, 172, 16, 7246); + attr_dev(button2, "class", "flex items-center justify-center gap-x-0.5 px-1.5 py-1 bg-cyan-800 font-bold text-xs uppercase tracking-wide rounded hover:bg-cyan-950 active:bg-cyan-700 disabled:bg-gray-300 disabled:cursor-not-allowed text-white"); + button2.disabled = button2_disabled_value = /*idx*/ + ctx[28] === /*astElements*/ + ctx[4].length - 1; + add_location(button2, file10, 166, 14, 6754); + attr_dev(div1, "class", "mt-2 grid grid-cols-2 gap-x-1"); + add_location(div1, file10, 151, 12, 5775); + attr_dev(div2, "class", "mt-5"); + add_location(div2, file10, 129, 10, 4339); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div2, anchor); + append_hydration_dev(div2, div0); + append_hydration_dev(div0, span0); + append_hydration_dev(span0, code); + append_hydration_dev(code, t0); + append_hydration_dev(code, t1); + append_hydration_dev(code, t2); + append_hydration_dev(div0, t3); + append_hydration_dev(div0, button0); + append_hydration_dev(button0, t4); + append_hydration_dev(button0, span1); + append_hydration_dev(span1, t5); + append_hydration_dev(span1, t6); + append_hydration_dev(button0, t7); + append_hydration_dev(button0, svg0); + append_hydration_dev(svg0, path0); + append_hydration_dev(svg0, path1); + append_hydration_dev(div2, t8); + append_hydration_dev(div2, div1); + append_hydration_dev(div1, button1); + append_hydration_dev(button1, span3); + append_hydration_dev(span3, t9); + append_hydration_dev(span3, span2); + append_hydration_dev(span2, t10); + append_hydration_dev(span2, t11); + append_hydration_dev(span3, t12); + append_hydration_dev(button1, t13); + append_hydration_dev(button1, svg1); + append_hydration_dev(svg1, path2); + append_hydration_dev(div1, t14); + append_hydration_dev(div1, button2); + append_hydration_dev(button2, span5); + append_hydration_dev(span5, t15); + append_hydration_dev(span5, span4); + append_hydration_dev(span4, t16); + append_hydration_dev(span4, t17); + append_hydration_dev(span5, t18); + append_hydration_dev(button2, t19); + append_hydration_dev(button2, svg2); + append_hydration_dev(svg2, path3); + append_hydration_dev(div2, t20); + if (!mounted) { + dispose = [ + listen_dev(button0, "click", click_handler_1, false, false, false, false), + listen_dev(button1, "click", click_handler_2, false, false, false, false), + listen_dev(button2, "click", click_handler_3, false, false, false, false), + listen_dev(div2, "mouseenter", mouseenter_handler, false, false, false, false), + listen_dev( + div2, + "mouseleave", + /*mouseleave_handler*/ + ctx[22], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(new_ctx, dirty) { + ctx = new_ctx; + if (dirty & /*astElements*/ + 16 && t1_value !== (t1_value = /*astElement*/ + ctx[26].tag + "")) + set_data_dev(t1, t1_value); + if (dirty & /*astElements*/ + 16 && t5_value !== (t5_value = /*astElement*/ + ctx[26].tag + "")) + set_data_dev(t5, t5_value); + if (dirty & /*astElements*/ + 16 && t10_value !== (t10_value = /*astElement*/ + ctx[26].tag + "")) + set_data_dev(t10, t10_value); + if (dirty & /*astElements*/ + 16 && t16_value !== (t16_value = /*astElement*/ + ctx[26].tag + "")) + set_data_dev(t16, t16_value); + if (dirty & /*astElements*/ + 16 && button2_disabled_value !== (button2_disabled_value = /*idx*/ + ctx[28] === /*astElements*/ + ctx[4].length - 1)) { + prop_dev(button2, "disabled", button2_disabled_value); + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div2); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block5.name, + type: "each", + source: "(125:8) {#each astElements as astElement, idx}", + ctx + }); + return block; + } + function create_else_block3(ctx) { + let input; + let mounted; + let dispose; + const block = { + c: function create3() { + input = element("input"); + this.h(); + }, + l: function claim(nodes) { + input = claim_element(nodes, "INPUT", { + type: true, + class: true, + placeholder: true + }); + this.h(); + }, + h: function hydrate() { + attr_dev(input, "type", "text"); + attr_dev(input, "class", "w-full py-1 px-2 bg-slate-100 border-slate-100 rounded-md leading-6 text-sm"); + attr_dev( + input, + "placeholder", + /*placeholder*/ + ctx[1] + ); + input.value = /*internalValue*/ + ctx[3]; + add_location(input, file10, 114, 10, 3789); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, input, anchor); + if (!mounted) { + dispose = [ + listen_dev( + input, + "keydown", + /*handleKeydown*/ + ctx[7], + false, + false, + false, + false + ), + listen_dev( + input, + "change", + /*handleTextChange*/ + ctx[8], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty & /*placeholder*/ + 2) { + attr_dev( + input, + "placeholder", + /*placeholder*/ + ctx2[1] + ); + } + if (dirty & /*internalValue*/ + 8 && input.value !== /*internalValue*/ + ctx2[3]) { + prop_dev( + input, + "value", + /*internalValue*/ + ctx2[3] + ); + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(input); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_else_block3.name, + type: "else", + source: "(111:8) {:else}", + ctx + }); + return block; + } + function create_if_block_43(ctx) { + let textarea; + let mounted; + let dispose; + const block = { + c: function create3() { + textarea = element("textarea"); + this.h(); + }, + l: function claim(nodes) { + textarea = claim_element(nodes, "TEXTAREA", { class: true, placeholder: true }); + children(textarea).forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(textarea, "class", "w-full py-1 px-2 bg-slate-100 border-slate-100 rounded-md leading-6 text-sm"); + attr_dev( + textarea, + "placeholder", + /*placeholder*/ + ctx[1] + ); + textarea.value = /*internalValue*/ + ctx[3]; + add_location(textarea, file10, 106, 10, 3494); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, textarea, anchor); + if (!mounted) { + dispose = [ + listen_dev( + textarea, + "keydown", + /*handleKeydown*/ + ctx[7], + false, + false, + false, + false + ), + listen_dev( + textarea, + "change", + /*handleTextChange*/ + ctx[8], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty & /*placeholder*/ + 2) { + attr_dev( + textarea, + "placeholder", + /*placeholder*/ + ctx2[1] + ); + } + if (dirty & /*internalValue*/ + 8) { + prop_dev( + textarea, + "value", + /*internalValue*/ + ctx2[3] + ); + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(textarea); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_43.name, + type: "if", + source: "(102:8) {#if large}", + ctx + }); + return block; + } + function create_if_block_33(ctx) { + let div; + let current; + const value_slot_template = ( + /*#slots*/ + ctx[16].value + ); + const value_slot = create_slot( + value_slot_template, + ctx, + /*$$scope*/ + ctx[15], + get_value_slot_context_1 + ); + const block = { + c: function create3() { + div = element("div"); + if (value_slot) + value_slot.c(); + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { class: true }); + var div_nodes = children(div); + if (value_slot) + value_slot.l(div_nodes); + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "pt-3"); + add_location(div, file10, 124, 10, 4124); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + if (value_slot) { + value_slot.m(div, null); + } + current = true; + }, + p: function update2(ctx2, dirty) { + if (value_slot) { + if (value_slot.p && (!current || dirty & /*$$scope*/ + 32768)) { + update_slot_base( + value_slot, + value_slot_template, + ctx2, + /*$$scope*/ + ctx2[15], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[15] + ) : get_slot_changes( + value_slot_template, + /*$$scope*/ + ctx2[15], + dirty, + get_value_slot_changes_1 + ), + get_value_slot_context_1 + ); + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(value_slot, local); + current = true; + }, + o: function outro(local) { + transition_out(value_slot, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + if (value_slot) + value_slot.d(detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_33.name, + type: "if", + source: '(121:8) {#if $$slots[\\"value\\"]}', + ctx + }); + return block; + } + function fallback_block_1(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block_23, create_if_block_53]; + const if_blocks = []; + function select_block_type_1(ctx2, dirty) { + if ( + /*internalValue*/ + ctx2[3] + ) + return 0; + if ( + /*astElements*/ + ctx2[4] + ) + return 1; + return -1; + } + if (~(current_block_type_index = select_block_type_1(ctx, -1))) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + } + const block = { + c: function create3() { + if (if_block) + if_block.c(); + if_block_anchor = empty(); + }, + l: function claim(nodes) { + if (if_block) + if_block.l(nodes); + if_block_anchor = empty(); + }, + m: function mount(target, anchor) { + if (~current_block_type_index) { + if_blocks[current_block_type_index].m(target, anchor); + } + insert_hydration_dev(target, if_block_anchor, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type_1(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if (~current_block_type_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } + } else { + if (if_block) { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + } + if (~current_block_type_index) { + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } else { + if_block = null; + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(if_block_anchor); + } + if (~current_block_type_index) { + if_blocks[current_block_type_index].d(detaching); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: fallback_block_1.name, + type: "fallback", + source: "(100:23) ", + ctx + }); + return block; + } + function fallback_block(ctx) { + let input; + let mounted; + let dispose; + const block = { + c: function create3() { + input = element("input"); + this.h(); + }, + l: function claim(nodes) { + input = claim_element(nodes, "INPUT", { + type: true, + class: true, + placeholder: true + }); + this.h(); + }, + h: function hydrate() { + attr_dev(input, "type", "text"); + attr_dev(input, "class", "w-full py-1 px-2 bg-gray-100 border-gray-100 rounded-md leading-6 text-sm"); + attr_dev( + input, + "placeholder", + /*placeholder*/ + ctx[1] + ); + input.value = /*internalValue*/ + ctx[3]; + add_location(input, file10, 91, 6, 2973); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, input, anchor); + if (!mounted) { + dispose = [ + listen_dev( + input, + "keydown", + /*handleKeydown*/ + ctx[7], + false, + false, + false, + false + ), + listen_dev( + input, + "change", + /*handleTextChange*/ + ctx[8], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty & /*placeholder*/ + 2) { + attr_dev( + input, + "placeholder", + /*placeholder*/ + ctx2[1] + ); + } + if (dirty & /*internalValue*/ + 8 && input.value !== /*internalValue*/ + ctx2[3]) { + prop_dev( + input, + "value", + /*internalValue*/ + ctx2[3] + ); + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(input); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: fallback_block.name, + type: "fallback", + source: "(88:23) ", + ctx + }); + return block; + } + function create_fragment10(ctx) { + let section; + let header; + let button; + let span0; + let t0; + let span1; + let svg; + let path; + let span1_class_value; + let t1; + let current_block_type_index; + let if_block; + let current; + let mounted; + let dispose; + const heading_slot_template = ( + /*#slots*/ + ctx[16].heading + ); + const heading_slot = create_slot( + heading_slot_template, + ctx, + /*$$scope*/ + ctx[15], + get_heading_slot_context + ); + const if_block_creators = [create_if_block6, create_if_block_14]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if ( + /*$$slots*/ + ctx2[11]["value"] + ) + return 0; + if ( + /*expanded*/ + ctx2[0] + ) + return 1; + return -1; + } + if (~(current_block_type_index = select_block_type(ctx, -1))) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + } + const block = { + c: function create3() { + section = element("section"); + header = element("header"); + button = element("button"); + span0 = element("span"); + if (heading_slot) + heading_slot.c(); + t0 = space(); + span1 = element("span"); + svg = svg_element("svg"); + path = svg_element("path"); + t1 = space(); + if (if_block) + if_block.c(); + this.h(); + }, + l: function claim(nodes) { + section = claim_element(nodes, "SECTION", { class: true }); + var section_nodes = children(section); + header = claim_element(section_nodes, "HEADER", { class: true }); + var header_nodes = children(header); + button = claim_element(header_nodes, "BUTTON", { + type: true, + class: true, + "aria-expanded": true + }); + var button_nodes = children(button); + span0 = claim_element(button_nodes, "SPAN", {}); + var span0_nodes = children(span0); + if (heading_slot) + heading_slot.l(span0_nodes); + span0_nodes.forEach(detach_dev); + t0 = claim_space(button_nodes); + span1 = claim_element(button_nodes, "SPAN", { class: true }); + var span1_nodes = children(span1); + svg = claim_svg_element(span1_nodes, "svg", { + xmlns: true, + viewBox: true, + fill: true, + class: true + }); + var svg_nodes = children(svg); + path = claim_svg_element(svg_nodes, "path", { + "fill-rule": true, + d: true, + "clip-rule": true + }); + children(path).forEach(detach_dev); + svg_nodes.forEach(detach_dev); + span1_nodes.forEach(detach_dev); + button_nodes.forEach(detach_dev); + header_nodes.forEach(detach_dev); + t1 = claim_space(section_nodes); + if (if_block) + if_block.l(section_nodes); + section_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + add_location(span0, file10, 71, 6, 2261); + attr_dev(path, "fill-rule", "evenodd"); + attr_dev(path, "d", "M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z"); + attr_dev(path, "clip-rule", "evenodd"); + add_location(path, file10, 79, 10, 2629); + attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); + attr_dev(svg, "viewBox", "0 0 24 24"); + attr_dev(svg, "fill", "currentColor"); + attr_dev(svg, "class", "w-5 h-5 stroke-slate-500 fill-slate-500 group-hover:stroke-current group-hover:fill-current"); + add_location(svg, file10, 73, 8, 2389); + attr_dev(span1, "class", span1_class_value = /*expanded*/ + ctx[0] ? "" : " [&_path]:origin-center [&_path]:rotate-180"); + add_location(span1, file10, 72, 6, 2304); + attr_dev(button, "type", "button"); + attr_dev(button, "class", "w-full flex items-center justify-between gap-x-1 p-1 font-semibold hover:text-blue-700 active:text-blue-900 group"); + attr_dev( + button, + "aria-expanded", + /*expanded*/ + ctx[0] + ); + add_location(button, file10, 65, 4, 2016); + attr_dev(header, "class", "flex items-center text-sm mb-2 font-medium"); + add_location(header, file10, 64, 2, 1952); + attr_dev(section, "class", "p-4 border-b border-b-gray-100 border-solid"); + add_location(section, file10, 63, 0, 1888); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, section, anchor); + append_hydration_dev(section, header); + append_hydration_dev(header, button); + append_hydration_dev(button, span0); + if (heading_slot) { + heading_slot.m(span0, null); + } + append_hydration_dev(button, t0); + append_hydration_dev(button, span1); + append_hydration_dev(span1, svg); + append_hydration_dev(svg, path); + append_hydration_dev(section, t1); + if (~current_block_type_index) { + if_blocks[current_block_type_index].m(section, null); + } + current = true; + if (!mounted) { + dispose = listen_dev( + button, + "click", + /*click_handler*/ + ctx[17], + false, + false, + false, + false + ); + mounted = true; + } + }, + p: function update2(ctx2, [dirty]) { + if (heading_slot) { + if (heading_slot.p && (!current || dirty & /*$$scope*/ + 32768)) { + update_slot_base( + heading_slot, + heading_slot_template, + ctx2, + /*$$scope*/ + ctx2[15], + !current ? get_all_dirty_from_scope( + /*$$scope*/ + ctx2[15] + ) : get_slot_changes( + heading_slot_template, + /*$$scope*/ + ctx2[15], + dirty, + get_heading_slot_changes + ), + get_heading_slot_context + ); + } + } + if (!current || dirty & /*expanded*/ + 1 && span1_class_value !== (span1_class_value = /*expanded*/ + ctx2[0] ? "" : " [&_path]:origin-center [&_path]:rotate-180")) { + attr_dev(span1, "class", span1_class_value); + } + if (!current || dirty & /*expanded*/ + 1) { + attr_dev( + button, + "aria-expanded", + /*expanded*/ + ctx2[0] + ); + } + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if (~current_block_type_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } + } else { + if (if_block) { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + } + if (~current_block_type_index) { + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(section, null); + } else { + if_block = null; + } + } + }, + i: function intro(local) { + if (current) + return; + transition_in(heading_slot, local); + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(heading_slot, local); + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(section); + } + if (heading_slot) + heading_slot.d(detaching); + if (~current_block_type_index) { + if_blocks[current_block_type_index].d(); + } + mounted = false; + dispose(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment10.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance10($$self, $$props, $$invalidate) { + let astElements; + let $selectedAstElementId; + let $highlightedAstElement; + validate_store(selectedAstElementId, "selectedAstElementId"); + component_subscribe($$self, selectedAstElementId, ($$value) => $$invalidate(23, $selectedAstElementId = $$value)); + validate_store(highlightedAstElement, "highlightedAstElement"); + component_subscribe($$self, highlightedAstElement, ($$value) => $$invalidate(24, $highlightedAstElement = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("SidebarSection", slots, ["heading", "input", "value"]); + const $$slots = compute_slots(slots); + const dispatch2 = createEventDispatcher(); + let { value = "" } = $$props; + let { astNodes = null } = $$props; + let { clearOnUpdate = false } = $$props; + let { expanded = true } = $$props; + let { placeholder = "" } = $$props; + let { large = false } = $$props; + function highlightAstElement(astElement) { + set_store_value(highlightedAstElement, $highlightedAstElement = astElement, $highlightedAstElement); + } + function unhighlightAstElement() { + set_store_value(highlightedAstElement, $highlightedAstElement = void 0, $highlightedAstElement); + } + let internalValue = astElements ? null : value; + function handleKeydown(e) { + if (!(e.target instanceof HTMLInputElement)) + return; + let text2 = e.target.value; + if (e.key === "Enter" && text2 && text2.length > 0 && text2 !== value) { + dispatch2("update", text2); + if (clearOnUpdate) { + $$invalidate(3, internalValue = null); + e.target.value = ""; + } + } + } + function handleTextChange(e) { + if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) { + dispatch2("textChange", e.target.value); + } + } + function select(astElement) { + let id = findAstElementId(astElement); + set_store_value(selectedAstElementId, $selectedAstElementId = id, $selectedAstElementId); + } + function moveAstElement(movement, astElement) { + if (!astNodes) + return; + let astNodesCopy = Array.from(astNodes); + let index3 = astNodesCopy.indexOf(astElement); + astNodesCopy.splice(index3, 1); + astNodesCopy.splice(index3 + movement, 0, astElement); + dispatch2("nodesChange", astNodesCopy); + } + const writable_props = ["value", "astNodes", "clearOnUpdate", "expanded", "placeholder", "large"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + const click_handler = () => $$invalidate(0, expanded = !expanded); + const click_handler_1 = (astElement) => select(astElement); + const click_handler_2 = (astElement) => moveAstElement(-1, astElement); + const click_handler_3 = (astElement) => moveAstElement(1, astElement); + const mouseenter_handler = (astElement) => highlightAstElement(astElement); + const mouseleave_handler = () => unhighlightAstElement(); + $$self.$$set = ($$props2) => { + if ("value" in $$props2) + $$invalidate(12, value = $$props2.value); + if ("astNodes" in $$props2) + $$invalidate(13, astNodes = $$props2.astNodes); + if ("clearOnUpdate" in $$props2) + $$invalidate(14, clearOnUpdate = $$props2.clearOnUpdate); + if ("expanded" in $$props2) + $$invalidate(0, expanded = $$props2.expanded); + if ("placeholder" in $$props2) + $$invalidate(1, placeholder = $$props2.placeholder); + if ("large" in $$props2) + $$invalidate(2, large = $$props2.large); + if ("$$scope" in $$props2) + $$invalidate(15, $$scope = $$props2.$$scope); + }; + $$self.$capture_state = () => ({ + createEventDispatcher, + highlightedAstElement, + findAstElementId, + selectedAstElementId, + isAstElement, + dispatch: dispatch2, + value, + astNodes, + clearOnUpdate, + expanded, + placeholder, + large, + highlightAstElement, + unhighlightAstElement, + internalValue, + handleKeydown, + handleTextChange, + select, + moveAstElement, + astElements, + $selectedAstElementId, + $highlightedAstElement + }); + $$self.$inject_state = ($$props2) => { + if ("value" in $$props2) + $$invalidate(12, value = $$props2.value); + if ("astNodes" in $$props2) + $$invalidate(13, astNodes = $$props2.astNodes); + if ("clearOnUpdate" in $$props2) + $$invalidate(14, clearOnUpdate = $$props2.clearOnUpdate); + if ("expanded" in $$props2) + $$invalidate(0, expanded = $$props2.expanded); + if ("placeholder" in $$props2) + $$invalidate(1, placeholder = $$props2.placeholder); + if ("large" in $$props2) + $$invalidate(2, large = $$props2.large); + if ("internalValue" in $$props2) + $$invalidate(3, internalValue = $$props2.internalValue); + if ("astElements" in $$props2) + $$invalidate(4, astElements = $$props2.astElements); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*astNodes*/ + 8192) { + $: + $$invalidate(4, astElements = (astNodes || []).filter(isAstElement)); + } + if ($$self.$$.dirty & /*astNodes*/ + 8192) { + $: { + if ((astNodes === null || astNodes === void 0 ? void 0 : astNodes.length) === 1) { + let first = astNodes[0]; + if (!isAstElement(first)) { + $$invalidate(3, internalValue = first); + } + } else if (astNodes) { + $$invalidate(3, internalValue = null); + } + } + } + }; + return [ + expanded, + placeholder, + large, + internalValue, + astElements, + highlightAstElement, + unhighlightAstElement, + handleKeydown, + handleTextChange, + select, + moveAstElement, + $$slots, + value, + astNodes, + clearOnUpdate, + $$scope, + slots, + click_handler, + click_handler_1, + click_handler_2, + click_handler_3, + mouseenter_handler, + mouseleave_handler + ]; + } + var SidebarSection = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance10, create_fragment10, safe_not_equal, { + value: 12, + astNodes: 13, + clearOnUpdate: 14, + expanded: 0, + placeholder: 1, + large: 2 + }); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "SidebarSection", + options, + id: create_fragment10.name + }); + } + get value() { + return this.$$.ctx[12]; + } + set value(value) { + this.$$set({ value }); + flush(); + } + get astNodes() { + return this.$$.ctx[13]; + } + set astNodes(astNodes) { + this.$$set({ astNodes }); + flush(); + } + get clearOnUpdate() { + return this.$$.ctx[14]; + } + set clearOnUpdate(clearOnUpdate) { + this.$$set({ clearOnUpdate }); + flush(); + } + get expanded() { + return this.$$.ctx[0]; + } + set expanded(expanded) { + this.$$set({ expanded }); + flush(); + } + get placeholder() { + return this.$$.ctx[1]; + } + set placeholder(placeholder) { + this.$$set({ placeholder }); + flush(); + } + get large() { + return this.$$.ctx[2]; + } + set large(large) { + this.$$set({ large }); + flush(); + } + }; + create_custom_element(SidebarSection, { "value": {}, "astNodes": {}, "clearOnUpdate": { "type": "Boolean" }, "expanded": { "type": "Boolean" }, "placeholder": {}, "large": { "type": "Boolean" } }, ["heading", "input", "value"], [], true); + var SidebarSection_default = SidebarSection; + + // svelte/components/PropertiesSidebar.svelte + var { Object: Object_1 } = globals; + var file11 = "svelte/components/PropertiesSidebar.svelte"; + function get_each_context6(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[30] = list[i]; + const constants_0 = ( + /*entry*/ + child_ctx[30] + ); + child_ctx[31] = constants_0[0]; + child_ctx[32] = constants_0[1]; + return child_ctx; + } + function get_each_context_13(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[35] = list[i]; + return child_ctx; + } + function create_else_block4(ctx) { + let div; + let textContent = "Select a component to edit its properties"; + const block = { + c: function create3() { + div = element("div"); + div.textContent = textContent; + this.h(); + }, + l: function claim(nodes) { + div = claim_element(nodes, "DIV", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(div) !== "svelte-y8jlza") + div.textContent = textContent; + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "p-4 pt-8 font-medium text-lg text-center"); + add_location(div, file11, 240, 6, 10850); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div, anchor); + }, + p: noop2, + i: noop2, + o: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_else_block4.name, + type: "else", + source: "(253:4) {:else}", + ctx + }); + return block; + } + function create_if_block7(ctx) { + let div0; + let t0; + let t1; + let t2; + let button; + let span; + let textContent = "Close"; + let t4; + let svg; + let path; + let t5; + let t6; + let t7; + let div1; + let t8; + let t9; + let sidebarsection; + let current; + let mounted; + let dispose; + let if_block0 = !/*isRootNode*/ + ctx[5] && create_if_block_54(ctx); + let if_block1 = ( + /*attributesEditable*/ + ctx[4] && create_if_block_44(ctx) + ); + let if_block2 = ( + /*$selectedAstElement*/ + ctx[0].tag === "eex_block" && create_if_block_34(ctx) + ); + let if_block3 = ( + /*$draggedObject*/ + ctx[8] && /*$draggedObject*/ + ctx[8].category === "basic" && create_if_block_24(ctx) + ); + let if_block4 = ( + /*$selectedAstElement*/ + ctx[0].content?.length > 0 && create_if_block_15(ctx) + ); + sidebarsection = new SidebarSection_default({ + props: { + expanded: false, + $$slots: { + input: [create_input_slot], + heading: [create_heading_slot] + }, + $$scope: { ctx } + }, + $$inline: true + }); + const block = { + c: function create3() { + div0 = element("div"); + t0 = text( + /*sidebarTitle*/ + ctx[6] + ); + t1 = space(); + if (if_block0) + if_block0.c(); + t2 = space(); + button = element("button"); + span = element("span"); + span.textContent = textContent; + t4 = space(); + svg = svg_element("svg"); + path = svg_element("path"); + t5 = space(); + if (if_block1) + if_block1.c(); + t6 = space(); + if (if_block2) + if_block2.c(); + t7 = space(); + div1 = element("div"); + if (if_block3) + if_block3.c(); + t8 = space(); + if (if_block4) + if_block4.c(); + t9 = space(); + create_component(sidebarsection.$$.fragment); + this.h(); + }, + l: function claim(nodes) { + div0 = claim_element(nodes, "DIV", { class: true }); + var div0_nodes = children(div0); + t0 = claim_text( + div0_nodes, + /*sidebarTitle*/ + ctx[6] + ); + t1 = claim_space(div0_nodes); + if (if_block0) + if_block0.l(div0_nodes); + t2 = claim_space(div0_nodes); + button = claim_element(div0_nodes, "BUTTON", { type: true, class: true }); + var button_nodes = children(button); + span = claim_element(button_nodes, "SPAN", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(span) !== "svelte-1pewzs3") + span.textContent = textContent; + t4 = claim_space(button_nodes); + svg = claim_svg_element(button_nodes, "svg", { + xmlns: true, + viewBox: true, + fill: true, + class: true + }); + var svg_nodes = children(svg); + path = claim_svg_element(svg_nodes, "path", { + "fill-rule": true, + d: true, + "clip-rule": true + }); + children(path).forEach(detach_dev); + svg_nodes.forEach(detach_dev); + button_nodes.forEach(detach_dev); + div0_nodes.forEach(detach_dev); + t5 = claim_space(nodes); + if (if_block1) + if_block1.l(nodes); + t6 = claim_space(nodes); + if (if_block2) + if_block2.l(nodes); + t7 = claim_space(nodes); + div1 = claim_element(nodes, "DIV", { class: true }); + var div1_nodes = children(div1); + if (if_block3) + if_block3.l(div1_nodes); + t8 = claim_space(div1_nodes); + if (if_block4) + if_block4.l(div1_nodes); + div1_nodes.forEach(detach_dev); + t9 = claim_space(nodes); + claim_component(sidebarsection.$$.fragment, nodes); + this.h(); + }, + h: function hydrate() { + attr_dev(span, "class", "sr-only"); + add_location(span, file11, 151, 10, 7149); + attr_dev(path, "fill-rule", "evenodd"); + attr_dev(path, "d", "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z"); + attr_dev(path, "clip-rule", "evenodd"); + add_location(path, file11, 158, 12, 7403); + attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); + attr_dev(svg, "viewBox", "0 0 24 24"); + attr_dev(svg, "fill", "currentColor"); + attr_dev(svg, "class", "w-6 h-6 hover:text-blue-700 active:text-blue-900"); + add_location(svg, file11, 152, 10, 7194); + attr_dev(button, "type", "button"); + attr_dev(button, "class", "absolute p-2 top-2 right-1"); + add_location(button, file11, 150, 8, 7028); + attr_dev(div0, "class", "border-b text-lg font-medium leading-5 p-4 relative"); + add_location(div0, file11, 127, 6, 5899); + attr_dev(div1, "class", "relative"); + add_location(div1, file11, 200, 6, 9313); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div0, anchor); + append_hydration_dev(div0, t0); + append_hydration_dev(div0, t1); + if (if_block0) + if_block0.m(div0, null); + append_hydration_dev(div0, t2); + append_hydration_dev(div0, button); + append_hydration_dev(button, span); + append_hydration_dev(button, t4); + append_hydration_dev(button, svg); + append_hydration_dev(svg, path); + insert_hydration_dev(target, t5, anchor); + if (if_block1) + if_block1.m(target, anchor); + insert_hydration_dev(target, t6, anchor); + if (if_block2) + if_block2.m(target, anchor); + insert_hydration_dev(target, t7, anchor); + insert_hydration_dev(target, div1, anchor); + if (if_block3) + if_block3.m(div1, null); + append_hydration_dev(div1, t8); + if (if_block4) + if_block4.m(div1, null); + insert_hydration_dev(target, t9, anchor); + mount_component(sidebarsection, target, anchor); + current = true; + if (!mounted) { + dispose = listen_dev( + button, + "click", + /*click_handler*/ + ctx[21], + false, + false, + false, + false + ); + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (!current || dirty[0] & /*sidebarTitle*/ + 64) + set_data_dev( + t0, + /*sidebarTitle*/ + ctx2[6] + ); + if (!/*isRootNode*/ + ctx2[5]) { + if (if_block0) { + if_block0.p(ctx2, dirty); + } else { + if_block0 = create_if_block_54(ctx2); + if_block0.c(); + if_block0.m(div0, t2); + } + } else if (if_block0) { + if_block0.d(1); + if_block0 = null; + } + if ( + /*attributesEditable*/ + ctx2[4] + ) { + if (if_block1) { + if_block1.p(ctx2, dirty); + if (dirty[0] & /*attributesEditable*/ + 16) { + transition_in(if_block1, 1); + } + } else { + if_block1 = create_if_block_44(ctx2); + if_block1.c(); + transition_in(if_block1, 1); + if_block1.m(t6.parentNode, t6); + } + } else if (if_block1) { + group_outros(); + transition_out(if_block1, 1, 1, () => { + if_block1 = null; + }); + check_outros(); + } + if ( + /*$selectedAstElement*/ + ctx2[0].tag === "eex_block" + ) { + if (if_block2) { + if_block2.p(ctx2, dirty); + if (dirty[0] & /*$selectedAstElement*/ + 1) { + transition_in(if_block2, 1); + } + } else { + if_block2 = create_if_block_34(ctx2); + if_block2.c(); + transition_in(if_block2, 1); + if_block2.m(t7.parentNode, t7); + } + } else if (if_block2) { + group_outros(); + transition_out(if_block2, 1, 1, () => { + if_block2 = null; + }); + check_outros(); + } + if ( + /*$draggedObject*/ + ctx2[8] && /*$draggedObject*/ + ctx2[8].category === "basic" + ) { + if (if_block3) { + if_block3.p(ctx2, dirty); + } else { + if_block3 = create_if_block_24(ctx2); + if_block3.c(); + if_block3.m(div1, t8); + } + } else if (if_block3) { + if_block3.d(1); + if_block3 = null; + } + if ( + /*$selectedAstElement*/ + ctx2[0].content?.length > 0 + ) { + if (if_block4) { + if_block4.p(ctx2, dirty); + if (dirty[0] & /*$selectedAstElement*/ + 1) { + transition_in(if_block4, 1); + } + } else { + if_block4 = create_if_block_15(ctx2); + if_block4.c(); + transition_in(if_block4, 1); + if_block4.m(div1, null); + } + } else if (if_block4) { + group_outros(); + transition_out(if_block4, 1, 1, () => { + if_block4 = null; + }); + check_outros(); + } + const sidebarsection_changes = {}; + if (dirty[0] & /*sidebarTitle*/ + 64 | dirty[1] & /*$$scope*/ + 128) { + sidebarsection_changes.$$scope = { dirty, ctx: ctx2 }; + } + sidebarsection.$set(sidebarsection_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block1); + transition_in(if_block2); + transition_in(if_block4); + transition_in(sidebarsection.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(if_block1); + transition_out(if_block2); + transition_out(if_block4); + transition_out(sidebarsection.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div0); + detach_dev(t5); + detach_dev(t6); + detach_dev(t7); + detach_dev(div1); + detach_dev(t9); + } + if (if_block0) + if_block0.d(); + if (if_block1) + if_block1.d(detaching); + if (if_block2) + if_block2.d(detaching); + if (if_block3) + if_block3.d(); + if (if_block4) + if_block4.d(); + destroy_component(sidebarsection, detaching); + mounted = false; + dispose(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block7.name, + type: "if", + source: "(140:4) {#if $selectedAstElement}", + ctx + }); + return block; + } + function create_if_block_54(ctx) { + let button; + let span0; + let textContent = "Up one level"; + let t1; + let span1; + let textContent_1 = "Up one level"; + let t3; + let svg; + let path; + let mounted; + let dispose; + const block = { + c: function create3() { + button = element("button"); + span0 = element("span"); + span0.textContent = textContent; + t1 = space(); + span1 = element("span"); + span1.textContent = textContent_1; + t3 = space(); + svg = svg_element("svg"); + path = svg_element("path"); + this.h(); + }, + l: function claim(nodes) { + button = claim_element(nodes, "BUTTON", { type: true, class: true }); + var button_nodes = children(button); + span0 = claim_element(button_nodes, "SPAN", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(span0) !== "svelte-e67xyw") + span0.textContent = textContent; + t1 = claim_space(button_nodes); + span1 = claim_element(button_nodes, "SPAN", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(span1) !== "svelte-uuliww") + span1.textContent = textContent_1; + t3 = claim_space(button_nodes); + svg = claim_svg_element(button_nodes, "svg", { + xmlns: true, + viewBox: true, + fill: true, + class: true + }); + var svg_nodes = children(svg); + path = claim_svg_element(svg_nodes, "path", { + "fill-rule": true, + d: true, + "clip-rule": true + }); + children(path).forEach(detach_dev); + svg_nodes.forEach(detach_dev); + button_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(span0, "class", "sr-only"); + add_location(span0, file11, 131, 12, 6128); + attr_dev(span1, "class", "absolute opacity-0 invisible right-9 min-w-[100px] bg-amber-100 py-1 px-1.5 rounded text-xs text-medium transition group-hover:opacity-100 group-hover:visible"); + add_location(span1, file11, 132, 12, 6182); + attr_dev(path, "fill-rule", "evenodd"); + attr_dev(path, "d", "M9.53 2.47a.75.75 0 0 1 0 1.06L4.81 8.25H15a6.75 6.75 0 0 1 0 13.5h-3a.75.75 0 0 1 0-1.5h3a5.25 5.25 0 1 0 0-10.5H4.81l4.72 4.72a.75.75 0 1 1-1.06 1.06l-6-6a.75.75 0 0 1 0-1.06l6-6a.75.75 0 0 1 1.06 0Z"); + attr_dev(path, "clip-rule", "evenodd"); + add_location(path, file11, 142, 14, 6650); + attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); + attr_dev(svg, "viewBox", "0 0 24 24"); + attr_dev(svg, "fill", "currentColor"); + attr_dev(svg, "class", "w-6 h-6 hover:text-blue-700 active:text-blue-900"); + add_location(svg, file11, 136, 12, 6429); + attr_dev(button, "type", "button"); + attr_dev(button, "class", "absolute p-2 top-2 right-9 group"); + add_location(button, file11, 130, 10, 6024); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, button, anchor); + append_hydration_dev(button, span0); + append_hydration_dev(button, t1); + append_hydration_dev(button, span1); + append_hydration_dev(button, t3); + append_hydration_dev(button, svg); + append_hydration_dev(svg, path); + if (!mounted) { + dispose = listen_dev( + button, + "click", + /*selectParentNode*/ + ctx[10], + false, + false, + false, + false + ); + mounted = true; + } + }, + p: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(button); + } + mounted = false; + dispose(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_54.name, + type: "if", + source: "(143:8) {#if !isRootNode}", + ctx + }); + return block; + } + function create_if_block_44(ctx) { + let sidebarsection; + let t; + let each_blocks = []; + let each_1_lookup = /* @__PURE__ */ new Map(); + let each_1_anchor; + let current; + sidebarsection = new SidebarSection_default({ + props: { + clearOnUpdate: true, + placeholder: "Add new class", + $$slots: { + value: [create_value_slot], + heading: [create_heading_slot_5] + }, + $$scope: { ctx } + }, + $$inline: true + }); + sidebarsection.$on( + "update", + /*addClasses*/ + ctx[9] + ); + let each_value = ensure_array_like_dev( + /*editableAttrs*/ + ctx[7] + ); + const get_key = (ctx2) => ( + /*entry*/ + ctx2[30] + ); + validate_each_keys(ctx, each_value, get_each_context6, get_key); + for (let i = 0; i < each_value.length; i += 1) { + let child_ctx = get_each_context6(ctx, each_value, i); + let key = get_key(child_ctx); + each_1_lookup.set(key, each_blocks[i] = create_each_block6(key, child_ctx)); + } + const block = { + c: function create3() { + create_component(sidebarsection.$$.fragment); + t = space(); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + l: function claim(nodes) { + claim_component(sidebarsection.$$.fragment, nodes); + t = claim_space(nodes); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(nodes); + } + each_1_anchor = empty(); + }, + m: function mount(target, anchor) { + mount_component(sidebarsection, target, anchor); + insert_hydration_dev(target, t, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert_hydration_dev(target, each_1_anchor, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const sidebarsection_changes = {}; + if (dirty[0] & /*classList*/ + 4 | dirty[1] & /*$$scope*/ + 128) { + sidebarsection_changes.$$scope = { dirty, ctx: ctx2 }; + } + sidebarsection.$set(sidebarsection_changes); + if (dirty[0] & /*editableAttrs, updateAttribute*/ + 16512) { + each_value = ensure_array_like_dev( + /*editableAttrs*/ + ctx2[7] + ); + group_outros(); + validate_each_keys(ctx2, each_value, get_each_context6, get_key); + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, each_1_anchor.parentNode, outro_and_destroy_block, create_each_block6, each_1_anchor, get_each_context6); + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(sidebarsection.$$.fragment, local); + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o: function outro(local) { + transition_out(sidebarsection.$$.fragment, local); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + detach_dev(each_1_anchor); + } + destroy_component(sidebarsection, detaching); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].d(detaching); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_44.name, + type: "if", + source: "(180:6) {#if attributesEditable}", + ctx + }); + return block; + } + function create_heading_slot_5(ctx) { + let t; + const block = { + c: function create3() { + t = text("Classes"); + }, + l: function claim(nodes) { + t = claim_text(nodes, "Classes"); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_heading_slot_5.name, + type: "slot", + source: '(182:10) ', + ctx + }); + return block; + } + function create_default_slot3(ctx) { + let t_value = ( + /*className*/ + ctx[35] + "" + ); + let t; + const block = { + c: function create3() { + t = text(t_value); + }, + l: function claim(nodes) { + t = claim_text(nodes, t_value); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty[0] & /*classList*/ + 4 && t_value !== (t_value = /*className*/ + ctx2[35] + "")) + set_data_dev(t, t_value); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_default_slot3.name, + type: "slot", + source: "(185:14) deleteClass(className)}>", + ctx + }); + return block; + } + function create_each_block_13(ctx) { + let pill; + let current; + function delete_handler() { + return ( + /*delete_handler*/ + ctx[22]( + /*className*/ + ctx[35] + ) + ); + } + pill = new Pill_default({ + props: { + $$slots: { default: [create_default_slot3] }, + $$scope: { ctx } + }, + $$inline: true + }); + pill.$on("delete", delete_handler); + const block = { + c: function create3() { + create_component(pill.$$.fragment); + }, + l: function claim(nodes) { + claim_component(pill.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(pill, target, anchor); + current = true; + }, + p: function update2(new_ctx, dirty) { + ctx = new_ctx; + const pill_changes = {}; + if (dirty[0] & /*classList*/ + 4 | dirty[1] & /*$$scope*/ + 128) { + pill_changes.$$scope = { dirty, ctx }; + } + pill.$set(pill_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(pill.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(pill.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(pill, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block_13.name, + type: "each", + source: "(184:12) {#each classList as className}", + ctx + }); + return block; + } + function create_value_slot(ctx) { + let each_1_anchor; + let current; + let each_value_1 = ensure_array_like_dev( + /*classList*/ + ctx[2] + ); + let each_blocks = []; + for (let i = 0; i < each_value_1.length; i += 1) { + each_blocks[i] = create_each_block_13(get_each_context_13(ctx, each_value_1, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + const block = { + c: function create3() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + l: function claim(nodes) { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].l(nodes); + } + each_1_anchor = empty(); + }, + m: function mount(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert_hydration_dev(target, each_1_anchor, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + if (dirty[0] & /*deleteClass, classList*/ + 2052) { + each_value_1 = ensure_array_like_dev( + /*classList*/ + ctx2[2] + ); + let i; + for (i = 0; i < each_value_1.length; i += 1) { + const child_ctx = get_each_context_13(ctx2, each_value_1, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block_13(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + group_outros(); + for (i = each_value_1.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i: function intro(local) { + if (current) + return; + for (let i = 0; i < each_value_1.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o: function outro(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_value_slot.name, + type: "slot", + source: '(183:10) ', + ctx + }); + return block; + } + function create_heading_slot_4(ctx) { + let t_value = ( + /*name*/ + ctx[31] + "" + ); + let t; + const block = { + c: function create3() { + t = text(t_value); + }, + l: function claim(nodes) { + t = claim_text(nodes, t_value); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + p: function update2(ctx2, dirty) { + if (dirty[0] & /*editableAttrs*/ + 128 && t_value !== (t_value = /*name*/ + ctx2[31] + "")) + set_data_dev(t, t_value); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_heading_slot_4.name, + type: "slot", + source: '(197:12) ', + ctx + }); + return block; + } + function create_each_block6(key_1, ctx) { + let first; + let sidebarsection; + let current; + function textChange_handler(...args) { + return ( + /*textChange_handler*/ + ctx[23]( + /*name*/ + ctx[31], + ...args + ) + ); + } + sidebarsection = new SidebarSection_default({ + props: { + clearOnUpdate: true, + value: ( + /*value*/ + ctx[32] + ), + placeholder: "Set " + /*name*/ + ctx[31], + $$slots: { heading: [create_heading_slot_4] }, + $$scope: { ctx } + }, + $$inline: true + }); + sidebarsection.$on("textChange", textChange_handler); + const block = { + key: key_1, + first: null, + c: function create3() { + first = empty(); + create_component(sidebarsection.$$.fragment); + this.h(); + }, + l: function claim(nodes) { + first = empty(); + claim_component(sidebarsection.$$.fragment, nodes); + this.h(); + }, + h: function hydrate() { + this.first = first; + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, first, anchor); + mount_component(sidebarsection, target, anchor); + current = true; + }, + p: function update2(new_ctx, dirty) { + ctx = new_ctx; + const sidebarsection_changes = {}; + if (dirty[0] & /*editableAttrs*/ + 128) + sidebarsection_changes.value = /*value*/ + ctx[32]; + if (dirty[0] & /*editableAttrs*/ + 128) + sidebarsection_changes.placeholder = "Set " + /*name*/ + ctx[31]; + if (dirty[0] & /*editableAttrs*/ + 128 | dirty[1] & /*$$scope*/ + 128) { + sidebarsection_changes.$$scope = { dirty, ctx }; + } + sidebarsection.$set(sidebarsection_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(sidebarsection.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(sidebarsection.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(first); + } + destroy_component(sidebarsection, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block6.name, + type: "each", + source: "(189:8) {#each editableAttrs as entry (entry)}", + ctx + }); + return block; + } + function create_if_block_34(ctx) { + let sidebarsection0; + let t; + let sidebarsection1; + let current; + sidebarsection0 = new SidebarSection_default({ + props: { + value: ( + /*$selectedAstElement*/ + ctx[0].arg + ), + large: true, + $$slots: { heading: [create_heading_slot_3] }, + $$scope: { ctx } + }, + $$inline: true + }); + sidebarsection0.$on( + "update", + /*updateArg*/ + ctx[13] + ); + sidebarsection1 = new SidebarSection_default({ + props: { + $$slots: { + input: [create_input_slot_1], + heading: [create_heading_slot_2] + }, + $$scope: { ctx } + }, + $$inline: true + }); + const block = { + c: function create3() { + create_component(sidebarsection0.$$.fragment); + t = space(); + create_component(sidebarsection1.$$.fragment); + }, + l: function claim(nodes) { + claim_component(sidebarsection0.$$.fragment, nodes); + t = claim_space(nodes); + claim_component(sidebarsection1.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(sidebarsection0, target, anchor); + insert_hydration_dev(target, t, anchor); + mount_component(sidebarsection1, target, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const sidebarsection0_changes = {}; + if (dirty[0] & /*$selectedAstElement*/ + 1) + sidebarsection0_changes.value = /*$selectedAstElement*/ + ctx2[0].arg; + if (dirty[1] & /*$$scope*/ + 128) { + sidebarsection0_changes.$$scope = { dirty, ctx: ctx2 }; + } + sidebarsection0.$set(sidebarsection0_changes); + const sidebarsection1_changes = {}; + if (dirty[1] & /*$$scope*/ + 128) { + sidebarsection1_changes.$$scope = { dirty, ctx: ctx2 }; + } + sidebarsection1.$set(sidebarsection1_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(sidebarsection0.$$.fragment, local); + transition_in(sidebarsection1.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(sidebarsection0.$$.fragment, local); + transition_out(sidebarsection1.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + destroy_component(sidebarsection0, detaching); + destroy_component(sidebarsection1, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_34.name, + type: "if", + source: '(201:6) {#if $selectedAstElement.tag === \\"eex_block\\"}', + ctx + }); + return block; + } + function create_heading_slot_3(ctx) { + let t; + const block = { + c: function create3() { + t = text("Block argument"); + }, + l: function claim(nodes) { + t = claim_text(nodes, "Block argument"); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_heading_slot_3.name, + type: "slot", + source: '(203:10) ', + ctx + }); + return block; + } + function create_heading_slot_2(ctx) { + let t; + const block = { + c: function create3() { + t = text("Block content"); + }, + l: function claim(nodes) { + t = claim_text(nodes, "Block content"); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_heading_slot_2.name, + type: "slot", + source: '(207:10) ', + ctx + }); + return block; + } + function create_input_slot_1(ctx) { + let p; + let textContent = "The content of eex blocks can't be edited from the visual editor yet. Please use the code editor."; + const block = { + c: function create3() { + p = element("p"); + p.textContent = textContent; + this.h(); + }, + l: function claim(nodes) { + p = claim_element(nodes, "P", { ["data-svelte-h"]: true }); + if (get_svelte_dataset(p) !== "svelte-lwo9ri") + p.textContent = textContent; + this.h(); + }, + h: function hydrate() { + add_location(p, file11, 195, 12, 9134); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, p, anchor); + }, + p: noop2, + d: function destroy(detaching) { + if (detaching) { + detach_dev(p); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_input_slot_1.name, + type: "slot", + source: '(208:10) ', + ctx + }); + return block; + } + function create_if_block_24(ctx) { + let div1; + let div0; + let textContent = "Drop components here"; + let mounted; + let dispose; + const block = { + c: function create3() { + div1 = element("div"); + div0 = element("div"); + div0.textContent = textContent; + this.h(); + }, + l: function claim(nodes) { + div1 = claim_element(nodes, "DIV", { class: true, role: true }); + var div1_nodes = children(div1); + div0 = claim_element(div1_nodes, "DIV", { class: true, ["data-svelte-h"]: true }); + if (get_svelte_dataset(div0) !== "svelte-1mbq8po") + div0.textContent = textContent; + div1_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div0, "class", "flex rounded-lg outline-dashed outline-2 h-full text-center justify-center items-center"); + add_location(div0, file11, 210, 12, 9721); + attr_dev(div1, "class", "absolute bg-white opacity-70 w-full h-full p-4"); + attr_dev(div1, "role", "list"); + toggle_class( + div1, + "opacity-90", + /*isDraggingOver*/ + ctx[3] + ); + add_location(div1, file11, 202, 10, 9414); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div1, anchor); + append_hydration_dev(div1, div0); + if (!mounted) { + dispose = [ + listen_dev(div1, "drop", prevent_default( + /*dropInside*/ + ctx[16] + ), false, true, false, false), + listen_dev( + div1, + "dragover", + /*dragOver*/ + ctx[17], + false, + false, + false, + false + ), + listen_dev( + div1, + "dragleave", + /*dragleave_handler*/ + ctx[24], + false, + false, + false, + false + ) + ]; + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty[0] & /*isDraggingOver*/ + 8) { + toggle_class( + div1, + "opacity-90", + /*isDraggingOver*/ + ctx2[3] + ); + } + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div1); + } + mounted = false; + run_all(dispose); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_24.name, + type: "if", + source: '(215:8) {#if $draggedObject && $draggedObject.category === \\"basic\\"}', + ctx + }); + return block; + } + function create_if_block_15(ctx) { + let sidebarsection; + let current; + sidebarsection = new SidebarSection_default({ + props: { + astNodes: ( + /*$selectedAstElement*/ + ctx[0].content + ), + large: ( + /*$selectedAstElement*/ + ctx[0].tag === "eex" + ), + $$slots: { heading: [create_heading_slot_1] }, + $$scope: { ctx } + }, + $$inline: true + }); + sidebarsection.$on( + "textChange", + /*textChange_handler_1*/ + ctx[25] + ); + sidebarsection.$on( + "nodesChange", + /*changeNodes*/ + ctx[18] + ); + const block = { + c: function create3() { + create_component(sidebarsection.$$.fragment); + }, + l: function claim(nodes) { + claim_component(sidebarsection.$$.fragment, nodes); + }, + m: function mount(target, anchor) { + mount_component(sidebarsection, target, anchor); + current = true; + }, + p: function update2(ctx2, dirty) { + const sidebarsection_changes = {}; + if (dirty[0] & /*$selectedAstElement*/ + 1) + sidebarsection_changes.astNodes = /*$selectedAstElement*/ + ctx2[0].content; + if (dirty[0] & /*$selectedAstElement*/ + 1) + sidebarsection_changes.large = /*$selectedAstElement*/ + ctx2[0].tag === "eex"; + if (dirty[1] & /*$$scope*/ + 128) { + sidebarsection_changes.$$scope = { dirty, ctx: ctx2 }; + } + sidebarsection.$set(sidebarsection_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(sidebarsection.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(sidebarsection.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(sidebarsection, detaching); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block_15.name, + type: "if", + source: "(229:8) {#if $selectedAstElement.content?.length > 0}", + ctx + }); + return block; + } + function create_heading_slot_1(ctx) { + let t; + const block = { + c: function create3() { + t = text("Content"); + }, + l: function claim(nodes) { + t = claim_text(nodes, "Content"); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_heading_slot_1.name, + type: "slot", + source: '(236:12) ', + ctx + }); + return block; + } + function create_heading_slot(ctx) { + let t; + const block = { + c: function create3() { + t = text("Delete"); + }, + l: function claim(nodes) { + t = claim_text(nodes, "Delete"); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, t, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t); + } + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_heading_slot.name, + type: "slot", + source: '(242:8) ', + ctx + }); + return block; + } + function create_input_slot(ctx) { + let button; + let t0; + let span; + let t1; + let t2; + let t3; + let mounted; + let dispose; + const block = { + c: function create3() { + button = element("button"); + t0 = text("Delete "); + span = element("span"); + t1 = text("current "); + t2 = text( + /*sidebarTitle*/ + ctx[6] + ); + t3 = text(" element"); + this.h(); + }, + l: function claim(nodes) { + button = claim_element(nodes, "BUTTON", { type: true, class: true }); + var button_nodes = children(button); + t0 = claim_text(button_nodes, "Delete "); + span = claim_element(button_nodes, "SPAN", { class: true }); + var span_nodes = children(span); + t1 = claim_text(span_nodes, "current "); + t2 = claim_text( + span_nodes, + /*sidebarTitle*/ + ctx[6] + ); + t3 = claim_text(span_nodes, " element"); + span_nodes.forEach(detach_dev); + button_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(span, "class", "sr-only"); + add_location(span, file11, 235, 19, 10701); + attr_dev(button, "type", "button"); + attr_dev(button, "class", "bg-red-500 hover:bg-red-700 active:bg-red-800 text-white font-bold py-2 px-4 rounded outline-2 w-full"); + add_location(button, file11, 230, 10, 10475); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, button, anchor); + append_hydration_dev(button, t0); + append_hydration_dev(button, span); + append_hydration_dev(span, t1); + append_hydration_dev(span, t2); + append_hydration_dev(span, t3); + if (!mounted) { + dispose = listen_dev( + button, + "click", + /*deleteComponent*/ + ctx[15], + false, + false, + false, + false + ); + mounted = true; + } + }, + p: function update2(ctx2, dirty) { + if (dirty[0] & /*sidebarTitle*/ + 64) + set_data_dev( + t2, + /*sidebarTitle*/ + ctx2[6] + ); + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(button); + } + mounted = false; + dispose(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_input_slot.name, + type: "slot", + source: '(243:8) ', + ctx + }); + return block; + } + function create_fragment11(ctx) { + let div1; + let div0; + let current_block_type_index; + let if_block; + let current; + const if_block_creators = [create_if_block7, create_else_block4]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if ( + /*$selectedAstElement*/ + ctx2[0] + ) + return 0; + return 1; + } + current_block_type_index = select_block_type(ctx, [-1, -1]); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + const block = { + c: function create3() { + div1 = element("div"); + div0 = element("div"); + if_block.c(); + this.h(); + }, + l: function claim(nodes) { + div1 = claim_element(nodes, "DIV", { class: true, "data-test-id": true }); + var div1_nodes = children(div1); + div0 = claim_element(div1_nodes, "DIV", { class: true }); + var div0_nodes = children(div0); + if_block.l(div0_nodes); + div0_nodes.forEach(detach_dev); + div1_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div0, "class", "sticky top-0 overflow-y-auto h-screen"); + add_location(div0, file11, 125, 2, 5811); + attr_dev(div1, "class", "w-64 bg-white"); + attr_dev(div1, "data-test-id", "right-sidebar"); + add_location(div1, file11, 124, 0, 5752); + }, + m: function mount(target, anchor) { + insert_hydration_dev(target, div1, anchor); + append_hydration_dev(div1, div0); + if_blocks[current_block_type_index].m(div0, null); + current = true; + }, + p: function update2(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(div0, null); + } + }, + i: function intro(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div1); + } + if_blocks[current_block_type_index].d(); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment11.name, + type: "component", + source: "", + ctx + }); + return block; + } + function instance11($$self, $$props, $$invalidate) { + let editableAttrs; + let sidebarTitle; + let isRootNode; + let attributesEditable; + let $page; + let $selectedAstElement; + let $selectedAstElementId; + let $draggedObject; + validate_store(page, "page"); + component_subscribe($$self, page, ($$value) => $$invalidate(26, $page = $$value)); + validate_store(selectedAstElement, "selectedAstElement"); + component_subscribe($$self, selectedAstElement, ($$value) => $$invalidate(0, $selectedAstElement = $$value)); + validate_store(selectedAstElementId, "selectedAstElementId"); + component_subscribe($$self, selectedAstElementId, ($$value) => $$invalidate(1, $selectedAstElementId = $$value)); + validate_store(draggedObject, "draggedObject"); + component_subscribe($$self, draggedObject, ($$value) => $$invalidate(8, $draggedObject = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("PropertiesSidebar", slots, []); + var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + let { live } = $$props; + const dispatch2 = createEventDispatcher(); + let classList; + function addClasses({ detail: newClasses }) { + return __awaiter(this, void 0, void 0, function* () { + let node = $selectedAstElement; + if (node) { + let classes = newClasses.split(" ").map((c) => c.trim()); + node.attrs.class = node.attrs.class ? `${node.attrs.class} ${classes.join(" ")}` : classes.join(" "); + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + } + }); + } + function parentNodeId() { + if ($selectedAstElementId) { + let parts = $selectedAstElementId.split("."); + if (parts.length === 1) + return "root"; + return parts.slice(0, -1).join("."); + } + } + function selectParentNode() { + let parentId = parentNodeId(); + if (parentId) { + set_store_value(selectedAstElementId, $selectedAstElementId = parentId, $selectedAstElementId); + } + } + function deleteClass(className) { + return __awaiter(this, void 0, void 0, function* () { + let node = $selectedAstElement; + if (node) { + let newClass = node.attrs.class.split(" ").filter((c) => c !== className).join(" "); + node.attrs.class = newClass; + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + } + }); + } + function updateText(e) { + return __awaiter(this, void 0, void 0, function* () { + let node = $selectedAstElement; + if (node && isAstElement(node)) { + node.content = [e.detail]; + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + } + }); + } + function updateArg(e) { + return __awaiter(this, void 0, void 0, function* () { + let node = $selectedAstElement; + if (node && isAstElement(node)) { + node.arg = e.detail; + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + } + }); + } + function updateAttribute(attrName, e) { + return __awaiter(this, void 0, void 0, function* () { + let node = $selectedAstElement; + if (node && isAstElement(node)) { + node.attrs[attrName] = e.detail; + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + } + }); + } + function deleteComponent() { + var _a2; + return __awaiter(this, void 0, void 0, function* () { + let node = $selectedAstElement; + if (!node) + return; + if (confirm("Are you sure you want to delete this component?")) { + let parentId = parentNodeId(); + let content = parentId && parentId !== "root" ? (_a2 = findAstElement($page.ast, parentId)) === null || _a2 === void 0 ? void 0 : _a2.content : $page.ast; + if (content) { + let targetIndex = content.indexOf(node); + content.splice(targetIndex, 1); + set_store_value(selectedAstElementId, $selectedAstElementId = void 0, $selectedAstElementId); + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + } + } + }); + } + function dropInside() { + dispatch2("droppedIntoTarget", $selectedAstElement); + } + let isDraggingOver = false; + function dragOver(e) { + e.preventDefault(); + $$invalidate(3, isDraggingOver = true); + if (e.dataTransfer) { + e.dataTransfer.dropEffect = "move"; + } + } + function changeNodes({ detail: nodes }) { + return __awaiter(this, void 0, void 0, function* () { + if ($selectedAstElementId === "root") { + let selectedElement = $page; + selectedElement.ast = nodes; + } else { + let selectedElement = $selectedAstElement; + if (!selectedElement) + return; + selectedElement.content = nodes; + } + live.pushEvent("update_page_ast", { id: $page.id, ast: $page.ast }); + }); + } + $$self.$$.on_mount.push(function() { + if (live === void 0 && !("live" in $$props || $$self.$$.bound[$$self.$$.props["live"]])) { + console.warn(" was created without expected prop 'live'"); + } + }); + const writable_props = ["live"]; + Object_1.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + const click_handler = () => set_store_value(selectedAstElementId, $selectedAstElementId = void 0, $selectedAstElementId); + const delete_handler = (className) => deleteClass(className); + const textChange_handler = (name, e) => updateAttribute(name, e); + const dragleave_handler = () => $$invalidate(3, isDraggingOver = false); + const textChange_handler_1 = (e) => updateText(e); + $$self.$$set = ($$props2) => { + if ("live" in $$props2) + $$invalidate(19, live = $$props2.live); + }; + $$self.$capture_state = () => ({ + __awaiter, + _a, + Pill: Pill_default, + SidebarSection: SidebarSection_default, + createEventDispatcher, + draggedObject, + page, + selectedAstElement, + selectedAstElementId, + findAstElement, + isAstElement, + live, + dispatch: dispatch2, + classList, + addClasses, + parentNodeId, + selectParentNode, + deleteClass, + updateText, + updateArg, + updateAttribute, + deleteComponent, + dropInside, + isDraggingOver, + dragOver, + changeNodes, + attributesEditable, + isRootNode, + sidebarTitle, + editableAttrs, + $page, + $selectedAstElement, + $selectedAstElementId, + $draggedObject + }); + $$self.$inject_state = ($$props2) => { + if ("__awaiter" in $$props2) + __awaiter = $$props2.__awaiter; + if ("_a" in $$props2) + $$invalidate(20, _a = $$props2._a); + if ("live" in $$props2) + $$invalidate(19, live = $$props2.live); + if ("classList" in $$props2) + $$invalidate(2, classList = $$props2.classList); + if ("isDraggingOver" in $$props2) + $$invalidate(3, isDraggingOver = $$props2.isDraggingOver); + if ("attributesEditable" in $$props2) + $$invalidate(4, attributesEditable = $$props2.attributesEditable); + if ("isRootNode" in $$props2) + $$invalidate(5, isRootNode = $$props2.isRootNode); + if ("sidebarTitle" in $$props2) + $$invalidate(6, sidebarTitle = $$props2.sidebarTitle); + if ("editableAttrs" in $$props2) + $$invalidate(7, editableAttrs = $$props2.editableAttrs); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + $$self.$$.update = () => { + if ($$self.$$.dirty[0] & /*$selectedAstElement, _a*/ + 1048577) { + $: { + let classAttr = $$invalidate(20, _a = $selectedAstElement === null || $selectedAstElement === void 0 ? void 0 : $selectedAstElement.attrs) === null || _a === void 0 ? void 0 : _a.class; + $$invalidate(2, classList = classAttr ? classAttr.split(" ").filter((e) => e.trim().length > 0) : []); + } + } + if ($$self.$$.dirty[0] & /*$selectedAstElement*/ + 1) { + $: + $$invalidate(7, editableAttrs = Object.entries(($selectedAstElement === null || $selectedAstElement === void 0 ? void 0 : $selectedAstElement.attrs) || {}).filter(([k, _]) => k !== "class" && k !== "selfClose" && !/data-/.test(k))); + } + if ($$self.$$.dirty[0] & /*$selectedAstElement*/ + 1) { + $: + $$invalidate(6, sidebarTitle = $selectedAstElement === null || $selectedAstElement === void 0 ? void 0 : $selectedAstElement.tag); + } + if ($$self.$$.dirty[0] & /*$selectedAstElementId*/ + 2) { + $: + $$invalidate(5, isRootNode = !!$selectedAstElementId && $selectedAstElementId === "root"); + } + if ($$self.$$.dirty[0] & /*$selectedAstElement*/ + 1) { + $: + $$invalidate(4, attributesEditable = !["eex", "eex_block"].includes($selectedAstElement === null || $selectedAstElement === void 0 ? void 0 : $selectedAstElement.tag)); + } + }; + return [ + $selectedAstElement, + $selectedAstElementId, + classList, + isDraggingOver, + attributesEditable, + isRootNode, + sidebarTitle, + editableAttrs, + $draggedObject, + addClasses, + selectParentNode, + deleteClass, + updateText, + updateArg, + updateAttribute, + deleteComponent, + dropInside, + dragOver, + changeNodes, + live, + _a, + click_handler, + delete_handler, + textChange_handler, + dragleave_handler, + textChange_handler_1 + ]; + } + var PropertiesSidebar = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance11, create_fragment11, safe_not_equal, { live: 19 }, null, [-1, -1]); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "PropertiesSidebar", + options, + id: create_fragment11.name + }); + } + get live() { + return this.$$.ctx[19]; + } + set live(live) { + this.$$set({ live }); + flush(); + } + }; + create_custom_element(PropertiesSidebar, { "live": {} }, [], [], true); + var PropertiesSidebar_default = PropertiesSidebar; + + // svelte/components/UiBuilder.svelte + var UiBuilder_exports = {}; + __export(UiBuilder_exports, { + default: () => UiBuilder_default + }); + var file12 = "svelte/components/UiBuilder.svelte"; + function create_fragment12(ctx) { + let backdrop; + let t0; + let div; + let componentssidebar; + let t1; + let pagepreview; + let t2; + let propertiessidebar; + let current; + backdrop = new Backdrop_default({ $$inline: true }); + componentssidebar = new ComponentsSidebar_default({ + props: { components: ( + /*components*/ + ctx[0] + ) }, + $$inline: true + }); + pagepreview = new PagePreview_default({ + props: { live: ( + /*live*/ + ctx[1] + ) }, + $$inline: true + }); + propertiessidebar = new PropertiesSidebar_default({ + props: { live: ( + /*live*/ + ctx[1] + ) }, + $$inline: true + }); + propertiessidebar.$on( + "droppedIntoTarget", + /*droppedIntoTarget_handler*/ + ctx[5] + ); + const block = { + c: function create3() { + create_component(backdrop.$$.fragment); + t0 = space(); + div = element("div"); + create_component(componentssidebar.$$.fragment); + t1 = space(); + create_component(pagepreview.$$.fragment); + t2 = space(); + create_component(propertiessidebar.$$.fragment); + this.h(); + }, + l: function claim(nodes) { + claim_component(backdrop.$$.fragment, nodes); + t0 = claim_space(nodes); + div = claim_element(nodes, "DIV", { class: true, "data-test-id": true }); + var div_nodes = children(div); + claim_component(componentssidebar.$$.fragment, div_nodes); + t1 = claim_space(div_nodes); + claim_component(pagepreview.$$.fragment, div_nodes); + t2 = claim_space(div_nodes); + claim_component(propertiessidebar.$$.fragment, div_nodes); + div_nodes.forEach(detach_dev); + this.h(); + }, + h: function hydrate() { + attr_dev(div, "class", "flex min-h-screen bg-gray-100"); + attr_dev(div, "data-test-id", "app-container"); + add_location(div, file12, 25, 0, 765); + }, + m: function mount(target, anchor) { + mount_component(backdrop, target, anchor); + insert_hydration_dev(target, t0, anchor); + insert_hydration_dev(target, div, anchor); + mount_component(componentssidebar, div, null); + append_hydration_dev(div, t1); + mount_component(pagepreview, div, null); + append_hydration_dev(div, t2); + mount_component(propertiessidebar, div, null); + current = true; + }, + p: function update2(ctx2, [dirty]) { + const componentssidebar_changes = {}; + if (dirty & /*components*/ + 1) + componentssidebar_changes.components = /*components*/ + ctx2[0]; + componentssidebar.$set(componentssidebar_changes); + const pagepreview_changes = {}; + if (dirty & /*live*/ + 2) + pagepreview_changes.live = /*live*/ + ctx2[1]; + pagepreview.$set(pagepreview_changes); + const propertiessidebar_changes = {}; + if (dirty & /*live*/ + 2) + propertiessidebar_changes.live = /*live*/ + ctx2[1]; + propertiessidebar.$set(propertiessidebar_changes); + }, + i: function intro(local) { + if (current) + return; + transition_in(backdrop.$$.fragment, local); + transition_in(componentssidebar.$$.fragment, local); + transition_in(pagepreview.$$.fragment, local); + transition_in(propertiessidebar.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(backdrop.$$.fragment, local); + transition_out(componentssidebar.$$.fragment, local); + transition_out(pagepreview.$$.fragment, local); + transition_out(propertiessidebar.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) { + detach_dev(t0); + detach_dev(div); + } + destroy_component(backdrop, detaching); + destroy_component(componentssidebar); + destroy_component(pagepreview); + destroy_component(propertiessidebar); + } + }; + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment12.name, + type: "component", + source: "", + ctx + }); + return block; + } + function addBasicComponentToTarget(e) { + } + function instance12($$self, $$props, $$invalidate) { + let $tailwindInputStore; + let $tailwindConfigStore; + let $pageStore; + validate_store(tailwindInput, "tailwindInputStore"); + component_subscribe($$self, tailwindInput, ($$value) => $$invalidate(6, $tailwindInputStore = $$value)); + validate_store(tailwindConfig, "tailwindConfigStore"); + component_subscribe($$self, tailwindConfig, ($$value) => $$invalidate(7, $tailwindConfigStore = $$value)); + validate_store(page, "pageStore"); + component_subscribe($$self, page, ($$value) => $$invalidate(8, $pageStore = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots("UiBuilder", slots, []); + let { components } = $$props; + let { page: page2 } = $$props; + let { tailwindConfig: tailwindConfig2 } = $$props; + let { tailwindInput: tailwindInput2 } = $$props; + let { live } = $$props; + $$self.$$.on_mount.push(function() { + if (components === void 0 && !("components" in $$props || $$self.$$.bound[$$self.$$.props["components"]])) { + console.warn(" was created without expected prop 'components'"); + } + if (page2 === void 0 && !("page" in $$props || $$self.$$.bound[$$self.$$.props["page"]])) { + console.warn(" was created without expected prop 'page'"); + } + if (tailwindConfig2 === void 0 && !("tailwindConfig" in $$props || $$self.$$.bound[$$self.$$.props["tailwindConfig"]])) { + console.warn(" was created without expected prop 'tailwindConfig'"); + } + if (tailwindInput2 === void 0 && !("tailwindInput" in $$props || $$self.$$.bound[$$self.$$.props["tailwindInput"]])) { + console.warn(" was created without expected prop 'tailwindInput'"); + } + if (live === void 0 && !("live" in $$props || $$self.$$.bound[$$self.$$.props["live"]])) { + console.warn(" was created without expected prop 'live'"); + } + }); + const writable_props = ["components", "page", "tailwindConfig", "tailwindInput", "live"]; + Object.keys($$props).forEach((key) => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") + console.warn(` was created with unknown prop '${key}'`); + }); + const droppedIntoTarget_handler = (e) => addBasicComponentToTarget(e.detail); + $$self.$$set = ($$props2) => { + if ("components" in $$props2) + $$invalidate(0, components = $$props2.components); + if ("page" in $$props2) + $$invalidate(2, page2 = $$props2.page); + if ("tailwindConfig" in $$props2) + $$invalidate(3, tailwindConfig2 = $$props2.tailwindConfig); + if ("tailwindInput" in $$props2) + $$invalidate(4, tailwindInput2 = $$props2.tailwindInput); + if ("live" in $$props2) + $$invalidate(1, live = $$props2.live); + }; + $$self.$capture_state = () => ({ + ComponentsSidebar: ComponentsSidebar_default, + Backdrop: Backdrop_default, + PagePreview: PagePreview_default, + PropertiesSidebar: PropertiesSidebar_default, + pageStore: page, + tailwindConfigStore: tailwindConfig, + tailwindInputStore: tailwindInput, + components, + page: page2, + tailwindConfig: tailwindConfig2, + tailwindInput: tailwindInput2, + live, + addBasicComponentToTarget, + $tailwindInputStore, + $tailwindConfigStore, + $pageStore + }); + $$self.$inject_state = ($$props2) => { + if ("components" in $$props2) + $$invalidate(0, components = $$props2.components); + if ("page" in $$props2) + $$invalidate(2, page2 = $$props2.page); + if ("tailwindConfig" in $$props2) + $$invalidate(3, tailwindConfig2 = $$props2.tailwindConfig); + if ("tailwindInput" in $$props2) + $$invalidate(4, tailwindInput2 = $$props2.tailwindInput); + if ("live" in $$props2) + $$invalidate(1, live = $$props2.live); + }; + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*page*/ + 4) { + $: + set_store_value(page, $pageStore = page2, $pageStore); + } + if ($$self.$$.dirty & /*tailwindConfig*/ + 8) { + $: + set_store_value(tailwindConfig, $tailwindConfigStore = tailwindConfig2, $tailwindConfigStore); + } + if ($$self.$$.dirty & /*tailwindInput*/ + 16) { + $: + set_store_value(tailwindInput, $tailwindInputStore = tailwindInput2, $tailwindInputStore); + } + }; + return [ + components, + live, + page2, + tailwindConfig2, + tailwindInput2, + droppedIntoTarget_handler + ]; + } + var UiBuilder = class extends SvelteComponentDev { + constructor(options) { + super(options); + init2(this, options, instance12, create_fragment12, safe_not_equal, { + components: 0, + page: 2, + tailwindConfig: 3, + tailwindInput: 4, + live: 1 + }); + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "UiBuilder", + options, + id: create_fragment12.name + }); + } + get components() { + return this.$$.ctx[0]; + } + set components(components) { + this.$$set({ components }); + flush(); + } + get page() { + return this.$$.ctx[2]; + } + set page(page2) { + this.$$set({ page: page2 }); + flush(); + } + get tailwindConfig() { + return this.$$.ctx[3]; + } + set tailwindConfig(tailwindConfig2) { + this.$$set({ tailwindConfig: tailwindConfig2 }); + flush(); + } + get tailwindInput() { + return this.$$.ctx[4]; + } + set tailwindInput(tailwindInput2) { + this.$$set({ tailwindInput: tailwindInput2 }); + flush(); + } + get live() { + return this.$$.ctx[1]; + } + set live(live) { + this.$$set({ live }); + flush(); + } + }; + create_custom_element(UiBuilder, { "components": {}, "page": {}, "tailwindConfig": {}, "tailwindInput": {}, "live": {} }, [], [], true); + var UiBuilder_default = UiBuilder; + + // import-glob:../svelte/**/*.svelte + var modules = [Backdrop_exports, BrowserFrame_exports, CodeEditor_exports, ComponentsSidebar_exports, LayoutAstNode_exports, PageAstNode_exports, PagePreview_exports, PageWrapper_exports, Pill_exports, PropertiesSidebar_exports, SidebarSection_exports, UiBuilder_exports]; + var __default = modules; + var filenames = ["../svelte/components/Backdrop.svelte", "../svelte/components/BrowserFrame.svelte", "../svelte/components/CodeEditor.svelte", "../svelte/components/ComponentsSidebar.svelte", "../svelte/components/LayoutAstNode.svelte", "../svelte/components/PageAstNode.svelte", "../svelte/components/PagePreview.svelte", "../svelte/components/PageWrapper.svelte", "../svelte/components/Pill.svelte", "../svelte/components/PropertiesSidebar.svelte", "../svelte/components/SidebarSection.svelte", "../svelte/components/UiBuilder.svelte"]; + + // js/beacon_live_admin.js + var Hooks = {}; + Hooks.CodeEditorHook = CodeEditorHook; + import_topbar.default.config({ barColors: { 0: "#29d" }, shadowColor: "rgba(0, 0, 0, .3)" }); + window.addEventListener("phx:page-loading-start", (_info) => import_topbar.default.show(300)); + window.addEventListener("phx:page-loading-stop", (_info) => import_topbar.default.hide()); + window.addEventListener("beacon_admin:clipcopy", (event) => { + const result_id = `${event.target.id}-copy-to-clipboard-result`; + const el = document.getElementById(result_id); + if ("clipboard" in navigator) { + if (event.target.tagName === "INPUT") { + txt = event.target.value; + } else { + txt = event.target.textContent; + } + navigator.clipboard.writeText(txt).then(() => { + el.innerText = "Copied to clipboard"; + el.classList.remove("invisible", "text-red-500", "opacity-0"); + el.classList.add("text-green-500", "opacity-100", "-translate-y-2"); + setTimeout(function() { + el.classList.remove("text-green-500", "opacity-100", "-translate-y-2"); + el.classList.add("invisible", "text-red-500", "opacity-0"); + }, 2e3); + }).catch(() => { + el.innerText = "Could not copy"; + el.classList.remove("invisible", "text-green-500", "opacity-0"); + el.classList.add("text-red-500", "opacity-100", "-translate-y-2"); + }); + } else { + alert("Sorry, your browser does not support clipboard copy."); + } }); var socketPath = document.querySelector("html").getAttribute("phx-socket") || "/live"; var csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content"); var liveSocket = new LiveView.LiveSocket(socketPath, Phoenix.Socket, { - hooks: Hooks, + hooks: { ...getHooks(__exports), ...Hooks }, params: { _csrf_token: csrfToken } }); liveSocket.connect(); @@ -970,4 +12721,3 @@ var BeaconLiveAdmin = (() => { * https://buunguyen.github.io/topbar * Copyright (c) 2021 Buu Nguyen */ -//# sourceMappingURL=beacon_live_admin.js.map diff --git a/priv/static/beacon_live_admin.js.map b/priv/static/beacon_live_admin.js.map index a467681f..89715d46 100644 --- a/priv/static/beacon_live_admin.js.map +++ b/priv/static/beacon_live_admin.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../../assets/vendor/topbar.js", "../../assets/js/beacon_live_admin.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js", "../../deps/live_monaco_editor/assets/node_modules/state-local/lib/es/state-local.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/config/index.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/curry.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/validators/index.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/compose.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/loader/index.js", "../../deps/live_monaco_editor/assets/js/live_monaco_editor/editor/themes.js", "../../deps/live_monaco_editor/assets/js/live_monaco_editor/editor/code_editor.js", "../../deps/live_monaco_editor/assets/js/live_monaco_editor/hooks/code_editor.js"], - "sourcesContent": ["/**\n * @license MIT\n * topbar 2.0.0, 2023-02-04\n * https://buunguyen.github.io/topbar\n * Copyright (c) 2021 Buu Nguyen\n */\n(function (window, document) {\n \"use strict\";\n\n // https://gist.github.com/paulirish/1579671\n (function () {\n var lastTime = 0;\n var vendors = [\"ms\", \"moz\", \"webkit\", \"o\"];\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame =\n window[vendors[x] + \"RequestAnimationFrame\"];\n window.cancelAnimationFrame =\n window[vendors[x] + \"CancelAnimationFrame\"] ||\n window[vendors[x] + \"CancelRequestAnimationFrame\"];\n }\n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function (callback, element) {\n var currTime = new Date().getTime();\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n var id = window.setTimeout(function () {\n callback(currTime + timeToCall);\n }, timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function (id) {\n clearTimeout(id);\n };\n })();\n\n var canvas,\n currentProgress,\n showing,\n progressTimerId = null,\n fadeTimerId = null,\n delayTimerId = null,\n addEvent = function (elem, type, handler) {\n if (elem.addEventListener) elem.addEventListener(type, handler, false);\n else if (elem.attachEvent) elem.attachEvent(\"on\" + type, handler);\n else elem[\"on\" + type] = handler;\n },\n options = {\n autoRun: true,\n barThickness: 3,\n barColors: {\n 0: \"rgba(26, 188, 156, .9)\",\n \".25\": \"rgba(52, 152, 219, .9)\",\n \".50\": \"rgba(241, 196, 15, .9)\",\n \".75\": \"rgba(230, 126, 34, .9)\",\n \"1.0\": \"rgba(211, 84, 0, .9)\",\n },\n shadowBlur: 10,\n shadowColor: \"rgba(0, 0, 0, .6)\",\n className: null,\n },\n repaint = function () {\n canvas.width = window.innerWidth;\n canvas.height = options.barThickness * 5; // need space for shadow\n\n var ctx = canvas.getContext(\"2d\");\n ctx.shadowBlur = options.shadowBlur;\n ctx.shadowColor = options.shadowColor;\n\n var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0);\n for (var stop in options.barColors)\n lineGradient.addColorStop(stop, options.barColors[stop]);\n ctx.lineWidth = options.barThickness;\n ctx.beginPath();\n ctx.moveTo(0, options.barThickness / 2);\n ctx.lineTo(\n Math.ceil(currentProgress * canvas.width),\n options.barThickness / 2\n );\n ctx.strokeStyle = lineGradient;\n ctx.stroke();\n },\n createCanvas = function () {\n canvas = document.createElement(\"canvas\");\n var style = canvas.style;\n style.position = \"fixed\";\n style.top = style.left = style.right = style.margin = style.padding = 0;\n style.zIndex = 100001;\n style.display = \"none\";\n if (options.className) canvas.classList.add(options.className);\n document.body.appendChild(canvas);\n addEvent(window, \"resize\", repaint);\n },\n topbar = {\n config: function (opts) {\n for (var key in opts)\n if (options.hasOwnProperty(key)) options[key] = opts[key];\n },\n show: function (delay) {\n if (showing) return;\n if (delay) {\n if (delayTimerId) return;\n delayTimerId = setTimeout(() => topbar.show(), delay);\n } else {\n showing = true;\n if (fadeTimerId !== null) window.cancelAnimationFrame(fadeTimerId);\n if (!canvas) createCanvas();\n canvas.style.opacity = 1;\n canvas.style.display = \"block\";\n topbar.progress(0);\n if (options.autoRun) {\n (function loop() {\n progressTimerId = window.requestAnimationFrame(loop);\n topbar.progress(\n \"+\" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2)\n );\n })();\n }\n }\n },\n progress: function (to) {\n if (typeof to === \"undefined\") return currentProgress;\n if (typeof to === \"string\") {\n to =\n (to.indexOf(\"+\") >= 0 || to.indexOf(\"-\") >= 0\n ? currentProgress\n : 0) + parseFloat(to);\n }\n currentProgress = to > 1 ? 1 : to;\n repaint();\n return currentProgress;\n },\n hide: function () {\n clearTimeout(delayTimerId);\n delayTimerId = null;\n if (!showing) return;\n showing = false;\n if (progressTimerId != null) {\n window.cancelAnimationFrame(progressTimerId);\n progressTimerId = null;\n }\n (function loop() {\n if (topbar.progress(\"+.1\") >= 1) {\n canvas.style.opacity -= 0.05;\n if (canvas.style.opacity <= 0.05) {\n canvas.style.display = \"none\";\n fadeTimerId = null;\n return;\n }\n }\n fadeTimerId = window.requestAnimationFrame(loop);\n })();\n },\n };\n\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = topbar;\n } else if (typeof define === \"function\" && define.amd) {\n define(function () {\n return topbar;\n });\n } else {\n this.topbar = topbar;\n }\n}.call(this, window, document));\n", "import topbar from \"../vendor/topbar\"\nimport { CodeEditorHook } from \"../../deps/live_monaco_editor/priv/static/live_monaco_editor.esm\"\n\nlet Hooks = {}\nHooks.CodeEditorHook = CodeEditorHook\n\ntopbar.config({barColors: {0: \"#29d\"}, shadowColor: \"rgba(0, 0, 0, .3)\"})\n\nwindow.addEventListener(\"phx:page-loading-start\", (_event) => {\n topbar.show(300)\n})\n\nwindow.addEventListener(\"phx:page-loading-stop\", (_event) => {\n topbar.hide()\n})\n\nwindow.addEventListener(\"beacon_admin:clipcopy\", (event) => {\n const result_id = `${event.target.id}-copy-to-clipboard-result`\n const el = document.getElementById(result_id);\n\n if (\"clipboard\" in navigator) {\n if (event.target.tagName === \"INPUT\") {\n txt = event.target.value;\n } else {\n txt = event.target.textContent;\n }\n\n navigator.clipboard.writeText(txt).then(() => {\n el.innerText = 'Copied to clipboard';\n // Make it visible\n el.classList.remove('invisible', 'text-red-500', 'opacity-0');\n // Fade in and translate upwards\n el.classList.add('text-green-500', 'opacity-100', '-translate-y-2');\n\n setTimeout(function() {\n el.classList.remove('text-green-500', 'opacity-100', '-translate-y-2');\n el.classList.add('invisible', 'text-red-500', 'opacity-0');\n }, 2000);\n\n }).catch(() => {\n el.innerText = 'Could not copy';\n // Make it visible\n el.classList.remove('invisible', 'text-green-500', 'opacity-0');\n // Fade in and translate upwards\n el.classList.add('text-red-500', 'opacity-100', '-translate-y-2');\n })\n } else {\n alert(\n \"Sorry, your browser does not support clipboard copy.\"\n );\n }\n});\n\nlet socketPath = document.querySelector(\"html\").getAttribute(\"phx-socket\") || \"/live\"\nlet csrfToken = document .querySelector(\"meta[name='csrf-token']\") .getAttribute(\"content\")\nlet liveSocket = new LiveView.LiveSocket(socketPath, Phoenix.Socket, {\n hooks: Hooks,\n params: { _csrf_token: csrfToken },\n})\nliveSocket.connect()\nwindow.liveSocket = liveSocket\n", "function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\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\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\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\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _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)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _unsupportedIterableToArray as unsupportedIterableToArray };\n", "function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\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\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n", "var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs'\n }\n};\n\nexport default config;\n", "function curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n nextArgs[_key2] = arguments[_key2];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nexport default curry;\n", "function isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nexport default isObject;\n", "import curry from '../utils/curry.js';\nimport isObject from '../utils/isObject.js';\n\n/**\n * validates the configuration object and informs about deprecation\n * @param {Object} config - the configuration object \n * @return {Object} config - the validated configuration object\n */\n\nfunction validateConfig(config) {\n if (!config) errorHandler('configIsRequired');\n if (!isObject(config)) errorHandler('configType');\n\n if (config.urls) {\n informAboutDeprecation();\n return {\n paths: {\n vs: config.urls.monacoBase\n }\n };\n }\n\n return config;\n}\n/**\n * logs deprecation message\n */\n\n\nfunction informAboutDeprecation() {\n console.warn(errorMessages.deprecation);\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n configIsRequired: 'the configuration object is required',\n configType: 'the configuration object should be an object',\n \"default\": 'an unknown error accured in `@monaco-editor/loader` package',\n deprecation: \"Deprecation warning!\\n You are using deprecated way of configuration.\\n\\n Instead of using\\n monaco.config({ urls: { monacoBase: '...' } })\\n use\\n monaco.config({ paths: { vs: '...' } })\\n\\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\\n \"\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n config: validateConfig\n};\n\nexport default validators;\nexport { errorHandler, errorMessages };\n", "var compose = function compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n};\n\nexport default compose;\n", "import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction merge(target, source) {\n Object.keys(source).forEach(function (key) {\n if (source[key] instanceof Object) {\n if (target[key]) {\n Object.assign(source[key], merge(target[key], source[key]));\n }\n }\n });\n return _objectSpread2(_objectSpread2({}, target), source);\n}\n\nexport default merge;\n", "// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325\nvar CANCELATION_MESSAGE = {\n type: 'cancelation',\n msg: 'operation is manually canceled'\n};\n\nfunction makeCancelable(promise) {\n var hasCanceled_ = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);\n });\n promise[\"catch\"](reject);\n });\n return wrappedPromise.cancel = function () {\n return hasCanceled_ = true;\n }, wrappedPromise;\n}\n\nexport default makeCancelable;\nexport { CANCELATION_MESSAGE };\n", "import { slicedToArray as _slicedToArray, objectWithoutProperties as _objectWithoutProperties } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport state from 'state-local';\nimport config$1 from '../config/index.js';\nimport validators from '../validators/index.js';\nimport compose from '../utils/compose.js';\nimport merge from '../utils/deepMerge.js';\nimport makeCancelable from '../utils/makeCancelable.js';\n\n/** the local state of the module */\n\nvar _state$create = state.create({\n config: config$1,\n isInitialized: false,\n resolve: null,\n reject: null,\n monaco: null\n}),\n _state$create2 = _slicedToArray(_state$create, 2),\n getState = _state$create2[0],\n setState = _state$create2[1];\n/**\n * set the loader configuration\n * @param {Object} config - the configuration object\n */\n\n\nfunction config(globalConfig) {\n var _validators$config = validators.config(globalConfig),\n monaco = _validators$config.monaco,\n config = _objectWithoutProperties(_validators$config, [\"monaco\"]);\n\n setState(function (state) {\n return {\n config: merge(state.config, config),\n monaco: monaco\n };\n });\n}\n/**\n * handles the initialization of the monaco-editor\n * @return {Promise} - returns an instance of monaco (with a cancelable promise)\n */\n\n\nfunction init() {\n var state = getState(function (_ref) {\n var monaco = _ref.monaco,\n isInitialized = _ref.isInitialized,\n resolve = _ref.resolve;\n return {\n monaco: monaco,\n isInitialized: isInitialized,\n resolve: resolve\n };\n });\n\n if (!state.isInitialized) {\n setState({\n isInitialized: true\n });\n\n if (state.monaco) {\n state.resolve(state.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n if (window.monaco && window.monaco.editor) {\n storeMonacoInstance(window.monaco);\n state.resolve(window.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n compose(injectScripts, getMonacoLoaderScript)(configureLoader);\n }\n\n return makeCancelable(wrapperPromise);\n}\n/**\n * injects provided scripts into the document.body\n * @param {Object} script - an HTML script element\n * @return {Object} - the injected HTML script element\n */\n\n\nfunction injectScripts(script) {\n return document.body.appendChild(script);\n}\n/**\n * creates an HTML script element with/without provided src\n * @param {string} [src] - the source path of the script\n * @return {Object} - the created HTML script element\n */\n\n\nfunction createScript(src) {\n var script = document.createElement('script');\n return src && (script.src = src), script;\n}\n/**\n * creates an HTML script element with the monaco loader src\n * @return {Object} - the created HTML script element\n */\n\n\nfunction getMonacoLoaderScript(configureLoader) {\n var state = getState(function (_ref2) {\n var config = _ref2.config,\n reject = _ref2.reject;\n return {\n config: config,\n reject: reject\n };\n });\n var loaderScript = createScript(\"\".concat(state.config.paths.vs, \"/loader.js\"));\n\n loaderScript.onload = function () {\n return configureLoader();\n };\n\n loaderScript.onerror = state.reject;\n return loaderScript;\n}\n/**\n * configures the monaco loader\n */\n\n\nfunction configureLoader() {\n var state = getState(function (_ref3) {\n var config = _ref3.config,\n resolve = _ref3.resolve,\n reject = _ref3.reject;\n return {\n config: config,\n resolve: resolve,\n reject: reject\n };\n });\n var require = window.require;\n\n require.config(state.config);\n\n require(['vs/editor/editor.main'], function (monaco) {\n storeMonacoInstance(monaco);\n state.resolve(monaco);\n }, function (error) {\n state.reject(error);\n });\n}\n/**\n * store monaco instance in local state\n */\n\n\nfunction storeMonacoInstance(monaco) {\n if (!getState().monaco) {\n setState({\n monaco: monaco\n });\n }\n}\n/**\n * internal helper function\n * extracts stored monaco instance\n * @return {Object|null} - the monaco instance\n */\n\n\nfunction __getMonacoInstance() {\n return getState(function (_ref4) {\n var monaco = _ref4.monaco;\n return monaco;\n });\n}\n\nvar wrapperPromise = new Promise(function (resolve, reject) {\n return setState({\n resolve: resolve,\n reject: reject\n });\n});\nvar loader = {\n config: config,\n init: init,\n __getMonacoInstance: __getMonacoInstance\n};\n\nexport default loader;\n", "// Copied and modified from the original work available at https://github.com/livebook-dev/livebook/blob/23e58ac604de92ce54472f36fe3e28dc27576d6c/assets/js/hooks/cell_editor/live_editor/theme.js\n// Copyright (C) 2021 Dashbit\n// Licensed under Apache 2.0 available at https://www.apache.org/licenses/LICENSE-2.0\n\n// This is a port of the One Dark theme to the Monaco editor.\n// We color graded the comment so it has AA accessibility and\n// then similarly scaled the default font.\nconst colors = {\n background: \"#282c34\",\n default: \"#c4cad6\",\n lightRed: \"#e06c75\",\n blue: \"#61afef\",\n gray: \"#8c92a3\",\n green: \"#98c379\",\n purple: \"#c678dd\",\n red: \"#be5046\",\n teal: \"#56b6c2\",\n peach: \"#d19a66\",\n}\n\nconst rules = (colors) => [\n { token: \"\", foreground: colors.default },\n { token: \"variable\", foreground: colors.lightRed },\n { token: \"constant\", foreground: colors.blue },\n { token: \"constant.character.escape\", foreground: colors.blue },\n { token: \"comment\", foreground: colors.gray },\n { token: \"number\", foreground: colors.blue },\n { token: \"regexp\", foreground: colors.lightRed },\n { token: \"type\", foreground: colors.lightRed },\n { token: \"string\", foreground: colors.green },\n { token: \"keyword\", foreground: colors.purple },\n { token: \"operator\", foreground: colors.peach },\n { token: \"delimiter.bracket.embed\", foreground: colors.red },\n { token: \"sigil\", foreground: colors.teal },\n { token: \"function\", foreground: colors.blue },\n { token: \"function.call\", foreground: colors.default },\n\n // Markdown specific\n { token: \"emphasis\", fontStyle: \"italic\" },\n { token: \"strong\", fontStyle: \"bold\" },\n { token: \"keyword.md\", foreground: colors.lightRed },\n { token: \"keyword.table\", foreground: colors.lightRed },\n { token: \"string.link.md\", foreground: colors.blue },\n { token: \"variable.md\", foreground: colors.teal },\n { token: \"string.md\", foreground: colors.default },\n { token: \"variable.source.md\", foreground: colors.default },\n\n // XML specific\n { token: \"tag\", foreground: colors.lightRed },\n { token: \"metatag\", foreground: colors.lightRed },\n { token: \"attribute.name\", foreground: colors.peach },\n { token: \"attribute.value\", foreground: colors.green },\n\n // JSON specific\n { token: \"string.key\", foreground: colors.lightRed },\n { token: \"keyword.json\", foreground: colors.blue },\n\n // SQL specific\n { token: \"operator.sql\", foreground: colors.purple },\n]\n\nconst theme = {\n base: \"vs-dark\",\n inherit: false,\n rules: rules(colors),\n colors: {\n \"editor.background\": colors.background,\n \"editor.foreground\": colors.default,\n \"editorLineNumber.foreground\": \"#636d83\",\n \"editorCursor.foreground\": \"#636d83\",\n \"editor.selectionBackground\": \"#3e4451\",\n \"editor.findMatchHighlightBackground\": \"#528bff3d\",\n \"editorSuggestWidget.background\": \"#21252b\",\n \"editorSuggestWidget.border\": \"#181a1f\",\n \"editorSuggestWidget.selectedBackground\": \"#2c313a\",\n \"input.background\": \"#1b1d23\",\n \"input.border\": \"#181a1f\",\n \"editorBracketMatch.border\": \"#282c34\",\n \"editorBracketMatch.background\": \"#3e4451\",\n },\n}\n\nexport { theme }\n", "// Copied and modified from the original work available at https://github.com/livebook-dev/livebook/blob/8532bc334bdcf3c57fab9b694666e609877d279f/assets/js/hooks/cell_editor/live_editor.js\n// Copyright (C) 2021 Dashbit\n// Licensed under Apache 2.0 available at https://www.apache.org/licenses/LICENSE-2.0\n\nimport loader from \"@monaco-editor/loader\"\nimport { theme } from \"./themes\"\n\nclass CodeEditor {\n constructor(el, path, value, opts) {\n this.el = el\n this.path = path\n this.value = value\n this.opts = opts\n // https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IStandaloneCodeEditor.html\n this.standalone_code_editor = null\n this._onMount = []\n }\n\n isMounted() {\n return !!this.standalone_code_editor\n }\n\n mount() {\n if (this.isMounted()) {\n throw new Error(\"The monaco editor is already mounted\")\n }\n\n this._mountEditor()\n }\n\n onMount(callback) {\n this._onMount.push(callback)\n }\n\n dispose() {\n if (this.isMounted()) {\n const model = this.standalone_code_editor.getModel()\n\n if (model) {\n model.dispose()\n }\n\n this.standalone_code_editor.dispose()\n }\n }\n\n _mountEditor() {\n this.opts.value = this.value\n\n loader.config({\n paths: { vs: \"https://cdn.jsdelivr.net/npm/monaco-editor@0.45.0/min/vs\" },\n })\n\n loader.init().then((monaco) => {\n monaco.editor.defineTheme(\"default\", theme)\n\n let modelUri = monaco.Uri.parse(this.path)\n let language = this.opts.language\n let model = monaco.editor.createModel(this.value, language, modelUri)\n\n this.opts.language = undefined\n this.opts.model = model\n this.standalone_code_editor = monaco.editor.create(this.el, this.opts)\n\n this._onMount.forEach((callback) => callback(monaco))\n\n this._setScreenDependantEditorOptions()\n\n this.standalone_code_editor.addAction({\n contextMenuGroupId: \"word-wrapping\",\n id: \"enable-word-wrapping\",\n label: \"Enable word wrapping\",\n precondition: \"config.editor.wordWrap == off\",\n keybindings: [monaco.KeyMod.Alt | monaco.KeyCode.KeyZ],\n run: (editor) => editor.updateOptions({ wordWrap: \"on\" }),\n })\n\n this.standalone_code_editor.addAction({\n contextMenuGroupId: \"word-wrapping\",\n id: \"disable-word-wrapping\",\n label: \"Disable word wrapping\",\n precondition: \"config.editor.wordWrap == on\",\n keybindings: [monaco.KeyMod.Alt | monaco.KeyCode.KeyZ],\n run: (editor) => editor.updateOptions({ wordWrap: \"off\" }),\n })\n\n const resizeObserver = new ResizeObserver((entries) => {\n entries.forEach(() => {\n if (this.el.offsetHeight > 0) {\n this._setScreenDependantEditorOptions()\n this.standalone_code_editor.layout()\n }\n })\n })\n\n resizeObserver.observe(this.el)\n\n this.standalone_code_editor.onDidContentSizeChange(() => {\n const contentHeight = this.standalone_code_editor.getContentHeight()\n this.el.style.height = `${contentHeight}px`\n })\n })\n }\n\n _setScreenDependantEditorOptions() {\n if (window.screen.width < 768) {\n this.standalone_code_editor.updateOptions({\n folding: false,\n lineDecorationsWidth: 16,\n lineNumbersMinChars:\n Math.floor(\n Math.log10(this.standalone_code_editor.getModel().getLineCount())\n ) + 3,\n })\n } else {\n this.standalone_code_editor.updateOptions({\n folding: true,\n lineDecorationsWidth: 10,\n lineNumbersMinChars: 5,\n })\n }\n }\n}\n\nexport default CodeEditor\n", "import CodeEditor from \"../editor/code_editor\"\n\nconst CodeEditorHook = {\n mounted() {\n // TODO: validate dataset\n const opts = JSON.parse(this.el.dataset.opts)\n\n this.codeEditor = new CodeEditor(\n this.el,\n this.el.dataset.path,\n this.el.dataset.value,\n opts\n )\n\n this.codeEditor.onMount((monaco) => {\n if (this.el.dataset.changeEvent && this.el.dataset.changeEvent !== \"\") {\n this.codeEditor.standalone_code_editor.onDidChangeModelContent(() => {\n if (this.el.dataset.target && this.el.dataset.target !== \"\") {\n this.pushEventTo(\n this.el.dataset.target,\n this.el.dataset.changeEvent,\n {\n value: this.codeEditor.standalone_code_editor.getValue(),\n }\n )\n } else {\n this.pushEvent(this.el.dataset.changeEvent, {\n value: this.codeEditor.standalone_code_editor.getValue(),\n })\n }\n })\n }\n\n this.handleEvent(\n \"lme:change_language:\" + this.el.dataset.path,\n (data) => {\n const model = this.codeEditor.standalone_code_editor.getModel()\n\n if (model.getLanguageId() !== data.mimeTypeOrLanguageId) {\n monaco.editor.setModelLanguage(model, data.mimeTypeOrLanguageId)\n }\n }\n )\n\n this.handleEvent(\"lme:set_value:\" + this.el.dataset.path, (data) => {\n this.codeEditor.standalone_code_editor.setValue(data.value)\n })\n\n this.el.querySelectorAll(\"textarea\").forEach((textarea) => {\n textarea.setAttribute(\n \"name\",\n \"live_monaco_editor[\" + this.el.dataset.path + \"]\"\n )\n })\n\n this.el.removeAttribute(\"data-value\")\n this.el.removeAttribute(\"data-opts\")\n\n this.el.dispatchEvent(\n new CustomEvent(\"lme:editor_mounted\", {\n detail: { hook: this, editor: this.codeEditor },\n bubbles: true,\n })\n )\n })\n\n if (!this.codeEditor.isMounted()) {\n this.codeEditor.mount()\n }\n },\n\n destroyed() {\n if (this.codeEditor) {\n this.codeEditor.dispose()\n }\n },\n}\n\nexport { CodeEditorHook }\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAMA,OAAC,SAAUA,SAAQC,WAAU;AAC3B;AAGA,SAAC,WAAY;AACX,cAAI,WAAW;AACf,cAAI,UAAU,CAAC,MAAM,OAAO,UAAU,GAAG;AACzC,mBAAS,IAAI,GAAG,IAAI,QAAQ,UAAU,CAACD,QAAO,uBAAuB,EAAE,GAAG;AACxE,YAAAA,QAAO,wBACLA,QAAO,QAAQ,CAAC,IAAI,uBAAuB;AAC7C,YAAAA,QAAO,uBACLA,QAAO,QAAQ,CAAC,IAAI,sBAAsB,KAC1CA,QAAO,QAAQ,CAAC,IAAI,6BAA6B;AAAA,UACrD;AACA,cAAI,CAACA,QAAO;AACV,YAAAA,QAAO,wBAAwB,SAAU,UAAU,SAAS;AAC1D,kBAAI,YAAW,oBAAI,KAAK,GAAE,QAAQ;AAClC,kBAAI,aAAa,KAAK,IAAI,GAAG,MAAM,WAAW,SAAS;AACvD,kBAAI,KAAKA,QAAO,WAAW,WAAY;AACrC,yBAAS,WAAW,UAAU;AAAA,cAChC,GAAG,UAAU;AACb,yBAAW,WAAW;AACtB,qBAAO;AAAA,YACT;AACF,cAAI,CAACA,QAAO;AACV,YAAAA,QAAO,uBAAuB,SAAU,IAAI;AAC1C,2BAAa,EAAE;AAAA,YACjB;AAAA,QACJ,GAAG;AAEH,YAAI,QACF,iBACA,SACA,kBAAkB,MAClB,cAAc,MACd,eAAe,MACf,WAAW,SAAU,MAAM,MAAM,SAAS;AACxC,cAAI,KAAK;AAAkB,iBAAK,iBAAiB,MAAM,SAAS,KAAK;AAAA,mBAC5D,KAAK;AAAa,iBAAK,YAAY,OAAO,MAAM,OAAO;AAAA;AAC3D,iBAAK,OAAO,IAAI,IAAI;AAAA,QAC3B,GACA,UAAU;AAAA,UACR,SAAS;AAAA,UACT,cAAc;AAAA,UACd,WAAW;AAAA,YACT,GAAG;AAAA,YACH,OAAO;AAAA,YACP,OAAO;AAAA,YACP,OAAO;AAAA,YACP,OAAO;AAAA,UACT;AAAA,UACA,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,WAAW;AAAA,QACb,GACA,UAAU,WAAY;AACpB,iBAAO,QAAQA,QAAO;AACtB,iBAAO,SAAS,QAAQ,eAAe;AAEvC,cAAI,MAAM,OAAO,WAAW,IAAI;AAChC,cAAI,aAAa,QAAQ;AACzB,cAAI,cAAc,QAAQ;AAE1B,cAAI,eAAe,IAAI,qBAAqB,GAAG,GAAG,OAAO,OAAO,CAAC;AACjE,mBAAS,QAAQ,QAAQ;AACvB,yBAAa,aAAa,MAAM,QAAQ,UAAU,IAAI,CAAC;AACzD,cAAI,YAAY,QAAQ;AACxB,cAAI,UAAU;AACd,cAAI,OAAO,GAAG,QAAQ,eAAe,CAAC;AACtC,cAAI;AAAA,YACF,KAAK,KAAK,kBAAkB,OAAO,KAAK;AAAA,YACxC,QAAQ,eAAe;AAAA,UACzB;AACA,cAAI,cAAc;AAClB,cAAI,OAAO;AAAA,QACb,GACA,eAAe,WAAY;AACzB,mBAASC,UAAS,cAAc,QAAQ;AACxC,cAAI,QAAQ,OAAO;AACnB,gBAAM,WAAW;AACjB,gBAAM,MAAM,MAAM,OAAO,MAAM,QAAQ,MAAM,SAAS,MAAM,UAAU;AACtE,gBAAM,SAAS;AACf,gBAAM,UAAU;AAChB,cAAI,QAAQ;AAAW,mBAAO,UAAU,IAAI,QAAQ,SAAS;AAC7D,UAAAA,UAAS,KAAK,YAAY,MAAM;AAChC,mBAASD,SAAQ,UAAU,OAAO;AAAA,QACpC,GACAE,UAAS;AAAA,UACP,QAAQ,SAAU,MAAM;AACtB,qBAAS,OAAO;AACd,kBAAI,QAAQ,eAAe,GAAG;AAAG,wBAAQ,GAAG,IAAI,KAAK,GAAG;AAAA,UAC5D;AAAA,UACA,MAAM,SAAU,OAAO;AACrB,gBAAI;AAAS;AACb,gBAAI,OAAO;AACT,kBAAI;AAAc;AAClB,6BAAe,WAAW,MAAMA,QAAO,KAAK,GAAG,KAAK;AAAA,YACtD,OAAQ;AACN,wBAAU;AACV,kBAAI,gBAAgB;AAAM,gBAAAF,QAAO,qBAAqB,WAAW;AACjE,kBAAI,CAAC;AAAQ,6BAAa;AAC1B,qBAAO,MAAM,UAAU;AACvB,qBAAO,MAAM,UAAU;AACvB,cAAAE,QAAO,SAAS,CAAC;AACjB,kBAAI,QAAQ,SAAS;AACnB,iBAAC,SAAS,OAAO;AACf,oCAAkBF,QAAO,sBAAsB,IAAI;AACnD,kBAAAE,QAAO;AAAA,oBACL,MAAM,OAAO,KAAK,IAAI,IAAI,KAAK,KAAK,eAAe,GAAG,CAAC;AAAA,kBACzD;AAAA,gBACF,GAAG;AAAA,cACL;AAAA,YACF;AAAA,UACF;AAAA,UACA,UAAU,SAAU,IAAI;AACtB,gBAAI,OAAO,OAAO;AAAa,qBAAO;AACtC,gBAAI,OAAO,OAAO,UAAU;AAC1B,oBACG,GAAG,QAAQ,GAAG,KAAK,KAAK,GAAG,QAAQ,GAAG,KAAK,IACxC,kBACA,KAAK,WAAW,EAAE;AAAA,YAC1B;AACA,8BAAkB,KAAK,IAAI,IAAI;AAC/B,oBAAQ;AACR,mBAAO;AAAA,UACT;AAAA,UACA,MAAM,WAAY;AAChB,yBAAa,YAAY;AACzB,2BAAe;AACf,gBAAI,CAAC;AAAS;AACd,sBAAU;AACV,gBAAI,mBAAmB,MAAM;AAC3B,cAAAF,QAAO,qBAAqB,eAAe;AAC3C,gCAAkB;AAAA,YACpB;AACA,aAAC,SAAS,OAAO;AACf,kBAAIE,QAAO,SAAS,KAAK,KAAK,GAAG;AAC/B,uBAAO,MAAM,WAAW;AACxB,oBAAI,OAAO,MAAM,WAAW,MAAM;AAChC,yBAAO,MAAM,UAAU;AACvB,gCAAc;AACd;AAAA,gBACF;AAAA,cACF;AACA,4BAAcF,QAAO,sBAAsB,IAAI;AAAA,YACjD,GAAG;AAAA,UACL;AAAA,QACF;AAEF,YAAI,OAAO,WAAW,YAAY,OAAO,OAAO,YAAY,UAAU;AACpE,iBAAO,UAAUE;AAAA,QACnB,WAAW,OAAO,WAAW,cAAc,OAAO,KAAK;AACrD,iBAAO,WAAY;AACjB,mBAAOA;AAAA,UACT,CAAC;AAAA,QACH,OAAO;AACL,eAAK,SAASA;AAAA,QAChB;AAAA,MACF,GAAE,KAAK,SAAM,QAAQ,QAAQ;AAAA;AAAA;;;ACpK7B,sBAAmB;;;ACAnB,WAAS,gBAAgB,KAAK,KAAK,OAAO;AACxC,QAAI,OAAO,KAAK;AACd,aAAO,eAAe,KAAK,KAAK;QAC9B;QACA,YAAY;QACZ,cAAc;QACd,UAAU;MACZ,CAAC;IACH,OAAO;AACL,UAAI,GAAG,IAAI;IACb;AAEA,WAAO;EACT;AAEA,WAAS,QAAQ,QAAQ,gBAAgB;AACvC,QAAI,OAAO,OAAO,KAAK,MAAM;AAE7B,QAAI,OAAO,uBAAuB;AAChC,UAAI,UAAU,OAAO,sBAAsB,MAAM;AACjD,UAAI;AAAgB,kBAAU,QAAQ,OAAO,SAAU,KAAK;AAC1D,iBAAO,OAAO,yBAAyB,QAAQ,GAAG,EAAE;QACtD,CAAC;AACD,WAAK,KAAK,MAAM,MAAM,OAAO;IAC/B;AAEA,WAAO;EACT;AAEA,WAAS,eAAe,QAAQ;AAC9B,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AACzC,UAAI,SAAS,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,IAAI,CAAC;AAEpD,UAAI,IAAI,GAAG;AACT,gBAAQ,OAAO,MAAM,GAAG,IAAI,EAAE,QAAQ,SAAU,KAAK;AACnD,0BAAgB,QAAQ,KAAK,OAAO,GAAG,CAAC;QAC1C,CAAC;MACH,WAAW,OAAO,2BAA2B;AAC3C,eAAO,iBAAiB,QAAQ,OAAO,0BAA0B,MAAM,CAAC;MAC1E,OAAO;AACL,gBAAQ,OAAO,MAAM,CAAC,EAAE,QAAQ,SAAU,KAAK;AAC7C,iBAAO,eAAe,QAAQ,KAAK,OAAO,yBAAyB,QAAQ,GAAG,CAAC;QACjF,CAAC;MACH;IACF;AAEA,WAAO;EACT;AAEA,WAAS,8BAA8B,QAAQ,UAAU;AACvD,QAAI,UAAU;AAAM,aAAO,CAAC;AAC5B,QAAI,SAAS,CAAC;AACd,QAAI,aAAa,OAAO,KAAK,MAAM;AACnC,QAAI,KAAK;AAET,SAAK,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;AACtC,YAAM,WAAW,CAAC;AAClB,UAAI,SAAS,QAAQ,GAAG,KAAK;AAAG;AAChC,aAAO,GAAG,IAAI,OAAO,GAAG;IAC1B;AAEA,WAAO;EACT;AAEA,WAAS,yBAAyB,QAAQ,UAAU;AAClD,QAAI,UAAU;AAAM,aAAO,CAAC;AAE5B,QAAI,SAAS,8BAA8B,QAAQ,QAAQ;AAE3D,QAAI,KAAK;AAET,QAAI,OAAO,uBAAuB;AAChC,UAAI,mBAAmB,OAAO,sBAAsB,MAAM;AAE1D,WAAK,IAAI,GAAG,IAAI,iBAAiB,QAAQ,KAAK;AAC5C,cAAM,iBAAiB,CAAC;AACxB,YAAI,SAAS,QAAQ,GAAG,KAAK;AAAG;AAChC,YAAI,CAAC,OAAO,UAAU,qBAAqB,KAAK,QAAQ,GAAG;AAAG;AAC9D,eAAO,GAAG,IAAI,OAAO,GAAG;MAC1B;IACF;AAEA,WAAO;EACT;AAEA,WAAS,eAAe,KAAK,GAAG;AAC9B,WAAO,gBAAgB,GAAG,KAAK,sBAAsB,KAAK,CAAC,KAAK,4BAA4B,KAAK,CAAC,KAAK,iBAAiB;EAC1H;AAEA,WAAS,gBAAgB,KAAK;AAC5B,QAAI,MAAM,QAAQ,GAAG;AAAG,aAAO;EACjC;AAEA,WAAS,sBAAsB,KAAK,GAAG;AACrC,QAAI,OAAO,WAAW,eAAe,EAAE,OAAO,YAAY,OAAO,GAAG;AAAI;AACxE,QAAI,OAAO,CAAC;AACZ,QAAI,KAAK;AACT,QAAI,KAAK;AACT,QAAI,KAAK;AAET,QAAI;AACF,eAAS,KAAK,IAAI,OAAO,QAAQ,EAAE,GAAG,IAAI,EAAE,MAAM,KAAK,GAAG,KAAK,GAAG,OAAO,KAAK,MAAM;AAClF,aAAK,KAAK,GAAG,KAAK;AAElB,YAAI,KAAK,KAAK,WAAW;AAAG;MAC9B;IACF,SAAS,KAAP;AACA,WAAK;AACL,WAAK;IACP,UAAA;AACE,UAAI;AACF,YAAI,CAAC,MAAM,GAAG,QAAQ,KAAK;AAAM,aAAG,QAAQ,EAAE;MAChD,UAAA;AACE,YAAI;AAAI,gBAAM;MAChB;IACF;AAEA,WAAO;EACT;AAEA,WAAS,4BAA4B,GAAG,QAAQ;AAC9C,QAAI,CAAC;AAAG;AACR,QAAI,OAAO,MAAM;AAAU,aAAO,kBAAkB,GAAG,MAAM;AAC7D,QAAI,IAAI,OAAO,UAAU,SAAS,KAAK,CAAC,EAAE,MAAM,GAAG,EAAE;AACrD,QAAI,MAAM,YAAY,EAAE;AAAa,UAAI,EAAE,YAAY;AACvD,QAAI,MAAM,SAAS,MAAM;AAAO,aAAO,MAAM,KAAK,CAAC;AACnD,QAAI,MAAM,eAAe,2CAA2C,KAAK,CAAC;AAAG,aAAO,kBAAkB,GAAG,MAAM;EACjH;AAEA,WAAS,kBAAkB,KAAK,KAAK;AACnC,QAAI,OAAO,QAAQ,MAAM,IAAI;AAAQ,YAAM,IAAI;AAE/C,aAAS,IAAI,GAAG,OAAO,IAAI,MAAM,GAAG,GAAG,IAAI,KAAK;AAAK,WAAK,CAAC,IAAI,IAAI,CAAC;AAEpE,WAAO;EACT;AAEA,WAAS,mBAAmB;AAC1B,UAAM,IAAI,UAAU,2IAA2I;EACjK;AC3IA,WAASC,iBAAgB,KAAK,KAAK,OAAO;AACxC,QAAI,OAAO,KAAK;AACd,aAAO,eAAe,KAAK,KAAK;QAC9B;QACA,YAAY;QACZ,cAAc;QACd,UAAU;MACZ,CAAC;IACH,OAAO;AACL,UAAI,GAAG,IAAI;IACb;AAEA,WAAO;EACT;AAEA,WAASC,SAAQ,QAAQ,gBAAgB;AACvC,QAAI,OAAO,OAAO,KAAK,MAAM;AAE7B,QAAI,OAAO,uBAAuB;AAChC,UAAI,UAAU,OAAO,sBAAsB,MAAM;AACjD,UAAI;AAAgB,kBAAU,QAAQ,OAAO,SAAU,KAAK;AAC1D,iBAAO,OAAO,yBAAyB,QAAQ,GAAG,EAAE;QACtD,CAAC;AACD,WAAK,KAAK,MAAM,MAAM,OAAO;IAC/B;AAEA,WAAO;EACT;AAEA,WAASC,gBAAe,QAAQ;AAC9B,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AACzC,UAAI,SAAS,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,IAAI,CAAC;AAEpD,UAAI,IAAI,GAAG;AACTD,iBAAQ,OAAO,MAAM,GAAG,IAAI,EAAE,QAAQ,SAAU,KAAK;AACnDD,2BAAgB,QAAQ,KAAK,OAAO,GAAG,CAAC;QAC1C,CAAC;MACH,WAAW,OAAO,2BAA2B;AAC3C,eAAO,iBAAiB,QAAQ,OAAO,0BAA0B,MAAM,CAAC;MAC1E,OAAO;AACLC,iBAAQ,OAAO,MAAM,CAAC,EAAE,QAAQ,SAAU,KAAK;AAC7C,iBAAO,eAAe,QAAQ,KAAK,OAAO,yBAAyB,QAAQ,GAAG,CAAC;QACjF,CAAC;MACH;IACF;AAEA,WAAO;EACT;AAEA,WAAS,UAAU;AACjB,aAAS,OAAO,UAAU,QAAQ,MAAM,IAAI,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,MAAM,QAAQ;AACtF,UAAI,IAAI,IAAI,UAAU,IAAI;IAC5B;AAEA,WAAO,SAAU,GAAG;AAClB,aAAO,IAAI,YAAY,SAAU,GAAG,GAAG;AACrC,eAAO,EAAE,CAAC;MACZ,GAAG,CAAC;IACN;EACF;AAEA,WAAS,MAAM,IAAI;AACjB,WAAO,SAAS,UAAU;AACxB,UAAI,QAAQ;AAEZ,eAAS,QAAQ,UAAU,QAAQ,OAAO,IAAI,MAAM,KAAK,GAAG,QAAQ,GAAG,QAAQ,OAAO,SAAS;AAC7F,aAAK,KAAK,IAAI,UAAU,KAAK;MAC/B;AAEA,aAAO,KAAK,UAAU,GAAG,SAAS,GAAG,MAAM,MAAM,IAAI,IAAI,WAAY;AACnE,iBAAS,QAAQ,UAAU,QAAQ,WAAW,IAAI,MAAM,KAAK,GAAG,QAAQ,GAAG,QAAQ,OAAO,SAAS;AACjG,mBAAS,KAAK,IAAI,UAAU,KAAK;QACnC;AAEA,eAAO,QAAQ,MAAM,OAAO,CAAC,EAAE,OAAO,MAAM,QAAQ,CAAC;MACvD;IACF;EACF;AAEA,WAAS,SAAS,OAAO;AACvB,WAAO,CAAC,EAAE,SAAS,KAAK,KAAK,EAAE,SAAS,QAAQ;EAClD;AAEA,WAAS,QAAQ,KAAK;AACpB,WAAO,CAAC,OAAO,KAAK,GAAG,EAAE;EAC3B;AAEA,WAAS,WAAW,OAAO;AACzB,WAAO,OAAO,UAAU;EAC1B;AAEA,WAAS,eAAe,QAAQ,UAAU;AACxC,WAAO,OAAO,UAAU,eAAe,KAAK,QAAQ,QAAQ;EAC9D;AAEA,WAAS,gBAAgB,SAAS,SAAS;AACzC,QAAI,CAAC,SAAS,OAAO;AAAG,mBAAa,YAAY;AACjD,QAAI,OAAO,KAAK,OAAO,EAAE,KAAK,SAAU,OAAO;AAC7C,aAAO,CAAC,eAAe,SAAS,KAAK;IACvC,CAAC;AAAG,mBAAa,aAAa;AAC9B,WAAO;EACT;AAEA,WAAS,iBAAiB,UAAU;AAClC,QAAI,CAAC,WAAW,QAAQ;AAAG,mBAAa,cAAc;EACxD;AAEA,WAAS,gBAAgB,SAAS;AAChC,QAAI,EAAE,WAAW,OAAO,KAAK,SAAS,OAAO;AAAI,mBAAa,aAAa;AAC3E,QAAI,SAAS,OAAO,KAAK,OAAO,OAAO,OAAO,EAAE,KAAK,SAAU,UAAU;AACvE,aAAO,CAAC,WAAW,QAAQ;IAC7B,CAAC;AAAG,mBAAa,cAAc;EACjC;AAEA,WAAS,gBAAgB,SAAS;AAChC,QAAI,CAAC;AAAS,mBAAa,mBAAmB;AAC9C,QAAI,CAAC,SAAS,OAAO;AAAG,mBAAa,aAAa;AAClD,QAAI,QAAQ,OAAO;AAAG,mBAAa,gBAAgB;EACrD;AAEA,WAAS,WAAWE,gBAAe,MAAM;AACvC,UAAM,IAAI,MAAMA,eAAc,IAAI,KAAKA,eAAc,SAAS,CAAC;EACjE;AAEA,MAAI,gBAAgB;IAClB,mBAAmB;IACnB,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,cAAc;IACd,cAAc;IACd,YAAY;IACZ,aAAa;IACb,WAAW;EACb;AACA,MAAI,eAAe,MAAM,UAAU,EAAE,aAAa;AAClD,MAAI,aAAa;IACf,SAAS;IACT,UAAU;IACV,SAAS;IACT,SAAS;EACX;AAEA,WAAS,OAAO,SAAS;AACvB,QAAI,UAAU,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAY,UAAU,CAAC,IAAI,CAAC;AACnF,eAAW,QAAQ,OAAO;AAC1B,eAAW,QAAQ,OAAO;AAC1B,QAAI,QAAQ;MACV,SAAS;IACX;AACA,QAAI,YAAY,MAAM,cAAc,EAAE,OAAO,OAAO;AACpD,QAAI,SAAS,MAAM,WAAW,EAAE,KAAK;AACrC,QAAI,WAAW,MAAM,WAAW,OAAO,EAAE,OAAO;AAChD,QAAI,aAAa,MAAM,cAAc,EAAE,KAAK;AAE5C,aAASC,YAAW;AAClB,UAAI,WAAW,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAY,UAAU,CAAC,IAAI,SAAUC,QAAO;AAClG,eAAOA;MACT;AACA,iBAAW,SAAS,QAAQ;AAC5B,aAAO,SAAS,MAAM,OAAO;IAC/B;AAEA,aAASC,UAAS,eAAe;AAC/B,cAAQ,WAAW,QAAQ,UAAU,UAAU,EAAE,aAAa;IAChE;AAEA,WAAO,CAACF,WAAUE,SAAQ;EAC5B;AAEA,WAAS,eAAe,OAAO,eAAe;AAC5C,WAAO,WAAW,aAAa,IAAI,cAAc,MAAM,OAAO,IAAI;EACpE;AAEA,WAAS,YAAY,OAAO,SAAS;AACnC,UAAM,UAAUJ,gBAAeA,gBAAe,CAAC,GAAG,MAAM,OAAO,GAAG,OAAO;AACzE,WAAO;EACT;AAEA,WAAS,eAAe,OAAO,SAAS,SAAS;AAC/C,eAAW,OAAO,IAAI,QAAQ,MAAM,OAAO,IAAI,OAAO,KAAK,OAAO,EAAE,QAAQ,SAAU,OAAO;AAC3F,UAAI;AAEJ,cAAQ,iBAAiB,QAAQ,KAAK,OAAO,QAAQ,mBAAmB,SAAS,SAAS,eAAe,KAAK,SAAS,MAAM,QAAQ,KAAK,CAAC;IAC7I,CAAC;AACD,WAAO;EACT;AAEA,MAAI,QAAQ;IACV;EACF;AAEA,MAAO,sBAAQ;AChMf,MAAI,SAAS;IACX,OAAO;MACL,IAAI;IACN;EACF;AAEA,MAAO,iBAAQ;ACNf,WAASK,OAAM,IAAI;AACjB,WAAO,SAAS,UAAU;AACxB,UAAI,QAAQ;AAEZ,eAAS,OAAO,UAAU,QAAQ,OAAO,IAAI,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,MAAM,QAAQ;AACvF,aAAK,IAAI,IAAI,UAAU,IAAI;MAC7B;AAEA,aAAO,KAAK,UAAU,GAAG,SAAS,GAAG,MAAM,MAAM,IAAI,IAAI,WAAY;AACnE,iBAAS,QAAQ,UAAU,QAAQ,WAAW,IAAI,MAAM,KAAK,GAAG,QAAQ,GAAG,QAAQ,OAAO,SAAS;AACjG,mBAAS,KAAK,IAAI,UAAU,KAAK;QACnC;AAEA,eAAO,QAAQ,MAAM,OAAO,CAAC,EAAE,OAAO,MAAM,QAAQ,CAAC;MACvD;IACF;EACF;AAEA,MAAO,gBAAQA;AClBf,WAASC,UAAS,OAAO;AACvB,WAAO,CAAC,EAAE,SAAS,KAAK,KAAK,EAAE,SAAS,QAAQ;EAClD;AAEA,MAAO,mBAAQA;ACKf,WAAS,eAAeC,SAAQ;AAC9B,QAAI,CAACA;AAAQC,oBAAa,kBAAkB;AAC5C,QAAI,CAAC,iBAASD,OAAM;AAAGC,oBAAa,YAAY;AAEhD,QAAID,QAAO,MAAM;AACf,6BAAuB;AACvB,aAAO;QACL,OAAO;UACL,IAAIA,QAAO,KAAK;QAClB;MACF;IACF;AAEA,WAAOA;EACT;AAMA,WAAS,yBAAyB;AAChC,YAAQ,KAAKN,eAAc,WAAW;EACxC;AAEA,WAASQ,YAAWR,gBAAe,MAAM;AACvC,UAAM,IAAI,MAAMA,eAAc,IAAI,KAAKA,eAAc,SAAS,CAAC;EACjE;AAEA,MAAIA,iBAAgB;IAClB,kBAAkB;IAClB,YAAY;IACZ,WAAW;IACX,aAAa;EACf;AACA,MAAIO,gBAAe,cAAMC,WAAU,EAAER,cAAa;AAClD,MAAIS,cAAa;IACf,QAAQ;EACV;AAEA,MAAO,qBAAQA;AChDf,MAAIC,WAAU,SAASA,WAAU;AAC/B,aAAS,OAAO,UAAU,QAAQ,MAAM,IAAI,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,MAAM,QAAQ;AACtF,UAAI,IAAI,IAAI,UAAU,IAAI;IAC5B;AAEA,WAAO,SAAU,GAAG;AAClB,aAAO,IAAI,YAAY,SAAU,GAAG,GAAG;AACrC,eAAO,EAAE,CAAC;MACZ,GAAG,CAAC;IACN;EACF;AAEA,MAAO,kBAAQA;ACVf,WAAS,MAAM,QAAQ,QAAQ;AAC7B,WAAO,KAAK,MAAM,EAAE,QAAQ,SAAU,KAAK;AACzC,UAAI,OAAO,GAAG,aAAa,QAAQ;AACjC,YAAI,OAAO,GAAG,GAAG;AACf,iBAAO,OAAO,OAAO,GAAG,GAAG,MAAM,OAAO,GAAG,GAAG,OAAO,GAAG,CAAC,CAAC;QAC5D;MACF;IACF,CAAC;AACD,WAAO,eAAe,eAAe,CAAC,GAAG,MAAM,GAAG,MAAM;EAC1D;AAEA,MAAO,oBAAQ;ACZf,MAAI,sBAAsB;IACxB,MAAM;IACN,KAAK;EACP;AAEA,WAAS,eAAe,SAAS;AAC/B,QAAI,eAAe;AACnB,QAAI,iBAAiB,IAAI,QAAQ,SAAU,SAAS,QAAQ;AAC1D,cAAQ,KAAK,SAAU,KAAK;AAC1B,eAAO,eAAe,OAAO,mBAAmB,IAAI,QAAQ,GAAG;MACjE,CAAC;AACD,cAAQ,OAAO,EAAE,MAAM;IACzB,CAAC;AACD,WAAO,eAAe,SAAS,WAAY;AACzC,aAAO,eAAe;IACxB,GAAG;EACL;AAEA,MAAO,yBAAQ;ACTf,MAAI,gBAAgB,oBAAM,OAAO;IAC/B,QAAQ;IACR,eAAe;IACf,SAAS;IACT,QAAQ;IACR,QAAQ;EACV,CAAC;AAND,MAOI,iBAAiB,eAAe,eAAe,CAAC;AAPpD,MAQI,WAAW,eAAe,CAAC;AAR/B,MASI,WAAW,eAAe,CAAC;AAO/B,WAASJ,QAAO,cAAc;AAC5B,QAAI,qBAAqB,mBAAW,OAAO,YAAY,GACnD,SAAS,mBAAmB,QAC5BA,UAAS,yBAAyB,oBAAoB,CAAC,QAAQ,CAAC;AAEpE,aAAS,SAAU,OAAO;AACxB,aAAO;QACL,QAAQ,kBAAM,MAAM,QAAQA,OAAM;QAClC;MACF;IACF,CAAC;EACH;AAOA,WAAS,OAAO;AACd,QAAI,QAAQ,SAAS,SAAU,MAAM;AACnC,UAAI,SAAS,KAAK,QACd,gBAAgB,KAAK,eACrB,UAAU,KAAK;AACnB,aAAO;QACL;QACA;QACA;MACF;IACF,CAAC;AAED,QAAI,CAAC,MAAM,eAAe;AACxB,eAAS;QACP,eAAe;MACjB,CAAC;AAED,UAAI,MAAM,QAAQ;AAChB,cAAM,QAAQ,MAAM,MAAM;AAC1B,eAAO,uBAAe,cAAc;MACtC;AAEA,UAAI,OAAO,UAAU,OAAO,OAAO,QAAQ;AACzC,4BAAoB,OAAO,MAAM;AACjC,cAAM,QAAQ,OAAO,MAAM;AAC3B,eAAO,uBAAe,cAAc;MACtC;AAEA,sBAAQ,eAAe,qBAAqB,EAAE,eAAe;IAC/D;AAEA,WAAO,uBAAe,cAAc;EACtC;AAQA,WAAS,cAAc,QAAQ;AAC7B,WAAO,SAAS,KAAK,YAAY,MAAM;EACzC;AAQA,WAAS,aAAa,KAAK;AACzB,QAAI,SAAS,SAAS,cAAc,QAAQ;AAC5C,WAAO,QAAQ,OAAO,MAAM,MAAM;EACpC;AAOA,WAAS,sBAAsBK,kBAAiB;AAC9C,QAAI,QAAQ,SAAS,SAAU,OAAO;AACpC,UAAIL,UAAS,MAAM,QACf,SAAS,MAAM;AACnB,aAAO;QACL,QAAQA;QACR;MACF;IACF,CAAC;AACD,QAAI,eAAe,aAAa,GAAG,OAAO,MAAM,OAAO,MAAM,IAAI,YAAY,CAAC;AAE9E,iBAAa,SAAS,WAAY;AAChC,aAAOK,iBAAgB;IACzB;AAEA,iBAAa,UAAU,MAAM;AAC7B,WAAO;EACT;AAMA,WAAS,kBAAkB;AACzB,QAAI,QAAQ,SAAS,SAAU,OAAO;AACpC,UAAIL,UAAS,MAAM,QACf,UAAU,MAAM,SAChB,SAAS,MAAM;AACnB,aAAO;QACL,QAAQA;QACR;QACA;MACF;IACF,CAAC;AACD,QAAIM,WAAU,OAAO;AAErBA,aAAQ,OAAO,MAAM,MAAM;AAE3BA,aAAQ,CAAC,uBAAuB,GAAG,SAAU,QAAQ;AACnD,0BAAoB,MAAM;AAC1B,YAAM,QAAQ,MAAM;IACtB,GAAG,SAAU,OAAO;AAClB,YAAM,OAAO,KAAK;IACpB,CAAC;EACH;AAMA,WAAS,oBAAoB,QAAQ;AACnC,QAAI,CAAC,SAAS,EAAE,QAAQ;AACtB,eAAS;QACP;MACF,CAAC;IACH;EACF;AAQA,WAAS,sBAAsB;AAC7B,WAAO,SAAS,SAAU,OAAO;AAC/B,UAAI,SAAS,MAAM;AACnB,aAAO;IACT,CAAC;EACH;AAEA,MAAI,iBAAiB,IAAI,QAAQ,SAAU,SAAS,QAAQ;AAC1D,WAAO,SAAS;MACd;MACA;IACF,CAAC;EACH,CAAC;AACD,MAAI,SAAS;IACX,QAAQN;IACR;IACA;EACF;AAEA,MAAO,iBAAQ;ACpLf,MAAM,SAAS;IACb,YAAY;IACZ,SAAS;IACT,UAAU;IACV,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;EACT;AAEA,MAAM,QAAQ,CAACO,YAAW;IACxB,EAAE,OAAO,IAAI,YAAYA,QAAO,QAAQ;IACxC,EAAE,OAAO,YAAY,YAAYA,QAAO,SAAS;IACjD,EAAE,OAAO,YAAY,YAAYA,QAAO,KAAK;IAC7C,EAAE,OAAO,6BAA6B,YAAYA,QAAO,KAAK;IAC9D,EAAE,OAAO,WAAW,YAAYA,QAAO,KAAK;IAC5C,EAAE,OAAO,UAAU,YAAYA,QAAO,KAAK;IAC3C,EAAE,OAAO,UAAU,YAAYA,QAAO,SAAS;IAC/C,EAAE,OAAO,QAAQ,YAAYA,QAAO,SAAS;IAC7C,EAAE,OAAO,UAAU,YAAYA,QAAO,MAAM;IAC5C,EAAE,OAAO,WAAW,YAAYA,QAAO,OAAO;IAC9C,EAAE,OAAO,YAAY,YAAYA,QAAO,MAAM;IAC9C,EAAE,OAAO,2BAA2B,YAAYA,QAAO,IAAI;IAC3D,EAAE,OAAO,SAAS,YAAYA,QAAO,KAAK;IAC1C,EAAE,OAAO,YAAY,YAAYA,QAAO,KAAK;IAC7C,EAAE,OAAO,iBAAiB,YAAYA,QAAO,QAAQ;;IAGrD,EAAE,OAAO,YAAY,WAAW,SAAS;IACzC,EAAE,OAAO,UAAU,WAAW,OAAO;IACrC,EAAE,OAAO,cAAc,YAAYA,QAAO,SAAS;IACnD,EAAE,OAAO,iBAAiB,YAAYA,QAAO,SAAS;IACtD,EAAE,OAAO,kBAAkB,YAAYA,QAAO,KAAK;IACnD,EAAE,OAAO,eAAe,YAAYA,QAAO,KAAK;IAChD,EAAE,OAAO,aAAa,YAAYA,QAAO,QAAQ;IACjD,EAAE,OAAO,sBAAsB,YAAYA,QAAO,QAAQ;;IAG1D,EAAE,OAAO,OAAO,YAAYA,QAAO,SAAS;IAC5C,EAAE,OAAO,WAAW,YAAYA,QAAO,SAAS;IAChD,EAAE,OAAO,kBAAkB,YAAYA,QAAO,MAAM;IACpD,EAAE,OAAO,mBAAmB,YAAYA,QAAO,MAAM;;IAGrD,EAAE,OAAO,cAAc,YAAYA,QAAO,SAAS;IACnD,EAAE,OAAO,gBAAgB,YAAYA,QAAO,KAAK;;IAGjD,EAAE,OAAO,gBAAgB,YAAYA,QAAO,OAAO;EACrD;AAEA,MAAM,QAAQ;IACZ,MAAM;IACN,SAAS;IACT,OAAO,MAAM,MAAM;IACnB,QAAQ;MACN,qBAAqB,OAAO;MAC5B,qBAAqB,OAAO;MAC5B,+BAA+B;MAC/B,2BAA2B;MAC3B,8BAA8B;MAC9B,uCAAuC;MACvC,kCAAkC;MAClC,8BAA8B;MAC9B,0CAA0C;MAC1C,oBAAoB;MACpB,gBAAgB;MAChB,6BAA6B;MAC7B,iCAAiC;IACnC;EACF;ACzEA,MAAM,aAAN,MAAiB;IACf,YAAY,IAAI,MAAM,OAAO,MAAM;AACjC,WAAK,KAAK;AACV,WAAK,OAAO;AACZ,WAAK,QAAQ;AACb,WAAK,OAAO;AAEZ,WAAK,yBAAyB;AAC9B,WAAK,WAAW,CAAC;IACnB;IAEA,YAAY;AACV,aAAO,CAAC,CAAC,KAAK;IAChB;IAEA,QAAQ;AACN,UAAI,KAAK,UAAU,GAAG;AACpB,cAAM,IAAI,MAAM,sCAAsC;MACxD;AAEA,WAAK,aAAa;IACpB;IAEA,QAAQ,UAAU;AAChB,WAAK,SAAS,KAAK,QAAQ;IAC7B;IAEA,UAAU;AACR,UAAI,KAAK,UAAU,GAAG;AACpB,cAAM,QAAQ,KAAK,uBAAuB,SAAS;AAEnD,YAAI,OAAO;AACT,gBAAM,QAAQ;QAChB;AAEA,aAAK,uBAAuB,QAAQ;MACtC;IACF;IAEA,eAAe;AACb,WAAK,KAAK,QAAQ,KAAK;AAEvB,qBAAO,OAAO;QACZ,OAAO,EAAE,IAAI,2DAA2D;MAC1E,CAAC;AAED,qBAAO,KAAK,EAAE,KAAK,CAAC,WAAW;AAC7B,eAAO,OAAO,YAAY,WAAW,KAAK;AAE1C,YAAI,WAAW,OAAO,IAAI,MAAM,KAAK,IAAI;AACzC,YAAI,WAAW,KAAK,KAAK;AACzB,YAAI,QAAQ,OAAO,OAAO,YAAY,KAAK,OAAO,UAAU,QAAQ;AAEpE,aAAK,KAAK,WAAW;AACrB,aAAK,KAAK,QAAQ;AAClB,aAAK,yBAAyB,OAAO,OAAO,OAAO,KAAK,IAAI,KAAK,IAAI;AAErE,aAAK,SAAS,QAAQ,CAAC,aAAa,SAAS,MAAM,CAAC;AAEpD,aAAK,iCAAiC;AAEtC,aAAK,uBAAuB,UAAU;UACpC,oBAAoB;UACpB,IAAI;UACJ,OAAO;UACP,cAAc;UACd,aAAa,CAAC,OAAO,OAAO,MAAM,OAAO,QAAQ,IAAI;UACrD,KAAK,CAAC,WAAW,OAAO,cAAc,EAAE,UAAU,KAAK,CAAC;QAC1D,CAAC;AAED,aAAK,uBAAuB,UAAU;UACpC,oBAAoB;UACpB,IAAI;UACJ,OAAO;UACP,cAAc;UACd,aAAa,CAAC,OAAO,OAAO,MAAM,OAAO,QAAQ,IAAI;UACrD,KAAK,CAAC,WAAW,OAAO,cAAc,EAAE,UAAU,MAAM,CAAC;QAC3D,CAAC;AAED,cAAM,iBAAiB,IAAI,eAAe,CAAC,YAAY;AACrD,kBAAQ,QAAQ,MAAM;AACpB,gBAAI,KAAK,GAAG,eAAe,GAAG;AAC5B,mBAAK,iCAAiC;AACtC,mBAAK,uBAAuB,OAAO;YACrC;UACF,CAAC;QACH,CAAC;AAED,uBAAe,QAAQ,KAAK,EAAE;AAE9B,aAAK,uBAAuB,uBAAuB,MAAM;AACvD,gBAAM,gBAAgB,KAAK,uBAAuB,iBAAiB;AACnE,eAAK,GAAG,MAAM,SAAS,GAAG,aAAA;QAC5B,CAAC;MACH,CAAC;IACH;IAEA,mCAAmC;AACjC,UAAI,OAAO,OAAO,QAAQ,KAAK;AAC7B,aAAK,uBAAuB,cAAc;UACxC,SAAS;UACT,sBAAsB;UACtB,qBACE,KAAK;YACH,KAAK,MAAM,KAAK,uBAAuB,SAAS,EAAE,aAAa,CAAC;UAClE,IAAI;QACR,CAAC;MACH,OAAO;AACL,aAAK,uBAAuB,cAAc;UACxC,SAAS;UACT,sBAAsB;UACtB,qBAAqB;QACvB,CAAC;MACH;IACF;EACF;AAEA,MAAO,sBAAQ;AC1Hf,MAAM,iBAAiB;IACrB,UAAU;AAER,YAAM,OAAO,KAAK,MAAM,KAAK,GAAG,QAAQ,IAAI;AAE5C,WAAK,aAAa,IAAI;QACpB,KAAK;QACL,KAAK,GAAG,QAAQ;QAChB,KAAK,GAAG,QAAQ;QAChB;MACF;AAEA,WAAK,WAAW,QAAQ,CAAC,WAAW;AAClC,YAAI,KAAK,GAAG,QAAQ,eAAe,KAAK,GAAG,QAAQ,gBAAgB,IAAI;AACrE,eAAK,WAAW,uBAAuB,wBAAwB,MAAM;AACnE,gBAAI,KAAK,GAAG,QAAQ,UAAU,KAAK,GAAG,QAAQ,WAAW,IAAI;AAC3D,mBAAK;gBACH,KAAK,GAAG,QAAQ;gBAChB,KAAK,GAAG,QAAQ;gBAChB;kBACE,OAAO,KAAK,WAAW,uBAAuB,SAAS;gBACzD;cACF;YACF,OAAO;AACL,mBAAK,UAAU,KAAK,GAAG,QAAQ,aAAa;gBAC1C,OAAO,KAAK,WAAW,uBAAuB,SAAS;cACzD,CAAC;YACH;UACF,CAAC;QACH;AAEA,aAAK;UACH,yBAAyB,KAAK,GAAG,QAAQ;UACzC,CAAC,SAAS;AACR,kBAAM,QAAQ,KAAK,WAAW,uBAAuB,SAAS;AAE9D,gBAAI,MAAM,cAAc,MAAM,KAAK,sBAAsB;AACvD,qBAAO,OAAO,iBAAiB,OAAO,KAAK,oBAAoB;YACjE;UACF;QACF;AAEA,aAAK,YAAY,mBAAmB,KAAK,GAAG,QAAQ,MAAM,CAAC,SAAS;AAClE,eAAK,WAAW,uBAAuB,SAAS,KAAK,KAAK;QAC5D,CAAC;AAED,aAAK,GAAG,iBAAiB,UAAU,EAAE,QAAQ,CAAC,aAAa;AACzD,mBAAS;YACP;YACA,wBAAwB,KAAK,GAAG,QAAQ,OAAO;UACjD;QACF,CAAC;AAED,aAAK,GAAG,gBAAgB,YAAY;AACpC,aAAK,GAAG,gBAAgB,WAAW;AAEnC,aAAK,GAAG;UACN,IAAI,YAAY,sBAAsB;YACpC,QAAQ,EAAE,MAAM,MAAM,QAAQ,KAAK,WAAW;YAC9C,SAAS;UACX,CAAC;QACH;MACF,CAAC;AAED,UAAI,CAAC,KAAK,WAAW,UAAU,GAAG;AAChC,aAAK,WAAW,MAAM;MACxB;IACF;IAEA,YAAY;AACV,UAAI,KAAK,YAAY;AACnB,aAAK,WAAW,QAAQ;MAC1B;IACF;EACF;;;AbzEA,MAAI,QAAQ,CAAC;AACb,QAAM,iBAAiB;AAEvB,gBAAAC,QAAO,OAAO,EAAC,WAAW,EAAC,GAAG,OAAM,GAAG,aAAa,oBAAmB,CAAC;AAExE,SAAO,iBAAiB,0BAA0B,CAAC,WAAW;AAC5D,kBAAAA,QAAO,KAAK,GAAG;AAAA,EACjB,CAAC;AAED,SAAO,iBAAiB,yBAAyB,CAAC,WAAW;AAC3D,kBAAAA,QAAO,KAAK;AAAA,EACd,CAAC;AAED,SAAO,iBAAiB,yBAAyB,CAAC,UAAU;AAC1D,UAAM,YAAY,GAAG,MAAM,OAAO,EAAE;AACpC,UAAM,KAAK,SAAS,eAAe,SAAS;AAE5C,QAAI,eAAe,WAAW;AAC5B,UAAI,MAAM,OAAO,YAAY,SAAS;AACpC,cAAM,MAAM,OAAO;AAAA,MACrB,OAAO;AACL,cAAM,MAAM,OAAO;AAAA,MACrB;AAEA,gBAAU,UAAU,UAAU,GAAG,EAAE,KAAK,MAAM;AAC5C,WAAG,YAAY;AAEf,WAAG,UAAU,OAAO,aAAa,gBAAgB,WAAW;AAE5D,WAAG,UAAU,IAAI,kBAAkB,eAAe,gBAAgB;AAElE,mBAAW,WAAW;AACpB,aAAG,UAAU,OAAO,kBAAkB,eAAe,gBAAgB;AACrE,aAAG,UAAU,IAAI,aAAa,gBAAgB,WAAW;AAAA,QAC3D,GAAG,GAAI;AAAA,MAET,CAAC,EAAE,MAAM,MAAM;AACb,WAAG,YAAY;AAEf,WAAG,UAAU,OAAO,aAAa,kBAAkB,WAAW;AAE9D,WAAG,UAAU,IAAI,gBAAgB,eAAe,gBAAgB;AAAA,MAClE,CAAC;AAAA,IACH,OAAO;AACL;AAAA,QACE;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAED,MAAI,aAAa,SAAS,cAAc,MAAM,EAAE,aAAa,YAAY,KAAK;AAC9E,MAAI,YAAY,SAAU,cAAc,yBAAyB,EAAG,aAAa,SAAS;AAC1F,MAAI,aAAa,IAAI,SAAS,WAAW,YAAY,QAAQ,QAAQ;AAAA,IACnE,OAAO;AAAA,IACP,QAAQ,EAAE,aAAa,UAAU;AAAA,EACnC,CAAC;AACD,aAAW,QAAQ;AACnB,SAAO,aAAa;", - "names": ["window", "document", "topbar", "_defineProperty", "ownKeys", "_objectSpread2", "errorMessages", "getState", "state", "setState", "curry", "isObject", "config", "errorHandler", "throwError", "validators", "compose", "configureLoader", "require", "colors", "topbar"] + "sources": ["../../assets/vendor/topbar.js", "../../assets/js/beacon_live_admin.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js", "../../deps/live_monaco_editor/assets/node_modules/state-local/lib/es/state-local.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/config/index.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/curry.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/validators/index.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/compose.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js", "../../deps/live_monaco_editor/assets/node_modules/@monaco-editor/loader/lib/es/loader/index.js", "../../deps/live_monaco_editor/assets/js/live_monaco_editor/editor/themes.js", "../../deps/live_monaco_editor/assets/js/live_monaco_editor/editor/code_editor.js", "../../deps/live_monaco_editor/assets/js/live_monaco_editor/hooks/code_editor.js", "../../deps/live_svelte/assets/js/live_svelte/utils.js", "../../deps/live_svelte/assets/js/live_svelte/render.js", "../../deps/live_svelte/assets/js/live_svelte/hooks.js", "import-glob:../svelte/**/*.svelte", "../../assets/node_modules/svelte/src/runtime/internal/utils.js", "../../assets/node_modules/svelte/src/runtime/internal/environment.js", "../../assets/node_modules/svelte/src/runtime/internal/loop.js", "../../assets/node_modules/svelte/src/runtime/internal/globals.js", "../../assets/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js", "../../assets/node_modules/svelte/src/runtime/internal/dom.js", "../../assets/node_modules/svelte/src/runtime/internal/style_manager.js", "../../assets/node_modules/svelte/src/runtime/internal/lifecycle.js", "../../assets/node_modules/svelte/src/runtime/internal/scheduler.js", "../../assets/node_modules/svelte/src/runtime/internal/transitions.js", "../../assets/node_modules/svelte/src/runtime/internal/each.js", "../../assets/node_modules/svelte/src/runtime/internal/spread.js", "../../assets/node_modules/svelte/src/shared/boolean_attributes.js", "../../assets/node_modules/svelte/src/shared/utils/names.js", "../../assets/node_modules/svelte/src/runtime/internal/Component.js", "../../assets/node_modules/svelte/src/shared/version.js", "../../assets/node_modules/svelte/src/runtime/internal/dev.js", "../../assets/node_modules/svelte/src/runtime/internal/disclose-version/index.js", "../../assets/node_modules/svelte/src/runtime/transition/index.js", "../../assets/node_modules/svelte/src/runtime/store/index.js", "../../assets/svelte/components/Backdrop.svelte", "../../assets/svelte/components/BrowserFrame.svelte", "../../assets/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js", "../../assets/node_modules/state-local/lib/es/state-local.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/config/index.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/utils/curry.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/validators/index.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/utils/compose.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js", "../../assets/node_modules/@monaco-editor/loader/lib/es/loader/index.js", "../../assets/svelte/components/CodeEditor.svelte", "../../assets/svelte/utils/animations.ts", "../../assets/svelte/stores/currentComponentCategory.ts", "../../assets/svelte/stores/dragAndDrop.ts", "../../assets/svelte/components/ComponentsSidebar.svelte", "../../assets/svelte/stores/page.ts", "../../assets/svelte/components/LayoutAstNode.svelte", "../../assets/svelte/components/PageAstNode.svelte", "../../assets/svelte/components/PagePreview.svelte", "../../assets/svelte/stores/tailwindConfig.ts", "../../assets/svelte/stores/tailwindInput.ts", "../../assets/svelte/components/PageWrapper.svelte", "../../assets/svelte/components/Pill.svelte", "../../assets/svelte/components/SidebarSection.svelte", "../../assets/svelte/components/PropertiesSidebar.svelte", "../../assets/svelte/components/UiBuilder.svelte"], + "sourcesContent": ["/**\n * @license MIT\n * topbar 2.0.0, 2023-02-04\n * https://buunguyen.github.io/topbar\n * Copyright (c) 2021 Buu Nguyen\n */\n;(function (window, document) {\n \"use strict\"\n\n // https://gist.github.com/paulirish/1579671\n ;(function () {\n var lastTime = 0\n var vendors = [\"ms\", \"moz\", \"webkit\", \"o\"]\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x] + \"RequestAnimationFrame\"]\n window.cancelAnimationFrame =\n window[vendors[x] + \"CancelAnimationFrame\"] || window[vendors[x] + \"CancelRequestAnimationFrame\"]\n }\n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function (callback, element) {\n var currTime = new Date().getTime()\n var timeToCall = Math.max(0, 16 - (currTime - lastTime))\n var id = window.setTimeout(function () {\n callback(currTime + timeToCall)\n }, timeToCall)\n lastTime = currTime + timeToCall\n return id\n }\n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function (id) {\n clearTimeout(id)\n }\n })()\n\n var canvas,\n currentProgress,\n showing,\n progressTimerId = null,\n fadeTimerId = null,\n delayTimerId = null,\n addEvent = function (elem, type, handler) {\n if (elem.addEventListener) elem.addEventListener(type, handler, false)\n else if (elem.attachEvent) elem.attachEvent(\"on\" + type, handler)\n else elem[\"on\" + type] = handler\n },\n options = {\n autoRun: true,\n barThickness: 3,\n barColors: {\n 0: \"rgba(26, 188, 156, .9)\",\n \".25\": \"rgba(52, 152, 219, .9)\",\n \".50\": \"rgba(241, 196, 15, .9)\",\n \".75\": \"rgba(230, 126, 34, .9)\",\n \"1.0\": \"rgba(211, 84, 0, .9)\",\n },\n shadowBlur: 10,\n shadowColor: \"rgba(0, 0, 0, .6)\",\n className: null,\n },\n repaint = function () {\n canvas.width = window.innerWidth\n canvas.height = options.barThickness * 5 // need space for shadow\n\n var ctx = canvas.getContext(\"2d\")\n ctx.shadowBlur = options.shadowBlur\n ctx.shadowColor = options.shadowColor\n\n var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0)\n for (var stop in options.barColors) lineGradient.addColorStop(stop, options.barColors[stop])\n ctx.lineWidth = options.barThickness\n ctx.beginPath()\n ctx.moveTo(0, options.barThickness / 2)\n ctx.lineTo(Math.ceil(currentProgress * canvas.width), options.barThickness / 2)\n ctx.strokeStyle = lineGradient\n ctx.stroke()\n },\n createCanvas = function () {\n canvas = document.createElement(\"canvas\")\n var style = canvas.style\n style.position = \"fixed\"\n style.top = style.left = style.right = style.margin = style.padding = 0\n style.zIndex = 100001\n style.display = \"none\"\n if (options.className) canvas.classList.add(options.className)\n document.body.appendChild(canvas)\n addEvent(window, \"resize\", repaint)\n },\n topbar = {\n config: function (opts) {\n for (var key in opts) if (options.hasOwnProperty(key)) options[key] = opts[key]\n },\n show: function (delay) {\n if (showing) return\n if (delay) {\n if (delayTimerId) return\n delayTimerId = setTimeout(() => topbar.show(), delay)\n } else {\n showing = true\n if (fadeTimerId !== null) window.cancelAnimationFrame(fadeTimerId)\n if (!canvas) createCanvas()\n canvas.style.opacity = 1\n canvas.style.display = \"block\"\n topbar.progress(0)\n if (options.autoRun) {\n ;(function loop() {\n progressTimerId = window.requestAnimationFrame(loop)\n topbar.progress(\"+\" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2))\n })()\n }\n }\n },\n progress: function (to) {\n if (typeof to === \"undefined\") return currentProgress\n if (typeof to === \"string\") {\n to = (to.indexOf(\"+\") >= 0 || to.indexOf(\"-\") >= 0 ? currentProgress : 0) + parseFloat(to)\n }\n currentProgress = to > 1 ? 1 : to\n repaint()\n return currentProgress\n },\n hide: function () {\n clearTimeout(delayTimerId)\n delayTimerId = null\n if (!showing) return\n showing = false\n if (progressTimerId != null) {\n window.cancelAnimationFrame(progressTimerId)\n progressTimerId = null\n }\n ;(function loop() {\n if (topbar.progress(\"+.1\") >= 1) {\n canvas.style.opacity -= 0.05\n if (canvas.style.opacity <= 0.05) {\n canvas.style.display = \"none\"\n fadeTimerId = null\n return\n }\n }\n fadeTimerId = window.requestAnimationFrame(loop)\n })()\n },\n }\n\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = topbar\n } else if (typeof define === \"function\" && define.amd) {\n define(function () {\n return topbar\n })\n } else {\n this.topbar = topbar\n }\n}).call(this, window, document)\n", "import topbar from \"../vendor/topbar\"\nimport { CodeEditorHook } from \"../../deps/live_monaco_editor/priv/static/live_monaco_editor.esm\"\nimport { getHooks } from \"live_svelte\"\nimport * as Components from \"../svelte/**/*.svelte\"\nlet Hooks = {}\nHooks.CodeEditorHook = CodeEditorHook\ntopbar.config({ barColors: { 0: \"#29d\" }, shadowColor: \"rgba(0, 0, 0, .3)\" })\nwindow.addEventListener(\"phx:page-loading-start\", (_info) => topbar.show(300))\nwindow.addEventListener(\"phx:page-loading-stop\", (_info) => topbar.hide())\n\nwindow.addEventListener(\"beacon_admin:clipcopy\", (event) => {\n const result_id = `${event.target.id}-copy-to-clipboard-result`\n const el = document.getElementById(result_id)\n\n if (\"clipboard\" in navigator) {\n if (event.target.tagName === \"INPUT\") {\n txt = event.target.value\n } else {\n txt = event.target.textContent\n }\n\n navigator.clipboard\n .writeText(txt)\n .then(() => {\n el.innerText = \"Copied to clipboard\"\n // Make it visible\n el.classList.remove(\"invisible\", \"text-red-500\", \"opacity-0\")\n // Fade in and translate upwards\n el.classList.add(\"text-green-500\", \"opacity-100\", \"-translate-y-2\")\n\n setTimeout(function () {\n el.classList.remove(\"text-green-500\", \"opacity-100\", \"-translate-y-2\")\n el.classList.add(\"invisible\", \"text-red-500\", \"opacity-0\")\n }, 2000)\n })\n .catch(() => {\n el.innerText = \"Could not copy\"\n // Make it visible\n el.classList.remove(\"invisible\", \"text-green-500\", \"opacity-0\")\n // Fade in and translate upwards\n el.classList.add(\"text-red-500\", \"opacity-100\", \"-translate-y-2\")\n })\n } else {\n alert(\"Sorry, your browser does not support clipboard copy.\")\n }\n})\n\nlet socketPath = document.querySelector(\"html\").getAttribute(\"phx-socket\") || \"/live\"\nlet csrfToken = document.querySelector(\"meta[name='csrf-token']\").getAttribute(\"content\")\nlet liveSocket = new LiveView.LiveSocket(socketPath, Phoenix.Socket, {\n hooks: { ...getHooks(Components), ...Hooks },\n params: { _csrf_token: csrfToken },\n})\nliveSocket.connect()\nwindow.liveSocket = liveSocket\n", "function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\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\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\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\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _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)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _unsupportedIterableToArray as unsupportedIterableToArray };\n", "function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\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\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n", "var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs'\n }\n};\n\nexport default config;\n", "function curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n nextArgs[_key2] = arguments[_key2];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nexport default curry;\n", "function isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nexport default isObject;\n", "import curry from '../utils/curry.js';\nimport isObject from '../utils/isObject.js';\n\n/**\n * validates the configuration object and informs about deprecation\n * @param {Object} config - the configuration object \n * @return {Object} config - the validated configuration object\n */\n\nfunction validateConfig(config) {\n if (!config) errorHandler('configIsRequired');\n if (!isObject(config)) errorHandler('configType');\n\n if (config.urls) {\n informAboutDeprecation();\n return {\n paths: {\n vs: config.urls.monacoBase\n }\n };\n }\n\n return config;\n}\n/**\n * logs deprecation message\n */\n\n\nfunction informAboutDeprecation() {\n console.warn(errorMessages.deprecation);\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n configIsRequired: 'the configuration object is required',\n configType: 'the configuration object should be an object',\n \"default\": 'an unknown error accured in `@monaco-editor/loader` package',\n deprecation: \"Deprecation warning!\\n You are using deprecated way of configuration.\\n\\n Instead of using\\n monaco.config({ urls: { monacoBase: '...' } })\\n use\\n monaco.config({ paths: { vs: '...' } })\\n\\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\\n \"\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n config: validateConfig\n};\n\nexport default validators;\nexport { errorHandler, errorMessages };\n", "var compose = function compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n};\n\nexport default compose;\n", "import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction merge(target, source) {\n Object.keys(source).forEach(function (key) {\n if (source[key] instanceof Object) {\n if (target[key]) {\n Object.assign(source[key], merge(target[key], source[key]));\n }\n }\n });\n return _objectSpread2(_objectSpread2({}, target), source);\n}\n\nexport default merge;\n", "// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325\nvar CANCELATION_MESSAGE = {\n type: 'cancelation',\n msg: 'operation is manually canceled'\n};\n\nfunction makeCancelable(promise) {\n var hasCanceled_ = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);\n });\n promise[\"catch\"](reject);\n });\n return wrappedPromise.cancel = function () {\n return hasCanceled_ = true;\n }, wrappedPromise;\n}\n\nexport default makeCancelable;\nexport { CANCELATION_MESSAGE };\n", "import { slicedToArray as _slicedToArray, objectWithoutProperties as _objectWithoutProperties } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport state from 'state-local';\nimport config$1 from '../config/index.js';\nimport validators from '../validators/index.js';\nimport compose from '../utils/compose.js';\nimport merge from '../utils/deepMerge.js';\nimport makeCancelable from '../utils/makeCancelable.js';\n\n/** the local state of the module */\n\nvar _state$create = state.create({\n config: config$1,\n isInitialized: false,\n resolve: null,\n reject: null,\n monaco: null\n}),\n _state$create2 = _slicedToArray(_state$create, 2),\n getState = _state$create2[0],\n setState = _state$create2[1];\n/**\n * set the loader configuration\n * @param {Object} config - the configuration object\n */\n\n\nfunction config(globalConfig) {\n var _validators$config = validators.config(globalConfig),\n monaco = _validators$config.monaco,\n config = _objectWithoutProperties(_validators$config, [\"monaco\"]);\n\n setState(function (state) {\n return {\n config: merge(state.config, config),\n monaco: monaco\n };\n });\n}\n/**\n * handles the initialization of the monaco-editor\n * @return {Promise} - returns an instance of monaco (with a cancelable promise)\n */\n\n\nfunction init() {\n var state = getState(function (_ref) {\n var monaco = _ref.monaco,\n isInitialized = _ref.isInitialized,\n resolve = _ref.resolve;\n return {\n monaco: monaco,\n isInitialized: isInitialized,\n resolve: resolve\n };\n });\n\n if (!state.isInitialized) {\n setState({\n isInitialized: true\n });\n\n if (state.monaco) {\n state.resolve(state.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n if (window.monaco && window.monaco.editor) {\n storeMonacoInstance(window.monaco);\n state.resolve(window.monaco);\n return makeCancelable(wrapperPromise);\n }\n\n compose(injectScripts, getMonacoLoaderScript)(configureLoader);\n }\n\n return makeCancelable(wrapperPromise);\n}\n/**\n * injects provided scripts into the document.body\n * @param {Object} script - an HTML script element\n * @return {Object} - the injected HTML script element\n */\n\n\nfunction injectScripts(script) {\n return document.body.appendChild(script);\n}\n/**\n * creates an HTML script element with/without provided src\n * @param {string} [src] - the source path of the script\n * @return {Object} - the created HTML script element\n */\n\n\nfunction createScript(src) {\n var script = document.createElement('script');\n return src && (script.src = src), script;\n}\n/**\n * creates an HTML script element with the monaco loader src\n * @return {Object} - the created HTML script element\n */\n\n\nfunction getMonacoLoaderScript(configureLoader) {\n var state = getState(function (_ref2) {\n var config = _ref2.config,\n reject = _ref2.reject;\n return {\n config: config,\n reject: reject\n };\n });\n var loaderScript = createScript(\"\".concat(state.config.paths.vs, \"/loader.js\"));\n\n loaderScript.onload = function () {\n return configureLoader();\n };\n\n loaderScript.onerror = state.reject;\n return loaderScript;\n}\n/**\n * configures the monaco loader\n */\n\n\nfunction configureLoader() {\n var state = getState(function (_ref3) {\n var config = _ref3.config,\n resolve = _ref3.resolve,\n reject = _ref3.reject;\n return {\n config: config,\n resolve: resolve,\n reject: reject\n };\n });\n var require = window.require;\n\n require.config(state.config);\n\n require(['vs/editor/editor.main'], function (monaco) {\n storeMonacoInstance(monaco);\n state.resolve(monaco);\n }, function (error) {\n state.reject(error);\n });\n}\n/**\n * store monaco instance in local state\n */\n\n\nfunction storeMonacoInstance(monaco) {\n if (!getState().monaco) {\n setState({\n monaco: monaco\n });\n }\n}\n/**\n * internal helper function\n * extracts stored monaco instance\n * @return {Object|null} - the monaco instance\n */\n\n\nfunction __getMonacoInstance() {\n return getState(function (_ref4) {\n var monaco = _ref4.monaco;\n return monaco;\n });\n}\n\nvar wrapperPromise = new Promise(function (resolve, reject) {\n return setState({\n resolve: resolve,\n reject: reject\n });\n});\nvar loader = {\n config: config,\n init: init,\n __getMonacoInstance: __getMonacoInstance\n};\n\nexport default loader;\n", "// Copied and modified from the original work available at https://github.com/livebook-dev/livebook/blob/23e58ac604de92ce54472f36fe3e28dc27576d6c/assets/js/hooks/cell_editor/live_editor/theme.js\n// Copyright (C) 2021 Dashbit\n// Licensed under Apache 2.0 available at https://www.apache.org/licenses/LICENSE-2.0\n\n// This is a port of the One Dark theme to the Monaco editor.\n// We color graded the comment so it has AA accessibility and\n// then similarly scaled the default font.\nconst colors = {\n background: \"#282c34\",\n default: \"#c4cad6\",\n lightRed: \"#e06c75\",\n blue: \"#61afef\",\n gray: \"#8c92a3\",\n green: \"#98c379\",\n purple: \"#c678dd\",\n red: \"#be5046\",\n teal: \"#56b6c2\",\n peach: \"#d19a66\",\n}\n\nconst rules = (colors) => [\n { token: \"\", foreground: colors.default },\n { token: \"variable\", foreground: colors.lightRed },\n { token: \"constant\", foreground: colors.blue },\n { token: \"constant.character.escape\", foreground: colors.blue },\n { token: \"comment\", foreground: colors.gray },\n { token: \"number\", foreground: colors.blue },\n { token: \"regexp\", foreground: colors.lightRed },\n { token: \"type\", foreground: colors.lightRed },\n { token: \"string\", foreground: colors.green },\n { token: \"keyword\", foreground: colors.purple },\n { token: \"operator\", foreground: colors.peach },\n { token: \"delimiter.bracket.embed\", foreground: colors.red },\n { token: \"sigil\", foreground: colors.teal },\n { token: \"function\", foreground: colors.blue },\n { token: \"function.call\", foreground: colors.default },\n\n // Markdown specific\n { token: \"emphasis\", fontStyle: \"italic\" },\n { token: \"strong\", fontStyle: \"bold\" },\n { token: \"keyword.md\", foreground: colors.lightRed },\n { token: \"keyword.table\", foreground: colors.lightRed },\n { token: \"string.link.md\", foreground: colors.blue },\n { token: \"variable.md\", foreground: colors.teal },\n { token: \"string.md\", foreground: colors.default },\n { token: \"variable.source.md\", foreground: colors.default },\n\n // XML specific\n { token: \"tag\", foreground: colors.lightRed },\n { token: \"metatag\", foreground: colors.lightRed },\n { token: \"attribute.name\", foreground: colors.peach },\n { token: \"attribute.value\", foreground: colors.green },\n\n // JSON specific\n { token: \"string.key\", foreground: colors.lightRed },\n { token: \"keyword.json\", foreground: colors.blue },\n\n // SQL specific\n { token: \"operator.sql\", foreground: colors.purple },\n]\n\nconst theme = {\n base: \"vs-dark\",\n inherit: false,\n rules: rules(colors),\n colors: {\n \"editor.background\": colors.background,\n \"editor.foreground\": colors.default,\n \"editorLineNumber.foreground\": \"#636d83\",\n \"editorCursor.foreground\": \"#636d83\",\n \"editor.selectionBackground\": \"#3e4451\",\n \"editor.findMatchHighlightBackground\": \"#528bff3d\",\n \"editorSuggestWidget.background\": \"#21252b\",\n \"editorSuggestWidget.border\": \"#181a1f\",\n \"editorSuggestWidget.selectedBackground\": \"#2c313a\",\n \"input.background\": \"#1b1d23\",\n \"input.border\": \"#181a1f\",\n \"editorBracketMatch.border\": \"#282c34\",\n \"editorBracketMatch.background\": \"#3e4451\",\n },\n}\n\nexport { theme }\n", "// Copied and modified from the original work available at https://github.com/livebook-dev/livebook/blob/8532bc334bdcf3c57fab9b694666e609877d279f/assets/js/hooks/cell_editor/live_editor.js\n// Copyright (C) 2021 Dashbit\n// Licensed under Apache 2.0 available at https://www.apache.org/licenses/LICENSE-2.0\n\nimport loader from \"@monaco-editor/loader\"\nimport { theme } from \"./themes\"\n\nclass CodeEditor {\n constructor(el, path, value, opts) {\n this.el = el\n this.path = path\n this.value = value\n this.opts = opts\n // https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IStandaloneCodeEditor.html\n this.standalone_code_editor = null\n this._onMount = []\n }\n\n isMounted() {\n return !!this.standalone_code_editor\n }\n\n mount() {\n if (this.isMounted()) {\n throw new Error(\"The monaco editor is already mounted\")\n }\n\n this._mountEditor()\n }\n\n onMount(callback) {\n this._onMount.push(callback)\n }\n\n dispose() {\n if (this.isMounted()) {\n const model = this.standalone_code_editor.getModel()\n\n if (model) {\n model.dispose()\n }\n\n this.standalone_code_editor.dispose()\n }\n }\n\n _mountEditor() {\n this.opts.value = this.value\n\n loader.config({\n paths: { vs: \"https://cdn.jsdelivr.net/npm/monaco-editor@0.45.0/min/vs\" },\n })\n\n loader.init().then((monaco) => {\n monaco.editor.defineTheme(\"default\", theme)\n\n let modelUri = monaco.Uri.parse(this.path)\n let language = this.opts.language\n let model = monaco.editor.createModel(this.value, language, modelUri)\n\n this.opts.language = undefined\n this.opts.model = model\n this.standalone_code_editor = monaco.editor.create(this.el, this.opts)\n\n this._onMount.forEach((callback) => callback(monaco))\n\n this._setScreenDependantEditorOptions()\n\n this.standalone_code_editor.addAction({\n contextMenuGroupId: \"word-wrapping\",\n id: \"enable-word-wrapping\",\n label: \"Enable word wrapping\",\n precondition: \"config.editor.wordWrap == off\",\n keybindings: [monaco.KeyMod.Alt | monaco.KeyCode.KeyZ],\n run: (editor) => editor.updateOptions({ wordWrap: \"on\" }),\n })\n\n this.standalone_code_editor.addAction({\n contextMenuGroupId: \"word-wrapping\",\n id: \"disable-word-wrapping\",\n label: \"Disable word wrapping\",\n precondition: \"config.editor.wordWrap == on\",\n keybindings: [monaco.KeyMod.Alt | monaco.KeyCode.KeyZ],\n run: (editor) => editor.updateOptions({ wordWrap: \"off\" }),\n })\n\n const resizeObserver = new ResizeObserver((entries) => {\n entries.forEach(() => {\n if (this.el.offsetHeight > 0) {\n this._setScreenDependantEditorOptions()\n this.standalone_code_editor.layout()\n }\n })\n })\n\n resizeObserver.observe(this.el)\n\n this.standalone_code_editor.onDidContentSizeChange(() => {\n const contentHeight = this.standalone_code_editor.getContentHeight()\n this.el.style.height = `${contentHeight}px`\n })\n })\n }\n\n _setScreenDependantEditorOptions() {\n if (window.screen.width < 768) {\n this.standalone_code_editor.updateOptions({\n folding: false,\n lineDecorationsWidth: 16,\n lineNumbersMinChars:\n Math.floor(\n Math.log10(this.standalone_code_editor.getModel().getLineCount())\n ) + 3,\n })\n } else {\n this.standalone_code_editor.updateOptions({\n folding: true,\n lineDecorationsWidth: 10,\n lineNumbersMinChars: 5,\n })\n }\n }\n}\n\nexport default CodeEditor\n", "import CodeEditor from \"../editor/code_editor\"\n\nconst CodeEditorHook = {\n mounted() {\n // TODO: validate dataset\n const opts = JSON.parse(this.el.dataset.opts)\n\n this.codeEditor = new CodeEditor(\n this.el,\n this.el.dataset.path,\n this.el.dataset.value,\n opts\n )\n\n this.codeEditor.onMount((monaco) => {\n if (this.el.dataset.changeEvent && this.el.dataset.changeEvent !== \"\") {\n this.codeEditor.standalone_code_editor.onDidChangeModelContent(() => {\n if (this.el.dataset.target && this.el.dataset.target !== \"\") {\n this.pushEventTo(\n this.el.dataset.target,\n this.el.dataset.changeEvent,\n {\n value: this.codeEditor.standalone_code_editor.getValue(),\n }\n )\n } else {\n this.pushEvent(this.el.dataset.changeEvent, {\n value: this.codeEditor.standalone_code_editor.getValue(),\n })\n }\n })\n }\n\n this.handleEvent(\n \"lme:change_language:\" + this.el.dataset.path,\n (data) => {\n const model = this.codeEditor.standalone_code_editor.getModel()\n\n if (model.getLanguageId() !== data.mimeTypeOrLanguageId) {\n monaco.editor.setModelLanguage(model, data.mimeTypeOrLanguageId)\n }\n }\n )\n\n this.handleEvent(\"lme:set_value:\" + this.el.dataset.path, (data) => {\n this.codeEditor.standalone_code_editor.setValue(data.value)\n })\n\n this.el.querySelectorAll(\"textarea\").forEach((textarea) => {\n textarea.setAttribute(\n \"name\",\n \"live_monaco_editor[\" + this.el.dataset.path + \"]\"\n )\n })\n\n this.el.removeAttribute(\"data-value\")\n this.el.removeAttribute(\"data-opts\")\n\n this.el.dispatchEvent(\n new CustomEvent(\"lme:editor_mounted\", {\n detail: { hook: this, editor: this.codeEditor },\n bubbles: true,\n })\n )\n })\n\n if (!this.codeEditor.isMounted()) {\n this.codeEditor.mount()\n }\n },\n\n destroyed() {\n if (this.codeEditor) {\n this.codeEditor.dispose()\n }\n },\n}\n\nexport { CodeEditorHook }\n", "export function normalizeComponents(components) {\n if (!Array.isArray(components.default) || !Array.isArray(components.filenames)) return components\n\n const normalized = {}\n for (const [index, module] of components.default.entries()) {\n const Component = module.default\n const name = components.filenames[index].replace(\"../svelte/\", \"\").replace(\".svelte\", \"\")\n normalized[name] = Component\n }\n return normalized\n}\n", "import {normalizeComponents} from \"./utils\"\n\nexport function getRender(components) {\n components = normalizeComponents(components)\n\n return function render(name, props, slots) {\n const Component = components[name]\n const $$slots = Object.fromEntries(Object.entries(slots).map(([k, v]) => [k, () => v]))\n return Component.render(props, {$$slots})\n }\n}\n", "import {normalizeComponents} from \"./utils\"\n\nfunction getAttributeJson(ref, attributeName) {\n const data = ref.el.getAttribute(attributeName)\n return data ? JSON.parse(data) : {}\n}\n\nfunction detach(node) {\n node.parentNode?.removeChild(node)\n}\n\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null)\n}\n\nfunction noop() {}\n\nfunction getSlots(ref) {\n const slots = {}\n\n for (const slotName in getAttributeJson(ref, \"data-slots\")) {\n const slot = () => {\n return {\n getElement() {\n const base64 = getAttributeJson(ref, \"data-slots\")[slotName]\n const element = document.createElement(\"div\")\n element.innerHTML = atob(base64).trim()\n return element\n },\n update() {\n detach(this.savedElement)\n this.savedElement = this.getElement()\n insert(this.savedTarget, this.savedElement, this.savedAnchor)\n },\n c: noop,\n m(target, anchor) {\n this.savedTarget = target\n this.savedAnchor = anchor\n this.savedElement = this.getElement()\n insert(this.savedTarget, this.savedElement, this.savedAnchor)\n },\n d(detaching) {\n if (detaching) detach(this.savedElement)\n },\n l: noop,\n }\n }\n\n slots[slotName] = [slot]\n }\n\n return slots\n}\n\nfunction getLiveJsonProps(ref) {\n const json = getAttributeJson(ref, \"data-live-json\")\n\n // On SSR, data-live-json is the full object we want\n // After SSR, data-live-json is an array of keys, and we'll get the data from the window\n if (!Array.isArray(json)) return json\n\n const liveJsonData = {}\n for (const liveJsonVariable of json) {\n const data = window[liveJsonVariable]\n if (data) liveJsonData[liveJsonVariable] = data\n }\n return liveJsonData\n}\n\nfunction getProps(ref) {\n return {\n ...getAttributeJson(ref, \"data-props\"),\n ...getLiveJsonProps(ref),\n live: ref,\n $$slots: getSlots(ref),\n $$scope: {},\n }\n}\n\nfunction findSlotCtx(component) {\n // The default slot always exists if there's a slot set\n // even if no slot is set for the explicit default slot\n return component.$$.ctx.find(ctxElement => ctxElement?.default)\n}\n\nexport function getHooks(components) {\n components = normalizeComponents(components)\n\n const SvelteHook = {\n mounted() {\n const componentName = this.el.getAttribute(\"data-name\")\n if (!componentName) {\n throw new Error(\"Component name must be provided\")\n }\n\n const Component = components[componentName]\n if (!Component) {\n throw new Error(`Unable to find ${componentName} component.`)\n }\n\n for (const liveJsonElement of Object.keys(getAttributeJson(this, \"data-live-json\"))) {\n window.addEventListener(`${liveJsonElement}_initialized`, event => this._instance.$set(getProps(this)), false)\n window.addEventListener(`${liveJsonElement}_patched`, event => this._instance.$set(getProps(this)), false)\n }\n\n this._instance = new Component({\n target: this.el,\n props: getProps(this),\n hydrate: this.el.hasAttribute(\"data-ssr\"),\n })\n },\n\n updated() {\n // Set the props\n this._instance.$set(getProps(this))\n\n // Set the slots\n const slotCtx = findSlotCtx(this._instance)\n for (const key in slotCtx) {\n slotCtx[key][0]().update()\n }\n },\n\n destroyed() {\n // We don't want to destroy the component\n // If we do a page navigation, this would remove the component in the DOM,\n // and then it would to the transition, causing a flicker of unrendered content\n // Since we're doing a page transition anyway, the component will be remove automatically\n },\n }\n\n return {\n SvelteHook,\n }\n}\n", "\n import * as module0 from '../svelte/components/Backdrop.svelte';import * as module1 from '../svelte/components/BrowserFrame.svelte';import * as module2 from '../svelte/components/CodeEditor.svelte';import * as module3 from '../svelte/components/ComponentsSidebar.svelte';import * as module4 from '../svelte/components/LayoutAstNode.svelte';import * as module5 from '../svelte/components/PageAstNode.svelte';import * as module6 from '../svelte/components/PagePreview.svelte';import * as module7 from '../svelte/components/PageWrapper.svelte';import * as module8 from '../svelte/components/Pill.svelte';import * as module9 from '../svelte/components/PropertiesSidebar.svelte';import * as module10 from '../svelte/components/SidebarSection.svelte';import * as module11 from '../svelte/components/UiBuilder.svelte'\n\n const modules = [module0,module1,module2,module3,module4,module5,module6,module7,module8,module9,module10,module11];\n\n export default modules;\n export const filenames = ['../svelte/components/Backdrop.svelte','../svelte/components/BrowserFrame.svelte','../svelte/components/CodeEditor.svelte','../svelte/components/ComponentsSidebar.svelte','../svelte/components/LayoutAstNode.svelte','../svelte/components/PageAstNode.svelte','../svelte/components/PagePreview.svelte','../svelte/components/PageWrapper.svelte','../svelte/components/Pill.svelte','../svelte/components/PropertiesSidebar.svelte','../svelte/components/SidebarSection.svelte','../svelte/components/UiBuilder.svelte']\n ", "/** @returns {void} */\nexport function noop() {}\n\nexport const identity = (x) => x;\n\n/**\n * @template T\n * @template S\n * @param {T} tar\n * @param {S} src\n * @returns {T & S}\n */\nexport function assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn /** @type {T & S} */ (tar);\n}\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n/**\n * @param {any} value\n * @returns {value is PromiseLike}\n */\nexport function is_promise(value) {\n\treturn (\n\t\t!!value &&\n\t\t(typeof value === 'object' || typeof value === 'function') &&\n\t\ttypeof (/** @type {any} */ (value).then) === 'function'\n\t);\n}\n\n/** @returns {void} */\nexport function add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nexport function run(fn) {\n\treturn fn();\n}\n\nexport function blank_object() {\n\treturn Object.create(null);\n}\n\n/**\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function run_all(fns) {\n\tfns.forEach(run);\n}\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\n/** @returns {boolean} */\nexport function safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';\n}\n\nlet src_url_equal_anchor;\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nexport function src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\tif (!src_url_equal_anchor) {\n\t\tsrc_url_equal_anchor = document.createElement('a');\n\t}\n\t// This is actually faster than doing URL(..).href\n\tsrc_url_equal_anchor.href = url;\n\treturn element_src === src_url_equal_anchor.href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element_srcset\n * @param {string | undefined | null} srcset\n * @returns {boolean}\n */\nexport function srcset_url_equal(element_srcset, srcset) {\n\tconst element_urls = split_srcset(element_srcset.srcset);\n\tconst urls = split_srcset(srcset || '');\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n\n/** @returns {boolean} */\nexport function not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\n/** @returns {boolean} */\nexport function is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\n/** @returns {void} */\nexport function validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nexport function subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\tfor (const callback of callbacks) {\n\t\t\tcallback(undefined);\n\t\t}\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\n/**\n * Get the current value from a store by subscribing and immediately unsubscribing.\n *\n * https://svelte.dev/docs/svelte-store#get\n * @template T\n * @param {import('../store/public.js').Readable} store\n * @returns {T}\n */\nexport function get_store_value(store) {\n\tlet value;\n\tsubscribe(store, (_) => (value = _))();\n\treturn value;\n}\n\n/** @returns {void} */\nexport function component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nexport function create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\treturn definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx;\n}\n\nexport function get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\t\t\treturn merged;\n\t\t}\n\t\treturn $$scope.dirty | lets;\n\t}\n\treturn $$scope.dirty;\n}\n\n/** @returns {void} */\nexport function update_slot_base(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tslot_changes,\n\tget_slot_context_fn\n) {\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\n/** @returns {void} */\nexport function update_slot(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tdirty,\n\tget_slot_changes_fn,\n\tget_slot_context_fn\n) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tupdate_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\n\n/** @returns {any[] | -1} */\nexport function get_all_dirty_from_scope($$scope) {\n\tif ($$scope.ctx.length > 32) {\n\t\tconst dirty = [];\n\t\tconst length = $$scope.ctx.length / 32;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tdirty[i] = -1;\n\t\t}\n\t\treturn dirty;\n\t}\n\treturn -1;\n}\n\n/** @returns {{}} */\nexport function exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\n/** @returns {{}} */\nexport function compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\n/** @returns {{}} */\nexport function compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\n/** @returns {(this: any, ...args: any[]) => void} */\nexport function once(fn) {\n\tlet ran = false;\n\treturn function (...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nexport function null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nexport function set_store_value(store, ret, value) {\n\tstore.set(value);\n\treturn ret;\n}\n\nexport const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nexport function action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\n/** @param {number | string} value\n * @returns {[number, string]}\n */\nexport function split_css_unit(value) {\n\tconst split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n\treturn split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];\n}\n\nexport const contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n", "import { noop } from './utils.js';\n\nexport const is_client = typeof window !== 'undefined';\n\n/** @type {() => number} */\nexport let now = is_client ? () => window.performance.now() : () => Date.now();\n\nexport let raf = is_client ? (cb) => requestAnimationFrame(cb) : noop;\n\n// used internally for testing\n/** @returns {void} */\nexport function set_now(fn) {\n\tnow = fn;\n}\n\n/** @returns {void} */\nexport function set_raf(fn) {\n\traf = fn;\n}\n", "import { raf } from './environment.js';\n\nconst tasks = new Set();\n\n/**\n * @param {number} now\n * @returns {void}\n */\nfunction run_tasks(now) {\n\ttasks.forEach((task) => {\n\t\tif (!task.c(now)) {\n\t\t\ttasks.delete(task);\n\t\t\ttask.f();\n\t\t}\n\t});\n\tif (tasks.size !== 0) raf(run_tasks);\n}\n\n/**\n * For testing purposes only!\n * @returns {void}\n */\nexport function clear_loops() {\n\ttasks.clear();\n}\n\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n * @param {import('./private.js').TaskCallback} callback\n * @returns {import('./private.js').Task}\n */\nexport function loop(callback) {\n\t/** @type {import('./private.js').TaskEntry} */\n\tlet task;\n\tif (tasks.size === 0) raf(run_tasks);\n\treturn {\n\t\tpromise: new Promise((fulfill) => {\n\t\t\ttasks.add((task = { c: callback, f: fulfill }));\n\t\t}),\n\t\tabort() {\n\t\t\ttasks.delete(task);\n\t\t}\n\t};\n}\n", "/** @type {typeof globalThis} */\nexport const globals =\n\ttypeof window !== 'undefined'\n\t\t? window\n\t\t: typeof globalThis !== 'undefined'\n\t\t? globalThis\n\t\t: // @ts-ignore Node typings have this\n\t\t global;\n", "import { globals } from './globals.js';\n\n/**\n * Resize observer singleton.\n * One listener per element only!\n * https://groups.google.com/a/chromium.org/g/blink-dev/c/z6ienONUb5A/m/F5-VcUZtBAAJ\n */\nexport class ResizeObserverSingleton {\n\t/**\n\t * @private\n\t * @readonly\n\t * @type {WeakMap}\n\t */\n\t_listeners = 'WeakMap' in globals ? new WeakMap() : undefined;\n\n\t/**\n\t * @private\n\t * @type {ResizeObserver}\n\t */\n\t_observer = undefined;\n\n\t/** @type {ResizeObserverOptions} */\n\toptions;\n\n\t/** @param {ResizeObserverOptions} options */\n\tconstructor(options) {\n\t\tthis.options = options;\n\t}\n\n\t/**\n\t * @param {Element} element\n\t * @param {import('./private.js').Listener} listener\n\t * @returns {() => void}\n\t */\n\tobserve(element, listener) {\n\t\tthis._listeners.set(element, listener);\n\t\tthis._getObserver().observe(element, this.options);\n\t\treturn () => {\n\t\t\tthis._listeners.delete(element);\n\t\t\tthis._observer.unobserve(element); // this line can probably be removed\n\t\t};\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_getObserver() {\n\t\treturn (\n\t\t\tthis._observer ??\n\t\t\t(this._observer = new ResizeObserver((entries) => {\n\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\tResizeObserverSingleton.entries.set(entry.target, entry);\n\t\t\t\t\tthis._listeners.get(entry.target)?.(entry);\n\t\t\t\t}\n\t\t\t}))\n\t\t);\n\t}\n}\n\n// Needs to be written like this to pass the tree-shake-test\nResizeObserverSingleton.entries = 'WeakMap' in globals ? new WeakMap() : undefined;\n", "import { contenteditable_truthy_values, has_prop } from './utils.js';\n\nimport { ResizeObserverSingleton } from './ResizeObserverSingleton.js';\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\n\n/**\n * @returns {void}\n */\nexport function start_hydrating() {\n\tis_hydrating = true;\n}\n\n/**\n * @returns {void}\n */\nexport function end_hydrating() {\n\tis_hydrating = false;\n}\n\n/**\n * @param {number} low\n * @param {number} high\n * @param {(index: number) => number} key\n * @param {number} value\n * @returns {number}\n */\nfunction upper_bound(low, high, key, value) {\n\t// Return first index of value larger than input value in the range [low, high)\n\twhile (low < high) {\n\t\tconst mid = low + ((high - low) >> 1);\n\t\tif (key(mid) <= value) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\thigh = mid;\n\t\t}\n\t}\n\treturn low;\n}\n\n/**\n * @param {NodeEx} target\n * @returns {void}\n */\nfunction init_hydrate(target) {\n\tif (target.hydrate_init) return;\n\ttarget.hydrate_init = true;\n\t// We know that all children have claim_order values since the unclaimed have been detached if target is not \n\n\tlet children = /** @type {ArrayLike} */ (target.childNodes);\n\t// If target is , there may be children without claim_order\n\tif (target.nodeName === 'HEAD') {\n\t\tconst my_children = [];\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst node = children[i];\n\t\t\tif (node.claim_order !== undefined) {\n\t\t\t\tmy_children.push(node);\n\t\t\t}\n\t\t}\n\t\tchildren = my_children;\n\t}\n\t/*\n\t * Reorder claimed children optimally.\n\t * We can reorder claimed children optimally by finding the longest subsequence of\n\t * nodes that are already claimed in order and only moving the rest. The longest\n\t * subsequence of nodes that are claimed in order can be found by\n\t * computing the longest increasing subsequence of .claim_order values.\n\t *\n\t * This algorithm is optimal in generating the least amount of reorder operations\n\t * possible.\n\t *\n\t * Proof:\n\t * We know that, given a set of reordering operations, the nodes that do not move\n\t * always form an increasing subsequence, since they do not move among each other\n\t * meaning that they must be already ordered among each other. Thus, the maximal\n\t * set of nodes that do not move form a longest increasing subsequence.\n\t */\n\t// Compute longest increasing subsequence\n\t// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n\tconst m = new Int32Array(children.length + 1);\n\t// Predecessor indices + 1\n\tconst p = new Int32Array(children.length);\n\tm[0] = -1;\n\tlet longest = 0;\n\tfor (let i = 0; i < children.length; i++) {\n\t\tconst current = children[i].claim_order;\n\t\t// Find the largest subsequence length such that it ends in a value less than our current value\n\t\t// upper_bound returns first greater value, so we subtract one\n\t\t// with fast path for when we are on the current longest subsequence\n\t\tconst seq_len =\n\t\t\t(longest > 0 && children[m[longest]].claim_order <= current\n\t\t\t\t? longest + 1\n\t\t\t\t: upper_bound(1, longest, (idx) => children[m[idx]].claim_order, current)) - 1;\n\t\tp[i] = m[seq_len] + 1;\n\t\tconst new_len = seq_len + 1;\n\t\t// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n\t\tm[new_len] = i;\n\t\tlongest = Math.max(new_len, longest);\n\t}\n\t// The longest increasing subsequence of nodes (initially reversed)\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst lis = [];\n\t// The rest of the nodes, nodes that will be moved\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst to_move = [];\n\tlet last = children.length - 1;\n\tfor (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n\t\tlis.push(children[cur - 1]);\n\t\tfor (; last >= cur; last--) {\n\t\t\tto_move.push(children[last]);\n\t\t}\n\t\tlast--;\n\t}\n\tfor (; last >= 0; last--) {\n\t\tto_move.push(children[last]);\n\t}\n\tlis.reverse();\n\t// We sort the nodes being moved to guarantee that their insertion order matches the claim order\n\tto_move.sort((a, b) => a.claim_order - b.claim_order);\n\t// Finally, we move the nodes\n\tfor (let i = 0, j = 0; i < to_move.length; i++) {\n\t\twhile (j < lis.length && to_move[i].claim_order >= lis[j].claim_order) {\n\t\t\tj++;\n\t\t}\n\t\tconst anchor = j < lis.length ? lis[j] : null;\n\t\ttarget.insertBefore(to_move[i], anchor);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @returns {void}\n */\nexport function append(target, node) {\n\ttarget.appendChild(node);\n}\n\n/**\n * @param {Node} target\n * @param {string} style_sheet_id\n * @param {string} styles\n * @returns {void}\n */\nexport function append_styles(target, style_sheet_id, styles) {\n\tconst append_styles_to = get_root_for_style(target);\n\tif (!append_styles_to.getElementById(style_sheet_id)) {\n\t\tconst style = element('style');\n\t\tstyle.id = style_sheet_id;\n\t\tstyle.textContent = styles;\n\t\tappend_stylesheet(append_styles_to, style);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {ShadowRoot | Document}\n */\nexport function get_root_for_style(node) {\n\tif (!node) return document;\n\tconst root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n\tif (root && /** @type {ShadowRoot} */ (root).host) {\n\t\treturn /** @type {ShadowRoot} */ (root);\n\t}\n\treturn node.ownerDocument;\n}\n\n/**\n * @param {Node} node\n * @returns {CSSStyleSheet}\n */\nexport function append_empty_stylesheet(node) {\n\tconst style_element = element('style');\n\t// For transitions to work without 'style-src: unsafe-inline' Content Security Policy,\n\t// these empty tags need to be allowed with a hash as a workaround until we move to the Web Animations API.\n\t// Using the hash for the empty string (for an empty tag) works in all browsers except Safari.\n\t// So as a workaround for the workaround, when we append empty style tags we set their content to /* empty */.\n\t// The hash 'sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=' will then work even in Safari.\n\tstyle_element.textContent = '/* empty */';\n\tappend_stylesheet(get_root_for_style(node), style_element);\n\treturn style_element.sheet;\n}\n\n/**\n * @param {ShadowRoot | Document} node\n * @param {HTMLStyleElement} style\n * @returns {CSSStyleSheet}\n */\nfunction append_stylesheet(node, style) {\n\tappend(/** @type {Document} */ (node).head || node, style);\n\treturn style.sheet;\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @returns {void}\n */\nexport function append_hydration(target, node) {\n\tif (is_hydrating) {\n\t\tinit_hydrate(target);\n\t\tif (\n\t\t\ttarget.actual_end_child === undefined ||\n\t\t\t(target.actual_end_child !== null && target.actual_end_child.parentNode !== target)\n\t\t) {\n\t\t\ttarget.actual_end_child = target.firstChild;\n\t\t}\n\t\t// Skip nodes of undefined ordering\n\t\twhile (target.actual_end_child !== null && target.actual_end_child.claim_order === undefined) {\n\t\t\ttarget.actual_end_child = target.actual_end_child.nextSibling;\n\t\t}\n\t\tif (node !== target.actual_end_child) {\n\t\t\t// We only insert if the ordering of this node should be modified or the parent node is not target\n\t\t\tif (node.claim_order !== undefined || node.parentNode !== target) {\n\t\t\t\ttarget.insertBefore(node, target.actual_end_child);\n\t\t\t}\n\t\t} else {\n\t\t\ttarget.actual_end_child = node.nextSibling;\n\t\t}\n\t} else if (node.parentNode !== target || node.nextSibling !== null) {\n\t\ttarget.appendChild(node);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @param {Node} [anchor]\n * @returns {void}\n */\nexport function insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @param {NodeEx} [anchor]\n * @returns {void}\n */\nexport function insert_hydration(target, node, anchor) {\n\tif (is_hydrating && !anchor) {\n\t\tappend_hydration(target, node);\n\t} else if (node.parentNode !== target || node.nextSibling != anchor) {\n\t\ttarget.insertBefore(node, anchor || null);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {void}\n */\nexport function detach(node) {\n\tif (node.parentNode) {\n\t\tnode.parentNode.removeChild(node);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element(name) {\n\treturn document.createElement(name);\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @param {string} is\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\n/**\n * @template T\n * @template {keyof T} K\n * @param {T} obj\n * @param {K[]} exclude\n * @returns {Pick>}\n */\nexport function object_without_properties(obj, exclude) {\n\tconst target = /** @type {Pick>} */ ({});\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k) &&\n\t\t\t// @ts-ignore\n\t\t\texclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\n/**\n * @template {keyof SVGElementTagNameMap} K\n * @param {K} name\n * @returns {SVGElement}\n */\nexport function svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n/**\n * @param {string} data\n * @returns {Text}\n */\nexport function text(data) {\n\treturn document.createTextNode(data);\n}\n\n/**\n * @returns {Text} */\nexport function space() {\n\treturn text(' ');\n}\n\n/**\n * @returns {Text} */\nexport function empty() {\n\treturn text('');\n}\n\n/**\n * @param {string} content\n * @returns {Comment}\n */\nexport function comment(content) {\n\treturn document.createComment(content);\n}\n\n/**\n * @param {EventTarget} node\n * @param {string} event\n * @param {EventListenerOrEventListenerObject} handler\n * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options]\n * @returns {() => void}\n */\nexport function listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function prevent_default(fn) {\n\treturn function (event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_immediate_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopImmediatePropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function self(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function trusted(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.isTrusted) fn.call(this, event);\n\t};\n}\n\n/**\n * @param {Element} node\n * @param {string} attribute\n * @param {string} [value]\n * @returns {void}\n */\nexport function attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t/** @type {any} */ (node).value = node[key] = attributes[key];\n\t\t} else if (\n\t\t\tdescriptors[key] &&\n\t\t\tdescriptors[key].set &&\n\t\t\talways_set_through_set_attribute.indexOf(key) === -1\n\t\t) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\n/**\n * @param {Record} data_map\n * @returns {void}\n */\nexport function set_custom_element_data_map(node, data_map) {\n\tObject.keys(data_map).forEach((key) => {\n\t\tset_custom_element_data(node, key, data_map[key]);\n\t});\n}\n\n/**\n * @returns {void} */\nexport function set_custom_element_data(node, prop, value) {\n\tconst lower = prop.toLowerCase(); // for backwards compatibility with existing behavior we do lowercase first\n\tif (lower in node) {\n\t\tnode[lower] = typeof node[lower] === 'boolean' && value === '' ? true : value;\n\t} else if (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\n/**\n * @param {string} tag\n */\nexport function set_dynamic_element_data(tag) {\n\treturn /-/.test(tag) ? set_custom_element_data_map : set_attributes;\n}\n\n/**\n * @returns {void}\n */\nexport function xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @returns {string}\n */\nexport function get_svelte_dataset(node) {\n\treturn node.dataset.svelteH;\n}\n\n/**\n * @returns {unknown[]} */\nexport function get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement[]} group\n * @returns {{ p(...inputs: HTMLInputElement[]): void; r(): void; }}\n */\nexport function init_binding_group(group) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\treturn {\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\t_inputs.forEach((input) => group.push(input));\n\t\t},\n\t\t/* remove */ r() {\n\t\t\t_inputs.forEach((input) => group.splice(group.indexOf(input), 1));\n\t\t}\n\t};\n}\n\n/**\n * @param {number[]} indexes\n * @returns {{ u(new_indexes: number[]): void; p(...inputs: HTMLInputElement[]): void; r: () => void; }}\n */\nexport function init_binding_group_dynamic(group, indexes) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _group = get_binding_group(group);\n\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\n\tfunction get_binding_group(group) {\n\t\tfor (let i = 0; i < indexes.length; i++) {\n\t\t\tgroup = group[indexes[i]] = group[indexes[i]] || [];\n\t\t}\n\t\treturn group;\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction push() {\n\t\t_inputs.forEach((input) => _group.push(input));\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction remove() {\n\t\t_inputs.forEach((input) => _group.splice(_group.indexOf(input), 1));\n\t}\n\treturn {\n\t\t/* update */ u(new_indexes) {\n\t\t\tindexes = new_indexes;\n\t\t\tconst new_group = get_binding_group(group);\n\t\t\tif (new_group !== _group) {\n\t\t\t\tremove();\n\t\t\t\t_group = new_group;\n\t\t\t\tpush();\n\t\t\t}\n\t\t},\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\tpush();\n\t\t},\n\t\t/* remove */ r: remove\n\t};\n}\n\n/** @returns {number} */\nexport function to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/** @returns {any[]} */\nexport function time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\n/**\n * @param {Element} element\n * @returns {ChildNode[]}\n */\nexport function children(element) {\n\treturn Array.from(element.childNodes);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {void}\n */\nfunction init_claim_info(nodes) {\n\tif (nodes.claim_info === undefined) {\n\t\tnodes.claim_info = { last_index: 0, total_claimed: 0 };\n\t}\n}\n\n/**\n * @template {ChildNodeEx} R\n * @param {ChildNodeArray} nodes\n * @param {(node: ChildNodeEx) => node is R} predicate\n * @param {(node: ChildNodeEx) => ChildNodeEx | undefined} process_node\n * @param {() => R} create_node\n * @param {boolean} dont_update_last_index\n * @returns {R}\n */\nfunction claim_node(nodes, predicate, process_node, create_node, dont_update_last_index = false) {\n\t// Try to find nodes in an order such that we lengthen the longest increasing subsequence\n\tinit_claim_info(nodes);\n\tconst result_node = (() => {\n\t\t// We first try to find an element after the previous one\n\t\tfor (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// Otherwise, we try to find one before\n\t\t// We iterate in reverse so that we don't go too far back\n\t\tfor (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t} else if (replacement === undefined) {\n\t\t\t\t\t// Since we spliced before the last_index, we decrease it\n\t\t\t\t\tnodes.claim_info.last_index--;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// If we can't find any matching node, we create a new one\n\t\treturn create_node();\n\t})();\n\tresult_node.claim_order = nodes.claim_info.total_claimed;\n\tnodes.claim_info.total_claimed += 1;\n\treturn result_node;\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @param {(name: string) => Element | SVGElement} create_element\n * @returns {Element | SVGElement}\n */\nfunction claim_element_base(nodes, name, attributes, create_element) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Element | SVGElement} */\n\t\t(node) => node.nodeName === name,\n\t\t/** @param {Element} node */\n\t\t(node) => {\n\t\t\tconst remove = [];\n\t\t\tfor (let j = 0; j < node.attributes.length; j++) {\n\t\t\t\tconst attribute = node.attributes[j];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tremove.forEach((v) => node.removeAttribute(v));\n\t\t\treturn undefined;\n\t\t},\n\t\t() => create_element(name)\n\t);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_svg_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, svg_element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Text}\n */\nexport function claim_text(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Text} */\n\t\t(node) => node.nodeType === 3,\n\t\t/** @param {Text} node */\n\t\t(node) => {\n\t\t\tconst data_str = '' + data;\n\t\t\tif (node.data.startsWith(data_str)) {\n\t\t\t\tif (node.data.length !== data_str.length) {\n\t\t\t\t\treturn node.splitText(data_str.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.data = data_str;\n\t\t\t}\n\t\t},\n\t\t() => text(data),\n\t\ttrue // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n\t);\n}\n\n/**\n * @returns {Text} */\nexport function claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Comment}\n */\nexport function claim_comment(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Comment} */\n\t\t(node) => node.nodeType === 8,\n\t\t/** @param {Comment} node */\n\t\t(node) => {\n\t\t\tnode.data = '' + data;\n\t\t\treturn undefined;\n\t\t},\n\t\t() => comment(data),\n\t\ttrue\n\t);\n}\n\nfunction get_comment_idx(nodes, text, start) {\n\tfor (let i = start; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * @param {boolean} is_svg\n * @returns {HtmlTagHydration}\n */\nexport function claim_html_tag(nodes, is_svg) {\n\t// find html opening tag\n\tconst start_index = get_comment_idx(nodes, 'HTML_TAG_START', 0);\n\tconst end_index = get_comment_idx(nodes, 'HTML_TAG_END', start_index + 1);\n\tif (start_index === -1 || end_index === -1) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\n\tinit_claim_info(nodes);\n\tconst html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n\tdetach(html_tag_nodes[0]);\n\tdetach(html_tag_nodes[html_tag_nodes.length - 1]);\n\tconst claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n\tif (claimed_nodes.length === 0) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\tfor (const n of claimed_nodes) {\n\t\tn.claim_order = nodes.claim_info.total_claimed;\n\t\tnodes.claim_info.total_claimed += 1;\n\t}\n\treturn new HtmlTagHydration(is_svg, claimed_nodes);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data(text, data) {\n\tdata = '' + data;\n\tif (text.data === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data_contenteditable(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @param {string} attr_value\n * @returns {void}\n */\nexport function set_data_maybe_contenteditable(text, data, attr_value) {\n\tif (~contenteditable_truthy_values.indexOf(attr_value)) {\n\t\tset_data_contenteditable(text, data);\n\t} else {\n\t\tset_data(text, data);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\n/**\n * @returns {void} */\nexport function set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_style(node, key, value, important) {\n\tif (value == null) {\n\t\tnode.style.removeProperty(key);\n\t} else {\n\t\tnode.style.setProperty(key, value, important ? 'important' : '');\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_option(select, value, mounting) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n\tif (!mounting || value !== undefined) {\n\t\tselect.selectedIndex = -1; // no option should be selected\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nexport function select_value(select) {\n\tconst selected_option = select.querySelector(':checked');\n\treturn selected_option && selected_option.__value;\n}\n\nexport function select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), (option) => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\n\n/**\n * @type {boolean} */\nlet crossorigin;\n\n/**\n * @returns {boolean} */\nexport function is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\treturn crossorigin;\n}\n\n/**\n * @param {HTMLElement} node\n * @param {() => void} fn\n * @returns {() => void}\n */\nexport function add_iframe_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\tconst iframe = element('iframe');\n\tiframe.setAttribute(\n\t\t'style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\tconst crossorigin = is_crossorigin();\n\n\t/**\n\t * @type {() => void}\n\t */\n\tlet unsubscribe;\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,\";\n\t\tunsubscribe = listen(\n\t\t\twindow,\n\t\t\t'message',\n\t\t\t/** @param {MessageEvent} event */ (event) => {\n\t\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t\t}\n\t\t);\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t\t// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n\t\t\t// see https://github.com/sveltejs/svelte/issues/4233\n\t\t\tfn();\n\t\t};\n\t}\n\tappend(node, iframe);\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\t\tdetach(iframe);\n\t};\n}\nexport const resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'content-box'\n});\nexport const resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'border-box'\n});\nexport const resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton(\n\t{ box: 'device-pixel-content-box' }\n);\nexport { ResizeObserverSingleton };\n\n/**\n * @returns {void} */\nexport function toggle_class(element, name, toggle) {\n\t// The `!!` is required because an `undefined` flag means flipping the current state.\n\telement.classList.toggle(name, !!toggle);\n}\n\n/**\n * @template T\n * @param {string} type\n * @param {T} [detail]\n * @param {{ bubbles?: boolean, cancelable?: boolean }} [options]\n * @returns {CustomEvent}\n */\nexport function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * @param {string} selector\n * @param {HTMLElement} parent\n * @returns {ChildNodeArray}\n */\nexport function query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\n/**\n * @param {string} nodeId\n * @param {HTMLElement} head\n * @returns {any[]}\n */\nexport function head_selector(nodeId, head) {\n\tconst result = [];\n\tlet started = 0;\n\tfor (const node of head.childNodes) {\n\t\tif (node.nodeType === 8 /* comment node */) {\n\t\t\tconst comment = node.textContent.trim();\n\t\t\tif (comment === `HEAD_${nodeId}_END`) {\n\t\t\t\tstarted -= 1;\n\t\t\t\tresult.push(node);\n\t\t\t} else if (comment === `HEAD_${nodeId}_START`) {\n\t\t\t\tstarted += 1;\n\t\t\t\tresult.push(node);\n\t\t\t}\n\t\t} else if (started > 0) {\n\t\t\tresult.push(node);\n\t\t}\n\t}\n\treturn result;\n}\n/** */\nexport class HtmlTag {\n\t/**\n\t * @private\n\t * @default false\n\t */\n\tis_svg = false;\n\t/** parent for creating node */\n\te = undefined;\n\t/** html tag nodes */\n\tn = undefined;\n\t/** target */\n\tt = undefined;\n\t/** anchor */\n\ta = undefined;\n\tconstructor(is_svg = false) {\n\t\tthis.is_svg = is_svg;\n\t\tthis.e = this.n = null;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tthis.h(html);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @param {HTMLElement | SVGElement} target\n\t * @param {HTMLElement | SVGElement} anchor\n\t * @returns {void}\n\t */\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tif (this.is_svg)\n\t\t\t\tthis.e = svg_element(/** @type {keyof SVGElementTagNameMap} */ (target.nodeName));\n\t\t\t/** #7364 target for