diff --git a/.svelte-kit/generated/server/internal.js b/.svelte-kit/generated/server/internal.js index e3c04eea..50752d78 100644 --- a/.svelte-kit/generated/server/internal.js +++ b/.svelte-kit/generated/server/internal.js @@ -21,10 +21,10 @@ export const options = { service_worker: false, service_worker_options: undefined, templates: { - app: ({ head, body, assets, nonce, env }) => "\n\n \n \n S\" />\n \n \n \n \n \n \n \n " + head + "\n \n \n
" + body + "
\n \n\n", + app: ({ head, body, assets, nonce, env }) => "\n\n \n \n S\" />\n \n \n \n \n \n \n \n \n " + head + "\n \n \n
" + body + "
\n \n\n", error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t
\n\t\t\t" + status + "\n\t\t\t
\n\t\t\t\t

" + message + "

\n\t\t\t
\n\t\t
\n\t\n\n" }, - version_hash: "11efg8s" + version_hash: "14gnm4x" }; export async function get_hooks() { diff --git a/.svelte-kit/non-ambient.d.ts b/.svelte-kit/non-ambient.d.ts index ee73a7fa..357a7727 100644 --- a/.svelte-kit/non-ambient.d.ts +++ b/.svelte-kit/non-ambient.d.ts @@ -27,20 +27,23 @@ export {}; declare module "$app/types" { export interface AppTypes { - RouteId(): "/" | "/access-denied" | "/accounts" | "/accounts/new" | "/accounts/[id]" | "/api" | "/api/toggle-darkmode" | "/items" | "/items/[id]" | "/login" | "/logout" | "/receipts" | "/receipts/new" | "/receipts/[id]" | "/transactions" | "/transactions/new" | "/transactions/[id]"; + RouteId(): "/" | "/access-denied" | "/accounts" | "/accounts/new" | "/accounts/[id]" | "/api" | "/api/files" | "/api/files/[...path]" | "/api/toggle-darkmode" | "/items" | "/items/[id]" | "/login" | "/logout" | "/receipts" | "/receipts/new" | "/receipts/[id]" | "/transactions" | "/transactions/new" | "/transactions/[id]"; RouteParams(): { "/accounts/[id]": { id: string }; + "/api/files/[...path]": { path: string }; "/items/[id]": { id: string }; "/receipts/[id]": { id: string }; "/transactions/[id]": { id: string } }; LayoutParams(): { - "/": { id?: string }; + "/": { id?: string; path?: string }; "/access-denied": Record; "/accounts": { id?: string }; "/accounts/new": Record; "/accounts/[id]": { id: string }; - "/api": Record; + "/api": { path?: string }; + "/api/files": { path?: string }; + "/api/files/[...path]": { path: string }; "/api/toggle-darkmode": Record; "/items": { id?: string }; "/items/[id]": { id: string }; @@ -53,8 +56,8 @@ declare module "$app/types" { "/transactions/new": Record; "/transactions/[id]": { id: string } }; - Pathname(): "/" | "/accounts" | "/accounts/new" | `/accounts/${string}` & {} | "/items" | `/items/${string}` & {} | "/login" | "/logout" | "/receipts" | "/receipts/new" | `/receipts/${string}` & {} | "/transactions" | "/transactions/new" | `/transactions/${string}` & {}; + Pathname(): "/" | "/accounts" | "/accounts/new" | `/accounts/${string}` & {} | `/api/files/${string}` & {} | "/items" | `/items/${string}` & {} | "/login" | "/logout" | "/receipts" | "/receipts/new" | `/receipts/${string}` & {} | "/transactions" | "/transactions/new" | `/transactions/${string}` & {}; ResolvedPathname(): `${"" | `/${string}`}${ReturnType}`; - Asset(): "/icon.svg" | string & {}; + Asset(): "/icon.svg" | "/manifest.webmanifest" | string & {}; } } \ No newline at end of file diff --git a/.svelte-kit/types/route_meta_data.json b/.svelte-kit/types/route_meta_data.json index 86514602..a51d9fa6 100644 --- a/.svelte-kit/types/route_meta_data.json +++ b/.svelte-kit/types/route_meta_data.json @@ -19,6 +19,9 @@ "src/routes/+layout.ts", "src/routes/+layout.server.ts" ], + "/api/files/[...path]": [ + "src/routes/api/files/[...path]/+server.ts" + ], "/items": [ "src/routes/items/+page.server.ts", "src/routes/+layout.ts", diff --git a/.svelte-kit/types/src/routes/receipts/[id]/$types.d.ts b/.svelte-kit/types/src/routes/receipts/[id]/$types.d.ts index 70426841..71ae87cb 100644 --- a/.svelte-kit/types/src/routes/receipts/[id]/$types.d.ts +++ b/.svelte-kit/types/src/routes/receipts/[id]/$types.d.ts @@ -17,7 +17,13 @@ type PageParentData = EnsureDefined; export type EntryGenerator = () => Promise> | Array; export type PageServerLoad = OutputDataShape> = Kit.ServerLoad; export type PageServerLoadEvent = Parameters[0]; -export type ActionData = unknown; +type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T; +type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T]; +type ExtractActionFailure = T extends Kit.ActionFailure ? X extends void ? never : X : never; +type ActionsFailure any>> = { [Key in keyof T]: Exclude>>, void>; }[keyof T]; +type ActionsExport = typeof import('./proxy+page.server.js').actions +export type SubmitFunction = Kit.SubmitFunction>, Expand>> +export type ActionData = Expand> | null; export type PageServerData = Expand>>>>>; export type PageData = Expand & EnsureDefined>; export type Action | void = Record | void> = Kit.Action diff --git a/bun.lock b/bun.lock index b548747f..fa98ab97 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,8 @@ "dependencies": { "barcode-detector-api-polyfill": "^1.0.20", "clsx": "^2.1.1", + "heic-convert": "^2.1.0", + "heic2any": "^0.0.4", "pocketbase": "^0.26.0", "tailwind-merge": "^3.0.0", }, @@ -595,6 +597,12 @@ "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + "heic-convert": ["heic-convert@2.1.0", "", { "dependencies": { "heic-decode": "^2.0.0", "jpeg-js": "^0.4.4", "pngjs": "^6.0.0" } }, "sha512-1qDuRvEHifTVAj3pFIgkqGgJIr0M3X7cxEPjEp0oG4mo8GFjq99DpCo8Eg3kg17Cy0MTjxpFdoBHOatj7ZVKtg=="], + + "heic-decode": ["heic-decode@2.1.0", "", { "dependencies": { "libheif-js": "^1.19.8" } }, "sha512-0fB3O3WMk38+PScbHLVp66jcNhsZ/ErtQ6u2lMYu/YxXgbBtl+oKOhGQHa4RpvE68k8IzbWkABzHnyAIjR758A=="], + + "heic2any": ["heic2any@0.0.4", "", {}, "sha512-3lLnZiDELfabVH87htnRolZ2iehX9zwpRyGNz22GKXIu0fznlblf0/ftppXKNqS26dqFSeqfIBhAmAj/uSp0cA=="], + "idb": ["idb@7.1.1", "", {}, "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ=="], "import-meta-resolve": ["import-meta-resolve@4.2.0", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="], @@ -667,6 +675,8 @@ "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + "jpeg-js": ["jpeg-js@0.4.4", "", {}, "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="], + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], @@ -687,6 +697,8 @@ "leven": ["leven@3.1.0", "", {}, "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A=="], + "libheif-js": ["libheif-js@1.19.8", "", {}, "sha512-vQJWusIxO7wavpON1dusciL8Go9jsIQ+EUrckauFYAiSTjcmLAsuJh3SszLpvkwPci3JcL41ek2n+LUZGFpPIQ=="], + "lightningcss": ["lightningcss@1.30.2", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.30.2", "lightningcss-darwin-arm64": "1.30.2", "lightningcss-darwin-x64": "1.30.2", "lightningcss-freebsd-x64": "1.30.2", "lightningcss-linux-arm-gnueabihf": "1.30.2", "lightningcss-linux-arm64-gnu": "1.30.2", "lightningcss-linux-arm64-musl": "1.30.2", "lightningcss-linux-x64-gnu": "1.30.2", "lightningcss-linux-x64-musl": "1.30.2", "lightningcss-win32-arm64-msvc": "1.30.2", "lightningcss-win32-x64-msvc": "1.30.2" } }, "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ=="], "lightningcss-android-arm64": ["lightningcss-android-arm64@1.30.2", "", { "os": "android", "cpu": "arm64" }, "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A=="], @@ -761,6 +773,8 @@ "picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + "pngjs": ["pngjs@6.0.0", "", {}, "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg=="], + "pocketbase": ["pocketbase@0.26.8", "", {}, "sha512-aQ/ewvS7ncvAE8wxoW10iAZu6ElgbeFpBhKPnCfvRovNzm2gW8u/sQNPGN6vNgVEagz44kK//C61oKjfa+7Low=="], "possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="], diff --git a/node_modules/.vite/deps/@lucide_svelte_icons_check.js b/node_modules/.vite/deps/@lucide_svelte_icons_check.js index 6eae7c21..08247b34 100644 --- a/node_modules/.vite/deps/@lucide_svelte_icons_check.js +++ b/node_modules/.vite/deps/@lucide_svelte_icons_check.js @@ -1,6 +1,7 @@ import { Icon_default -} from "./chunk-6EUZYYI5.js"; +} from "./chunk-MR7TRD3U.js"; +import "./chunk-2LGM3QYM.js"; import { check_target, hmr, @@ -9,12 +10,11 @@ import { snippet, spread_props, wrap_snippet -} from "./chunk-EXK7SDUS.js"; -import "./chunk-U7P2NEEE.js"; +} from "./chunk-LDPLLRRU.js"; import { append, comment -} from "./chunk-57IKBECK.js"; +} from "./chunk-UKTTYZCO.js"; import { FILENAME, HMR, @@ -23,11 +23,11 @@ import { noop, pop, push -} from "./chunk-JC3VXQM7.js"; +} from "./chunk-UWLXLUJC.js"; import "./chunk-XWATFG4W.js"; import "./chunk-HNWPC2PS.js"; -import "./chunk-2LGM3QYM.js"; import "./chunk-OHYQYV5R.js"; +import "./chunk-U7P2NEEE.js"; import "./chunk-X4VJQ2O3.js"; // node_modules/@lucide/svelte/dist/icons/check.svelte diff --git a/node_modules/.vite/deps/@lucide_svelte_icons_chevron-right.js b/node_modules/.vite/deps/@lucide_svelte_icons_chevron-right.js index 581430fc..65a7cd57 100644 --- a/node_modules/.vite/deps/@lucide_svelte_icons_chevron-right.js +++ b/node_modules/.vite/deps/@lucide_svelte_icons_chevron-right.js @@ -1,6 +1,7 @@ import { Icon_default -} from "./chunk-6EUZYYI5.js"; +} from "./chunk-MR7TRD3U.js"; +import "./chunk-2LGM3QYM.js"; import { check_target, hmr, @@ -9,12 +10,11 @@ import { snippet, spread_props, wrap_snippet -} from "./chunk-EXK7SDUS.js"; -import "./chunk-U7P2NEEE.js"; +} from "./chunk-LDPLLRRU.js"; import { append, comment -} from "./chunk-57IKBECK.js"; +} from "./chunk-UKTTYZCO.js"; import { FILENAME, HMR, @@ -23,11 +23,11 @@ import { noop, pop, push -} from "./chunk-JC3VXQM7.js"; +} from "./chunk-UWLXLUJC.js"; import "./chunk-XWATFG4W.js"; import "./chunk-HNWPC2PS.js"; -import "./chunk-2LGM3QYM.js"; import "./chunk-OHYQYV5R.js"; +import "./chunk-U7P2NEEE.js"; import "./chunk-X4VJQ2O3.js"; // node_modules/@lucide/svelte/dist/icons/chevron-right.svelte diff --git a/node_modules/.vite/deps/@lucide_svelte_icons_circle.js b/node_modules/.vite/deps/@lucide_svelte_icons_circle.js index 6dee05a4..db220f4f 100644 --- a/node_modules/.vite/deps/@lucide_svelte_icons_circle.js +++ b/node_modules/.vite/deps/@lucide_svelte_icons_circle.js @@ -1,6 +1,7 @@ import { Icon_default -} from "./chunk-6EUZYYI5.js"; +} from "./chunk-MR7TRD3U.js"; +import "./chunk-2LGM3QYM.js"; import { check_target, hmr, @@ -9,12 +10,11 @@ import { snippet, spread_props, wrap_snippet -} from "./chunk-EXK7SDUS.js"; -import "./chunk-U7P2NEEE.js"; +} from "./chunk-LDPLLRRU.js"; import { append, comment -} from "./chunk-57IKBECK.js"; +} from "./chunk-UKTTYZCO.js"; import { FILENAME, HMR, @@ -23,11 +23,11 @@ import { noop, pop, push -} from "./chunk-JC3VXQM7.js"; +} from "./chunk-UWLXLUJC.js"; import "./chunk-XWATFG4W.js"; import "./chunk-HNWPC2PS.js"; -import "./chunk-2LGM3QYM.js"; import "./chunk-OHYQYV5R.js"; +import "./chunk-U7P2NEEE.js"; import "./chunk-X4VJQ2O3.js"; // node_modules/@lucide/svelte/dist/icons/circle.svelte diff --git a/node_modules/.vite/deps/@lucide_svelte_icons_minus.js b/node_modules/.vite/deps/@lucide_svelte_icons_minus.js index 416aa4b4..9074a12f 100644 --- a/node_modules/.vite/deps/@lucide_svelte_icons_minus.js +++ b/node_modules/.vite/deps/@lucide_svelte_icons_minus.js @@ -1,6 +1,7 @@ import { Icon_default -} from "./chunk-6EUZYYI5.js"; +} from "./chunk-MR7TRD3U.js"; +import "./chunk-2LGM3QYM.js"; import { check_target, hmr, @@ -9,12 +10,11 @@ import { snippet, spread_props, wrap_snippet -} from "./chunk-EXK7SDUS.js"; -import "./chunk-U7P2NEEE.js"; +} from "./chunk-LDPLLRRU.js"; import { append, comment -} from "./chunk-57IKBECK.js"; +} from "./chunk-UKTTYZCO.js"; import { FILENAME, HMR, @@ -23,11 +23,11 @@ import { noop, pop, push -} from "./chunk-JC3VXQM7.js"; +} from "./chunk-UWLXLUJC.js"; import "./chunk-XWATFG4W.js"; import "./chunk-HNWPC2PS.js"; -import "./chunk-2LGM3QYM.js"; import "./chunk-OHYQYV5R.js"; +import "./chunk-U7P2NEEE.js"; import "./chunk-X4VJQ2O3.js"; // node_modules/@lucide/svelte/dist/icons/minus.svelte diff --git a/node_modules/.vite/deps/@lucide_svelte_icons_x.js b/node_modules/.vite/deps/@lucide_svelte_icons_x.js index 7fa537dc..18a194f5 100644 --- a/node_modules/.vite/deps/@lucide_svelte_icons_x.js +++ b/node_modules/.vite/deps/@lucide_svelte_icons_x.js @@ -1,6 +1,7 @@ import { Icon_default -} from "./chunk-6EUZYYI5.js"; +} from "./chunk-MR7TRD3U.js"; +import "./chunk-2LGM3QYM.js"; import { check_target, hmr, @@ -9,12 +10,11 @@ import { snippet, spread_props, wrap_snippet -} from "./chunk-EXK7SDUS.js"; -import "./chunk-U7P2NEEE.js"; +} from "./chunk-LDPLLRRU.js"; import { append, comment -} from "./chunk-57IKBECK.js"; +} from "./chunk-UKTTYZCO.js"; import { FILENAME, HMR, @@ -23,11 +23,11 @@ import { noop, pop, push -} from "./chunk-JC3VXQM7.js"; +} from "./chunk-UWLXLUJC.js"; import "./chunk-XWATFG4W.js"; import "./chunk-HNWPC2PS.js"; -import "./chunk-2LGM3QYM.js"; import "./chunk-OHYQYV5R.js"; +import "./chunk-U7P2NEEE.js"; import "./chunk-X4VJQ2O3.js"; // node_modules/@lucide/svelte/dist/icons/x.svelte diff --git a/node_modules/.vite/deps/_metadata.json b/node_modules/.vite/deps/_metadata.json index ef855a77..7aa3e4c1 100644 --- a/node_modules/.vite/deps/_metadata.json +++ b/node_modules/.vite/deps/_metadata.json @@ -1,229 +1,241 @@ { - "hash": "6372abc7", + "hash": "e1b6cade", "configHash": "441370a6", - "lockfileHash": "43c145e9", - "browserHash": "583ba445", + "lockfileHash": "9401e68b", + "browserHash": "04aeb2a4", "optimized": { "svelte": { "src": "../../svelte/src/index-client.js", "file": "svelte.js", - "fileHash": "b620c7b2", + "fileHash": "1ddbf175", "needsInterop": false }, "svelte/animate": { "src": "../../svelte/src/animate/index.js", "file": "svelte_animate.js", - "fileHash": "02f610c1", + "fileHash": "d9d56906", "needsInterop": false }, "svelte/attachments": { "src": "../../svelte/src/attachments/index.js", "file": "svelte_attachments.js", - "fileHash": "aa2fd54c", + "fileHash": "c15aecdf", "needsInterop": false }, "svelte/easing": { "src": "../../svelte/src/easing/index.js", "file": "svelte_easing.js", - "fileHash": "0f0d888b", + "fileHash": "e5864893", "needsInterop": false }, "svelte/internal": { "src": "../../svelte/src/internal/index.js", "file": "svelte_internal.js", - "fileHash": "ae1c44b6", + "fileHash": "adeb43af", "needsInterop": true }, "svelte/internal/client": { "src": "../../svelte/src/internal/client/index.js", "file": "svelte_internal_client.js", - "fileHash": "9548cc44", + "fileHash": "a252d832", "needsInterop": false }, "svelte/internal/disclose-version": { "src": "../../svelte/src/internal/disclose-version.js", "file": "svelte_internal_disclose-version.js", - "fileHash": "523d7d1e", + "fileHash": "4acec545", "needsInterop": false }, "svelte/internal/flags/async": { "src": "../../svelte/src/internal/flags/async.js", "file": "svelte_internal_flags_async.js", - "fileHash": "69240c49", + "fileHash": "cb994494", "needsInterop": false }, "svelte/internal/flags/legacy": { "src": "../../svelte/src/internal/flags/legacy.js", "file": "svelte_internal_flags_legacy.js", - "fileHash": "4a2d0680", + "fileHash": "76de734a", "needsInterop": false }, "svelte/internal/flags/tracing": { "src": "../../svelte/src/internal/flags/tracing.js", "file": "svelte_internal_flags_tracing.js", - "fileHash": "65275630", + "fileHash": "945a287e", "needsInterop": false }, "svelte/legacy": { "src": "../../svelte/src/legacy/legacy-client.js", "file": "svelte_legacy.js", - "fileHash": "753552cd", + "fileHash": "d42e96f3", "needsInterop": false }, "svelte/motion": { "src": "../../svelte/src/motion/index.js", "file": "svelte_motion.js", - "fileHash": "1405f1f5", + "fileHash": "d899f28f", "needsInterop": false }, "svelte/reactivity": { "src": "../../svelte/src/reactivity/index-client.js", "file": "svelte_reactivity.js", - "fileHash": "a6ac2ac8", + "fileHash": "78a01aef", "needsInterop": false }, "svelte/reactivity/window": { "src": "../../svelte/src/reactivity/window/index.js", "file": "svelte_reactivity_window.js", - "fileHash": "25337be5", + "fileHash": "8e4d19b4", "needsInterop": false }, "svelte/store": { "src": "../../svelte/src/store/index-client.js", "file": "svelte_store.js", - "fileHash": "0bb2bc3e", + "fileHash": "daa71f26", "needsInterop": false }, "svelte/transition": { "src": "../../svelte/src/transition/index.js", "file": "svelte_transition.js", - "fileHash": "0c13897c", + "fileHash": "2ba3c5f3", "needsInterop": false }, "svelte/events": { "src": "../../svelte/src/events/index.js", "file": "svelte_events.js", - "fileHash": "8e64c629", + "fileHash": "4f1aa8f8", "needsInterop": false }, "svelte > clsx": { "src": "../../clsx/dist/clsx.mjs", "file": "svelte___clsx.js", - "fileHash": "a1e066f0", + "fileHash": "dd6a46d5", "needsInterop": false }, "@lucide/svelte/icons/check": { "src": "../../@lucide/svelte/dist/icons/check.js", "file": "@lucide_svelte_icons_check.js", - "fileHash": "891b74d4", + "fileHash": "aed21143", "needsInterop": false }, "@lucide/svelte/icons/chevron-right": { "src": "../../@lucide/svelte/dist/icons/chevron-right.js", "file": "@lucide_svelte_icons_chevron-right.js", - "fileHash": "63648db9", + "fileHash": "fad53529", "needsInterop": false }, "@lucide/svelte/icons/circle": { "src": "../../@lucide/svelte/dist/icons/circle.js", "file": "@lucide_svelte_icons_circle.js", - "fileHash": "11e4822b", + "fileHash": "bf331329", "needsInterop": false }, "@lucide/svelte/icons/minus": { "src": "../../@lucide/svelte/dist/icons/minus.js", "file": "@lucide_svelte_icons_minus.js", - "fileHash": "30cf92e4", + "fileHash": "c3ee1ff6", "needsInterop": false }, "@lucide/svelte/icons/x": { "src": "../../@lucide/svelte/dist/icons/x.js", "file": "@lucide_svelte_icons_x.js", - "fileHash": "aa690a02", + "fileHash": "e411e45f", "needsInterop": false }, "barcode-detector-api-polyfill": { "src": "../../barcode-detector-api-polyfill/esm/index.js", "file": "barcode-detector-api-polyfill.js", - "fileHash": "55497bad", + "fileHash": "6c03744a", "needsInterop": false }, "bits-ui": { "src": "../../bits-ui/dist/index.js", "file": "bits-ui.js", - "fileHash": "1d3c3c46", + "fileHash": "4faefbe8", "needsInterop": false }, "clsx": { "src": "../../clsx/dist/clsx.mjs", "file": "clsx.js", - "fileHash": "b6a14292", + "fileHash": "41f586d2", "needsInterop": false }, "devalue": { "src": "../../devalue/index.js", "file": "devalue.js", - "fileHash": "2ff911fe", + "fileHash": "3717d88b", "needsInterop": false }, "esm-env": { "src": "../../esm-env/index.js", "file": "esm-env.js", - "fileHash": "5a410efb", + "fileHash": "d7bf04c9", "needsInterop": false }, "pocketbase": { "src": "../../pocketbase/dist/pocketbase.es.mjs", "file": "pocketbase.js", - "fileHash": "9e68746a", + "fileHash": "8025416e", "needsInterop": false }, "tailwind-merge": { "src": "../../tailwind-merge/dist/bundle-mjs.mjs", "file": "tailwind-merge.js", - "fileHash": "d8639500", + "fileHash": "f66be4a7", "needsInterop": false }, "tailwind-variants": { "src": "../../tailwind-variants/dist/index.js", "file": "tailwind-variants.js", - "fileHash": "cf2013f5", + "fileHash": "b33ed3b9", + "needsInterop": false + }, + "@lucide/svelte/icons/chevron-down": { + "src": "../../@lucide/svelte/dist/icons/chevron-down.js", + "file": "@lucide_svelte_icons_chevron-down.js", + "fileHash": "dfeee67b", + "needsInterop": false + }, + "@lucide/svelte/icons/chevron-up": { + "src": "../../@lucide/svelte/dist/icons/chevron-up.js", + "file": "@lucide_svelte_icons_chevron-up.js", + "fileHash": "dda66014", "needsInterop": false } }, "chunks": { - "chunk-6EUZYYI5": { - "file": "chunk-6EUZYYI5.js" - }, "chunk-HRPYXN4O": { "file": "chunk-HRPYXN4O.js" }, - "chunk-MZVN5SDE": { - "file": "chunk-MZVN5SDE.js" - }, - "chunk-EZEETTA4": { - "file": "chunk-EZEETTA4.js" - }, - "chunk-3TACVO2P": { - "file": "chunk-3TACVO2P.js" - }, - "chunk-7RQDXF5S": { - "file": "chunk-7RQDXF5S.js" - }, "chunk-YERFD2CZ": { "file": "chunk-YERFD2CZ.js" }, - "chunk-EXK7SDUS": { - "file": "chunk-EXK7SDUS.js" + "chunk-GBET5VCG": { + "file": "chunk-GBET5VCG.js" }, - "chunk-U7P2NEEE": { - "file": "chunk-U7P2NEEE.js" + "chunk-YSF5ZXQP": { + "file": "chunk-YSF5ZXQP.js" }, - "chunk-57IKBECK": { - "file": "chunk-57IKBECK.js" + "chunk-7RQDXF5S": { + "file": "chunk-7RQDXF5S.js" }, - "chunk-JC3VXQM7": { - "file": "chunk-JC3VXQM7.js" + "chunk-MZVN5SDE": { + "file": "chunk-MZVN5SDE.js" + }, + "chunk-MR7TRD3U": { + "file": "chunk-MR7TRD3U.js" + }, + "chunk-2LGM3QYM": { + "file": "chunk-2LGM3QYM.js" + }, + "chunk-LDPLLRRU": { + "file": "chunk-LDPLLRRU.js" + }, + "chunk-UKTTYZCO": { + "file": "chunk-UKTTYZCO.js" + }, + "chunk-UWLXLUJC": { + "file": "chunk-UWLXLUJC.js" }, "chunk-XWATFG4W": { "file": "chunk-XWATFG4W.js" @@ -231,12 +243,12 @@ "chunk-HNWPC2PS": { "file": "chunk-HNWPC2PS.js" }, - "chunk-2LGM3QYM": { - "file": "chunk-2LGM3QYM.js" - }, "chunk-OHYQYV5R": { "file": "chunk-OHYQYV5R.js" }, + "chunk-U7P2NEEE": { + "file": "chunk-U7P2NEEE.js" + }, "chunk-X4VJQ2O3": { "file": "chunk-X4VJQ2O3.js" } diff --git a/node_modules/.vite/deps/bits-ui.js b/node_modules/.vite/deps/bits-ui.js index b5879fc0..ca744f6b 100644 --- a/node_modules/.vite/deps/bits-ui.js +++ b/node_modules/.vite/deps/bits-ui.js @@ -1,9 +1,10 @@ -import "./chunk-MZVN5SDE.js"; import { SvelteMap -} from "./chunk-EZEETTA4.js"; -import "./chunk-3TACVO2P.js"; +} from "./chunk-GBET5VCG.js"; +import "./chunk-YSF5ZXQP.js"; import "./chunk-7RQDXF5S.js"; +import "./chunk-MZVN5SDE.js"; +import "./chunk-2LGM3QYM.js"; import { add_locations, append_styles, @@ -38,10 +39,7 @@ import { validate_snippet_args, validate_void_dynamic_element, wrap_snippet -} from "./chunk-EXK7SDUS.js"; -import { - clsx -} from "./chunk-U7P2NEEE.js"; +} from "./chunk-LDPLLRRU.js"; import { append, comment, @@ -52,7 +50,7 @@ import { set_text, text, unmount -} from "./chunk-57IKBECK.js"; +} from "./chunk-UKTTYZCO.js"; import { FILENAME, HMR, @@ -88,13 +86,15 @@ import { user_derived, user_effect, user_pre_effect -} from "./chunk-JC3VXQM7.js"; +} from "./chunk-UWLXLUJC.js"; import "./chunk-XWATFG4W.js"; import { true_default } from "./chunk-HNWPC2PS.js"; -import "./chunk-2LGM3QYM.js"; import "./chunk-OHYQYV5R.js"; +import { + clsx +} from "./chunk-U7P2NEEE.js"; import { __export, __privateAdd, diff --git a/node_modules/.vite/deps/chunk-3TACVO2P.js b/node_modules/.vite/deps/chunk-3TACVO2P.js deleted file mode 100644 index 90cc5df4..00000000 --- a/node_modules/.vite/deps/chunk-3TACVO2P.js +++ /dev/null @@ -1,35 +0,0 @@ -import { - createSubscriber -} from "./chunk-JC3VXQM7.js"; -import { - __privateAdd, - __privateGet, - __privateSet -} from "./chunk-X4VJQ2O3.js"; - -// node_modules/svelte/src/reactivity/reactive-value.js -var _fn, _subscribe; -var ReactiveValue = class { - /** - * - * @param {() => T} fn - * @param {(update: () => void) => void} onsubscribe - */ - constructor(fn, onsubscribe) { - __privateAdd(this, _fn); - __privateAdd(this, _subscribe); - __privateSet(this, _fn, fn); - __privateSet(this, _subscribe, createSubscriber(onsubscribe)); - } - get current() { - __privateGet(this, _subscribe).call(this); - return __privateGet(this, _fn).call(this); - } -}; -_fn = new WeakMap(); -_subscribe = new WeakMap(); - -export { - ReactiveValue -}; -//# sourceMappingURL=chunk-3TACVO2P.js.map diff --git a/node_modules/.vite/deps/chunk-3TACVO2P.js.map b/node_modules/.vite/deps/chunk-3TACVO2P.js.map deleted file mode 100644 index ec8406e5..00000000 --- a/node_modules/.vite/deps/chunk-3TACVO2P.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../svelte/src/reactivity/reactive-value.js"], - "sourcesContent": ["import { createSubscriber } from './create-subscriber.js';\n\n/**\n * @template T\n */\nexport class ReactiveValue {\n\t#fn;\n\t#subscribe;\n\n\t/**\n\t *\n\t * @param {() => T} fn\n\t * @param {(update: () => void) => void} onsubscribe\n\t */\n\tconstructor(fn, onsubscribe) {\n\t\tthis.#fn = fn;\n\t\tthis.#subscribe = createSubscriber(onsubscribe);\n\t}\n\n\tget current() {\n\t\tthis.#subscribe();\n\t\treturn this.#fn();\n\t}\n}\n"], - "mappings": ";;;;;;;;;;AAAA;AAKO,IAAM,gBAAN,MAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS1B,YAAY,IAAI,aAAa;AAR7B;AACA;AAQC,uBAAK,KAAM;AACX,uBAAK,YAAa,iBAAiB,WAAW;AAAA,EAC/C;AAAA,EAEA,IAAI,UAAU;AACb,uBAAK,YAAL;AACA,WAAO,mBAAK,KAAL;AAAA,EACR;AACD;AAjBC;AACA;", - "names": [] -} diff --git a/node_modules/.vite/deps/chunk-57IKBECK.js b/node_modules/.vite/deps/chunk-57IKBECK.js deleted file mode 100644 index efd4ed6d..00000000 --- a/node_modules/.vite/deps/chunk-57IKBECK.js +++ /dev/null @@ -1,1017 +0,0 @@ -import { - COMMENT_NODE, - DIRTY, - DOCUMENT_FRAGMENT_NODE, - FILENAME, - HYDRATION_END, - HYDRATION_ERROR, - HYDRATION_START, - IS_XHTML, - LEGACY_PROPS, - MAYBE_DIRTY, - NAMESPACE_MATHML, - NAMESPACE_SVG, - REACTION_RAN, - STATE_SYMBOL, - TEMPLATE_FRAGMENT, - TEMPLATE_USE_IMPORT_NODE, - TEMPLATE_USE_MATHML, - TEMPLATE_USE_SVG, - TEXT_NODE, - active_effect, - all_registered_events, - array_from, - boundary, - clear_text_content, - component_context, - component_root, - create_comment, - create_element, - create_fragment, - create_text, - define_property, - dev_current_component_function, - flushSync, - get, - get_first_child, - get_next_sibling, - handle_event_propagation, - hydrate_next, - hydrate_node, - hydrating, - hydration_failed, - init_operations, - is_array, - is_firefox, - lifecycle_outside_component, - merge_text_nodes, - mutable_source, - noop, - on, - pop, - push, - root_event_handles, - set, - set_attribute, - set_hydrate_node, - set_hydrating, - set_signal_status, - user_pre_effect -} from "./chunk-JC3VXQM7.js"; -import { - hydration_mismatch, - legacy_recursive_reactive_block, - lifecycle_double_unmount, - state_proxy_unmount -} from "./chunk-XWATFG4W.js"; -import { - true_default -} from "./chunk-HNWPC2PS.js"; -import { - async_mode_flag -} from "./chunk-OHYQYV5R.js"; -import { - __privateAdd, - __privateGet, - __privateSet -} from "./chunk-X4VJQ2O3.js"; - -// node_modules/svelte/src/internal/client/dom/reconciler.js -var _a; -var policy = ( - // We gotta write it like this because after downleveling the pure comment may end up in the wrong location - ((_a = globalThis == null ? void 0 : globalThis.window) == null ? void 0 : _a.trustedTypes) && globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { - /** @param {string} html */ - createHTML: (html) => { - return html; - } - }) -); -function create_trusted_html(html) { - return ( - /** @type {string} */ - (policy == null ? void 0 : policy.createHTML(html)) ?? html - ); -} -function create_fragment_from_html(html, trusted2 = false) { - var elem = create_element("template"); - html = html.replaceAll("", ""); - elem.innerHTML = trusted2 ? create_trusted_html(html) : html; - return elem.content; -} - -// node_modules/svelte/src/internal/client/dom/template.js -var TEMPLATE_TAG = IS_XHTML ? "template" : "TEMPLATE"; -var SCRIPT_TAG = IS_XHTML ? "script" : "SCRIPT"; -function assign_nodes(start, end) { - var effect = ( - /** @type {Effect} */ - active_effect - ); - if (effect.nodes === null) { - effect.nodes = { start, end, a: null, t: null }; - } -} -function from_html(content, flags) { - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; - var use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0; - var node; - var has_start = !content.startsWith(""); - return () => { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - if (node === void 0) { - node = create_fragment_from_html(has_start ? content : "" + content, true); - if (!is_fragment) node = /** @type {TemplateNode} */ - get_first_child(node); - } - var clone = ( - /** @type {TemplateNode} */ - use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true) - ); - if (is_fragment) { - var start = ( - /** @type {TemplateNode} */ - get_first_child(clone) - ); - var end = ( - /** @type {TemplateNode} */ - clone.lastChild - ); - assign_nodes(start, end); - } else { - assign_nodes(clone, clone); - } - return clone; - }; -} -function from_namespace(content, flags, ns = "svg") { - var has_start = !content.startsWith(""); - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; - var wrapped = `<${ns}>${has_start ? content : "" + content}`; - var node; - return () => { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - if (!node) { - var fragment = ( - /** @type {DocumentFragment} */ - create_fragment_from_html(wrapped, true) - ); - var root = ( - /** @type {Element} */ - get_first_child(fragment) - ); - if (is_fragment) { - node = document.createDocumentFragment(); - while (get_first_child(root)) { - node.appendChild( - /** @type {TemplateNode} */ - get_first_child(root) - ); - } - } else { - node = /** @type {Element} */ - get_first_child(root); - } - } - var clone = ( - /** @type {TemplateNode} */ - node.cloneNode(true) - ); - if (is_fragment) { - var start = ( - /** @type {TemplateNode} */ - get_first_child(clone) - ); - var end = ( - /** @type {TemplateNode} */ - clone.lastChild - ); - assign_nodes(start, end); - } else { - assign_nodes(clone, clone); - } - return clone; - }; -} -function from_svg(content, flags) { - return from_namespace(content, flags, "svg"); -} -function from_mathml(content, flags) { - return from_namespace(content, flags, "math"); -} -function fragment_from_tree(structure, ns) { - var fragment = create_fragment(); - for (var item of structure) { - if (typeof item === "string") { - fragment.append(create_text(item)); - continue; - } - if (item === void 0 || item[0][0] === "/") { - fragment.append(create_comment(item ? item[0].slice(3) : "")); - continue; - } - const [name, attributes, ...children] = item; - const namespace = name === "svg" ? NAMESPACE_SVG : name === "math" ? NAMESPACE_MATHML : ns; - var element = create_element(name, namespace, attributes == null ? void 0 : attributes.is); - for (var key in attributes) { - set_attribute(element, key, attributes[key]); - } - if (children.length > 0) { - var target = element.nodeName === TEMPLATE_TAG ? ( - /** @type {HTMLTemplateElement} */ - element.content - ) : element; - target.append( - fragment_from_tree(children, element.nodeName === "foreignObject" ? void 0 : namespace) - ); - } - fragment.append(element); - } - return fragment; -} -function from_tree(structure, flags) { - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; - var use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0; - var node; - return () => { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - if (node === void 0) { - const ns = (flags & TEMPLATE_USE_SVG) !== 0 ? NAMESPACE_SVG : (flags & TEMPLATE_USE_MATHML) !== 0 ? NAMESPACE_MATHML : void 0; - node = fragment_from_tree(structure, ns); - if (!is_fragment) node = /** @type {TemplateNode} */ - get_first_child(node); - } - var clone = ( - /** @type {TemplateNode} */ - use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true) - ); - if (is_fragment) { - var start = ( - /** @type {TemplateNode} */ - get_first_child(clone) - ); - var end = ( - /** @type {TemplateNode} */ - clone.lastChild - ); - assign_nodes(start, end); - } else { - assign_nodes(clone, clone); - } - return clone; - }; -} -function with_script(fn) { - return () => run_scripts(fn()); -} -function run_scripts(node) { - if (hydrating) return node; - const is_fragment = node.nodeType === DOCUMENT_FRAGMENT_NODE; - const scripts = ( - /** @type {HTMLElement} */ - node.nodeName === SCRIPT_TAG ? [ - /** @type {HTMLScriptElement} */ - node - ] : node.querySelectorAll("script") - ); - const effect = ( - /** @type {Effect & { nodes: EffectNodes }} */ - active_effect - ); - for (const script of scripts) { - const clone = create_element("script"); - for (var attribute of script.attributes) { - clone.setAttribute(attribute.name, attribute.value); - } - clone.textContent = script.textContent; - if (is_fragment ? node.firstChild === script : node === script) { - effect.nodes.start = clone; - } - if (is_fragment ? node.lastChild === script : node === script) { - effect.nodes.end = clone; - } - script.replaceWith(clone); - } - return node; -} -function text(value = "") { - if (!hydrating) { - var t = create_text(value + ""); - assign_nodes(t, t); - return t; - } - var node = hydrate_node; - if (node.nodeType !== TEXT_NODE) { - node.before(node = create_text()); - set_hydrate_node(node); - } else { - merge_text_nodes( - /** @type {Text} */ - node - ); - } - assign_nodes(node, node); - return node; -} -function comment() { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - var frag = document.createDocumentFragment(); - var start = document.createComment(""); - var anchor = create_text(); - frag.append(start, anchor); - assign_nodes(start, anchor); - return frag; -} -function append(anchor, dom) { - if (hydrating) { - var effect = ( - /** @type {Effect & { nodes: EffectNodes }} */ - active_effect - ); - if ((effect.f & REACTION_RAN) === 0 || effect.nodes.end === null) { - effect.nodes.end = hydrate_node; - } - hydrate_next(); - return; - } - if (anchor === null) { - return; - } - anchor.before( - /** @type {Node} */ - dom - ); -} -function props_id() { - var _a2, _b; - if (hydrating && hydrate_node && hydrate_node.nodeType === COMMENT_NODE && ((_a2 = hydrate_node.textContent) == null ? void 0 : _a2.startsWith(`$`))) { - const id = hydrate_node.textContent.substring(1); - hydrate_next(); - return id; - } - (_b = window.__svelte ?? (window.__svelte = {})).uid ?? (_b.uid = 1); - return `c${window.__svelte.uid++}`; -} - -// node_modules/svelte/src/utils.js -var regex_return_characters = /\r/g; -function hash(str) { - str = str.replace(regex_return_characters, ""); - let hash2 = 5381; - let i = str.length; - while (i--) hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i); - return (hash2 >>> 0).toString(36); -} -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.includes(name) || name.toLowerCase() === "!doctype"; -} -function is_capture_event(name) { - return name.endsWith("capture") && name !== "gotpointercapture" && name !== "lostpointercapture"; -} -var DELEGATED_EVENTS = [ - "beforeinput", - "click", - "change", - "dblclick", - "contextmenu", - "focusin", - "focusout", - "input", - "keydown", - "keyup", - "mousedown", - "mousemove", - "mouseout", - "mouseover", - "mouseup", - "pointerdown", - "pointermove", - "pointerout", - "pointerover", - "pointerup", - "touchend", - "touchmove", - "touchstart" -]; -function can_delegate_event(event_name) { - return DELEGATED_EVENTS.includes(event_name); -} -var DOM_BOOLEAN_ATTRIBUTES = [ - "allowfullscreen", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "disabled", - "formnovalidate", - "indeterminate", - "inert", - "ismap", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "seamless", - "selected", - "webkitdirectory", - "defer", - "disablepictureinpicture", - "disableremoteplayback" -]; -var ATTRIBUTE_ALIASES = { - // no `class: 'className'` because we handle that separately - formnovalidate: "formNoValidate", - ismap: "isMap", - nomodule: "noModule", - playsinline: "playsInline", - readonly: "readOnly", - defaultvalue: "defaultValue", - defaultchecked: "defaultChecked", - srcobject: "srcObject", - novalidate: "noValidate", - allowfullscreen: "allowFullscreen", - disablepictureinpicture: "disablePictureInPicture", - disableremoteplayback: "disableRemotePlayback" -}; -function normalize_attribute(name) { - name = name.toLowerCase(); - return ATTRIBUTE_ALIASES[name] ?? name; -} -var DOM_PROPERTIES = [ - ...DOM_BOOLEAN_ATTRIBUTES, - "formNoValidate", - "isMap", - "noModule", - "playsInline", - "readOnly", - "value", - "volume", - "defaultValue", - "defaultChecked", - "srcObject", - "noValidate", - "allowFullscreen", - "disablePictureInPicture", - "disableRemotePlayback" -]; -var PASSIVE_EVENTS = ["touchstart", "touchmove"]; -function is_passive_event(name) { - return PASSIVE_EVENTS.includes(name); -} -var STATE_CREATION_RUNES = ( - /** @type {const} */ - [ - "$state", - "$state.raw", - "$derived", - "$derived.by" - ] -); -var RUNES = ( - /** @type {const} */ - [ - ...STATE_CREATION_RUNES, - "$state.eager", - "$state.snapshot", - "$props", - "$props.id", - "$bindable", - "$effect", - "$effect.pre", - "$effect.tracking", - "$effect.root", - "$effect.pending", - "$inspect", - "$inspect().with", - "$inspect.trace", - "$host" - ] -); -var RAW_TEXT_ELEMENTS = ( - /** @type {const} */ - ["textarea", "script", "style", "title"] -); -function is_raw_text_element(name) { - return RAW_TEXT_ELEMENTS.includes( - /** @type {typeof RAW_TEXT_ELEMENTS[number]} */ - name - ); -} -function sanitize_location(location) { - return ( - /** @type {T} */ - location == null ? void 0 : location.replace(/\//g, "/​") - ); -} - -// node_modules/svelte/src/internal/client/render.js -var should_intro = true; -function set_should_intro(value) { - should_intro = value; -} -function set_text(text2, value) { - var str = value == null ? "" : typeof value === "object" ? value + "" : value; - if (str !== (text2.__t ?? (text2.__t = text2.nodeValue))) { - text2.__t = str; - text2.nodeValue = str + ""; - } -} -function mount(component, options) { - return _mount(component, options); -} -function hydrate(component, options) { - init_operations(); - options.intro = options.intro ?? false; - const target = options.target; - const was_hydrating = hydrating; - const previous_hydrate_node = hydrate_node; - try { - var anchor = get_first_child(target); - while (anchor && (anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ - anchor.data !== HYDRATION_START)) { - anchor = get_next_sibling(anchor); - } - if (!anchor) { - throw HYDRATION_ERROR; - } - set_hydrating(true); - set_hydrate_node( - /** @type {Comment} */ - anchor - ); - const instance = _mount(component, { ...options, anchor }); - set_hydrating(false); - return ( - /** @type {Exports} */ - instance - ); - } catch (error) { - if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) { - throw error; - } - if (error !== HYDRATION_ERROR) { - console.warn("Failed to hydrate: ", error); - } - if (options.recover === false) { - hydration_failed(); - } - init_operations(); - clear_text_content(target); - set_hydrating(false); - return mount(component, options); - } finally { - set_hydrating(was_hydrating); - set_hydrate_node(previous_hydrate_node); - } -} -var listeners = /* @__PURE__ */ new Map(); -function _mount(Component, { target, anchor, props = {}, events, context, intro = true }) { - init_operations(); - var component = void 0; - var unmount2 = component_root(() => { - var anchor_node = anchor ?? target.appendChild(create_text()); - boundary( - /** @type {TemplateNode} */ - anchor_node, - { - pending: () => { - } - }, - (anchor_node2) => { - push({}); - var ctx = ( - /** @type {ComponentContext} */ - component_context - ); - if (context) ctx.c = context; - if (events) { - props.$$events = events; - } - if (hydrating) { - assign_nodes( - /** @type {TemplateNode} */ - anchor_node2, - null - ); - } - should_intro = intro; - component = Component(anchor_node2, props) || {}; - should_intro = true; - if (hydrating) { - active_effect.nodes.end = hydrate_node; - if (hydrate_node === null || hydrate_node.nodeType !== COMMENT_NODE || /** @type {Comment} */ - hydrate_node.data !== HYDRATION_END) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - } - pop(); - } - ); - var registered_events = /* @__PURE__ */ new Set(); - var event_handle = (events2) => { - for (var i = 0; i < events2.length; i++) { - var event_name = events2[i]; - if (registered_events.has(event_name)) continue; - registered_events.add(event_name); - var passive2 = is_passive_event(event_name); - for (const node of [target, document]) { - var counts = listeners.get(node); - if (counts === void 0) { - counts = /* @__PURE__ */ new Map(); - listeners.set(node, counts); - } - var count = counts.get(event_name); - if (count === void 0) { - node.addEventListener(event_name, handle_event_propagation, { passive: passive2 }); - counts.set(event_name, 1); - } else { - counts.set(event_name, count + 1); - } - } - } - }; - event_handle(array_from(all_registered_events)); - root_event_handles.add(event_handle); - return () => { - var _a2; - for (var event_name of registered_events) { - for (const node of [target, document]) { - var counts = ( - /** @type {Map} */ - listeners.get(node) - ); - var count = ( - /** @type {number} */ - counts.get(event_name) - ); - if (--count == 0) { - node.removeEventListener(event_name, handle_event_propagation); - counts.delete(event_name); - if (counts.size === 0) { - listeners.delete(node); - } - } else { - counts.set(event_name, count); - } - } - } - root_event_handles.delete(event_handle); - if (anchor_node !== anchor) { - (_a2 = anchor_node.parentNode) == null ? void 0 : _a2.removeChild(anchor_node); - } - }; - }); - mounted_components.set(component, unmount2); - return component; -} -var mounted_components = /* @__PURE__ */ new WeakMap(); -function unmount(component, options) { - const fn = mounted_components.get(component); - if (fn) { - mounted_components.delete(component); - return fn(options); - } - if (true_default) { - if (STATE_SYMBOL in component) { - state_proxy_unmount(); - } else { - lifecycle_double_unmount(); - } - } - return Promise.resolve(); -} - -// node_modules/svelte/src/internal/client/dom/legacy/event-modifiers.js -function trusted(fn) { - return function(...args) { - var event = ( - /** @type {Event} */ - args[0] - ); - if (event.isTrusted) { - fn == null ? void 0 : fn.apply(this, args); - } - }; -} -function self(fn) { - return function(...args) { - var event = ( - /** @type {Event} */ - args[0] - ); - if (event.target === this) { - fn == null ? void 0 : fn.apply(this, args); - } - }; -} -function stopPropagation(fn) { - return function(...args) { - var event = ( - /** @type {Event} */ - args[0] - ); - event.stopPropagation(); - return fn == null ? void 0 : fn.apply(this, args); - }; -} -function once(fn) { - var ran = false; - return function(...args) { - if (ran) return; - ran = true; - return fn == null ? void 0 : fn.apply(this, args); - }; -} -function stopImmediatePropagation(fn) { - return function(...args) { - var event = ( - /** @type {Event} */ - args[0] - ); - event.stopImmediatePropagation(); - return fn == null ? void 0 : fn.apply(this, args); - }; -} -function preventDefault(fn) { - return function(...args) { - var event = ( - /** @type {Event} */ - args[0] - ); - event.preventDefault(); - return fn == null ? void 0 : fn.apply(this, args); - }; -} -function passive(node, [event, handler]) { - user_pre_effect(() => { - return on(node, event, handler() ?? noop, { - passive: true - }); - }); -} -function nonpassive(node, [event, handler]) { - user_pre_effect(() => { - return on(node, event, handler() ?? noop, { - passive: false - }); - }); -} - -// node_modules/svelte/src/legacy/legacy-client.js -function createClassComponent(options) { - return new Svelte4Component(options); -} -function asClassComponent(component) { - return class extends Svelte4Component { - /** @param {any} options */ - constructor(options) { - super({ - component, - ...options - }); - } - }; -} -var _events, _instance; -var Svelte4Component = class { - /** - * @param {ComponentConstructorOptions & { - * component: any; - * }} options - */ - constructor(options) { - /** @type {any} */ - __privateAdd(this, _events); - /** @type {Record} */ - __privateAdd(this, _instance); - var _a2; - var sources = /* @__PURE__ */ new Map(); - var add_source = (key, value) => { - var s = mutable_source(value, false, false); - sources.set(key, s); - return s; - }; - const props = new Proxy( - { ...options.props || {}, $$events: {} }, - { - get(target, prop) { - return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); - }, - has(target, prop) { - if (prop === LEGACY_PROPS) return true; - get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); - return Reflect.has(target, prop); - }, - set(target, prop, value) { - set(sources.get(prop) ?? add_source(prop, value), value); - return Reflect.set(target, prop, value); - } - } - ); - __privateSet(this, _instance, (options.hydrate ? hydrate : mount)(options.component, { - target: options.target, - anchor: options.anchor, - props, - context: options.context, - intro: options.intro ?? false, - recover: options.recover - })); - if (!async_mode_flag && (!((_a2 = options == null ? void 0 : options.props) == null ? void 0 : _a2.$$host) || options.sync === false)) { - flushSync(); - } - __privateSet(this, _events, props.$$events); - for (const key of Object.keys(__privateGet(this, _instance))) { - if (key === "$set" || key === "$destroy" || key === "$on") continue; - define_property(this, key, { - get() { - return __privateGet(this, _instance)[key]; - }, - /** @param {any} value */ - set(value) { - __privateGet(this, _instance)[key] = value; - }, - enumerable: true - }); - } - __privateGet(this, _instance).$set = /** @param {Record} next */ - (next) => { - Object.assign(props, next); - }; - __privateGet(this, _instance).$destroy = () => { - unmount(__privateGet(this, _instance)); - }; - } - /** @param {Record} props */ - $set(props) { - __privateGet(this, _instance).$set(props); - } - /** - * @param {string} event - * @param {(...args: any[]) => any} callback - * @returns {any} - */ - $on(event, callback) { - __privateGet(this, _events)[event] = __privateGet(this, _events)[event] || []; - const cb = (...args) => callback.call(this, ...args); - __privateGet(this, _events)[event].push(cb); - return () => { - __privateGet(this, _events)[event] = __privateGet(this, _events)[event].filter( - /** @param {any} fn */ - (fn) => fn !== cb - ); - }; - } - $destroy() { - __privateGet(this, _instance).$destroy(); - } -}; -_events = new WeakMap(); -_instance = new WeakMap(); -function run(fn) { - user_pre_effect(() => { - var _a2; - fn(); - var effect = ( - /** @type {import('#client').Effect} */ - active_effect - ); - if ((effect.f & DIRTY) !== 0) { - let filename = "a file (we can't know which one)"; - if (true_default) { - filename = ((_a2 = dev_current_component_function) == null ? void 0 : _a2[FILENAME]) ?? filename; - } - legacy_recursive_reactive_block(filename); - set_signal_status(effect, MAYBE_DIRTY); - } - }); -} -function handlers(...handlers2) { - return function(event) { - const { stopImmediatePropagation: stopImmediatePropagation2 } = event; - let stopped = false; - event.stopImmediatePropagation = () => { - stopped = true; - stopImmediatePropagation2.call(event); - }; - const errors = []; - for (const handler of handlers2) { - try { - handler == null ? void 0 : handler.call(this, event); - } catch (e) { - errors.push(e); - } - if (stopped) { - break; - } - } - for (let error of errors) { - queueMicrotask(() => { - throw error; - }); - } - }; -} -function createBubbler() { - const active_component_context = component_context; - if (active_component_context === null) { - lifecycle_outside_component("createBubbler"); - } - return (type) => (event) => { - var _a2; - const events = ( - /** @type {Record} */ - (_a2 = active_component_context.s.$$events) == null ? void 0 : _a2[ - /** @type {any} */ - type - ] - ); - if (events) { - const callbacks = is_array(events) ? events.slice() : [events]; - for (const fn of callbacks) { - fn.call(active_component_context.x, event); - } - return !event.defaultPrevented; - } - return true; - }; -} - -export { - hash, - is_void, - is_capture_event, - can_delegate_event, - normalize_attribute, - is_raw_text_element, - sanitize_location, - create_fragment_from_html, - assign_nodes, - from_html, - from_svg, - from_mathml, - from_tree, - with_script, - text, - comment, - append, - props_id, - should_intro, - set_should_intro, - set_text, - mount, - hydrate, - unmount, - trusted, - self, - stopPropagation, - once, - stopImmediatePropagation, - preventDefault, - passive, - nonpassive, - createClassComponent, - asClassComponent, - run, - handlers, - createBubbler -}; -//# sourceMappingURL=chunk-57IKBECK.js.map diff --git a/node_modules/.vite/deps/chunk-57IKBECK.js.map b/node_modules/.vite/deps/chunk-57IKBECK.js.map deleted file mode 100644 index 0818132c..00000000 --- a/node_modules/.vite/deps/chunk-57IKBECK.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../svelte/src/internal/client/dom/reconciler.js", "../../svelte/src/internal/client/dom/template.js", "../../svelte/src/utils.js", "../../svelte/src/internal/client/render.js", "../../svelte/src/internal/client/dom/legacy/event-modifiers.js", "../../svelte/src/legacy/legacy-client.js"], - "sourcesContent": ["/** @import {} from 'trusted-types' */\n\nimport { create_element } from './operations.js';\n\nconst policy =\n\t// We gotta write it like this because after downleveling the pure comment may end up in the wrong location\n\tglobalThis?.window?.trustedTypes &&\n\t/* @__PURE__ */ globalThis.window.trustedTypes.createPolicy('svelte-trusted-html', {\n\t\t/** @param {string} html */\n\t\tcreateHTML: (html) => {\n\t\t\treturn html;\n\t\t}\n\t});\n\n/** @param {string} html */\nfunction create_trusted_html(html) {\n\treturn /** @type {string} */ (policy?.createHTML(html) ?? html);\n}\n\n/**\n * @param {string} html\n * @param {boolean} trusted\n */\nexport function create_fragment_from_html(html, trusted = false) {\n\tvar elem = create_element('template');\n\thtml = html.replaceAll('', ''); // XHTML compliance\n\telem.innerHTML = trusted ? create_trusted_html(html) : html;\n\treturn elem.content;\n}\n", "/** @import { Effect, EffectNodes, TemplateNode } from '#client' */\n/** @import { TemplateStructure } from './types' */\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from './hydration.js';\nimport {\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tis_firefox,\n\tcreate_element,\n\tcreate_fragment,\n\tcreate_comment,\n\tset_attribute,\n\tmerge_text_nodes\n} from './operations.js';\nimport { create_fragment_from_html } from './reconciler.js';\nimport { active_effect } from '../runtime.js';\nimport {\n\tNAMESPACE_MATHML,\n\tNAMESPACE_SVG,\n\tTEMPLATE_FRAGMENT,\n\tTEMPLATE_USE_IMPORT_NODE,\n\tTEMPLATE_USE_MATHML,\n\tTEMPLATE_USE_SVG\n} from '../../../constants.js';\nimport {\n\tCOMMENT_NODE,\n\tDOCUMENT_FRAGMENT_NODE,\n\tIS_XHTML,\n\tREACTION_RAN,\n\tTEXT_NODE\n} from '#client/constants';\n\nconst TEMPLATE_TAG = IS_XHTML ? 'template' : 'TEMPLATE';\nconst SCRIPT_TAG = IS_XHTML ? 'script' : 'SCRIPT';\n\n/**\n * @param {TemplateNode} start\n * @param {TemplateNode | null} end\n */\nexport function assign_nodes(start, end) {\n\tvar effect = /** @type {Effect} */ (active_effect);\n\tif (effect.nodes === null) {\n\t\teffect.nodes = { start, end, a: null, t: null };\n\t}\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function from_html(content, flags) {\n\tvar is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0;\n\tvar use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0;\n\n\t/** @type {Node} */\n\tvar node;\n\n\t/**\n\t * Whether or not the first item is a text/element node. If not, we need to\n\t * create an additional comment node to act as `effect.nodes.start`\n\t */\n\tvar has_start = !content.startsWith('');\n\n\treturn () => {\n\t\tif (hydrating) {\n\t\t\tassign_nodes(hydrate_node, null);\n\t\t\treturn hydrate_node;\n\t\t}\n\n\t\tif (node === undefined) {\n\t\t\tnode = create_fragment_from_html(has_start ? content : '' + content, true);\n\t\t\tif (!is_fragment) node = /** @type {TemplateNode} */ (get_first_child(node));\n\t\t}\n\n\t\tvar clone = /** @type {TemplateNode} */ (\n\t\t\tuse_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true)\n\t\t);\n\n\t\tif (is_fragment) {\n\t\t\tvar start = /** @type {TemplateNode} */ (get_first_child(clone));\n\t\t\tvar end = /** @type {TemplateNode} */ (clone.lastChild);\n\n\t\t\tassign_nodes(start, end);\n\t\t} else {\n\t\t\tassign_nodes(clone, clone);\n\t\t}\n\n\t\treturn clone;\n\t};\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n * @param {'svg' | 'math'} ns\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nfunction from_namespace(content, flags, ns = 'svg') {\n\t/**\n\t * Whether or not the first item is a text/element node. If not, we need to\n\t * create an additional comment node to act as `effect.nodes.start`\n\t */\n\tvar has_start = !content.startsWith('');\n\n\tvar is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0;\n\tvar wrapped = `<${ns}>${has_start ? content : '' + content}`;\n\n\t/** @type {Element | DocumentFragment} */\n\tvar node;\n\n\treturn () => {\n\t\tif (hydrating) {\n\t\t\tassign_nodes(hydrate_node, null);\n\t\t\treturn hydrate_node;\n\t\t}\n\n\t\tif (!node) {\n\t\t\tvar fragment = /** @type {DocumentFragment} */ (create_fragment_from_html(wrapped, true));\n\t\t\tvar root = /** @type {Element} */ (get_first_child(fragment));\n\n\t\t\tif (is_fragment) {\n\t\t\t\tnode = document.createDocumentFragment();\n\t\t\t\twhile (get_first_child(root)) {\n\t\t\t\t\tnode.appendChild(/** @type {TemplateNode} */ (get_first_child(root)));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode = /** @type {Element} */ (get_first_child(root));\n\t\t\t}\n\t\t}\n\n\t\tvar clone = /** @type {TemplateNode} */ (node.cloneNode(true));\n\n\t\tif (is_fragment) {\n\t\t\tvar start = /** @type {TemplateNode} */ (get_first_child(clone));\n\t\t\tvar end = /** @type {TemplateNode} */ (clone.lastChild);\n\n\t\t\tassign_nodes(start, end);\n\t\t} else {\n\t\t\tassign_nodes(clone, clone);\n\t\t}\n\n\t\treturn clone;\n\t};\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function from_svg(content, flags) {\n\treturn from_namespace(content, flags, 'svg');\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function from_mathml(content, flags) {\n\treturn from_namespace(content, flags, 'math');\n}\n\n/**\n * @param {TemplateStructure[]} structure\n * @param {typeof NAMESPACE_SVG | typeof NAMESPACE_MATHML | undefined} [ns]\n */\nfunction fragment_from_tree(structure, ns) {\n\tvar fragment = create_fragment();\n\n\tfor (var item of structure) {\n\t\tif (typeof item === 'string') {\n\t\t\tfragment.append(create_text(item));\n\t\t\tcontinue;\n\t\t}\n\n\t\t// if `preserveComments === true`, comments are represented as `['// ']`\n\t\tif (item === undefined || item[0][0] === '/') {\n\t\t\tfragment.append(create_comment(item ? item[0].slice(3) : ''));\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [name, attributes, ...children] = item;\n\n\t\tconst namespace = name === 'svg' ? NAMESPACE_SVG : name === 'math' ? NAMESPACE_MATHML : ns;\n\n\t\tvar element = create_element(name, namespace, attributes?.is);\n\n\t\tfor (var key in attributes) {\n\t\t\tset_attribute(element, key, attributes[key]);\n\t\t}\n\n\t\tif (children.length > 0) {\n\t\t\tvar target =\n\t\t\t\telement.nodeName === TEMPLATE_TAG\n\t\t\t\t\t? /** @type {HTMLTemplateElement} */ (element).content\n\t\t\t\t\t: element;\n\n\t\t\ttarget.append(\n\t\t\t\tfragment_from_tree(children, element.nodeName === 'foreignObject' ? undefined : namespace)\n\t\t\t);\n\t\t}\n\n\t\tfragment.append(element);\n\t}\n\n\treturn fragment;\n}\n\n/**\n * @param {TemplateStructure[]} structure\n * @param {number} flags\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function from_tree(structure, flags) {\n\tvar is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0;\n\tvar use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0;\n\n\t/** @type {Node} */\n\tvar node;\n\n\treturn () => {\n\t\tif (hydrating) {\n\t\t\tassign_nodes(hydrate_node, null);\n\t\t\treturn hydrate_node;\n\t\t}\n\n\t\tif (node === undefined) {\n\t\t\tconst ns =\n\t\t\t\t(flags & TEMPLATE_USE_SVG) !== 0\n\t\t\t\t\t? NAMESPACE_SVG\n\t\t\t\t\t: (flags & TEMPLATE_USE_MATHML) !== 0\n\t\t\t\t\t\t? NAMESPACE_MATHML\n\t\t\t\t\t\t: undefined;\n\n\t\t\tnode = fragment_from_tree(structure, ns);\n\t\t\tif (!is_fragment) node = /** @type {TemplateNode} */ (get_first_child(node));\n\t\t}\n\n\t\tvar clone = /** @type {TemplateNode} */ (\n\t\t\tuse_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true)\n\t\t);\n\n\t\tif (is_fragment) {\n\t\t\tvar start = /** @type {TemplateNode} */ (get_first_child(clone));\n\t\t\tvar end = /** @type {TemplateNode} */ (clone.lastChild);\n\n\t\t\tassign_nodes(start, end);\n\t\t} else {\n\t\t\tassign_nodes(clone, clone);\n\t\t}\n\n\t\treturn clone;\n\t};\n}\n\n/**\n * @param {() => Element | DocumentFragment} fn\n */\nexport function with_script(fn) {\n\treturn () => run_scripts(fn());\n}\n\n/**\n * Creating a document fragment from HTML that contains script tags will not execute\n * the scripts. We need to replace the script tags with new ones so that they are executed.\n * @param {Element | DocumentFragment} node\n * @returns {Node | Node[]}\n */\nfunction run_scripts(node) {\n\t// scripts were SSR'd, in which case they will run\n\tif (hydrating) return node;\n\n\tconst is_fragment = node.nodeType === DOCUMENT_FRAGMENT_NODE;\n\tconst scripts =\n\t\t/** @type {HTMLElement} */ (node).nodeName === SCRIPT_TAG\n\t\t\t? [/** @type {HTMLScriptElement} */ (node)]\n\t\t\t: node.querySelectorAll('script');\n\n\tconst effect = /** @type {Effect & { nodes: EffectNodes }} */ (active_effect);\n\n\tfor (const script of scripts) {\n\t\tconst clone = create_element('script');\n\t\tfor (var attribute of script.attributes) {\n\t\t\tclone.setAttribute(attribute.name, attribute.value);\n\t\t}\n\n\t\tclone.textContent = script.textContent;\n\n\t\t// The script has changed - if it's at the edges, the effect now points at dead nodes\n\t\tif (is_fragment ? node.firstChild === script : node === script) {\n\t\t\teffect.nodes.start = clone;\n\t\t}\n\t\tif (is_fragment ? node.lastChild === script : node === script) {\n\t\t\teffect.nodes.end = clone;\n\t\t}\n\n\t\tscript.replaceWith(clone);\n\t}\n\treturn node;\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @param {any} value\n */\nexport function text(value = '') {\n\tif (!hydrating) {\n\t\tvar t = create_text(value + '');\n\t\tassign_nodes(t, t);\n\t\treturn t;\n\t}\n\n\tvar node = hydrate_node;\n\n\tif (node.nodeType !== TEXT_NODE) {\n\t\t// if an {expression} is empty during SSR, we need to insert an empty text node\n\t\tnode.before((node = create_text()));\n\t\tset_hydrate_node(node);\n\t} else {\n\t\tmerge_text_nodes(/** @type {Text} */ (node));\n\t}\n\n\tassign_nodes(node, node);\n\treturn node;\n}\n\n/**\n * @returns {TemplateNode | DocumentFragment}\n */\nexport function comment() {\n\t// we're not delegating to `template` here for performance reasons\n\tif (hydrating) {\n\t\tassign_nodes(hydrate_node, null);\n\t\treturn hydrate_node;\n\t}\n\n\tvar frag = document.createDocumentFragment();\n\tvar start = document.createComment('');\n\tvar anchor = create_text();\n\tfrag.append(start, anchor);\n\n\tassign_nodes(start, anchor);\n\n\treturn frag;\n}\n\n/**\n * Assign the created (or in hydration mode, traversed) dom elements to the current block\n * and insert the elements into the dom (in client mode).\n * @param {Text | Comment | Element} anchor\n * @param {DocumentFragment | Element} dom\n */\nexport function append(anchor, dom) {\n\tif (hydrating) {\n\t\tvar effect = /** @type {Effect & { nodes: EffectNodes }} */ (active_effect);\n\n\t\t// When hydrating and outer component and an inner component is async, i.e. blocked on a promise,\n\t\t// then by the time the inner resolves we have already advanced to the end of the hydrated nodes\n\t\t// of the parent component. Check for defined for that reason to avoid rewinding the parent's end marker.\n\t\tif ((effect.f & REACTION_RAN) === 0 || effect.nodes.end === null) {\n\t\t\teffect.nodes.end = hydrate_node;\n\t\t}\n\n\t\thydrate_next();\n\t\treturn;\n\t}\n\n\tif (anchor === null) {\n\t\t// edge case — void `` with content\n\t\treturn;\n\t}\n\n\tanchor.before(/** @type {Node} */ (dom));\n}\n\n/**\n * Create (or hydrate) an unique UID for the component instance.\n */\nexport function props_id() {\n\tif (\n\t\thydrating &&\n\t\thydrate_node &&\n\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\thydrate_node.textContent?.startsWith(`$`)\n\t) {\n\t\tconst id = hydrate_node.textContent.substring(1);\n\t\thydrate_next();\n\t\treturn id;\n\t}\n\n\t// @ts-expect-error This way we ensure the id is unique even across Svelte runtimes\n\t(window.__svelte ??= {}).uid ??= 1;\n\n\t// @ts-expect-error\n\treturn `c${window.__svelte.uid++}`;\n}\n", "const regex_return_characters = /\\r/g;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nexport function hash(str) {\n\tstr = str.replace(regex_return_characters, '');\n\tlet hash = 5381;\n\tlet i = str.length;\n\n\twhile (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n\treturn (hash >>> 0).toString(36);\n}\n\nconst VOID_ELEMENT_NAMES = [\n\t'area',\n\t'base',\n\t'br',\n\t'col',\n\t'command',\n\t'embed',\n\t'hr',\n\t'img',\n\t'input',\n\t'keygen',\n\t'link',\n\t'meta',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr'\n];\n\n/**\n * Returns `true` if `name` is of a void element\n * @param {string} name\n */\nexport function is_void(name) {\n\treturn VOID_ELEMENT_NAMES.includes(name) || name.toLowerCase() === '!doctype';\n}\n\nconst RESERVED_WORDS = [\n\t'arguments',\n\t'await',\n\t'break',\n\t'case',\n\t'catch',\n\t'class',\n\t'const',\n\t'continue',\n\t'debugger',\n\t'default',\n\t'delete',\n\t'do',\n\t'else',\n\t'enum',\n\t'eval',\n\t'export',\n\t'extends',\n\t'false',\n\t'finally',\n\t'for',\n\t'function',\n\t'if',\n\t'implements',\n\t'import',\n\t'in',\n\t'instanceof',\n\t'interface',\n\t'let',\n\t'new',\n\t'null',\n\t'package',\n\t'private',\n\t'protected',\n\t'public',\n\t'return',\n\t'static',\n\t'super',\n\t'switch',\n\t'this',\n\t'throw',\n\t'true',\n\t'try',\n\t'typeof',\n\t'var',\n\t'void',\n\t'while',\n\t'with',\n\t'yield'\n];\n\n/**\n * Returns `true` if `word` is a reserved JavaScript keyword\n * @param {string} word\n */\nexport function is_reserved(word) {\n\treturn RESERVED_WORDS.includes(word);\n}\n\n/**\n * @param {string} name\n */\nexport function is_capture_event(name) {\n\treturn name.endsWith('capture') && name !== 'gotpointercapture' && name !== 'lostpointercapture';\n}\n\n/** List of Element events that will be delegated */\nconst DELEGATED_EVENTS = [\n\t'beforeinput',\n\t'click',\n\t'change',\n\t'dblclick',\n\t'contextmenu',\n\t'focusin',\n\t'focusout',\n\t'input',\n\t'keydown',\n\t'keyup',\n\t'mousedown',\n\t'mousemove',\n\t'mouseout',\n\t'mouseover',\n\t'mouseup',\n\t'pointerdown',\n\t'pointermove',\n\t'pointerout',\n\t'pointerover',\n\t'pointerup',\n\t'touchend',\n\t'touchmove',\n\t'touchstart'\n];\n\n/**\n * Returns `true` if `event_name` is a delegated event\n * @param {string} event_name\n */\nexport function can_delegate_event(event_name) {\n\treturn DELEGATED_EVENTS.includes(event_name);\n}\n\n/**\n * Attributes that are boolean, i.e. they are present or not present.\n */\nconst DOM_BOOLEAN_ATTRIBUTES = [\n\t'allowfullscreen',\n\t'async',\n\t'autofocus',\n\t'autoplay',\n\t'checked',\n\t'controls',\n\t'default',\n\t'disabled',\n\t'formnovalidate',\n\t'indeterminate',\n\t'inert',\n\t'ismap',\n\t'loop',\n\t'multiple',\n\t'muted',\n\t'nomodule',\n\t'novalidate',\n\t'open',\n\t'playsinline',\n\t'readonly',\n\t'required',\n\t'reversed',\n\t'seamless',\n\t'selected',\n\t'webkitdirectory',\n\t'defer',\n\t'disablepictureinpicture',\n\t'disableremoteplayback'\n];\n\n/**\n * Returns `true` if `name` is a boolean attribute\n * @param {string} name\n */\nexport function is_boolean_attribute(name) {\n\treturn DOM_BOOLEAN_ATTRIBUTES.includes(name);\n}\n\n/**\n * @type {Record}\n * List of attribute names that should be aliased to their property names\n * because they behave differently between setting them as an attribute and\n * setting them as a property.\n */\nconst ATTRIBUTE_ALIASES = {\n\t// no `class: 'className'` because we handle that separately\n\tformnovalidate: 'formNoValidate',\n\tismap: 'isMap',\n\tnomodule: 'noModule',\n\tplaysinline: 'playsInline',\n\treadonly: 'readOnly',\n\tdefaultvalue: 'defaultValue',\n\tdefaultchecked: 'defaultChecked',\n\tsrcobject: 'srcObject',\n\tnovalidate: 'noValidate',\n\tallowfullscreen: 'allowFullscreen',\n\tdisablepictureinpicture: 'disablePictureInPicture',\n\tdisableremoteplayback: 'disableRemotePlayback'\n};\n\n/**\n * @param {string} name\n */\nexport function normalize_attribute(name) {\n\tname = name.toLowerCase();\n\treturn ATTRIBUTE_ALIASES[name] ?? name;\n}\n\nconst DOM_PROPERTIES = [\n\t...DOM_BOOLEAN_ATTRIBUTES,\n\t'formNoValidate',\n\t'isMap',\n\t'noModule',\n\t'playsInline',\n\t'readOnly',\n\t'value',\n\t'volume',\n\t'defaultValue',\n\t'defaultChecked',\n\t'srcObject',\n\t'noValidate',\n\t'allowFullscreen',\n\t'disablePictureInPicture',\n\t'disableRemotePlayback'\n];\n\n/**\n * @param {string} name\n */\nexport function is_dom_property(name) {\n\treturn DOM_PROPERTIES.includes(name);\n}\n\nconst NON_STATIC_PROPERTIES = ['autofocus', 'muted', 'defaultValue', 'defaultChecked'];\n\n/**\n * Returns `true` if the given attribute cannot be set through the template\n * string, i.e. needs some kind of JavaScript handling to work.\n * @param {string} name\n */\nexport function cannot_be_set_statically(name) {\n\treturn NON_STATIC_PROPERTIES.includes(name);\n}\n\n/**\n * Subset of delegated events which should be passive by default.\n * These two are already passive via browser defaults on window, document and body.\n * But since\n * - we're delegating them\n * - they happen often\n * - they apply to mobile which is generally less performant\n * we're marking them as passive by default for other elements, too.\n */\nconst PASSIVE_EVENTS = ['touchstart', 'touchmove'];\n\n/**\n * Returns `true` if `name` is a passive event\n * @param {string} name\n */\nexport function is_passive_event(name) {\n\treturn PASSIVE_EVENTS.includes(name);\n}\n\nconst CONTENT_EDITABLE_BINDINGS = ['textContent', 'innerHTML', 'innerText'];\n\n/** @param {string} name */\nexport function is_content_editable_binding(name) {\n\treturn CONTENT_EDITABLE_BINDINGS.includes(name);\n}\n\nconst LOAD_ERROR_ELEMENTS = [\n\t'body',\n\t'embed',\n\t'iframe',\n\t'img',\n\t'link',\n\t'object',\n\t'script',\n\t'style',\n\t'track'\n];\n\n/**\n * Returns `true` if the element emits `load` and `error` events\n * @param {string} name\n */\nexport function is_load_error_element(name) {\n\treturn LOAD_ERROR_ELEMENTS.includes(name);\n}\n\nconst SVG_ELEMENTS = [\n\t'altGlyph',\n\t'altGlyphDef',\n\t'altGlyphItem',\n\t'animate',\n\t'animateColor',\n\t'animateMotion',\n\t'animateTransform',\n\t'circle',\n\t'clipPath',\n\t'color-profile',\n\t'cursor',\n\t'defs',\n\t'desc',\n\t'discard',\n\t'ellipse',\n\t'feBlend',\n\t'feColorMatrix',\n\t'feComponentTransfer',\n\t'feComposite',\n\t'feConvolveMatrix',\n\t'feDiffuseLighting',\n\t'feDisplacementMap',\n\t'feDistantLight',\n\t'feDropShadow',\n\t'feFlood',\n\t'feFuncA',\n\t'feFuncB',\n\t'feFuncG',\n\t'feFuncR',\n\t'feGaussianBlur',\n\t'feImage',\n\t'feMerge',\n\t'feMergeNode',\n\t'feMorphology',\n\t'feOffset',\n\t'fePointLight',\n\t'feSpecularLighting',\n\t'feSpotLight',\n\t'feTile',\n\t'feTurbulence',\n\t'filter',\n\t'font',\n\t'font-face',\n\t'font-face-format',\n\t'font-face-name',\n\t'font-face-src',\n\t'font-face-uri',\n\t'foreignObject',\n\t'g',\n\t'glyph',\n\t'glyphRef',\n\t'hatch',\n\t'hatchpath',\n\t'hkern',\n\t'image',\n\t'line',\n\t'linearGradient',\n\t'marker',\n\t'mask',\n\t'mesh',\n\t'meshgradient',\n\t'meshpatch',\n\t'meshrow',\n\t'metadata',\n\t'missing-glyph',\n\t'mpath',\n\t'path',\n\t'pattern',\n\t'polygon',\n\t'polyline',\n\t'radialGradient',\n\t'rect',\n\t'set',\n\t'solidcolor',\n\t'stop',\n\t'svg',\n\t'switch',\n\t'symbol',\n\t'text',\n\t'textPath',\n\t'tref',\n\t'tspan',\n\t'unknown',\n\t'use',\n\t'view',\n\t'vkern'\n];\n\n/** @param {string} name */\nexport function is_svg(name) {\n\treturn SVG_ELEMENTS.includes(name);\n}\n\nconst MATHML_ELEMENTS = [\n\t'annotation',\n\t'annotation-xml',\n\t'maction',\n\t'math',\n\t'merror',\n\t'mfrac',\n\t'mi',\n\t'mmultiscripts',\n\t'mn',\n\t'mo',\n\t'mover',\n\t'mpadded',\n\t'mphantom',\n\t'mprescripts',\n\t'mroot',\n\t'mrow',\n\t'ms',\n\t'mspace',\n\t'msqrt',\n\t'mstyle',\n\t'msub',\n\t'msubsup',\n\t'msup',\n\t'mtable',\n\t'mtd',\n\t'mtext',\n\t'mtr',\n\t'munder',\n\t'munderover',\n\t'semantics'\n];\n\n/** @param {string} name */\nexport function is_mathml(name) {\n\treturn MATHML_ELEMENTS.includes(name);\n}\n\nconst STATE_CREATION_RUNES = /** @type {const} */ ([\n\t'$state',\n\t'$state.raw',\n\t'$derived',\n\t'$derived.by'\n]);\n\nconst RUNES = /** @type {const} */ ([\n\t...STATE_CREATION_RUNES,\n\t'$state.eager',\n\t'$state.snapshot',\n\t'$props',\n\t'$props.id',\n\t'$bindable',\n\t'$effect',\n\t'$effect.pre',\n\t'$effect.tracking',\n\t'$effect.root',\n\t'$effect.pending',\n\t'$inspect',\n\t'$inspect().with',\n\t'$inspect.trace',\n\t'$host'\n]);\n\n/** @typedef {typeof RUNES[number]} RuneName */\n\n/**\n * @param {string} name\n * @returns {name is RuneName}\n */\nexport function is_rune(name) {\n\treturn RUNES.includes(/** @type {RuneName} */ (name));\n}\n\n/** @typedef {typeof STATE_CREATION_RUNES[number]} StateCreationRuneName */\n\n/**\n * @param {string} name\n * @returns {name is StateCreationRuneName}\n */\nexport function is_state_creation_rune(name) {\n\treturn STATE_CREATION_RUNES.includes(/** @type {StateCreationRuneName} */ (name));\n}\n\n/** List of elements that require raw contents and should not have SSR comments put in them */\nconst RAW_TEXT_ELEMENTS = /** @type {const} */ (['textarea', 'script', 'style', 'title']);\n\n/** @param {string} name */\nexport function is_raw_text_element(name) {\n\treturn RAW_TEXT_ELEMENTS.includes(/** @type {typeof RAW_TEXT_ELEMENTS[number]} */ (name));\n}\n\n/**\n * Prevent devtools trying to make `location` a clickable link by inserting a zero-width space\n * @template {string | undefined} T\n * @param {T} location\n * @returns {T};\n */\nexport function sanitize_location(location) {\n\treturn /** @type {T} */ (location?.replace(/\\//g, '/\\u200b'));\n}\n", "/** @import { ComponentContext, Effect, EffectNodes, TemplateNode } from '#client' */\n/** @import { Component, ComponentType, SvelteComponent, MountOptions } from '../../index.js' */\nimport { DEV } from 'esm-env';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tinit_operations\n} from './dom/operations.js';\nimport { HYDRATION_END, HYDRATION_ERROR, HYDRATION_START } from '../../constants.js';\nimport { active_effect } from './runtime.js';\nimport { push, pop, component_context } from './context.js';\nimport { component_root } from './reactivity/effects.js';\nimport { hydrate_node, hydrating, set_hydrate_node, set_hydrating } from './dom/hydration.js';\nimport { array_from } from '../shared/utils.js';\nimport {\n\tall_registered_events,\n\thandle_event_propagation,\n\troot_event_handles\n} from './dom/elements/events.js';\nimport * as w from './warnings.js';\nimport * as e from './errors.js';\nimport { assign_nodes } from './dom/template.js';\nimport { is_passive_event } from '../../utils.js';\nimport { COMMENT_NODE, STATE_SYMBOL } from './constants.js';\nimport { boundary } from './dom/blocks/boundary.js';\n\n/**\n * This is normally true — block effects should run their intro transitions —\n * but is false during hydration (unless `options.intro` is `true`) and\n * when creating the children of a `` that just changed tag\n */\nexport let should_intro = true;\n\n/** @param {boolean} value */\nexport function set_should_intro(value) {\n\tshould_intro = value;\n}\n\n/**\n * @param {Element} text\n * @param {string} value\n * @returns {void}\n */\nexport function set_text(text, value) {\n\t// For objects, we apply string coercion (which might make things like $state array references in the template reactive) before diffing\n\tvar str = value == null ? '' : typeof value === 'object' ? value + '' : value;\n\t// @ts-expect-error\n\tif (str !== (text.__t ??= text.nodeValue)) {\n\t\t// @ts-expect-error\n\t\ttext.__t = str;\n\t\ttext.nodeValue = str + '';\n\t}\n}\n\n/**\n * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.\n * Transitions will play during the initial render unless the `intro` option is set to `false`.\n *\n * @template {Record} Props\n * @template {Record} Exports\n * @param {ComponentType> | Component} component\n * @param {MountOptions} options\n * @returns {Exports}\n */\nexport function mount(component, options) {\n\treturn _mount(component, options);\n}\n\n/**\n * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component\n *\n * @template {Record} Props\n * @template {Record} Exports\n * @param {ComponentType> | Component} component\n * @param {{} extends Props ? {\n * \t\ttarget: Document | Element | ShadowRoot;\n * \t\tprops?: Props;\n * \t\tevents?: Record any>;\n * \tcontext?: Map;\n * \t\tintro?: boolean;\n * \t\trecover?: boolean;\n * \t} : {\n * \t\ttarget: Document | Element | ShadowRoot;\n * \t\tprops: Props;\n * \t\tevents?: Record any>;\n * \tcontext?: Map;\n * \t\tintro?: boolean;\n * \t\trecover?: boolean;\n * \t}} options\n * @returns {Exports}\n */\nexport function hydrate(component, options) {\n\tinit_operations();\n\toptions.intro = options.intro ?? false;\n\tconst target = options.target;\n\tconst was_hydrating = hydrating;\n\tconst previous_hydrate_node = hydrate_node;\n\n\ttry {\n\t\tvar anchor = get_first_child(target);\n\n\t\twhile (\n\t\t\tanchor &&\n\t\t\t(anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ (anchor).data !== HYDRATION_START)\n\t\t) {\n\t\t\tanchor = get_next_sibling(anchor);\n\t\t}\n\n\t\tif (!anchor) {\n\t\t\tthrow HYDRATION_ERROR;\n\t\t}\n\n\t\tset_hydrating(true);\n\t\tset_hydrate_node(/** @type {Comment} */ (anchor));\n\n\t\tconst instance = _mount(component, { ...options, anchor });\n\n\t\tset_hydrating(false);\n\n\t\treturn /** @type {Exports} */ (instance);\n\t} catch (error) {\n\t\t// re-throw Svelte errors - they are certainly not related to hydration\n\t\tif (\n\t\t\terror instanceof Error &&\n\t\t\terror.message.split('\\n').some((line) => line.startsWith('https://svelte.dev/e/'))\n\t\t) {\n\t\t\tthrow error;\n\t\t}\n\t\tif (error !== HYDRATION_ERROR) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn('Failed to hydrate: ', error);\n\t\t}\n\n\t\tif (options.recover === false) {\n\t\t\te.hydration_failed();\n\t\t}\n\n\t\t// If an error occurred above, the operations might not yet have been initialised.\n\t\tinit_operations();\n\t\tclear_text_content(target);\n\n\t\tset_hydrating(false);\n\t\treturn mount(component, options);\n\t} finally {\n\t\tset_hydrating(was_hydrating);\n\t\tset_hydrate_node(previous_hydrate_node);\n\t}\n}\n\n/** @type {Map>} */\nconst listeners = new Map();\n\n/**\n * @template {Record} Exports\n * @param {ComponentType> | Component} Component\n * @param {MountOptions} options\n * @returns {Exports}\n */\nfunction _mount(Component, { target, anchor, props = {}, events, context, intro = true }) {\n\tinit_operations();\n\n\t/** @type {Exports} */\n\t// @ts-expect-error will be defined because the render effect runs synchronously\n\tvar component = undefined;\n\n\tvar unmount = component_root(() => {\n\t\tvar anchor_node = anchor ?? target.appendChild(create_text());\n\n\t\tboundary(\n\t\t\t/** @type {TemplateNode} */ (anchor_node),\n\t\t\t{\n\t\t\t\tpending: () => {}\n\t\t\t},\n\t\t\t(anchor_node) => {\n\t\t\t\tpush({});\n\t\t\t\tvar ctx = /** @type {ComponentContext} */ (component_context);\n\t\t\t\tif (context) ctx.c = context;\n\n\t\t\t\tif (events) {\n\t\t\t\t\t// We can't spread the object or else we'd lose the state proxy stuff, if it is one\n\t\t\t\t\t/** @type {any} */ (props).$$events = events;\n\t\t\t\t}\n\n\t\t\t\tif (hydrating) {\n\t\t\t\t\tassign_nodes(/** @type {TemplateNode} */ (anchor_node), null);\n\t\t\t\t}\n\n\t\t\t\tshould_intro = intro;\n\t\t\t\t// @ts-expect-error the public typings are not what the actual function looks like\n\t\t\t\tcomponent = Component(anchor_node, props) || {};\n\t\t\t\tshould_intro = true;\n\n\t\t\t\tif (hydrating) {\n\t\t\t\t\t/** @type {Effect & { nodes: EffectNodes }} */ (active_effect).nodes.end = hydrate_node;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\thydrate_node === null ||\n\t\t\t\t\t\thydrate_node.nodeType !== COMMENT_NODE ||\n\t\t\t\t\t\t/** @type {Comment} */ (hydrate_node).data !== HYDRATION_END\n\t\t\t\t\t) {\n\t\t\t\t\t\tw.hydration_mismatch();\n\t\t\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpop();\n\t\t\t}\n\t\t);\n\n\t\t// Setup event delegation _after_ component is mounted - if an error would happen during mount, it would otherwise not be cleaned up\n\t\t/** @type {Set} */\n\t\tvar registered_events = new Set();\n\n\t\t/** @param {Array} events */\n\t\tvar event_handle = (events) => {\n\t\t\tfor (var i = 0; i < events.length; i++) {\n\t\t\t\tvar event_name = events[i];\n\n\t\t\t\tif (registered_events.has(event_name)) continue;\n\t\t\t\tregistered_events.add(event_name);\n\n\t\t\t\tvar passive = is_passive_event(event_name);\n\n\t\t\t\t// Add the event listener to both the container and the document.\n\t\t\t\t// The container listener ensures we catch events from within in case\n\t\t\t\t// the outer content stops propagation of the event.\n\t\t\t\t//\n\t\t\t\t// The document listener ensures we catch events that originate from elements that were\n\t\t\t\t// manually moved outside of the container (e.g. via manual portals).\n\t\t\t\tfor (const node of [target, document]) {\n\t\t\t\t\tvar counts = listeners.get(node);\n\n\t\t\t\t\tif (counts === undefined) {\n\t\t\t\t\t\tcounts = new Map();\n\t\t\t\t\t\tlisteners.set(node, counts);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar count = counts.get(event_name);\n\n\t\t\t\t\tif (count === undefined) {\n\t\t\t\t\t\tnode.addEventListener(event_name, handle_event_propagation, { passive });\n\t\t\t\t\t\tcounts.set(event_name, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcounts.set(event_name, count + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tevent_handle(array_from(all_registered_events));\n\t\troot_event_handles.add(event_handle);\n\n\t\treturn () => {\n\t\t\tfor (var event_name of registered_events) {\n\t\t\t\tfor (const node of [target, document]) {\n\t\t\t\t\tvar counts = /** @type {Map} */ (listeners.get(node));\n\t\t\t\t\tvar count = /** @type {number} */ (counts.get(event_name));\n\n\t\t\t\t\tif (--count == 0) {\n\t\t\t\t\t\tnode.removeEventListener(event_name, handle_event_propagation);\n\t\t\t\t\t\tcounts.delete(event_name);\n\n\t\t\t\t\t\tif (counts.size === 0) {\n\t\t\t\t\t\t\tlisteners.delete(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcounts.set(event_name, count);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\troot_event_handles.delete(event_handle);\n\n\t\t\tif (anchor_node !== anchor) {\n\t\t\t\tanchor_node.parentNode?.removeChild(anchor_node);\n\t\t\t}\n\t\t};\n\t});\n\n\tmounted_components.set(component, unmount);\n\treturn component;\n}\n\n/**\n * References of the components that were mounted or hydrated.\n * Uses a `WeakMap` to avoid memory leaks.\n */\nlet mounted_components = new WeakMap();\n\n/**\n * Unmounts a component that was previously mounted using `mount` or `hydrate`.\n *\n * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.\n *\n * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).\n *\n * ```js\n * import { mount, unmount } from 'svelte';\n * import App from './App.svelte';\n *\n * const app = mount(App, { target: document.body });\n *\n * // later...\n * unmount(app, { outro: true });\n * ```\n * @param {Record} component\n * @param {{ outro?: boolean }} [options]\n * @returns {Promise}\n */\nexport function unmount(component, options) {\n\tconst fn = mounted_components.get(component);\n\n\tif (fn) {\n\t\tmounted_components.delete(component);\n\t\treturn fn(options);\n\t}\n\n\tif (DEV) {\n\t\tif (STATE_SYMBOL in component) {\n\t\t\tw.state_proxy_unmount();\n\t\t} else {\n\t\t\tw.lifecycle_double_unmount();\n\t\t}\n\t}\n\n\treturn Promise.resolve();\n}\n", "import { noop } from '../../../shared/utils.js';\nimport { user_pre_effect } from '../../reactivity/effects.js';\nimport { on } from '../elements/events.js';\n\n/**\n * Substitute for the `trusted` event modifier\n * @deprecated\n * @param {(event: Event, ...args: Array) => void} fn\n * @returns {(event: Event, ...args: unknown[]) => void}\n */\nexport function trusted(fn) {\n\treturn function (...args) {\n\t\tvar event = /** @type {Event} */ (args[0]);\n\t\tif (event.isTrusted) {\n\t\t\t// @ts-ignore\n\t\t\tfn?.apply(this, args);\n\t\t}\n\t};\n}\n\n/**\n * Substitute for the `self` event modifier\n * @deprecated\n * @param {(event: Event, ...args: Array) => void} fn\n * @returns {(event: Event, ...args: unknown[]) => void}\n */\nexport function self(fn) {\n\treturn function (...args) {\n\t\tvar event = /** @type {Event} */ (args[0]);\n\t\t// @ts-ignore\n\t\tif (event.target === this) {\n\t\t\t// @ts-ignore\n\t\t\tfn?.apply(this, args);\n\t\t}\n\t};\n}\n\n/**\n * Substitute for the `stopPropagation` event modifier\n * @deprecated\n * @param {(event: Event, ...args: Array) => void} fn\n * @returns {(event: Event, ...args: unknown[]) => void}\n */\nexport function stopPropagation(fn) {\n\treturn function (...args) {\n\t\tvar event = /** @type {Event} */ (args[0]);\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn?.apply(this, args);\n\t};\n}\n\n/**\n * Substitute for the `once` event modifier\n * @deprecated\n * @param {(event: Event, ...args: Array) => void} fn\n * @returns {(event: Event, ...args: unknown[]) => void}\n */\nexport function once(fn) {\n\tvar ran = false;\n\n\treturn function (...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\n\t\t// @ts-ignore\n\t\treturn fn?.apply(this, args);\n\t};\n}\n\n/**\n * Substitute for the `stopImmediatePropagation` event modifier\n * @deprecated\n * @param {(event: Event, ...args: Array) => void} fn\n * @returns {(event: Event, ...args: unknown[]) => void}\n */\nexport function stopImmediatePropagation(fn) {\n\treturn function (...args) {\n\t\tvar event = /** @type {Event} */ (args[0]);\n\t\tevent.stopImmediatePropagation();\n\t\t// @ts-ignore\n\t\treturn fn?.apply(this, args);\n\t};\n}\n\n/**\n * Substitute for the `preventDefault` event modifier\n * @deprecated\n * @param {(event: Event, ...args: Array) => void} fn\n * @returns {(event: Event, ...args: unknown[]) => void}\n */\nexport function preventDefault(fn) {\n\treturn function (...args) {\n\t\tvar event = /** @type {Event} */ (args[0]);\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn?.apply(this, args);\n\t};\n}\n\n/**\n * Substitute for the `passive` event modifier, implemented as an action\n * @deprecated\n * @param {HTMLElement} node\n * @param {[event: string, handler: () => EventListener]} options\n */\nexport function passive(node, [event, handler]) {\n\tuser_pre_effect(() => {\n\t\treturn on(node, event, handler() ?? noop, {\n\t\t\tpassive: true\n\t\t});\n\t});\n}\n\n/**\n * Substitute for the `nonpassive` event modifier, implemented as an action\n * @deprecated\n * @param {HTMLElement} node\n * @param {[event: string, handler: () => EventListener]} options\n */\nexport function nonpassive(node, [event, handler]) {\n\tuser_pre_effect(() => {\n\t\treturn on(node, event, handler() ?? noop, {\n\t\t\tpassive: false\n\t\t});\n\t});\n}\n", "/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */\nimport { DIRTY, LEGACY_PROPS, MAYBE_DIRTY } from '../internal/client/constants.js';\nimport { user_pre_effect } from '../internal/client/reactivity/effects.js';\nimport { mutable_source, set } from '../internal/client/reactivity/sources.js';\nimport { hydrate, mount, unmount } from '../internal/client/render.js';\nimport { active_effect, get } from '../internal/client/runtime.js';\nimport { flushSync } from '../internal/client/reactivity/batch.js';\nimport { define_property, is_array } from '../internal/shared/utils.js';\nimport * as e from '../internal/client/errors.js';\nimport * as w from '../internal/client/warnings.js';\nimport { DEV } from 'esm-env';\nimport { FILENAME } from '../constants.js';\nimport { component_context, dev_current_component_function } from '../internal/client/context.js';\nimport { async_mode_flag } from '../internal/flags/index.js';\nimport { set_signal_status } from '../internal/client/reactivity/status.js';\n\n/**\n * Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.\n *\n * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.\n *\n * @template {Record} Props\n * @template {Record} Exports\n * @template {Record} Events\n * @template {Record} Slots\n *\n * @param {ComponentConstructorOptions & {\n * \tcomponent: ComponentType> | Component;\n * }} options\n * @returns {SvelteComponent & Exports}\n */\nexport function createClassComponent(options) {\n\t// @ts-expect-error $$prop_def etc are not actually defined\n\treturn new Svelte4Component(options);\n}\n\n/**\n * Takes the component function and returns a Svelte 4 compatible component constructor.\n *\n * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.\n *\n * @template {Record} Props\n * @template {Record} Exports\n * @template {Record} Events\n * @template {Record} Slots\n *\n * @param {SvelteComponent | Component} component\n * @returns {ComponentType & Exports>}\n */\nexport function asClassComponent(component) {\n\t// @ts-expect-error $$prop_def etc are not actually defined\n\treturn class extends Svelte4Component {\n\t\t/** @param {any} options */\n\t\tconstructor(options) {\n\t\t\tsuper({\n\t\t\t\tcomponent,\n\t\t\t\t...options\n\t\t\t});\n\t\t}\n\t};\n}\n\n/**\n * Support using the component as both a class and function during the transition period\n * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters>>): ReturnType, Record>>;}} LegacyComponentType\n */\n\nclass Svelte4Component {\n\t/** @type {any} */\n\t#events;\n\n\t/** @type {Record} */\n\t#instance;\n\n\t/**\n\t * @param {ComponentConstructorOptions & {\n\t * component: any;\n\t * }} options\n\t */\n\tconstructor(options) {\n\t\tvar sources = new Map();\n\n\t\t/**\n\t\t * @param {string | symbol} key\n\t\t * @param {unknown} value\n\t\t */\n\t\tvar add_source = (key, value) => {\n\t\t\tvar s = mutable_source(value, false, false);\n\t\t\tsources.set(key, s);\n\t\t\treturn s;\n\t\t};\n\n\t\t// Replicate coarse-grained props through a proxy that has a version source for\n\t\t// each property, which is incremented on updates to the property itself. Do not\n\t\t// use our $state proxy because that one has fine-grained reactivity.\n\t\tconst props = new Proxy(\n\t\t\t{ ...(options.props || {}), $$events: {} },\n\t\t\t{\n\t\t\t\tget(target, prop) {\n\t\t\t\t\treturn get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));\n\t\t\t\t},\n\t\t\t\thas(target, prop) {\n\t\t\t\t\t// Necessary to not throw \"invalid binding\" validation errors on the component side\n\t\t\t\t\tif (prop === LEGACY_PROPS) return true;\n\n\t\t\t\t\tget(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));\n\t\t\t\t\treturn Reflect.has(target, prop);\n\t\t\t\t},\n\t\t\t\tset(target, prop, value) {\n\t\t\t\t\tset(sources.get(prop) ?? add_source(prop, value), value);\n\t\t\t\t\treturn Reflect.set(target, prop, value);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.#instance = (options.hydrate ? hydrate : mount)(options.component, {\n\t\t\ttarget: options.target,\n\t\t\tanchor: options.anchor,\n\t\t\tprops,\n\t\t\tcontext: options.context,\n\t\t\tintro: options.intro ?? false,\n\t\t\trecover: options.recover\n\t\t});\n\n\t\t// We don't flushSync for custom element wrappers or if the user doesn't want it,\n\t\t// or if we're in async mode since `flushSync()` will fail\n\t\tif (!async_mode_flag && (!options?.props?.$$host || options.sync === false)) {\n\t\t\tflushSync();\n\t\t}\n\n\t\tthis.#events = props.$$events;\n\n\t\tfor (const key of Object.keys(this.#instance)) {\n\t\t\tif (key === '$set' || key === '$destroy' || key === '$on') continue;\n\t\t\tdefine_property(this, key, {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.#instance[key];\n\t\t\t\t},\n\t\t\t\t/** @param {any} value */\n\t\t\t\tset(value) {\n\t\t\t\t\tthis.#instance[key] = value;\n\t\t\t\t},\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t}\n\n\t\tthis.#instance.$set = /** @param {Record} next */ (next) => {\n\t\t\tObject.assign(props, next);\n\t\t};\n\n\t\tthis.#instance.$destroy = () => {\n\t\t\tunmount(this.#instance);\n\t\t};\n\t}\n\n\t/** @param {Record} props */\n\t$set(props) {\n\t\tthis.#instance.$set(props);\n\t}\n\n\t/**\n\t * @param {string} event\n\t * @param {(...args: any[]) => any} callback\n\t * @returns {any}\n\t */\n\t$on(event, callback) {\n\t\tthis.#events[event] = this.#events[event] || [];\n\n\t\t/** @param {any[]} args */\n\t\tconst cb = (...args) => callback.call(this, ...args);\n\t\tthis.#events[event].push(cb);\n\t\treturn () => {\n\t\t\tthis.#events[event] = this.#events[event].filter(/** @param {any} fn */ (fn) => fn !== cb);\n\t\t};\n\t}\n\n\t$destroy() {\n\t\tthis.#instance.$destroy();\n\t}\n}\n\n/**\n * Runs the given function once immediately on the server, and works like `$effect.pre` on the client.\n *\n * @deprecated Use this only as a temporary solution to migrate your component code to Svelte 5.\n * @param {() => void | (() => void)} fn\n * @returns {void}\n */\nexport function run(fn) {\n\tuser_pre_effect(() => {\n\t\tfn();\n\t\tvar effect = /** @type {import('#client').Effect} */ (active_effect);\n\t\t// If the effect is immediately made dirty again, mark it as maybe dirty to emulate legacy behaviour\n\t\tif ((effect.f & DIRTY) !== 0) {\n\t\t\tlet filename = \"a file (we can't know which one)\";\n\t\t\tif (DEV) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tfilename = dev_current_component_function?.[FILENAME] ?? filename;\n\t\t\t}\n\t\t\tw.legacy_recursive_reactive_block(filename);\n\t\t\tset_signal_status(effect, MAYBE_DIRTY);\n\t\t}\n\t});\n}\n\n/**\n * Function to mimic the multiple listeners available in svelte 4\n * @deprecated\n * @param {EventListener[]} handlers\n * @returns {EventListener}\n */\nexport function handlers(...handlers) {\n\treturn function (event) {\n\t\tconst { stopImmediatePropagation } = event;\n\t\tlet stopped = false;\n\n\t\tevent.stopImmediatePropagation = () => {\n\t\t\tstopped = true;\n\t\t\tstopImmediatePropagation.call(event);\n\t\t};\n\n\t\tconst errors = [];\n\n\t\tfor (const handler of handlers) {\n\t\t\ttry {\n\t\t\t\t// @ts-expect-error `this` is not typed\n\t\t\t\thandler?.call(this, event);\n\t\t\t} catch (e) {\n\t\t\t\terrors.push(e);\n\t\t\t}\n\n\t\t\tif (stopped) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tfor (let error of errors) {\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}\n\t};\n}\n\n/**\n * Function to create a `bubble` function that mimic the behavior of `on:click` without handler available in svelte 4.\n * @deprecated Use this only as a temporary solution to migrate your automatically delegated events in Svelte 5.\n */\nexport function createBubbler() {\n\tconst active_component_context = component_context;\n\tif (active_component_context === null) {\n\t\te.lifecycle_outside_component('createBubbler');\n\t}\n\n\treturn (/**@type {string}*/ type) => (/**@type {Event}*/ event) => {\n\t\tconst events = /** @type {Record} */ (\n\t\t\tactive_component_context.s.$$events\n\t\t)?.[/** @type {any} */ (type)];\n\n\t\tif (events) {\n\t\t\tconst callbacks = is_array(events) ? events.slice() : [events];\n\t\t\tfor (const fn of callbacks) {\n\t\t\t\tfn.call(active_component_context.x, event);\n\t\t\t}\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\t\treturn true;\n\t};\n}\n\nexport {\n\tonce,\n\tpreventDefault,\n\tself,\n\tstopImmediatePropagation,\n\tstopPropagation,\n\ttrusted,\n\tpassive,\n\tnonpassive\n} from '../internal/client/dom/legacy/event-modifiers.js';\n"], - "mappings": "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", - "names": ["trusted", "_a", "hash", "text", "unmount", "anchor_node", "events", "passive", "_a", "_a", "handlers", "stopImmediatePropagation"] -} diff --git a/node_modules/.vite/deps/chunk-6EUZYYI5.js b/node_modules/.vite/deps/chunk-6EUZYYI5.js deleted file mode 100644 index 8215f439..00000000 --- a/node_modules/.vite/deps/chunk-6EUZYYI5.js +++ /dev/null @@ -1,188 +0,0 @@ -import { - add_locations, - attribute_effect, - check_target, - each, - element, - hmr, - index, - legacy_api, - prop, - rest_props, - snippet, - validate_dynamic_element_tag -} from "./chunk-EXK7SDUS.js"; -import { - append, - comment, - from_svg -} from "./chunk-57IKBECK.js"; -import { - FILENAME, - HMR, - add_svelte_meta, - child, - first_child, - get, - noop, - pop, - push, - reset, - sibling, - to_array, - user_derived -} from "./chunk-JC3VXQM7.js"; - -// node_modules/@lucide/svelte/dist/defaultAttributes.js -var defaultAttributes = { - xmlns: "http://www.w3.org/2000/svg", - width: 24, - height: 24, - viewBox: "0 0 24 24", - fill: "none", - stroke: "currentColor", - "stroke-width": 2, - "stroke-linecap": "round", - "stroke-linejoin": "round" -}; -var defaultAttributes_default = defaultAttributes; - -// node_modules/@lucide/svelte/dist/Icon.svelte -Icon[FILENAME] = "node_modules/@lucide/svelte/dist/Icon.svelte"; -var root = add_locations(from_svg(``), Icon[FILENAME], [[5, 0]]); -function Icon($$anchor, $$props) { - check_target(new.target); - push($$props, true, Icon); - const color = prop($$props, "color", 3, "currentColor"), size = prop($$props, "size", 3, 24), strokeWidth = prop($$props, "strokeWidth", 3, 2), absoluteStrokeWidth = prop($$props, "absoluteStrokeWidth", 3, false), iconNode = prop($$props, "iconNode", 19, () => []), props = rest_props( - $$props, - [ - "$$slots", - "$$events", - "$$legacy", - "name", - "color", - "size", - "strokeWidth", - "absoluteStrokeWidth", - "iconNode", - "children" - ], - "props" - ); - var $$exports = { ...legacy_api() }; - var svg = root(); - attribute_effect( - svg, - ($0) => ({ - ...defaultAttributes_default, - ...props, - width: size(), - height: size(), - stroke: color(), - "stroke-width": $0, - class: [ - "lucide-icon lucide", - $$props.name && `lucide-${$$props.name}`, - $$props.class - ] - }), - [ - () => absoluteStrokeWidth() ? Number(strokeWidth()) * 24 / Number(size()) : strokeWidth() - ] - ); - var node = child(svg); - add_svelte_meta( - () => each(node, 17, iconNode, index, ($$anchor2, $$item) => { - var $$array = user_derived(() => to_array(get($$item), 2)); - let tag = () => get($$array)[0]; - tag(); - let attrs = () => get($$array)[1]; - attrs(); - var fragment = comment(); - var node_1 = first_child(fragment); - { - validate_dynamic_element_tag(tag); - element( - node_1, - tag, - true, - ($$element, $$anchor3) => { - attribute_effect($$element, () => ({ ...attrs() })); - }, - void 0, - [15, 4] - ); - } - append($$anchor2, fragment); - }), - "each", - Icon, - 14, - 2 - ); - var node_2 = sibling(node); - add_svelte_meta(() => snippet(node_2, () => $$props.children ?? noop), "render", Icon, 20, 2); - reset(svg); - append($$anchor, svg); - return pop($$exports); -} -if (import.meta.hot) { - Icon = hmr(Icon); - import.meta.hot.accept((module) => { - Icon[HMR].update(module.default); - }); -} -var Icon_default = Icon; - -export { - Icon_default -}; -/*! Bundled license information: - -@lucide/svelte/dist/defaultAttributes.js: - (** - * @license @lucide/svelte v0.561.0 - ISC - * - * ISC License - * - * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * --- - * - * The MIT License (MIT) (for portions derived from Feather) - * - * Copyright (c) 2013-2023 Cole Bemis - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * 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. - * - *) -*/ -//# sourceMappingURL=chunk-6EUZYYI5.js.map diff --git a/node_modules/.vite/deps/chunk-6EUZYYI5.js.map b/node_modules/.vite/deps/chunk-6EUZYYI5.js.map deleted file mode 100644 index 92c7625a..00000000 --- a/node_modules/.vite/deps/chunk-6EUZYYI5.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../@lucide/svelte/dist/defaultAttributes.js", "../../@lucide/svelte/dist/Icon.svelte"], - "sourcesContent": ["/**\n * @license @lucide/svelte v0.561.0 - ISC\n *\n * ISC License\n * \n * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.\n * \n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n * \n * ---\n * \n * The MIT License (MIT) (for portions derived from Feather)\n * \n * Copyright (c) 2013-2023 Cole Bemis\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n * \n */\nconst defaultAttributes = {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n};\nexport default defaultAttributes;\n", "\n\n\n {#each iconNode as [tag, attrs]}\n \n {/each}\n {@render children?.()}\n\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,oBAAoB;AAAA,EACtB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AACvB;AACA,IAAO,4BAAQ;;;;;iCCvDf;;;QACc,QAAK,KAAA,SAAA,SAAA,GAAG,cAAc,GAAE,OAAI,KAAA,SAAA,QAAA,GAAG,EAAE,GAAE,cAAW,KAAA,SAAA,eAAA,GAAG,CAAC,GAAE,sBAAmB,KAAA,SAAA,uBAAA,GAAG,KAAK,GAAE,WAAQ,KAAA,SAAA,YAAA,IAAA,MAAA,CAAA,CAAA,GAAoB,QAAK;;;;;;;;;;;;;;;;;MAG/H,MAAA,KAAA;;IAAA;;SACK;SACA;aACG,KAAI;cACH,KAAI;cACJ,MAAK;;;QAEL;;gBAAsD;;;;YADhD,oBAAmB,IAAI,OAAO,YAAW,CAAA,IAAI,KAAM,OAAO,KAAI,CAAA,IAAI,YAAW;;;mBAN5F,GAAA;;yBASQ,UAAQ,OAAA,CAAAA,WAAA,WAAA;;UAAK,MAAI,MAAA,IAAA,OAAA,EAAA,CAAA;;UAAC,QAAM,MAAA,IAAA,OAAA,EAAA,CAAA;;;;;qCAErB,GAAG;;;UAAH;;;oDACF,MAAK,EAAA,EAAA;;;;;;;;;;;;;;;QAZd,GAAA;mBAAA,GAAA;;AAFO;;;;;;;;", - "names": ["$$anchor"] -} diff --git a/node_modules/.vite/deps/chunk-EXK7SDUS.js b/node_modules/.vite/deps/chunk-EXK7SDUS.js deleted file mode 100644 index 8e2a3013..00000000 --- a/node_modules/.vite/deps/chunk-EXK7SDUS.js +++ /dev/null @@ -1,4576 +0,0 @@ -import { - clsx -} from "./chunk-U7P2NEEE.js"; -import { - append, - assign_nodes, - can_delegate_event, - createClassComponent, - create_fragment_from_html, - hash, - is_capture_event, - is_raw_text_element, - is_void, - normalize_attribute, - sanitize_location, - set_should_intro, - should_intro -} from "./chunk-57IKBECK.js"; -import { - ATTACHMENT_KEY, - BLOCK_EFFECT, - BRANCH_EFFECT, - Batch, - COMMENT_NODE, - DESTROYED, - DOCUMENT_FRAGMENT_NODE, - EACH_INDEX_REACTIVE, - EACH_IS_ANIMATED, - EACH_IS_CONTROLLED, - EACH_ITEM_IMMUTABLE, - EACH_ITEM_REACTIVE, - EFFECT_OFFSCREEN, - EFFECT_TRANSPARENT, - ELEMENT_NODE, - FILENAME, - HEAD_EFFECT, - HMR, - HYDRATION_END, - HYDRATION_ERROR, - HYDRATION_START, - HYDRATION_START_ELSE, - INERT, - IS_XHTML, - LEGACY_PROPS, - LOADING_ATTR_SYMBOL, - NAMESPACE_HTML, - NAMESPACE_SVG, - PROPS_IS_BINDABLE, - PROPS_IS_IMMUTABLE, - PROPS_IS_LAZY_INITIAL, - PROPS_IS_RUNES, - PROPS_IS_UPDATED, - REACTION_RAN, - STATE_SYMBOL, - TRANSITION_GLOBAL, - TRANSITION_IN, - TRANSITION_OUT, - UNINITIALIZED, - active_effect, - active_reaction, - add_form_reset_listener, - array_from, - autofocus, - bind_invalid_checkbox_value, - block, - branch, - capture, - clear_text_content, - component_api_changed, - component_api_invalid_new, - component_context, - create_comment, - create_element, - create_event, - create_text, - current_batch, - deep_read_state, - define_property, - delegate, - delegated, - derived, - derived_safe_equal, - destroy_effect, - dev_current_component_function, - dev_stack, - dynamic_void_element_content, - each_key_duplicate, - eager_effect, - effect, - effect_root, - experimental_async_required, - flatten, - flushSync, - get, - get_abort_signal_outside_reaction, - get_boundary, - get_descriptor, - get_descriptors, - get_error, - get_first_child, - get_next_sibling, - get_prototype_of, - hydratable_missing_but_required, - hydrate_next, - hydrate_node, - hydrating, - internal_set, - invalid_snippet, - invalid_snippet_arguments, - is, - is_array, - is_destroying_effect, - is_flushing_sync, - is_function, - is_promise, - is_runes, - lifecycle_legacy_only, - lifecycle_outside_component, - listen, - listen_to_event_and_reset_event, - managed, - move_effect, - mutable_source, - noop, - object_keys, - pause_effect, - previous_batch, - props_invalid_value, - props_rest_readonly, - proxy, - queue_micro_task, - read_hydration_instruction, - remove_effect_dom, - render_effect, - reset, - resume_effect, - run, - run_after_blockers, - run_all, - rune_outside_svelte, - safe_not_equal, - set, - set_active_effect, - set_active_reaction, - set_dev_current_component_function, - set_hydrate_node, - set_hydrating, - should_defer_append, - skip_nodes, - snapshot, - snippet_without_render_tag, - source, - store_invalid_shape, - svelte_element_invalid_this_value, - teardown, - template_effect, - tick, - unset_context, - untrack, - update, - user_effect, - user_pre_effect, - validate_effect, - without_reactive_context -} from "./chunk-JC3VXQM7.js"; -import { - assignment_value_stale, - binding_property_non_reactive, - console_log_state, - hydratable_missing_but_expected, - hydration_attribute_changed, - hydration_html_changed, - hydration_mismatch, - invalid_raw_snippet_render, - ownership_invalid_binding, - ownership_invalid_mutation, - select_multiple_invalid_value -} from "./chunk-XWATFG4W.js"; -import { - true_default -} from "./chunk-HNWPC2PS.js"; -import { - async_mode_flag, - legacy_mode_flag -} from "./chunk-OHYQYV5R.js"; -import { - __privateAdd, - __privateGet, - __privateMethod, - __privateSet, - __publicField -} from "./chunk-X4VJQ2O3.js"; - -// node_modules/svelte/src/internal/client/dev/assign.js -function compare(a, b, property, location) { - if (a !== b && typeof b === "object" && STATE_SYMBOL in b) { - assignment_value_stale( - property, - /** @type {string} */ - sanitize_location(location) - ); - } - return a; -} -function assign(object, property, value, location) { - return compare( - object[property] = value, - untrack(() => object[property]), - property, - location - ); -} -function assign_and(object, property, value, location) { - return compare( - object[property] && (object[property] = value), - untrack(() => object[property]), - property, - location - ); -} -function assign_or(object, property, value, location) { - return compare( - object[property] || (object[property] = value), - untrack(() => object[property]), - property, - location - ); -} -function assign_nullish(object, property, value, location) { - return compare( - object[property] ?? (object[property] = value), - untrack(() => object[property]), - property, - location - ); -} - -// node_modules/svelte/src/internal/client/dev/css.js -var all_styles = /* @__PURE__ */ new Map(); -function register_style(hash2, style) { - var styles = all_styles.get(hash2); - if (!styles) { - styles = /* @__PURE__ */ new Set(); - all_styles.set(hash2, styles); - } - styles.add(style); -} -function cleanup_styles(hash2) { - var styles = all_styles.get(hash2); - if (!styles) return; - for (const style of styles) { - style.remove(); - } - all_styles.delete(hash2); -} - -// node_modules/svelte/src/internal/client/dev/elements.js -function add_locations(fn, filename, locations) { - return (...args) => { - const dom = fn(...args); - var node = hydrating ? dom : dom.nodeType === DOCUMENT_FRAGMENT_NODE ? dom.firstChild : dom; - assign_locations(node, filename, locations); - return dom; - }; -} -function assign_location(element2, filename, location) { - element2.__svelte_meta = { - parent: dev_stack, - loc: { file: filename, line: location[0], column: location[1] } - }; - if (location[2]) { - assign_locations(element2.firstChild, filename, location[2]); - } -} -function assign_locations(node, filename, locations) { - var i = 0; - var depth = 0; - while (node && i < locations.length) { - if (hydrating && node.nodeType === COMMENT_NODE) { - var comment2 = ( - /** @type {Comment} */ - node - ); - if (comment2.data === HYDRATION_START || comment2.data === HYDRATION_START_ELSE) depth += 1; - else if (comment2.data[0] === HYDRATION_END) depth -= 1; - } - if (depth === 0 && node.nodeType === ELEMENT_NODE) { - assign_location( - /** @type {Element} */ - node, - filename, - locations[i++] - ); - } - node = node.nextSibling; - } -} - -// node_modules/svelte/src/internal/client/dev/hmr.js -function hmr(fn) { - const current = source(fn); - function wrapper(anchor, props) { - let component2 = {}; - let instance = {}; - let effect2; - let ran = false; - block(() => { - if (component2 === (component2 = get(current))) { - return; - } - if (effect2) { - for (var k in instance) delete instance[k]; - destroy_effect(effect2); - } - effect2 = branch(() => { - if (ran) set_should_intro(false); - Object.defineProperties( - instance, - Object.getOwnPropertyDescriptors( - // @ts-expect-error - new.target ? new component2(anchor, props) : component2(anchor, props) - ) - ); - if (ran) set_should_intro(true); - }); - }, EFFECT_TRANSPARENT); - ran = true; - if (hydrating) { - anchor = hydrate_node; - } - return instance; - } - wrapper[FILENAME] = fn[FILENAME]; - wrapper[HMR] = { - fn, - current, - update: (incoming) => { - set(wrapper[HMR].current, incoming[HMR].fn); - incoming[HMR].current = wrapper[HMR].current; - } - }; - return wrapper; -} - -// node_modules/svelte/src/internal/client/dev/ownership.js -function create_ownership_validator(props) { - var _a, _b, _c; - const component2 = (_a = component_context) == null ? void 0 : _a.function; - const parent = (_c = (_b = component_context) == null ? void 0 : _b.p) == null ? void 0 : _c.function; - return { - /** - * @param {string} prop - * @param {any[]} path - * @param {any} result - * @param {number} line - * @param {number} column - */ - mutation: (prop2, path, result, line, column) => { - const name = path[0]; - if (is_bound_or_unset(props, name) || !parent) { - return result; - } - let value = props; - for (let i = 0; i < path.length - 1; i++) { - value = value[path[i]]; - if (!(value == null ? void 0 : value[STATE_SYMBOL])) { - return result; - } - } - const location = sanitize_location(`${component2[FILENAME]}:${line}:${column}`); - ownership_invalid_mutation(name, location, prop2, parent[FILENAME]); - return result; - }, - /** - * @param {any} key - * @param {any} child_component - * @param {() => any} value - */ - binding: (key2, child_component, value) => { - var _a2; - if (!is_bound_or_unset(props, key2) && parent && ((_a2 = value()) == null ? void 0 : _a2[STATE_SYMBOL])) { - ownership_invalid_binding( - component2[FILENAME], - key2, - child_component[FILENAME], - parent[FILENAME] - ); - } - } - }; -} -function is_bound_or_unset(props, prop_name) { - var _a; - const is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props; - return !!((_a = get_descriptor(props, prop_name)) == null ? void 0 : _a.set) || is_entry_props && prop_name in props || !(prop_name in props); -} - -// node_modules/svelte/src/internal/client/dev/legacy.js -function check_target(target) { - if (target) { - component_api_invalid_new(target[FILENAME] ?? "a component", target.name); - } -} -function legacy_api() { - var _a; - const component2 = (_a = component_context) == null ? void 0 : _a.function; - function error(method) { - component_api_changed(method, component2[FILENAME]); - } - return { - $destroy: () => error("$destroy()"), - $on: () => error("$on(...)"), - $set: () => error("$set(...)") - }; -} - -// node_modules/svelte/src/internal/client/dev/inspect.js -function inspect(get_value, inspector, show_stack = false) { - validate_effect("$inspect"); - let initial = true; - let error = ( - /** @type {any} */ - UNINITIALIZED - ); - eager_effect(() => { - try { - var value = get_value(); - } catch (e) { - error = e; - return; - } - var snap = snapshot(value, true, true); - untrack(() => { - if (show_stack) { - inspector(...snap); - if (!initial) { - const stack = get_error("$inspect(...)"); - if (stack) { - console.groupCollapsed("stack trace"); - console.log(stack); - console.groupEnd(); - } - } - } else { - inspector(initial ? "init" : "update", ...snap); - } - }); - initial = false; - }); - render_effect(() => { - try { - get_value(); - } catch { - } - if (error !== UNINITIALIZED) { - console.error(error); - error = UNINITIALIZED; - } - }); -} - -// node_modules/svelte/src/internal/client/dom/blocks/async.js -function async(node, blockers = [], expressions = [], fn) { - var was_hydrating = hydrating; - var end = null; - if (was_hydrating) { - hydrate_next(); - end = skip_nodes(false); - } - if (expressions.length === 0 && blockers.every((b) => b.settled)) { - fn(node); - if (was_hydrating) { - set_hydrate_node(end); - } - return; - } - var boundary2 = get_boundary(); - var batch = ( - /** @type {Batch} */ - current_batch - ); - var blocking = boundary2.is_rendered(); - boundary2.update_pending_count(1); - batch.increment(blocking); - if (was_hydrating) { - var previous_hydrate_node = hydrate_node; - set_hydrate_node(end); - } - flatten(blockers, [], expressions, (values) => { - if (was_hydrating) { - set_hydrating(true); - set_hydrate_node(previous_hydrate_node); - } - try { - for (const d of values) get(d); - fn(node, ...values); - } finally { - if (was_hydrating) { - set_hydrating(false); - } - boundary2.update_pending_count(-1); - batch.decrement(blocking); - } - }); -} - -// node_modules/svelte/src/internal/client/dev/validation.js -function validate_snippet_args(anchor, ...args) { - if (typeof anchor !== "object" || !(anchor instanceof Node)) { - invalid_snippet_arguments(); - } - for (let arg of args) { - if (typeof arg !== "function") { - invalid_snippet_arguments(); - } - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/branches.js -var _batches, _onscreen, _offscreen, _outroing, _transition, _commit, _discard; -var BranchManager = class { - /** - * @param {TemplateNode} anchor - * @param {boolean} transition - */ - constructor(anchor, transition2 = true) { - /** @type {TemplateNode} */ - __publicField(this, "anchor"); - /** @type {Map} */ - __privateAdd(this, _batches, /* @__PURE__ */ new Map()); - /** - * Map of keys to effects that are currently rendered in the DOM. - * These effects are visible and actively part of the document tree. - * Example: - * ``` - * {#if condition} - * foo - * {:else} - * bar - * {/if} - * ``` - * Can result in the entries `true->Effect` and `false->Effect` - * @type {Map} - */ - __privateAdd(this, _onscreen, /* @__PURE__ */ new Map()); - /** - * Similar to #onscreen with respect to the keys, but contains branches that are not yet - * in the DOM, because their insertion is deferred. - * @type {Map} - */ - __privateAdd(this, _offscreen, /* @__PURE__ */ new Map()); - /** - * Keys of effects that are currently outroing - * @type {Set} - */ - __privateAdd(this, _outroing, /* @__PURE__ */ new Set()); - /** - * Whether to pause (i.e. outro) on change, or destroy immediately. - * This is necessary for `` - */ - __privateAdd(this, _transition, true); - __privateAdd(this, _commit, () => { - var batch = ( - /** @type {Batch} */ - current_batch - ); - if (!__privateGet(this, _batches).has(batch)) return; - var key2 = ( - /** @type {Key} */ - __privateGet(this, _batches).get(batch) - ); - var onscreen = __privateGet(this, _onscreen).get(key2); - if (onscreen) { - resume_effect(onscreen); - __privateGet(this, _outroing).delete(key2); - } else { - var offscreen = __privateGet(this, _offscreen).get(key2); - if (offscreen) { - __privateGet(this, _onscreen).set(key2, offscreen.effect); - __privateGet(this, _offscreen).delete(key2); - offscreen.fragment.lastChild.remove(); - this.anchor.before(offscreen.fragment); - onscreen = offscreen.effect; - } - } - for (const [b, k] of __privateGet(this, _batches)) { - __privateGet(this, _batches).delete(b); - if (b === batch) { - break; - } - const offscreen2 = __privateGet(this, _offscreen).get(k); - if (offscreen2) { - destroy_effect(offscreen2.effect); - __privateGet(this, _offscreen).delete(k); - } - } - for (const [k, effect2] of __privateGet(this, _onscreen)) { - if (k === key2 || __privateGet(this, _outroing).has(k)) continue; - const on_destroy = () => { - const keys = Array.from(__privateGet(this, _batches).values()); - if (keys.includes(k)) { - var fragment = document.createDocumentFragment(); - move_effect(effect2, fragment); - fragment.append(create_text()); - __privateGet(this, _offscreen).set(k, { effect: effect2, fragment }); - } else { - destroy_effect(effect2); - } - __privateGet(this, _outroing).delete(k); - __privateGet(this, _onscreen).delete(k); - }; - if (__privateGet(this, _transition) || !onscreen) { - __privateGet(this, _outroing).add(k); - pause_effect(effect2, on_destroy, false); - } else { - on_destroy(); - } - } - }); - /** - * @param {Batch} batch - */ - __privateAdd(this, _discard, (batch) => { - __privateGet(this, _batches).delete(batch); - const keys = Array.from(__privateGet(this, _batches).values()); - for (const [k, branch2] of __privateGet(this, _offscreen)) { - if (!keys.includes(k)) { - destroy_effect(branch2.effect); - __privateGet(this, _offscreen).delete(k); - } - } - }); - this.anchor = anchor; - __privateSet(this, _transition, transition2); - } - /** - * - * @param {any} key - * @param {null | ((target: TemplateNode) => void)} fn - */ - ensure(key2, fn) { - var batch = ( - /** @type {Batch} */ - current_batch - ); - var defer = should_defer_append(); - if (fn && !__privateGet(this, _onscreen).has(key2) && !__privateGet(this, _offscreen).has(key2)) { - if (defer) { - var fragment = document.createDocumentFragment(); - var target = create_text(); - fragment.append(target); - __privateGet(this, _offscreen).set(key2, { - effect: branch(() => fn(target)), - fragment - }); - } else { - __privateGet(this, _onscreen).set( - key2, - branch(() => fn(this.anchor)) - ); - } - } - __privateGet(this, _batches).set(batch, key2); - if (defer) { - for (const [k, effect2] of __privateGet(this, _onscreen)) { - if (k === key2) { - batch.unskip_effect(effect2); - } else { - batch.skip_effect(effect2); - } - } - for (const [k, branch2] of __privateGet(this, _offscreen)) { - if (k === key2) { - batch.unskip_effect(branch2.effect); - } else { - batch.skip_effect(branch2.effect); - } - } - batch.oncommit(__privateGet(this, _commit)); - batch.ondiscard(__privateGet(this, _discard)); - } else { - if (hydrating) { - this.anchor = hydrate_node; - } - __privateGet(this, _commit).call(this); - } - } -}; -_batches = new WeakMap(); -_onscreen = new WeakMap(); -_offscreen = new WeakMap(); -_outroing = new WeakMap(); -_transition = new WeakMap(); -_commit = new WeakMap(); -_discard = new WeakMap(); - -// node_modules/svelte/src/internal/client/dom/blocks/await.js -var PENDING = 0; -var THEN = 1; -function await_block(node, get_input, pending_fn, then_fn, catch_fn) { - if (hydrating) { - hydrate_next(); - } - var runes = is_runes(); - var v = ( - /** @type {V} */ - UNINITIALIZED - ); - var value = runes ? source(v) : mutable_source(v, false, false); - var error = runes ? source(v) : mutable_source(v, false, false); - var branches = new BranchManager(node); - block(() => { - var input = get_input(); - var destroyed = false; - let mismatch = hydrating && is_promise(input) === (node.data === HYDRATION_START_ELSE); - if (mismatch) { - set_hydrate_node(skip_nodes()); - set_hydrating(false); - } - if (is_promise(input)) { - var restore = capture(); - var resolved = false; - const resolve = (fn) => { - if (destroyed) return; - resolved = true; - restore(false); - Batch.ensure(); - if (hydrating) { - set_hydrating(false); - } - try { - fn(); - } finally { - unset_context(); - if (!is_flushing_sync) flushSync(); - } - }; - input.then( - (v2) => { - resolve(() => { - internal_set(value, v2); - branches.ensure(THEN, then_fn && ((target) => then_fn(target, value))); - }); - }, - (e) => { - resolve(() => { - internal_set(error, e); - branches.ensure(THEN, catch_fn && ((target) => catch_fn(target, error))); - if (!catch_fn) { - throw error.v; - } - }); - } - ); - if (hydrating) { - branches.ensure(PENDING, pending_fn); - } else { - queue_micro_task(() => { - if (!resolved) { - resolve(() => { - branches.ensure(PENDING, pending_fn); - }); - } - }); - } - } else { - internal_set(value, input); - branches.ensure(THEN, then_fn && ((target) => then_fn(target, value))); - } - if (mismatch) { - set_hydrating(true); - } - return () => { - destroyed = true; - }; - }); -} - -// node_modules/svelte/src/internal/client/dom/blocks/if.js -function if_block(node, fn, elseif = false) { - if (hydrating) { - hydrate_next(); - } - var branches = new BranchManager(node); - var flags = elseif ? EFFECT_TRANSPARENT : 0; - function update_branch(key2, fn2) { - if (hydrating) { - const data = read_hydration_instruction(node); - var hydrated_key; - if (data === HYDRATION_START) { - hydrated_key = 0; - } else if (data === HYDRATION_START_ELSE) { - hydrated_key = false; - } else { - hydrated_key = parseInt(data.substring(1)); - } - if (key2 !== hydrated_key) { - var anchor = skip_nodes(); - set_hydrate_node(anchor); - branches.anchor = anchor; - set_hydrating(false); - branches.ensure(key2, fn2); - set_hydrating(true); - return; - } - } - branches.ensure(key2, fn2); - } - block(() => { - var has_branch = false; - fn((fn2, key2 = 0) => { - has_branch = true; - update_branch(key2, fn2); - }); - if (!has_branch) { - update_branch(false, null); - } - }, flags); -} - -// node_modules/svelte/src/internal/client/dom/blocks/key.js -var NAN = Symbol("NaN"); -function key(node, get_key, render_fn) { - if (hydrating) { - hydrate_next(); - } - var branches = new BranchManager(node); - var legacy = !is_runes(); - block(() => { - var key2 = get_key(); - if (key2 !== key2) { - key2 = /** @type {any} */ - NAN; - } - if (legacy && key2 !== null && typeof key2 === "object") { - key2 = /** @type {V} */ - {}; - } - branches.ensure(key2, render_fn); - }); -} - -// node_modules/svelte/src/internal/client/dom/blocks/css-props.js -function css_props(element2, get_styles) { - if (hydrating) { - set_hydrate_node(get_first_child(element2)); - } - render_effect(() => { - var styles = get_styles(); - for (var key2 in styles) { - var value = styles[key2]; - if (value) { - element2.style.setProperty(key2, value); - } else { - element2.style.removeProperty(key2); - } - } - }); -} - -// node_modules/svelte/src/internal/client/dom/blocks/each.js -function index(_, i) { - return i; -} -function pause_effects(state2, to_destroy, controlled_anchor) { - var transitions = []; - var length = to_destroy.length; - var group; - var remaining = to_destroy.length; - for (var i = 0; i < length; i++) { - let effect2 = to_destroy[i]; - pause_effect( - effect2, - () => { - if (group) { - group.pending.delete(effect2); - group.done.add(effect2); - if (group.pending.size === 0) { - var groups = ( - /** @type {Set} */ - state2.outrogroups - ); - destroy_effects(array_from(group.done)); - groups.delete(group); - if (groups.size === 0) { - state2.outrogroups = null; - } - } - } else { - remaining -= 1; - } - }, - false - ); - } - if (remaining === 0) { - var fast_path = transitions.length === 0 && controlled_anchor !== null; - if (fast_path) { - var anchor = ( - /** @type {Element} */ - controlled_anchor - ); - var parent_node = ( - /** @type {Element} */ - anchor.parentNode - ); - clear_text_content(parent_node); - parent_node.append(anchor); - state2.items.clear(); - } - destroy_effects(to_destroy, !fast_path); - } else { - group = { - pending: new Set(to_destroy), - done: /* @__PURE__ */ new Set() - }; - (state2.outrogroups ?? (state2.outrogroups = /* @__PURE__ */ new Set())).add(group); - } -} -function destroy_effects(to_destroy, remove_dom = true) { - for (var i = 0; i < to_destroy.length; i++) { - destroy_effect(to_destroy[i], remove_dom); - } -} -var offscreen_anchor; -function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) { - var anchor = node; - var items = /* @__PURE__ */ new Map(); - var is_controlled = (flags & EACH_IS_CONTROLLED) !== 0; - if (is_controlled) { - var parent_node = ( - /** @type {Element} */ - node - ); - anchor = hydrating ? set_hydrate_node(get_first_child(parent_node)) : parent_node.appendChild(create_text()); - } - if (hydrating) { - hydrate_next(); - } - var fallback2 = null; - var each_array = derived_safe_equal(() => { - var collection = get_collection(); - return is_array(collection) ? collection : collection == null ? [] : array_from(collection); - }); - var array; - var first_run = true; - function commit() { - state2.fallback = fallback2; - reconcile(state2, array, anchor, flags, get_key); - if (fallback2 !== null) { - if (array.length === 0) { - if ((fallback2.f & EFFECT_OFFSCREEN) === 0) { - resume_effect(fallback2); - } else { - fallback2.f ^= EFFECT_OFFSCREEN; - move(fallback2, null, anchor); - } - } else { - pause_effect(fallback2, () => { - fallback2 = null; - }); - } - } - } - var effect2 = block(() => { - array = /** @type {V[]} */ - get(each_array); - var length = array.length; - let mismatch = false; - if (hydrating) { - var is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE; - if (is_else !== (length === 0)) { - anchor = skip_nodes(); - set_hydrate_node(anchor); - set_hydrating(false); - mismatch = true; - } - } - var keys = /* @__PURE__ */ new Set(); - var batch = ( - /** @type {Batch} */ - current_batch - ); - var defer = should_defer_append(); - for (var index2 = 0; index2 < length; index2 += 1) { - if (hydrating && hydrate_node.nodeType === COMMENT_NODE && /** @type {Comment} */ - hydrate_node.data === HYDRATION_END) { - anchor = /** @type {Comment} */ - hydrate_node; - mismatch = true; - set_hydrating(false); - } - var value = array[index2]; - var key2 = get_key(value, index2); - var item = first_run ? null : items.get(key2); - if (item) { - if (item.v) internal_set(item.v, value); - if (item.i) internal_set(item.i, index2); - if (defer) { - batch.unskip_effect(item.e); - } - } else { - item = create_item( - items, - first_run ? anchor : offscreen_anchor ?? (offscreen_anchor = create_text()), - value, - key2, - index2, - render_fn, - flags, - get_collection - ); - if (!first_run) { - item.e.f |= EFFECT_OFFSCREEN; - } - items.set(key2, item); - } - keys.add(key2); - } - if (length === 0 && fallback_fn && !fallback2) { - if (first_run) { - fallback2 = branch(() => fallback_fn(anchor)); - } else { - fallback2 = branch(() => fallback_fn(offscreen_anchor ?? (offscreen_anchor = create_text()))); - fallback2.f |= EFFECT_OFFSCREEN; - } - } - if (length > keys.size) { - if (true_default) { - validate_each_keys(array, get_key); - } else { - each_key_duplicate("", "", ""); - } - } - if (hydrating && length > 0) { - set_hydrate_node(skip_nodes()); - } - if (!first_run) { - if (defer) { - for (const [key3, item2] of items) { - if (!keys.has(key3)) { - batch.skip_effect(item2.e); - } - } - batch.oncommit(commit); - batch.ondiscard(() => { - }); - } else { - commit(); - } - } - if (mismatch) { - set_hydrating(true); - } - get(each_array); - }); - var state2 = { effect: effect2, flags, items, outrogroups: null, fallback: fallback2 }; - first_run = false; - if (hydrating) { - anchor = hydrate_node; - } -} -function skip_to_branch(effect2) { - while (effect2 !== null && (effect2.f & BRANCH_EFFECT) === 0) { - effect2 = effect2.next; - } - return effect2; -} -function reconcile(state2, array, anchor, flags, get_key) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i; - var is_animated = (flags & EACH_IS_ANIMATED) !== 0; - var length = array.length; - var items = state2.items; - var current = skip_to_branch(state2.effect.first); - var seen; - var prev = null; - var to_animate; - var matched = []; - var stashed = []; - var value; - var key2; - var effect2; - var i; - if (is_animated) { - for (i = 0; i < length; i += 1) { - value = array[i]; - key2 = get_key(value, i); - effect2 = /** @type {EachItem} */ - items.get(key2).e; - if ((effect2.f & EFFECT_OFFSCREEN) === 0) { - (_b = (_a = effect2.nodes) == null ? void 0 : _a.a) == null ? void 0 : _b.measure(); - (to_animate ?? (to_animate = /* @__PURE__ */ new Set())).add(effect2); - } - } - } - for (i = 0; i < length; i += 1) { - value = array[i]; - key2 = get_key(value, i); - effect2 = /** @type {EachItem} */ - items.get(key2).e; - if (state2.outrogroups !== null) { - for (const group of state2.outrogroups) { - group.pending.delete(effect2); - group.done.delete(effect2); - } - } - if ((effect2.f & EFFECT_OFFSCREEN) !== 0) { - effect2.f ^= EFFECT_OFFSCREEN; - if (effect2 === current) { - move(effect2, null, anchor); - } else { - var next2 = prev ? prev.next : current; - if (effect2 === state2.effect.last) { - state2.effect.last = effect2.prev; - } - if (effect2.prev) effect2.prev.next = effect2.next; - if (effect2.next) effect2.next.prev = effect2.prev; - link(state2, prev, effect2); - link(state2, effect2, next2); - move(effect2, next2, anchor); - prev = effect2; - matched = []; - stashed = []; - current = skip_to_branch(prev.next); - continue; - } - } - if ((effect2.f & INERT) !== 0) { - resume_effect(effect2); - if (is_animated) { - (_d = (_c = effect2.nodes) == null ? void 0 : _c.a) == null ? void 0 : _d.unfix(); - (to_animate ?? (to_animate = /* @__PURE__ */ new Set())).delete(effect2); - } - } - if (effect2 !== current) { - if (seen !== void 0 && seen.has(effect2)) { - if (matched.length < stashed.length) { - var start = stashed[0]; - var j; - prev = start.prev; - var a = matched[0]; - var b = matched[matched.length - 1]; - for (j = 0; j < matched.length; j += 1) { - move(matched[j], start, anchor); - } - for (j = 0; j < stashed.length; j += 1) { - seen.delete(stashed[j]); - } - link(state2, a.prev, b.next); - link(state2, prev, a); - link(state2, b, start); - current = start; - prev = b; - i -= 1; - matched = []; - stashed = []; - } else { - seen.delete(effect2); - move(effect2, current, anchor); - link(state2, effect2.prev, effect2.next); - link(state2, effect2, prev === null ? state2.effect.first : prev.next); - link(state2, prev, effect2); - prev = effect2; - } - continue; - } - matched = []; - stashed = []; - while (current !== null && current !== effect2) { - (seen ?? (seen = /* @__PURE__ */ new Set())).add(current); - stashed.push(current); - current = skip_to_branch(current.next); - } - if (current === null) { - continue; - } - } - if ((effect2.f & EFFECT_OFFSCREEN) === 0) { - matched.push(effect2); - } - prev = effect2; - current = skip_to_branch(effect2.next); - } - if (state2.outrogroups !== null) { - for (const group of state2.outrogroups) { - if (group.pending.size === 0) { - destroy_effects(array_from(group.done)); - (_e = state2.outrogroups) == null ? void 0 : _e.delete(group); - } - } - if (state2.outrogroups.size === 0) { - state2.outrogroups = null; - } - } - if (current !== null || seen !== void 0) { - var to_destroy = []; - if (seen !== void 0) { - for (effect2 of seen) { - if ((effect2.f & INERT) === 0) { - to_destroy.push(effect2); - } - } - } - while (current !== null) { - if ((current.f & INERT) === 0 && current !== state2.fallback) { - to_destroy.push(current); - } - current = skip_to_branch(current.next); - } - var destroy_length = to_destroy.length; - if (destroy_length > 0) { - var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null; - if (is_animated) { - for (i = 0; i < destroy_length; i += 1) { - (_g = (_f = to_destroy[i].nodes) == null ? void 0 : _f.a) == null ? void 0 : _g.measure(); - } - for (i = 0; i < destroy_length; i += 1) { - (_i = (_h = to_destroy[i].nodes) == null ? void 0 : _h.a) == null ? void 0 : _i.fix(); - } - } - pause_effects(state2, to_destroy, controlled_anchor); - } - } - if (is_animated) { - queue_micro_task(() => { - var _a2, _b2; - if (to_animate === void 0) return; - for (effect2 of to_animate) { - (_b2 = (_a2 = effect2.nodes) == null ? void 0 : _a2.a) == null ? void 0 : _b2.apply(); - } - }); - } -} -function create_item(items, anchor, value, key2, index2, render_fn, flags, get_collection) { - var v = (flags & EACH_ITEM_REACTIVE) !== 0 ? (flags & EACH_ITEM_IMMUTABLE) === 0 ? mutable_source(value, false, false) : source(value) : null; - var i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index2) : null; - if (true_default && v) { - v.trace = () => { - get_collection()[(i == null ? void 0 : i.v) ?? index2]; - }; - } - return { - v, - i, - e: branch(() => { - render_fn(anchor, v ?? value, i ?? index2, get_collection); - return () => { - items.delete(key2); - }; - }) - }; -} -function move(effect2, next2, anchor) { - if (!effect2.nodes) return; - var node = effect2.nodes.start; - var end = effect2.nodes.end; - var dest = next2 && (next2.f & EFFECT_OFFSCREEN) === 0 ? ( - /** @type {EffectNodes} */ - next2.nodes.start - ) : anchor; - while (node !== null) { - var next_node = ( - /** @type {TemplateNode} */ - get_next_sibling(node) - ); - dest.before(node); - if (node === end) { - return; - } - node = next_node; - } -} -function link(state2, prev, next2) { - if (prev === null) { - state2.effect.first = next2; - } else { - prev.next = next2; - } - if (next2 === null) { - state2.effect.last = prev; - } else { - next2.prev = prev; - } -} -function validate_each_keys(array, key_fn) { - const keys = /* @__PURE__ */ new Map(); - const length = array.length; - for (let i = 0; i < length; i++) { - const key2 = key_fn(array[i], i); - if (keys.has(key2)) { - const a = String(keys.get(key2)); - const b = String(i); - let k = String(key2); - if (k.startsWith("[object ")) k = null; - each_key_duplicate(a, b, k); - } - keys.set(key2, i); - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/html.js -function check_hash(element2, server_hash, value) { - var _a, _b; - if (!server_hash || server_hash === hash(String(value ?? ""))) return; - let location; - const loc = (_a = element2.__svelte_meta) == null ? void 0 : _a.loc; - if (loc) { - location = `near ${loc.file}:${loc.line}:${loc.column}`; - } else if ((_b = dev_current_component_function) == null ? void 0 : _b[FILENAME]) { - location = `in ${dev_current_component_function[FILENAME]}`; - } - hydration_html_changed(sanitize_location(location)); -} -function html(node, get_value, svg = false, mathml = false, skip_warning = false) { - var anchor = node; - var value = ""; - template_effect(() => { - var effect2 = ( - /** @type {Effect} */ - active_effect - ); - if (value === (value = get_value() ?? "")) { - if (hydrating) hydrate_next(); - return; - } - if (effect2.nodes !== null) { - remove_effect_dom( - effect2.nodes.start, - /** @type {TemplateNode} */ - effect2.nodes.end - ); - effect2.nodes = null; - } - if (value === "") return; - if (hydrating) { - var hash2 = ( - /** @type {Comment} */ - hydrate_node.data - ); - var next2 = hydrate_next(); - var last = next2; - while (next2 !== null && (next2.nodeType !== COMMENT_NODE || /** @type {Comment} */ - next2.data !== "")) { - last = next2; - next2 = get_next_sibling(next2); - } - if (next2 === null) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - if (true_default && !skip_warning) { - check_hash( - /** @type {Element} */ - next2.parentNode, - hash2, - value - ); - } - assign_nodes(hydrate_node, last); - anchor = set_hydrate_node(next2); - return; - } - var html2 = value + ""; - if (svg) html2 = `${html2}`; - else if (mathml) html2 = `${html2}`; - var node2 = create_fragment_from_html(html2); - if (svg || mathml) { - node2 = /** @type {Element} */ - get_first_child(node2); - } - assign_nodes( - /** @type {TemplateNode} */ - get_first_child(node2), - /** @type {TemplateNode} */ - node2.lastChild - ); - if (svg || mathml) { - while (get_first_child(node2)) { - anchor.before( - /** @type {TemplateNode} */ - get_first_child(node2) - ); - } - } else { - anchor.before(node2); - } - }); -} - -// node_modules/svelte/src/internal/client/dom/blocks/slot.js -function slot(anchor, $$props, name, slot_props, fallback_fn) { - var _a; - if (hydrating) { - hydrate_next(); - } - var slot_fn = (_a = $$props.$$slots) == null ? void 0 : _a[name]; - var is_interop = false; - if (slot_fn === true) { - slot_fn = $$props[name === "default" ? "children" : name]; - is_interop = true; - } - if (slot_fn === void 0) { - if (fallback_fn !== null) { - fallback_fn(anchor); - } - } else { - slot_fn(anchor, is_interop ? () => slot_props : slot_props); - } -} -function sanitize_slots(props) { - const sanitized = {}; - if (props.children) sanitized.default = true; - for (const key2 in props.$$slots) { - sanitized[key2] = true; - } - return sanitized; -} - -// node_modules/svelte/src/internal/shared/validate.js -function validate_void_dynamic_element(tag_fn) { - const tag2 = tag_fn(); - if (tag2 && is_void(tag2)) { - dynamic_void_element_content(tag2); - } -} -function validate_dynamic_element_tag(tag_fn) { - const tag2 = tag_fn(); - const is_string = typeof tag2 === "string"; - if (tag2 && !is_string) { - svelte_element_invalid_this_value(); - } -} -function validate_store(store, name) { - if (store != null && typeof store.subscribe !== "function") { - store_invalid_shape(name); - } -} -function prevent_snippet_stringification(fn) { - fn.toString = () => { - snippet_without_render_tag(); - return ""; - }; - return fn; -} - -// node_modules/svelte/src/internal/client/dom/blocks/snippet.js -function snippet(node, get_snippet, ...args) { - var branches = new BranchManager(node); - block(() => { - const snippet2 = get_snippet() ?? null; - if (true_default && snippet2 == null) { - invalid_snippet(); - } - branches.ensure(snippet2, snippet2 && ((anchor) => snippet2(anchor, ...args))); - }, EFFECT_TRANSPARENT); -} -function wrap_snippet(component2, fn) { - const snippet2 = (node, ...args) => { - var previous_component_function = dev_current_component_function; - set_dev_current_component_function(component2); - try { - return fn(node, ...args); - } finally { - set_dev_current_component_function(previous_component_function); - } - }; - prevent_snippet_stringification(snippet2); - return snippet2; -} -function createRawSnippet(fn) { - return (anchor, ...params) => { - var _a; - var snippet2 = fn(...params); - var element2; - if (hydrating) { - element2 = /** @type {Element} */ - hydrate_node; - hydrate_next(); - } else { - var html2 = snippet2.render().trim(); - var fragment = create_fragment_from_html(html2, true); - element2 = /** @type {Element} */ - get_first_child(fragment); - if (true_default && (get_next_sibling(element2) !== null || element2.nodeType !== ELEMENT_NODE)) { - invalid_raw_snippet_render(); - } - anchor.before(element2); - } - const result = (_a = snippet2.setup) == null ? void 0 : _a.call(snippet2, element2); - assign_nodes(element2, element2); - if (typeof result === "function") { - teardown(result); - } - }; -} - -// node_modules/svelte/src/internal/client/dom/blocks/svelte-component.js -function component(node, get_component, render_fn) { - if (hydrating) { - hydrate_next(); - } - var branches = new BranchManager(node); - block(() => { - var component2 = get_component() ?? null; - branches.ensure(component2, component2 && ((target) => render_fn(target, component2))); - }, EFFECT_TRANSPARENT); -} - -// node_modules/svelte/src/internal/client/timing.js -var now = true_default ? () => performance.now() : () => Date.now(); -var raf = { - // don't access requestAnimationFrame eagerly outside method - // this allows basic testing of user code without JSDOM - // bunder will eval and remove ternary when the user's app is built - tick: ( - /** @param {any} _ */ - (_) => (true_default ? requestAnimationFrame : noop)(_) - ), - now: () => now(), - tasks: /* @__PURE__ */ new Set() -}; - -// node_modules/svelte/src/internal/client/loop.js -function run_tasks() { - const now2 = raf.now(); - raf.tasks.forEach((task) => { - if (!task.c(now2)) { - raf.tasks.delete(task); - task.f(); - } - }); - if (raf.tasks.size !== 0) { - raf.tick(run_tasks); - } -} -function loop(callback) { - let task; - if (raf.tasks.size === 0) { - raf.tick(run_tasks); - } - return { - promise: new Promise((fulfill) => { - raf.tasks.add(task = { c: callback, f: fulfill }); - }), - abort() { - raf.tasks.delete(task); - } - }; -} - -// node_modules/svelte/src/internal/client/dom/elements/transitions.js -function dispatch_event(element2, type) { - without_reactive_context(() => { - element2.dispatchEvent(new CustomEvent(type)); - }); -} -function css_property_to_camelcase(style) { - if (style === "float") return "cssFloat"; - if (style === "offset") return "cssOffset"; - if (style.startsWith("--")) return style; - const parts = style.split("-"); - if (parts.length === 1) return parts[0]; - return parts[0] + parts.slice(1).map( - /** @param {any} word */ - (word) => word[0].toUpperCase() + word.slice(1) - ).join(""); -} -function css_to_keyframe(css) { - const keyframe = {}; - const parts = css.split(";"); - for (const part of parts) { - const [property, value] = part.split(":"); - if (!property || value === void 0) break; - const formatted_property = css_property_to_camelcase(property.trim()); - keyframe[formatted_property] = value.trim(); - } - return keyframe; -} -var linear = (t) => t; -var animation_effect_override = null; -function set_animation_effect_override(v) { - animation_effect_override = v; -} -function animation(element2, get_fn, get_params) { - var effect2 = animation_effect_override ?? /** @type {Effect} */ - active_effect; - var nodes = ( - /** @type {EffectNodes} */ - effect2.nodes - ); - var from; - var to; - var animation2; - var original_styles = null; - nodes.a ?? (nodes.a = { - element: element2, - measure() { - from = this.element.getBoundingClientRect(); - }, - apply() { - animation2 == null ? void 0 : animation2.abort(); - to = this.element.getBoundingClientRect(); - if (from.left !== to.left || from.right !== to.right || from.top !== to.top || from.bottom !== to.bottom) { - const options = get_fn()(this.element, { from, to }, get_params == null ? void 0 : get_params()); - animation2 = animate(this.element, options, void 0, 1, () => { - animation2 == null ? void 0 : animation2.abort(); - animation2 = void 0; - }); - } - }, - fix() { - if (element2.getAnimations().length) return; - var { position, width, height } = getComputedStyle(element2); - if (position !== "absolute" && position !== "fixed") { - var style = ( - /** @type {HTMLElement | SVGElement} */ - element2.style - ); - original_styles = { - position: style.position, - width: style.width, - height: style.height, - transform: style.transform - }; - style.position = "absolute"; - style.width = width; - style.height = height; - var to2 = element2.getBoundingClientRect(); - if (from.left !== to2.left || from.top !== to2.top) { - var transform = `translate(${from.left - to2.left}px, ${from.top - to2.top}px)`; - style.transform = style.transform ? `${style.transform} ${transform}` : transform; - } - } - }, - unfix() { - if (original_styles) { - var style = ( - /** @type {HTMLElement | SVGElement} */ - element2.style - ); - style.position = original_styles.position; - style.width = original_styles.width; - style.height = original_styles.height; - style.transform = original_styles.transform; - } - } - }); - nodes.a.element = element2; -} -function transition(flags, element2, get_fn, get_params) { - var _a; - var is_intro = (flags & TRANSITION_IN) !== 0; - var is_outro = (flags & TRANSITION_OUT) !== 0; - var is_both = is_intro && is_outro; - var is_global = (flags & TRANSITION_GLOBAL) !== 0; - var direction = is_both ? "both" : is_intro ? "in" : "out"; - var current_options; - var inert = element2.inert; - var overflow = element2.style.overflow; - var intro; - var outro; - function get_options() { - return without_reactive_context(() => { - return current_options ?? (current_options = get_fn()(element2, (get_params == null ? void 0 : get_params()) ?? /** @type {P} */ - {}, { - direction - })); - }); - } - var transition2 = { - is_global, - in() { - var _a2; - element2.inert = inert; - if (!is_intro) { - outro == null ? void 0 : outro.abort(); - (_a2 = outro == null ? void 0 : outro.reset) == null ? void 0 : _a2.call(outro); - return; - } - if (!is_outro) { - intro == null ? void 0 : intro.abort(); - } - intro = animate(element2, get_options(), outro, 1, () => { - dispatch_event(element2, "introend"); - intro == null ? void 0 : intro.abort(); - intro = current_options = void 0; - element2.style.overflow = overflow; - }); - }, - out(fn) { - if (!is_outro) { - fn == null ? void 0 : fn(); - current_options = void 0; - return; - } - element2.inert = true; - outro = animate(element2, get_options(), intro, 0, () => { - dispatch_event(element2, "outroend"); - fn == null ? void 0 : fn(); - }); - }, - stop: () => { - intro == null ? void 0 : intro.abort(); - outro == null ? void 0 : outro.abort(); - } - }; - var e = ( - /** @type {Effect & { nodes: EffectNodes }} */ - active_effect - ); - ((_a = e.nodes).t ?? (_a.t = [])).push(transition2); - if (is_intro && should_intro) { - var run3 = is_global; - if (!run3) { - var block2 = ( - /** @type {Effect | null} */ - e.parent - ); - while (block2 && (block2.f & EFFECT_TRANSPARENT) !== 0) { - while (block2 = block2.parent) { - if ((block2.f & BLOCK_EFFECT) !== 0) break; - } - } - run3 = !block2 || (block2.f & REACTION_RAN) !== 0; - } - if (run3) { - effect(() => { - untrack(() => transition2.in()); - }); - } - } -} -function animate(element2, options, counterpart, t2, on_finish) { - var is_intro = t2 === 1; - if (is_function(options)) { - var a; - var aborted2 = false; - queue_micro_task(() => { - if (aborted2) return; - var o = options({ direction: is_intro ? "in" : "out" }); - a = animate(element2, o, counterpart, t2, on_finish); - }); - return { - abort: () => { - aborted2 = true; - a == null ? void 0 : a.abort(); - }, - deactivate: () => a.deactivate(), - reset: () => a.reset(), - t: () => a.t() - }; - } - counterpart == null ? void 0 : counterpart.deactivate(); - if (!(options == null ? void 0 : options.duration) && !(options == null ? void 0 : options.delay)) { - dispatch_event(element2, is_intro ? "introstart" : "outrostart"); - on_finish(); - return { - abort: noop, - deactivate: noop, - reset: noop, - t: () => t2 - }; - } - const { delay = 0, css, tick: tick2, easing = linear } = options; - var keyframes = []; - if (is_intro && counterpart === void 0) { - if (tick2) { - tick2(0, 1); - } - if (css) { - var styles = css_to_keyframe(css(0, 1)); - keyframes.push(styles, styles); - } - } - var get_t = () => 1 - t2; - var animation2 = element2.animate(keyframes, { duration: delay, fill: "forwards" }); - animation2.onfinish = () => { - animation2.cancel(); - dispatch_event(element2, is_intro ? "introstart" : "outrostart"); - var t1 = (counterpart == null ? void 0 : counterpart.t()) ?? 1 - t2; - counterpart == null ? void 0 : counterpart.abort(); - var delta = t2 - t1; - var duration = ( - /** @type {number} */ - options.duration * Math.abs(delta) - ); - var keyframes2 = []; - if (duration > 0) { - var needs_overflow_hidden = false; - if (css) { - var n = Math.ceil(duration / (1e3 / 60)); - for (var i = 0; i <= n; i += 1) { - var t = t1 + delta * easing(i / n); - var styles2 = css_to_keyframe(css(t, 1 - t)); - keyframes2.push(styles2); - needs_overflow_hidden || (needs_overflow_hidden = styles2.overflow === "hidden"); - } - } - if (needs_overflow_hidden) { - element2.style.overflow = "hidden"; - } - get_t = () => { - var time = ( - /** @type {number} */ - /** @type {globalThis.Animation} */ - animation2.currentTime - ); - return t1 + delta * easing(time / duration); - }; - if (tick2) { - loop(() => { - if (animation2.playState !== "running") return false; - var t3 = get_t(); - tick2(t3, 1 - t3); - return true; - }); - } - } - animation2 = element2.animate(keyframes2, { duration, fill: "forwards" }); - animation2.onfinish = () => { - get_t = () => t2; - tick2 == null ? void 0 : tick2(t2, 1 - t2); - on_finish(); - }; - }; - return { - abort: () => { - if (animation2) { - animation2.cancel(); - animation2.effect = null; - animation2.onfinish = noop; - } - }, - deactivate: () => { - on_finish = noop; - }, - reset: () => { - if (t2 === 0) { - tick2 == null ? void 0 : tick2(1, 0); - } - }, - t: () => get_t() - }; -} - -// node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js -function element(node, get_tag, is_svg, render_fn, get_namespace, location) { - var _a; - let was_hydrating = hydrating; - if (hydrating) { - hydrate_next(); - } - var filename = true_default && location && ((_a = component_context) == null ? void 0 : _a.function[FILENAME]); - var element2 = null; - if (hydrating && hydrate_node.nodeType === ELEMENT_NODE) { - element2 = /** @type {Element} */ - hydrate_node; - hydrate_next(); - } - var anchor = ( - /** @type {TemplateNode} */ - hydrating ? hydrate_node : node - ); - var parent_effect = ( - /** @type {Effect} */ - active_effect - ); - var branches = new BranchManager(anchor, false); - block(() => { - const next_tag = get_tag() || null; - var ns = get_namespace ? get_namespace() : is_svg || next_tag === "svg" ? NAMESPACE_SVG : void 0; - if (next_tag === null) { - branches.ensure(null, null); - set_should_intro(true); - return; - } - branches.ensure(next_tag, (anchor2) => { - if (next_tag) { - element2 = hydrating ? ( - /** @type {Element} */ - element2 - ) : create_element(next_tag, ns); - if (true_default && location) { - element2.__svelte_meta = { - parent: dev_stack, - loc: { - file: filename, - line: location[0], - column: location[1] - } - }; - } - assign_nodes(element2, element2); - if (render_fn) { - if (hydrating && is_raw_text_element(next_tag)) { - element2.append(document.createComment("")); - } - var child_anchor = hydrating ? get_first_child(element2) : element2.appendChild(create_text()); - if (hydrating) { - if (child_anchor === null) { - set_hydrating(false); - } else { - set_hydrate_node(child_anchor); - } - } - set_animation_effect_override(parent_effect); - render_fn(element2, child_anchor); - set_animation_effect_override(null); - } - active_effect.nodes.end = element2; - anchor2.before(element2); - } - if (hydrating) { - set_hydrate_node(anchor2); - } - }); - set_should_intro(true); - return () => { - if (next_tag) { - set_should_intro(false); - } - }; - }, EFFECT_TRANSPARENT); - teardown(() => { - set_should_intro(true); - }); - if (was_hydrating) { - set_hydrating(true); - set_hydrate_node(anchor); - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js -function head(hash2, render_fn) { - let previous_hydrate_node = null; - let was_hydrating = hydrating; - var anchor; - if (hydrating) { - previous_hydrate_node = hydrate_node; - var head_anchor = get_first_child(document.head); - while (head_anchor !== null && (head_anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ - head_anchor.data !== hash2)) { - head_anchor = get_next_sibling(head_anchor); - } - if (head_anchor === null) { - set_hydrating(false); - } else { - var start = ( - /** @type {TemplateNode} */ - get_next_sibling(head_anchor) - ); - head_anchor.remove(); - set_hydrate_node(start); - } - } - if (!hydrating) { - anchor = document.head.appendChild(create_text()); - } - try { - block(() => render_fn(anchor), HEAD_EFFECT); - } finally { - if (was_hydrating) { - set_hydrating(true); - set_hydrate_node( - /** @type {TemplateNode} */ - previous_hydrate_node - ); - } - } -} - -// node_modules/svelte/src/internal/client/dom/css.js -function append_styles(anchor, css) { - effect(() => { - var root = anchor.getRootNode(); - var target = ( - /** @type {ShadowRoot} */ - root.host ? ( - /** @type {ShadowRoot} */ - root - ) : ( - /** @type {Document} */ - root.head ?? /** @type {Document} */ - root.ownerDocument.head - ) - ); - if (!target.querySelector("#" + css.hash)) { - const style = create_element("style"); - style.id = css.hash; - style.textContent = css.code; - target.appendChild(style); - if (true_default) { - register_style(css.hash, style); - } - } - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/actions.js -function action(dom, action2, get_value) { - effect(() => { - var payload = untrack(() => action2(dom, get_value == null ? void 0 : get_value()) || {}); - if (get_value && (payload == null ? void 0 : payload.update)) { - var inited = false; - var prev = ( - /** @type {any} */ - {} - ); - render_effect(() => { - var value = get_value(); - deep_read_state(value); - if (inited && safe_not_equal(prev, value)) { - prev = value; - payload.update(value); - } - }); - inited = true; - } - if (payload == null ? void 0 : payload.destroy) { - return () => ( - /** @type {Function} */ - payload.destroy() - ); - } - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/attachments.js -function attach(node, get_fn) { - var fn = void 0; - var e; - managed(() => { - if (fn !== (fn = get_fn())) { - if (e) { - destroy_effect(e); - e = null; - } - if (fn) { - e = branch(() => { - effect(() => ( - /** @type {(node: Element) => void} */ - fn(node) - )); - }); - } - } - }); -} - -// node_modules/svelte/src/escaping.js -var ATTR_REGEX = /[&"<]/g; -var CONTENT_REGEX = /[&<]/g; -function escape_html(value, is_attr) { - const str = String(value ?? ""); - const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX; - pattern.lastIndex = 0; - let escaped = ""; - let last = 0; - while (pattern.test(str)) { - const i = pattern.lastIndex - 1; - const ch = str[i]; - escaped += str.substring(last, i) + (ch === "&" ? "&" : ch === '"' ? """ : "<"); - last = i + 1; - } - return escaped + str.substring(last); -} - -// node_modules/svelte/src/internal/shared/attributes.js -var replacements = { - translate: /* @__PURE__ */ new Map([ - [true, "yes"], - [false, "no"] - ]) -}; -function attr(name, value, is_boolean = false) { - if (name === "hidden" && value !== "until-found") { - is_boolean = true; - } - if (value == null || !value && is_boolean) return ""; - const normalized = name in replacements && replacements[name].get(value) || value; - const assignment = is_boolean ? `=""` : `="${escape_html(normalized, true)}"`; - return ` ${name}${assignment}`; -} -function clsx2(value) { - if (typeof value === "object") { - return clsx(value); - } else { - return value ?? ""; - } -} -var whitespace = [..." \n\r\f \v\uFEFF"]; -function to_class(value, hash2, directives) { - var classname = value == null ? "" : "" + value; - if (hash2) { - classname = classname ? classname + " " + hash2 : hash2; - } - if (directives) { - for (var key2 in directives) { - if (directives[key2]) { - classname = classname ? classname + " " + key2 : key2; - } else if (classname.length) { - var len = key2.length; - var a = 0; - while ((a = classname.indexOf(key2, a)) >= 0) { - var b = a + len; - if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) { - classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1); - } else { - a = b; - } - } - } - } - } - return classname === "" ? null : classname; -} -function append_styles2(styles, important = false) { - var separator = important ? " !important;" : ";"; - var css = ""; - for (var key2 in styles) { - var value = styles[key2]; - if (value != null && value !== "") { - css += " " + key2 + ": " + value + separator; - } - } - return css; -} -function to_css_name(name) { - if (name[0] !== "-" || name[1] !== "-") { - return name.toLowerCase(); - } - return name; -} -function to_style(value, styles) { - if (styles) { - var new_style = ""; - var normal_styles; - var important_styles; - if (Array.isArray(styles)) { - normal_styles = styles[0]; - important_styles = styles[1]; - } else { - normal_styles = styles; - } - if (value) { - value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim(); - var in_str = false; - var in_apo = 0; - var in_comment = false; - var reserved_names = []; - if (normal_styles) { - reserved_names.push(...Object.keys(normal_styles).map(to_css_name)); - } - if (important_styles) { - reserved_names.push(...Object.keys(important_styles).map(to_css_name)); - } - var start_index = 0; - var name_index = -1; - const len = value.length; - for (var i = 0; i < len; i++) { - var c = value[i]; - if (in_comment) { - if (c === "/" && value[i - 1] === "*") { - in_comment = false; - } - } else if (in_str) { - if (in_str === c) { - in_str = false; - } - } else if (c === "/" && value[i + 1] === "*") { - in_comment = true; - } else if (c === '"' || c === "'") { - in_str = c; - } else if (c === "(") { - in_apo++; - } else if (c === ")") { - in_apo--; - } - if (!in_comment && in_str === false && in_apo === 0) { - if (c === ":" && name_index === -1) { - name_index = i; - } else if (c === ";" || i === len - 1) { - if (name_index !== -1) { - var name = to_css_name(value.substring(start_index, name_index).trim()); - if (!reserved_names.includes(name)) { - if (c !== ";") { - i++; - } - var property = value.substring(start_index, i).trim(); - new_style += " " + property + ";"; - } - } - start_index = i + 1; - name_index = -1; - } - } - } - } - if (normal_styles) { - new_style += append_styles2(normal_styles); - } - if (important_styles) { - new_style += append_styles2(important_styles, true); - } - new_style = new_style.trim(); - return new_style === "" ? null : new_style; - } - return value == null ? null : String(value); -} - -// node_modules/svelte/src/internal/client/dom/elements/class.js -function set_class(dom, is_html, value, hash2, prev_classes, next_classes) { - var prev = dom.__className; - if (hydrating || prev !== value || prev === void 0) { - var next_class_name = to_class(value, hash2, next_classes); - if (!hydrating || next_class_name !== dom.getAttribute("class")) { - if (next_class_name == null) { - dom.removeAttribute("class"); - } else if (is_html) { - dom.className = next_class_name; - } else { - dom.setAttribute("class", next_class_name); - } - } - dom.__className = value; - } else if (next_classes && prev_classes !== next_classes) { - for (var key2 in next_classes) { - var is_present = !!next_classes[key2]; - if (prev_classes == null || is_present !== !!prev_classes[key2]) { - dom.classList.toggle(key2, is_present); - } - } - } - return next_classes; -} - -// node_modules/svelte/src/internal/client/dom/elements/style.js -function update_styles(dom, prev = {}, next2, priority) { - for (var key2 in next2) { - var value = next2[key2]; - if (prev[key2] !== value) { - if (next2[key2] == null) { - dom.style.removeProperty(key2); - } else { - dom.style.setProperty(key2, value, priority); - } - } - } -} -function set_style(dom, value, prev_styles, next_styles) { - var prev = dom.__style; - if (hydrating || prev !== value) { - var next_style_attr = to_style(value, next_styles); - if (!hydrating || next_style_attr !== dom.getAttribute("style")) { - if (next_style_attr == null) { - dom.removeAttribute("style"); - } else { - dom.style.cssText = next_style_attr; - } - } - dom.__style = value; - } else if (next_styles) { - if (Array.isArray(next_styles)) { - update_styles(dom, prev_styles == null ? void 0 : prev_styles[0], next_styles[0]); - update_styles(dom, prev_styles == null ? void 0 : prev_styles[1], next_styles[1], "important"); - } else { - update_styles(dom, prev_styles, next_styles); - } - } - return next_styles; -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/select.js -function select_option(select, value, mounting = false) { - if (select.multiple) { - if (value == void 0) { - return; - } - if (!is_array(value)) { - return select_multiple_invalid_value(); - } - for (var option of select.options) { - option.selected = value.includes(get_option_value(option)); - } - return; - } - for (option of select.options) { - var option_value = get_option_value(option); - if (is(option_value, value)) { - option.selected = true; - return; - } - } - if (!mounting || value !== void 0) { - select.selectedIndex = -1; - } -} -function init_select(select) { - var observer = new MutationObserver(() => { - select_option(select, select.__value); - }); - observer.observe(select, { - // Listen to option element changes - childList: true, - subtree: true, - // because of - // Listen to option element value attribute changes - // (doesn't get notified of select value changes, - // because that property is not reflected as an attribute) - attributes: true, - attributeFilter: ["value"] - }); - teardown(() => { - observer.disconnect(); - }); -} -function bind_select_value(select, get3, set2 = get3) { - var batches = /* @__PURE__ */ new WeakSet(); - var mounting = true; - listen_to_event_and_reset_event(select, "change", (is_reset) => { - var query = is_reset ? "[selected]" : ":checked"; - var value; - if (select.multiple) { - value = [].map.call(select.querySelectorAll(query), get_option_value); - } else { - var selected_option = select.querySelector(query) ?? // will fall back to first non-disabled option if no option is selected - select.querySelector("option:not([disabled])"); - value = selected_option && get_option_value(selected_option); - } - set2(value); - if (current_batch !== null) { - batches.add(current_batch); - } - }); - effect(() => { - var value = get3(); - if (select === document.activeElement) { - var batch = ( - /** @type {Batch} */ - previous_batch ?? current_batch - ); - if (batches.has(batch)) { - return; - } - } - select_option(select, value, mounting); - if (mounting && value === void 0) { - var selected_option = select.querySelector(":checked"); - if (selected_option !== null) { - value = get_option_value(selected_option); - set2(value); - } - } - select.__value = value; - mounting = false; - }); - init_select(select); -} -function get_option_value(option) { - if ("__value" in option) { - return option.__value; - } else { - return option.value; - } -} - -// node_modules/svelte/src/internal/client/dom/elements/attributes.js -var CLASS = Symbol("class"); -var STYLE = Symbol("style"); -var IS_CUSTOM_ELEMENT = Symbol("is custom element"); -var IS_HTML = Symbol("is html"); -var LINK_TAG = IS_XHTML ? "link" : "LINK"; -var INPUT_TAG = IS_XHTML ? "input" : "INPUT"; -var OPTION_TAG = IS_XHTML ? "option" : "OPTION"; -var SELECT_TAG = IS_XHTML ? "select" : "SELECT"; -var PROGRESS_TAG = IS_XHTML ? "progress" : "PROGRESS"; -function remove_input_defaults(input) { - if (!hydrating) return; - var already_removed = false; - var remove_defaults = () => { - if (already_removed) return; - already_removed = true; - if (input.hasAttribute("value")) { - var value = input.value; - set_attribute(input, "value", null); - input.value = value; - } - if (input.hasAttribute("checked")) { - var checked = input.checked; - set_attribute(input, "checked", null); - input.checked = checked; - } - }; - input.__on_r = remove_defaults; - queue_micro_task(remove_defaults); - add_form_reset_listener(); -} -function set_value(element2, value) { - var attributes = get_attributes(element2); - if (attributes.value === (attributes.value = // treat null and undefined the same for the initial value - value ?? void 0) || // @ts-expect-error - // `progress` elements always need their value set when it's `0` - element2.value === value && (value !== 0 || element2.nodeName !== PROGRESS_TAG)) { - return; - } - element2.value = value ?? ""; -} -function set_checked(element2, checked) { - var attributes = get_attributes(element2); - if (attributes.checked === (attributes.checked = // treat null and undefined the same for the initial value - checked ?? void 0)) { - return; - } - element2.checked = checked; -} -function set_selected(element2, selected) { - if (selected) { - if (!element2.hasAttribute("selected")) { - element2.setAttribute("selected", ""); - } - } else { - element2.removeAttribute("selected"); - } -} -function set_default_checked(element2, checked) { - const existing_value = element2.checked; - element2.defaultChecked = checked; - element2.checked = existing_value; -} -function set_default_value(element2, value) { - const existing_value = element2.value; - element2.defaultValue = value; - element2.value = existing_value; -} -function set_attribute(element2, attribute, value, skip_warning) { - var attributes = get_attributes(element2); - if (hydrating) { - attributes[attribute] = element2.getAttribute(attribute); - if (attribute === "src" || attribute === "srcset" || attribute === "href" && element2.nodeName === LINK_TAG) { - if (!skip_warning) { - check_src_in_dev_hydration(element2, attribute, value ?? ""); - } - return; - } - } - if (attributes[attribute] === (attributes[attribute] = value)) return; - if (attribute === "loading") { - element2[LOADING_ATTR_SYMBOL] = value; - } - if (value == null) { - element2.removeAttribute(attribute); - } else if (typeof value !== "string" && get_setters(element2).includes(attribute)) { - element2[attribute] = value; - } else { - element2.setAttribute(attribute, value); - } -} -function set_xlink_attribute(dom, attribute, value) { - dom.setAttributeNS("http://www.w3.org/1999/xlink", attribute, value); -} -function set_custom_element_data(node, prop2, value) { - var previous_reaction = active_reaction; - var previous_effect = active_effect; - let was_hydrating = hydrating; - if (hydrating) { - set_hydrating(false); - } - set_active_reaction(null); - set_active_effect(null); - try { - if ( - // `style` should use `set_attribute` rather than the setter - prop2 !== "style" && // Don't compute setters for custom elements while they aren't registered yet, - // because during their upgrade/instantiation they might add more setters. - // Instead, fall back to a simple "an object, then set as property" heuristic. - (setters_cache.has(node.getAttribute("is") || node.nodeName) || // customElements may not be available in browser extension contexts - !customElements || customElements.get(node.getAttribute("is") || node.nodeName.toLowerCase()) ? get_setters(node).includes(prop2) : value && typeof value === "object") - ) { - node[prop2] = value; - } else { - set_attribute(node, prop2, value == null ? value : String(value)); - } - } finally { - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - if (was_hydrating) { - set_hydrating(true); - } - } -} -function set_attributes(element2, prev, next2, css_hash, should_remove_defaults = false, skip_warning = false) { - if (hydrating && should_remove_defaults && element2.nodeName === INPUT_TAG) { - var input = ( - /** @type {HTMLInputElement} */ - element2 - ); - var attribute = input.type === "checkbox" ? "defaultChecked" : "defaultValue"; - if (!(attribute in next2)) { - remove_input_defaults(input); - } - } - var attributes = get_attributes(element2); - var is_custom_element = attributes[IS_CUSTOM_ELEMENT]; - var preserve_attribute_case = !attributes[IS_HTML]; - let is_hydrating_custom_element = hydrating && is_custom_element; - if (is_hydrating_custom_element) { - set_hydrating(false); - } - var current = prev || {}; - var is_option_element = element2.nodeName === OPTION_TAG; - for (var key2 in prev) { - if (!(key2 in next2)) { - next2[key2] = null; - } - } - if (next2.class) { - next2.class = clsx2(next2.class); - } else if (css_hash || next2[CLASS]) { - next2.class = null; - } - if (next2[STYLE]) { - next2.style ?? (next2.style = null); - } - var setters = get_setters(element2); - for (const key3 in next2) { - let value = next2[key3]; - if (is_option_element && key3 === "value" && value == null) { - element2.value = element2.__value = ""; - current[key3] = value; - continue; - } - if (key3 === "class") { - var is_html = element2.namespaceURI === "http://www.w3.org/1999/xhtml"; - set_class(element2, is_html, value, css_hash, prev == null ? void 0 : prev[CLASS], next2[CLASS]); - current[key3] = value; - current[CLASS] = next2[CLASS]; - continue; - } - if (key3 === "style") { - set_style(element2, value, prev == null ? void 0 : prev[STYLE], next2[STYLE]); - current[key3] = value; - current[STYLE] = next2[STYLE]; - continue; - } - var prev_value = current[key3]; - if (value === prev_value && !(value === void 0 && element2.hasAttribute(key3))) { - continue; - } - current[key3] = value; - var prefix = key3[0] + key3[1]; - if (prefix === "$$") continue; - if (prefix === "on") { - const opts = {}; - const event_handle_key = "$$" + key3; - let event_name = key3.slice(2); - var is_delegated = can_delegate_event(event_name); - if (is_capture_event(event_name)) { - event_name = event_name.slice(0, -7); - opts.capture = true; - } - if (!is_delegated && prev_value) { - if (value != null) continue; - element2.removeEventListener(event_name, current[event_handle_key], opts); - current[event_handle_key] = null; - } - if (is_delegated) { - delegated(event_name, element2, value); - delegate([event_name]); - } else if (value != null) { - let handle = function(evt) { - current[key3].call(this, evt); - }; - current[event_handle_key] = create_event(event_name, element2, handle, opts); - } - } else if (key3 === "style") { - set_attribute(element2, key3, value); - } else if (key3 === "autofocus") { - autofocus( - /** @type {HTMLElement} */ - element2, - Boolean(value) - ); - } else if (!is_custom_element && (key3 === "__value" || key3 === "value" && value != null)) { - element2.value = element2.__value = value; - } else if (key3 === "selected" && is_option_element) { - set_selected( - /** @type {HTMLOptionElement} */ - element2, - value - ); - } else { - var name = key3; - if (!preserve_attribute_case) { - name = normalize_attribute(name); - } - var is_default = name === "defaultValue" || name === "defaultChecked"; - if (value == null && !is_custom_element && !is_default) { - attributes[key3] = null; - if (name === "value" || name === "checked") { - let input2 = ( - /** @type {HTMLInputElement} */ - element2 - ); - const use_default = prev === void 0; - if (name === "value") { - let previous = input2.defaultValue; - input2.removeAttribute(name); - input2.defaultValue = previous; - input2.value = input2.__value = use_default ? previous : null; - } else { - let previous = input2.defaultChecked; - input2.removeAttribute(name); - input2.defaultChecked = previous; - input2.checked = use_default ? previous : false; - } - } else { - element2.removeAttribute(key3); - } - } else if (is_default || setters.includes(name) && (is_custom_element || typeof value !== "string")) { - element2[name] = value; - if (name in attributes) attributes[name] = UNINITIALIZED; - } else if (typeof value !== "function") { - set_attribute(element2, name, value, skip_warning); - } - } - } - if (is_hydrating_custom_element) { - set_hydrating(true); - } - return current; -} -function attribute_effect(element2, fn, sync = [], async2 = [], blockers = [], css_hash, should_remove_defaults = false, skip_warning = false) { - flatten(blockers, sync, async2, (values) => { - var prev = void 0; - var effects = {}; - var is_select = element2.nodeName === SELECT_TAG; - var inited = false; - managed(() => { - var next2 = fn(...values.map(get)); - var current = set_attributes( - element2, - prev, - next2, - css_hash, - should_remove_defaults, - skip_warning - ); - if (inited && is_select && "value" in next2) { - select_option( - /** @type {HTMLSelectElement} */ - element2, - next2.value - ); - } - for (let symbol of Object.getOwnPropertySymbols(effects)) { - if (!next2[symbol]) destroy_effect(effects[symbol]); - } - for (let symbol of Object.getOwnPropertySymbols(next2)) { - var n = next2[symbol]; - if (symbol.description === ATTACHMENT_KEY && (!prev || n !== prev[symbol])) { - if (effects[symbol]) destroy_effect(effects[symbol]); - effects[symbol] = branch(() => attach(element2, () => n)); - } - current[symbol] = n; - } - prev = current; - }); - if (is_select) { - var select = ( - /** @type {HTMLSelectElement} */ - element2 - ); - effect(() => { - select_option( - select, - /** @type {Record} */ - prev.value, - true - ); - init_select(select); - }); - } - inited = true; - }); -} -function get_attributes(element2) { - return ( - /** @type {Record} **/ - // @ts-expect-error - element2.__attributes ?? (element2.__attributes = { - [IS_CUSTOM_ELEMENT]: element2.nodeName.includes("-"), - [IS_HTML]: element2.namespaceURI === NAMESPACE_HTML - }) - ); -} -var setters_cache = /* @__PURE__ */ new Map(); -function get_setters(element2) { - var cache_key = element2.getAttribute("is") || element2.nodeName; - var setters = setters_cache.get(cache_key); - if (setters) return setters; - setters_cache.set(cache_key, setters = []); - var descriptors; - var proto = element2; - var element_proto = Element.prototype; - while (element_proto !== proto) { - descriptors = get_descriptors(proto); - for (var key2 in descriptors) { - if (descriptors[key2].set) { - setters.push(key2); - } - } - proto = get_prototype_of(proto); - } - return setters; -} -function check_src_in_dev_hydration(element2, attribute, value) { - if (!true_default) return; - if (attribute === "srcset" && srcset_url_equal(element2, value)) return; - if (src_url_equal(element2.getAttribute(attribute) ?? "", value)) return; - hydration_attribute_changed( - attribute, - element2.outerHTML.replace(element2.innerHTML, element2.innerHTML && "..."), - String(value) - ); -} -function src_url_equal(element_src, url) { - if (element_src === url) return true; - return new URL(element_src, document.baseURI).href === new URL(url, document.baseURI).href; -} -function split_srcset(srcset) { - return srcset.split(",").map((src) => src.trim().split(" ").filter(Boolean)); -} -function srcset_url_equal(element2, srcset) { - var element_urls = split_srcset(element2.srcset); - var urls = split_srcset(srcset); - return urls.length === element_urls.length && urls.every( - ([url, width], i) => width === element_urls[i][1] && // We need to test both ways because Vite will create an a full URL with - // `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the - // relative URLs inside srcset are not automatically resolved to absolute URLs by - // browsers (in contrast to img.src). This means both SSR and DOM code could - // contain relative or absolute URLs. - (src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0])) - ); -} - -// node_modules/svelte/src/internal/client/dom/elements/customizable-select.js -var supported = null; -function is_supported() { - var _a, _b; - if (supported === null) { - var select = create_element("select"); - select.innerHTML = ""; - supported = /** @type {Element} */ - ((_b = (_a = select.firstChild) == null ? void 0 : _a.firstChild) == null ? void 0 : _b.nodeType) === 1; - } - return supported; -} -function selectedcontent(element2, update_element) { - if (!is_supported()) return; - attach(element2, () => () => { - const select = element2.closest("select"); - if (!select) return; - const observer = new MutationObserver((entries) => { - var _a, _b; - var selected = false; - for (const entry of entries) { - if (entry.target === element2) { - return; - } - selected || (selected = !!((_b = (_a = entry.target.parentElement) == null ? void 0 : _a.closest("option")) == null ? void 0 : _b.selected)); - } - if (selected) { - element2.replaceWith(element2 = /** @type {HTMLElement} */ - element2.cloneNode(true)); - update_element(element2); - } - }); - observer.observe(select, { - childList: true, - characterData: true, - subtree: true - }); - return () => { - observer.disconnect(); - }; - }); -} -function customizable_select(element2, rich_fn) { - var was_hydrating = hydrating; - if (!is_supported()) { - set_hydrating(false); - element2.textContent = ""; - element2.append(create_comment("")); - } - try { - rich_fn(); - } finally { - if (was_hydrating) { - if (hydrating) { - reset(element2); - } else { - set_hydrating(true); - set_hydrate_node(element2); - } - } - } -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/document.js -function bind_active_element(update2) { - listen(document, ["focusin", "focusout"], (event2) => { - if (event2 && event2.type === "focusout" && /** @type {FocusEvent} */ - event2.relatedTarget) { - return; - } - update2(document.activeElement); - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/input.js -function bind_value(input, get3, set2 = get3) { - var batches = /* @__PURE__ */ new WeakSet(); - listen_to_event_and_reset_event(input, "input", async (is_reset) => { - if (true_default && input.type === "checkbox") { - bind_invalid_checkbox_value(); - } - var value = is_reset ? input.defaultValue : input.value; - value = is_numberlike_input(input) ? to_number(value) : value; - set2(value); - if (current_batch !== null) { - batches.add(current_batch); - } - await tick(); - if (value !== (value = get3())) { - var start = input.selectionStart; - var end = input.selectionEnd; - var length = input.value.length; - input.value = value ?? ""; - if (end !== null) { - var new_length = input.value.length; - if (start === end && end === length && new_length > length) { - input.selectionStart = new_length; - input.selectionEnd = new_length; - } else { - input.selectionStart = start; - input.selectionEnd = Math.min(end, new_length); - } - } - } - }); - if ( - // If we are hydrating and the value has since changed, - // then use the updated value from the input instead. - hydrating && input.defaultValue !== input.value || // If defaultValue is set, then value == defaultValue - // TODO Svelte 6: remove input.value check and set to empty string? - untrack(get3) == null && input.value - ) { - set2(is_numberlike_input(input) ? to_number(input.value) : input.value); - if (current_batch !== null) { - batches.add(current_batch); - } - } - render_effect(() => { - if (true_default && input.type === "checkbox") { - bind_invalid_checkbox_value(); - } - var value = get3(); - if (input === document.activeElement) { - var batch = ( - /** @type {Batch} */ - previous_batch ?? current_batch - ); - if (batches.has(batch)) { - return; - } - } - if (is_numberlike_input(input) && value === to_number(input.value)) { - return; - } - if (input.type === "date" && !value && !input.value) { - return; - } - if (value !== input.value) { - input.value = value ?? ""; - } - }); -} -var pending = /* @__PURE__ */ new Set(); -function bind_group(inputs, group_index, input, get3, set2 = get3) { - var is_checkbox = input.getAttribute("type") === "checkbox"; - var binding_group = inputs; - let hydration_mismatch2 = false; - if (group_index !== null) { - for (var index2 of group_index) { - binding_group = binding_group[index2] ?? (binding_group[index2] = []); - } - } - binding_group.push(input); - listen_to_event_and_reset_event( - input, - "change", - () => { - var value = input.__value; - if (is_checkbox) { - value = get_binding_group_value(binding_group, value, input.checked); - } - set2(value); - }, - // TODO better default value handling - () => set2(is_checkbox ? [] : null) - ); - render_effect(() => { - var value = get3(); - if (hydrating && input.defaultChecked !== input.checked) { - hydration_mismatch2 = true; - return; - } - if (is_checkbox) { - value = value || []; - input.checked = value.includes(input.__value); - } else { - input.checked = is(input.__value, value); - } - }); - teardown(() => { - var index3 = binding_group.indexOf(input); - if (index3 !== -1) { - binding_group.splice(index3, 1); - } - }); - if (!pending.has(binding_group)) { - pending.add(binding_group); - queue_micro_task(() => { - binding_group.sort((a, b) => a.compareDocumentPosition(b) === 4 ? -1 : 1); - pending.delete(binding_group); - }); - } - queue_micro_task(() => { - if (hydration_mismatch2) { - var value; - if (is_checkbox) { - value = get_binding_group_value(binding_group, value, input.checked); - } else { - var hydration_input = binding_group.find((input2) => input2.checked); - value = hydration_input == null ? void 0 : hydration_input.__value; - } - set2(value); - } - }); -} -function bind_checked(input, get3, set2 = get3) { - listen_to_event_and_reset_event(input, "change", (is_reset) => { - var value = is_reset ? input.defaultChecked : input.checked; - set2(value); - }); - if ( - // If we are hydrating and the value has since changed, - // then use the update value from the input instead. - hydrating && input.defaultChecked !== input.checked || // If defaultChecked is set, then checked == defaultChecked - untrack(get3) == null - ) { - set2(input.checked); - } - render_effect(() => { - var value = get3(); - input.checked = Boolean(value); - }); -} -function get_binding_group_value(group, __value, checked) { - var value = /* @__PURE__ */ new Set(); - for (var i = 0; i < group.length; i += 1) { - if (group[i].checked) { - value.add(group[i].__value); - } - } - if (!checked) { - value.delete(__value); - } - return Array.from(value); -} -function is_numberlike_input(input) { - var type = input.type; - return type === "number" || type === "range"; -} -function to_number(value) { - return value === "" ? null : +value; -} -function bind_files(input, get3, set2 = get3) { - listen_to_event_and_reset_event(input, "change", () => { - set2(input.files); - }); - if ( - // If we are hydrating and the value has since changed, - // then use the updated value from the input instead. - hydrating && input.files - ) { - set2(input.files); - } - render_effect(() => { - input.files = get3(); - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/media.js -function time_ranges_to_array(ranges) { - var array = []; - for (var i = 0; i < ranges.length; i += 1) { - array.push({ start: ranges.start(i), end: ranges.end(i) }); - } - return array; -} -function bind_current_time(media, get3, set2 = get3) { - var raf_id; - var value; - var callback = () => { - cancelAnimationFrame(raf_id); - if (!media.paused) { - raf_id = requestAnimationFrame(callback); - } - var next_value = media.currentTime; - if (value !== next_value) { - set2(value = next_value); - } - }; - raf_id = requestAnimationFrame(callback); - media.addEventListener("timeupdate", callback); - render_effect(() => { - var next_value = Number(get3()); - if (value !== next_value && !isNaN( - /** @type {any} */ - next_value - )) { - media.currentTime = value = next_value; - } - }); - teardown(() => { - cancelAnimationFrame(raf_id); - media.removeEventListener("timeupdate", callback); - }); -} -function bind_buffered(media, set2) { - var current; - listen(media, ["loadedmetadata", "progress", "timeupdate", "seeking"], () => { - var ranges = media.buffered; - if (!current || current.length !== ranges.length || current.some((range, i) => ranges.start(i) !== range.start || ranges.end(i) !== range.end)) { - current = time_ranges_to_array(ranges); - set2(current); - } - }); -} -function bind_seekable(media, set2) { - listen(media, ["loadedmetadata"], () => set2(time_ranges_to_array(media.seekable))); -} -function bind_played(media, set2) { - listen(media, ["timeupdate"], () => set2(time_ranges_to_array(media.played))); -} -function bind_seeking(media, set2) { - listen(media, ["seeking", "seeked"], () => set2(media.seeking)); -} -function bind_ended(media, set2) { - listen(media, ["timeupdate", "ended"], () => set2(media.ended)); -} -function bind_ready_state(media, set2) { - listen( - media, - ["loadedmetadata", "loadeddata", "canplay", "canplaythrough", "playing", "waiting", "emptied"], - () => set2(media.readyState) - ); -} -function bind_playback_rate(media, get3, set2 = get3) { - effect(() => { - var value = Number(get3()); - if (value !== media.playbackRate && !isNaN(value)) { - media.playbackRate = value; - } - }); - effect(() => { - listen(media, ["ratechange"], () => { - set2(media.playbackRate); - }); - }); -} -function bind_paused(media, get3, set2 = get3) { - var paused = get3(); - var update2 = () => { - if (paused !== media.paused) { - set2(paused = media.paused); - } - }; - listen(media, ["play", "pause", "canplay"], update2, paused == null); - effect(() => { - if ((paused = !!get3()) !== media.paused) { - if (paused) { - media.pause(); - } else { - media.play().catch((error) => { - set2(paused = true); - throw error; - }); - } - } - }); -} -function bind_volume(media, get3, set2 = get3) { - var callback = () => { - set2(media.volume); - }; - if (get3() == null) { - callback(); - } - listen(media, ["volumechange"], callback, false); - render_effect(() => { - var value = Number(get3()); - if (value !== media.volume && !isNaN(value)) { - media.volume = value; - } - }); -} -function bind_muted(media, get3, set2 = get3) { - var callback = () => { - set2(media.muted); - }; - if (get3() == null) { - callback(); - } - listen(media, ["volumechange"], callback, false); - render_effect(() => { - var value = !!get3(); - if (media.muted !== value) media.muted = value; - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/navigator.js -function bind_online(update2) { - listen(window, ["online", "offline"], () => { - update2(navigator.onLine); - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/props.js -function bind_prop(props, prop2, value) { - var desc = get_descriptor(props, prop2); - if (desc && desc.set) { - props[prop2] = value; - teardown(() => { - props[prop2] = null; - }); - } -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/size.js -var _listeners, _observer, _options, _ResizeObserverSingleton_instances, getObserver_fn; -var _ResizeObserverSingleton = class _ResizeObserverSingleton { - /** @param {ResizeObserverOptions} options */ - constructor(options) { - __privateAdd(this, _ResizeObserverSingleton_instances); - /** */ - __privateAdd(this, _listeners, /* @__PURE__ */ new WeakMap()); - /** @type {ResizeObserver | undefined} */ - __privateAdd(this, _observer); - /** @type {ResizeObserverOptions} */ - __privateAdd(this, _options); - __privateSet(this, _options, options); - } - /** - * @param {Element} element - * @param {(entry: ResizeObserverEntry) => any} listener - */ - observe(element2, listener) { - var listeners = __privateGet(this, _listeners).get(element2) || /* @__PURE__ */ new Set(); - listeners.add(listener); - __privateGet(this, _listeners).set(element2, listeners); - __privateMethod(this, _ResizeObserverSingleton_instances, getObserver_fn).call(this).observe(element2, __privateGet(this, _options)); - return () => { - var listeners2 = __privateGet(this, _listeners).get(element2); - listeners2.delete(listener); - if (listeners2.size === 0) { - __privateGet(this, _listeners).delete(element2); - __privateGet(this, _observer).unobserve(element2); - } - }; - } -}; -_listeners = new WeakMap(); -_observer = new WeakMap(); -_options = new WeakMap(); -_ResizeObserverSingleton_instances = new WeakSet(); -getObserver_fn = function() { - return __privateGet(this, _observer) ?? __privateSet(this, _observer, new ResizeObserver( - /** @param {any} entries */ - (entries) => { - for (var entry of entries) { - _ResizeObserverSingleton.entries.set(entry.target, entry); - for (var listener of __privateGet(this, _listeners).get(entry.target) || []) { - listener(entry); - } - } - } - )); -}; -/** @static */ -__publicField(_ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap()); -var ResizeObserverSingleton = _ResizeObserverSingleton; -var resize_observer_content_box = new ResizeObserverSingleton({ - box: "content-box" -}); -var resize_observer_border_box = new ResizeObserverSingleton({ - box: "border-box" -}); -var resize_observer_device_pixel_content_box = new ResizeObserverSingleton({ - box: "device-pixel-content-box" -}); -function bind_resize_observer(element2, type, set2) { - var observer = type === "contentRect" || type === "contentBoxSize" ? resize_observer_content_box : type === "borderBoxSize" ? resize_observer_border_box : resize_observer_device_pixel_content_box; - var unsub = observer.observe( - element2, - /** @param {any} entry */ - (entry) => set2(entry[type]) - ); - teardown(unsub); -} -function bind_element_size(element2, type, set2) { - var unsub = resize_observer_border_box.observe(element2, () => set2(element2[type])); - effect(() => { - untrack(() => set2(element2[type])); - return unsub; - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/this.js -function is_bound_this(bound_value, element_or_component) { - return bound_value === element_or_component || (bound_value == null ? void 0 : bound_value[STATE_SYMBOL]) === element_or_component; -} -function bind_this(element_or_component = {}, update2, get_value, get_parts) { - effect(() => { - var old_parts; - var parts; - render_effect(() => { - old_parts = parts; - parts = (get_parts == null ? void 0 : get_parts()) || []; - untrack(() => { - if (element_or_component !== get_value(...parts)) { - update2(element_or_component, ...parts); - if (old_parts && is_bound_this(get_value(...old_parts), element_or_component)) { - update2(null, ...old_parts); - } - } - }); - }); - return () => { - queue_micro_task(() => { - if (parts && is_bound_this(get_value(...parts), element_or_component)) { - update2(null, ...parts); - } - }); - }; - }); - return element_or_component; -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/universal.js -function bind_content_editable(property, element2, get3, set2 = get3) { - element2.addEventListener("input", () => { - set2(element2[property]); - }); - render_effect(() => { - var value = get3(); - if (element2[property] !== value) { - if (value == null) { - var non_null_value = element2[property]; - set2(non_null_value); - } else { - element2[property] = value + ""; - } - } - }); -} -function bind_property(property, event_name, element2, set2, get3) { - var handler = () => { - set2(element2[property]); - }; - element2.addEventListener(event_name, handler); - if (get3) { - render_effect(() => { - element2[property] = get3(); - }); - } else { - handler(); - } - if (element2 === document.body || element2 === window || element2 === document) { - teardown(() => { - element2.removeEventListener(event_name, handler); - }); - } -} -function bind_focused(element2, set2) { - listen(element2, ["focus", "blur"], () => { - set2(element2 === document.activeElement); - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/window.js -function bind_window_scroll(type, get3, set2 = get3) { - var is_scrolling_x = type === "x"; - var target_handler = () => without_reactive_context(() => { - scrolling = true; - clearTimeout(timeout); - timeout = setTimeout(clear, 100); - set2(window[is_scrolling_x ? "scrollX" : "scrollY"]); - }); - addEventListener("scroll", target_handler, { - passive: true - }); - var scrolling = false; - var timeout; - var clear = () => { - scrolling = false; - }; - var first = true; - render_effect(() => { - var latest_value = get3(); - if (first) { - first = false; - } else if (!scrolling && latest_value != null) { - scrolling = true; - clearTimeout(timeout); - if (is_scrolling_x) { - scrollTo(latest_value, window.scrollY); - } else { - scrollTo(window.scrollX, latest_value); - } - timeout = setTimeout(clear, 100); - } - }); - effect(target_handler); - teardown(() => { - removeEventListener("scroll", target_handler); - }); -} -function bind_window_size(type, set2) { - listen(window, ["resize"], () => without_reactive_context(() => set2(window[type]))); -} - -// node_modules/svelte/src/internal/client/dom/legacy/lifecycle.js -function init(immutable = false) { - const context = ( - /** @type {ComponentContextLegacy} */ - component_context - ); - const callbacks = context.l.u; - if (!callbacks) return; - let props = () => deep_read_state(context.s); - if (immutable) { - let version = 0; - let prev = ( - /** @type {Record} */ - {} - ); - const d = derived(() => { - let changed = false; - const props2 = context.s; - for (const key2 in props2) { - if (props2[key2] !== prev[key2]) { - prev[key2] = props2[key2]; - changed = true; - } - } - if (changed) version++; - return version; - }); - props = () => get(d); - } - if (callbacks.b.length) { - user_pre_effect(() => { - observe_all(context, props); - run_all(callbacks.b); - }); - } - user_effect(() => { - const fns = untrack(() => callbacks.m.map(run)); - return () => { - for (const fn of fns) { - if (typeof fn === "function") { - fn(); - } - } - }; - }); - if (callbacks.a.length) { - user_effect(() => { - observe_all(context, props); - run_all(callbacks.a); - }); - } -} -function observe_all(context, props) { - if (context.l.s) { - for (const signal of context.l.s) get(signal); - } - props(); -} - -// node_modules/svelte/src/internal/client/dom/legacy/misc.js -function reactive_import(fn) { - var s = source(0); - return function() { - if (arguments.length === 1) { - set(s, get(s) + 1); - return arguments[0]; - } else { - get(s); - return fn(); - } - }; -} -function bubble_event($$props, event2) { - var _a; - var events = ( - /** @type {Record} */ - (_a = $$props.$$events) == null ? void 0 : _a[event2.type] - ); - var callbacks = is_array(events) ? events.slice() : events == null ? [] : [events]; - for (var fn of callbacks) { - fn.call(this, event2); - } -} -function add_legacy_event_listener($$props, event_name, event_callback) { - var _a; - $$props.$$events || ($$props.$$events = {}); - (_a = $$props.$$events)[event_name] || (_a[event_name] = []); - $$props.$$events[event_name].push(event_callback); -} -function update_legacy_props($$new_props) { - for (var key2 in $$new_props) { - if (key2 in this) { - this[key2] = $$new_props[key2]; - } - } -} - -// node_modules/svelte/src/internal/client/hydratable.js -function hydratable(key2, fn) { - var _a; - if (!async_mode_flag) { - experimental_async_required("hydratable"); - } - if (hydrating) { - const store = (_a = window.__svelte) == null ? void 0 : _a.h; - if (store == null ? void 0 : store.has(key2)) { - return ( - /** @type {T} */ - store.get(key2) - ); - } - if (true_default) { - hydratable_missing_but_required(key2); - } else { - hydratable_missing_but_expected(key2); - } - } - return fn(); -} - -// node_modules/svelte/src/index-client.js -if (true_default) { - let throw_rune_error = function(rune) { - if (!(rune in globalThis)) { - let value; - Object.defineProperty(globalThis, rune, { - configurable: true, - // eslint-disable-next-line getter-return - get: () => { - if (value !== void 0) { - return value; - } - rune_outside_svelte(rune); - }, - set: (v) => { - value = v; - } - }); - } - }; - throw_rune_error("$state"); - throw_rune_error("$effect"); - throw_rune_error("$derived"); - throw_rune_error("$inspect"); - throw_rune_error("$props"); - throw_rune_error("$bindable"); -} -function getAbortSignal() { - var _a; - if (active_reaction === null) { - get_abort_signal_outside_reaction(); - } - return ((_a = active_reaction).ac ?? (_a.ac = new AbortController())).signal; -} -function onMount(fn) { - if (component_context === null) { - lifecycle_outside_component("onMount"); - } - if (legacy_mode_flag && component_context.l !== null) { - init_update_callbacks(component_context).m.push(fn); - } else { - user_effect(() => { - const cleanup = untrack(fn); - if (typeof cleanup === "function") return ( - /** @type {() => void} */ - cleanup - ); - }); - } -} -function onDestroy(fn) { - if (component_context === null) { - lifecycle_outside_component("onDestroy"); - } - onMount(() => () => untrack(fn)); -} -function create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) { - return new CustomEvent(type, { detail, bubbles, cancelable }); -} -function createEventDispatcher() { - const active_component_context = component_context; - if (active_component_context === null) { - lifecycle_outside_component("createEventDispatcher"); - } - return (type, detail, options) => { - var _a; - const events = ( - /** @type {Record} */ - (_a = active_component_context.s.$$events) == null ? void 0 : _a[ - /** @type {string} */ - type - ] - ); - if (events) { - const callbacks = is_array(events) ? events.slice() : [events]; - const event2 = create_custom_event( - /** @type {string} */ - type, - detail, - options - ); - for (const fn of callbacks) { - fn.call(active_component_context.x, event2); - } - return !event2.defaultPrevented; - } - return true; - }; -} -function beforeUpdate(fn) { - if (component_context === null) { - lifecycle_outside_component("beforeUpdate"); - } - if (component_context.l === null) { - lifecycle_legacy_only("beforeUpdate"); - } - init_update_callbacks(component_context).b.push(fn); -} -function afterUpdate(fn) { - if (component_context === null) { - lifecycle_outside_component("afterUpdate"); - } - if (component_context.l === null) { - lifecycle_legacy_only("afterUpdate"); - } - init_update_callbacks(component_context).a.push(fn); -} -function init_update_callbacks(context) { - var l = ( - /** @type {ComponentContextLegacy} */ - context.l - ); - return l.u ?? (l.u = { a: [], b: [], m: [] }); -} - -// node_modules/svelte/src/store/utils.js -function subscribe_to_store(store, run3, invalidate) { - if (store == null) { - run3(void 0); - if (invalidate) invalidate(void 0); - return noop; - } - const unsub = untrack( - () => store.subscribe( - run3, - // @ts-expect-error - invalidate - ) - ); - return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; -} - -// node_modules/svelte/src/store/shared/index.js -var subscriber_queue = []; -function readable(value, start) { - return { - subscribe: writable(value, start).subscribe - }; -} -function writable(value, start = noop) { - let stop = null; - const subscribers = /* @__PURE__ */ new Set(); - function set2(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) { - set2(fn( - /** @type {T} */ - value - )); - } - function subscribe(run3, invalidate = noop) { - const subscriber = [run3, invalidate]; - subscribers.add(subscriber); - if (subscribers.size === 1) { - stop = start(set2, update2) || noop; - } - run3( - /** @type {T} */ - value - ); - return () => { - subscribers.delete(subscriber); - if (subscribers.size === 0 && stop) { - stop(); - stop = null; - } - }; - } - return { set: set2, update: update2, subscribe }; -} -function derived2(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, (set2, update2) => { - let started = false; - const values = []; - let pending3 = 0; - let cleanup = noop; - const sync = () => { - if (pending3) { - return; - } - cleanup(); - const result = fn(single ? values[0] : values, set2, update2); - if (auto) { - set2(result); - } else { - cleanup = typeof result === "function" ? result : noop; - } - }; - const unsubscribers = stores_array.map( - (store, i) => subscribe_to_store( - store, - (value) => { - values[i] = value; - pending3 &= ~(1 << i); - if (started) { - sync(); - } - }, - () => { - pending3 |= 1 << i; - } - ) - ); - started = true; - sync(); - return function stop() { - run_all(unsubscribers); - cleanup(); - started = false; - }; - }); -} -function readonly(store) { - return { - // @ts-expect-error TODO i suspect the bind is unnecessary - subscribe: store.subscribe.bind(store) - }; -} -function get2(store) { - let value; - subscribe_to_store(store, (_) => value = _)(); - return value; -} - -// node_modules/svelte/src/internal/client/reactivity/store.js -var is_store_binding = false; -var IS_UNMOUNTED = Symbol(); -function store_get(store, store_name, stores) { - const entry = stores[store_name] ?? (stores[store_name] = { - store: null, - source: mutable_source(void 0), - unsubscribe: noop - }); - if (true_default) { - entry.source.label = store_name; - } - if (entry.store !== store && !(IS_UNMOUNTED in stores)) { - entry.unsubscribe(); - entry.store = store ?? null; - if (store == null) { - entry.source.v = void 0; - entry.unsubscribe = noop; - } else { - var is_synchronous_callback = true; - entry.unsubscribe = subscribe_to_store(store, (v) => { - if (is_synchronous_callback) { - entry.source.v = v; - } else { - set(entry.source, v); - } - }); - is_synchronous_callback = false; - } - } - if (store && IS_UNMOUNTED in stores) { - return get2(store); - } - return get(entry.source); -} -function store_unsub(store, store_name, stores) { - let entry = stores[store_name]; - if (entry && entry.store !== store) { - entry.unsubscribe(); - entry.unsubscribe = noop; - } - return store; -} -function store_set(store, value) { - store.set(value); - return value; -} -function invalidate_store(stores, store_name) { - var entry = stores[store_name]; - if (entry.store !== null) { - store_set(entry.store, entry.source.v); - } -} -function setup_stores() { - const stores = {}; - function cleanup() { - teardown(() => { - for (var store_name in stores) { - const ref = stores[store_name]; - ref.unsubscribe(); - } - define_property(stores, IS_UNMOUNTED, { - enumerable: false, - value: true - }); - }); - } - return [stores, cleanup]; -} -function store_mutate(store, expression, new_value) { - store.set(new_value); - return expression; -} -function update_store(store, store_value, d = 1) { - store.set(store_value + d); - return store_value; -} -function update_pre_store(store, store_value, d = 1) { - const value = store_value + d; - store.set(value); - return value; -} -function mark_store_binding() { - is_store_binding = true; -} -function capture_store_binding(fn) { - var previous_is_store_binding = is_store_binding; - try { - is_store_binding = false; - return [fn(), is_store_binding]; - } finally { - is_store_binding = previous_is_store_binding; - } -} - -// node_modules/svelte/src/internal/client/reactivity/props.js -function update_prop(fn, d = 1) { - const value = fn(); - fn(value + d); - return value; -} -function update_pre_prop(fn, d = 1) { - const value = fn() + d; - fn(value); - return value; -} -var rest_props_handler = { - get(target, key2) { - if (target.exclude.includes(key2)) return; - return target.props[key2]; - }, - set(target, key2) { - if (true_default) { - props_rest_readonly(`${target.name}.${String(key2)}`); - } - return false; - }, - getOwnPropertyDescriptor(target, key2) { - if (target.exclude.includes(key2)) return; - if (key2 in target.props) { - return { - enumerable: true, - configurable: true, - value: target.props[key2] - }; - } - }, - has(target, key2) { - if (target.exclude.includes(key2)) return false; - return key2 in target.props; - }, - ownKeys(target) { - return Reflect.ownKeys(target.props).filter((key2) => !target.exclude.includes(key2)); - } -}; -function rest_props(props, exclude, name) { - return new Proxy( - true_default ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude }, - rest_props_handler - ); -} -var legacy_rest_props_handler = { - get(target, key2) { - if (target.exclude.includes(key2)) return; - get(target.version); - return key2 in target.special ? target.special[key2]() : target.props[key2]; - }, - set(target, key2, value) { - if (!(key2 in target.special)) { - var previous_effect = active_effect; - try { - set_active_effect(target.parent_effect); - target.special[key2] = prop( - { - get [key2]() { - return target.props[key2]; - } - }, - /** @type {string} */ - key2, - PROPS_IS_UPDATED - ); - } finally { - set_active_effect(previous_effect); - } - } - target.special[key2](value); - update(target.version); - return true; - }, - getOwnPropertyDescriptor(target, key2) { - if (target.exclude.includes(key2)) return; - if (key2 in target.props) { - return { - enumerable: true, - configurable: true, - value: target.props[key2] - }; - } - }, - deleteProperty(target, key2) { - if (target.exclude.includes(key2)) return true; - target.exclude.push(key2); - update(target.version); - return true; - }, - has(target, key2) { - if (target.exclude.includes(key2)) return false; - return key2 in target.props; - }, - ownKeys(target) { - return Reflect.ownKeys(target.props).filter((key2) => !target.exclude.includes(key2)); - } -}; -function legacy_rest_props(props, exclude) { - return new Proxy( - { - props, - exclude, - special: {}, - version: source(0), - // TODO this is only necessary because we need to track component - // destruction inside `prop`, because of `bind:this`, but it - // seems likely that we can simplify `bind:this` instead - parent_effect: ( - /** @type {Effect} */ - active_effect - ) - }, - legacy_rest_props_handler - ); -} -var spread_props_handler = { - get(target, key2) { - let i = target.props.length; - while (i--) { - let p = target.props[i]; - if (is_function(p)) p = p(); - if (typeof p === "object" && p !== null && key2 in p) return p[key2]; - } - }, - set(target, key2, value) { - let i = target.props.length; - while (i--) { - let p = target.props[i]; - if (is_function(p)) p = p(); - const desc = get_descriptor(p, key2); - if (desc && desc.set) { - desc.set(value); - return true; - } - } - return false; - }, - getOwnPropertyDescriptor(target, key2) { - let i = target.props.length; - while (i--) { - let p = target.props[i]; - if (is_function(p)) p = p(); - if (typeof p === "object" && p !== null && key2 in p) { - const descriptor = get_descriptor(p, key2); - if (descriptor && !descriptor.configurable) { - descriptor.configurable = true; - } - return descriptor; - } - } - }, - has(target, key2) { - if (key2 === STATE_SYMBOL || key2 === LEGACY_PROPS) return false; - for (let p of target.props) { - if (is_function(p)) p = p(); - if (p != null && key2 in p) return true; - } - return false; - }, - ownKeys(target) { - const keys = []; - for (let p of target.props) { - if (is_function(p)) p = p(); - if (!p) continue; - for (const key2 in p) { - if (!keys.includes(key2)) keys.push(key2); - } - for (const key2 of Object.getOwnPropertySymbols(p)) { - if (!keys.includes(key2)) keys.push(key2); - } - } - return keys; - } -}; -function spread_props(...props) { - return new Proxy({ props }, spread_props_handler); -} -function prop(props, key2, flags, fallback2) { - var _a; - var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0; - var bindable = (flags & PROPS_IS_BINDABLE) !== 0; - var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0; - var fallback_value = ( - /** @type {V} */ - fallback2 - ); - var fallback_dirty = true; - var get_fallback = () => { - if (fallback_dirty) { - fallback_dirty = false; - fallback_value = lazy ? untrack( - /** @type {() => V} */ - fallback2 - ) : ( - /** @type {V} */ - fallback2 - ); - } - return fallback_value; - }; - var setter; - if (bindable) { - var is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props; - setter = ((_a = get_descriptor(props, key2)) == null ? void 0 : _a.set) ?? (is_entry_props && key2 in props ? (v) => props[key2] = v : void 0); - } - var initial_value; - var is_store_sub = false; - if (bindable) { - [initial_value, is_store_sub] = capture_store_binding(() => ( - /** @type {V} */ - props[key2] - )); - } else { - initial_value = /** @type {V} */ - props[key2]; - } - if (initial_value === void 0 && fallback2 !== void 0) { - initial_value = get_fallback(); - if (setter) { - if (runes) props_invalid_value(key2); - setter(initial_value); - } - } - var getter; - if (runes) { - getter = () => { - var value = ( - /** @type {V} */ - props[key2] - ); - if (value === void 0) return get_fallback(); - fallback_dirty = true; - return value; - }; - } else { - getter = () => { - var value = ( - /** @type {V} */ - props[key2] - ); - if (value !== void 0) { - fallback_value = /** @type {V} */ - void 0; - } - return value === void 0 ? fallback_value : value; - }; - } - if (runes && (flags & PROPS_IS_UPDATED) === 0) { - return getter; - } - if (setter) { - var legacy_parent = props.$$legacy; - return ( - /** @type {() => V} */ - (function(value, mutation) { - if (arguments.length > 0) { - if (!runes || !mutation || legacy_parent || is_store_sub) { - setter(mutation ? getter() : value); - } - return value; - } - return getter(); - }) - ); - } - var overridden = false; - var d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => { - overridden = false; - return getter(); - }); - if (true_default) { - d.label = key2; - } - if (bindable) get(d); - var parent_effect = ( - /** @type {Effect} */ - active_effect - ); - return ( - /** @type {() => V} */ - (function(value, mutation) { - if (arguments.length > 0) { - const new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value; - set(d, new_value); - overridden = true; - if (fallback_value !== void 0) { - fallback_value = new_value; - } - return value; - } - if (is_destroying_effect && overridden || (parent_effect.f & DESTROYED) !== 0) { - return d.v; - } - return get(d); - }) - ); -} - -// node_modules/svelte/src/internal/client/validate.js -function validate_binding(binding, blockers, get_object, get_property, line, column) { - run_after_blockers(blockers, () => { - var _a; - var warned = false; - var filename = (_a = dev_current_component_function) == null ? void 0 : _a[FILENAME]; - render_effect(() => { - if (warned) return; - var [object, is_store_sub] = capture_store_binding(get_object); - if (is_store_sub) return; - var property = get_property(); - var ran = false; - var effect2 = render_effect(() => { - if (ran) return; - object[property]; - }); - ran = true; - if (effect2.deps === null) { - var location = `${filename}:${line}:${column}`; - binding_property_non_reactive(binding, location); - warned = true; - } - }); - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/custom-element.js -var SvelteElement; -if (typeof HTMLElement === "function") { - SvelteElement = class extends HTMLElement { - /** - * @param {*} $$componentCtor - * @param {*} $$slots - * @param {ShadowRootInit | undefined} shadow_root_init - */ - constructor($$componentCtor, $$slots, shadow_root_init) { - super(); - /** The Svelte component constructor */ - __publicField(this, "$$ctor"); - /** Slots */ - __publicField(this, "$$s"); - /** @type {any} The Svelte component instance */ - __publicField(this, "$$c"); - /** Whether or not the custom element is connected */ - __publicField(this, "$$cn", false); - /** @type {Record} 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()); - /** @type {any} The managed render effect for reflecting attributes */ - __publicField(this, "$$me"); - /** @type {ShadowRoot | null} The ShadowRoot of the custom element */ - __publicField(this, "$$shadowRoot", null); - this.$$ctor = $$componentCtor; - this.$$s = $$slots; - if (shadow_root_init) { - this.$$shadowRoot = this.attachShadow(shadow_root_init); - } - } - /** - * @param {string} type - * @param {EventListenerOrEventListenerObject} listener - * @param {boolean | AddEventListenerOptions} [options] - */ - 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); - } - /** - * @param {string} type - * @param {EventListenerOrEventListenerObject} listener - * @param {boolean | AddEventListenerOptions} [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_slot = function(name) { - return (anchor) => { - const slot2 = create_element("slot"); - if (name !== "default") slot2.name = name; - append(anchor, slot2); - }; - }; - 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) { - if (name === "default" && !this.$$d.children) { - this.$$d.children = create_slot(name); - $$slots.default = true; - } else { - $$slots[name] = create_slot(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 key2 in this.$$p_d) { - if (!(key2 in this.$$d) && this[key2] !== void 0) { - this.$$d[key2] = this[key2]; - delete this[key2]; - } - } - this.$$c = createClassComponent({ - component: this.$$ctor, - target: this.$$shadowRoot || this, - props: { - ...this.$$d, - $$slots, - $$host: this - } - }); - this.$$me = effect_root(() => { - render_effect(() => { - var _a; - this.$$r = true; - for (const key2 of object_keys(this.$$c)) { - if (!((_a = this.$$p_d[key2]) == null ? void 0 : _a.reflect)) continue; - this.$$d[key2] = this.$$c[key2]; - const attribute_value = get_custom_element_value( - key2, - this.$$d[key2], - this.$$p_d, - "toAttribute" - ); - if (attribute_value == null) { - this.removeAttribute(this.$$p_d[key2].attribute || key2); - } else { - this.setAttribute(this.$$p_d[key2].attribute || key2, attribute_value); - } - } - this.$$r = false; - }); - }); - 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 - /** - * @param {string} attr - * @param {string} _oldValue - * @param {string} newValue - */ - attributeChangedCallback(attr2, _oldValue, newValue) { - var _a; - if (this.$$r) return; - attr2 = this.$$g_p(attr2); - this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp"); - (_a = this.$$c) == null ? void 0 : _a.$set({ [attr2]: this.$$d[attr2] }); - } - disconnectedCallback() { - this.$$cn = false; - Promise.resolve().then(() => { - if (!this.$$cn && this.$$c) { - this.$$c.$destroy(); - this.$$me(); - this.$$c = void 0; - } - }); - } - /** - * @param {string} attribute_name - */ - $$g_p(attribute_name) { - return object_keys(this.$$p_d).find( - (key2) => this.$$p_d[key2].attribute === attribute_name || !this.$$p_d[key2].attribute && key2.toLowerCase() === attribute_name - ) || attribute_name; - } - }; -} -function get_custom_element_value(prop2, value, props_definition, transform) { - var _a; - const type = (_a = props_definition[prop2]) == null ? void 0 : _a.type; - value = type === "Boolean" && typeof value !== "boolean" ? value != null : value; - if (!transform || !props_definition[prop2]) { - 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; - // conversion already handled above - case "Number": - return value != null ? +value : value; - default: - return value; - } - } -} -function get_custom_elements_slots(element2) { - const result = {}; - element2.childNodes.forEach((node) => { - result[ - /** @type {Element} node */ - node.slot || "default" - ] = true; - }); - return result; -} -function create_custom_element(Component, props_definition, slots, exports, shadow_root_init, extend) { - let Class = class extends SvelteElement { - constructor() { - super(Component, slots, shadow_root_init); - this.$$p_d = props_definition; - } - static get observedAttributes() { - return object_keys(props_definition).map( - (key2) => (props_definition[key2].attribute || key2).toLowerCase() - ); - } - }; - object_keys(props_definition).forEach((prop2) => { - define_property(Class.prototype, prop2, { - get() { - return this.$$c && prop2 in this.$$c ? this.$$c[prop2] : this.$$d[prop2]; - }, - set(value) { - var _a; - value = get_custom_element_value(prop2, value, props_definition); - this.$$d[prop2] = value; - var component2 = this.$$c; - if (component2) { - var setter = (_a = get_descriptor(component2, prop2)) == null ? void 0 : _a.get; - if (setter) { - component2[prop2] = value; - } else { - component2.$set({ [prop2]: value }); - } - } - } - }); - }); - exports.forEach((property) => { - define_property(Class.prototype, property, { - get() { - var _a; - return (_a = this.$$c) == null ? void 0 : _a[property]; - } - }); - }); - if (extend) { - Class = extend(Class); - } - Component.element = /** @type {any} */ - Class; - return Class; -} - -// node_modules/svelte/src/internal/client/dev/console-log.js -function log_if_contains_state(method, ...objects) { - untrack(() => { - try { - let has_state = false; - const transformed = []; - for (const obj of objects) { - if (obj && typeof obj === "object" && STATE_SYMBOL in obj) { - transformed.push(snapshot(obj, true)); - has_state = true; - } else { - transformed.push(obj); - } - } - if (has_state) { - console_log_state(method); - console.log("%c[snapshot]", "color: grey", ...transformed); - } - } catch { - } - }); - return objects; -} - -// node_modules/svelte/src/attachments/index.js -function createAttachmentKey() { - return Symbol(ATTACHMENT_KEY); -} -function fromAction(action2, fn = ( - /** @type {() => T} */ - noop -)) { - return (element2) => { - const { update: update2, destroy } = untrack(() => action2(element2, fn()) ?? {}); - if (update2) { - var ran = false; - render_effect(() => { - const arg = fn(); - if (ran) update2(arg); - }); - ran = true; - } - if (destroy) { - teardown(destroy); - } - }; -} - -export { - createAttachmentKey, - fromAction, - assign, - assign_and, - assign_or, - assign_nullish, - cleanup_styles, - add_locations, - hmr, - create_ownership_validator, - check_target, - legacy_api, - inspect, - async, - validate_snippet_args, - await_block, - if_block, - key, - css_props, - index, - each, - html, - slot, - sanitize_slots, - validate_void_dynamic_element, - validate_dynamic_element_tag, - validate_store, - prevent_snippet_stringification, - snippet, - wrap_snippet, - createRawSnippet, - component, - raf, - loop, - animation, - transition, - element, - head, - append_styles, - action, - attach, - attr, - clsx2 as clsx, - set_class, - set_style, - select_option, - init_select, - bind_select_value, - CLASS, - STYLE, - remove_input_defaults, - set_value, - set_checked, - set_selected, - set_default_checked, - set_default_value, - set_attribute, - set_xlink_attribute, - set_custom_element_data, - attribute_effect, - selectedcontent, - customizable_select, - bind_active_element, - bind_value, - bind_group, - bind_checked, - bind_files, - bind_current_time, - bind_buffered, - bind_seekable, - bind_played, - bind_seeking, - bind_ended, - bind_ready_state, - bind_playback_rate, - bind_paused, - bind_volume, - bind_muted, - bind_online, - bind_prop, - bind_resize_observer, - bind_element_size, - bind_this, - bind_content_editable, - bind_property, - bind_focused, - bind_window_scroll, - bind_window_size, - init, - reactive_import, - bubble_event, - add_legacy_event_listener, - update_legacy_props, - readable, - writable, - derived2 as derived, - readonly, - get2 as get, - store_get, - store_unsub, - store_set, - invalidate_store, - setup_stores, - store_mutate, - update_store, - update_pre_store, - mark_store_binding, - update_prop, - update_pre_prop, - rest_props, - legacy_rest_props, - spread_props, - prop, - validate_binding, - create_custom_element, - log_if_contains_state, - hydratable, - getAbortSignal, - onMount, - onDestroy, - createEventDispatcher, - beforeUpdate, - afterUpdate -}; -//# sourceMappingURL=chunk-EXK7SDUS.js.map diff --git a/node_modules/.vite/deps/chunk-EXK7SDUS.js.map b/node_modules/.vite/deps/chunk-EXK7SDUS.js.map deleted file mode 100644 index fec064f0..00000000 --- a/node_modules/.vite/deps/chunk-EXK7SDUS.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../svelte/src/internal/client/dev/assign.js", "../../svelte/src/internal/client/dev/css.js", "../../svelte/src/internal/client/dev/elements.js", "../../svelte/src/internal/client/dev/hmr.js", "../../svelte/src/internal/client/dev/ownership.js", "../../svelte/src/internal/client/dev/legacy.js", "../../svelte/src/internal/client/dev/inspect.js", "../../svelte/src/internal/client/dom/blocks/async.js", "../../svelte/src/internal/client/dev/validation.js", "../../svelte/src/internal/client/dom/blocks/branches.js", "../../svelte/src/internal/client/dom/blocks/await.js", "../../svelte/src/internal/client/dom/blocks/if.js", "../../svelte/src/internal/client/dom/blocks/key.js", "../../svelte/src/internal/client/dom/blocks/css-props.js", "../../svelte/src/internal/client/dom/blocks/each.js", "../../svelte/src/internal/client/dom/blocks/html.js", "../../svelte/src/internal/client/dom/blocks/slot.js", "../../svelte/src/internal/shared/validate.js", "../../svelte/src/internal/client/dom/blocks/snippet.js", "../../svelte/src/internal/client/dom/blocks/svelte-component.js", "../../svelte/src/internal/client/timing.js", "../../svelte/src/internal/client/loop.js", "../../svelte/src/internal/client/dom/elements/transitions.js", "../../svelte/src/internal/client/dom/blocks/svelte-element.js", "../../svelte/src/internal/client/dom/blocks/svelte-head.js", "../../svelte/src/internal/client/dom/css.js", "../../svelte/src/internal/client/dom/elements/actions.js", "../../svelte/src/internal/client/dom/elements/attachments.js", "../../svelte/src/escaping.js", "../../svelte/src/internal/shared/attributes.js", "../../svelte/src/internal/client/dom/elements/class.js", "../../svelte/src/internal/client/dom/elements/style.js", "../../svelte/src/internal/client/dom/elements/bindings/select.js", "../../svelte/src/internal/client/dom/elements/attributes.js", "../../svelte/src/internal/client/dom/elements/customizable-select.js", "../../svelte/src/internal/client/dom/elements/bindings/document.js", "../../svelte/src/internal/client/dom/elements/bindings/input.js", "../../svelte/src/internal/client/dom/elements/bindings/media.js", "../../svelte/src/internal/client/dom/elements/bindings/navigator.js", "../../svelte/src/internal/client/dom/elements/bindings/props.js", "../../svelte/src/internal/client/dom/elements/bindings/size.js", "../../svelte/src/internal/client/dom/elements/bindings/this.js", "../../svelte/src/internal/client/dom/elements/bindings/universal.js", "../../svelte/src/internal/client/dom/elements/bindings/window.js", "../../svelte/src/internal/client/dom/legacy/lifecycle.js", "../../svelte/src/internal/client/dom/legacy/misc.js", "../../svelte/src/internal/client/hydratable.js", "../../svelte/src/index-client.js", "../../svelte/src/store/utils.js", "../../svelte/src/store/shared/index.js", "../../svelte/src/internal/client/reactivity/store.js", "../../svelte/src/internal/client/reactivity/props.js", "../../svelte/src/internal/client/validate.js", "../../svelte/src/internal/client/dom/elements/custom-element.js", "../../svelte/src/internal/client/dev/console-log.js", "../../svelte/src/attachments/index.js"], - "sourcesContent": ["import { STATE_SYMBOL } from '#client/constants';\nimport { sanitize_location } from '../../../utils.js';\nimport { untrack } from '../runtime.js';\nimport * as w from '../warnings.js';\n\n/**\n *\n * @param {any} a\n * @param {any} b\n * @param {string} property\n * @param {string} location\n */\nfunction compare(a, b, property, location) {\n\tif (a !== b && typeof b === 'object' && STATE_SYMBOL in b) {\n\t\tw.assignment_value_stale(property, /** @type {string} */ (sanitize_location(location)));\n\t}\n\n\treturn a;\n}\n\n/**\n * @param {any} object\n * @param {string} property\n * @param {any} value\n * @param {string} location\n */\nexport function assign(object, property, value, location) {\n\treturn compare(\n\t\t(object[property] = value),\n\t\tuntrack(() => object[property]),\n\t\tproperty,\n\t\tlocation\n\t);\n}\n\n/**\n * @param {any} object\n * @param {string} property\n * @param {any} value\n * @param {string} location\n */\nexport function assign_and(object, property, value, location) {\n\treturn compare(\n\t\t(object[property] &&= value),\n\t\tuntrack(() => object[property]),\n\t\tproperty,\n\t\tlocation\n\t);\n}\n\n/**\n * @param {any} object\n * @param {string} property\n * @param {any} value\n * @param {string} location\n */\nexport function assign_or(object, property, value, location) {\n\treturn compare(\n\t\t(object[property] ||= value),\n\t\tuntrack(() => object[property]),\n\t\tproperty,\n\t\tlocation\n\t);\n}\n\n/**\n * @param {any} object\n * @param {string} property\n * @param {any} value\n * @param {string} location\n */\nexport function assign_nullish(object, property, value, location) {\n\treturn compare(\n\t\t(object[property] ??= value),\n\t\tuntrack(() => object[property]),\n\t\tproperty,\n\t\tlocation\n\t);\n}\n", "/** @type {Map>} */\nvar all_styles = new Map();\n\n/**\n * @param {String} hash\n * @param {HTMLStyleElement} style\n */\nexport function register_style(hash, style) {\n\tvar styles = all_styles.get(hash);\n\n\tif (!styles) {\n\t\tstyles = new Set();\n\t\tall_styles.set(hash, styles);\n\t}\n\n\tstyles.add(style);\n}\n\n/**\n * @param {String} hash\n */\nexport function cleanup_styles(hash) {\n\tvar styles = all_styles.get(hash);\n\tif (!styles) return;\n\n\tfor (const style of styles) {\n\t\tstyle.remove();\n\t}\n\n\tall_styles.delete(hash);\n}\n", "/** @import { SourceLocation } from '#client' */\nimport { COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, ELEMENT_NODE } from '#client/constants';\nimport { HYDRATION_END, HYDRATION_START, HYDRATION_START_ELSE } from '../../../constants.js';\nimport { hydrating } from '../dom/hydration.js';\nimport { dev_stack } from '../context.js';\n\n/**\n * @param {any} fn\n * @param {string} filename\n * @param {SourceLocation[]} locations\n * @returns {any}\n */\nexport function add_locations(fn, filename, locations) {\n\treturn (/** @type {any[]} */ ...args) => {\n\t\tconst dom = fn(...args);\n\n\t\tvar node = hydrating ? dom : dom.nodeType === DOCUMENT_FRAGMENT_NODE ? dom.firstChild : dom;\n\t\tassign_locations(node, filename, locations);\n\n\t\treturn dom;\n\t};\n}\n\n/**\n * @param {Element} element\n * @param {string} filename\n * @param {SourceLocation} location\n */\nfunction assign_location(element, filename, location) {\n\t// @ts-expect-error\n\telement.__svelte_meta = {\n\t\tparent: dev_stack,\n\t\tloc: { file: filename, line: location[0], column: location[1] }\n\t};\n\n\tif (location[2]) {\n\t\tassign_locations(element.firstChild, filename, location[2]);\n\t}\n}\n\n/**\n * @param {Node | null} node\n * @param {string} filename\n * @param {SourceLocation[]} locations\n */\nfunction assign_locations(node, filename, locations) {\n\tvar i = 0;\n\tvar depth = 0;\n\n\twhile (node && i < locations.length) {\n\t\tif (hydrating && node.nodeType === COMMENT_NODE) {\n\t\t\tvar comment = /** @type {Comment} */ (node);\n\t\t\tif (comment.data === HYDRATION_START || comment.data === HYDRATION_START_ELSE) depth += 1;\n\t\t\telse if (comment.data[0] === HYDRATION_END) depth -= 1;\n\t\t}\n\n\t\tif (depth === 0 && node.nodeType === ELEMENT_NODE) {\n\t\t\tassign_location(/** @type {Element} */ (node), filename, locations[i++]);\n\t\t}\n\n\t\tnode = node.nextSibling;\n\t}\n}\n", "/** @import { Effect, TemplateNode } from '#client' */\nimport { FILENAME, HMR } from '../../../constants.js';\nimport { EFFECT_TRANSPARENT } from '#client/constants';\nimport { hydrate_node, hydrating } from '../dom/hydration.js';\nimport { block, branch, destroy_effect } from '../reactivity/effects.js';\nimport { set, source } from '../reactivity/sources.js';\nimport { set_should_intro } from '../render.js';\nimport { get } from '../runtime.js';\n\n/**\n * @template {(anchor: Comment, props: any) => any} Component\n * @param {Component} fn\n */\nexport function hmr(fn) {\n\tconst current = source(fn);\n\n\t/**\n\t * @param {TemplateNode} anchor\n\t * @param {any} props\n\t */\n\tfunction wrapper(anchor, props) {\n\t\tlet component = {};\n\t\tlet instance = {};\n\n\t\t/** @type {Effect} */\n\t\tlet effect;\n\n\t\tlet ran = false;\n\n\t\tblock(() => {\n\t\t\tif (component === (component = get(current))) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (effect) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tfor (var k in instance) delete instance[k];\n\t\t\t\tdestroy_effect(effect);\n\t\t\t}\n\n\t\t\teffect = branch(() => {\n\t\t\t\t// when the component is invalidated, replace it without transitions\n\t\t\t\tif (ran) set_should_intro(false);\n\n\t\t\t\t// preserve getters/setters\n\t\t\t\tObject.defineProperties(\n\t\t\t\t\tinstance,\n\t\t\t\t\tObject.getOwnPropertyDescriptors(\n\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\tnew.target ? new component(anchor, props) : component(anchor, props)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif (ran) set_should_intro(true);\n\t\t\t});\n\t\t}, EFFECT_TRANSPARENT);\n\n\t\tran = true;\n\n\t\tif (hydrating) {\n\t\t\tanchor = hydrate_node;\n\t\t}\n\n\t\treturn instance;\n\t}\n\n\t// @ts-expect-error\n\twrapper[FILENAME] = fn[FILENAME];\n\n\t// @ts-ignore\n\twrapper[HMR] = {\n\t\tfn,\n\t\tcurrent,\n\t\tupdate: (/** @type {any} */ incoming) => {\n\t\t\t// This logic ensures that the first version of the component is the one\n\t\t\t// whose update function and therefore block effect is preserved across updates.\n\t\t\t// If we don't do this dance and instead just use `incoming` as the new component\n\t\t\t// and then update, we'll create an ever-growing stack of block effects.\n\n\t\t\t// Trigger the original block effect\n\t\t\tset(wrapper[HMR].current, incoming[HMR].fn);\n\n\t\t\t// Replace the incoming source with the original one\n\t\t\tincoming[HMR].current = wrapper[HMR].current;\n\t\t}\n\t};\n\n\treturn wrapper;\n}\n", "/** @typedef {{ file: string, line: number, column: number }} Location */\n\nimport { get_descriptor } from '../../shared/utils.js';\nimport { LEGACY_PROPS, STATE_SYMBOL } from '#client/constants';\nimport { FILENAME } from '../../../constants.js';\nimport { component_context } from '../context.js';\nimport * as w from '../warnings.js';\nimport { sanitize_location } from '../../../utils.js';\n\n/**\n * Sets up a validator that\n * - traverses the path of a prop to find out if it is allowed to be mutated\n * - checks that the binding chain is not interrupted\n * @param {Record} props\n */\nexport function create_ownership_validator(props) {\n\tconst component = component_context?.function;\n\tconst parent = component_context?.p?.function;\n\n\treturn {\n\t\t/**\n\t\t * @param {string} prop\n\t\t * @param {any[]} path\n\t\t * @param {any} result\n\t\t * @param {number} line\n\t\t * @param {number} column\n\t\t */\n\t\tmutation: (prop, path, result, line, column) => {\n\t\t\tconst name = path[0];\n\t\t\tif (is_bound_or_unset(props, name) || !parent) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\t/** @type {any} */\n\t\t\tlet value = props;\n\n\t\t\tfor (let i = 0; i < path.length - 1; i++) {\n\t\t\t\tvalue = value[path[i]];\n\t\t\t\tif (!value?.[STATE_SYMBOL]) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst location = sanitize_location(`${component[FILENAME]}:${line}:${column}`);\n\n\t\t\tw.ownership_invalid_mutation(name, location, prop, parent[FILENAME]);\n\n\t\t\treturn result;\n\t\t},\n\t\t/**\n\t\t * @param {any} key\n\t\t * @param {any} child_component\n\t\t * @param {() => any} value\n\t\t */\n\t\tbinding: (key, child_component, value) => {\n\t\t\tif (!is_bound_or_unset(props, key) && parent && value()?.[STATE_SYMBOL]) {\n\t\t\t\tw.ownership_invalid_binding(\n\t\t\t\t\tcomponent[FILENAME],\n\t\t\t\t\tkey,\n\t\t\t\t\tchild_component[FILENAME],\n\t\t\t\t\tparent[FILENAME]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * @param {Record} props\n * @param {string} prop_name\n */\nfunction is_bound_or_unset(props, prop_name) {\n\t// Can be the case when someone does `mount(Component, props)` with `let props = $state({...})`\n\t// or `createClassComponent(Component, props)`\n\tconst is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;\n\treturn (\n\t\t!!get_descriptor(props, prop_name)?.set ||\n\t\t(is_entry_props && prop_name in props) ||\n\t\t!(prop_name in props)\n\t);\n}\n", "import * as e from '../errors.js';\nimport { component_context } from '../context.js';\nimport { FILENAME } from '../../../constants.js';\n\n/** @param {Function & { [FILENAME]: string }} target */\nexport function check_target(target) {\n\tif (target) {\n\t\te.component_api_invalid_new(target[FILENAME] ?? 'a component', target.name);\n\t}\n}\n\nexport function legacy_api() {\n\tconst component = component_context?.function;\n\n\t/** @param {string} method */\n\tfunction error(method) {\n\t\te.component_api_changed(method, component[FILENAME]);\n\t}\n\n\treturn {\n\t\t$destroy: () => error('$destroy()'),\n\t\t$on: () => error('$on(...)'),\n\t\t$set: () => error('$set(...)')\n\t};\n}\n", "import { UNINITIALIZED } from '../../../constants.js';\nimport { snapshot } from '../../shared/clone.js';\nimport { eager_effect, render_effect, validate_effect } from '../reactivity/effects.js';\nimport { untrack } from '../runtime.js';\nimport { get_error } from '../../shared/dev.js';\n\n/**\n * @param {() => any[]} get_value\n * @param {Function} inspector\n * @param {boolean} show_stack\n */\nexport function inspect(get_value, inspector, show_stack = false) {\n\tvalidate_effect('$inspect');\n\n\tlet initial = true;\n\tlet error = /** @type {any} */ (UNINITIALIZED);\n\n\t// Inspect effects runs synchronously so that we can capture useful\n\t// stack traces. As a consequence, reading the value might result\n\t// in an error (an `$inspect(object.property)` will run before the\n\t// `{#if object}...{/if}` that contains it)\n\teager_effect(() => {\n\t\ttry {\n\t\t\tvar value = get_value();\n\t\t} catch (e) {\n\t\t\terror = e;\n\t\t\treturn;\n\t\t}\n\n\t\tvar snap = snapshot(value, true, true);\n\t\tuntrack(() => {\n\t\t\tif (show_stack) {\n\t\t\t\tinspector(...snap);\n\n\t\t\t\tif (!initial) {\n\t\t\t\t\tconst stack = get_error('$inspect(...)');\n\t\t\t\t\tif (stack) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.groupCollapsed('stack trace');\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.log(stack);\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.groupEnd();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tinspector(initial ? 'init' : 'update', ...snap);\n\t\t\t}\n\t\t});\n\n\t\tinitial = false;\n\t});\n\n\t// If an error occurs, we store it (along with its stack trace).\n\t// If the render effect subsequently runs, we log the error,\n\t// but if it doesn't run it's because the `$inspect` was\n\t// destroyed, meaning we don't need to bother\n\trender_effect(() => {\n\t\ttry {\n\t\t\t// call `get_value` so that this runs alongside the inspect effect\n\t\t\tget_value();\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\n\t\tif (error !== UNINITIALIZED) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(error);\n\t\t\terror = UNINITIALIZED;\n\t\t}\n\t});\n}\n", "/** @import { Blocker, TemplateNode, Value } from '#client' */\nimport { flatten } from '../../reactivity/async.js';\nimport { Batch, current_batch } from '../../reactivity/batch.js';\nimport { get } from '../../runtime.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tset_hydrate_node,\n\tset_hydrating,\n\tskip_nodes\n} from '../hydration.js';\nimport { get_boundary } from './boundary.js';\n\n/**\n * @param {TemplateNode} node\n * @param {Blocker[]} blockers\n * @param {Array<() => Promise>} expressions\n * @param {(anchor: TemplateNode, ...deriveds: Value[]) => void} fn\n */\nexport function async(node, blockers = [], expressions = [], fn) {\n\tvar was_hydrating = hydrating;\n\tvar end = null;\n\n\tif (was_hydrating) {\n\t\thydrate_next();\n\t\tend = skip_nodes(false);\n\t}\n\n\tif (expressions.length === 0 && blockers.every((b) => b.settled)) {\n\t\tfn(node);\n\n\t\t// This is necessary because it is not guaranteed that the render function will\n\t\t// advance the hydration node to $.async's end marker: it may stop at an inner\n\t\t// block's end marker (in case of an inner if block for example), but it also may\n\t\t// stop at the correct $.async end marker (in case of component child) - hence\n\t\t// we can't just use hydrate_next()\n\t\t// TODO this feels indicative of a bug elsewhere; ideally we wouldn't need\n\t\t// to double-traverse in the already-resolved case\n\t\tif (was_hydrating) {\n\t\t\tset_hydrate_node(end);\n\t\t}\n\n\t\treturn;\n\t}\n\n\tvar boundary = get_boundary();\n\tvar batch = /** @type {Batch} */ (current_batch);\n\tvar blocking = boundary.is_rendered();\n\n\tboundary.update_pending_count(1);\n\tbatch.increment(blocking);\n\n\tif (was_hydrating) {\n\t\tvar previous_hydrate_node = hydrate_node;\n\t\tset_hydrate_node(end);\n\t}\n\n\tflatten(blockers, [], expressions, (values) => {\n\t\tif (was_hydrating) {\n\t\t\tset_hydrating(true);\n\t\t\tset_hydrate_node(previous_hydrate_node);\n\t\t}\n\n\t\ttry {\n\t\t\t// get values eagerly to avoid creating blocks if they reject\n\t\t\tfor (const d of values) get(d);\n\n\t\t\tfn(node, ...values);\n\t\t} finally {\n\t\t\tif (was_hydrating) {\n\t\t\t\tset_hydrating(false);\n\t\t\t}\n\n\t\t\tboundary.update_pending_count(-1);\n\t\t\tbatch.decrement(blocking);\n\t\t}\n\t});\n}\n", "import * as e from '../errors.js';\n/**\n * @param {Node} anchor\n * @param {...(()=>any)[]} args\n */\nexport function validate_snippet_args(anchor, ...args) {\n\tif (typeof anchor !== 'object' || !(anchor instanceof Node)) {\n\t\te.invalid_snippet_arguments();\n\t}\n\n\tfor (let arg of args) {\n\t\tif (typeof arg !== 'function') {\n\t\t\te.invalid_snippet_arguments();\n\t\t}\n\t}\n}\n", "/** @import { Effect, TemplateNode } from '#client' */\nimport { Batch, current_batch } from '../../reactivity/batch.js';\nimport {\n\tbranch,\n\tdestroy_effect,\n\tmove_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { hydrate_node, hydrating } from '../hydration.js';\nimport { create_text, should_defer_append } from '../operations.js';\n\n/**\n * @typedef {{ effect: Effect, fragment: DocumentFragment }} Branch\n */\n\n/**\n * @template Key\n */\nexport class BranchManager {\n\t/** @type {TemplateNode} */\n\tanchor;\n\n\t/** @type {Map} */\n\t#batches = new Map();\n\n\t/**\n\t * Map of keys to effects that are currently rendered in the DOM.\n\t * These effects are visible and actively part of the document tree.\n\t * Example:\n\t * ```\n\t * {#if condition}\n\t * \tfoo\n\t * {:else}\n\t * \tbar\n\t * {/if}\n\t * ```\n\t * Can result in the entries `true->Effect` and `false->Effect`\n\t * @type {Map}\n\t */\n\t#onscreen = new Map();\n\n\t/**\n\t * Similar to #onscreen with respect to the keys, but contains branches that are not yet\n\t * in the DOM, because their insertion is deferred.\n\t * @type {Map}\n\t */\n\t#offscreen = new Map();\n\n\t/**\n\t * Keys of effects that are currently outroing\n\t * @type {Set}\n\t */\n\t#outroing = new Set();\n\n\t/**\n\t * Whether to pause (i.e. outro) on change, or destroy immediately.\n\t * This is necessary for ``\n\t */\n\t#transition = true;\n\n\t/**\n\t * @param {TemplateNode} anchor\n\t * @param {boolean} transition\n\t */\n\tconstructor(anchor, transition = true) {\n\t\tthis.anchor = anchor;\n\t\tthis.#transition = transition;\n\t}\n\n\t#commit = () => {\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\n\t\t// if this batch was made obsolete, bail\n\t\tif (!this.#batches.has(batch)) return;\n\n\t\tvar key = /** @type {Key} */ (this.#batches.get(batch));\n\n\t\tvar onscreen = this.#onscreen.get(key);\n\n\t\tif (onscreen) {\n\t\t\t// effect is already in the DOM — abort any current outro\n\t\t\tresume_effect(onscreen);\n\t\t\tthis.#outroing.delete(key);\n\t\t} else {\n\t\t\t// effect is currently offscreen. put it in the DOM\n\t\t\tvar offscreen = this.#offscreen.get(key);\n\n\t\t\tif (offscreen) {\n\t\t\t\tthis.#onscreen.set(key, offscreen.effect);\n\t\t\t\tthis.#offscreen.delete(key);\n\n\t\t\t\t// remove the anchor...\n\t\t\t\t/** @type {TemplateNode} */ (offscreen.fragment.lastChild).remove();\n\n\t\t\t\t// ...and append the fragment\n\t\t\t\tthis.anchor.before(offscreen.fragment);\n\t\t\t\tonscreen = offscreen.effect;\n\t\t\t}\n\t\t}\n\n\t\tfor (const [b, k] of this.#batches) {\n\t\t\tthis.#batches.delete(b);\n\n\t\t\tif (b === batch) {\n\t\t\t\t// keep values for newer batches\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst offscreen = this.#offscreen.get(k);\n\n\t\t\tif (offscreen) {\n\t\t\t\t// for older batches, destroy offscreen effects\n\t\t\t\t// as they will never be committed\n\t\t\t\tdestroy_effect(offscreen.effect);\n\t\t\t\tthis.#offscreen.delete(k);\n\t\t\t}\n\t\t}\n\n\t\t// outro/destroy all onscreen effects...\n\t\tfor (const [k, effect] of this.#onscreen) {\n\t\t\t// ...except the one that was just committed\n\t\t\t// or those that are already outroing (else the transition is aborted and the effect destroyed right away)\n\t\t\tif (k === key || this.#outroing.has(k)) continue;\n\n\t\t\tconst on_destroy = () => {\n\t\t\t\tconst keys = Array.from(this.#batches.values());\n\n\t\t\t\tif (keys.includes(k)) {\n\t\t\t\t\t// keep the effect offscreen, as another batch will need it\n\t\t\t\t\tvar fragment = document.createDocumentFragment();\n\t\t\t\t\tmove_effect(effect, fragment);\n\n\t\t\t\t\tfragment.append(create_text()); // TODO can we avoid this?\n\n\t\t\t\t\tthis.#offscreen.set(k, { effect, fragment });\n\t\t\t\t} else {\n\t\t\t\t\tdestroy_effect(effect);\n\t\t\t\t}\n\n\t\t\t\tthis.#outroing.delete(k);\n\t\t\t\tthis.#onscreen.delete(k);\n\t\t\t};\n\n\t\t\tif (this.#transition || !onscreen) {\n\t\t\t\tthis.#outroing.add(k);\n\t\t\t\tpause_effect(effect, on_destroy, false);\n\t\t\t} else {\n\t\t\t\ton_destroy();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @param {Batch} batch\n\t */\n\t#discard = (batch) => {\n\t\tthis.#batches.delete(batch);\n\n\t\tconst keys = Array.from(this.#batches.values());\n\n\t\tfor (const [k, branch] of this.#offscreen) {\n\t\t\tif (!keys.includes(k)) {\n\t\t\t\tdestroy_effect(branch.effect);\n\t\t\t\tthis.#offscreen.delete(k);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t *\n\t * @param {any} key\n\t * @param {null | ((target: TemplateNode) => void)} fn\n\t */\n\tensure(key, fn) {\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tif (fn && !this.#onscreen.has(key) && !this.#offscreen.has(key)) {\n\t\t\tif (defer) {\n\t\t\t\tvar fragment = document.createDocumentFragment();\n\t\t\t\tvar target = create_text();\n\n\t\t\t\tfragment.append(target);\n\n\t\t\t\tthis.#offscreen.set(key, {\n\t\t\t\t\teffect: branch(() => fn(target)),\n\t\t\t\t\tfragment\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.#onscreen.set(\n\t\t\t\t\tkey,\n\t\t\t\t\tbranch(() => fn(this.anchor))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.#batches.set(batch, key);\n\n\t\tif (defer) {\n\t\t\tfor (const [k, effect] of this.#onscreen) {\n\t\t\t\tif (k === key) {\n\t\t\t\t\tbatch.unskip_effect(effect);\n\t\t\t\t} else {\n\t\t\t\t\tbatch.skip_effect(effect);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const [k, branch] of this.#offscreen) {\n\t\t\t\tif (k === key) {\n\t\t\t\t\tbatch.unskip_effect(branch.effect);\n\t\t\t\t} else {\n\t\t\t\t\tbatch.skip_effect(branch.effect);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbatch.oncommit(this.#commit);\n\t\t\tbatch.ondiscard(this.#discard);\n\t\t} else {\n\t\t\tif (hydrating) {\n\t\t\t\tthis.anchor = hydrate_node;\n\t\t\t}\n\n\t\t\tthis.#commit();\n\t\t}\n\t}\n}\n", "/** @import { Source, TemplateNode } from '#client' */\nimport { is_promise } from '../../../shared/utils.js';\nimport { block } from '../../reactivity/effects.js';\nimport { internal_set, mutable_source, source } from '../../reactivity/sources.js';\nimport {\n\thydrate_next,\n\thydrating,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport { queue_micro_task } from '../task.js';\nimport { HYDRATION_START_ELSE, UNINITIALIZED } from '../../../../constants.js';\nimport { is_runes } from '../../context.js';\nimport { Batch, flushSync, is_flushing_sync } from '../../reactivity/batch.js';\nimport { BranchManager } from './branches.js';\nimport { capture, unset_context } from '../../reactivity/async.js';\n\nconst PENDING = 0;\nconst THEN = 1;\nconst CATCH = 2;\n\n/** @typedef {typeof PENDING | typeof THEN | typeof CATCH} AwaitState */\n\n/**\n * @template V\n * @param {TemplateNode} node\n * @param {(() => any)} get_input\n * @param {null | ((anchor: Node) => void)} pending_fn\n * @param {null | ((anchor: Node, value: Source) => void)} then_fn\n * @param {null | ((anchor: Node, error: unknown) => void)} catch_fn\n * @returns {void}\n */\nexport function await_block(node, get_input, pending_fn, then_fn, catch_fn) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar runes = is_runes();\n\n\tvar v = /** @type {V} */ (UNINITIALIZED);\n\tvar value = runes ? source(v) : mutable_source(v, false, false);\n\tvar error = runes ? source(v) : mutable_source(v, false, false);\n\n\tvar branches = new BranchManager(node);\n\n\tblock(() => {\n\t\tvar input = get_input();\n\t\tvar destroyed = false;\n\n\t\t/** Whether or not there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\t// @ts-ignore coercing `node` to a `Comment` causes TypeScript and Prettier to fight\n\t\tlet mismatch = hydrating && is_promise(input) === (node.data === HYDRATION_START_ELSE);\n\n\t\tif (mismatch) {\n\t\t\t// Hydration mismatch: remove everything inside the anchor and start fresh\n\t\t\tset_hydrate_node(skip_nodes());\n\t\t\tset_hydrating(false);\n\t\t}\n\n\t\tif (is_promise(input)) {\n\t\t\tvar restore = capture();\n\t\t\tvar resolved = false;\n\n\t\t\t/**\n\t\t\t * @param {() => void} fn\n\t\t\t */\n\t\t\tconst resolve = (fn) => {\n\t\t\t\tif (destroyed) return;\n\n\t\t\t\tresolved = true;\n\t\t\t\t// We don't want to restore the previous batch here; {#await} blocks don't follow the async logic\n\t\t\t\t// we have elsewhere, instead pending/resolve/fail states are each their own batch so to speak.\n\t\t\t\trestore(false);\n\t\t\t\t// Make sure we have a batch, since the branch manager expects one to exist\n\t\t\t\tBatch.ensure();\n\n\t\t\t\tif (hydrating) {\n\t\t\t\t\t// `restore()` could set `hydrating` to `true`, which we very much\n\t\t\t\t\t// don't want — we want to restore everything _except_ this\n\t\t\t\t\tset_hydrating(false);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tfn();\n\t\t\t\t} finally {\n\t\t\t\t\tunset_context();\n\n\t\t\t\t\t// without this, the DOM does not update until two ticks after the promise\n\t\t\t\t\t// resolves, which is unexpected behaviour (and somewhat irksome to test)\n\t\t\t\t\tif (!is_flushing_sync) flushSync();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tinput.then(\n\t\t\t\t(v) => {\n\t\t\t\t\tresolve(() => {\n\t\t\t\t\t\tinternal_set(value, v);\n\t\t\t\t\t\tbranches.ensure(THEN, then_fn && ((target) => then_fn(target, value)));\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t(e) => {\n\t\t\t\t\tresolve(() => {\n\t\t\t\t\t\tinternal_set(error, e);\n\t\t\t\t\t\tbranches.ensure(THEN, catch_fn && ((target) => catch_fn(target, error)));\n\n\t\t\t\t\t\tif (!catch_fn) {\n\t\t\t\t\t\t\t// Rethrow the error if no catch block exists\n\t\t\t\t\t\t\tthrow error.v;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif (hydrating) {\n\t\t\t\tbranches.ensure(PENDING, pending_fn);\n\t\t\t} else {\n\t\t\t\t// Wait a microtask before checking if we should show the pending state as\n\t\t\t\t// the promise might have resolved by then\n\t\t\t\tqueue_micro_task(() => {\n\t\t\t\t\tif (!resolved) {\n\t\t\t\t\t\tresolve(() => {\n\t\t\t\t\t\t\tbranches.ensure(PENDING, pending_fn);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tinternal_set(value, input);\n\t\t\tbranches.ensure(THEN, then_fn && ((target) => then_fn(target, value)));\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\treturn () => {\n\t\t\tdestroyed = true;\n\t\t};\n\t});\n}\n", "/** @import { TemplateNode } from '#client' */\nimport { EFFECT_TRANSPARENT } from '#client/constants';\nimport {\n\thydrate_next,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport { block } from '../../reactivity/effects.js';\nimport { BranchManager } from './branches.js';\nimport { HYDRATION_START, HYDRATION_START_ELSE } from '../../../../constants.js';\n\n/**\n * @param {TemplateNode} node\n * @param {(branch: (fn: (anchor: Node) => void, key?: number | false) => void) => void} fn\n * @param {boolean} [elseif] True if this is an `{:else if ...}` block rather than an `{#if ...}`, as that affects which transitions are considered 'local'\n * @returns {void}\n */\nexport function if_block(node, fn, elseif = false) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\tvar flags = elseif ? EFFECT_TRANSPARENT : 0;\n\n\t/**\n\t * @param {number | false} key\n\t * @param {null | ((anchor: Node) => void)} fn\n\t */\n\tfunction update_branch(key, fn) {\n\t\tif (hydrating) {\n\t\t\tconst data = read_hydration_instruction(node);\n\n\t\t\t/**\n\t\t\t * @type {number | false}\n\t\t\t * \"[\" = branch 0, \"[1\" = branch 1, \"[2\" = branch 2, ..., \"[!\" = else (false)\n\t\t\t */\n\t\t\tvar hydrated_key;\n\n\t\t\tif (data === HYDRATION_START) {\n\t\t\t\thydrated_key = 0;\n\t\t\t} else if (data === HYDRATION_START_ELSE) {\n\t\t\t\thydrated_key = false;\n\t\t\t} else {\n\t\t\t\thydrated_key = parseInt(data.substring(1)); // \"[1\", \"[2\", etc.\n\t\t\t}\n\n\t\t\tif (key !== hydrated_key) {\n\t\t\t\t// Hydration mismatch: remove everything inside the anchor and start fresh.\n\t\t\t\t// This could happen with `{#if browser}...{/if}`, for example\n\t\t\t\tvar anchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tbranches.anchor = anchor;\n\n\t\t\t\tset_hydrating(false);\n\t\t\t\tbranches.ensure(key, fn);\n\t\t\t\tset_hydrating(true);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tbranches.ensure(key, fn);\n\t}\n\n\tblock(() => {\n\t\tvar has_branch = false;\n\n\t\tfn((fn, key = 0) => {\n\t\t\thas_branch = true;\n\t\t\tupdate_branch(key, fn);\n\t\t});\n\n\t\tif (!has_branch) {\n\t\t\tupdate_branch(false, null);\n\t\t}\n\t}, flags);\n}\n", "/** @import { TemplateNode } from '#client' */\nimport { is_runes } from '../../context.js';\nimport { block } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrating } from '../hydration.js';\nimport { BranchManager } from './branches.js';\n\nconst NAN = Symbol('NaN');\n\n/**\n * @template V\n * @param {TemplateNode} node\n * @param {() => V} get_key\n * @param {(anchor: Node) => TemplateNode | void} render_fn\n * @returns {void}\n */\nexport function key(node, get_key, render_fn) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\n\tvar legacy = !is_runes();\n\n\tblock(() => {\n\t\tvar key = get_key();\n\n\t\t// NaN !== NaN, hence we do this workaround to not trigger remounts unnecessarily\n\t\tif (key !== key) {\n\t\t\tkey = /** @type {any} */ (NAN);\n\t\t}\n\n\t\t// key blocks in Svelte <5 had stupid semantics\n\t\tif (legacy && key !== null && typeof key === 'object') {\n\t\t\tkey = /** @type {V} */ ({});\n\t\t}\n\n\t\tbranches.ensure(key, render_fn);\n\t});\n}\n", "import { render_effect } from '../../reactivity/effects.js';\nimport { hydrating, set_hydrate_node } from '../hydration.js';\nimport { get_first_child } from '../operations.js';\n\n/**\n * @param {HTMLDivElement | SVGGElement} element\n * @param {() => Record} get_styles\n * @returns {void}\n */\nexport function css_props(element, get_styles) {\n\tif (hydrating) {\n\t\tset_hydrate_node(get_first_child(element));\n\t}\n\n\trender_effect(() => {\n\t\tvar styles = get_styles();\n\n\t\tfor (var key in styles) {\n\t\t\tvar value = styles[key];\n\n\t\t\tif (value) {\n\t\t\t\telement.style.setProperty(key, value);\n\t\t\t} else {\n\t\t\t\telement.style.removeProperty(key);\n\t\t\t}\n\t\t}\n\t});\n}\n", "/** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\n/** @import { Batch } from '../../reactivity/batch.js'; */\nimport {\n\tEACH_INDEX_REACTIVE,\n\tEACH_IS_ANIMATED,\n\tEACH_IS_CONTROLLED,\n\tEACH_ITEM_IMMUTABLE,\n\tEACH_ITEM_REACTIVE,\n\tHYDRATION_END,\n\tHYDRATION_START_ELSE\n} from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tshould_defer_append\n} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { source, mutable_source, internal_set } from '../../reactivity/sources.js';\nimport { array_from, is_array } from '../../../shared/utils.js';\nimport { BRANCH_EFFECT, COMMENT_NODE, EFFECT_OFFSCREEN, INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\nimport { current_batch } from '../../reactivity/batch.js';\nimport * as e from '../../errors.js';\n\n// When making substantive changes to this file, validate them with the each block stress test:\n// https://svelte.dev/playground/1972b2cf46564476ad8c8c6405b23b7b\n// This test also exists in this repo, as `packages/svelte/tests/manual/each-stress-test`\n\n/**\n * @param {any} _\n * @param {number} i\n */\nexport function index(_, i) {\n\treturn i;\n}\n\n/**\n * Pause multiple effects simultaneously, and coordinate their\n * subsequent destruction. Used in each blocks\n * @param {EachState} state\n * @param {Effect[]} to_destroy\n * @param {null | Node} controlled_anchor\n */\nfunction pause_effects(state, to_destroy, controlled_anchor) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = to_destroy.length;\n\n\t/** @type {EachOutroGroup} */\n\tvar group;\n\tvar remaining = to_destroy.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tlet effect = to_destroy[i];\n\n\t\tpause_effect(\n\t\t\teffect,\n\t\t\t() => {\n\t\t\t\tif (group) {\n\t\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\t\tgroup.done.add(effect);\n\n\t\t\t\t\tif (group.pending.size === 0) {\n\t\t\t\t\t\tvar groups = /** @type {Set} */ (state.outrogroups);\n\n\t\t\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\t\t\tgroups.delete(group);\n\n\t\t\t\t\t\tif (groups.size === 0) {\n\t\t\t\t\t\t\tstate.outrogroups = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tremaining -= 1;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}\n\n\tif (remaining === 0) {\n\t\t// If we're in a controlled each block (i.e. the block is the only child of an\n\t\t// element), and we are removing all items, _and_ there are no out transitions,\n\t\t// we can use the fast path — emptying the element and replacing the anchor\n\t\tvar fast_path = transitions.length === 0 && controlled_anchor !== null;\n\n\t\tif (fast_path) {\n\t\t\tvar anchor = /** @type {Element} */ (controlled_anchor);\n\t\t\tvar parent_node = /** @type {Element} */ (anchor.parentNode);\n\n\t\t\tclear_text_content(parent_node);\n\t\t\tparent_node.append(anchor);\n\n\t\t\tstate.items.clear();\n\t\t}\n\n\t\tdestroy_effects(to_destroy, !fast_path);\n\t} else {\n\t\tgroup = {\n\t\t\tpending: new Set(to_destroy),\n\t\t\tdone: new Set()\n\t\t};\n\n\t\t(state.outrogroups ??= new Set()).add(group);\n\t}\n}\n\n/**\n * @param {Effect[]} to_destroy\n * @param {boolean} remove_dom\n */\nfunction destroy_effects(to_destroy, remove_dom = true) {\n\t// TODO only destroy effects if no pending batch needs them. otherwise,\n\t// just re-add the `EFFECT_OFFSCREEN` flag\n\tfor (var i = 0; i < to_destroy.length; i++) {\n\t\tdestroy_effect(to_destroy[i], remove_dom);\n\t}\n}\n\n/** @type {TemplateNode} */\nvar offscreen_anchor;\n\n/**\n * @template V\n * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @param {(value: V, index: number) => any} get_key\n * @param {(anchor: Node, item: MaybeSource, index: MaybeSource) => void} render_fn\n * @param {null | ((anchor: Node) => void)} fallback_fn\n * @returns {void}\n */\nexport function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {\n\tvar anchor = node;\n\n\t/** @type {Map} */\n\tvar items = new Map();\n\n\tvar is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tanchor = hydrating\n\t\t\t? set_hydrate_node(get_first_child(parent_node))\n\t\t\t: parent_node.appendChild(create_text());\n\t}\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\t/** @type {Effect | null} */\n\tvar fallback = null;\n\n\t// TODO: ideally we could use derived for runes mode but because of the ability\n\t// to use a store which can be mutated, we can't do that here as mutating a store\n\t// will still result in the collection array being the same from the store\n\tvar each_array = derived_safe_equal(() => {\n\t\tvar collection = get_collection();\n\n\t\treturn is_array(collection) ? collection : collection == null ? [] : array_from(collection);\n\t});\n\n\t/** @type {V[]} */\n\tvar array;\n\n\tvar first_run = true;\n\n\tfunction commit() {\n\t\tstate.fallback = fallback;\n\t\treconcile(state, array, anchor, flags, get_key);\n\n\t\tif (fallback !== null) {\n\t\t\tif (array.length === 0) {\n\t\t\t\tif ((fallback.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback.f ^= EFFECT_OFFSCREEN;\n\t\t\t\t\tmove(fallback, null, anchor);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\t// TODO only null out if no pending batch needs it,\n\t\t\t\t\t// otherwise re-add `fallback.fragment` and move the\n\t\t\t\t\t// effect into it\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tvar effect = block(() => {\n\t\tarray = /** @type {V[]} */ (get(each_array));\n\t\tvar length = array.length;\n\n\t\t/** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tvar is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE;\n\n\t\t\tif (is_else !== (length === 0)) {\n\t\t\t\t// hydration mismatch — remove the server-rendered DOM and start over\n\t\t\t\tanchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\tvar keys = new Set();\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tfor (var index = 0; index < length; index += 1) {\n\t\t\tif (\n\t\t\t\thydrating &&\n\t\t\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t) {\n\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\tmismatch = true;\n\t\t\t\tset_hydrating(false);\n\t\t\t}\n\n\t\t\tvar value = array[index];\n\t\t\tvar key = get_key(value, index);\n\n\t\t\tvar item = first_run ? null : items.get(key);\n\n\t\t\tif (item) {\n\t\t\t\t// update before reconciliation, to trigger any async updates\n\t\t\t\tif (item.v) internal_set(item.v, value);\n\t\t\t\tif (item.i) internal_set(item.i, index);\n\n\t\t\t\tif (defer) {\n\t\t\t\t\tbatch.unskip_effect(item.e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem = create_item(\n\t\t\t\t\titems,\n\t\t\t\t\tfirst_run ? anchor : (offscreen_anchor ??= create_text()),\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t\trender_fn,\n\t\t\t\t\tflags,\n\t\t\t\t\tget_collection\n\t\t\t\t);\n\n\t\t\t\tif (!first_run) {\n\t\t\t\t\titem.e.f |= EFFECT_OFFSCREEN;\n\t\t\t\t}\n\n\t\t\t\titems.set(key, item);\n\t\t\t}\n\n\t\t\tkeys.add(key);\n\t\t}\n\n\t\tif (length === 0 && fallback_fn && !fallback) {\n\t\t\tif (first_run) {\n\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t} else {\n\t\t\t\tfallback = branch(() => fallback_fn((offscreen_anchor ??= create_text())));\n\t\t\t\tfallback.f |= EFFECT_OFFSCREEN;\n\t\t\t}\n\t\t}\n\n\t\tif (length > keys.size) {\n\t\t\tif (DEV) {\n\t\t\t\tvalidate_each_keys(array, get_key);\n\t\t\t} else {\n\t\t\t\t// in prod, the additional information isn't printed, so don't bother computing it\n\t\t\t\te.each_key_duplicate('', '', '');\n\t\t\t}\n\t\t}\n\n\t\t// remove excess nodes\n\t\tif (hydrating && length > 0) {\n\t\t\tset_hydrate_node(skip_nodes());\n\t\t}\n\n\t\tif (!first_run) {\n\t\t\tif (defer) {\n\t\t\t\tfor (const [key, item] of items) {\n\t\t\t\t\tif (!keys.has(key)) {\n\t\t\t\t\t\tbatch.skip_effect(item.e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbatch.oncommit(commit);\n\t\t\t\tbatch.ondiscard(() => {\n\t\t\t\t\t// TODO presumably we need to do something here?\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcommit();\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\t// When we mount the each block for the first time, the collection won't be\n\t\t// connected to this effect as the effect hasn't finished running yet and its deps\n\t\t// won't be assigned. However, it's possible that when reconciling the each block\n\t\t// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the\n\t\t// collection again can provide consistency to the reactive graph again as the deriveds\n\t\t// will now be `CLEAN`.\n\t\tget(each_array);\n\t});\n\n\t/** @type {EachState} */\n\tvar state = { effect, flags, items, outrogroups: null, fallback };\n\n\tfirst_run = false;\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Skip past any non-branch effects (which could be created with `createSubscriber`, for example) to find the next branch effect\n * @param {Effect | null} effect\n * @returns {Effect | null}\n */\nfunction skip_to_branch(effect) {\n\twhile (effect !== null && (effect.f & BRANCH_EFFECT) === 0) {\n\t\teffect = effect.next;\n\t}\n\treturn effect;\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {EachState} state\n * @param {Array} array\n * @param {Element | Comment | Text} anchor\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @returns {void}\n */\nfunction reconcile(state, array, anchor, flags, get_key) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar current = skip_to_branch(state.effect.first);\n\n\t/** @type {undefined | Set} */\n\tvar seen;\n\n\t/** @type {Effect | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set} */\n\tvar to_animate;\n\n\t/** @type {Effect[]} */\n\tvar matched = [];\n\n\t/** @type {Effect[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {Effect | undefined} */\n\tvar effect;\n\n\t/** @type {number} */\n\tvar i;\n\n\tif (is_animated) {\n\t\tfor (i = 0; i < length; i += 1) {\n\t\t\tvalue = array[i];\n\t\t\tkey = get_key(value, i);\n\t\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\t\t// offscreen == coming in now, no animation in that case,\n\t\t\t// else this would happen https://github.com/sveltejs/svelte/issues/17181\n\t\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\teffect.nodes?.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(effect);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < length; i += 1) {\n\t\tvalue = array[i];\n\t\tkey = get_key(value, i);\n\n\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\tif (state.outrogroups !== null) {\n\t\t\tfor (const group of state.outrogroups) {\n\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\tgroup.done.delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) !== 0) {\n\t\t\teffect.f ^= EFFECT_OFFSCREEN;\n\n\t\t\tif (effect === current) {\n\t\t\t\tmove(effect, null, anchor);\n\t\t\t} else {\n\t\t\t\tvar next = prev ? prev.next : current;\n\n\t\t\t\tif (effect === state.effect.last) {\n\t\t\t\t\tstate.effect.last = effect.prev;\n\t\t\t\t}\n\n\t\t\t\tif (effect.prev) effect.prev.next = effect.next;\n\t\t\t\tif (effect.next) effect.next.prev = effect.prev;\n\t\t\t\tlink(state, prev, effect);\n\t\t\t\tlink(state, effect, next);\n\n\t\t\t\tmove(effect, next, anchor);\n\t\t\t\tprev = effect;\n\n\t\t\t\tmatched = [];\n\t\t\t\tstashed = [];\n\n\t\t\t\tcurrent = skip_to_branch(prev.next);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & INERT) !== 0) {\n\t\t\tresume_effect(effect);\n\t\t\tif (is_animated) {\n\t\t\t\teffect.nodes?.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif (effect !== current) {\n\t\t\tif (seen !== undefined && seen.has(effect)) {\n\t\t\t\tif (matched.length < stashed.length) {\n\t\t\t\t\t// more efficient to move later items to the front\n\t\t\t\t\tvar start = stashed[0];\n\t\t\t\t\tvar j;\n\n\t\t\t\t\tprev = start.prev;\n\n\t\t\t\t\tvar a = matched[0];\n\t\t\t\t\tvar b = matched[matched.length - 1];\n\n\t\t\t\t\tfor (j = 0; j < matched.length; j += 1) {\n\t\t\t\t\t\tmove(matched[j], start, anchor);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (j = 0; j < stashed.length; j += 1) {\n\t\t\t\t\t\tseen.delete(stashed[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlink(state, a.prev, b.next);\n\t\t\t\t\tlink(state, prev, a);\n\t\t\t\t\tlink(state, b, start);\n\n\t\t\t\t\tcurrent = start;\n\t\t\t\t\tprev = b;\n\t\t\t\t\ti -= 1;\n\n\t\t\t\t\tmatched = [];\n\t\t\t\t\tstashed = [];\n\t\t\t\t} else {\n\t\t\t\t\t// more efficient to move earlier items to the back\n\t\t\t\t\tseen.delete(effect);\n\t\t\t\t\tmove(effect, current, anchor);\n\n\t\t\t\t\tlink(state, effect.prev, effect.next);\n\t\t\t\t\tlink(state, effect, prev === null ? state.effect.first : prev.next);\n\t\t\t\t\tlink(state, prev, effect);\n\n\t\t\t\t\tprev = effect;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\twhile (current !== null && current !== effect) {\n\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = skip_to_branch(current.next);\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\tmatched.push(effect);\n\t\t}\n\n\t\tprev = effect;\n\t\tcurrent = skip_to_branch(effect.next);\n\t}\n\n\tif (state.outrogroups !== null) {\n\t\tfor (const group of state.outrogroups) {\n\t\t\tif (group.pending.size === 0) {\n\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\tstate.outrogroups?.delete(group);\n\t\t\t}\n\t\t}\n\n\t\tif (state.outrogroups.size === 0) {\n\t\t\tstate.outrogroups = null;\n\t\t}\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\t/** @type {Effect[]} */\n\t\tvar to_destroy = [];\n\n\t\tif (seen !== undefined) {\n\t\t\tfor (effect of seen) {\n\t\t\t\tif ((effect.f & INERT) === 0) {\n\t\t\t\t\tto_destroy.push(effect);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (current !== null) {\n\t\t\t// If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished\n\t\t\tif ((current.f & INERT) === 0 && current !== state.fallback) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\n\t\t\tcurrent = skip_to_branch(current.next);\n\t\t}\n\n\t\tvar destroy_length = to_destroy.length;\n\n\t\tif (destroy_length > 0) {\n\t\t\tvar controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;\n\n\t\t\tif (is_animated) {\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.measure();\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor);\n\t\t}\n\t}\n\n\tif (is_animated) {\n\t\tqueue_micro_task(() => {\n\t\t\tif (to_animate === undefined) return;\n\t\t\tfor (effect of to_animate) {\n\t\t\t\teffect.nodes?.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @template V\n * @param {Map} items\n * @param {Node} anchor\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source, index: number | Value, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @returns {EachItem}\n */\nfunction create_item(items, anchor, value, key, index, render_fn, flags, get_collection) {\n\tvar v =\n\t\t(flags & EACH_ITEM_REACTIVE) !== 0\n\t\t\t? (flags & EACH_ITEM_IMMUTABLE) === 0\n\t\t\t\t? mutable_source(value, false, false)\n\t\t\t\t: source(value)\n\t\t\t: null;\n\n\tvar i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index) : null;\n\n\tif (DEV && v) {\n\t\t// For tracing purposes, we need to link the source signal we create with the\n\t\t// collection + index so that tracing works as intended\n\t\tv.trace = () => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[i?.v ?? index];\n\t\t};\n\t}\n\n\treturn {\n\t\tv,\n\t\ti,\n\t\te: branch(() => {\n\t\t\trender_fn(anchor, v ?? value, i ?? index, get_collection);\n\n\t\t\treturn () => {\n\t\t\t\titems.delete(key);\n\t\t\t};\n\t\t})\n\t};\n}\n\n/**\n * @param {Effect} effect\n * @param {Effect | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(effect, next, anchor) {\n\tif (!effect.nodes) return;\n\n\tvar node = effect.nodes.start;\n\tvar end = effect.nodes.end;\n\n\tvar dest =\n\t\tnext && (next.f & EFFECT_OFFSCREEN) === 0\n\t\t\t? /** @type {EffectNodes} */ (next.nodes).start\n\t\t\t: anchor;\n\n\twhile (node !== null) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\n\t\tif (node === end) {\n\t\t\treturn;\n\t\t}\n\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {Effect | null} prev\n * @param {Effect | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.effect.first = next;\n\t} else {\n\t\tprev.next = next;\n\t}\n\n\tif (next === null) {\n\t\tstate.effect.last = prev;\n\t} else {\n\t\tnext.prev = prev;\n\t}\n}\n\n/**\n * @param {Array} array\n * @param {(item: any, index: number) => string} key_fn\n * @returns {void}\n */\nfunction validate_each_keys(array, key_fn) {\n\tconst keys = new Map();\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; i++) {\n\t\tconst key = key_fn(array[i], i);\n\n\t\tif (keys.has(key)) {\n\t\t\tconst a = String(keys.get(key));\n\t\t\tconst b = String(i);\n\n\t\t\t/** @type {string | null} */\n\t\t\tlet k = String(key);\n\t\t\tif (k.startsWith('[object ')) k = null;\n\n\t\t\te.each_key_duplicate(a, b, k);\n\t\t}\n\n\t\tkeys.set(key, i);\n\t}\n}\n", "/** @import { Effect, TemplateNode } from '#client' */\nimport { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';\nimport { remove_effect_dom, template_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\nimport { create_fragment_from_html } from '../reconciler.js';\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { get_first_child, get_next_sibling } from '../operations.js';\nimport { active_effect } from '../../runtime.js';\nimport { COMMENT_NODE } from '#client/constants';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string} get_value\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(node, get_value, svg = false, mathml = false, skip_warning = false) {\n\tvar anchor = node;\n\n\tvar value = '';\n\n\ttemplate_effect(() => {\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) hydrate_next();\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect.nodes !== null) {\n\t\t\tremove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));\n\t\t\teffect.nodes = null;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\tif (hydrating) {\n\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\n\t\t\t/** @type {TemplateNode | null} */\n\t\t\tvar next = hydrate_next();\n\t\t\tvar last = next;\n\n\t\t\twhile (\n\t\t\t\tnext !== null &&\n\t\t\t\t(next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')\n\t\t\t) {\n\t\t\t\tlast = next;\n\t\t\t\tnext = get_next_sibling(next);\n\t\t\t}\n\n\t\t\tif (next === null) {\n\t\t\t\tw.hydration_mismatch();\n\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t}\n\n\t\t\tif (DEV && !skip_warning) {\n\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t}\n\n\t\t\tassign_nodes(hydrate_node, last);\n\t\t\tanchor = set_hydrate_node(next);\n\t\t\treturn;\n\t\t}\n\n\t\tvar html = value + '';\n\t\tif (svg) html = `${html}`;\n\t\telse if (mathml) html = `${html}`;\n\n\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = create_fragment_from_html(html);\n\n\t\tif (svg || mathml) {\n\t\t\tnode = /** @type {Element} */ (get_first_child(node));\n\t\t}\n\n\t\tassign_nodes(\n\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t);\n\n\t\tif (svg || mathml) {\n\t\t\twhile (get_first_child(node)) {\n\t\t\t\tanchor.before(/** @type {TemplateNode} */ (get_first_child(node)));\n\t\t\t}\n\t\t} else {\n\t\t\tanchor.before(node);\n\t\t}\n\t});\n}\n", "import { hydrate_next, hydrating } from '../hydration.js';\n\n/**\n * @param {Comment} anchor\n * @param {Record} $$props\n * @param {string} name\n * @param {Record} slot_props\n * @param {null | ((anchor: Comment) => void)} fallback_fn\n */\nexport function slot(anchor, $$props, name, slot_props, fallback_fn) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar slot_fn = $$props.$$slots?.[name];\n\t// Interop: Can use snippets to fill slots\n\tvar is_interop = false;\n\tif (slot_fn === true) {\n\t\tslot_fn = $$props[name === 'default' ? 'children' : name];\n\t\tis_interop = true;\n\t}\n\n\tif (slot_fn === undefined) {\n\t\tif (fallback_fn !== null) {\n\t\t\tfallback_fn(anchor);\n\t\t}\n\t} else {\n\t\tslot_fn(anchor, is_interop ? () => slot_props : slot_props);\n\t}\n}\n\n/**\n * @param {Record} props\n * @returns {Record}\n */\nexport function sanitize_slots(props) {\n\t/** @type {Record} */\n\tconst sanitized = {};\n\tif (props.children) sanitized.default = true;\n\tfor (const key in props.$$slots) {\n\t\tsanitized[key] = true;\n\t}\n\treturn sanitized;\n}\n", "import { is_void } from '../../utils.js';\nimport * as w from './warnings.js';\nimport * as e from './errors.js';\n\nexport { invalid_default_snippet } from './errors.js';\n\n/**\n * @param {() => string} tag_fn\n * @returns {void}\n */\nexport function validate_void_dynamic_element(tag_fn) {\n\tconst tag = tag_fn();\n\tif (tag && is_void(tag)) {\n\t\tw.dynamic_void_element_content(tag);\n\t}\n}\n\n/** @param {() => unknown} tag_fn */\nexport function validate_dynamic_element_tag(tag_fn) {\n\tconst tag = tag_fn();\n\tconst is_string = typeof tag === 'string';\n\tif (tag && !is_string) {\n\t\te.svelte_element_invalid_this_value();\n\t}\n}\n\n/**\n * @param {any} store\n * @param {string} name\n */\nexport function validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\te.store_invalid_shape(name);\n\t}\n}\n\n/**\n * @template {(...args: any[]) => unknown} T\n * @param {T} fn\n */\nexport function prevent_snippet_stringification(fn) {\n\tfn.toString = () => {\n\t\te.snippet_without_render_tag();\n\t\treturn '';\n\t};\n\treturn fn;\n}\n", "/** @import { Snippet } from 'svelte' */\n/** @import { TemplateNode } from '#client' */\n/** @import { Getters } from '#shared' */\nimport { EFFECT_TRANSPARENT, ELEMENT_NODE } from '#client/constants';\nimport { block, teardown } from '../../reactivity/effects.js';\nimport {\n\tdev_current_component_function,\n\tset_dev_current_component_function\n} from '../../context.js';\nimport { hydrate_next, hydrate_node, hydrating } from '../hydration.js';\nimport { create_fragment_from_html } from '../reconciler.js';\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport * as e from '../../errors.js';\nimport { DEV } from 'esm-env';\nimport { get_first_child, get_next_sibling } from '../operations.js';\nimport { prevent_snippet_stringification } from '../../../shared/validate.js';\nimport { BranchManager } from './branches.js';\n\n/**\n * @template {(node: TemplateNode, ...args: any[]) => void} SnippetFn\n * @param {TemplateNode} node\n * @param {() => SnippetFn | null | undefined} get_snippet\n * @param {(() => any)[]} args\n * @returns {void}\n */\nexport function snippet(node, get_snippet, ...args) {\n\tvar branches = new BranchManager(node);\n\n\tblock(() => {\n\t\tconst snippet = get_snippet() ?? null;\n\n\t\tif (DEV && snippet == null) {\n\t\t\te.invalid_snippet();\n\t\t}\n\n\t\tbranches.ensure(snippet, snippet && ((anchor) => snippet(anchor, ...args)));\n\t}, EFFECT_TRANSPARENT);\n}\n\n/**\n * In development, wrap the snippet function so that it passes validation, and so that the\n * correct component context is set for ownership checks\n * @param {any} component\n * @param {(node: TemplateNode, ...args: any[]) => void} fn\n */\nexport function wrap_snippet(component, fn) {\n\tconst snippet = (/** @type {TemplateNode} */ node, /** @type {any[]} */ ...args) => {\n\t\tvar previous_component_function = dev_current_component_function;\n\t\tset_dev_current_component_function(component);\n\n\t\ttry {\n\t\t\treturn fn(node, ...args);\n\t\t} finally {\n\t\t\tset_dev_current_component_function(previous_component_function);\n\t\t}\n\t};\n\n\tprevent_snippet_stringification(snippet);\n\n\treturn snippet;\n}\n\n/**\n * Create a snippet programmatically\n * @template {unknown[]} Params\n * @param {(...params: Getters) => {\n * render: () => string\n * setup?: (element: Element) => void | (() => void)\n * }} fn\n * @returns {Snippet}\n */\nexport function createRawSnippet(fn) {\n\t// @ts-expect-error the types are a lie\n\treturn (/** @type {TemplateNode} */ anchor, /** @type {Getters} */ ...params) => {\n\t\tvar snippet = fn(...params);\n\n\t\t/** @type {Element} */\n\t\tvar element;\n\n\t\tif (hydrating) {\n\t\t\telement = /** @type {Element} */ (hydrate_node);\n\t\t\thydrate_next();\n\t\t} else {\n\t\t\tvar html = snippet.render().trim();\n\t\t\tvar fragment = create_fragment_from_html(html, true);\n\t\t\telement = /** @type {Element} */ (get_first_child(fragment));\n\n\t\t\tif (DEV && (get_next_sibling(element) !== null || element.nodeType !== ELEMENT_NODE)) {\n\t\t\t\tw.invalid_raw_snippet_render();\n\t\t\t}\n\n\t\t\tanchor.before(element);\n\t\t}\n\n\t\tconst result = snippet.setup?.(element);\n\t\tassign_nodes(element, element);\n\n\t\tif (typeof result === 'function') {\n\t\t\tteardown(result);\n\t\t}\n\t};\n}\n", "/** @import { TemplateNode, Dom } from '#client' */\nimport { EFFECT_TRANSPARENT } from '#client/constants';\nimport { block } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrating } from '../hydration.js';\nimport { BranchManager } from './branches.js';\n\n/**\n * @template P\n * @template {(props: P) => void} C\n * @param {TemplateNode} node\n * @param {() => C} get_component\n * @param {(anchor: TemplateNode, component: C) => Dom | void} render_fn\n * @returns {void}\n */\nexport function component(node, get_component, render_fn) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\n\tblock(() => {\n\t\tvar component = get_component() ?? null;\n\t\tbranches.ensure(component, component && ((target) => render_fn(target, component)));\n\t}, EFFECT_TRANSPARENT);\n}\n", "/** @import { Raf } from '#client' */\nimport { noop } from '../shared/utils.js';\n\nimport { BROWSER } from 'esm-env';\n\nconst now = BROWSER ? () => performance.now() : () => Date.now();\n\n/** @type {Raf} */\nexport const raf = {\n\t// don't access requestAnimationFrame eagerly outside method\n\t// this allows basic testing of user code without JSDOM\n\t// bunder will eval and remove ternary when the user's app is built\n\ttick: /** @param {any} _ */ (_) => (BROWSER ? requestAnimationFrame : noop)(_),\n\tnow: () => now(),\n\ttasks: new Set()\n};\n", "/** @import { TaskCallback, Task, TaskEntry } from '#client' */\nimport { raf } from './timing.js';\n\n// TODO move this into timing.js where it probably belongs\n\n/**\n * @returns {void}\n */\nfunction run_tasks() {\n\t// use `raf.now()` instead of the `requestAnimationFrame` callback argument, because\n\t// otherwise things can get wonky https://github.com/sveltejs/svelte/pull/14541\n\tconst now = raf.now();\n\n\traf.tasks.forEach((task) => {\n\t\tif (!task.c(now)) {\n\t\t\traf.tasks.delete(task);\n\t\t\ttask.f();\n\t\t}\n\t});\n\n\tif (raf.tasks.size !== 0) {\n\t\traf.tick(run_tasks);\n\t}\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 {TaskCallback} callback\n * @returns {Task}\n */\nexport function loop(callback) {\n\t/** @type {TaskEntry} */\n\tlet task;\n\n\tif (raf.tasks.size === 0) {\n\t\traf.tick(run_tasks);\n\t}\n\n\treturn {\n\t\tpromise: new Promise((fulfill) => {\n\t\t\traf.tasks.add((task = { c: callback, f: fulfill }));\n\t\t}),\n\t\tabort() {\n\t\t\traf.tasks.delete(task);\n\t\t}\n\t};\n}\n", "/** @import { AnimateFn, Animation, AnimationConfig, EachItem, Effect, EffectNodes, TransitionFn, TransitionManager } from '#client' */\nimport { noop, is_function } from '../../../shared/utils.js';\nimport { effect } from '../../reactivity/effects.js';\nimport { active_effect, untrack } from '../../runtime.js';\nimport { loop } from '../../loop.js';\nimport { should_intro } from '../../render.js';\nimport { TRANSITION_GLOBAL, TRANSITION_IN, TRANSITION_OUT } from '../../../../constants.js';\nimport { BLOCK_EFFECT, REACTION_RAN, EFFECT_TRANSPARENT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { without_reactive_context } from './bindings/shared.js';\n\n/**\n * @param {Element} element\n * @param {'introstart' | 'introend' | 'outrostart' | 'outroend'} type\n * @returns {void}\n */\nfunction dispatch_event(element, type) {\n\twithout_reactive_context(() => {\n\t\telement.dispatchEvent(new CustomEvent(type));\n\t});\n}\n\n/**\n * Converts a property to the camel-case format expected by Element.animate(), KeyframeEffect(), and KeyframeEffect.setKeyframes().\n * @param {string} style\n * @returns {string}\n */\nfunction css_property_to_camelcase(style) {\n\t// in compliance with spec\n\tif (style === 'float') return 'cssFloat';\n\tif (style === 'offset') return 'cssOffset';\n\n\t// do not rename custom @properties\n\tif (style.startsWith('--')) return style;\n\n\tconst parts = style.split('-');\n\tif (parts.length === 1) return parts[0];\n\treturn (\n\t\tparts[0] +\n\t\tparts\n\t\t\t.slice(1)\n\t\t\t.map(/** @param {any} word */ (word) => word[0].toUpperCase() + word.slice(1))\n\t\t\t.join('')\n\t);\n}\n\n/**\n * @param {string} css\n * @returns {Keyframe}\n */\nfunction css_to_keyframe(css) {\n\t/** @type {Keyframe} */\n\tconst keyframe = {};\n\tconst parts = css.split(';');\n\tfor (const part of parts) {\n\t\tconst [property, value] = part.split(':');\n\t\tif (!property || value === undefined) break;\n\n\t\tconst formatted_property = css_property_to_camelcase(property.trim());\n\t\tkeyframe[formatted_property] = value.trim();\n\t}\n\treturn keyframe;\n}\n\n/** @param {number} t */\nconst linear = (t) => t;\n\n/** @type {Effect | null} */\nlet animation_effect_override = null;\n\n/** @param {Effect | null} v */\nexport function set_animation_effect_override(v) {\n\tanimation_effect_override = v;\n}\n\n/**\n * Called inside keyed `{#each ...}` blocks (as `$.animation(...)`). This creates an animation manager\n * and attaches it to the block, so that moves can be animated following reconciliation.\n * @template P\n * @param {Element} element\n * @param {() => AnimateFn

} get_fn\n * @param {(() => P) | null} get_params\n */\nexport function animation(element, get_fn, get_params) {\n\tvar effect = animation_effect_override ?? /** @type {Effect} */ (active_effect);\n\tvar nodes = /** @type {EffectNodes} */ (effect.nodes);\n\n\t/** @type {DOMRect} */\n\tvar from;\n\n\t/** @type {DOMRect} */\n\tvar to;\n\n\t/** @type {Animation | undefined} */\n\tvar animation;\n\n\t/** @type {null | { position: string, width: string, height: string, transform: string }} */\n\tvar original_styles = null;\n\n\tnodes.a ??= {\n\t\telement,\n\t\tmeasure() {\n\t\t\tfrom = this.element.getBoundingClientRect();\n\t\t},\n\t\tapply() {\n\t\t\tanimation?.abort();\n\n\t\t\tto = this.element.getBoundingClientRect();\n\n\t\t\tif (\n\t\t\t\tfrom.left !== to.left ||\n\t\t\t\tfrom.right !== to.right ||\n\t\t\t\tfrom.top !== to.top ||\n\t\t\t\tfrom.bottom !== to.bottom\n\t\t\t) {\n\t\t\t\tconst options = get_fn()(this.element, { from, to }, get_params?.());\n\n\t\t\t\tanimation = animate(this.element, options, undefined, 1, () => {\n\t\t\t\t\tanimation?.abort();\n\t\t\t\t\tanimation = undefined;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfix() {\n\t\t\t// If an animation is already running, transforming the element is likely to fail,\n\t\t\t// because the styles applied by the animation take precedence. In the case of crossfade,\n\t\t\t// that means the `translate(...)` of the crossfade transition overrules the `translate(...)`\n\t\t\t// we would apply below, leading to the element jumping somewhere to the top left.\n\t\t\tif (element.getAnimations().length) return;\n\n\t\t\t// It's important to destructure these to get fixed values - the object itself has getters,\n\t\t\t// and changing the style to 'absolute' can for example influence the width.\n\t\t\tvar { position, width, height } = getComputedStyle(element);\n\n\t\t\tif (position !== 'absolute' && position !== 'fixed') {\n\t\t\t\tvar style = /** @type {HTMLElement | SVGElement} */ (element).style;\n\n\t\t\t\toriginal_styles = {\n\t\t\t\t\tposition: style.position,\n\t\t\t\t\twidth: style.width,\n\t\t\t\t\theight: style.height,\n\t\t\t\t\ttransform: style.transform\n\t\t\t\t};\n\n\t\t\t\tstyle.position = 'absolute';\n\t\t\t\tstyle.width = width;\n\t\t\t\tstyle.height = height;\n\t\t\t\tvar to = element.getBoundingClientRect();\n\n\t\t\t\tif (from.left !== to.left || from.top !== to.top) {\n\t\t\t\t\tvar transform = `translate(${from.left - to.left}px, ${from.top - to.top}px)`;\n\t\t\t\t\tstyle.transform = style.transform ? `${style.transform} ${transform}` : transform;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tunfix() {\n\t\t\tif (original_styles) {\n\t\t\t\tvar style = /** @type {HTMLElement | SVGElement} */ (element).style;\n\n\t\t\t\tstyle.position = original_styles.position;\n\t\t\t\tstyle.width = original_styles.width;\n\t\t\t\tstyle.height = original_styles.height;\n\t\t\t\tstyle.transform = original_styles.transform;\n\t\t\t}\n\t\t}\n\t};\n\n\t// in the case of a ``, it's possible for `$.animation(...)` to be called\n\t// when an animation manager already exists, if the tag changes. in that case, we need to\n\t// swap out the element rather than creating a new manager, in case it happened at the same\n\t// moment as a reconciliation\n\tnodes.a.element = element;\n}\n\n/**\n * Called inside block effects as `$.transition(...)`. This creates a transition manager and\n * attaches it to the current effect — later, inside `pause_effect` and `resume_effect`, we\n * use this to create `intro` and `outro` transitions.\n * @template P\n * @param {number} flags\n * @param {HTMLElement} element\n * @param {() => TransitionFn

} get_fn\n * @param {(() => P) | null} get_params\n * @returns {void}\n */\nexport function transition(flags, element, get_fn, get_params) {\n\tvar is_intro = (flags & TRANSITION_IN) !== 0;\n\tvar is_outro = (flags & TRANSITION_OUT) !== 0;\n\tvar is_both = is_intro && is_outro;\n\tvar is_global = (flags & TRANSITION_GLOBAL) !== 0;\n\n\t/** @type {'in' | 'out' | 'both'} */\n\tvar direction = is_both ? 'both' : is_intro ? 'in' : 'out';\n\n\t/** @type {AnimationConfig | ((opts: { direction: 'in' | 'out' }) => AnimationConfig) | undefined} */\n\tvar current_options;\n\n\tvar inert = element.inert;\n\n\t/**\n\t * The default overflow style, stashed so we can revert changes during the transition\n\t * that are necessary to work around a Safari <18 bug\n\t * TODO 6.0 remove this, if older versions of Safari have died out enough\n\t */\n\tvar overflow = element.style.overflow;\n\n\t/** @type {Animation | undefined} */\n\tvar intro;\n\n\t/** @type {Animation | undefined} */\n\tvar outro;\n\n\tfunction get_options() {\n\t\treturn without_reactive_context(() => {\n\t\t\t// If a transition is still ongoing, we use the existing options rather than generating\n\t\t\t// new ones. This ensures that reversible transitions reverse smoothly, rather than\n\t\t\t// jumping to a new spot because (for example) a different `duration` was used\n\t\t\treturn (current_options ??= get_fn()(element, get_params?.() ?? /** @type {P} */ ({}), {\n\t\t\t\tdirection\n\t\t\t}));\n\t\t});\n\t}\n\n\t/** @type {TransitionManager} */\n\tvar transition = {\n\t\tis_global,\n\t\tin() {\n\t\t\telement.inert = inert;\n\n\t\t\tif (!is_intro) {\n\t\t\t\toutro?.abort();\n\t\t\t\toutro?.reset?.();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!is_outro) {\n\t\t\t\t// if we intro then outro then intro again, we want to abort the first intro,\n\t\t\t\t// if it's not a bidirectional transition\n\t\t\t\tintro?.abort();\n\t\t\t}\n\n\t\t\tintro = animate(element, get_options(), outro, 1, () => {\n\t\t\t\tdispatch_event(element, 'introend');\n\n\t\t\t\t// Ensure we cancel the animation to prevent leaking\n\t\t\t\tintro?.abort();\n\t\t\t\tintro = current_options = undefined;\n\n\t\t\t\telement.style.overflow = overflow;\n\t\t\t});\n\t\t},\n\t\tout(fn) {\n\t\t\tif (!is_outro) {\n\t\t\t\tfn?.();\n\t\t\t\tcurrent_options = undefined;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\telement.inert = true;\n\n\t\t\toutro = animate(element, get_options(), intro, 0, () => {\n\t\t\t\tdispatch_event(element, 'outroend');\n\t\t\t\tfn?.();\n\t\t\t});\n\t\t},\n\t\tstop: () => {\n\t\t\tintro?.abort();\n\t\t\toutro?.abort();\n\t\t}\n\t};\n\n\tvar e = /** @type {Effect & { nodes: EffectNodes }} */ (active_effect);\n\n\t(e.nodes.t ??= []).push(transition);\n\n\t// if this is a local transition, we only want to run it if the parent (branch) effect's\n\t// parent (block) effect is where the state change happened. we can determine that by\n\t// looking at whether the block effect is currently initializing\n\tif (is_intro && should_intro) {\n\t\tvar run = is_global;\n\n\t\tif (!run) {\n\t\t\tvar block = /** @type {Effect | null} */ (e.parent);\n\n\t\t\t// skip over transparent blocks (e.g. snippets, else-if blocks)\n\t\t\twhile (block && (block.f & EFFECT_TRANSPARENT) !== 0) {\n\t\t\t\twhile ((block = block.parent)) {\n\t\t\t\t\tif ((block.f & BLOCK_EFFECT) !== 0) break;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trun = !block || (block.f & REACTION_RAN) !== 0;\n\t\t}\n\n\t\tif (run) {\n\t\t\teffect(() => {\n\t\t\t\tuntrack(() => transition.in());\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * Animates an element, according to the provided configuration\n * @param {Element} element\n * @param {AnimationConfig | ((opts: { direction: 'in' | 'out' }) => AnimationConfig)} options\n * @param {Animation | undefined} counterpart The corresponding intro/outro to this outro/intro\n * @param {number} t2 The target `t` value — `1` for intro, `0` for outro\n * @param {(() => void)} on_finish Called after successfully completing the animation\n * @returns {Animation}\n */\nfunction animate(element, options, counterpart, t2, on_finish) {\n\tvar is_intro = t2 === 1;\n\n\tif (is_function(options)) {\n\t\t// In the case of a deferred transition (such as `crossfade`), `option` will be\n\t\t// a function rather than an `AnimationConfig`. We need to call this function\n\t\t// once the DOM has been updated...\n\t\t/** @type {Animation} */\n\t\tvar a;\n\t\tvar aborted = false;\n\n\t\tqueue_micro_task(() => {\n\t\t\tif (aborted) return;\n\t\t\tvar o = options({ direction: is_intro ? 'in' : 'out' });\n\t\t\ta = animate(element, o, counterpart, t2, on_finish);\n\t\t});\n\n\t\t// ...but we want to do so without using `async`/`await` everywhere, so\n\t\t// we return a facade that allows everything to remain synchronous\n\t\treturn {\n\t\t\tabort: () => {\n\t\t\t\taborted = true;\n\t\t\t\ta?.abort();\n\t\t\t},\n\t\t\tdeactivate: () => a.deactivate(),\n\t\t\treset: () => a.reset(),\n\t\t\tt: () => a.t()\n\t\t};\n\t}\n\n\tcounterpart?.deactivate();\n\n\tif (!options?.duration && !options?.delay) {\n\t\tdispatch_event(element, is_intro ? 'introstart' : 'outrostart');\n\t\ton_finish();\n\n\t\treturn {\n\t\t\tabort: noop,\n\t\t\tdeactivate: noop,\n\t\t\treset: noop,\n\t\t\tt: () => t2\n\t\t};\n\t}\n\n\tconst { delay = 0, css, tick, easing = linear } = options;\n\n\tvar keyframes = [];\n\n\tif (is_intro && counterpart === undefined) {\n\t\tif (tick) {\n\t\t\ttick(0, 1); // TODO put in nested effect, to avoid interleaved reads/writes?\n\t\t}\n\n\t\tif (css) {\n\t\t\tvar styles = css_to_keyframe(css(0, 1));\n\t\t\tkeyframes.push(styles, styles);\n\t\t}\n\t}\n\n\tvar get_t = () => 1 - t2;\n\n\t// create a dummy animation that lasts as long as the delay (but with whatever devtools\n\t// multiplier is in effect). in the common case that it is `0`, we keep it anyway so that\n\t// the CSS keyframes aren't created until the DOM is updated\n\t//\n\t// fill forwards to prevent the element from rendering without styles applied\n\t// see https://github.com/sveltejs/svelte/issues/14732\n\tvar animation = element.animate(keyframes, { duration: delay, fill: 'forwards' });\n\n\tanimation.onfinish = () => {\n\t\t// remove dummy animation from the stack to prevent conflict with main animation\n\t\tanimation.cancel();\n\n\t\tdispatch_event(element, is_intro ? 'introstart' : 'outrostart');\n\n\t\t// for bidirectional transitions, we start from the current position,\n\t\t// rather than doing a full intro/outro\n\t\tvar t1 = counterpart?.t() ?? 1 - t2;\n\t\tcounterpart?.abort();\n\n\t\tvar delta = t2 - t1;\n\t\tvar duration = /** @type {number} */ (options.duration) * Math.abs(delta);\n\t\tvar keyframes = [];\n\n\t\tif (duration > 0) {\n\t\t\t/**\n\t\t\t * Whether or not the CSS includes `overflow: hidden`, in which case we need to\n\t\t\t * add it as an inline style to work around a Safari <18 bug\n\t\t\t * TODO 6.0 remove this, if possible\n\t\t\t */\n\t\t\tvar needs_overflow_hidden = false;\n\n\t\t\tif (css) {\n\t\t\t\tvar n = Math.ceil(duration / (1000 / 60)); // `n` must be an integer, or we risk missing the `t2` value\n\n\t\t\t\tfor (var i = 0; i <= n; i += 1) {\n\t\t\t\t\tvar t = t1 + delta * easing(i / n);\n\t\t\t\t\tvar styles = css_to_keyframe(css(t, 1 - t));\n\t\t\t\t\tkeyframes.push(styles);\n\n\t\t\t\t\tneeds_overflow_hidden ||= styles.overflow === 'hidden';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (needs_overflow_hidden) {\n\t\t\t\t/** @type {HTMLElement} */ (element).style.overflow = 'hidden';\n\t\t\t}\n\n\t\t\tget_t = () => {\n\t\t\t\tvar time = /** @type {number} */ (\n\t\t\t\t\t/** @type {globalThis.Animation} */ (animation).currentTime\n\t\t\t\t);\n\n\t\t\t\treturn t1 + delta * easing(time / duration);\n\t\t\t};\n\n\t\t\tif (tick) {\n\t\t\t\tloop(() => {\n\t\t\t\t\tif (animation.playState !== 'running') return false;\n\n\t\t\t\t\tvar t = get_t();\n\t\t\t\t\ttick(t, 1 - t);\n\n\t\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tanimation = element.animate(keyframes, { duration, fill: 'forwards' });\n\n\t\tanimation.onfinish = () => {\n\t\t\tget_t = () => t2;\n\t\t\ttick?.(t2, 1 - t2);\n\t\t\ton_finish();\n\t\t};\n\t};\n\n\treturn {\n\t\tabort: () => {\n\t\t\tif (animation) {\n\t\t\t\tanimation.cancel();\n\t\t\t\t// This prevents memory leaks in Chromium\n\t\t\t\tanimation.effect = null;\n\t\t\t\t// This prevents onfinish to be launched after cancel(),\n\t\t\t\t// which can happen in some rare cases\n\t\t\t\t// see https://github.com/sveltejs/svelte/issues/13681\n\t\t\t\tanimation.onfinish = noop;\n\t\t\t}\n\t\t},\n\t\tdeactivate: () => {\n\t\t\ton_finish = noop;\n\t\t},\n\t\treset: () => {\n\t\t\tif (t2 === 0) {\n\t\t\t\ttick?.(1, 0);\n\t\t\t}\n\t\t},\n\t\tt: () => get_t()\n\t};\n}\n", "/** @import { Effect, EffectNodes, TemplateNode } from '#client' */\nimport { FILENAME, NAMESPACE_SVG } from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport { create_element, create_text, get_first_child } from '../operations.js';\nimport { block, teardown } from '../../reactivity/effects.js';\nimport { set_should_intro } from '../../render.js';\nimport { active_effect } from '../../runtime.js';\nimport { component_context, dev_stack } from '../../context.js';\nimport { DEV } from 'esm-env';\nimport { EFFECT_TRANSPARENT, ELEMENT_NODE } from '#client/constants';\nimport { assign_nodes } from '../template.js';\nimport { is_raw_text_element } from '../../../../utils.js';\nimport { BranchManager } from './branches.js';\nimport { set_animation_effect_override } from '../elements/transitions.js';\n\n/**\n * @param {Comment | Element} node\n * @param {() => string} get_tag\n * @param {boolean} is_svg\n * @param {undefined | ((element: Element, anchor: Node | null) => void)} render_fn,\n * @param {undefined | (() => string)} get_namespace\n * @param {undefined | [number, number]} location\n * @returns {void}\n */\nexport function element(node, get_tag, is_svg, render_fn, get_namespace, location) {\n\tlet was_hydrating = hydrating;\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar filename = DEV && location && component_context?.function[FILENAME];\n\n\t/** @type {null | Element} */\n\tvar element = null;\n\n\tif (hydrating && hydrate_node.nodeType === ELEMENT_NODE) {\n\t\telement = /** @type {Element} */ (hydrate_node);\n\t\thydrate_next();\n\t}\n\n\tvar anchor = /** @type {TemplateNode} */ (hydrating ? hydrate_node : node);\n\n\t/**\n\t * We track this so we can set it when changing the element, allowing any\n\t * `animate:` directive to bind itself to the correct block\n\t */\n\tvar parent_effect = /** @type {Effect} */ (active_effect);\n\n\tvar branches = new BranchManager(anchor, false);\n\n\tblock(() => {\n\t\tconst next_tag = get_tag() || null;\n\t\tvar ns = get_namespace\n\t\t\t? get_namespace()\n\t\t\t: is_svg || next_tag === 'svg'\n\t\t\t\t? NAMESPACE_SVG\n\t\t\t\t: undefined;\n\n\t\tif (next_tag === null) {\n\t\t\tbranches.ensure(null, null);\n\t\t\tset_should_intro(true);\n\t\t\treturn;\n\t\t}\n\n\t\tbranches.ensure(next_tag, (anchor) => {\n\t\t\tif (next_tag) {\n\t\t\t\telement = hydrating ? /** @type {Element} */ (element) : create_element(next_tag, ns);\n\n\t\t\t\tif (DEV && location) {\n\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\telement.__svelte_meta = {\n\t\t\t\t\t\tparent: dev_stack,\n\t\t\t\t\t\tloc: {\n\t\t\t\t\t\t\tfile: filename,\n\t\t\t\t\t\t\tline: location[0],\n\t\t\t\t\t\t\tcolumn: location[1]\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tassign_nodes(element, element);\n\n\t\t\t\tif (render_fn) {\n\t\t\t\t\tif (hydrating && is_raw_text_element(next_tag)) {\n\t\t\t\t\t\t// prevent hydration glitches\n\t\t\t\t\t\telement.append(document.createComment(''));\n\t\t\t\t\t}\n\n\t\t\t\t\t// If hydrating, use the existing ssr comment as the anchor so that the\n\t\t\t\t\t// inner open and close methods can pick up the existing nodes correctly\n\t\t\t\t\tvar child_anchor = hydrating\n\t\t\t\t\t\t? get_first_child(element)\n\t\t\t\t\t\t: element.appendChild(create_text());\n\n\t\t\t\t\tif (hydrating) {\n\t\t\t\t\t\tif (child_anchor === null) {\n\t\t\t\t\t\t\tset_hydrating(false);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tset_hydrate_node(child_anchor);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tset_animation_effect_override(parent_effect);\n\n\t\t\t\t\t// `child_anchor` is undefined if this is a void element, but we still\n\t\t\t\t\t// need to call `render_fn` in order to run actions etc. If the element\n\t\t\t\t\t// contains children, it's a user error (which is warned on elsewhere)\n\t\t\t\t\t// and the DOM will be silently discarded\n\t\t\t\t\trender_fn(element, child_anchor);\n\n\t\t\t\t\tset_animation_effect_override(null);\n\t\t\t\t}\n\n\t\t\t\t// we do this after calling `render_fn` so that child effects don't override `nodes.end`\n\t\t\t\t/** @type {Effect & { nodes: EffectNodes }} */ (active_effect).nodes.end = element;\n\n\t\t\t\tanchor.before(element);\n\t\t\t}\n\n\t\t\tif (hydrating) {\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t}\n\t\t});\n\n\t\t// revert to the default state after the effect has been created\n\t\tset_should_intro(true);\n\n\t\treturn () => {\n\t\t\tif (next_tag) {\n\t\t\t\t// if we're in this callback because we're re-running the effect,\n\t\t\t\t// disable intros (unless no element is currently displayed)\n\t\t\t\tset_should_intro(false);\n\t\t\t}\n\t\t};\n\t}, EFFECT_TRANSPARENT);\n\n\tteardown(() => {\n\t\tset_should_intro(true);\n\t});\n\n\tif (was_hydrating) {\n\t\tset_hydrating(true);\n\t\tset_hydrate_node(anchor);\n\t}\n}\n", "/** @import { TemplateNode } from '#client' */\nimport { hydrate_node, hydrating, set_hydrate_node, set_hydrating } from '../hydration.js';\nimport { create_text, get_first_child, get_next_sibling } from '../operations.js';\nimport { block } from '../../reactivity/effects.js';\nimport { COMMENT_NODE, HEAD_EFFECT } from '#client/constants';\n\n/**\n * @param {string} hash\n * @param {(anchor: Node) => void} render_fn\n * @returns {void}\n */\nexport function head(hash, render_fn) {\n\t// The head function may be called after the first hydration pass and ssr comment nodes may still be present,\n\t// therefore we need to skip that when we detect that we're not in hydration mode.\n\tlet previous_hydrate_node = null;\n\tlet was_hydrating = hydrating;\n\n\t/** @type {Comment | Text} */\n\tvar anchor;\n\n\tif (hydrating) {\n\t\tprevious_hydrate_node = hydrate_node;\n\n\t\tvar head_anchor = get_first_child(document.head);\n\n\t\t// There might be multiple head blocks in our app, and they could have been\n\t\t// rendered in an arbitrary order — find one corresponding to this component\n\t\twhile (\n\t\t\thead_anchor !== null &&\n\t\t\t(head_anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ (head_anchor).data !== hash)\n\t\t) {\n\t\t\thead_anchor = get_next_sibling(head_anchor);\n\t\t}\n\n\t\t// If we can't find an opening hydration marker, skip hydration (this can happen\n\t\t// if a framework rendered body but not head content)\n\t\tif (head_anchor === null) {\n\t\t\tset_hydrating(false);\n\t\t} else {\n\t\t\tvar start = /** @type {TemplateNode} */ (get_next_sibling(head_anchor));\n\t\t\thead_anchor.remove(); // in case this component is repeated\n\n\t\t\tset_hydrate_node(start);\n\t\t}\n\t}\n\n\tif (!hydrating) {\n\t\tanchor = document.head.appendChild(create_text());\n\t}\n\n\ttry {\n\t\tblock(() => render_fn(anchor), HEAD_EFFECT);\n\t} finally {\n\t\tif (was_hydrating) {\n\t\t\tset_hydrating(true);\n\t\t\tset_hydrate_node(/** @type {TemplateNode} */ (previous_hydrate_node));\n\t\t}\n\t}\n}\n", "import { DEV } from 'esm-env';\nimport { register_style } from '../dev/css.js';\nimport { effect } from '../reactivity/effects.js';\nimport { create_element } from './operations.js';\n\n/**\n * @param {Node} anchor\n * @param {{ hash: string, code: string }} css\n */\nexport function append_styles(anchor, css) {\n\t// Use `queue_micro_task` to ensure `anchor` is in the DOM, otherwise getRootNode() will yield wrong results\n\teffect(() => {\n\t\tvar root = anchor.getRootNode();\n\n\t\tvar target = /** @type {ShadowRoot} */ (root).host\n\t\t\t? /** @type {ShadowRoot} */ (root)\n\t\t\t: /** @type {Document} */ (root).head ?? /** @type {Document} */ (root.ownerDocument).head;\n\n\t\t// Always querying the DOM is roughly the same perf as additionally checking for presence in a map first assuming\n\t\t// that you'll get cache hits half of the time, so we just always query the dom for simplicity and code savings.\n\t\tif (!target.querySelector('#' + css.hash)) {\n\t\t\tconst style = create_element('style');\n\t\t\tstyle.id = css.hash;\n\t\t\tstyle.textContent = css.code;\n\n\t\t\ttarget.appendChild(style);\n\n\t\t\tif (DEV) {\n\t\t\t\tregister_style(css.hash, style);\n\t\t\t}\n\t\t}\n\t});\n}\n", "/** @import { ActionPayload } from '#client' */\nimport { effect, render_effect } from '../../reactivity/effects.js';\nimport { safe_not_equal } from '../../reactivity/equality.js';\nimport { deep_read_state, untrack } from '../../runtime.js';\n\n/**\n * @template P\n * @param {Element} dom\n * @param {(dom: Element, value?: P) => ActionPayload

} action\n * @param {() => P} [get_value]\n * @returns {void}\n */\nexport function action(dom, action, get_value) {\n\teffect(() => {\n\t\tvar payload = untrack(() => action(dom, get_value?.()) || {});\n\n\t\tif (get_value && payload?.update) {\n\t\t\tvar inited = false;\n\t\t\t/** @type {P} */\n\t\t\tvar prev = /** @type {any} */ ({}); // initialize with something so it's never equal on first run\n\n\t\t\trender_effect(() => {\n\t\t\t\tvar value = get_value();\n\n\t\t\t\t// Action's update method is coarse-grained, i.e. when anything in the passed value changes, update.\n\t\t\t\t// This works in legacy mode because of mutable_source being updated as a whole, but when using $state\n\t\t\t\t// together with actions and mutation, it wouldn't notice the change without a deep read.\n\t\t\t\tdeep_read_state(value);\n\n\t\t\t\tif (inited && safe_not_equal(prev, value)) {\n\t\t\t\t\tprev = value;\n\t\t\t\t\t/** @type {Function} */ (payload.update)(value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tinited = true;\n\t\t}\n\n\t\tif (payload?.destroy) {\n\t\t\treturn () => /** @type {Function} */ (payload.destroy)();\n\t\t}\n\t});\n}\n", "/** @import { Effect } from '#client' */\nimport { branch, effect, destroy_effect, managed } from '../../reactivity/effects.js';\n\n// TODO in 6.0 or 7.0, when we remove legacy mode, we can simplify this by\n// getting rid of the block/branch stuff and just letting the effect rip.\n// see https://github.com/sveltejs/svelte/pull/15962\n\n/**\n * @param {Element} node\n * @param {() => (node: Element) => void} get_fn\n */\nexport function attach(node, get_fn) {\n\t/** @type {false | undefined | ((node: Element) => void)} */\n\tvar fn = undefined;\n\n\t/** @type {Effect | null} */\n\tvar e;\n\n\tmanaged(() => {\n\t\tif (fn !== (fn = get_fn())) {\n\t\t\tif (e) {\n\t\t\t\tdestroy_effect(e);\n\t\t\t\te = null;\n\t\t\t}\n\n\t\t\tif (fn) {\n\t\t\t\te = branch(() => {\n\t\t\t\t\teffect(() => /** @type {(node: Element) => void} */ (fn)(node));\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n", "const ATTR_REGEX = /[&\"<]/g;\nconst CONTENT_REGEX = /[&<]/g;\n\n/**\n * @template V\n * @param {V} value\n * @param {boolean} [is_attr]\n */\nexport function escape_html(value, is_attr) {\n\tconst str = String(value ?? '');\n\n\tconst pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n\tpattern.lastIndex = 0;\n\n\tlet escaped = '';\n\tlet last = 0;\n\n\twhile (pattern.test(str)) {\n\t\tconst i = pattern.lastIndex - 1;\n\t\tconst ch = str[i];\n\t\tescaped += str.substring(last, i) + (ch === '&' ? '&' : ch === '\"' ? '"' : '<');\n\t\tlast = i + 1;\n\t}\n\n\treturn escaped + str.substring(last);\n}\n", "import { escape_html } from '../../escaping.js';\nimport { clsx as _clsx } from 'clsx';\n\n/**\n * `

` should be rendered as `
` and _not_\n * `
`, which is equivalent to `
`. There\n * may be other odd cases that need to be added to this list in future\n * @type {Record>}\n */\nconst replacements = {\n\ttranslate: new Map([\n\t\t[true, 'yes'],\n\t\t[false, 'no']\n\t])\n};\n\n/**\n * @template V\n * @param {string} name\n * @param {V} value\n * @param {boolean} [is_boolean]\n * @returns {string}\n */\nexport function attr(name, value, is_boolean = false) {\n\t// attribute hidden for values other than \"until-found\" behaves like a boolean attribute\n\tif (name === 'hidden' && value !== 'until-found') {\n\t\tis_boolean = true;\n\t}\n\tif (value == null || (!value && is_boolean)) return '';\n\tconst normalized = (name in replacements && replacements[name].get(value)) || value;\n\tconst assignment = is_boolean ? `=\"\"` : `=\"${escape_html(normalized, true)}\"`;\n\treturn ` ${name}${assignment}`;\n}\n\n/**\n * Small wrapper around clsx to preserve Svelte's (weird) handling of falsy values.\n * TODO Svelte 6 revisit this, and likely turn all falsy values into the empty string (what clsx also does)\n * @param {any} value\n */\nexport function clsx(value) {\n\tif (typeof value === 'object') {\n\t\treturn _clsx(value);\n\t} else {\n\t\treturn value ?? '';\n\t}\n}\n\nconst whitespace = [...' \\t\\n\\r\\f\\u00a0\\u000b\\ufeff'];\n\n/**\n * @param {any} value\n * @param {string | null} [hash]\n * @param {Record} [directives]\n * @returns {string | null}\n */\nexport function to_class(value, hash, directives) {\n\tvar classname = value == null ? '' : '' + value;\n\n\tif (hash) {\n\t\tclassname = classname ? classname + ' ' + hash : hash;\n\t}\n\n\tif (directives) {\n\t\tfor (var key in directives) {\n\t\t\tif (directives[key]) {\n\t\t\t\tclassname = classname ? classname + ' ' + key : key;\n\t\t\t} else if (classname.length) {\n\t\t\t\tvar len = key.length;\n\t\t\t\tvar a = 0;\n\n\t\t\t\twhile ((a = classname.indexOf(key, a)) >= 0) {\n\t\t\t\t\tvar b = a + len;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(a === 0 || whitespace.includes(classname[a - 1])) &&\n\t\t\t\t\t\t(b === classname.length || whitespace.includes(classname[b]))\n\t\t\t\t\t) {\n\t\t\t\t\t\tclassname = (a === 0 ? '' : classname.substring(0, a)) + classname.substring(b + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ta = b;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn classname === '' ? null : classname;\n}\n\n/**\n *\n * @param {Record} styles\n * @param {boolean} important\n */\nfunction append_styles(styles, important = false) {\n\tvar separator = important ? ' !important;' : ';';\n\tvar css = '';\n\n\tfor (var key in styles) {\n\t\tvar value = styles[key];\n\t\tif (value != null && value !== '') {\n\t\t\tcss += ' ' + key + ': ' + value + separator;\n\t\t}\n\t}\n\n\treturn css;\n}\n\n/**\n * @param {string} name\n * @returns {string}\n */\nfunction to_css_name(name) {\n\tif (name[0] !== '-' || name[1] !== '-') {\n\t\treturn name.toLowerCase();\n\t}\n\treturn name;\n}\n\n/**\n * @param {any} value\n * @param {Record | [Record, Record]} [styles]\n * @returns {string | null}\n */\nexport function to_style(value, styles) {\n\tif (styles) {\n\t\tvar new_style = '';\n\n\t\t/** @type {Record | undefined} */\n\t\tvar normal_styles;\n\n\t\t/** @type {Record | undefined} */\n\t\tvar important_styles;\n\n\t\tif (Array.isArray(styles)) {\n\t\t\tnormal_styles = styles[0];\n\t\t\timportant_styles = styles[1];\n\t\t} else {\n\t\t\tnormal_styles = styles;\n\t\t}\n\n\t\tif (value) {\n\t\t\tvalue = String(value)\n\t\t\t\t.replaceAll(/\\s*\\/\\*.*?\\*\\/\\s*/g, '')\n\t\t\t\t.trim();\n\n\t\t\t/** @type {boolean | '\"' | \"'\"} */\n\t\t\tvar in_str = false;\n\t\t\tvar in_apo = 0;\n\t\t\tvar in_comment = false;\n\n\t\t\tvar reserved_names = [];\n\n\t\t\tif (normal_styles) {\n\t\t\t\treserved_names.push(...Object.keys(normal_styles).map(to_css_name));\n\t\t\t}\n\t\t\tif (important_styles) {\n\t\t\t\treserved_names.push(...Object.keys(important_styles).map(to_css_name));\n\t\t\t}\n\n\t\t\tvar start_index = 0;\n\t\t\tvar name_index = -1;\n\n\t\t\tconst len = value.length;\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tvar c = value[i];\n\n\t\t\t\tif (in_comment) {\n\t\t\t\t\tif (c === '/' && value[i - 1] === '*') {\n\t\t\t\t\t\tin_comment = false;\n\t\t\t\t\t}\n\t\t\t\t} else if (in_str) {\n\t\t\t\t\tif (in_str === c) {\n\t\t\t\t\t\tin_str = false;\n\t\t\t\t\t}\n\t\t\t\t} else if (c === '/' && value[i + 1] === '*') {\n\t\t\t\t\tin_comment = true;\n\t\t\t\t} else if (c === '\"' || c === \"'\") {\n\t\t\t\t\tin_str = c;\n\t\t\t\t} else if (c === '(') {\n\t\t\t\t\tin_apo++;\n\t\t\t\t} else if (c === ')') {\n\t\t\t\t\tin_apo--;\n\t\t\t\t}\n\n\t\t\t\tif (!in_comment && in_str === false && in_apo === 0) {\n\t\t\t\t\tif (c === ':' && name_index === -1) {\n\t\t\t\t\t\tname_index = i;\n\t\t\t\t\t} else if (c === ';' || i === len - 1) {\n\t\t\t\t\t\tif (name_index !== -1) {\n\t\t\t\t\t\t\tvar name = to_css_name(value.substring(start_index, name_index).trim());\n\n\t\t\t\t\t\t\tif (!reserved_names.includes(name)) {\n\t\t\t\t\t\t\t\tif (c !== ';') {\n\t\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tvar property = value.substring(start_index, i).trim();\n\t\t\t\t\t\t\t\tnew_style += ' ' + property + ';';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart_index = i + 1;\n\t\t\t\t\t\tname_index = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (normal_styles) {\n\t\t\tnew_style += append_styles(normal_styles);\n\t\t}\n\n\t\tif (important_styles) {\n\t\t\tnew_style += append_styles(important_styles, true);\n\t\t}\n\n\t\tnew_style = new_style.trim();\n\t\treturn new_style === '' ? null : new_style;\n\t}\n\n\treturn value == null ? null : String(value);\n}\n", "import { to_class } from '../../../shared/attributes.js';\nimport { hydrating } from '../hydration.js';\n\n/**\n * @param {Element} dom\n * @param {boolean | number} is_html\n * @param {string | null} value\n * @param {string} [hash]\n * @param {Record} [prev_classes]\n * @param {Record} [next_classes]\n * @returns {Record | undefined}\n */\nexport function set_class(dom, is_html, value, hash, prev_classes, next_classes) {\n\t// @ts-expect-error need to add __className to patched prototype\n\tvar prev = dom.__className;\n\n\tif (\n\t\thydrating ||\n\t\tprev !== value ||\n\t\tprev === undefined // for edge case of `class={undefined}`\n\t) {\n\t\tvar next_class_name = to_class(value, hash, next_classes);\n\n\t\tif (!hydrating || next_class_name !== dom.getAttribute('class')) {\n\t\t\t// Removing the attribute when the value is only an empty string causes\n\t\t\t// performance issues vs simply making the className an empty string. So\n\t\t\t// we should only remove the class if the value is nullish\n\t\t\t// and there no hash/directives :\n\t\t\tif (next_class_name == null) {\n\t\t\t\tdom.removeAttribute('class');\n\t\t\t} else if (is_html) {\n\t\t\t\tdom.className = next_class_name;\n\t\t\t} else {\n\t\t\t\tdom.setAttribute('class', next_class_name);\n\t\t\t}\n\t\t}\n\n\t\t// @ts-expect-error need to add __className to patched prototype\n\t\tdom.__className = value;\n\t} else if (next_classes && prev_classes !== next_classes) {\n\t\tfor (var key in next_classes) {\n\t\t\tvar is_present = !!next_classes[key];\n\n\t\t\tif (prev_classes == null || is_present !== !!prev_classes[key]) {\n\t\t\t\tdom.classList.toggle(key, is_present);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn next_classes;\n}\n", "import { to_style } from '../../../shared/attributes.js';\nimport { hydrating } from '../hydration.js';\n\n/**\n * @param {Element & ElementCSSInlineStyle} dom\n * @param {Record} prev\n * @param {Record} next\n * @param {string} [priority]\n */\nfunction update_styles(dom, prev = {}, next, priority) {\n\tfor (var key in next) {\n\t\tvar value = next[key];\n\n\t\tif (prev[key] !== value) {\n\t\t\tif (next[key] == null) {\n\t\t\t\tdom.style.removeProperty(key);\n\t\t\t} else {\n\t\t\t\tdom.style.setProperty(key, value, priority);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} dom\n * @param {string | null} value\n * @param {Record | [Record, Record]} [prev_styles]\n * @param {Record | [Record, Record]} [next_styles]\n */\nexport function set_style(dom, value, prev_styles, next_styles) {\n\t// @ts-expect-error\n\tvar prev = dom.__style;\n\n\tif (hydrating || prev !== value) {\n\t\tvar next_style_attr = to_style(value, next_styles);\n\n\t\tif (!hydrating || next_style_attr !== dom.getAttribute('style')) {\n\t\t\tif (next_style_attr == null) {\n\t\t\t\tdom.removeAttribute('style');\n\t\t\t} else {\n\t\t\t\tdom.style.cssText = next_style_attr;\n\t\t\t}\n\t\t}\n\n\t\t// @ts-expect-error\n\t\tdom.__style = value;\n\t} else if (next_styles) {\n\t\tif (Array.isArray(next_styles)) {\n\t\t\tupdate_styles(dom, prev_styles?.[0], next_styles[0]);\n\t\t\tupdate_styles(dom, prev_styles?.[1], next_styles[1], 'important');\n\t\t} else {\n\t\t\tupdate_styles(dom, prev_styles, next_styles);\n\t\t}\n\t}\n\n\treturn next_styles;\n}\n", "import { effect, teardown } from '../../../reactivity/effects.js';\nimport { listen_to_event_and_reset_event } from './shared.js';\nimport { is } from '../../../proxy.js';\nimport { is_array } from '../../../../shared/utils.js';\nimport * as w from '../../../warnings.js';\nimport { Batch, current_batch, previous_batch } from '../../../reactivity/batch.js';\n\n/**\n * Selects the correct option(s) (depending on whether this is a multiple select)\n * @template V\n * @param {HTMLSelectElement} select\n * @param {V} value\n * @param {boolean} mounting\n */\nexport function select_option(select, value, mounting = false) {\n\tif (select.multiple) {\n\t\t// If value is null or undefined, keep the selection as is\n\t\tif (value == undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If not an array, warn and keep the selection as is\n\t\tif (!is_array(value)) {\n\t\t\treturn w.select_multiple_invalid_value();\n\t\t}\n\n\t\t// Otherwise, update the selection\n\t\tfor (var option of select.options) {\n\t\t\toption.selected = value.includes(get_option_value(option));\n\t\t}\n\n\t\treturn;\n\t}\n\n\tfor (option of select.options) {\n\t\tvar option_value = get_option_value(option);\n\t\tif (is(option_value, value)) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (!mounting || value !== undefined) {\n\t\tselect.selectedIndex = -1; // no option should be selected\n\t}\n}\n\n/**\n * Selects the correct option(s) if `value` is given,\n * and then sets up a mutation observer to sync the\n * current selection to the dom when it changes. Such\n * changes could for example occur when options are\n * inside an `#each` block.\n * @param {HTMLSelectElement} select\n */\nexport function init_select(select) {\n\tvar observer = new MutationObserver(() => {\n\t\t// @ts-ignore\n\t\tselect_option(select, select.__value);\n\t\t// Deliberately don't update the potential binding value,\n\t\t// the model should be preserved unless explicitly changed\n\t});\n\n\tobserver.observe(select, {\n\t\t// Listen to option element changes\n\t\tchildList: true,\n\t\tsubtree: true, // because of \n\t\t// Listen to option element value attribute changes\n\t\t// (doesn't get notified of select value changes,\n\t\t// because that property is not reflected as an attribute)\n\t\tattributes: true,\n\t\tattributeFilter: ['value']\n\t});\n\n\tteardown(() => {\n\t\tobserver.disconnect();\n\t});\n}\n\n/**\n * @param {HTMLSelectElement} select\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_select_value(select, get, set = get) {\n\tvar batches = new WeakSet();\n\tvar mounting = true;\n\n\tlisten_to_event_and_reset_event(select, 'change', (is_reset) => {\n\t\tvar query = is_reset ? '[selected]' : ':checked';\n\t\t/** @type {unknown} */\n\t\tvar value;\n\n\t\tif (select.multiple) {\n\t\t\tvalue = [].map.call(select.querySelectorAll(query), get_option_value);\n\t\t} else {\n\t\t\t/** @type {HTMLOptionElement | null} */\n\t\t\tvar selected_option =\n\t\t\t\tselect.querySelector(query) ??\n\t\t\t\t// will fall back to first non-disabled option if no option is selected\n\t\t\t\tselect.querySelector('option:not([disabled])');\n\t\t\tvalue = selected_option && get_option_value(selected_option);\n\t\t}\n\n\t\tset(value);\n\n\t\tif (current_batch !== null) {\n\t\t\tbatches.add(current_batch);\n\t\t}\n\t});\n\n\t// Needs to be an effect, not a render_effect, so that in case of each loops the logic runs after the each block has updated\n\teffect(() => {\n\t\tvar value = get();\n\n\t\tif (select === document.activeElement) {\n\t\t\t// we need both, because in non-async mode, render effects run before previous_batch is set\n\t\t\tvar batch = /** @type {Batch} */ (previous_batch ?? current_batch);\n\n\t\t\t// Don't update the ...\n\t\t\t//

{await find(selected)}

\n\t\t\tif (batches.has(batch)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tselect_option(select, value, mounting);\n\n\t\t// Mounting and value undefined -> take selection from dom\n\t\tif (mounting && value === undefined) {\n\t\t\t/** @type {HTMLOptionElement | null} */\n\t\t\tvar selected_option = select.querySelector(':checked');\n\t\t\tif (selected_option !== null) {\n\t\t\t\tvalue = get_option_value(selected_option);\n\t\t\t\tset(value);\n\t\t\t}\n\t\t}\n\n\t\t// @ts-ignore\n\t\tselect.__value = value;\n\t\tmounting = false;\n\t});\n\n\tinit_select(select);\n}\n\n/** @param {HTMLOptionElement} option */\nfunction get_option_value(option) {\n\t// __value only exists if the