vod jam and earl vod.atverkackt.de
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

Vod Jam

+731 -12254
.DS_Store

This is a binary file and will not be displayed.

+1
.gitignore
··· 5 5 *.log 6 6 .env 7 7 .env.* 8 + infra
+1 -1
README.md
··· 30 30 │ ├── WavyCircle.svelte # Circular wavy border for avatars 31 31 │ ├── MeshBackground.svelte # Layered SVG radial gradient background 32 32 │ ├── PlantOverlay.svelte # Fern leaves photo overlay with multiply blend 33 - │ ├── FrogHeader.svelte # "vod frog" header with frog illustration 33 + │ ├── ToejamHeader.svelte # Header with ToeJam & Earl illustration 34 34 │ ├── VideoCard.svelte # Video thumbnail card with scrub preview and hopping frog 35 35 │ └── VideoPlayer.svelte # Custom HLS video player with frog scrub bar and frogeye fullscreen 36 36 ├── routes/
assets.afphoto

This is a binary file and will not be displayed.

assets.afphoto~lock~

This is a binary file and will not be displayed.

+52 -37
node_modules/.vite/deps/_metadata.json
··· 1 1 { 2 - "hash": "274145be", 3 - "configHash": "a336df23", 4 - "lockfileHash": "13023bce", 5 - "browserHash": "e3dee6ad", 2 + "hash": "1aa6229a", 3 + "configHash": "f56acb05", 4 + "lockfileHash": "dc48a93c", 5 + "browserHash": "2616c105", 6 6 "optimized": { 7 7 "svelte": { 8 8 "src": "../../svelte/src/index-client.js", 9 9 "file": "svelte.js", 10 - "fileHash": "288db1c7", 10 + "fileHash": "6a933653", 11 11 "needsInterop": false 12 12 }, 13 13 "svelte/animate": { 14 14 "src": "../../svelte/src/animate/index.js", 15 15 "file": "svelte_animate.js", 16 - "fileHash": "4d407b51", 16 + "fileHash": "ccfd5d15", 17 17 "needsInterop": false 18 18 }, 19 19 "svelte/attachments": { 20 20 "src": "../../svelte/src/attachments/index.js", 21 21 "file": "svelte_attachments.js", 22 - "fileHash": "c0cf7ce6", 22 + "fileHash": "f0dcb32b", 23 23 "needsInterop": false 24 24 }, 25 25 "svelte/easing": { 26 26 "src": "../../svelte/src/easing/index.js", 27 27 "file": "svelte_easing.js", 28 - "fileHash": "edb12651", 28 + "fileHash": "45566bc2", 29 29 "needsInterop": false 30 30 }, 31 31 "svelte/internal": { 32 32 "src": "../../svelte/src/internal/index.js", 33 33 "file": "svelte_internal.js", 34 - "fileHash": "f05abf3b", 34 + "fileHash": "15e27e1e", 35 35 "needsInterop": true 36 36 }, 37 37 "svelte/internal/client": { 38 38 "src": "../../svelte/src/internal/client/index.js", 39 39 "file": "svelte_internal_client.js", 40 - "fileHash": "25b8e735", 40 + "fileHash": "b7c7526a", 41 41 "needsInterop": false 42 42 }, 43 43 "svelte/internal/disclose-version": { 44 44 "src": "../../svelte/src/internal/disclose-version.js", 45 45 "file": "svelte_internal_disclose-version.js", 46 - "fileHash": "16c83a70", 46 + "fileHash": "a00ee7f2", 47 47 "needsInterop": false 48 48 }, 49 49 "svelte/internal/flags/async": { 50 50 "src": "../../svelte/src/internal/flags/async.js", 51 51 "file": "svelte_internal_flags_async.js", 52 - "fileHash": "7804f2f8", 52 + "fileHash": "c55195e7", 53 53 "needsInterop": false 54 54 }, 55 55 "svelte/internal/flags/legacy": { 56 56 "src": "../../svelte/src/internal/flags/legacy.js", 57 57 "file": "svelte_internal_flags_legacy.js", 58 - "fileHash": "652b6c9f", 58 + "fileHash": "77d7b204", 59 59 "needsInterop": false 60 60 }, 61 61 "svelte/internal/flags/tracing": { 62 62 "src": "../../svelte/src/internal/flags/tracing.js", 63 63 "file": "svelte_internal_flags_tracing.js", 64 - "fileHash": "5665e030", 64 + "fileHash": "b89e38aa", 65 65 "needsInterop": false 66 66 }, 67 67 "svelte/legacy": { 68 68 "src": "../../svelte/src/legacy/legacy-client.js", 69 69 "file": "svelte_legacy.js", 70 - "fileHash": "1f9161f0", 70 + "fileHash": "e211001f", 71 71 "needsInterop": false 72 72 }, 73 73 "svelte/motion": { 74 74 "src": "../../svelte/src/motion/index.js", 75 75 "file": "svelte_motion.js", 76 - "fileHash": "b5136925", 76 + "fileHash": "323c2110", 77 77 "needsInterop": false 78 78 }, 79 79 "svelte/reactivity": { 80 80 "src": "../../svelte/src/reactivity/index-client.js", 81 81 "file": "svelte_reactivity.js", 82 - "fileHash": "3f5d6f35", 82 + "fileHash": "1b86dd41", 83 83 "needsInterop": false 84 84 }, 85 85 "svelte/reactivity/window": { 86 86 "src": "../../svelte/src/reactivity/window/index.js", 87 87 "file": "svelte_reactivity_window.js", 88 - "fileHash": "17e23c6a", 88 + "fileHash": "4a9e07dd", 89 89 "needsInterop": false 90 90 }, 91 91 "svelte/store": { 92 92 "src": "../../svelte/src/store/index-client.js", 93 93 "file": "svelte_store.js", 94 - "fileHash": "9657dc21", 94 + "fileHash": "33cf0d36", 95 95 "needsInterop": false 96 96 }, 97 97 "svelte/transition": { 98 98 "src": "../../svelte/src/transition/index.js", 99 99 "file": "svelte_transition.js", 100 - "fileHash": "ddda261b", 100 + "fileHash": "66225560", 101 101 "needsInterop": false 102 102 }, 103 103 "svelte/events": { 104 104 "src": "../../svelte/src/events/index.js", 105 105 "file": "svelte_events.js", 106 - "fileHash": "d4e49ce1", 106 + "fileHash": "b03e8dd4", 107 107 "needsInterop": false 108 108 }, 109 109 "svelte > clsx": { 110 110 "src": "../../clsx/dist/clsx.mjs", 111 111 "file": "svelte___clsx.js", 112 - "fileHash": "7326fffa", 112 + "fileHash": "0441f849", 113 + "needsInterop": false 114 + }, 115 + "devalue": { 116 + "src": "../../devalue/index.js", 117 + "file": "devalue.js", 118 + "fileHash": "35d9ba52", 119 + "needsInterop": false 120 + }, 121 + "esm-env": { 122 + "src": "../../esm-env/index.js", 123 + "file": "esm-env.js", 124 + "fileHash": "4dbc3285", 113 125 "needsInterop": false 114 126 }, 115 127 "hls.js": { 116 128 "src": "../../hls.js/dist/hls.mjs", 117 129 "file": "hls__js.js", 118 - "fileHash": "aa803dd3", 130 + "fileHash": "09d3b381", 119 131 "needsInterop": false 120 132 } 121 133 }, 122 134 "chunks": { 123 - "chunk-FQXKS6MM": { 124 - "file": "chunk-FQXKS6MM.js" 135 + "chunk-K5DCWF3A": { 136 + "file": "chunk-K5DCWF3A.js" 125 137 }, 126 - "chunk-2ZGNHB6A": { 127 - "file": "chunk-2ZGNHB6A.js" 138 + "chunk-SSJEA4FD": { 139 + "file": "chunk-SSJEA4FD.js" 128 140 }, 129 141 "chunk-7RQDXF5S": { 130 142 "file": "chunk-7RQDXF5S.js" ··· 132 144 "chunk-YERFD2CZ": { 133 145 "file": "chunk-YERFD2CZ.js" 134 146 }, 135 - "chunk-LYAULJVB": { 136 - "file": "chunk-LYAULJVB.js" 147 + "chunk-CUKAGXEG": { 148 + "file": "chunk-CUKAGXEG.js" 137 149 }, 138 150 "chunk-U7P2NEEE": { 139 151 "file": "chunk-U7P2NEEE.js" 140 152 }, 141 - "chunk-YT4LSJJ5": { 142 - "file": "chunk-YT4LSJJ5.js" 153 + "chunk-NGIUFUAZ": { 154 + "file": "chunk-NGIUFUAZ.js" 143 155 }, 144 - "chunk-DSSJOGTL": { 145 - "file": "chunk-DSSJOGTL.js" 156 + "chunk-BZYIP436": { 157 + "file": "chunk-BZYIP436.js" 146 158 }, 147 - "chunk-TY5SIVJK": { 148 - "file": "chunk-TY5SIVJK.js" 159 + "chunk-7EVP6DBN": { 160 + "file": "chunk-7EVP6DBN.js" 161 + }, 162 + "chunk-XGCWAT63": { 163 + "file": "chunk-XGCWAT63.js" 149 164 }, 150 - "chunk-GSVKEBRT": { 151 - "file": "chunk-GSVKEBRT.js" 165 + "chunk-HNWPC2PS": { 166 + "file": "chunk-HNWPC2PS.js" 152 167 }, 153 168 "chunk-OHYQYV5R": { 154 169 "file": "chunk-OHYQYV5R.js"
-27
node_modules/.vite/deps/chunk-2ZGNHB6A.js
··· 1 - import { 2 - createSubscriber 3 - } from "./chunk-TY5SIVJK.js"; 4 - 5 - // node_modules/svelte/src/reactivity/reactive-value.js 6 - var ReactiveValue = class { 7 - #fn; 8 - #subscribe; 9 - /** 10 - * 11 - * @param {() => T} fn 12 - * @param {(update: () => void) => void} onsubscribe 13 - */ 14 - constructor(fn, onsubscribe) { 15 - this.#fn = fn; 16 - this.#subscribe = createSubscriber(onsubscribe); 17 - } 18 - get current() { 19 - this.#subscribe(); 20 - return this.#fn(); 21 - } 22 - }; 23 - 24 - export { 25 - ReactiveValue 26 - }; 27 - //# sourceMappingURL=chunk-2ZGNHB6A.js.map
-7
node_modules/.vite/deps/chunk-2ZGNHB6A.js.map
··· 1 - { 2 - "version": 3, 3 - "sources": ["../../svelte/src/reactivity/reactive-value.js"], 4 - "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"], 5 - "mappings": ";;;;;AAKO,IAAM,gBAAN,MAAoB;AAAA,EAC1B;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,YAAY,IAAI,aAAa;AAC5B,SAAK,MAAM;AACX,SAAK,aAAa,iBAAiB,WAAW;AAAA,EAC/C;AAAA,EAEA,IAAI,UAAU;AACb,SAAK,WAAW;AAChB,WAAO,KAAK,IAAI;AAAA,EACjB;AACD;", 6 - "names": [] 7 - }
-204
node_modules/.vite/deps/chunk-DSSJOGTL.js
··· 1 - import { 2 - FILENAME, 3 - active_effect, 4 - active_reaction, 5 - define_property, 6 - hydrating, 7 - queue_micro_task, 8 - set_active_effect, 9 - set_active_reaction, 10 - teardown, 11 - without_reactive_context 12 - } from "./chunk-TY5SIVJK.js"; 13 - import { 14 - event_handler_invalid 15 - } from "./chunk-GSVKEBRT.js"; 16 - 17 - // node_modules/svelte/src/internal/client/dom/elements/events.js 18 - var event_symbol = /* @__PURE__ */ Symbol("events"); 19 - var all_registered_events = /* @__PURE__ */ new Set(); 20 - var root_event_handles = /* @__PURE__ */ new Set(); 21 - function replay_events(dom) { 22 - if (!hydrating) return; 23 - dom.removeAttribute("onload"); 24 - dom.removeAttribute("onerror"); 25 - const event2 = dom.__e; 26 - if (event2 !== void 0) { 27 - dom.__e = void 0; 28 - queueMicrotask(() => { 29 - if (dom.isConnected) { 30 - dom.dispatchEvent(event2); 31 - } 32 - }); 33 - } 34 - } 35 - function create_event(event_name, dom, handler, options = {}) { 36 - function target_handler(event2) { 37 - if (!options.capture) { 38 - handle_event_propagation.call(dom, event2); 39 - } 40 - if (!event2.cancelBubble) { 41 - return without_reactive_context(() => { 42 - return handler?.call(this, event2); 43 - }); 44 - } 45 - } 46 - if (event_name.startsWith("pointer") || event_name.startsWith("touch") || event_name === "wheel") { 47 - queue_micro_task(() => { 48 - dom.addEventListener(event_name, target_handler, options); 49 - }); 50 - } else { 51 - dom.addEventListener(event_name, target_handler, options); 52 - } 53 - return target_handler; 54 - } 55 - function on(element, type, handler, options = {}) { 56 - var target_handler = create_event(type, element, handler, options); 57 - return () => { 58 - element.removeEventListener(type, target_handler, options); 59 - }; 60 - } 61 - function event(event_name, dom, handler, capture, passive) { 62 - var options = { capture, passive }; 63 - var target_handler = create_event(event_name, dom, handler, options); 64 - if (dom === document.body || // @ts-ignore 65 - dom === window || // @ts-ignore 66 - dom === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed 67 - dom instanceof HTMLMediaElement) { 68 - teardown(() => { 69 - dom.removeEventListener(event_name, target_handler, options); 70 - }); 71 - } 72 - } 73 - function delegated(event_name, element, handler) { 74 - (element[event_symbol] ??= {})[event_name] = handler; 75 - } 76 - function delegate(events) { 77 - for (var i = 0; i < events.length; i++) { 78 - all_registered_events.add(events[i]); 79 - } 80 - for (var fn of root_event_handles) { 81 - fn(events); 82 - } 83 - } 84 - var last_propagated_event = null; 85 - function handle_event_propagation(event2) { 86 - var handler_element = this; 87 - var owner_document = ( 88 - /** @type {Node} */ 89 - handler_element.ownerDocument 90 - ); 91 - var event_name = event2.type; 92 - var path = event2.composedPath?.() || []; 93 - var current_target = ( 94 - /** @type {null | Element} */ 95 - path[0] || event2.target 96 - ); 97 - last_propagated_event = event2; 98 - var path_idx = 0; 99 - var handled_at = last_propagated_event === event2 && event2[event_symbol]; 100 - if (handled_at) { 101 - var at_idx = path.indexOf(handled_at); 102 - if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */ 103 - window)) { 104 - event2[event_symbol] = handler_element; 105 - return; 106 - } 107 - var handler_idx = path.indexOf(handler_element); 108 - if (handler_idx === -1) { 109 - return; 110 - } 111 - if (at_idx <= handler_idx) { 112 - path_idx = at_idx; 113 - } 114 - } 115 - current_target = /** @type {Element} */ 116 - path[path_idx] || event2.target; 117 - if (current_target === handler_element) return; 118 - define_property(event2, "currentTarget", { 119 - configurable: true, 120 - get() { 121 - return current_target || owner_document; 122 - } 123 - }); 124 - var previous_reaction = active_reaction; 125 - var previous_effect = active_effect; 126 - set_active_reaction(null); 127 - set_active_effect(null); 128 - try { 129 - var throw_error; 130 - var other_errors = []; 131 - while (current_target !== null) { 132 - var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */ 133 - current_target.host || null; 134 - try { 135 - var delegated2 = current_target[event_symbol]?.[event_name]; 136 - if (delegated2 != null && (!/** @type {any} */ 137 - current_target.disabled || // DOM could've been updated already by the time this is reached, so we check this as well 138 - // -> the target could not have been disabled because it emits the event in the first place 139 - event2.target === current_target)) { 140 - delegated2.call(current_target, event2); 141 - } 142 - } catch (error) { 143 - if (throw_error) { 144 - other_errors.push(error); 145 - } else { 146 - throw_error = error; 147 - } 148 - } 149 - if (event2.cancelBubble || parent_element === handler_element || parent_element === null) { 150 - break; 151 - } 152 - current_target = parent_element; 153 - } 154 - if (throw_error) { 155 - for (let error of other_errors) { 156 - queueMicrotask(() => { 157 - throw error; 158 - }); 159 - } 160 - throw throw_error; 161 - } 162 - } finally { 163 - event2[event_symbol] = handler_element; 164 - delete event2.currentTarget; 165 - set_active_reaction(previous_reaction); 166 - set_active_effect(previous_effect); 167 - } 168 - } 169 - function apply(thunk, element, args, component, loc, has_side_effects = false, remove_parens = false) { 170 - let handler; 171 - let error; 172 - try { 173 - handler = thunk(); 174 - } catch (e) { 175 - error = e; 176 - } 177 - if (typeof handler !== "function" && (has_side_effects || handler != null || error)) { 178 - const filename = component?.[FILENAME]; 179 - const location = loc ? ` at ${filename}:${loc[0]}:${loc[1]}` : ` in ${filename}`; 180 - const phase = args[0]?.eventPhase < Event.BUBBLING_PHASE ? "capture" : ""; 181 - const event_name = args[0]?.type + phase; 182 - const description = `\`${event_name}\` handler${location}`; 183 - const suggestion = remove_parens ? "remove the trailing `()`" : "add a leading `() =>`"; 184 - event_handler_invalid(description, suggestion); 185 - if (error) { 186 - throw error; 187 - } 188 - } 189 - handler?.apply(element, args); 190 - } 191 - 192 - export { 193 - all_registered_events, 194 - root_event_handles, 195 - replay_events, 196 - create_event, 197 - on, 198 - event, 199 - delegated, 200 - delegate, 201 - handle_event_propagation, 202 - apply 203 - }; 204 - //# sourceMappingURL=chunk-DSSJOGTL.js.map
-7
node_modules/.vite/deps/chunk-DSSJOGTL.js.map
··· 1 - { 2 - "version": 3, 3 - "sources": ["../../svelte/src/internal/client/dom/elements/events.js"], 4 - "sourcesContent": ["import { teardown } from '../../reactivity/effects.js';\nimport { define_property } from '../../../shared/utils.js';\nimport { hydrating } from '../hydration.js';\nimport { queue_micro_task } from '../task.js';\nimport { FILENAME } from '../../../../constants.js';\nimport * as w from '../../warnings.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tset_active_effect,\n\tset_active_reaction\n} from '../../runtime.js';\nimport { without_reactive_context } from './bindings/shared.js';\n\n/**\n * Used on elements, as a map of event type -> event handler,\n * and on events themselves to track which element handled an event\n */\nexport const event_symbol = Symbol('events');\n\n/** @type {Set<string>} */\nexport const all_registered_events = new Set();\n\n/** @type {Set<(events: Array<string>) => void>} */\nexport const root_event_handles = new Set();\n\n/**\n * SSR adds onload and onerror attributes to catch those events before the hydration.\n * This function detects those cases, removes the attributes and replays the events.\n * @param {HTMLElement} dom\n */\nexport function replay_events(dom) {\n\tif (!hydrating) return;\n\n\tdom.removeAttribute('onload');\n\tdom.removeAttribute('onerror');\n\t// @ts-expect-error\n\tconst event = dom.__e;\n\tif (event !== undefined) {\n\t\t// @ts-expect-error\n\t\tdom.__e = undefined;\n\t\tqueueMicrotask(() => {\n\t\t\tif (dom.isConnected) {\n\t\t\t\tdom.dispatchEvent(event);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @param {string} event_name\n * @param {EventTarget} dom\n * @param {EventListener} [handler]\n * @param {AddEventListenerOptions} [options]\n */\nexport function create_event(event_name, dom, handler, options = {}) {\n\t/**\n\t * @this {EventTarget}\n\t */\n\tfunction target_handler(/** @type {Event} */ event) {\n\t\tif (!options.capture) {\n\t\t\t// Only call in the bubble phase, else delegated events would be called before the capturing events\n\t\t\thandle_event_propagation.call(dom, event);\n\t\t}\n\t\tif (!event.cancelBubble) {\n\t\t\treturn without_reactive_context(() => {\n\t\t\t\treturn handler?.call(this, event);\n\t\t\t});\n\t\t}\n\t}\n\n\t// Chrome has a bug where pointer events don't work when attached to a DOM element that has been cloned\n\t// with cloneNode() and the DOM element is disconnected from the document. To ensure the event works, we\n\t// defer the attachment till after it's been appended to the document. TODO: remove this once Chrome fixes\n\t// this bug. The same applies to wheel events and touch events.\n\tif (\n\t\tevent_name.startsWith('pointer') ||\n\t\tevent_name.startsWith('touch') ||\n\t\tevent_name === 'wheel'\n\t) {\n\t\tqueue_micro_task(() => {\n\t\t\tdom.addEventListener(event_name, target_handler, options);\n\t\t});\n\t} else {\n\t\tdom.addEventListener(event_name, target_handler, options);\n\t}\n\n\treturn target_handler;\n}\n\n/**\n * Attaches an event handler to an element and returns a function that removes the handler. Using this\n * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively\n * (with attributes like `onclick`), which use event delegation for performance reasons\n *\n * @param {EventTarget} element\n * @param {string} type\n * @param {EventListener} handler\n * @param {AddEventListenerOptions} [options]\n */\nexport function on(element, type, handler, options = {}) {\n\tvar target_handler = create_event(type, element, handler, options);\n\n\treturn () => {\n\t\telement.removeEventListener(type, target_handler, options);\n\t};\n}\n\n/**\n * @param {string} event_name\n * @param {Element} dom\n * @param {EventListener} [handler]\n * @param {boolean} [capture]\n * @param {boolean} [passive]\n * @returns {void}\n */\nexport function event(event_name, dom, handler, capture, passive) {\n\tvar options = { capture, passive };\n\tvar target_handler = create_event(event_name, dom, handler, options);\n\n\tif (\n\t\tdom === document.body ||\n\t\t// @ts-ignore\n\t\tdom === window ||\n\t\t// @ts-ignore\n\t\tdom === document ||\n\t\t// Firefox has quirky behavior, it can happen that we still get \"canplay\" events when the element is already removed\n\t\tdom instanceof HTMLMediaElement\n\t) {\n\t\tteardown(() => {\n\t\t\tdom.removeEventListener(event_name, target_handler, options);\n\t\t});\n\t}\n}\n\n/**\n * @param {string} event_name\n * @param {Element} element\n * @param {EventListener} [handler]\n * @returns {void}\n */\nexport function delegated(event_name, element, handler) {\n\t// @ts-expect-error\n\t(element[event_symbol] ??= {})[event_name] = handler;\n}\n\n/**\n * @param {Array<string>} events\n * @returns {void}\n */\nexport function delegate(events) {\n\tfor (var i = 0; i < events.length; i++) {\n\t\tall_registered_events.add(events[i]);\n\t}\n\n\tfor (var fn of root_event_handles) {\n\t\tfn(events);\n\t}\n}\n\n// used to store the reference to the currently propagated event\n// to prevent garbage collection between microtasks in Firefox\n// If the event object is GCed too early, the expando __root property\n// set on the event object is lost, causing the event delegation\n// to process the event twice\nlet last_propagated_event = null;\n\n/**\n * @this {EventTarget}\n * @param {Event} event\n * @returns {void}\n */\nexport function handle_event_propagation(event) {\n\tvar handler_element = this;\n\tvar owner_document = /** @type {Node} */ (handler_element).ownerDocument;\n\tvar event_name = event.type;\n\tvar path = event.composedPath?.() || [];\n\tvar current_target = /** @type {null | Element} */ (path[0] || event.target);\n\n\tlast_propagated_event = event;\n\n\t// composedPath contains list of nodes the event has propagated through.\n\t// We check `event_symbol` to skip all nodes below it in case this is a\n\t// parent of the `event_symbol` node, which indicates that there's nested\n\t// mounted apps. In this case we don't want to trigger events multiple times.\n\tvar path_idx = 0;\n\n\t// the `last_propagated_event === event` check is redundant, but\n\t// without it the variable will be DCE'd and things will\n\t// fail mysteriously in Firefox\n\t// @ts-expect-error is added below\n\tvar handled_at = last_propagated_event === event && event[event_symbol];\n\n\tif (handled_at) {\n\t\tvar at_idx = path.indexOf(handled_at);\n\t\tif (\n\t\t\tat_idx !== -1 &&\n\t\t\t(handler_element === document || handler_element === /** @type {any} */ (window))\n\t\t) {\n\t\t\t// This is the fallback document listener or a window listener, but the event was already handled\n\t\t\t// -> ignore, but set handle_at to document/window so that we're resetting the event\n\t\t\t// chain in case someone manually dispatches the same event object again.\n\t\t\t// @ts-expect-error\n\t\t\tevent[event_symbol] = handler_element;\n\t\t\treturn;\n\t\t}\n\n\t\t// We're deliberately not skipping if the index is higher, because\n\t\t// someone could create an event programmatically and emit it multiple times,\n\t\t// in which case we want to handle the whole propagation chain properly each time.\n\t\t// (this will only be a false negative if the event is dispatched multiple times and\n\t\t// the fallback document listener isn't reached in between, but that's super rare)\n\t\tvar handler_idx = path.indexOf(handler_element);\n\t\tif (handler_idx === -1) {\n\t\t\t// handle_idx can theoretically be -1 (happened in some JSDOM testing scenarios with an event listener on the window object)\n\t\t\t// so guard against that, too, and assume that everything was handled at this point.\n\t\t\treturn;\n\t\t}\n\n\t\tif (at_idx <= handler_idx) {\n\t\t\tpath_idx = at_idx;\n\t\t}\n\t}\n\n\tcurrent_target = /** @type {Element} */ (path[path_idx] || event.target);\n\t// there can only be one delegated event per element, and we either already handled the current target,\n\t// or this is the very first target in the chain which has a non-delegated listener, in which case it's safe\n\t// to handle a possible delegated event on it later (through the root delegation listener for example).\n\tif (current_target === handler_element) return;\n\n\t// Proxy currentTarget to correct target\n\tdefine_property(event, 'currentTarget', {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn current_target || owner_document;\n\t\t}\n\t});\n\n\t// This started because of Chromium issue https://chromestatus.com/feature/5128696823545856,\n\t// where removal or moving of of the DOM can cause sync `blur` events to fire, which can cause logic\n\t// to run inside the current `active_reaction`, which isn't what we want at all. However, on reflection,\n\t// it's probably best that all event handled by Svelte have this behaviour, as we don't really want\n\t// an event handler to run in the context of another reaction or effect.\n\tvar previous_reaction = active_reaction;\n\tvar previous_effect = active_effect;\n\tset_active_reaction(null);\n\tset_active_effect(null);\n\n\ttry {\n\t\t/**\n\t\t * @type {unknown}\n\t\t */\n\t\tvar throw_error;\n\t\t/**\n\t\t * @type {unknown[]}\n\t\t */\n\t\tvar other_errors = [];\n\n\t\twhile (current_target !== null) {\n\t\t\t/** @type {null | Element} */\n\t\t\tvar parent_element =\n\t\t\t\tcurrent_target.assignedSlot ||\n\t\t\t\tcurrent_target.parentNode ||\n\t\t\t\t/** @type {any} */ (current_target).host ||\n\t\t\t\tnull;\n\n\t\t\ttry {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tvar delegated = current_target[event_symbol]?.[event_name];\n\n\t\t\t\tif (\n\t\t\t\t\tdelegated != null &&\n\t\t\t\t\t(!(/** @type {any} */ (current_target).disabled) ||\n\t\t\t\t\t\t// DOM could've been updated already by the time this is reached, so we check this as well\n\t\t\t\t\t\t// -> the target could not have been disabled because it emits the event in the first place\n\t\t\t\t\t\tevent.target === current_target)\n\t\t\t\t) {\n\t\t\t\t\tdelegated.call(current_target, event);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (throw_error) {\n\t\t\t\t\tother_errors.push(error);\n\t\t\t\t} else {\n\t\t\t\t\tthrow_error = error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (event.cancelBubble || parent_element === handler_element || parent_element === null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrent_target = parent_element;\n\t\t}\n\n\t\tif (throw_error) {\n\t\t\tfor (let error of other_errors) {\n\t\t\t\t// Throw the rest of the errors, one-by-one on a microtask\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow throw_error;\n\t\t}\n\t} finally {\n\t\t// @ts-expect-error is used above\n\t\tevent[event_symbol] = handler_element;\n\t\t// @ts-ignore remove proxy on currentTarget\n\t\tdelete event.currentTarget;\n\t\tset_active_reaction(previous_reaction);\n\t\tset_active_effect(previous_effect);\n\t}\n}\n\n/**\n * In dev, warn if an event handler is not a function, as it means the\n * user probably called the handler or forgot to add a `() =>`\n * @param {() => (event: Event, ...args: any) => void} thunk\n * @param {EventTarget} element\n * @param {[Event, ...any]} args\n * @param {any} component\n * @param {[number, number]} [loc]\n * @param {boolean} [remove_parens]\n */\nexport function apply(\n\tthunk,\n\telement,\n\targs,\n\tcomponent,\n\tloc,\n\thas_side_effects = false,\n\tremove_parens = false\n) {\n\tlet handler;\n\tlet error;\n\n\ttry {\n\t\thandler = thunk();\n\t} catch (e) {\n\t\terror = e;\n\t}\n\n\tif (typeof handler !== 'function' && (has_side_effects || handler != null || error)) {\n\t\tconst filename = component?.[FILENAME];\n\t\tconst location = loc ? ` at ${filename}:${loc[0]}:${loc[1]}` : ` in ${filename}`;\n\t\tconst phase = args[0]?.eventPhase < Event.BUBBLING_PHASE ? 'capture' : '';\n\t\tconst event_name = args[0]?.type + phase;\n\t\tconst description = `\\`${event_name}\\` handler${location}`;\n\t\tconst suggestion = remove_parens ? 'remove the trailing `()`' : 'add a leading `() =>`';\n\n\t\tw.event_handler_invalid(description, suggestion);\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\t}\n\thandler?.apply(element, args);\n}\n"], 5 - "mappings": ";;;;;;;;;;;;;;;;;AAkBO,IAAM,eAAe,uBAAO,QAAQ;AAGpC,IAAM,wBAAwB,oBAAI,IAAI;AAGtC,IAAM,qBAAqB,oBAAI,IAAI;AAOnC,SAAS,cAAc,KAAK;AAClC,MAAI,CAAC,UAAW;AAEhB,MAAI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AAC,GAAG,OAAO;AACnC,UAAM,cAAc,KAAK,UAAU,aAAa,QAAQ;AACxD,UAAM,aAAa,gBAAgB,6BAA6B;AAEhE,IAAE,sBAAsB,aAAa,UAAU;AAE/C,QAAI,OAAO;AACV,YAAM;AAAA,IACP;AAAA,EACD;AACA,WAAS,MAAM,SAAS,IAAI;AAC7B;", 6 - "names": ["event", "delegated"] 7 - }
-688
node_modules/.vite/deps/chunk-FQXKS6MM.js
··· 1 - import { 2 - ReactiveValue 3 - } from "./chunk-2ZGNHB6A.js"; 4 - import { 5 - on 6 - } from "./chunk-DSSJOGTL.js"; 7 - import { 8 - active_reaction, 9 - get2 as get, 10 - increment, 11 - label, 12 - set, 13 - set_active_reaction, 14 - source, 15 - state, 16 - tag, 17 - update_version, 18 - user_derived 19 - } from "./chunk-TY5SIVJK.js"; 20 - import { 21 - true_default 22 - } from "./chunk-GSVKEBRT.js"; 23 - 24 - // node_modules/svelte/src/reactivity/date.js 25 - var inited = false; 26 - var SvelteDate = class _SvelteDate extends Date { 27 - #time = state(super.getTime()); 28 - /** @type {Map<keyof Date, Source<unknown>>} */ 29 - #deriveds = /* @__PURE__ */ new Map(); 30 - #reaction = active_reaction; 31 - /** @param {any[]} params */ 32 - constructor(...params) { 33 - super(...params); 34 - if (true_default) { 35 - tag(this.#time, "SvelteDate.#time"); 36 - } 37 - if (!inited) this.#init(); 38 - } 39 - #init() { 40 - inited = true; 41 - var proto = _SvelteDate.prototype; 42 - var date_proto = Date.prototype; 43 - var methods = ( 44 - /** @type {Array<keyof Date & string>} */ 45 - Object.getOwnPropertyNames(date_proto) 46 - ); 47 - for (const method of methods) { 48 - if (method.startsWith("get") || method.startsWith("to") || method === "valueOf") { 49 - proto[method] = function(...args) { 50 - if (args.length > 0) { 51 - get(this.#time); 52 - return date_proto[method].apply(this, args); 53 - } 54 - var d = this.#deriveds.get(method); 55 - if (d === void 0) { 56 - const reaction = active_reaction; 57 - set_active_reaction(this.#reaction); 58 - d = user_derived(() => { 59 - get(this.#time); 60 - return date_proto[method].apply(this, args); 61 - }); 62 - this.#deriveds.set(method, d); 63 - set_active_reaction(reaction); 64 - } 65 - return get(d); 66 - }; 67 - } 68 - if (method.startsWith("set")) { 69 - proto[method] = function(...args) { 70 - var result = date_proto[method].apply(this, args); 71 - set(this.#time, date_proto.getTime.call(this)); 72 - return result; 73 - }; 74 - } 75 - } 76 - } 77 - }; 78 - 79 - // node_modules/svelte/src/reactivity/set.js 80 - var read_methods = ["forEach", "isDisjointFrom", "isSubsetOf", "isSupersetOf"]; 81 - var set_like_methods = ["difference", "intersection", "symmetricDifference", "union"]; 82 - var inited2 = false; 83 - var SvelteSet = class _SvelteSet extends Set { 84 - /** @type {Map<T, Source<boolean>>} */ 85 - #sources = /* @__PURE__ */ new Map(); 86 - #version = state(0); 87 - #size = state(0); 88 - #update_version = update_version || -1; 89 - /** 90 - * @param {Iterable<T> | null | undefined} [value] 91 - */ 92 - constructor(value) { 93 - super(); 94 - if (true_default) { 95 - value = new Set(value); 96 - tag(this.#version, "SvelteSet version"); 97 - tag(this.#size, "SvelteSet.size"); 98 - } 99 - if (value) { 100 - for (var element of value) { 101 - super.add(element); 102 - } 103 - this.#size.v = super.size; 104 - } 105 - if (!inited2) this.#init(); 106 - } 107 - /** 108 - * If the source is being created inside the same reaction as the SvelteSet instance, 109 - * we use `state` so that it will not be a dependency of the reaction. Otherwise we 110 - * use `source` so it will be. 111 - * 112 - * @template T 113 - * @param {T} value 114 - * @returns {Source<T>} 115 - */ 116 - #source(value) { 117 - return update_version === this.#update_version ? state(value) : source(value); 118 - } 119 - // We init as part of the first instance so that we can treeshake this class 120 - #init() { 121 - inited2 = true; 122 - var proto = _SvelteSet.prototype; 123 - var set_proto = Set.prototype; 124 - for (const method of read_methods) { 125 - proto[method] = function(...v) { 126 - get(this.#version); 127 - return set_proto[method].apply(this, v); 128 - }; 129 - } 130 - for (const method of set_like_methods) { 131 - proto[method] = function(...v) { 132 - get(this.#version); 133 - var set2 = ( 134 - /** @type {Set<T>} */ 135 - set_proto[method].apply(this, v) 136 - ); 137 - return new _SvelteSet(set2); 138 - }; 139 - } 140 - } 141 - /** @param {T} value */ 142 - has(value) { 143 - var has = super.has(value); 144 - var sources = this.#sources; 145 - var s = sources.get(value); 146 - if (s === void 0) { 147 - if (!has) { 148 - get(this.#version); 149 - return false; 150 - } 151 - s = this.#source(true); 152 - if (true_default) { 153 - tag(s, `SvelteSet has(${label(value)})`); 154 - } 155 - sources.set(value, s); 156 - } 157 - get(s); 158 - return has; 159 - } 160 - /** @param {T} value */ 161 - add(value) { 162 - if (!super.has(value)) { 163 - super.add(value); 164 - set(this.#size, super.size); 165 - increment(this.#version); 166 - } 167 - return this; 168 - } 169 - /** @param {T} value */ 170 - delete(value) { 171 - var deleted = super.delete(value); 172 - var sources = this.#sources; 173 - var s = sources.get(value); 174 - if (s !== void 0) { 175 - sources.delete(value); 176 - set(s, false); 177 - } 178 - if (deleted) { 179 - set(this.#size, super.size); 180 - increment(this.#version); 181 - } 182 - return deleted; 183 - } 184 - clear() { 185 - if (super.size === 0) { 186 - return; 187 - } 188 - super.clear(); 189 - var sources = this.#sources; 190 - for (var s of sources.values()) { 191 - set(s, false); 192 - } 193 - sources.clear(); 194 - set(this.#size, 0); 195 - increment(this.#version); 196 - } 197 - keys() { 198 - return this.values(); 199 - } 200 - values() { 201 - get(this.#version); 202 - return super.values(); 203 - } 204 - entries() { 205 - get(this.#version); 206 - return super.entries(); 207 - } 208 - [Symbol.iterator]() { 209 - return this.keys(); 210 - } 211 - get size() { 212 - return get(this.#size); 213 - } 214 - }; 215 - 216 - // node_modules/svelte/src/reactivity/map.js 217 - var SvelteMap = class extends Map { 218 - /** @type {Map<K, Source<number>>} */ 219 - #sources = /* @__PURE__ */ new Map(); 220 - #version = state(0); 221 - #size = state(0); 222 - #update_version = update_version || -1; 223 - /** 224 - * @param {Iterable<readonly [K, V]> | null | undefined} [value] 225 - */ 226 - constructor(value) { 227 - super(); 228 - if (true_default) { 229 - value = new Map(value); 230 - tag(this.#version, "SvelteMap version"); 231 - tag(this.#size, "SvelteMap.size"); 232 - } 233 - if (value) { 234 - for (var [key, v] of value) { 235 - super.set(key, v); 236 - } 237 - this.#size.v = super.size; 238 - } 239 - } 240 - /** 241 - * If the source is being created inside the same reaction as the SvelteMap instance, 242 - * we use `state` so that it will not be a dependency of the reaction. Otherwise we 243 - * use `source` so it will be. 244 - * 245 - * @template T 246 - * @param {T} value 247 - * @returns {Source<T>} 248 - */ 249 - #source(value) { 250 - return update_version === this.#update_version ? state(value) : source(value); 251 - } 252 - /** @param {K} key */ 253 - has(key) { 254 - var sources = this.#sources; 255 - var s = sources.get(key); 256 - if (s === void 0) { 257 - if (super.has(key)) { 258 - s = this.#source(0); 259 - if (true_default) { 260 - tag(s, `SvelteMap get(${label(key)})`); 261 - } 262 - sources.set(key, s); 263 - } else { 264 - get(this.#version); 265 - return false; 266 - } 267 - } 268 - get(s); 269 - return true; 270 - } 271 - /** 272 - * @param {(value: V, key: K, map: Map<K, V>) => void} callbackfn 273 - * @param {any} [this_arg] 274 - */ 275 - forEach(callbackfn, this_arg) { 276 - this.#read_all(); 277 - super.forEach(callbackfn, this_arg); 278 - } 279 - /** @param {K} key */ 280 - get(key) { 281 - var sources = this.#sources; 282 - var s = sources.get(key); 283 - if (s === void 0) { 284 - if (super.has(key)) { 285 - s = this.#source(0); 286 - if (true_default) { 287 - tag(s, `SvelteMap get(${label(key)})`); 288 - } 289 - sources.set(key, s); 290 - } else { 291 - get(this.#version); 292 - return void 0; 293 - } 294 - } 295 - get(s); 296 - return super.get(key); 297 - } 298 - /** 299 - * @param {K} key 300 - * @param {V} value 301 - * */ 302 - set(key, value) { 303 - var sources = this.#sources; 304 - var s = sources.get(key); 305 - var prev_res = super.get(key); 306 - var res = super.set(key, value); 307 - var version = this.#version; 308 - if (s === void 0) { 309 - s = this.#source(0); 310 - if (true_default) { 311 - tag(s, `SvelteMap get(${label(key)})`); 312 - } 313 - sources.set(key, s); 314 - set(this.#size, super.size); 315 - increment(version); 316 - } else if (prev_res !== value) { 317 - increment(s); 318 - var v_reactions = version.reactions === null ? null : new Set(version.reactions); 319 - var needs_version_increase = v_reactions === null || !s.reactions?.every( 320 - (r) => ( 321 - /** @type {NonNullable<typeof v_reactions>} */ 322 - v_reactions.has(r) 323 - ) 324 - ); 325 - if (needs_version_increase) { 326 - increment(version); 327 - } 328 - } 329 - return res; 330 - } 331 - /** @param {K} key */ 332 - delete(key) { 333 - var sources = this.#sources; 334 - var s = sources.get(key); 335 - var res = super.delete(key); 336 - if (s !== void 0) { 337 - sources.delete(key); 338 - set(s, -1); 339 - } 340 - if (res) { 341 - set(this.#size, super.size); 342 - increment(this.#version); 343 - } 344 - return res; 345 - } 346 - clear() { 347 - if (super.size === 0) { 348 - return; 349 - } 350 - super.clear(); 351 - var sources = this.#sources; 352 - set(this.#size, 0); 353 - for (var s of sources.values()) { 354 - set(s, -1); 355 - } 356 - increment(this.#version); 357 - sources.clear(); 358 - } 359 - #read_all() { 360 - get(this.#version); 361 - var sources = this.#sources; 362 - if (this.#size.v !== sources.size) { 363 - for (var key of super.keys()) { 364 - if (!sources.has(key)) { 365 - var s = this.#source(0); 366 - if (true_default) { 367 - tag(s, `SvelteMap get(${label(key)})`); 368 - } 369 - sources.set(key, s); 370 - } 371 - } 372 - } 373 - for ([, s] of this.#sources) { 374 - get(s); 375 - } 376 - } 377 - keys() { 378 - get(this.#version); 379 - return super.keys(); 380 - } 381 - values() { 382 - this.#read_all(); 383 - return super.values(); 384 - } 385 - entries() { 386 - this.#read_all(); 387 - return super.entries(); 388 - } 389 - [Symbol.iterator]() { 390 - return this.entries(); 391 - } 392 - get size() { 393 - get(this.#size); 394 - return super.size; 395 - } 396 - }; 397 - 398 - // node_modules/svelte/src/reactivity/url-search-params.js 399 - var REPLACE = /* @__PURE__ */ Symbol(); 400 - var SvelteURLSearchParams = class extends URLSearchParams { 401 - #version = true_default ? tag(state(0), "SvelteURLSearchParams version") : state(0); 402 - #url = get_current_url(); 403 - #updating = false; 404 - #update_url() { 405 - if (!this.#url || this.#updating) return; 406 - this.#updating = true; 407 - const search = this.toString(); 408 - this.#url.search = search && `?${search}`; 409 - this.#updating = false; 410 - } 411 - /** 412 - * @param {URLSearchParams} params 413 - * @internal 414 - */ 415 - [REPLACE](params) { 416 - if (this.#updating) return; 417 - this.#updating = true; 418 - for (const key of [...super.keys()]) { 419 - super.delete(key); 420 - } 421 - for (const [key, value] of params) { 422 - super.append(key, value); 423 - } 424 - increment(this.#version); 425 - this.#updating = false; 426 - } 427 - /** 428 - * @param {string} name 429 - * @param {string} value 430 - * @returns {void} 431 - */ 432 - append(name, value) { 433 - super.append(name, value); 434 - this.#update_url(); 435 - increment(this.#version); 436 - } 437 - /** 438 - * @param {string} name 439 - * @param {string=} value 440 - * @returns {void} 441 - */ 442 - delete(name, value) { 443 - var has_value = super.has(name, value); 444 - super.delete(name, value); 445 - if (has_value) { 446 - this.#update_url(); 447 - increment(this.#version); 448 - } 449 - } 450 - /** 451 - * @param {string} name 452 - * @returns {string|null} 453 - */ 454 - get(name) { 455 - get(this.#version); 456 - return super.get(name); 457 - } 458 - /** 459 - * @param {string} name 460 - * @returns {string[]} 461 - */ 462 - getAll(name) { 463 - get(this.#version); 464 - return super.getAll(name); 465 - } 466 - /** 467 - * @param {string} name 468 - * @param {string=} value 469 - * @returns {boolean} 470 - */ 471 - has(name, value) { 472 - get(this.#version); 473 - return super.has(name, value); 474 - } 475 - keys() { 476 - get(this.#version); 477 - return super.keys(); 478 - } 479 - /** 480 - * @param {string} name 481 - * @param {string} value 482 - * @returns {void} 483 - */ 484 - set(name, value) { 485 - var previous = super.getAll(name).join(""); 486 - super.set(name, value); 487 - if (previous !== super.getAll(name).join("")) { 488 - this.#update_url(); 489 - increment(this.#version); 490 - } 491 - } 492 - sort() { 493 - super.sort(); 494 - this.#update_url(); 495 - increment(this.#version); 496 - } 497 - toString() { 498 - get(this.#version); 499 - return super.toString(); 500 - } 501 - values() { 502 - get(this.#version); 503 - return super.values(); 504 - } 505 - entries() { 506 - get(this.#version); 507 - return super.entries(); 508 - } 509 - [Symbol.iterator]() { 510 - return this.entries(); 511 - } 512 - get size() { 513 - get(this.#version); 514 - return super.size; 515 - } 516 - }; 517 - 518 - // node_modules/svelte/src/reactivity/url.js 519 - var current_url = null; 520 - function get_current_url() { 521 - return current_url; 522 - } 523 - var SvelteURL = class extends URL { 524 - #protocol = state(super.protocol); 525 - #username = state(super.username); 526 - #password = state(super.password); 527 - #hostname = state(super.hostname); 528 - #port = state(super.port); 529 - #pathname = state(super.pathname); 530 - #hash = state(super.hash); 531 - #search = state(super.search); 532 - #searchParams; 533 - /** 534 - * @param {string | URL} url 535 - * @param {string | URL} [base] 536 - */ 537 - constructor(url, base) { 538 - url = new URL(url, base); 539 - super(url); 540 - if (true_default) { 541 - tag(this.#protocol, "SvelteURL.protocol"); 542 - tag(this.#username, "SvelteURL.username"); 543 - tag(this.#password, "SvelteURL.password"); 544 - tag(this.#hostname, "SvelteURL.hostname"); 545 - tag(this.#port, "SvelteURL.port"); 546 - tag(this.#pathname, "SvelteURL.pathname"); 547 - tag(this.#hash, "SvelteURL.hash"); 548 - tag(this.#search, "SvelteURL.search"); 549 - } 550 - current_url = this; 551 - this.#searchParams = new SvelteURLSearchParams(url.searchParams); 552 - current_url = null; 553 - } 554 - get hash() { 555 - return get(this.#hash); 556 - } 557 - set hash(value) { 558 - super.hash = value; 559 - set(this.#hash, super.hash); 560 - } 561 - get host() { 562 - get(this.#hostname); 563 - get(this.#port); 564 - return super.host; 565 - } 566 - set host(value) { 567 - super.host = value; 568 - set(this.#hostname, super.hostname); 569 - set(this.#port, super.port); 570 - } 571 - get hostname() { 572 - return get(this.#hostname); 573 - } 574 - set hostname(value) { 575 - super.hostname = value; 576 - set(this.#hostname, super.hostname); 577 - } 578 - get href() { 579 - get(this.#protocol); 580 - get(this.#username); 581 - get(this.#password); 582 - get(this.#hostname); 583 - get(this.#port); 584 - get(this.#pathname); 585 - get(this.#hash); 586 - get(this.#search); 587 - return super.href; 588 - } 589 - set href(value) { 590 - super.href = value; 591 - set(this.#protocol, super.protocol); 592 - set(this.#username, super.username); 593 - set(this.#password, super.password); 594 - set(this.#hostname, super.hostname); 595 - set(this.#port, super.port); 596 - set(this.#pathname, super.pathname); 597 - set(this.#hash, super.hash); 598 - set(this.#search, super.search); 599 - this.#searchParams[REPLACE](super.searchParams); 600 - } 601 - get password() { 602 - return get(this.#password); 603 - } 604 - set password(value) { 605 - super.password = value; 606 - set(this.#password, super.password); 607 - } 608 - get pathname() { 609 - return get(this.#pathname); 610 - } 611 - set pathname(value) { 612 - super.pathname = value; 613 - set(this.#pathname, super.pathname); 614 - } 615 - get port() { 616 - return get(this.#port); 617 - } 618 - set port(value) { 619 - super.port = value; 620 - set(this.#port, super.port); 621 - } 622 - get protocol() { 623 - return get(this.#protocol); 624 - } 625 - set protocol(value) { 626 - super.protocol = value; 627 - set(this.#protocol, super.protocol); 628 - } 629 - get search() { 630 - return get(this.#search); 631 - } 632 - set search(value) { 633 - super.search = value; 634 - set(this.#search, super.search); 635 - this.#searchParams[REPLACE](super.searchParams); 636 - } 637 - get username() { 638 - return get(this.#username); 639 - } 640 - set username(value) { 641 - super.username = value; 642 - set(this.#username, super.username); 643 - } 644 - get origin() { 645 - get(this.#protocol); 646 - get(this.#hostname); 647 - get(this.#port); 648 - return super.origin; 649 - } 650 - get searchParams() { 651 - return this.#searchParams; 652 - } 653 - toString() { 654 - return this.href; 655 - } 656 - toJSON() { 657 - return this.href; 658 - } 659 - }; 660 - 661 - // node_modules/svelte/src/reactivity/media-query.js 662 - var parenthesis_regex = /\(.+\)/; 663 - var non_parenthesized_keywords = /* @__PURE__ */ new Set(["all", "print", "screen", "and", "or", "not", "only"]); 664 - var MediaQuery = class extends ReactiveValue { 665 - /** 666 - * @param {string} query A media query string 667 - * @param {boolean} [fallback] Fallback value for the server 668 - */ 669 - constructor(query, fallback) { 670 - let final_query = parenthesis_regex.test(query) || // we need to use `some` here because technically this `window.matchMedia('random,screen')` still returns true 671 - query.split(/[\s,]+/).some((keyword) => non_parenthesized_keywords.has(keyword.trim())) ? query : `(${query})`; 672 - const q = window.matchMedia(final_query); 673 - super( 674 - () => q.matches, 675 - (update) => on(q, "change", update) 676 - ); 677 - } 678 - }; 679 - 680 - export { 681 - SvelteDate, 682 - SvelteSet, 683 - SvelteMap, 684 - SvelteURLSearchParams, 685 - SvelteURL, 686 - MediaQuery 687 - }; 688 - //# sourceMappingURL=chunk-FQXKS6MM.js.map
-7
node_modules/.vite/deps/chunk-FQXKS6MM.js.map
··· 1 - { 2 - "version": 3, 3 - "sources": ["../../svelte/src/reactivity/date.js", "../../svelte/src/reactivity/set.js", "../../svelte/src/reactivity/map.js", "../../svelte/src/reactivity/url-search-params.js", "../../svelte/src/reactivity/url.js", "../../svelte/src/reactivity/media-query.js"], 4 - "sourcesContent": ["/** @import { Source } from '#client' */\nimport { derived } from '../internal/client/index.js';\nimport { set, state } from '../internal/client/reactivity/sources.js';\nimport { tag } from '../internal/client/dev/tracing.js';\nimport { active_reaction, get, set_active_reaction } from '../internal/client/runtime.js';\nimport { DEV } from 'esm-env';\n\nvar inited = false;\n\n/**\n * A reactive version of the built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object.\n * Reading the date (whether with methods like `date.getTime()` or `date.toString()`, or via things like [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat))\n * in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)\n * will cause it to be re-evaluated when the value of the date changes.\n *\n * ```svelte\n * <script>\n * \timport { SvelteDate } from 'svelte/reactivity';\n *\n * \tconst date = new SvelteDate();\n *\n * \tconst formatter = new Intl.DateTimeFormat(undefined, {\n * \t hour: 'numeric',\n * \t minute: 'numeric',\n * \t second: 'numeric'\n * \t});\n *\n * \t$effect(() => {\n * \t\tconst interval = setInterval(() => {\n * \t\t\tdate.setTime(Date.now());\n * \t\t}, 1000);\n *\n * \t\treturn () => {\n * \t\t\tclearInterval(interval);\n * \t\t};\n * \t});\n * </script>\n *\n * <p>The time is {formatter.format(date)}</p>\n * ```\n */\nexport class SvelteDate extends Date {\n\t#time = state(super.getTime());\n\n\t/** @type {Map<keyof Date, Source<unknown>>} */\n\t#deriveds = new Map();\n\n\t#reaction = active_reaction;\n\n\t/** @param {any[]} params */\n\tconstructor(...params) {\n\t\t// @ts-ignore\n\t\tsuper(...params);\n\n\t\tif (DEV) {\n\t\t\ttag(this.#time, 'SvelteDate.#time');\n\t\t}\n\n\t\tif (!inited) this.#init();\n\t}\n\n\t#init() {\n\t\tinited = true;\n\n\t\tvar proto = SvelteDate.prototype;\n\t\tvar date_proto = Date.prototype;\n\n\t\tvar methods = /** @type {Array<keyof Date & string>} */ (\n\t\t\tObject.getOwnPropertyNames(date_proto)\n\t\t);\n\n\t\tfor (const method of methods) {\n\t\t\tif (method.startsWith('get') || method.startsWith('to') || method === 'valueOf') {\n\t\t\t\t// @ts-ignore\n\t\t\t\tproto[method] = function (...args) {\n\t\t\t\t\t// don't memoize if there are arguments\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tif (args.length > 0) {\n\t\t\t\t\t\tget(this.#time);\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\treturn date_proto[method].apply(this, args);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar d = this.#deriveds.get(method);\n\n\t\t\t\t\tif (d === undefined) {\n\t\t\t\t\t\t// lazily create the derived, but as though it were being\n\t\t\t\t\t\t// created at the same time as the class instance\n\t\t\t\t\t\tconst reaction = active_reaction;\n\t\t\t\t\t\tset_active_reaction(this.#reaction);\n\n\t\t\t\t\t\td = derived(() => {\n\t\t\t\t\t\t\tget(this.#time);\n\t\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t\treturn date_proto[method].apply(this, args);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tthis.#deriveds.set(method, d);\n\n\t\t\t\t\t\tset_active_reaction(reaction);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn get(d);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (method.startsWith('set')) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tproto[method] = function (...args) {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tvar result = date_proto[method].apply(this, args);\n\t\t\t\t\tset(this.#time, date_proto.getTime.call(this));\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n", "/** @import { Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport { source, set, state, increment } from '../internal/client/reactivity/sources.js';\nimport { label, tag } from '../internal/client/dev/tracing.js';\nimport { get, update_version } from '../internal/client/runtime.js';\n\nvar read_methods = ['forEach', 'isDisjointFrom', 'isSubsetOf', 'isSupersetOf'];\nvar set_like_methods = ['difference', 'intersection', 'symmetricDifference', 'union'];\n\nvar inited = false;\n\n/**\n * A reactive version of the built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) object.\n * Reading contents of the set (by iterating, or by reading `set.size` or calling `set.has(...)` as in the [example](https://svelte.dev/playground/53438b51194b4882bcc18cddf9f96f15) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)\n * will cause it to be re-evaluated as necessary when the set is updated.\n *\n * Note that values in a reactive set are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state).\n *\n * ```svelte\n * <script>\n * \timport { SvelteSet } from 'svelte/reactivity';\n * \tlet monkeys = new SvelteSet();\n *\n * \tfunction toggle(monkey) {\n * \t\tif (monkeys.has(monkey)) {\n * \t\t\tmonkeys.delete(monkey);\n * \t\t} else {\n * \t\t\tmonkeys.add(monkey);\n * \t\t}\n * \t}\n * </script>\n *\n * {#each ['🙈', '🙉', '🙊'] as monkey}\n * \t<button onclick={() => toggle(monkey)}>{monkey}</button>\n * {/each}\n *\n * <button onclick={() => monkeys.clear()}>clear</button>\n *\n * {#if monkeys.has('🙈')}<p>see no evil</p>{/if}\n * {#if monkeys.has('🙉')}<p>hear no evil</p>{/if}\n * {#if monkeys.has('🙊')}<p>speak no evil</p>{/if}\n * ```\n *\n * @template T\n * @extends {Set<T>}\n */\nexport class SvelteSet extends Set {\n\t/** @type {Map<T, Source<boolean>>} */\n\t#sources = new Map();\n\t#version = state(0);\n\t#size = state(0);\n\t#update_version = update_version || -1;\n\n\t/**\n\t * @param {Iterable<T> | null | undefined} [value]\n\t */\n\tconstructor(value) {\n\t\tsuper();\n\n\t\tif (DEV) {\n\t\t\t// If the value is invalid then the native exception will fire here\n\t\t\tvalue = new Set(value);\n\n\t\t\ttag(this.#version, 'SvelteSet version');\n\t\t\ttag(this.#size, 'SvelteSet.size');\n\t\t}\n\n\t\tif (value) {\n\t\t\tfor (var element of value) {\n\t\t\t\tsuper.add(element);\n\t\t\t}\n\t\t\tthis.#size.v = super.size;\n\t\t}\n\n\t\tif (!inited) this.#init();\n\t}\n\n\t/**\n\t * If the source is being created inside the same reaction as the SvelteSet instance,\n\t * we use `state` so that it will not be a dependency of the reaction. Otherwise we\n\t * use `source` so it will be.\n\t *\n\t * @template T\n\t * @param {T} value\n\t * @returns {Source<T>}\n\t */\n\t#source(value) {\n\t\treturn update_version === this.#update_version ? state(value) : source(value);\n\t}\n\n\t// We init as part of the first instance so that we can treeshake this class\n\t#init() {\n\t\tinited = true;\n\n\t\tvar proto = SvelteSet.prototype;\n\t\tvar set_proto = Set.prototype;\n\n\t\tfor (const method of read_methods) {\n\t\t\t// @ts-ignore\n\t\t\tproto[method] = function (...v) {\n\t\t\t\tget(this.#version);\n\t\t\t\t// @ts-ignore\n\t\t\t\treturn set_proto[method].apply(this, v);\n\t\t\t};\n\t\t}\n\n\t\tfor (const method of set_like_methods) {\n\t\t\t// @ts-ignore\n\t\t\tproto[method] = function (...v) {\n\t\t\t\tget(this.#version);\n\t\t\t\t// @ts-ignore\n\t\t\t\tvar set = /** @type {Set<T>} */ (set_proto[method].apply(this, v));\n\t\t\t\treturn new SvelteSet(set);\n\t\t\t};\n\t\t}\n\t}\n\n\t/** @param {T} value */\n\thas(value) {\n\t\tvar has = super.has(value);\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(value);\n\n\t\tif (s === undefined) {\n\t\t\tif (!has) {\n\t\t\t\t// If the value doesn't exist, track the version in case it's added later\n\t\t\t\t// but don't create sources willy-nilly to track all possible values\n\t\t\t\tget(this.#version);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ts = this.#source(true);\n\n\t\t\tif (DEV) {\n\t\t\t\ttag(s, `SvelteSet has(${label(value)})`);\n\t\t\t}\n\n\t\t\tsources.set(value, s);\n\t\t}\n\n\t\tget(s);\n\t\treturn has;\n\t}\n\n\t/** @param {T} value */\n\tadd(value) {\n\t\tif (!super.has(value)) {\n\t\t\tsuper.add(value);\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(this.#version);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/** @param {T} value */\n\tdelete(value) {\n\t\tvar deleted = super.delete(value);\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(value);\n\n\t\tif (s !== undefined) {\n\t\t\tsources.delete(value);\n\t\t\tset(s, false);\n\t\t}\n\n\t\tif (deleted) {\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(this.#version);\n\t\t}\n\n\t\treturn deleted;\n\t}\n\n\tclear() {\n\t\tif (super.size === 0) {\n\t\t\treturn;\n\t\t}\n\t\t// Clear first, so we get nice console.log outputs with $inspect\n\t\tsuper.clear();\n\t\tvar sources = this.#sources;\n\n\t\tfor (var s of sources.values()) {\n\t\t\tset(s, false);\n\t\t}\n\n\t\tsources.clear();\n\t\tset(this.#size, 0);\n\t\tincrement(this.#version);\n\t}\n\n\tkeys() {\n\t\treturn this.values();\n\t}\n\n\tvalues() {\n\t\tget(this.#version);\n\t\treturn super.values();\n\t}\n\n\tentries() {\n\t\tget(this.#version);\n\t\treturn super.entries();\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn this.keys();\n\t}\n\n\tget size() {\n\t\treturn get(this.#size);\n\t}\n}\n", "/** @import { Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport { set, source, state, increment } from '../internal/client/reactivity/sources.js';\nimport { label, tag } from '../internal/client/dev/tracing.js';\nimport { get, update_version } from '../internal/client/runtime.js';\n\n/**\n * A reactive version of the built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) object.\n * Reading contents of the map (by iterating, or by reading `map.size` or calling `map.get(...)` or `map.has(...)` as in the [tic-tac-toe example](https://svelte.dev/playground/0b0ff4aa49c9443f9b47fe5203c78293) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)\n * will cause it to be re-evaluated as necessary when the map is updated.\n *\n * Note that values in a reactive map are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state).\n *\n * ```svelte\n * <script>\n * \timport { SvelteMap } from 'svelte/reactivity';\n * \timport { result } from './game.js';\n *\n * \tlet board = new SvelteMap();\n * \tlet player = $state('x');\n * \tlet winner = $derived(result(board));\n *\n * \tfunction reset() {\n * \t\tplayer = 'x';\n * \t\tboard.clear();\n * \t}\n * </script>\n *\n * <div class=\"board\">\n * \t{#each Array(9), i}\n * \t\t<button\n * \t\t\tdisabled={board.has(i) || winner}\n * \t\t\tonclick={() => {\n * \t\t\t\tboard.set(i, player);\n * \t\t\t\tplayer = player === 'x' ? 'o' : 'x';\n * \t\t\t}}\n * \t\t>{board.get(i)}</button>\n * \t{/each}\n * </div>\n *\n * {#if winner}\n * \t<p>{winner} wins!</p>\n * \t<button onclick={reset}>reset</button>\n * {:else}\n * \t<p>{player} is next</p>\n * {/if}\n * ```\n *\n * @template K\n * @template V\n * @extends {Map<K, V>}\n */\nexport class SvelteMap extends Map {\n\t/** @type {Map<K, Source<number>>} */\n\t#sources = new Map();\n\t#version = state(0);\n\t#size = state(0);\n\t#update_version = update_version || -1;\n\n\t/**\n\t * @param {Iterable<readonly [K, V]> | null | undefined} [value]\n\t */\n\tconstructor(value) {\n\t\tsuper();\n\n\t\tif (DEV) {\n\t\t\t// If the value is invalid then the native exception will fire here\n\t\t\tvalue = new Map(value);\n\n\t\t\ttag(this.#version, 'SvelteMap version');\n\t\t\ttag(this.#size, 'SvelteMap.size');\n\t\t}\n\n\t\tif (value) {\n\t\t\tfor (var [key, v] of value) {\n\t\t\t\tsuper.set(key, v);\n\t\t\t}\n\t\t\tthis.#size.v = super.size;\n\t\t}\n\t}\n\n\t/**\n\t * If the source is being created inside the same reaction as the SvelteMap instance,\n\t * we use `state` so that it will not be a dependency of the reaction. Otherwise we\n\t * use `source` so it will be.\n\t *\n\t * @template T\n\t * @param {T} value\n\t * @returns {Source<T>}\n\t */\n\t#source(value) {\n\t\treturn update_version === this.#update_version ? state(value) : source(value);\n\t}\n\n\t/** @param {K} key */\n\thas(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tif (super.has(key)) {\n\t\t\t\ts = this.#source(0);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t}\n\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(value: V, key: K, map: Map<K, V>) => void} callbackfn\n\t * @param {any} [this_arg]\n\t */\n\tforEach(callbackfn, this_arg) {\n\t\tthis.#read_all();\n\t\tsuper.forEach(callbackfn, this_arg);\n\t}\n\n\t/** @param {K} key */\n\tget(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tif (super.has(key)) {\n\t\t\t\ts = this.#source(0);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t}\n\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn super.get(key);\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {V} value\n\t * */\n\tset(key, value) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar prev_res = super.get(key);\n\t\tvar res = super.set(key, value);\n\t\tvar version = this.#version;\n\n\t\tif (s === undefined) {\n\t\t\ts = this.#source(0);\n\n\t\t\tif (DEV) {\n\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t}\n\n\t\t\tsources.set(key, s);\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(version);\n\t\t} else if (prev_res !== value) {\n\t\t\tincrement(s);\n\n\t\t\t// if not every reaction of s is a reaction of version we need to also include version\n\t\t\tvar v_reactions = version.reactions === null ? null : new Set(version.reactions);\n\t\t\tvar needs_version_increase =\n\t\t\t\tv_reactions === null ||\n\t\t\t\t!s.reactions?.every((r) =>\n\t\t\t\t\t/** @type {NonNullable<typeof v_reactions>} */ (v_reactions).has(r)\n\t\t\t\t);\n\t\t\tif (needs_version_increase) {\n\t\t\t\tincrement(version);\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/** @param {K} key */\n\tdelete(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar res = super.delete(key);\n\n\t\tif (s !== undefined) {\n\t\t\tsources.delete(key);\n\t\t\tset(s, -1);\n\t\t}\n\n\t\tif (res) {\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(this.#version);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tclear() {\n\t\tif (super.size === 0) {\n\t\t\treturn;\n\t\t}\n\t\t// Clear first, so we get nice console.log outputs with $inspect\n\t\tsuper.clear();\n\t\tvar sources = this.#sources;\n\t\tset(this.#size, 0);\n\t\tfor (var s of sources.values()) {\n\t\t\tset(s, -1);\n\t\t}\n\t\tincrement(this.#version);\n\t\tsources.clear();\n\t}\n\n\t#read_all() {\n\t\tget(this.#version);\n\n\t\tvar sources = this.#sources;\n\t\tif (this.#size.v !== sources.size) {\n\t\t\tfor (var key of super.keys()) {\n\t\t\t\tif (!sources.has(key)) {\n\t\t\t\t\tvar s = this.#source(0);\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t\t}\n\n\t\t\t\t\tsources.set(key, s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ([, s] of this.#sources) {\n\t\t\tget(s);\n\t\t}\n\t}\n\n\tkeys() {\n\t\tget(this.#version);\n\t\treturn super.keys();\n\t}\n\n\tvalues() {\n\t\tthis.#read_all();\n\t\treturn super.values();\n\t}\n\n\tentries() {\n\t\tthis.#read_all();\n\t\treturn super.entries();\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn this.entries();\n\t}\n\n\tget size() {\n\t\tget(this.#size);\n\t\treturn super.size;\n\t}\n}\n", "import { DEV } from 'esm-env';\nimport { state, increment } from '../internal/client/reactivity/sources.js';\nimport { tag } from '../internal/client/dev/tracing.js';\nimport { get } from '../internal/client/runtime.js';\nimport { get_current_url } from './url.js';\n\nexport const REPLACE = Symbol();\n\n/**\n * A reactive version of the built-in [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object.\n * Reading its contents (by iterating, or by calling `params.get(...)` or `params.getAll(...)` as in the [example](https://svelte.dev/playground/b3926c86c5384bab9f2cf993bc08c1c8) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)\n * will cause it to be re-evaluated as necessary when the params are updated.\n *\n * ```svelte\n * <script>\n * \timport { SvelteURLSearchParams } from 'svelte/reactivity';\n *\n * \tconst params = new SvelteURLSearchParams('message=hello');\n *\n * \tlet key = $state('key');\n * \tlet value = $state('value');\n * </script>\n *\n * <input bind:value={key} />\n * <input bind:value={value} />\n * <button onclick={() => params.append(key, value)}>append</button>\n *\n * <p>?{params.toString()}</p>\n *\n * {#each params as [key, value]}\n * \t<p>{key}: {value}</p>\n * {/each}\n * ```\n */\nexport class SvelteURLSearchParams extends URLSearchParams {\n\t#version = DEV ? tag(state(0), 'SvelteURLSearchParams version') : state(0);\n\t#url = get_current_url();\n\n\t#updating = false;\n\n\t#update_url() {\n\t\tif (!this.#url || this.#updating) return;\n\t\tthis.#updating = true;\n\n\t\tconst search = this.toString();\n\t\tthis.#url.search = search && `?${search}`;\n\n\t\tthis.#updating = false;\n\t}\n\n\t/**\n\t * @param {URLSearchParams} params\n\t * @internal\n\t */\n\t[REPLACE](params) {\n\t\tif (this.#updating) return;\n\t\tthis.#updating = true;\n\n\t\tfor (const key of [...super.keys()]) {\n\t\t\tsuper.delete(key);\n\t\t}\n\n\t\tfor (const [key, value] of params) {\n\t\t\tsuper.append(key, value);\n\t\t}\n\n\t\tincrement(this.#version);\n\t\tthis.#updating = false;\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @param {string} value\n\t * @returns {void}\n\t */\n\tappend(name, value) {\n\t\tsuper.append(name, value);\n\t\tthis.#update_url();\n\t\tincrement(this.#version);\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @param {string=} value\n\t * @returns {void}\n\t */\n\tdelete(name, value) {\n\t\tvar has_value = super.has(name, value);\n\t\tsuper.delete(name, value);\n\t\tif (has_value) {\n\t\t\tthis.#update_url();\n\t\t\tincrement(this.#version);\n\t\t}\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @returns {string|null}\n\t */\n\tget(name) {\n\t\tget(this.#version);\n\t\treturn super.get(name);\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @returns {string[]}\n\t */\n\tgetAll(name) {\n\t\tget(this.#version);\n\t\treturn super.getAll(name);\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @param {string=} value\n\t * @returns {boolean}\n\t */\n\thas(name, value) {\n\t\tget(this.#version);\n\t\treturn super.has(name, value);\n\t}\n\n\tkeys() {\n\t\tget(this.#version);\n\t\treturn super.keys();\n\t}\n\n\t/**\n\t * @param {string} name\n\t * @param {string} value\n\t * @returns {void}\n\t */\n\tset(name, value) {\n\t\tvar previous = super.getAll(name).join('');\n\t\tsuper.set(name, value);\n\t\t// can't use has(name, value), because for something like https://svelte.dev?foo=1&bar=2&foo=3\n\t\t// if you set `foo` to 1, then foo=3 gets deleted whilst `has(\"foo\", \"1\")` returns true\n\t\tif (previous !== super.getAll(name).join('')) {\n\t\t\tthis.#update_url();\n\t\t\tincrement(this.#version);\n\t\t}\n\t}\n\n\tsort() {\n\t\tsuper.sort();\n\t\tthis.#update_url();\n\t\tincrement(this.#version);\n\t}\n\n\ttoString() {\n\t\tget(this.#version);\n\t\treturn super.toString();\n\t}\n\n\tvalues() {\n\t\tget(this.#version);\n\t\treturn super.values();\n\t}\n\n\tentries() {\n\t\tget(this.#version);\n\t\treturn super.entries();\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn this.entries();\n\t}\n\n\tget size() {\n\t\tget(this.#version);\n\t\treturn super.size;\n\t}\n}\n", "import { DEV } from 'esm-env';\nimport { set, state } from '../internal/client/reactivity/sources.js';\nimport { tag } from '../internal/client/dev/tracing.js';\nimport { get } from '../internal/client/runtime.js';\nimport { REPLACE, SvelteURLSearchParams } from './url-search-params.js';\n\n/** @type {SvelteURL | null} */\nlet current_url = null;\n\nexport function get_current_url() {\n\t// ideally we'd just export `current_url` directly, but it seems Vitest doesn't respect live bindings\n\treturn current_url;\n}\n\n/**\n * A reactive version of the built-in [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) object.\n * Reading properties of the URL (such as `url.href` or `url.pathname`) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)\n * will cause it to be re-evaluated as necessary when the URL changes.\n *\n * The `searchParams` property is an instance of [SvelteURLSearchParams](https://svelte.dev/docs/svelte/svelte-reactivity#SvelteURLSearchParams).\n *\n * [Example](https://svelte.dev/playground/5a694758901b448c83dc40dc31c71f2a):\n *\n * ```svelte\n * <script>\n * \timport { SvelteURL } from 'svelte/reactivity';\n *\n * \tconst url = new SvelteURL('https://example.com/path');\n * </script>\n *\n * <!-- changes to these... -->\n * <input bind:value={url.protocol} />\n * <input bind:value={url.hostname} />\n * <input bind:value={url.pathname} />\n *\n * <hr />\n *\n * <!-- will update `href` and vice versa -->\n * <input bind:value={url.href} size=\"65\" />\n * ```\n */\nexport class SvelteURL extends URL {\n\t#protocol = state(super.protocol);\n\t#username = state(super.username);\n\t#password = state(super.password);\n\t#hostname = state(super.hostname);\n\t#port = state(super.port);\n\t#pathname = state(super.pathname);\n\t#hash = state(super.hash);\n\t#search = state(super.search);\n\t#searchParams;\n\n\t/**\n\t * @param {string | URL} url\n\t * @param {string | URL} [base]\n\t */\n\tconstructor(url, base) {\n\t\turl = new URL(url, base);\n\t\tsuper(url);\n\n\t\tif (DEV) {\n\t\t\ttag(this.#protocol, 'SvelteURL.protocol');\n\t\t\ttag(this.#username, 'SvelteURL.username');\n\t\t\ttag(this.#password, 'SvelteURL.password');\n\t\t\ttag(this.#hostname, 'SvelteURL.hostname');\n\t\t\ttag(this.#port, 'SvelteURL.port');\n\t\t\ttag(this.#pathname, 'SvelteURL.pathname');\n\t\t\ttag(this.#hash, 'SvelteURL.hash');\n\t\t\ttag(this.#search, 'SvelteURL.search');\n\t\t}\n\n\t\tcurrent_url = this;\n\t\tthis.#searchParams = new SvelteURLSearchParams(url.searchParams);\n\t\tcurrent_url = null;\n\t}\n\n\tget hash() {\n\t\treturn get(this.#hash);\n\t}\n\n\tset hash(value) {\n\t\tsuper.hash = value;\n\t\tset(this.#hash, super.hash);\n\t}\n\n\tget host() {\n\t\tget(this.#hostname);\n\t\tget(this.#port);\n\t\treturn super.host;\n\t}\n\n\tset host(value) {\n\t\tsuper.host = value;\n\t\tset(this.#hostname, super.hostname);\n\t\tset(this.#port, super.port);\n\t}\n\n\tget hostname() {\n\t\treturn get(this.#hostname);\n\t}\n\n\tset hostname(value) {\n\t\tsuper.hostname = value;\n\t\tset(this.#hostname, super.hostname);\n\t}\n\n\tget href() {\n\t\tget(this.#protocol);\n\t\tget(this.#username);\n\t\tget(this.#password);\n\t\tget(this.#hostname);\n\t\tget(this.#port);\n\t\tget(this.#pathname);\n\t\tget(this.#hash);\n\t\tget(this.#search);\n\t\treturn super.href;\n\t}\n\n\tset href(value) {\n\t\tsuper.href = value;\n\t\tset(this.#protocol, super.protocol);\n\t\tset(this.#username, super.username);\n\t\tset(this.#password, super.password);\n\t\tset(this.#hostname, super.hostname);\n\t\tset(this.#port, super.port);\n\t\tset(this.#pathname, super.pathname);\n\t\tset(this.#hash, super.hash);\n\t\tset(this.#search, super.search);\n\t\tthis.#searchParams[REPLACE](super.searchParams);\n\t}\n\n\tget password() {\n\t\treturn get(this.#password);\n\t}\n\n\tset password(value) {\n\t\tsuper.password = value;\n\t\tset(this.#password, super.password);\n\t}\n\n\tget pathname() {\n\t\treturn get(this.#pathname);\n\t}\n\n\tset pathname(value) {\n\t\tsuper.pathname = value;\n\t\tset(this.#pathname, super.pathname);\n\t}\n\n\tget port() {\n\t\treturn get(this.#port);\n\t}\n\n\tset port(value) {\n\t\tsuper.port = value;\n\t\tset(this.#port, super.port);\n\t}\n\n\tget protocol() {\n\t\treturn get(this.#protocol);\n\t}\n\n\tset protocol(value) {\n\t\tsuper.protocol = value;\n\t\tset(this.#protocol, super.protocol);\n\t}\n\n\tget search() {\n\t\treturn get(this.#search);\n\t}\n\n\tset search(value) {\n\t\tsuper.search = value;\n\t\tset(this.#search, super.search);\n\t\tthis.#searchParams[REPLACE](super.searchParams);\n\t}\n\n\tget username() {\n\t\treturn get(this.#username);\n\t}\n\n\tset username(value) {\n\t\tsuper.username = value;\n\t\tset(this.#username, super.username);\n\t}\n\n\tget origin() {\n\t\tget(this.#protocol);\n\t\tget(this.#hostname);\n\t\tget(this.#port);\n\t\treturn super.origin;\n\t}\n\n\tget searchParams() {\n\t\treturn this.#searchParams;\n\t}\n\n\ttoString() {\n\t\treturn this.href;\n\t}\n\n\ttoJSON() {\n\t\treturn this.href;\n\t}\n}\n", "import { on } from '../events/index.js';\nimport { ReactiveValue } from './reactive-value.js';\n\nconst parenthesis_regex = /\\(.+\\)/;\n\n// these keywords are valid media queries but they need to be without parenthesis\n//\n// eg: new MediaQuery('screen')\n//\n// however because of the auto-parenthesis logic in the constructor since there's no parenthesis\n// in the media query they'll be surrounded by parenthesis\n//\n// however we can check if the media query is only composed of these keywords\n// and skip the auto-parenthesis\n//\n// https://github.com/sveltejs/svelte/issues/15930\nconst non_parenthesized_keywords = new Set(['all', 'print', 'screen', 'and', 'or', 'not', 'only']);\n\n/**\n * Creates a media query and provides a `current` property that reflects whether or not it matches.\n *\n * Use it carefully — during server-side rendering, there is no way to know what the correct value should be, potentially causing content to change upon hydration.\n * If you can use the media query in CSS to achieve the same effect, do that.\n *\n * ```svelte\n * <script>\n * \timport { MediaQuery } from 'svelte/reactivity';\n *\n * \tconst large = new MediaQuery('min-width: 800px');\n * </script>\n *\n * <h1>{large.current ? 'large screen' : 'small screen'}</h1>\n * ```\n * @extends {ReactiveValue<boolean>}\n * @since 5.7.0\n */\nexport class MediaQuery extends ReactiveValue {\n\t/**\n\t * @param {string} query A media query string\n\t * @param {boolean} [fallback] Fallback value for the server\n\t */\n\tconstructor(query, fallback) {\n\t\tlet final_query =\n\t\t\tparenthesis_regex.test(query) ||\n\t\t\t// we need to use `some` here because technically this `window.matchMedia('random,screen')` still returns true\n\t\t\tquery.split(/[\\s,]+/).some((keyword) => non_parenthesized_keywords.has(keyword.trim()))\n\t\t\t\t? query\n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SAAS;AAClB,QAAI,KAAK,SAAS;AAClB,QAAI,KAAK,KAAK;AACd,WAAO,MAAM;AAAA,EACd;AAAA,EAEA,IAAI,eAAe;AAClB,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,WAAW;AACV,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,SAAS;AACR,WAAO,KAAK;AAAA,EACb;AACD;;;ACzMA,IAAM,oBAAoB;AAa1B,IAAM,6BAA6B,oBAAI,IAAI,CAAC,OAAO,SAAS,UAAU,OAAO,MAAM,OAAO,MAAM,CAAC;AAoB1F,IAAM,aAAN,cAAyB,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAK7C,YAAY,OAAO,UAAU;AAC5B,QAAI,cACH,kBAAkB,KAAK,KAAK;AAAA,IAE5B,MAAM,MAAM,QAAQ,EAAE,KAAK,CAAC,YAAY,2BAA2B,IAAI,QAAQ,KAAK,CAAC,CAAC,IACnF,QACA,IAAI,KAAK;AACb,UAAM,IAAI,OAAO,WAAW,WAAW;AACvC;AAAA,MACC,MAAM,EAAE;AAAA,MACR,CAAC,WAAW,GAAG,GAAG,UAAU,MAAM;AAAA,IACnC;AAAA,EACD;AACD;", 6 - "names": ["inited", "set"] 7 - }
-223
node_modules/.vite/deps/chunk-GSVKEBRT.js
··· 1 - // node_modules/esm-env/true.js 2 - var true_default = true; 3 - 4 - // node_modules/svelte/src/internal/client/warnings.js 5 - var bold = "font-weight: bold"; 6 - var normal = "font-weight: normal"; 7 - function assignment_value_stale(property, location) { 8 - if (true_default) { 9 - console.warn(`%c[svelte] assignment_value_stale 10 - %cAssignment to \`${property}\` property (${location}) will evaluate to the right-hand side, not the value of \`${property}\` following the assignment. This may result in unexpected behaviour. 11 - https://svelte.dev/e/assignment_value_stale`, bold, normal); 12 - } else { 13 - console.warn(`https://svelte.dev/e/assignment_value_stale`); 14 - } 15 - } 16 - function await_reactivity_loss(name) { 17 - if (true_default) { 18 - console.warn(`%c[svelte] await_reactivity_loss 19 - %cDetected reactivity loss when reading \`${name}\`. This happens when state is read in an async function after an earlier \`await\` 20 - https://svelte.dev/e/await_reactivity_loss`, bold, normal); 21 - } else { 22 - console.warn(`https://svelte.dev/e/await_reactivity_loss`); 23 - } 24 - } 25 - function await_waterfall(name, location) { 26 - if (true_default) { 27 - console.warn(`%c[svelte] await_waterfall 28 - %cAn async derived, \`${name}\` (${location}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app 29 - https://svelte.dev/e/await_waterfall`, bold, normal); 30 - } else { 31 - console.warn(`https://svelte.dev/e/await_waterfall`); 32 - } 33 - } 34 - function binding_property_non_reactive(binding, location) { 35 - if (true_default) { 36 - console.warn( 37 - `%c[svelte] binding_property_non_reactive 38 - %c${location ? `\`${binding}\` (${location}) is binding to a non-reactive property` : `\`${binding}\` is binding to a non-reactive property`} 39 - https://svelte.dev/e/binding_property_non_reactive`, 40 - bold, 41 - normal 42 - ); 43 - } else { 44 - console.warn(`https://svelte.dev/e/binding_property_non_reactive`); 45 - } 46 - } 47 - function console_log_state(method) { 48 - if (true_default) { 49 - console.warn(`%c[svelte] console_log_state 50 - %cYour \`console.${method}\` contained \`$state\` proxies. Consider using \`$inspect(...)\` or \`$state.snapshot(...)\` instead 51 - https://svelte.dev/e/console_log_state`, bold, normal); 52 - } else { 53 - console.warn(`https://svelte.dev/e/console_log_state`); 54 - } 55 - } 56 - function event_handler_invalid(handler, suggestion) { 57 - if (true_default) { 58 - console.warn(`%c[svelte] event_handler_invalid 59 - %c${handler} should be a function. Did you mean to ${suggestion}? 60 - https://svelte.dev/e/event_handler_invalid`, bold, normal); 61 - } else { 62 - console.warn(`https://svelte.dev/e/event_handler_invalid`); 63 - } 64 - } 65 - function hydratable_missing_but_expected(key) { 66 - if (true_default) { 67 - console.warn(`%c[svelte] hydratable_missing_but_expected 68 - %cExpected to find a hydratable with key \`${key}\` during hydration, but did not. 69 - https://svelte.dev/e/hydratable_missing_but_expected`, bold, normal); 70 - } else { 71 - console.warn(`https://svelte.dev/e/hydratable_missing_but_expected`); 72 - } 73 - } 74 - function hydration_attribute_changed(attribute, html, value) { 75 - if (true_default) { 76 - console.warn(`%c[svelte] hydration_attribute_changed 77 - %cThe \`${attribute}\` attribute on \`${html}\` changed its value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value 78 - https://svelte.dev/e/hydration_attribute_changed`, bold, normal); 79 - } else { 80 - console.warn(`https://svelte.dev/e/hydration_attribute_changed`); 81 - } 82 - } 83 - function hydration_html_changed(location) { 84 - if (true_default) { 85 - console.warn( 86 - `%c[svelte] hydration_html_changed 87 - %c${location ? `The value of an \`{@html ...}\` block ${location} changed between server and client renders. The client value will be ignored in favour of the server value` : "The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"} 88 - https://svelte.dev/e/hydration_html_changed`, 89 - bold, 90 - normal 91 - ); 92 - } else { 93 - console.warn(`https://svelte.dev/e/hydration_html_changed`); 94 - } 95 - } 96 - function hydration_mismatch(location) { 97 - if (true_default) { 98 - console.warn( 99 - `%c[svelte] hydration_mismatch 100 - %c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : "Hydration failed because the initial UI does not match what was rendered on the server"} 101 - https://svelte.dev/e/hydration_mismatch`, 102 - bold, 103 - normal 104 - ); 105 - } else { 106 - console.warn(`https://svelte.dev/e/hydration_mismatch`); 107 - } 108 - } 109 - function invalid_raw_snippet_render() { 110 - if (true_default) { 111 - console.warn(`%c[svelte] invalid_raw_snippet_render 112 - %cThe \`render\` function passed to \`createRawSnippet\` should return HTML for a single element 113 - https://svelte.dev/e/invalid_raw_snippet_render`, bold, normal); 114 - } else { 115 - console.warn(`https://svelte.dev/e/invalid_raw_snippet_render`); 116 - } 117 - } 118 - function legacy_recursive_reactive_block(filename) { 119 - if (true_default) { 120 - console.warn(`%c[svelte] legacy_recursive_reactive_block 121 - %cDetected a migrated \`$:\` reactive block in \`${filename}\` that both accesses and updates the same reactive value. This may cause recursive updates when converted to an \`$effect\`. 122 - https://svelte.dev/e/legacy_recursive_reactive_block`, bold, normal); 123 - } else { 124 - console.warn(`https://svelte.dev/e/legacy_recursive_reactive_block`); 125 - } 126 - } 127 - function lifecycle_double_unmount() { 128 - if (true_default) { 129 - console.warn(`%c[svelte] lifecycle_double_unmount 130 - %cTried to unmount a component that was not mounted 131 - https://svelte.dev/e/lifecycle_double_unmount`, bold, normal); 132 - } else { 133 - console.warn(`https://svelte.dev/e/lifecycle_double_unmount`); 134 - } 135 - } 136 - function ownership_invalid_binding(parent, prop, child, owner) { 137 - if (true_default) { 138 - console.warn(`%c[svelte] ownership_invalid_binding 139 - %c${parent} passed property \`${prop}\` to ${child} with \`bind:\`, but its parent component ${owner} did not declare \`${prop}\` as a binding. Consider creating a binding between ${owner} and ${parent} (e.g. \`bind:${prop}={...}\` instead of \`${prop}={...}\`) 140 - https://svelte.dev/e/ownership_invalid_binding`, bold, normal); 141 - } else { 142 - console.warn(`https://svelte.dev/e/ownership_invalid_binding`); 143 - } 144 - } 145 - function ownership_invalid_mutation(name, location, prop, parent) { 146 - if (true_default) { 147 - console.warn(`%c[svelte] ownership_invalid_mutation 148 - %cMutating unbound props (\`${name}\`, at ${location}) is strongly discouraged. Consider using \`bind:${prop}={...}\` in ${parent} (or using a callback) instead 149 - https://svelte.dev/e/ownership_invalid_mutation`, bold, normal); 150 - } else { 151 - console.warn(`https://svelte.dev/e/ownership_invalid_mutation`); 152 - } 153 - } 154 - function select_multiple_invalid_value() { 155 - if (true_default) { 156 - console.warn(`%c[svelte] select_multiple_invalid_value 157 - %cThe \`value\` property of a \`<select multiple>\` element should be an array, but it received a non-array value. The selection will be kept as is. 158 - https://svelte.dev/e/select_multiple_invalid_value`, bold, normal); 159 - } else { 160 - console.warn(`https://svelte.dev/e/select_multiple_invalid_value`); 161 - } 162 - } 163 - function state_proxy_equality_mismatch(operator) { 164 - if (true_default) { 165 - console.warn(`%c[svelte] state_proxy_equality_mismatch 166 - %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${operator}\` will produce unexpected results 167 - https://svelte.dev/e/state_proxy_equality_mismatch`, bold, normal); 168 - } else { 169 - console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`); 170 - } 171 - } 172 - function state_proxy_unmount() { 173 - if (true_default) { 174 - console.warn(`%c[svelte] state_proxy_unmount 175 - %cTried to unmount a state proxy, rather than a component 176 - https://svelte.dev/e/state_proxy_unmount`, bold, normal); 177 - } else { 178 - console.warn(`https://svelte.dev/e/state_proxy_unmount`); 179 - } 180 - } 181 - function svelte_boundary_reset_noop() { 182 - if (true_default) { 183 - console.warn(`%c[svelte] svelte_boundary_reset_noop 184 - %cA \`<svelte:boundary>\` \`reset\` function only resets the boundary the first time it is called 185 - https://svelte.dev/e/svelte_boundary_reset_noop`, bold, normal); 186 - } else { 187 - console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`); 188 - } 189 - } 190 - function transition_slide_display(value) { 191 - if (true_default) { 192 - console.warn(`%c[svelte] transition_slide_display 193 - %cThe \`slide\` transition does not work correctly for elements with \`display: ${value}\` 194 - https://svelte.dev/e/transition_slide_display`, bold, normal); 195 - } else { 196 - console.warn(`https://svelte.dev/e/transition_slide_display`); 197 - } 198 - } 199 - 200 - export { 201 - true_default, 202 - assignment_value_stale, 203 - await_reactivity_loss, 204 - await_waterfall, 205 - binding_property_non_reactive, 206 - console_log_state, 207 - event_handler_invalid, 208 - hydratable_missing_but_expected, 209 - hydration_attribute_changed, 210 - hydration_html_changed, 211 - hydration_mismatch, 212 - invalid_raw_snippet_render, 213 - legacy_recursive_reactive_block, 214 - lifecycle_double_unmount, 215 - ownership_invalid_binding, 216 - ownership_invalid_mutation, 217 - select_multiple_invalid_value, 218 - state_proxy_equality_mismatch, 219 - state_proxy_unmount, 220 - svelte_boundary_reset_noop, 221 - transition_slide_display 222 - }; 223 - //# sourceMappingURL=chunk-GSVKEBRT.js.map
-7
node_modules/.vite/deps/chunk-GSVKEBRT.js.map
··· 1 - { 2 - "version": 3, 3 - "sources": ["../../esm-env/true.js", "../../svelte/src/internal/client/warnings.js"], 4 - "sourcesContent": ["export default true;\n", "/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\nvar bold = 'font-weight: bold';\nvar normal = 'font-weight: normal';\n\n/**\n * Assignment to `%property%` property (%location%) will evaluate to the right-hand side, not the value of `%property%` following the assignment. This may result in unexpected behaviour.\n * @param {string} property\n * @param {string} location\n */\nexport function assignment_value_stale(property, location) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] assignment_value_stale\\n%cAssignment to \\`${property}\\` property (${location}) will evaluate to the right-hand side, not the value of \\`${property}\\` following the assignment. This may result in unexpected behaviour.\\nhttps://svelte.dev/e/assignment_value_stale`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/assignment_value_stale`);\n\t}\n}\n\n/**\n * Detected reactivity loss when reading `%name%`. This happens when state is read in an async function after an earlier `await`\n * @param {string} name\n */\nexport function await_reactivity_loss(name) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] await_reactivity_loss\\n%cDetected reactivity loss when reading \\`${name}\\`. This happens when state is read in an async function after an earlier \\`await\\`\\nhttps://svelte.dev/e/await_reactivity_loss`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/await_reactivity_loss`);\n\t}\n}\n\n/**\n * An async derived, `%name%` (%location%) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app\n * @param {string} name\n * @param {string} location\n */\nexport function await_waterfall(name, location) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] await_waterfall\\n%cAn async derived, \\`${name}\\` (${location}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app\\nhttps://svelte.dev/e/await_waterfall`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/await_waterfall`);\n\t}\n}\n\n/**\n * `%binding%` (%location%) is binding to a non-reactive property\n * @param {string} binding\n * @param {string | undefined | null} [location]\n */\nexport function binding_property_non_reactive(binding, location) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[svelte] binding_property_non_reactive\\n%c${location\n\t\t\t\t? `\\`${binding}\\` (${location}) is binding to a non-reactive property`\n\t\t\t\t: `\\`${binding}\\` is binding to a non-reactive property`}\\nhttps://svelte.dev/e/binding_property_non_reactive`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/binding_property_non_reactive`);\n\t}\n}\n\n/**\n * Your `console.%method%` contained `$state` proxies. Consider using `$inspect(...)` or `$state.snapshot(...)` instead\n * @param {string} method\n */\nexport function console_log_state(method) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] console_log_state\\n%cYour \\`console.${method}\\` contained \\`$state\\` proxies. Consider using \\`$inspect(...)\\` or \\`$state.snapshot(...)\\` instead\\nhttps://svelte.dev/e/console_log_state`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/console_log_state`);\n\t}\n}\n\n/**\n * %handler% should be a function. Did you mean to %suggestion%?\n * @param {string} handler\n * @param {string} suggestion\n */\nexport function event_handler_invalid(handler, suggestion) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] event_handler_invalid\\n%c${handler} should be a function. Did you mean to ${suggestion}?\\nhttps://svelte.dev/e/event_handler_invalid`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/event_handler_invalid`);\n\t}\n}\n\n/**\n * Expected to find a hydratable with key `%key%` during hydration, but did not.\n * @param {string} key\n */\nexport function hydratable_missing_but_expected(key) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] hydratable_missing_but_expected\\n%cExpected to find a hydratable with key \\`${key}\\` during hydration, but did not.\\nhttps://svelte.dev/e/hydratable_missing_but_expected`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/hydratable_missing_but_expected`);\n\t}\n}\n\n/**\n * The `%attribute%` attribute on `%html%` changed its value between server and client renders. The client value, `%value%`, will be ignored in favour of the server value\n * @param {string} attribute\n * @param {string} html\n * @param {string} value\n */\nexport function hydration_attribute_changed(attribute, html, value) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] hydration_attribute_changed\\n%cThe \\`${attribute}\\` attribute on \\`${html}\\` changed its value between server and client renders. The client value, \\`${value}\\`, will be ignored in favour of the server value\\nhttps://svelte.dev/e/hydration_attribute_changed`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/hydration_attribute_changed`);\n\t}\n}\n\n/**\n * The value of an `{@html ...}` block %location% changed between server and client renders. The client value will be ignored in favour of the server value\n * @param {string | undefined | null} [location]\n */\nexport function hydration_html_changed(location) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[svelte] hydration_html_changed\\n%c${location\n\t\t\t\t? `The value of an \\`{@html ...}\\` block ${location} changed between server and client renders. The client value will be ignored in favour of the server value`\n\t\t\t\t: 'The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value'}\\nhttps://svelte.dev/e/hydration_html_changed`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/hydration_html_changed`);\n\t}\n}\n\n/**\n * Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%\n * @param {string | undefined | null} [location]\n */\nexport function hydration_mismatch(location) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[svelte] hydration_mismatch\\n%c${location\n\t\t\t\t? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}`\n\t\t\t\t: 'Hydration failed because the initial UI does not match what was rendered on the server'}\\nhttps://svelte.dev/e/hydration_mismatch`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/hydration_mismatch`);\n\t}\n}\n\n/**\n * The `render` function passed to `createRawSnippet` should return HTML for a single element\n */\nexport function invalid_raw_snippet_render() {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] invalid_raw_snippet_render\\n%cThe \\`render\\` function passed to \\`createRawSnippet\\` should return HTML for a single element\\nhttps://svelte.dev/e/invalid_raw_snippet_render`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/invalid_raw_snippet_render`);\n\t}\n}\n\n/**\n * Detected a migrated `$:` reactive block in `%filename%` that both accesses and updates the same reactive value. This may cause recursive updates when converted to an `$effect`.\n * @param {string} filename\n */\nexport function legacy_recursive_reactive_block(filename) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] legacy_recursive_reactive_block\\n%cDetected a migrated \\`$:\\` reactive block in \\`${filename}\\` that both accesses and updates the same reactive value. This may cause recursive updates when converted to an \\`$effect\\`.\\nhttps://svelte.dev/e/legacy_recursive_reactive_block`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/legacy_recursive_reactive_block`);\n\t}\n}\n\n/**\n * Tried to unmount a component that was not mounted\n */\nexport function lifecycle_double_unmount() {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] lifecycle_double_unmount\\n%cTried to unmount a component that was not mounted\\nhttps://svelte.dev/e/lifecycle_double_unmount`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/lifecycle_double_unmount`);\n\t}\n}\n\n/**\n * %parent% passed property `%prop%` to %child% with `bind:`, but its parent component %owner% did not declare `%prop%` as a binding. Consider creating a binding between %owner% and %parent% (e.g. `bind:%prop%={...}` instead of `%prop%={...}`)\n * @param {string} parent\n * @param {string} prop\n * @param {string} child\n * @param {string} owner\n */\nexport function ownership_invalid_binding(parent, prop, child, owner) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] ownership_invalid_binding\\n%c${parent} passed property \\`${prop}\\` to ${child} with \\`bind:\\`, but its parent component ${owner} did not declare \\`${prop}\\` as a binding. Consider creating a binding between ${owner} and ${parent} (e.g. \\`bind:${prop}={...}\\` instead of \\`${prop}={...}\\`)\\nhttps://svelte.dev/e/ownership_invalid_binding`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/ownership_invalid_binding`);\n\t}\n}\n\n/**\n * Mutating unbound props (`%name%`, at %location%) is strongly discouraged. Consider using `bind:%prop%={...}` in %parent% (or using a callback) instead\n * @param {string} name\n * @param {string} location\n * @param {string} prop\n * @param {string} parent\n */\nexport function ownership_invalid_mutation(name, location, prop, parent) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] ownership_invalid_mutation\\n%cMutating unbound props (\\`${name}\\`, at ${location}) is strongly discouraged. Consider using \\`bind:${prop}={...}\\` in ${parent} (or using a callback) instead\\nhttps://svelte.dev/e/ownership_invalid_mutation`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/ownership_invalid_mutation`);\n\t}\n}\n\n/**\n * The `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\n */\nexport function select_multiple_invalid_value() {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] select_multiple_invalid_value\\n%cThe \\`value\\` property of a \\`<select multiple>\\` element should be an array, but it received a non-array value. The selection will be kept as is.\\nhttps://svelte.dev/e/select_multiple_invalid_value`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/select_multiple_invalid_value`);\n\t}\n}\n\n/**\n * Reactive `$state(...)` proxies and the values they proxy have different identities. Because of this, comparisons with `%operator%` will produce unexpected results\n * @param {string} operator\n */\nexport function state_proxy_equality_mismatch(operator) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] state_proxy_equality_mismatch\\n%cReactive \\`$state(...)\\` proxies and the values they proxy have different identities. Because of this, comparisons with \\`${operator}\\` will produce unexpected results\\nhttps://svelte.dev/e/state_proxy_equality_mismatch`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`);\n\t}\n}\n\n/**\n * Tried to unmount a state proxy, rather than a component\n */\nexport function state_proxy_unmount() {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] state_proxy_unmount\\n%cTried to unmount a state proxy, rather than a component\\nhttps://svelte.dev/e/state_proxy_unmount`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/state_proxy_unmount`);\n\t}\n}\n\n/**\n * A `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\n */\nexport function svelte_boundary_reset_noop() {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] svelte_boundary_reset_noop\\n%cA \\`<svelte:boundary>\\` \\`reset\\` function only resets the boundary the first time it is called\\nhttps://svelte.dev/e/svelte_boundary_reset_noop`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);\n\t}\n}\n\n/**\n * The `slide` transition does not work correctly for elements with `display: %value%`\n * @param {string} value\n */\nexport function transition_slide_display(value) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] transition_slide_display\\n%cThe \\`slide\\` transition does not work correctly for elements with \\`display: ${value}\\`\\nhttps://svelte.dev/e/transition_slide_display`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/transition_slide_display`);\n\t}\n}"], 5 - "mappings": ";AAAA,IAAO,eAAQ;;;ACIf,IAAI,OAAO;AACX,IAAI,SAAS;AAON,SAAS,uBAAuB,UAAU,UAAU;AAC1D,MAAI,cAAK;AACR,YAAQ,KAAK;AAAA,oBAAwD,QAAQ,gBAAgB,QAAQ,8DAA8D,QAAQ;AAAA,8CAAsH,MAAM,MAAM;AAAA,EAC9S,OAAO;AACN,YAAQ,KAAK,6CAA6C;AAAA,EAC3D;AACD;AAMO,SAAS,sBAAsB,MAAM;AAC3C,MAAI,cAAK;AACR,YAAQ,KAAK;AAAA,4CAA+E,IAAI;AAAA,6CAAmI,MAAM,MAAM;AAAA,EAChP,OAAO;AACN,YAAQ,KAAK,4CAA4C;AAAA,EAC1D;AACD;AAOO,SAAS,gBAAgB,MAAM,UAAU;AAC/C,MAAI,cAAK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,QAAQ,oDAAoD,IAAI,eAAe,MAAM;AAAA,kDAAmF,MAAM,MAAM;AAAA,EACtR,OAAO;AACN,YAAQ,KAAK,iDAAiD;AAAA,EAC/D;AACD;AAKO,SAAS,gCAAgC;AAC/C,MAAI,cAAK;AACR,YAAQ,KAAK;AAAA;AAAA,qDAAsP,MAAM,MAAM;AAAA,EAChR,OAAO;AACN,YAAQ,KAAK,oDAAoD;AAAA,EAClE;AACD;AAMO,SAAS,8BAA8B,UAAU;AACvD,MAAI,cAAK;AACR,YAAQ,KAAK;AAAA,8HAAyK,QAAQ;AAAA,qDAA0F,MAAM,MAAM;AAAA,EACrS,OAAO;AACN,YAAQ,KAAK,oDAAoD;AAAA,EAClE;AACD;AAKO,SAAS,sBAAsB;AACrC,MAAI,cAAK;AACR,YAAQ,KAAK;AAAA;AAAA,2CAAuI,MAAM,MAAM;AAAA,EACjK,OAAO;AACN,YAAQ,KAAK,0CAA0C;AAAA,EACxD;AACD;AAKO,SAAS,6BAA6B;AAC5C,MAAI,cAAK;AACR,YAAQ,KAAK;AAAA;AAAA,kDAA6L,MAAM,MAAM;AAAA,EACvN,OAAO;AACN,YAAQ,KAAK,iDAAiD;AAAA,EAC/D;AACD;AAMO,SAAS,yBAAyB,OAAO;AAC/C,MAAI,cAAK;AACR,YAAQ,KAAK;AAAA,kFAAwH,KAAK;AAAA,gDAAqD,MAAM,MAAM;AAAA,EAC5M,OAAO;AACN,YAAQ,KAAK,+CAA+C;AAAA,EAC7D;AACD;", 6 - "names": [] 7 - }
-4369
node_modules/.vite/deps/chunk-LYAULJVB.js
··· 1 - import { 2 - clsx 3 - } from "./chunk-U7P2NEEE.js"; 4 - import { 5 - append, 6 - assign_nodes, 7 - can_delegate_event, 8 - createClassComponent, 9 - create_fragment_from_html, 10 - create_trusted_html, 11 - hash, 12 - is_capture_event, 13 - is_raw_text_element, 14 - is_void, 15 - normalize_attribute, 16 - sanitize_location, 17 - set_should_intro, 18 - should_intro 19 - } from "./chunk-YT4LSJJ5.js"; 20 - import { 21 - create_event, 22 - delegate, 23 - delegated 24 - } from "./chunk-DSSJOGTL.js"; 25 - import { 26 - ATTACHMENT_KEY, 27 - BLOCK_EFFECT, 28 - BRANCH_EFFECT, 29 - Batch, 30 - COMMENT_NODE, 31 - DESTROYED, 32 - DESTROYING, 33 - DOCUMENT_FRAGMENT_NODE, 34 - EACH_INDEX_REACTIVE, 35 - EACH_IS_ANIMATED, 36 - EACH_IS_CONTROLLED, 37 - EACH_ITEM_IMMUTABLE, 38 - EACH_ITEM_REACTIVE, 39 - EFFECT_OFFSCREEN, 40 - EFFECT_PRESERVED, 41 - EFFECT_TRANSPARENT, 42 - ELEMENT_NODE, 43 - FILENAME, 44 - HEAD_EFFECT, 45 - HMR, 46 - HYDRATION_END, 47 - HYDRATION_ERROR, 48 - HYDRATION_START, 49 - HYDRATION_START_ELSE, 50 - INERT, 51 - IS_XHTML, 52 - LEGACY_PROPS, 53 - LOADING_ATTR_SYMBOL, 54 - NAMESPACE_HTML, 55 - NAMESPACE_MATHML, 56 - NAMESPACE_SVG, 57 - PROPS_IS_BINDABLE, 58 - PROPS_IS_IMMUTABLE, 59 - PROPS_IS_LAZY_INITIAL, 60 - PROPS_IS_RUNES, 61 - PROPS_IS_UPDATED, 62 - REACTION_RAN, 63 - STATE_SYMBOL, 64 - TRANSITION_GLOBAL, 65 - TRANSITION_IN, 66 - TRANSITION_OUT, 67 - UNINITIALIZED, 68 - active_effect, 69 - active_reaction, 70 - add_form_reset_listener, 71 - array_from, 72 - autofocus, 73 - bind_invalid_checkbox_value, 74 - block, 75 - branch, 76 - capture, 77 - capture_store_binding, 78 - clear_text_content, 79 - component_api_changed, 80 - component_api_invalid_new, 81 - component_context, 82 - create_comment, 83 - create_element, 84 - create_text, 85 - current_batch, 86 - deep_read_state, 87 - define_property, 88 - derived2 as derived, 89 - derived_safe_equal, 90 - destroy_effect, 91 - dev_current_component_function, 92 - dev_stack, 93 - dynamic_void_element_content, 94 - each_key_duplicate, 95 - each_key_volatile, 96 - eager_effect, 97 - effect, 98 - effect_root, 99 - experimental_async_required, 100 - flatten, 101 - flushSync, 102 - get2 as get, 103 - get_abort_signal_outside_reaction, 104 - get_descriptor, 105 - get_descriptors, 106 - get_error, 107 - get_first_child, 108 - get_next_sibling, 109 - get_prototype_of, 110 - has_own_property, 111 - hydratable_missing_but_required, 112 - hydrate_next, 113 - hydrate_node, 114 - hydrating, 115 - increment_pending, 116 - internal_set, 117 - invalid_snippet, 118 - invalid_snippet_arguments, 119 - is, 120 - is_array, 121 - is_destroying_effect, 122 - is_flushing_sync, 123 - is_function, 124 - is_promise, 125 - is_runes, 126 - lifecycle_legacy_only, 127 - lifecycle_outside_component, 128 - listen, 129 - listen_to_event_and_reset_event, 130 - managed, 131 - move_effect, 132 - mutable_source, 133 - noop, 134 - object_keys, 135 - pause_effect, 136 - previous_batch, 137 - props_invalid_value, 138 - props_rest_readonly, 139 - proxy, 140 - queue_micro_task, 141 - read_hydration_instruction, 142 - remove_effect_dom, 143 - render_effect, 144 - reset, 145 - resume_effect, 146 - run, 147 - run_after_blockers, 148 - run_all, 149 - rune_outside_svelte, 150 - safe_not_equal, 151 - set, 152 - set_active_effect, 153 - set_active_reaction, 154 - set_dev_current_component_function, 155 - set_hydrate_node, 156 - set_hydrating, 157 - should_defer_append, 158 - skip_nodes, 159 - snapshot, 160 - snippet_without_render_tag, 161 - source, 162 - store_invalid_shape, 163 - svelte_element_invalid_this_value, 164 - teardown, 165 - template_effect, 166 - tick, 167 - unset_context, 168 - untrack, 169 - update, 170 - user_effect, 171 - user_pre_effect, 172 - validate_effect, 173 - without_reactive_context 174 - } from "./chunk-TY5SIVJK.js"; 175 - import { 176 - assignment_value_stale, 177 - binding_property_non_reactive, 178 - console_log_state, 179 - hydratable_missing_but_expected, 180 - hydration_attribute_changed, 181 - hydration_html_changed, 182 - hydration_mismatch, 183 - invalid_raw_snippet_render, 184 - ownership_invalid_binding, 185 - ownership_invalid_mutation, 186 - select_multiple_invalid_value, 187 - true_default 188 - } from "./chunk-GSVKEBRT.js"; 189 - import { 190 - async_mode_flag, 191 - legacy_mode_flag 192 - } from "./chunk-OHYQYV5R.js"; 193 - 194 - // node_modules/svelte/src/internal/client/dev/assign.js 195 - function compare(a, b, property, location) { 196 - if (a !== b && typeof b === "object" && STATE_SYMBOL in b) { 197 - assignment_value_stale( 198 - property, 199 - /** @type {string} */ 200 - sanitize_location(location) 201 - ); 202 - } 203 - return a; 204 - } 205 - function assign(object, property, operator, rhs, location) { 206 - return compare( 207 - operator === "=" ? object[property] = rhs : operator === "&&=" ? object[property] &&= rhs() : operator === "||=" ? object[property] ||= rhs() : operator === "??=" ? object[property] ??= rhs() : null, 208 - untrack(() => object[property]), 209 - property, 210 - location 211 - ); 212 - } 213 - async function assign_async(object, property, operator, rhs, location) { 214 - return compare( 215 - operator === "=" ? object[property] = await rhs : operator === "&&=" ? object[property] &&= await rhs() : operator === "||=" ? object[property] ||= await rhs() : operator === "??=" ? object[property] ??= await rhs() : null, 216 - untrack(() => object[property]), 217 - property, 218 - location 219 - ); 220 - } 221 - 222 - // node_modules/svelte/src/internal/client/dev/css.js 223 - var all_styles = /* @__PURE__ */ new Map(); 224 - function register_style(hash2, style) { 225 - var styles = all_styles.get(hash2); 226 - if (!styles) { 227 - styles = /* @__PURE__ */ new Set(); 228 - all_styles.set(hash2, styles); 229 - } 230 - styles.add(style); 231 - } 232 - function cleanup_styles(hash2) { 233 - var styles = all_styles.get(hash2); 234 - if (!styles) return; 235 - for (const style of styles) { 236 - style.remove(); 237 - } 238 - all_styles.delete(hash2); 239 - } 240 - 241 - // node_modules/svelte/src/internal/client/dev/elements.js 242 - function add_locations(fn, filename, locations) { 243 - return (...args) => { 244 - const dom = fn(...args); 245 - var node = hydrating ? dom : dom.nodeType === DOCUMENT_FRAGMENT_NODE ? dom.firstChild : dom; 246 - assign_locations(node, filename, locations); 247 - return dom; 248 - }; 249 - } 250 - function assign_location(element2, filename, location) { 251 - element2.__svelte_meta = { 252 - parent: dev_stack, 253 - loc: { file: filename, line: location[0], column: location[1] } 254 - }; 255 - if (location[2]) { 256 - assign_locations(element2.firstChild, filename, location[2]); 257 - } 258 - } 259 - function assign_locations(node, filename, locations) { 260 - var i = 0; 261 - var depth = 0; 262 - while (node && i < locations.length) { 263 - if (hydrating && node.nodeType === COMMENT_NODE) { 264 - var comment2 = ( 265 - /** @type {Comment} */ 266 - node 267 - ); 268 - if (comment2.data[0] === HYDRATION_START) depth += 1; 269 - else if (comment2.data[0] === HYDRATION_END) depth -= 1; 270 - } 271 - if (depth === 0 && node.nodeType === ELEMENT_NODE) { 272 - assign_location( 273 - /** @type {Element} */ 274 - node, 275 - filename, 276 - locations[i++] 277 - ); 278 - } 279 - node = node.nextSibling; 280 - } 281 - } 282 - 283 - // node_modules/svelte/src/internal/client/dev/hmr.js 284 - function hmr(fn) { 285 - const current = source(fn); 286 - function wrapper(anchor, props) { 287 - let component2 = {}; 288 - let instance = {}; 289 - let effect2; 290 - let ran = false; 291 - block(() => { 292 - if (component2 === (component2 = get(current))) { 293 - return; 294 - } 295 - if (effect2) { 296 - for (var k in instance) delete instance[k]; 297 - destroy_effect(effect2); 298 - } 299 - effect2 = branch(() => { 300 - if (ran) set_should_intro(false); 301 - var result = ( 302 - // @ts-expect-error 303 - new.target ? new component2(anchor, props) : component2(anchor, props) 304 - ); 305 - if (result) { 306 - Object.defineProperties(instance, Object.getOwnPropertyDescriptors(result)); 307 - } 308 - if (ran) set_should_intro(true); 309 - }); 310 - active_effect.nodes = effect2.nodes; 311 - }, EFFECT_TRANSPARENT); 312 - ran = true; 313 - if (hydrating) { 314 - anchor = hydrate_node; 315 - } 316 - return instance; 317 - } 318 - wrapper[FILENAME] = fn[FILENAME]; 319 - wrapper[HMR] = { 320 - fn, 321 - current, 322 - update: (incoming) => { 323 - set(wrapper[HMR].current, incoming[HMR].fn); 324 - incoming[HMR].current = wrapper[HMR].current; 325 - } 326 - }; 327 - return wrapper; 328 - } 329 - 330 - // node_modules/svelte/src/internal/client/dev/ownership.js 331 - function create_ownership_validator(props) { 332 - const component2 = component_context?.function; 333 - const parent = component_context?.p?.function; 334 - return { 335 - /** 336 - * @param {string} prop 337 - * @param {any[]} path 338 - * @param {any} result 339 - * @param {number} line 340 - * @param {number} column 341 - */ 342 - mutation: (prop2, path, result, line, column) => { 343 - const name = path[0]; 344 - if (is_bound_or_unset(props, name) || !parent) { 345 - return result; 346 - } 347 - let value = props; 348 - for (let i = 0; i < path.length - 1; i++) { 349 - value = value[path[i]]; 350 - if (!value?.[STATE_SYMBOL]) { 351 - return result; 352 - } 353 - } 354 - const location = sanitize_location(`${component2[FILENAME]}:${line}:${column}`); 355 - ownership_invalid_mutation(name, location, prop2, parent[FILENAME]); 356 - return result; 357 - }, 358 - /** 359 - * @param {any} key 360 - * @param {any} child_component 361 - * @param {() => any} value 362 - */ 363 - binding: (key2, child_component, value) => { 364 - if (!is_bound_or_unset(props, key2) && parent && value()?.[STATE_SYMBOL]) { 365 - ownership_invalid_binding( 366 - component2[FILENAME], 367 - key2, 368 - child_component[FILENAME], 369 - parent[FILENAME] 370 - ); 371 - } 372 - } 373 - }; 374 - } 375 - function is_bound_or_unset(props, prop_name) { 376 - const is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props; 377 - return !!get_descriptor(props, prop_name)?.set || is_entry_props && prop_name in props || !(prop_name in props); 378 - } 379 - 380 - // node_modules/svelte/src/internal/client/dev/legacy.js 381 - function check_target(target) { 382 - if (target) { 383 - component_api_invalid_new(target[FILENAME] ?? "a component", target.name); 384 - } 385 - } 386 - function legacy_api() { 387 - const component2 = component_context?.function; 388 - function error(method) { 389 - component_api_changed(method, component2[FILENAME]); 390 - } 391 - return { 392 - $destroy: () => error("$destroy()"), 393 - $on: () => error("$on(...)"), 394 - $set: () => error("$set(...)") 395 - }; 396 - } 397 - 398 - // node_modules/svelte/src/internal/client/dev/inspect.js 399 - function inspect(get_value, inspector, show_stack = false) { 400 - validate_effect("$inspect"); 401 - let initial = true; 402 - let error = ( 403 - /** @type {any} */ 404 - UNINITIALIZED 405 - ); 406 - eager_effect(() => { 407 - try { 408 - var value = get_value(); 409 - } catch (e) { 410 - error = e; 411 - return; 412 - } 413 - var snap = snapshot(value, true, true); 414 - untrack(() => { 415 - if (show_stack) { 416 - inspector(...snap); 417 - if (!initial) { 418 - const stack = get_error("$inspect(...)"); 419 - if (stack) { 420 - console.groupCollapsed("stack trace"); 421 - console.log(stack); 422 - console.groupEnd(); 423 - } 424 - } 425 - } else { 426 - inspector(initial ? "init" : "update", ...snap); 427 - } 428 - }); 429 - initial = false; 430 - }); 431 - render_effect(() => { 432 - try { 433 - get_value(); 434 - } catch { 435 - } 436 - if (error !== UNINITIALIZED) { 437 - console.error(error); 438 - error = UNINITIALIZED; 439 - } 440 - }); 441 - } 442 - 443 - // node_modules/svelte/src/internal/client/dom/blocks/async.js 444 - function async(node, blockers = [], expressions = [], fn) { 445 - var was_hydrating = hydrating; 446 - var end = null; 447 - if (was_hydrating) { 448 - hydrate_next(); 449 - end = skip_nodes(false); 450 - } 451 - if (expressions.length === 0 && blockers.every((b) => b.settled)) { 452 - fn(node); 453 - if (was_hydrating) { 454 - set_hydrate_node(end); 455 - } 456 - return; 457 - } 458 - const decrement_pending = increment_pending(); 459 - if (was_hydrating) { 460 - var previous_hydrate_node = hydrate_node; 461 - set_hydrate_node(end); 462 - } 463 - flatten(blockers, [], expressions, (values) => { 464 - if (was_hydrating) { 465 - set_hydrating(true); 466 - set_hydrate_node(previous_hydrate_node); 467 - } 468 - try { 469 - for (const d of values) get(d); 470 - fn(node, ...values); 471 - } finally { 472 - if (was_hydrating) { 473 - set_hydrating(false); 474 - } 475 - decrement_pending(); 476 - } 477 - }); 478 - } 479 - 480 - // node_modules/svelte/src/internal/client/dev/validation.js 481 - function validate_snippet_args(anchor, ...args) { 482 - if (typeof anchor !== "object" || !(anchor instanceof Node)) { 483 - invalid_snippet_arguments(); 484 - } 485 - for (let arg of args) { 486 - if (typeof arg !== "function") { 487 - invalid_snippet_arguments(); 488 - } 489 - } 490 - } 491 - 492 - // node_modules/svelte/src/internal/client/dom/blocks/branches.js 493 - var BranchManager = class { 494 - /** @type {TemplateNode} */ 495 - anchor; 496 - /** @type {Map<Batch, Key>} */ 497 - #batches = /* @__PURE__ */ new Map(); 498 - /** 499 - * Map of keys to effects that are currently rendered in the DOM. 500 - * These effects are visible and actively part of the document tree. 501 - * Example: 502 - * ``` 503 - * {#if condition} 504 - * foo 505 - * {:else} 506 - * bar 507 - * {/if} 508 - * ``` 509 - * Can result in the entries `true->Effect` and `false->Effect` 510 - * @type {Map<Key, Effect>} 511 - */ 512 - #onscreen = /* @__PURE__ */ new Map(); 513 - /** 514 - * Similar to #onscreen with respect to the keys, but contains branches that are not yet 515 - * in the DOM, because their insertion is deferred. 516 - * @type {Map<Key, Branch>} 517 - */ 518 - #offscreen = /* @__PURE__ */ new Map(); 519 - /** 520 - * Keys of effects that are currently outroing 521 - * @type {Set<Key>} 522 - */ 523 - #outroing = /* @__PURE__ */ new Set(); 524 - /** 525 - * Whether to pause (i.e. outro) on change, or destroy immediately. 526 - * This is necessary for `<svelte:element>` 527 - */ 528 - #transition = true; 529 - /** 530 - * @param {TemplateNode} anchor 531 - * @param {boolean} transition 532 - */ 533 - constructor(anchor, transition2 = true) { 534 - this.anchor = anchor; 535 - this.#transition = transition2; 536 - } 537 - /** 538 - * @param {Batch} batch 539 - */ 540 - #commit = (batch) => { 541 - if (!this.#batches.has(batch)) return; 542 - var key2 = ( 543 - /** @type {Key} */ 544 - this.#batches.get(batch) 545 - ); 546 - var onscreen = this.#onscreen.get(key2); 547 - if (onscreen) { 548 - resume_effect(onscreen); 549 - this.#outroing.delete(key2); 550 - } else { 551 - var offscreen = this.#offscreen.get(key2); 552 - if (offscreen) { 553 - this.#onscreen.set(key2, offscreen.effect); 554 - this.#offscreen.delete(key2); 555 - offscreen.fragment.lastChild.remove(); 556 - this.anchor.before(offscreen.fragment); 557 - onscreen = offscreen.effect; 558 - } 559 - } 560 - for (const [b, k] of this.#batches) { 561 - this.#batches.delete(b); 562 - if (b === batch) { 563 - break; 564 - } 565 - const offscreen2 = this.#offscreen.get(k); 566 - if (offscreen2) { 567 - destroy_effect(offscreen2.effect); 568 - this.#offscreen.delete(k); 569 - } 570 - } 571 - for (const [k, effect2] of this.#onscreen) { 572 - if (k === key2 || this.#outroing.has(k)) continue; 573 - const on_destroy = () => { 574 - const keys = Array.from(this.#batches.values()); 575 - if (keys.includes(k)) { 576 - var fragment = document.createDocumentFragment(); 577 - move_effect(effect2, fragment); 578 - fragment.append(create_text()); 579 - this.#offscreen.set(k, { effect: effect2, fragment }); 580 - } else { 581 - destroy_effect(effect2); 582 - } 583 - this.#outroing.delete(k); 584 - this.#onscreen.delete(k); 585 - }; 586 - if (this.#transition || !onscreen) { 587 - this.#outroing.add(k); 588 - pause_effect(effect2, on_destroy, false); 589 - } else { 590 - on_destroy(); 591 - } 592 - } 593 - }; 594 - /** 595 - * @param {Batch} batch 596 - */ 597 - #discard = (batch) => { 598 - this.#batches.delete(batch); 599 - const keys = Array.from(this.#batches.values()); 600 - for (const [k, branch2] of this.#offscreen) { 601 - if (!keys.includes(k)) { 602 - destroy_effect(branch2.effect); 603 - this.#offscreen.delete(k); 604 - } 605 - } 606 - }; 607 - /** 608 - * 609 - * @param {any} key 610 - * @param {null | ((target: TemplateNode) => void)} fn 611 - */ 612 - ensure(key2, fn) { 613 - var batch = ( 614 - /** @type {Batch} */ 615 - current_batch 616 - ); 617 - var defer = should_defer_append(); 618 - if (fn && !this.#onscreen.has(key2) && !this.#offscreen.has(key2)) { 619 - if (defer) { 620 - var fragment = document.createDocumentFragment(); 621 - var target = create_text(); 622 - fragment.append(target); 623 - this.#offscreen.set(key2, { 624 - effect: branch(() => fn(target)), 625 - fragment 626 - }); 627 - } else { 628 - this.#onscreen.set( 629 - key2, 630 - branch(() => fn(this.anchor)) 631 - ); 632 - } 633 - } 634 - this.#batches.set(batch, key2); 635 - if (defer) { 636 - for (const [k, effect2] of this.#onscreen) { 637 - if (k === key2) { 638 - batch.unskip_effect(effect2); 639 - } else { 640 - batch.skip_effect(effect2); 641 - } 642 - } 643 - for (const [k, branch2] of this.#offscreen) { 644 - if (k === key2) { 645 - batch.unskip_effect(branch2.effect); 646 - } else { 647 - batch.skip_effect(branch2.effect); 648 - } 649 - } 650 - batch.oncommit(this.#commit); 651 - batch.ondiscard(this.#discard); 652 - } else { 653 - if (hydrating) { 654 - this.anchor = hydrate_node; 655 - } 656 - this.#commit(batch); 657 - } 658 - } 659 - }; 660 - 661 - // node_modules/svelte/src/internal/client/dom/blocks/await.js 662 - var PENDING = 0; 663 - var THEN = 1; 664 - var CATCH = 2; 665 - function await_block(node, get_input, pending_fn, then_fn, catch_fn) { 666 - if (hydrating) { 667 - hydrate_next(); 668 - } 669 - var runes = is_runes(); 670 - var v = ( 671 - /** @type {V} */ 672 - UNINITIALIZED 673 - ); 674 - var value = runes ? source(v) : mutable_source(v, false, false); 675 - var error = runes ? source(v) : mutable_source(v, false, false); 676 - var branches = new BranchManager(node); 677 - block(() => { 678 - var batch = ( 679 - /** @type {Batch} */ 680 - current_batch 681 - ); 682 - batch.deactivate(); 683 - var input = get_input(); 684 - batch.activate(); 685 - var destroyed = false; 686 - let mismatch = hydrating && is_promise(input) === (node.data === HYDRATION_START_ELSE); 687 - if (mismatch) { 688 - set_hydrate_node(skip_nodes()); 689 - set_hydrating(false); 690 - } 691 - if (is_promise(input)) { 692 - var restore = capture(); 693 - var resolved = false; 694 - const resolve = (fn) => { 695 - if (destroyed) return; 696 - resolved = true; 697 - restore(false); 698 - Batch.ensure(); 699 - if (hydrating) { 700 - set_hydrating(false); 701 - } 702 - try { 703 - fn(); 704 - } finally { 705 - unset_context(false); 706 - if (!is_flushing_sync) flushSync(); 707 - } 708 - }; 709 - input.then( 710 - (v2) => { 711 - resolve(() => { 712 - internal_set(value, v2); 713 - branches.ensure(THEN, then_fn && ((target) => then_fn(target, value))); 714 - }); 715 - }, 716 - (e) => { 717 - resolve(() => { 718 - internal_set(error, e); 719 - branches.ensure(CATCH, catch_fn && ((target) => catch_fn(target, error))); 720 - if (!catch_fn) { 721 - throw error.v; 722 - } 723 - }); 724 - } 725 - ); 726 - if (hydrating) { 727 - branches.ensure(PENDING, pending_fn); 728 - } else { 729 - queue_micro_task(() => { 730 - if (!resolved) { 731 - resolve(() => { 732 - branches.ensure(PENDING, pending_fn); 733 - }); 734 - } 735 - }); 736 - } 737 - } else { 738 - internal_set(value, input); 739 - branches.ensure(THEN, then_fn && ((target) => then_fn(target, value))); 740 - } 741 - if (mismatch) { 742 - set_hydrating(true); 743 - } 744 - return () => { 745 - destroyed = true; 746 - }; 747 - }); 748 - } 749 - 750 - // node_modules/svelte/src/internal/client/dom/blocks/if.js 751 - function if_block(node, fn, elseif = false) { 752 - var marker; 753 - if (hydrating) { 754 - marker = hydrate_node; 755 - hydrate_next(); 756 - } 757 - var branches = new BranchManager(node); 758 - var flags = elseif ? EFFECT_TRANSPARENT : 0; 759 - function update_branch(key2, fn2) { 760 - if (hydrating) { 761 - var data = read_hydration_instruction( 762 - /** @type {TemplateNode} */ 763 - marker 764 - ); 765 - if (key2 !== parseInt(data.substring(1))) { 766 - var anchor = skip_nodes(); 767 - set_hydrate_node(anchor); 768 - branches.anchor = anchor; 769 - set_hydrating(false); 770 - branches.ensure(key2, fn2); 771 - set_hydrating(true); 772 - return; 773 - } 774 - } 775 - branches.ensure(key2, fn2); 776 - } 777 - block(() => { 778 - var has_branch = false; 779 - fn((fn2, key2 = 0) => { 780 - has_branch = true; 781 - update_branch(key2, fn2); 782 - }); 783 - if (!has_branch) { 784 - update_branch(-1, null); 785 - } 786 - }, flags); 787 - } 788 - 789 - // node_modules/svelte/src/internal/client/dom/blocks/key.js 790 - var NAN = /* @__PURE__ */ Symbol("NaN"); 791 - function key(node, get_key, render_fn) { 792 - if (hydrating) { 793 - hydrate_next(); 794 - } 795 - var branches = new BranchManager(node); 796 - var legacy = !is_runes(); 797 - block(() => { 798 - var key2 = get_key(); 799 - if (key2 !== key2) { 800 - key2 = /** @type {any} */ 801 - NAN; 802 - } 803 - if (legacy && key2 !== null && typeof key2 === "object") { 804 - key2 = /** @type {V} */ 805 - {}; 806 - } 807 - branches.ensure(key2, render_fn); 808 - }); 809 - } 810 - 811 - // node_modules/svelte/src/internal/client/dom/blocks/css-props.js 812 - function css_props(element2, get_styles) { 813 - if (hydrating) { 814 - set_hydrate_node(get_first_child(element2)); 815 - } 816 - render_effect(() => { 817 - var styles = get_styles(); 818 - for (var key2 in styles) { 819 - var value = styles[key2]; 820 - if (value) { 821 - element2.style.setProperty(key2, value); 822 - } else { 823 - element2.style.removeProperty(key2); 824 - } 825 - } 826 - }); 827 - } 828 - 829 - // node_modules/svelte/src/internal/client/dom/blocks/each.js 830 - function index(_, i) { 831 - return i; 832 - } 833 - function pause_effects(state2, to_destroy, controlled_anchor) { 834 - var transitions = []; 835 - var length = to_destroy.length; 836 - var group; 837 - var remaining = to_destroy.length; 838 - for (var i = 0; i < length; i++) { 839 - let effect2 = to_destroy[i]; 840 - pause_effect( 841 - effect2, 842 - () => { 843 - if (group) { 844 - group.pending.delete(effect2); 845 - group.done.add(effect2); 846 - if (group.pending.size === 0) { 847 - var groups = ( 848 - /** @type {Set<EachOutroGroup>} */ 849 - state2.outrogroups 850 - ); 851 - destroy_effects(state2, array_from(group.done)); 852 - groups.delete(group); 853 - if (groups.size === 0) { 854 - state2.outrogroups = null; 855 - } 856 - } 857 - } else { 858 - remaining -= 1; 859 - } 860 - }, 861 - false 862 - ); 863 - } 864 - if (remaining === 0) { 865 - var fast_path = transitions.length === 0 && controlled_anchor !== null; 866 - if (fast_path) { 867 - var anchor = ( 868 - /** @type {Element} */ 869 - controlled_anchor 870 - ); 871 - var parent_node = ( 872 - /** @type {Element} */ 873 - anchor.parentNode 874 - ); 875 - clear_text_content(parent_node); 876 - parent_node.append(anchor); 877 - state2.items.clear(); 878 - } 879 - destroy_effects(state2, to_destroy, !fast_path); 880 - } else { 881 - group = { 882 - pending: new Set(to_destroy), 883 - done: /* @__PURE__ */ new Set() 884 - }; 885 - (state2.outrogroups ??= /* @__PURE__ */ new Set()).add(group); 886 - } 887 - } 888 - function destroy_effects(state2, to_destroy, remove_dom = true) { 889 - var preserved_effects; 890 - if (state2.pending.size > 0) { 891 - preserved_effects = /* @__PURE__ */ new Set(); 892 - for (const keys of state2.pending.values()) { 893 - for (const key2 of keys) { 894 - preserved_effects.add( 895 - /** @type {EachItem} */ 896 - state2.items.get(key2).e 897 - ); 898 - } 899 - } 900 - } 901 - for (var i = 0; i < to_destroy.length; i++) { 902 - var e = to_destroy[i]; 903 - if (preserved_effects?.has(e)) { 904 - e.f |= EFFECT_OFFSCREEN; 905 - const fragment = document.createDocumentFragment(); 906 - move_effect(e, fragment); 907 - } else { 908 - destroy_effect(to_destroy[i], remove_dom); 909 - } 910 - } 911 - } 912 - var offscreen_anchor; 913 - function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) { 914 - var anchor = node; 915 - var items = /* @__PURE__ */ new Map(); 916 - var is_controlled = (flags & EACH_IS_CONTROLLED) !== 0; 917 - if (is_controlled) { 918 - var parent_node = ( 919 - /** @type {Element} */ 920 - node 921 - ); 922 - anchor = hydrating ? set_hydrate_node(get_first_child(parent_node)) : parent_node.appendChild(create_text()); 923 - } 924 - if (hydrating) { 925 - hydrate_next(); 926 - } 927 - var fallback2 = null; 928 - var each_array = derived_safe_equal(() => { 929 - var collection = get_collection(); 930 - return is_array(collection) ? collection : collection == null ? [] : array_from(collection); 931 - }); 932 - var array; 933 - var pending3 = /* @__PURE__ */ new Map(); 934 - var first_run = true; 935 - function commit(batch) { 936 - if ((state2.effect.f & DESTROYED) !== 0) { 937 - return; 938 - } 939 - state2.pending.delete(batch); 940 - state2.fallback = fallback2; 941 - reconcile(state2, array, anchor, flags, get_key); 942 - if (fallback2 !== null) { 943 - if (array.length === 0) { 944 - if ((fallback2.f & EFFECT_OFFSCREEN) === 0) { 945 - resume_effect(fallback2); 946 - } else { 947 - fallback2.f ^= EFFECT_OFFSCREEN; 948 - move(fallback2, null, anchor); 949 - } 950 - } else { 951 - pause_effect(fallback2, () => { 952 - fallback2 = null; 953 - }); 954 - } 955 - } 956 - } 957 - function discard(batch) { 958 - state2.pending.delete(batch); 959 - } 960 - var effect2 = block(() => { 961 - array = /** @type {V[]} */ 962 - get(each_array); 963 - var length = array.length; 964 - let mismatch = false; 965 - if (hydrating) { 966 - var is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE; 967 - if (is_else !== (length === 0)) { 968 - anchor = skip_nodes(); 969 - set_hydrate_node(anchor); 970 - set_hydrating(false); 971 - mismatch = true; 972 - } 973 - } 974 - var keys = /* @__PURE__ */ new Set(); 975 - var batch = ( 976 - /** @type {Batch} */ 977 - current_batch 978 - ); 979 - var defer = should_defer_append(); 980 - for (var index2 = 0; index2 < length; index2 += 1) { 981 - if (hydrating && hydrate_node.nodeType === COMMENT_NODE && /** @type {Comment} */ 982 - hydrate_node.data === HYDRATION_END) { 983 - anchor = /** @type {Comment} */ 984 - hydrate_node; 985 - mismatch = true; 986 - set_hydrating(false); 987 - } 988 - var value = array[index2]; 989 - var key2 = get_key(value, index2); 990 - if (true_default) { 991 - var key_again = get_key(value, index2); 992 - if (key2 !== key_again) { 993 - each_key_volatile(String(index2), String(key2), String(key_again)); 994 - } 995 - } 996 - var item = first_run ? null : items.get(key2); 997 - if (item) { 998 - if (item.v) internal_set(item.v, value); 999 - if (item.i) internal_set(item.i, index2); 1000 - if (defer) { 1001 - batch.unskip_effect(item.e); 1002 - } 1003 - } else { 1004 - item = create_item( 1005 - items, 1006 - first_run ? anchor : offscreen_anchor ??= create_text(), 1007 - value, 1008 - key2, 1009 - index2, 1010 - render_fn, 1011 - flags, 1012 - get_collection 1013 - ); 1014 - if (!first_run) { 1015 - item.e.f |= EFFECT_OFFSCREEN; 1016 - } 1017 - items.set(key2, item); 1018 - } 1019 - keys.add(key2); 1020 - } 1021 - if (length === 0 && fallback_fn && !fallback2) { 1022 - if (first_run) { 1023 - fallback2 = branch(() => fallback_fn(anchor)); 1024 - } else { 1025 - fallback2 = branch(() => fallback_fn(offscreen_anchor ??= create_text())); 1026 - fallback2.f |= EFFECT_OFFSCREEN; 1027 - } 1028 - } 1029 - if (length > keys.size) { 1030 - if (true_default) { 1031 - validate_each_keys(array, get_key); 1032 - } else { 1033 - each_key_duplicate("", "", ""); 1034 - } 1035 - } 1036 - if (hydrating && length > 0) { 1037 - set_hydrate_node(skip_nodes()); 1038 - } 1039 - if (!first_run) { 1040 - pending3.set(batch, keys); 1041 - if (defer) { 1042 - for (const [key3, item2] of items) { 1043 - if (!keys.has(key3)) { 1044 - batch.skip_effect(item2.e); 1045 - } 1046 - } 1047 - batch.oncommit(commit); 1048 - batch.ondiscard(discard); 1049 - } else { 1050 - commit(batch); 1051 - } 1052 - } 1053 - if (mismatch) { 1054 - set_hydrating(true); 1055 - } 1056 - get(each_array); 1057 - }); 1058 - var state2 = { effect: effect2, flags, items, pending: pending3, outrogroups: null, fallback: fallback2 }; 1059 - first_run = false; 1060 - if (hydrating) { 1061 - anchor = hydrate_node; 1062 - } 1063 - } 1064 - function skip_to_branch(effect2) { 1065 - while (effect2 !== null && (effect2.f & BRANCH_EFFECT) === 0) { 1066 - effect2 = effect2.next; 1067 - } 1068 - return effect2; 1069 - } 1070 - function reconcile(state2, array, anchor, flags, get_key) { 1071 - var is_animated = (flags & EACH_IS_ANIMATED) !== 0; 1072 - var length = array.length; 1073 - var items = state2.items; 1074 - var current = skip_to_branch(state2.effect.first); 1075 - var seen; 1076 - var prev = null; 1077 - var to_animate; 1078 - var matched = []; 1079 - var stashed = []; 1080 - var value; 1081 - var key2; 1082 - var effect2; 1083 - var i; 1084 - if (is_animated) { 1085 - for (i = 0; i < length; i += 1) { 1086 - value = array[i]; 1087 - key2 = get_key(value, i); 1088 - effect2 = /** @type {EachItem} */ 1089 - items.get(key2).e; 1090 - if ((effect2.f & EFFECT_OFFSCREEN) === 0) { 1091 - effect2.nodes?.a?.measure(); 1092 - (to_animate ??= /* @__PURE__ */ new Set()).add(effect2); 1093 - } 1094 - } 1095 - } 1096 - for (i = 0; i < length; i += 1) { 1097 - value = array[i]; 1098 - key2 = get_key(value, i); 1099 - effect2 = /** @type {EachItem} */ 1100 - items.get(key2).e; 1101 - if (state2.outrogroups !== null) { 1102 - for (const group of state2.outrogroups) { 1103 - group.pending.delete(effect2); 1104 - group.done.delete(effect2); 1105 - } 1106 - } 1107 - if ((effect2.f & INERT) !== 0) { 1108 - resume_effect(effect2); 1109 - if (is_animated) { 1110 - effect2.nodes?.a?.unfix(); 1111 - (to_animate ??= /* @__PURE__ */ new Set()).delete(effect2); 1112 - } 1113 - } 1114 - if ((effect2.f & EFFECT_OFFSCREEN) !== 0) { 1115 - effect2.f ^= EFFECT_OFFSCREEN; 1116 - if (effect2 === current) { 1117 - move(effect2, null, anchor); 1118 - } else { 1119 - var next2 = prev ? prev.next : current; 1120 - if (effect2 === state2.effect.last) { 1121 - state2.effect.last = effect2.prev; 1122 - } 1123 - if (effect2.prev) effect2.prev.next = effect2.next; 1124 - if (effect2.next) effect2.next.prev = effect2.prev; 1125 - link(state2, prev, effect2); 1126 - link(state2, effect2, next2); 1127 - move(effect2, next2, anchor); 1128 - prev = effect2; 1129 - matched = []; 1130 - stashed = []; 1131 - current = skip_to_branch(prev.next); 1132 - continue; 1133 - } 1134 - } 1135 - if (effect2 !== current) { 1136 - if (seen !== void 0 && seen.has(effect2)) { 1137 - if (matched.length < stashed.length) { 1138 - var start = stashed[0]; 1139 - var j; 1140 - prev = start.prev; 1141 - var a = matched[0]; 1142 - var b = matched[matched.length - 1]; 1143 - for (j = 0; j < matched.length; j += 1) { 1144 - move(matched[j], start, anchor); 1145 - } 1146 - for (j = 0; j < stashed.length; j += 1) { 1147 - seen.delete(stashed[j]); 1148 - } 1149 - link(state2, a.prev, b.next); 1150 - link(state2, prev, a); 1151 - link(state2, b, start); 1152 - current = start; 1153 - prev = b; 1154 - i -= 1; 1155 - matched = []; 1156 - stashed = []; 1157 - } else { 1158 - seen.delete(effect2); 1159 - move(effect2, current, anchor); 1160 - link(state2, effect2.prev, effect2.next); 1161 - link(state2, effect2, prev === null ? state2.effect.first : prev.next); 1162 - link(state2, prev, effect2); 1163 - prev = effect2; 1164 - } 1165 - continue; 1166 - } 1167 - matched = []; 1168 - stashed = []; 1169 - while (current !== null && current !== effect2) { 1170 - (seen ??= /* @__PURE__ */ new Set()).add(current); 1171 - stashed.push(current); 1172 - current = skip_to_branch(current.next); 1173 - } 1174 - if (current === null) { 1175 - continue; 1176 - } 1177 - } 1178 - if ((effect2.f & EFFECT_OFFSCREEN) === 0) { 1179 - matched.push(effect2); 1180 - } 1181 - prev = effect2; 1182 - current = skip_to_branch(effect2.next); 1183 - } 1184 - if (state2.outrogroups !== null) { 1185 - for (const group of state2.outrogroups) { 1186 - if (group.pending.size === 0) { 1187 - destroy_effects(state2, array_from(group.done)); 1188 - state2.outrogroups?.delete(group); 1189 - } 1190 - } 1191 - if (state2.outrogroups.size === 0) { 1192 - state2.outrogroups = null; 1193 - } 1194 - } 1195 - if (current !== null || seen !== void 0) { 1196 - var to_destroy = []; 1197 - if (seen !== void 0) { 1198 - for (effect2 of seen) { 1199 - if ((effect2.f & INERT) === 0) { 1200 - to_destroy.push(effect2); 1201 - } 1202 - } 1203 - } 1204 - while (current !== null) { 1205 - if ((current.f & INERT) === 0 && current !== state2.fallback) { 1206 - to_destroy.push(current); 1207 - } 1208 - current = skip_to_branch(current.next); 1209 - } 1210 - var destroy_length = to_destroy.length; 1211 - if (destroy_length > 0) { 1212 - var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null; 1213 - if (is_animated) { 1214 - for (i = 0; i < destroy_length; i += 1) { 1215 - to_destroy[i].nodes?.a?.measure(); 1216 - } 1217 - for (i = 0; i < destroy_length; i += 1) { 1218 - to_destroy[i].nodes?.a?.fix(); 1219 - } 1220 - } 1221 - pause_effects(state2, to_destroy, controlled_anchor); 1222 - } 1223 - } 1224 - if (is_animated) { 1225 - queue_micro_task(() => { 1226 - if (to_animate === void 0) return; 1227 - for (effect2 of to_animate) { 1228 - effect2.nodes?.a?.apply(); 1229 - } 1230 - }); 1231 - } 1232 - } 1233 - function create_item(items, anchor, value, key2, index2, render_fn, flags, get_collection) { 1234 - var v = (flags & EACH_ITEM_REACTIVE) !== 0 ? (flags & EACH_ITEM_IMMUTABLE) === 0 ? mutable_source(value, false, false) : source(value) : null; 1235 - var i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index2) : null; 1236 - if (true_default && v) { 1237 - v.trace = () => { 1238 - get_collection()[i?.v ?? index2]; 1239 - }; 1240 - } 1241 - return { 1242 - v, 1243 - i, 1244 - e: branch(() => { 1245 - render_fn(anchor, v ?? value, i ?? index2, get_collection); 1246 - return () => { 1247 - items.delete(key2); 1248 - }; 1249 - }) 1250 - }; 1251 - } 1252 - function move(effect2, next2, anchor) { 1253 - if (!effect2.nodes) return; 1254 - var node = effect2.nodes.start; 1255 - var end = effect2.nodes.end; 1256 - var dest = next2 && (next2.f & EFFECT_OFFSCREEN) === 0 ? ( 1257 - /** @type {EffectNodes} */ 1258 - next2.nodes.start 1259 - ) : anchor; 1260 - while (node !== null) { 1261 - var next_node = ( 1262 - /** @type {TemplateNode} */ 1263 - get_next_sibling(node) 1264 - ); 1265 - dest.before(node); 1266 - if (node === end) { 1267 - return; 1268 - } 1269 - node = next_node; 1270 - } 1271 - } 1272 - function link(state2, prev, next2) { 1273 - if (prev === null) { 1274 - state2.effect.first = next2; 1275 - } else { 1276 - prev.next = next2; 1277 - } 1278 - if (next2 === null) { 1279 - state2.effect.last = prev; 1280 - } else { 1281 - next2.prev = prev; 1282 - } 1283 - } 1284 - function validate_each_keys(array, key_fn) { 1285 - const keys = /* @__PURE__ */ new Map(); 1286 - const length = array.length; 1287 - for (let i = 0; i < length; i++) { 1288 - const key2 = key_fn(array[i], i); 1289 - if (keys.has(key2)) { 1290 - const a = String(keys.get(key2)); 1291 - const b = String(i); 1292 - let k = String(key2); 1293 - if (k.startsWith("[object ")) k = null; 1294 - each_key_duplicate(a, b, k); 1295 - } 1296 - keys.set(key2, i); 1297 - } 1298 - } 1299 - 1300 - // node_modules/svelte/src/internal/client/dom/blocks/html.js 1301 - function check_hash(element2, server_hash, value) { 1302 - if (!server_hash || server_hash === hash(String(value ?? ""))) return; 1303 - let location; 1304 - const loc = element2.__svelte_meta?.loc; 1305 - if (loc) { 1306 - location = `near ${loc.file}:${loc.line}:${loc.column}`; 1307 - } else if (dev_current_component_function?.[FILENAME]) { 1308 - location = `in ${dev_current_component_function[FILENAME]}`; 1309 - } 1310 - hydration_html_changed(sanitize_location(location)); 1311 - } 1312 - function html(node, get_value, is_controlled = false, svg = false, mathml = false, skip_warning = false) { 1313 - var anchor = node; 1314 - var value = ""; 1315 - if (is_controlled) { 1316 - var parent_node = ( 1317 - /** @type {Element} */ 1318 - node 1319 - ); 1320 - if (hydrating) { 1321 - anchor = set_hydrate_node(get_first_child(parent_node)); 1322 - } 1323 - } 1324 - template_effect(() => { 1325 - var effect2 = ( 1326 - /** @type {Effect} */ 1327 - active_effect 1328 - ); 1329 - if (value === (value = get_value() ?? "")) { 1330 - if (hydrating) hydrate_next(); 1331 - return; 1332 - } 1333 - if (is_controlled && !hydrating) { 1334 - effect2.nodes = null; 1335 - parent_node.innerHTML = /** @type {string} */ 1336 - value; 1337 - if (value !== "") { 1338 - assign_nodes( 1339 - /** @type {TemplateNode} */ 1340 - get_first_child(parent_node), 1341 - /** @type {TemplateNode} */ 1342 - parent_node.lastChild 1343 - ); 1344 - } 1345 - return; 1346 - } 1347 - if (effect2.nodes !== null) { 1348 - remove_effect_dom( 1349 - effect2.nodes.start, 1350 - /** @type {TemplateNode} */ 1351 - effect2.nodes.end 1352 - ); 1353 - effect2.nodes = null; 1354 - } 1355 - if (value === "") return; 1356 - if (hydrating) { 1357 - var hash2 = ( 1358 - /** @type {Comment} */ 1359 - hydrate_node.data 1360 - ); 1361 - var next2 = hydrate_next(); 1362 - var last = next2; 1363 - while (next2 !== null && (next2.nodeType !== COMMENT_NODE || /** @type {Comment} */ 1364 - next2.data !== "")) { 1365 - last = next2; 1366 - next2 = get_next_sibling(next2); 1367 - } 1368 - if (next2 === null) { 1369 - hydration_mismatch(); 1370 - throw HYDRATION_ERROR; 1371 - } 1372 - if (true_default && !skip_warning) { 1373 - check_hash( 1374 - /** @type {Element} */ 1375 - next2.parentNode, 1376 - hash2, 1377 - value 1378 - ); 1379 - } 1380 - assign_nodes(hydrate_node, last); 1381 - anchor = set_hydrate_node(next2); 1382 - return; 1383 - } 1384 - var ns = svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : void 0; 1385 - var wrapper = ( 1386 - /** @type {HTMLTemplateElement | SVGElement | MathMLElement} */ 1387 - create_element(svg ? "svg" : mathml ? "math" : "template", ns) 1388 - ); 1389 - wrapper.innerHTML = /** @type {any} */ 1390 - value; 1391 - var node2 = svg || mathml ? wrapper : ( 1392 - /** @type {HTMLTemplateElement} */ 1393 - wrapper.content 1394 - ); 1395 - assign_nodes( 1396 - /** @type {TemplateNode} */ 1397 - get_first_child(node2), 1398 - /** @type {TemplateNode} */ 1399 - node2.lastChild 1400 - ); 1401 - if (svg || mathml) { 1402 - while (get_first_child(node2)) { 1403 - anchor.before( 1404 - /** @type {TemplateNode} */ 1405 - get_first_child(node2) 1406 - ); 1407 - } 1408 - } else { 1409 - anchor.before(node2); 1410 - } 1411 - }); 1412 - } 1413 - 1414 - // node_modules/svelte/src/internal/client/dom/blocks/slot.js 1415 - function slot(anchor, $$props, name, slot_props, fallback_fn) { 1416 - if (hydrating) { 1417 - hydrate_next(); 1418 - } 1419 - var slot_fn = $$props.$$slots?.[name]; 1420 - var is_interop = false; 1421 - if (slot_fn === true) { 1422 - slot_fn = $$props[name === "default" ? "children" : name]; 1423 - is_interop = true; 1424 - } 1425 - if (slot_fn === void 0) { 1426 - if (fallback_fn !== null) { 1427 - fallback_fn(anchor); 1428 - } 1429 - } else { 1430 - slot_fn(anchor, is_interop ? () => slot_props : slot_props); 1431 - } 1432 - } 1433 - function sanitize_slots(props) { 1434 - const sanitized = {}; 1435 - if (props.children) sanitized.default = true; 1436 - for (const key2 in props.$$slots) { 1437 - sanitized[key2] = true; 1438 - } 1439 - return sanitized; 1440 - } 1441 - 1442 - // node_modules/svelte/src/internal/shared/validate.js 1443 - function validate_void_dynamic_element(tag_fn) { 1444 - const tag2 = tag_fn(); 1445 - if (tag2 && is_void(tag2)) { 1446 - dynamic_void_element_content(tag2); 1447 - } 1448 - } 1449 - function validate_dynamic_element_tag(tag_fn) { 1450 - const tag2 = tag_fn(); 1451 - const is_string = typeof tag2 === "string"; 1452 - if (tag2 && !is_string) { 1453 - svelte_element_invalid_this_value(); 1454 - } 1455 - } 1456 - function validate_store(store, name) { 1457 - if (store != null && typeof store.subscribe !== "function") { 1458 - store_invalid_shape(name); 1459 - } 1460 - } 1461 - function prevent_snippet_stringification(fn) { 1462 - fn.toString = () => { 1463 - snippet_without_render_tag(); 1464 - return ""; 1465 - }; 1466 - return fn; 1467 - } 1468 - 1469 - // node_modules/svelte/src/internal/client/dom/blocks/snippet.js 1470 - function snippet(node, get_snippet, ...args) { 1471 - var branches = new BranchManager(node); 1472 - block(() => { 1473 - const snippet2 = get_snippet() ?? null; 1474 - if (true_default && snippet2 == null) { 1475 - invalid_snippet(); 1476 - } 1477 - branches.ensure(snippet2, snippet2 && ((anchor) => snippet2(anchor, ...args))); 1478 - }, EFFECT_TRANSPARENT); 1479 - } 1480 - function wrap_snippet(component2, fn) { 1481 - const snippet2 = (node, ...args) => { 1482 - var previous_component_function = dev_current_component_function; 1483 - set_dev_current_component_function(component2); 1484 - try { 1485 - return fn(node, ...args); 1486 - } finally { 1487 - set_dev_current_component_function(previous_component_function); 1488 - } 1489 - }; 1490 - prevent_snippet_stringification(snippet2); 1491 - return snippet2; 1492 - } 1493 - function createRawSnippet(fn) { 1494 - return (anchor, ...params) => { 1495 - var snippet2 = fn(...params); 1496 - var element2; 1497 - if (hydrating) { 1498 - element2 = /** @type {Element} */ 1499 - hydrate_node; 1500 - hydrate_next(); 1501 - } else { 1502 - var html2 = snippet2.render().trim(); 1503 - var fragment = create_fragment_from_html(html2); 1504 - element2 = /** @type {Element} */ 1505 - get_first_child(fragment); 1506 - if (true_default && (get_next_sibling(element2) !== null || element2.nodeType !== ELEMENT_NODE)) { 1507 - invalid_raw_snippet_render(); 1508 - } 1509 - anchor.before(element2); 1510 - } 1511 - const result = snippet2.setup?.(element2); 1512 - assign_nodes(element2, element2); 1513 - if (typeof result === "function") { 1514 - teardown(result); 1515 - } 1516 - }; 1517 - } 1518 - 1519 - // node_modules/svelte/src/internal/client/dom/blocks/svelte-component.js 1520 - function component(node, get_component, render_fn) { 1521 - var hydration_start_node; 1522 - if (hydrating) { 1523 - hydration_start_node = hydrate_node; 1524 - hydrate_next(); 1525 - } 1526 - var branches = new BranchManager(node); 1527 - block(() => { 1528 - var component2 = get_component() ?? null; 1529 - if (hydrating) { 1530 - var data = read_hydration_instruction( 1531 - /** @type {TemplateNode} */ 1532 - hydration_start_node 1533 - ); 1534 - var server_had_component = data === HYDRATION_START; 1535 - var client_has_component = component2 !== null; 1536 - if (server_had_component !== client_has_component) { 1537 - var anchor = skip_nodes(); 1538 - set_hydrate_node(anchor); 1539 - branches.anchor = anchor; 1540 - set_hydrating(false); 1541 - branches.ensure(component2, component2 && ((target) => render_fn(target, component2))); 1542 - set_hydrating(true); 1543 - return; 1544 - } 1545 - } 1546 - branches.ensure(component2, component2 && ((target) => render_fn(target, component2))); 1547 - }, EFFECT_TRANSPARENT); 1548 - } 1549 - 1550 - // node_modules/svelte/src/internal/client/timing.js 1551 - var now = true_default ? () => performance.now() : () => Date.now(); 1552 - var raf = { 1553 - // don't access requestAnimationFrame eagerly outside method 1554 - // this allows basic testing of user code without JSDOM 1555 - // bunder will eval and remove ternary when the user's app is built 1556 - tick: ( 1557 - /** @param {any} _ */ 1558 - (_) => (true_default ? requestAnimationFrame : noop)(_) 1559 - ), 1560 - now: () => now(), 1561 - tasks: /* @__PURE__ */ new Set() 1562 - }; 1563 - 1564 - // node_modules/svelte/src/internal/client/loop.js 1565 - function run_tasks() { 1566 - const now2 = raf.now(); 1567 - raf.tasks.forEach((task) => { 1568 - if (!task.c(now2)) { 1569 - raf.tasks.delete(task); 1570 - task.f(); 1571 - } 1572 - }); 1573 - if (raf.tasks.size !== 0) { 1574 - raf.tick(run_tasks); 1575 - } 1576 - } 1577 - function loop(callback) { 1578 - let task; 1579 - if (raf.tasks.size === 0) { 1580 - raf.tick(run_tasks); 1581 - } 1582 - return { 1583 - promise: new Promise((fulfill) => { 1584 - raf.tasks.add(task = { c: callback, f: fulfill }); 1585 - }), 1586 - abort() { 1587 - raf.tasks.delete(task); 1588 - } 1589 - }; 1590 - } 1591 - 1592 - // node_modules/svelte/src/internal/client/dom/elements/transitions.js 1593 - function dispatch_event(element2, type) { 1594 - without_reactive_context(() => { 1595 - element2.dispatchEvent(new CustomEvent(type)); 1596 - }); 1597 - } 1598 - function css_property_to_camelcase(style) { 1599 - if (style === "float") return "cssFloat"; 1600 - if (style === "offset") return "cssOffset"; 1601 - if (style.startsWith("--")) return style; 1602 - const parts = style.split("-"); 1603 - if (parts.length === 1) return parts[0]; 1604 - return parts[0] + parts.slice(1).map( 1605 - /** @param {any} word */ 1606 - (word) => word[0].toUpperCase() + word.slice(1) 1607 - ).join(""); 1608 - } 1609 - function css_to_keyframe(css) { 1610 - const keyframe = {}; 1611 - const parts = css.split(";"); 1612 - for (const part of parts) { 1613 - const [property, value] = part.split(":"); 1614 - if (!property || value === void 0) break; 1615 - const formatted_property = css_property_to_camelcase(property.trim()); 1616 - keyframe[formatted_property] = value.trim(); 1617 - } 1618 - return keyframe; 1619 - } 1620 - var linear = (t) => t; 1621 - var animation_effect_override = null; 1622 - function set_animation_effect_override(v) { 1623 - animation_effect_override = v; 1624 - } 1625 - function animation(element2, get_fn, get_params) { 1626 - var effect2 = animation_effect_override ?? /** @type {Effect} */ 1627 - active_effect; 1628 - var nodes = ( 1629 - /** @type {EffectNodes} */ 1630 - effect2.nodes 1631 - ); 1632 - var from; 1633 - var to; 1634 - var animation2; 1635 - var original_styles = null; 1636 - nodes.a ??= { 1637 - element: element2, 1638 - measure() { 1639 - from = this.element.getBoundingClientRect(); 1640 - }, 1641 - apply() { 1642 - animation2?.abort(); 1643 - to = this.element.getBoundingClientRect(); 1644 - if (from.left !== to.left || from.right !== to.right || from.top !== to.top || from.bottom !== to.bottom) { 1645 - const options = get_fn()(this.element, { from, to }, get_params?.()); 1646 - animation2 = animate(this.element, options, void 0, 1, () => { 1647 - animation2?.abort(); 1648 - animation2 = void 0; 1649 - }); 1650 - } 1651 - }, 1652 - fix() { 1653 - if (element2.getAnimations().length) return; 1654 - var { position, width, height } = getComputedStyle(element2); 1655 - if (position !== "absolute" && position !== "fixed") { 1656 - var style = ( 1657 - /** @type {HTMLElement | SVGElement} */ 1658 - element2.style 1659 - ); 1660 - original_styles = { 1661 - position: style.position, 1662 - width: style.width, 1663 - height: style.height, 1664 - transform: style.transform 1665 - }; 1666 - style.position = "absolute"; 1667 - style.width = width; 1668 - style.height = height; 1669 - var to2 = element2.getBoundingClientRect(); 1670 - if (from.left !== to2.left || from.top !== to2.top) { 1671 - var transform = `translate(${from.left - to2.left}px, ${from.top - to2.top}px)`; 1672 - style.transform = style.transform ? `${style.transform} ${transform}` : transform; 1673 - } 1674 - } 1675 - }, 1676 - unfix() { 1677 - if (original_styles) { 1678 - var style = ( 1679 - /** @type {HTMLElement | SVGElement} */ 1680 - element2.style 1681 - ); 1682 - style.position = original_styles.position; 1683 - style.width = original_styles.width; 1684 - style.height = original_styles.height; 1685 - style.transform = original_styles.transform; 1686 - } 1687 - } 1688 - }; 1689 - nodes.a.element = element2; 1690 - } 1691 - function transition(flags, element2, get_fn, get_params) { 1692 - var is_intro = (flags & TRANSITION_IN) !== 0; 1693 - var is_outro = (flags & TRANSITION_OUT) !== 0; 1694 - var is_both = is_intro && is_outro; 1695 - var is_global = (flags & TRANSITION_GLOBAL) !== 0; 1696 - var direction = is_both ? "both" : is_intro ? "in" : "out"; 1697 - var current_options; 1698 - var inert = element2.inert; 1699 - var overflow = element2.style.overflow; 1700 - var intro; 1701 - var outro; 1702 - function get_options() { 1703 - return without_reactive_context(() => { 1704 - return current_options ??= get_fn()(element2, get_params?.() ?? /** @type {P} */ 1705 - {}, { 1706 - direction 1707 - }); 1708 - }); 1709 - } 1710 - var transition2 = { 1711 - is_global, 1712 - in() { 1713 - element2.inert = inert; 1714 - if (!is_intro) { 1715 - outro?.abort(); 1716 - outro?.reset?.(); 1717 - return; 1718 - } 1719 - if (!is_outro) { 1720 - intro?.abort(); 1721 - } 1722 - intro = animate(element2, get_options(), outro, 1, () => { 1723 - dispatch_event(element2, "introend"); 1724 - intro?.abort(); 1725 - intro = current_options = void 0; 1726 - element2.style.overflow = overflow; 1727 - }); 1728 - }, 1729 - out(fn) { 1730 - if (!is_outro) { 1731 - fn?.(); 1732 - current_options = void 0; 1733 - return; 1734 - } 1735 - element2.inert = true; 1736 - outro = animate(element2, get_options(), intro, 0, () => { 1737 - dispatch_event(element2, "outroend"); 1738 - fn?.(); 1739 - }); 1740 - }, 1741 - stop: () => { 1742 - intro?.abort(); 1743 - outro?.abort(); 1744 - } 1745 - }; 1746 - var e = ( 1747 - /** @type {Effect & { nodes: EffectNodes }} */ 1748 - active_effect 1749 - ); 1750 - (e.nodes.t ??= []).push(transition2); 1751 - if (is_intro && should_intro) { 1752 - var run3 = is_global; 1753 - if (!run3) { 1754 - var block2 = ( 1755 - /** @type {Effect | null} */ 1756 - e.parent 1757 - ); 1758 - while (block2 && (block2.f & EFFECT_TRANSPARENT) !== 0) { 1759 - while (block2 = block2.parent) { 1760 - if ((block2.f & BLOCK_EFFECT) !== 0) break; 1761 - } 1762 - } 1763 - run3 = !block2 || (block2.f & REACTION_RAN) !== 0; 1764 - } 1765 - if (run3) { 1766 - effect(() => { 1767 - untrack(() => transition2.in()); 1768 - }); 1769 - } 1770 - } 1771 - } 1772 - function animate(element2, options, counterpart, t2, on_finish) { 1773 - var is_intro = t2 === 1; 1774 - if (is_function(options)) { 1775 - var a; 1776 - var aborted2 = false; 1777 - queue_micro_task(() => { 1778 - if (aborted2) return; 1779 - var o = options({ direction: is_intro ? "in" : "out" }); 1780 - a = animate(element2, o, counterpart, t2, on_finish); 1781 - }); 1782 - return { 1783 - abort: () => { 1784 - aborted2 = true; 1785 - a?.abort(); 1786 - }, 1787 - deactivate: () => a.deactivate(), 1788 - reset: () => a.reset(), 1789 - t: () => a.t() 1790 - }; 1791 - } 1792 - counterpart?.deactivate(); 1793 - if (!options?.duration && !options?.delay) { 1794 - dispatch_event(element2, is_intro ? "introstart" : "outrostart"); 1795 - on_finish(); 1796 - return { 1797 - abort: noop, 1798 - deactivate: noop, 1799 - reset: noop, 1800 - t: () => t2 1801 - }; 1802 - } 1803 - const { delay = 0, css, tick: tick2, easing = linear } = options; 1804 - var keyframes = []; 1805 - if (is_intro && counterpart === void 0) { 1806 - if (tick2) { 1807 - tick2(0, 1); 1808 - } 1809 - if (css) { 1810 - var styles = css_to_keyframe(css(0, 1)); 1811 - keyframes.push(styles, styles); 1812 - } 1813 - } 1814 - var get_t = () => 1 - t2; 1815 - var animation2 = element2.animate(keyframes, { duration: delay, fill: "forwards" }); 1816 - animation2.onfinish = () => { 1817 - animation2.cancel(); 1818 - dispatch_event(element2, is_intro ? "introstart" : "outrostart"); 1819 - var t1 = counterpart?.t() ?? 1 - t2; 1820 - counterpart?.abort(); 1821 - var delta = t2 - t1; 1822 - var duration = ( 1823 - /** @type {number} */ 1824 - options.duration * Math.abs(delta) 1825 - ); 1826 - var keyframes2 = []; 1827 - if (duration > 0) { 1828 - var needs_overflow_hidden = false; 1829 - if (css) { 1830 - var n = Math.ceil(duration / (1e3 / 60)); 1831 - for (var i = 0; i <= n; i += 1) { 1832 - var t = t1 + delta * easing(i / n); 1833 - var styles2 = css_to_keyframe(css(t, 1 - t)); 1834 - keyframes2.push(styles2); 1835 - needs_overflow_hidden ||= styles2.overflow === "hidden"; 1836 - } 1837 - } 1838 - if (needs_overflow_hidden) { 1839 - element2.style.overflow = "hidden"; 1840 - } 1841 - get_t = () => { 1842 - var time = ( 1843 - /** @type {number} */ 1844 - /** @type {globalThis.Animation} */ 1845 - animation2.currentTime 1846 - ); 1847 - return t1 + delta * easing(time / duration); 1848 - }; 1849 - if (tick2) { 1850 - loop(() => { 1851 - if (animation2.playState !== "running") return false; 1852 - var t3 = get_t(); 1853 - tick2(t3, 1 - t3); 1854 - return true; 1855 - }); 1856 - } 1857 - } 1858 - animation2 = element2.animate(keyframes2, { duration, fill: "forwards" }); 1859 - animation2.onfinish = () => { 1860 - get_t = () => t2; 1861 - tick2?.(t2, 1 - t2); 1862 - on_finish(); 1863 - }; 1864 - }; 1865 - return { 1866 - abort: () => { 1867 - if (animation2) { 1868 - animation2.cancel(); 1869 - animation2.effect = null; 1870 - animation2.onfinish = noop; 1871 - } 1872 - }, 1873 - deactivate: () => { 1874 - on_finish = noop; 1875 - }, 1876 - reset: () => { 1877 - if (t2 === 0) { 1878 - tick2?.(1, 0); 1879 - } 1880 - }, 1881 - t: () => get_t() 1882 - }; 1883 - } 1884 - 1885 - // node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js 1886 - function element(node, get_tag, is_svg, render_fn, get_namespace, location) { 1887 - let was_hydrating = hydrating; 1888 - if (hydrating) { 1889 - hydrate_next(); 1890 - } 1891 - var filename = true_default && location && component_context?.function[FILENAME]; 1892 - var element2 = null; 1893 - if (hydrating && hydrate_node.nodeType === ELEMENT_NODE) { 1894 - element2 = /** @type {Element} */ 1895 - hydrate_node; 1896 - hydrate_next(); 1897 - } 1898 - var anchor = ( 1899 - /** @type {TemplateNode} */ 1900 - hydrating ? hydrate_node : node 1901 - ); 1902 - var parent_effect = ( 1903 - /** @type {Effect} */ 1904 - active_effect 1905 - ); 1906 - var branches = new BranchManager(anchor, false); 1907 - block(() => { 1908 - const next_tag = get_tag() || null; 1909 - var ns = get_namespace ? get_namespace() : is_svg || next_tag === "svg" ? NAMESPACE_SVG : void 0; 1910 - if (next_tag === null) { 1911 - branches.ensure(null, null); 1912 - set_should_intro(true); 1913 - return; 1914 - } 1915 - branches.ensure(next_tag, (anchor2) => { 1916 - if (next_tag) { 1917 - element2 = hydrating ? ( 1918 - /** @type {Element} */ 1919 - element2 1920 - ) : create_element(next_tag, ns); 1921 - if (true_default && location) { 1922 - element2.__svelte_meta = { 1923 - parent: dev_stack, 1924 - loc: { 1925 - file: filename, 1926 - line: location[0], 1927 - column: location[1] 1928 - } 1929 - }; 1930 - } 1931 - assign_nodes(element2, element2); 1932 - if (render_fn) { 1933 - if (hydrating && is_raw_text_element(next_tag)) { 1934 - element2.append(document.createComment("")); 1935 - } 1936 - var child_anchor = hydrating ? get_first_child(element2) : element2.appendChild(create_text()); 1937 - if (hydrating) { 1938 - if (child_anchor === null) { 1939 - set_hydrating(false); 1940 - } else { 1941 - set_hydrate_node(child_anchor); 1942 - } 1943 - } 1944 - set_animation_effect_override(parent_effect); 1945 - render_fn(element2, child_anchor); 1946 - set_animation_effect_override(null); 1947 - } 1948 - active_effect.nodes.end = element2; 1949 - anchor2.before(element2); 1950 - } 1951 - if (hydrating) { 1952 - set_hydrate_node(anchor2); 1953 - } 1954 - }); 1955 - set_should_intro(true); 1956 - return () => { 1957 - if (next_tag) { 1958 - set_should_intro(false); 1959 - } 1960 - }; 1961 - }, EFFECT_TRANSPARENT); 1962 - teardown(() => { 1963 - set_should_intro(true); 1964 - }); 1965 - if (was_hydrating) { 1966 - set_hydrating(true); 1967 - set_hydrate_node(anchor); 1968 - } 1969 - } 1970 - 1971 - // node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js 1972 - function head(hash2, render_fn) { 1973 - let previous_hydrate_node = null; 1974 - let was_hydrating = hydrating; 1975 - var anchor; 1976 - if (hydrating) { 1977 - previous_hydrate_node = hydrate_node; 1978 - var head_anchor = get_first_child(document.head); 1979 - while (head_anchor !== null && (head_anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ 1980 - head_anchor.data !== hash2)) { 1981 - head_anchor = get_next_sibling(head_anchor); 1982 - } 1983 - if (head_anchor === null) { 1984 - set_hydrating(false); 1985 - } else { 1986 - var start = ( 1987 - /** @type {TemplateNode} */ 1988 - get_next_sibling(head_anchor) 1989 - ); 1990 - head_anchor.remove(); 1991 - set_hydrate_node(start); 1992 - } 1993 - } 1994 - if (!hydrating) { 1995 - anchor = document.head.appendChild(create_text()); 1996 - } 1997 - try { 1998 - block(() => render_fn(anchor), HEAD_EFFECT | EFFECT_PRESERVED); 1999 - } finally { 2000 - if (was_hydrating) { 2001 - set_hydrating(true); 2002 - set_hydrate_node( 2003 - /** @type {TemplateNode} */ 2004 - previous_hydrate_node 2005 - ); 2006 - } 2007 - } 2008 - } 2009 - 2010 - // node_modules/svelte/src/internal/client/dom/css.js 2011 - function append_styles(anchor, css) { 2012 - effect(() => { 2013 - var root = anchor.getRootNode(); 2014 - var target = ( 2015 - /** @type {ShadowRoot} */ 2016 - root.host ? ( 2017 - /** @type {ShadowRoot} */ 2018 - root 2019 - ) : ( 2020 - /** @type {Document} */ 2021 - root.head ?? /** @type {Document} */ 2022 - root.ownerDocument.head 2023 - ) 2024 - ); 2025 - if (!target.querySelector("#" + css.hash)) { 2026 - const style = create_element("style"); 2027 - style.id = css.hash; 2028 - style.textContent = css.code; 2029 - target.appendChild(style); 2030 - if (true_default) { 2031 - register_style(css.hash, style); 2032 - } 2033 - } 2034 - }); 2035 - } 2036 - 2037 - // node_modules/svelte/src/internal/client/dom/elements/actions.js 2038 - function action(dom, action2, get_value) { 2039 - effect(() => { 2040 - var payload = untrack(() => action2(dom, get_value?.()) || {}); 2041 - if (get_value && payload?.update) { 2042 - var inited = false; 2043 - var prev = ( 2044 - /** @type {any} */ 2045 - {} 2046 - ); 2047 - render_effect(() => { 2048 - var value = get_value(); 2049 - deep_read_state(value); 2050 - if (inited && safe_not_equal(prev, value)) { 2051 - prev = value; 2052 - payload.update(value); 2053 - } 2054 - }); 2055 - inited = true; 2056 - } 2057 - if (payload?.destroy) { 2058 - return () => ( 2059 - /** @type {Function} */ 2060 - payload.destroy() 2061 - ); 2062 - } 2063 - }); 2064 - } 2065 - 2066 - // node_modules/svelte/src/internal/client/dom/elements/attachments.js 2067 - function attach(node, get_fn) { 2068 - var fn = void 0; 2069 - var e; 2070 - managed(() => { 2071 - if (fn !== (fn = get_fn())) { 2072 - if (e) { 2073 - destroy_effect(e); 2074 - e = null; 2075 - } 2076 - if (fn) { 2077 - e = branch(() => { 2078 - effect(() => ( 2079 - /** @type {(node: Element) => void} */ 2080 - fn(node) 2081 - )); 2082 - }); 2083 - } 2084 - } 2085 - }); 2086 - } 2087 - 2088 - // node_modules/svelte/src/escaping.js 2089 - var ATTR_REGEX = /[&"<]/g; 2090 - var CONTENT_REGEX = /[&<]/g; 2091 - function escape_html(value, is_attr) { 2092 - const str = String(value ?? ""); 2093 - const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX; 2094 - pattern.lastIndex = 0; 2095 - let escaped = ""; 2096 - let last = 0; 2097 - while (pattern.test(str)) { 2098 - const i = pattern.lastIndex - 1; 2099 - const ch = str[i]; 2100 - escaped += str.substring(last, i) + (ch === "&" ? "&amp;" : ch === '"' ? "&quot;" : "&lt;"); 2101 - last = i + 1; 2102 - } 2103 - return escaped + str.substring(last); 2104 - } 2105 - 2106 - // node_modules/svelte/src/internal/shared/attributes.js 2107 - var replacements = { 2108 - translate: /* @__PURE__ */ new Map([ 2109 - [true, "yes"], 2110 - [false, "no"] 2111 - ]) 2112 - }; 2113 - function attr(name, value, is_boolean = false) { 2114 - if (name === "hidden" && value !== "until-found") { 2115 - is_boolean = true; 2116 - } 2117 - if (value == null || !value && is_boolean) return ""; 2118 - const normalized = has_own_property.call(replacements, name) && replacements[name].get(value) || value; 2119 - const assignment = is_boolean ? `=""` : `="${escape_html(normalized, true)}"`; 2120 - return ` ${name}${assignment}`; 2121 - } 2122 - function clsx2(value) { 2123 - if (typeof value === "object") { 2124 - return clsx(value); 2125 - } else { 2126 - return value ?? ""; 2127 - } 2128 - } 2129 - var whitespace = [..." \n\r\f \v\uFEFF"]; 2130 - function to_class(value, hash2, directives) { 2131 - var classname = value == null ? "" : "" + value; 2132 - if (hash2) { 2133 - classname = classname ? classname + " " + hash2 : hash2; 2134 - } 2135 - if (directives) { 2136 - for (var key2 of Object.keys(directives)) { 2137 - if (directives[key2]) { 2138 - classname = classname ? classname + " " + key2 : key2; 2139 - } else if (classname.length) { 2140 - var len = key2.length; 2141 - var a = 0; 2142 - while ((a = classname.indexOf(key2, a)) >= 0) { 2143 - var b = a + len; 2144 - if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) { 2145 - classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1); 2146 - } else { 2147 - a = b; 2148 - } 2149 - } 2150 - } 2151 - } 2152 - } 2153 - return classname === "" ? null : classname; 2154 - } 2155 - function append_styles2(styles, important = false) { 2156 - var separator = important ? " !important;" : ";"; 2157 - var css = ""; 2158 - for (var key2 of Object.keys(styles)) { 2159 - var value = styles[key2]; 2160 - if (value != null && value !== "") { 2161 - css += " " + key2 + ": " + value + separator; 2162 - } 2163 - } 2164 - return css; 2165 - } 2166 - function to_css_name(name) { 2167 - if (name[0] !== "-" || name[1] !== "-") { 2168 - return name.toLowerCase(); 2169 - } 2170 - return name; 2171 - } 2172 - function to_style(value, styles) { 2173 - if (styles) { 2174 - var new_style = ""; 2175 - var normal_styles; 2176 - var important_styles; 2177 - if (Array.isArray(styles)) { 2178 - normal_styles = styles[0]; 2179 - important_styles = styles[1]; 2180 - } else { 2181 - normal_styles = styles; 2182 - } 2183 - if (value) { 2184 - value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim(); 2185 - var in_str = false; 2186 - var in_apo = 0; 2187 - var in_comment = false; 2188 - var reserved_names = []; 2189 - if (normal_styles) { 2190 - reserved_names.push(...Object.keys(normal_styles).map(to_css_name)); 2191 - } 2192 - if (important_styles) { 2193 - reserved_names.push(...Object.keys(important_styles).map(to_css_name)); 2194 - } 2195 - var start_index = 0; 2196 - var name_index = -1; 2197 - const len = value.length; 2198 - for (var i = 0; i < len; i++) { 2199 - var c = value[i]; 2200 - if (in_comment) { 2201 - if (c === "/" && value[i - 1] === "*") { 2202 - in_comment = false; 2203 - } 2204 - } else if (in_str) { 2205 - if (in_str === c) { 2206 - in_str = false; 2207 - } 2208 - } else if (c === "/" && value[i + 1] === "*") { 2209 - in_comment = true; 2210 - } else if (c === '"' || c === "'") { 2211 - in_str = c; 2212 - } else if (c === "(") { 2213 - in_apo++; 2214 - } else if (c === ")") { 2215 - in_apo--; 2216 - } 2217 - if (!in_comment && in_str === false && in_apo === 0) { 2218 - if (c === ":" && name_index === -1) { 2219 - name_index = i; 2220 - } else if (c === ";" || i === len - 1) { 2221 - if (name_index !== -1) { 2222 - var name = to_css_name(value.substring(start_index, name_index).trim()); 2223 - if (!reserved_names.includes(name)) { 2224 - if (c !== ";") { 2225 - i++; 2226 - } 2227 - var property = value.substring(start_index, i).trim(); 2228 - new_style += " " + property + ";"; 2229 - } 2230 - } 2231 - start_index = i + 1; 2232 - name_index = -1; 2233 - } 2234 - } 2235 - } 2236 - } 2237 - if (normal_styles) { 2238 - new_style += append_styles2(normal_styles); 2239 - } 2240 - if (important_styles) { 2241 - new_style += append_styles2(important_styles, true); 2242 - } 2243 - new_style = new_style.trim(); 2244 - return new_style === "" ? null : new_style; 2245 - } 2246 - return value == null ? null : String(value); 2247 - } 2248 - 2249 - // node_modules/svelte/src/internal/client/dom/elements/class.js 2250 - function set_class(dom, is_html, value, hash2, prev_classes, next_classes) { 2251 - var prev = dom.__className; 2252 - if (hydrating || prev !== value || prev === void 0) { 2253 - var next_class_name = to_class(value, hash2, next_classes); 2254 - if (!hydrating || next_class_name !== dom.getAttribute("class")) { 2255 - if (next_class_name == null) { 2256 - dom.removeAttribute("class"); 2257 - } else if (is_html) { 2258 - dom.className = next_class_name; 2259 - } else { 2260 - dom.setAttribute("class", next_class_name); 2261 - } 2262 - } 2263 - dom.__className = value; 2264 - } else if (next_classes && prev_classes !== next_classes) { 2265 - for (var key2 in next_classes) { 2266 - var is_present = !!next_classes[key2]; 2267 - if (prev_classes == null || is_present !== !!prev_classes[key2]) { 2268 - dom.classList.toggle(key2, is_present); 2269 - } 2270 - } 2271 - } 2272 - return next_classes; 2273 - } 2274 - 2275 - // node_modules/svelte/src/internal/client/dom/elements/style.js 2276 - function update_styles(dom, prev = {}, next2, priority) { 2277 - for (var key2 in next2) { 2278 - var value = next2[key2]; 2279 - if (prev[key2] !== value) { 2280 - if (next2[key2] == null) { 2281 - dom.style.removeProperty(key2); 2282 - } else { 2283 - dom.style.setProperty(key2, value, priority); 2284 - } 2285 - } 2286 - } 2287 - } 2288 - function set_style(dom, value, prev_styles, next_styles) { 2289 - var prev = dom.__style; 2290 - if (hydrating || prev !== value) { 2291 - var next_style_attr = to_style(value, next_styles); 2292 - if (!hydrating || next_style_attr !== dom.getAttribute("style")) { 2293 - if (next_style_attr == null) { 2294 - dom.removeAttribute("style"); 2295 - } else { 2296 - dom.style.cssText = next_style_attr; 2297 - } 2298 - } 2299 - dom.__style = value; 2300 - } else if (next_styles) { 2301 - if (Array.isArray(next_styles)) { 2302 - update_styles(dom, prev_styles?.[0], next_styles[0]); 2303 - update_styles(dom, prev_styles?.[1], next_styles[1], "important"); 2304 - } else { 2305 - update_styles(dom, prev_styles, next_styles); 2306 - } 2307 - } 2308 - return next_styles; 2309 - } 2310 - 2311 - // node_modules/svelte/src/internal/client/dom/elements/bindings/select.js 2312 - function select_option(select, value, mounting = false) { 2313 - if (select.multiple) { 2314 - if (value == void 0) { 2315 - return; 2316 - } 2317 - if (!is_array(value)) { 2318 - return select_multiple_invalid_value(); 2319 - } 2320 - for (var option of select.options) { 2321 - option.selected = value.includes(get_option_value(option)); 2322 - } 2323 - return; 2324 - } 2325 - for (option of select.options) { 2326 - var option_value = get_option_value(option); 2327 - if (is(option_value, value)) { 2328 - option.selected = true; 2329 - return; 2330 - } 2331 - } 2332 - if (!mounting || value !== void 0) { 2333 - select.selectedIndex = -1; 2334 - } 2335 - } 2336 - function init_select(select) { 2337 - var observer = new MutationObserver(() => { 2338 - select_option(select, select.__value); 2339 - }); 2340 - observer.observe(select, { 2341 - // Listen to option element changes 2342 - childList: true, 2343 - subtree: true, 2344 - // because of <optgroup> 2345 - // Listen to option element value attribute changes 2346 - // (doesn't get notified of select value changes, 2347 - // because that property is not reflected as an attribute) 2348 - attributes: true, 2349 - attributeFilter: ["value"] 2350 - }); 2351 - teardown(() => { 2352 - observer.disconnect(); 2353 - }); 2354 - } 2355 - function bind_select_value(select, get2, set2 = get2) { 2356 - var batches = /* @__PURE__ */ new WeakSet(); 2357 - var mounting = true; 2358 - listen_to_event_and_reset_event(select, "change", (is_reset) => { 2359 - var query = is_reset ? "[selected]" : ":checked"; 2360 - var value; 2361 - if (select.multiple) { 2362 - value = [].map.call(select.querySelectorAll(query), get_option_value); 2363 - } else { 2364 - var selected_option = select.querySelector(query) ?? // will fall back to first non-disabled option if no option is selected 2365 - select.querySelector("option:not([disabled])"); 2366 - value = selected_option && get_option_value(selected_option); 2367 - } 2368 - set2(value); 2369 - select.__value = value; 2370 - if (current_batch !== null) { 2371 - batches.add(current_batch); 2372 - } 2373 - }); 2374 - effect(() => { 2375 - var value = get2(); 2376 - if (select === document.activeElement) { 2377 - var batch = ( 2378 - /** @type {Batch} */ 2379 - async_mode_flag ? previous_batch : current_batch 2380 - ); 2381 - if (batches.has(batch)) { 2382 - return; 2383 - } 2384 - } 2385 - select_option(select, value, mounting); 2386 - if (mounting && value === void 0) { 2387 - var selected_option = select.querySelector(":checked"); 2388 - if (selected_option !== null) { 2389 - value = get_option_value(selected_option); 2390 - set2(value); 2391 - } 2392 - } 2393 - select.__value = value; 2394 - mounting = false; 2395 - }); 2396 - init_select(select); 2397 - } 2398 - function get_option_value(option) { 2399 - if ("__value" in option) { 2400 - return option.__value; 2401 - } else { 2402 - return option.value; 2403 - } 2404 - } 2405 - 2406 - // node_modules/svelte/src/internal/client/dom/elements/attributes.js 2407 - var CLASS = /* @__PURE__ */ Symbol("class"); 2408 - var STYLE = /* @__PURE__ */ Symbol("style"); 2409 - var IS_CUSTOM_ELEMENT = /* @__PURE__ */ Symbol("is custom element"); 2410 - var IS_HTML = /* @__PURE__ */ Symbol("is html"); 2411 - var LINK_TAG = IS_XHTML ? "link" : "LINK"; 2412 - var INPUT_TAG = IS_XHTML ? "input" : "INPUT"; 2413 - var OPTION_TAG = IS_XHTML ? "option" : "OPTION"; 2414 - var SELECT_TAG = IS_XHTML ? "select" : "SELECT"; 2415 - var PROGRESS_TAG = IS_XHTML ? "progress" : "PROGRESS"; 2416 - function remove_input_defaults(input) { 2417 - if (!hydrating) return; 2418 - var already_removed = false; 2419 - var remove_defaults = () => { 2420 - if (already_removed) return; 2421 - already_removed = true; 2422 - if (input.hasAttribute("value")) { 2423 - var value = input.value; 2424 - set_attribute(input, "value", null); 2425 - input.value = value; 2426 - } 2427 - if (input.hasAttribute("checked")) { 2428 - var checked = input.checked; 2429 - set_attribute(input, "checked", null); 2430 - input.checked = checked; 2431 - } 2432 - }; 2433 - input.__on_r = remove_defaults; 2434 - queue_micro_task(remove_defaults); 2435 - add_form_reset_listener(); 2436 - } 2437 - function set_value(element2, value) { 2438 - var attributes = get_attributes(element2); 2439 - if (attributes.value === (attributes.value = // treat null and undefined the same for the initial value 2440 - value ?? void 0) || // @ts-expect-error 2441 - // `progress` elements always need their value set when it's `0` 2442 - element2.value === value && (value !== 0 || element2.nodeName !== PROGRESS_TAG)) { 2443 - return; 2444 - } 2445 - element2.value = value ?? ""; 2446 - } 2447 - function set_checked(element2, checked) { 2448 - var attributes = get_attributes(element2); 2449 - if (attributes.checked === (attributes.checked = // treat null and undefined the same for the initial value 2450 - checked ?? void 0)) { 2451 - return; 2452 - } 2453 - element2.checked = checked; 2454 - } 2455 - function set_selected(element2, selected) { 2456 - if (selected) { 2457 - if (!element2.hasAttribute("selected")) { 2458 - element2.setAttribute("selected", ""); 2459 - } 2460 - } else { 2461 - element2.removeAttribute("selected"); 2462 - } 2463 - } 2464 - function set_default_checked(element2, checked) { 2465 - const existing_value = element2.checked; 2466 - element2.defaultChecked = checked; 2467 - element2.checked = existing_value; 2468 - } 2469 - function set_default_value(element2, value) { 2470 - const existing_value = element2.value; 2471 - element2.defaultValue = value; 2472 - element2.value = existing_value; 2473 - } 2474 - function set_attribute(element2, attribute, value, skip_warning) { 2475 - var attributes = get_attributes(element2); 2476 - if (hydrating) { 2477 - attributes[attribute] = element2.getAttribute(attribute); 2478 - if (attribute === "src" || attribute === "srcset" || attribute === "href" && element2.nodeName === LINK_TAG) { 2479 - if (!skip_warning) { 2480 - check_src_in_dev_hydration(element2, attribute, value ?? ""); 2481 - } 2482 - return; 2483 - } 2484 - } 2485 - if (attributes[attribute] === (attributes[attribute] = value)) return; 2486 - if (attribute === "loading") { 2487 - element2[LOADING_ATTR_SYMBOL] = value; 2488 - } 2489 - if (value == null) { 2490 - element2.removeAttribute(attribute); 2491 - } else if (typeof value !== "string" && get_setters(element2).includes(attribute)) { 2492 - element2[attribute] = value; 2493 - } else { 2494 - element2.setAttribute(attribute, value); 2495 - } 2496 - } 2497 - function set_xlink_attribute(dom, attribute, value) { 2498 - dom.setAttributeNS("http://www.w3.org/1999/xlink", attribute, value); 2499 - } 2500 - function set_custom_element_data(node, prop2, value) { 2501 - var previous_reaction = active_reaction; 2502 - var previous_effect = active_effect; 2503 - let was_hydrating = hydrating; 2504 - if (hydrating) { 2505 - set_hydrating(false); 2506 - } 2507 - set_active_reaction(null); 2508 - set_active_effect(null); 2509 - try { 2510 - if ( 2511 - // `style` should use `set_attribute` rather than the setter 2512 - prop2 !== "style" && // Don't compute setters for custom elements while they aren't registered yet, 2513 - // because during their upgrade/instantiation they might add more setters. 2514 - // Instead, fall back to a simple "an object, then set as property" heuristic. 2515 - (setters_cache.has(node.getAttribute("is") || node.nodeName) || // customElements may not be available in browser extension contexts 2516 - !customElements || customElements.get(node.getAttribute("is") || node.nodeName.toLowerCase()) ? get_setters(node).includes(prop2) : value && typeof value === "object") 2517 - ) { 2518 - node[prop2] = value; 2519 - } else { 2520 - set_attribute(node, prop2, value == null ? value : String(value)); 2521 - } 2522 - } finally { 2523 - set_active_reaction(previous_reaction); 2524 - set_active_effect(previous_effect); 2525 - if (was_hydrating) { 2526 - set_hydrating(true); 2527 - } 2528 - } 2529 - } 2530 - function set_attributes(element2, prev, next2, css_hash, should_remove_defaults = false, skip_warning = false) { 2531 - if (hydrating && should_remove_defaults && element2.nodeName === INPUT_TAG) { 2532 - var input = ( 2533 - /** @type {HTMLInputElement} */ 2534 - element2 2535 - ); 2536 - var attribute = input.type === "checkbox" ? "defaultChecked" : "defaultValue"; 2537 - if (!(attribute in next2)) { 2538 - remove_input_defaults(input); 2539 - } 2540 - } 2541 - var attributes = get_attributes(element2); 2542 - var is_custom_element = attributes[IS_CUSTOM_ELEMENT]; 2543 - var preserve_attribute_case = !attributes[IS_HTML]; 2544 - let is_hydrating_custom_element = hydrating && is_custom_element; 2545 - if (is_hydrating_custom_element) { 2546 - set_hydrating(false); 2547 - } 2548 - var current = prev || {}; 2549 - var is_option_element = element2.nodeName === OPTION_TAG; 2550 - for (var key2 in prev) { 2551 - if (!(key2 in next2)) { 2552 - next2[key2] = null; 2553 - } 2554 - } 2555 - if (next2.class) { 2556 - next2.class = clsx2(next2.class); 2557 - } else if (css_hash || next2[CLASS]) { 2558 - next2.class = null; 2559 - } 2560 - if (next2[STYLE]) { 2561 - next2.style ??= null; 2562 - } 2563 - var setters = get_setters(element2); 2564 - for (const key3 in next2) { 2565 - let value = next2[key3]; 2566 - if (is_option_element && key3 === "value" && value == null) { 2567 - element2.value = element2.__value = ""; 2568 - current[key3] = value; 2569 - continue; 2570 - } 2571 - if (key3 === "class") { 2572 - var is_html = element2.namespaceURI === "http://www.w3.org/1999/xhtml"; 2573 - set_class(element2, is_html, value, css_hash, prev?.[CLASS], next2[CLASS]); 2574 - current[key3] = value; 2575 - current[CLASS] = next2[CLASS]; 2576 - continue; 2577 - } 2578 - if (key3 === "style") { 2579 - set_style(element2, value, prev?.[STYLE], next2[STYLE]); 2580 - current[key3] = value; 2581 - current[STYLE] = next2[STYLE]; 2582 - continue; 2583 - } 2584 - var prev_value = current[key3]; 2585 - if (value === prev_value && !(value === void 0 && element2.hasAttribute(key3))) { 2586 - continue; 2587 - } 2588 - current[key3] = value; 2589 - var prefix = key3[0] + key3[1]; 2590 - if (prefix === "$$") continue; 2591 - if (prefix === "on") { 2592 - const opts = {}; 2593 - const event_handle_key = "$$" + key3; 2594 - let event_name = key3.slice(2); 2595 - var is_delegated = can_delegate_event(event_name); 2596 - if (is_capture_event(event_name)) { 2597 - event_name = event_name.slice(0, -7); 2598 - opts.capture = true; 2599 - } 2600 - if (!is_delegated && prev_value) { 2601 - if (value != null) continue; 2602 - element2.removeEventListener(event_name, current[event_handle_key], opts); 2603 - current[event_handle_key] = null; 2604 - } 2605 - if (is_delegated) { 2606 - delegated(event_name, element2, value); 2607 - delegate([event_name]); 2608 - } else if (value != null) { 2609 - let handle = function(evt) { 2610 - current[key3].call(this, evt); 2611 - }; 2612 - current[event_handle_key] = create_event(event_name, element2, handle, opts); 2613 - } 2614 - } else if (key3 === "style") { 2615 - set_attribute(element2, key3, value); 2616 - } else if (key3 === "autofocus") { 2617 - autofocus( 2618 - /** @type {HTMLElement} */ 2619 - element2, 2620 - Boolean(value) 2621 - ); 2622 - } else if (!is_custom_element && (key3 === "__value" || key3 === "value" && value != null)) { 2623 - element2.value = element2.__value = value; 2624 - } else if (key3 === "selected" && is_option_element) { 2625 - set_selected( 2626 - /** @type {HTMLOptionElement} */ 2627 - element2, 2628 - value 2629 - ); 2630 - } else { 2631 - var name = key3; 2632 - if (!preserve_attribute_case) { 2633 - name = normalize_attribute(name); 2634 - } 2635 - var is_default = name === "defaultValue" || name === "defaultChecked"; 2636 - if (value == null && !is_custom_element && !is_default) { 2637 - attributes[key3] = null; 2638 - if (name === "value" || name === "checked") { 2639 - let input2 = ( 2640 - /** @type {HTMLInputElement} */ 2641 - element2 2642 - ); 2643 - const use_default = prev === void 0; 2644 - if (name === "value") { 2645 - let previous = input2.defaultValue; 2646 - input2.removeAttribute(name); 2647 - input2.defaultValue = previous; 2648 - input2.value = input2.__value = use_default ? previous : null; 2649 - } else { 2650 - let previous = input2.defaultChecked; 2651 - input2.removeAttribute(name); 2652 - input2.defaultChecked = previous; 2653 - input2.checked = use_default ? previous : false; 2654 - } 2655 - } else { 2656 - element2.removeAttribute(key3); 2657 - } 2658 - } else if (is_default || setters.includes(name) && (is_custom_element || typeof value !== "string")) { 2659 - element2[name] = value; 2660 - if (name in attributes) attributes[name] = UNINITIALIZED; 2661 - } else if (typeof value !== "function") { 2662 - set_attribute(element2, name, value, skip_warning); 2663 - } 2664 - } 2665 - } 2666 - if (is_hydrating_custom_element) { 2667 - set_hydrating(true); 2668 - } 2669 - return current; 2670 - } 2671 - function attribute_effect(element2, fn, sync = [], async2 = [], blockers = [], css_hash, should_remove_defaults = false, skip_warning = false) { 2672 - flatten(blockers, sync, async2, (values) => { 2673 - var prev = void 0; 2674 - var effects = {}; 2675 - var is_select = element2.nodeName === SELECT_TAG; 2676 - var inited = false; 2677 - managed(() => { 2678 - var next2 = fn(...values.map(get)); 2679 - var current = set_attributes( 2680 - element2, 2681 - prev, 2682 - next2, 2683 - css_hash, 2684 - should_remove_defaults, 2685 - skip_warning 2686 - ); 2687 - if (inited && is_select && "value" in next2) { 2688 - select_option( 2689 - /** @type {HTMLSelectElement} */ 2690 - element2, 2691 - next2.value 2692 - ); 2693 - } 2694 - for (let symbol of Object.getOwnPropertySymbols(effects)) { 2695 - if (!next2[symbol]) destroy_effect(effects[symbol]); 2696 - } 2697 - for (let symbol of Object.getOwnPropertySymbols(next2)) { 2698 - var n = next2[symbol]; 2699 - if (symbol.description === ATTACHMENT_KEY && (!prev || n !== prev[symbol])) { 2700 - if (effects[symbol]) destroy_effect(effects[symbol]); 2701 - effects[symbol] = branch(() => attach(element2, () => n)); 2702 - } 2703 - current[symbol] = n; 2704 - } 2705 - prev = current; 2706 - }); 2707 - if (is_select) { 2708 - var select = ( 2709 - /** @type {HTMLSelectElement} */ 2710 - element2 2711 - ); 2712 - effect(() => { 2713 - select_option( 2714 - select, 2715 - /** @type {Record<string | symbol, any>} */ 2716 - prev.value, 2717 - true 2718 - ); 2719 - init_select(select); 2720 - }); 2721 - } 2722 - inited = true; 2723 - }); 2724 - } 2725 - function get_attributes(element2) { 2726 - return ( 2727 - /** @type {Record<string | symbol, unknown>} **/ 2728 - // @ts-expect-error 2729 - element2.__attributes ??= { 2730 - [IS_CUSTOM_ELEMENT]: element2.nodeName.includes("-"), 2731 - [IS_HTML]: element2.namespaceURI === NAMESPACE_HTML 2732 - } 2733 - ); 2734 - } 2735 - var setters_cache = /* @__PURE__ */ new Map(); 2736 - function get_setters(element2) { 2737 - var cache_key = element2.getAttribute("is") || element2.nodeName; 2738 - var setters = setters_cache.get(cache_key); 2739 - if (setters) return setters; 2740 - setters_cache.set(cache_key, setters = []); 2741 - var descriptors; 2742 - var proto = element2; 2743 - var element_proto = Element.prototype; 2744 - while (element_proto !== proto) { 2745 - descriptors = get_descriptors(proto); 2746 - for (var key2 in descriptors) { 2747 - if (descriptors[key2].set) { 2748 - setters.push(key2); 2749 - } 2750 - } 2751 - proto = get_prototype_of(proto); 2752 - } 2753 - return setters; 2754 - } 2755 - function check_src_in_dev_hydration(element2, attribute, value) { 2756 - if (!true_default) return; 2757 - if (attribute === "srcset" && srcset_url_equal(element2, value)) return; 2758 - if (src_url_equal(element2.getAttribute(attribute) ?? "", value)) return; 2759 - hydration_attribute_changed( 2760 - attribute, 2761 - element2.outerHTML.replace(element2.innerHTML, element2.innerHTML && "..."), 2762 - String(value) 2763 - ); 2764 - } 2765 - function src_url_equal(element_src, url) { 2766 - if (element_src === url) return true; 2767 - return new URL(element_src, document.baseURI).href === new URL(url, document.baseURI).href; 2768 - } 2769 - function split_srcset(srcset) { 2770 - return srcset.split(",").map((src) => src.trim().split(" ").filter(Boolean)); 2771 - } 2772 - function srcset_url_equal(element2, srcset) { 2773 - var element_urls = split_srcset(element2.srcset); 2774 - var urls = split_srcset(srcset); 2775 - return urls.length === element_urls.length && urls.every( 2776 - ([url, width], i) => width === element_urls[i][1] && // We need to test both ways because Vite will create an a full URL with 2777 - // `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the 2778 - // relative URLs inside srcset are not automatically resolved to absolute URLs by 2779 - // browsers (in contrast to img.src). This means both SSR and DOM code could 2780 - // contain relative or absolute URLs. 2781 - (src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0])) 2782 - ); 2783 - } 2784 - 2785 - // node_modules/svelte/src/internal/client/dom/elements/customizable-select.js 2786 - var supported = null; 2787 - function is_supported() { 2788 - if (supported === null) { 2789 - var select = create_element("select"); 2790 - select.innerHTML = create_trusted_html("<option><span>t</span></option>"); 2791 - supported = /** @type {Element} */ 2792 - select.firstChild?.firstChild?.nodeType === 1; 2793 - } 2794 - return supported; 2795 - } 2796 - function selectedcontent(element2, update_element) { 2797 - if (!is_supported()) return; 2798 - attach(element2, () => () => { 2799 - const select = element2.closest("select"); 2800 - if (!select) return; 2801 - const observer = new MutationObserver((entries) => { 2802 - var selected = false; 2803 - for (const entry of entries) { 2804 - if (entry.target === element2) { 2805 - return; 2806 - } 2807 - selected ||= !!entry.target.parentElement?.closest("option")?.selected; 2808 - } 2809 - if (selected) { 2810 - element2.replaceWith(element2 = /** @type {HTMLElement} */ 2811 - element2.cloneNode(true)); 2812 - update_element(element2); 2813 - } 2814 - }); 2815 - observer.observe(select, { 2816 - childList: true, 2817 - characterData: true, 2818 - subtree: true 2819 - }); 2820 - return () => { 2821 - observer.disconnect(); 2822 - }; 2823 - }); 2824 - } 2825 - function customizable_select(element2, rich_fn) { 2826 - var was_hydrating = hydrating; 2827 - if (!is_supported()) { 2828 - set_hydrating(false); 2829 - element2.textContent = ""; 2830 - element2.append(create_comment("")); 2831 - } 2832 - try { 2833 - rich_fn(); 2834 - } finally { 2835 - if (was_hydrating) { 2836 - if (hydrating) { 2837 - reset(element2); 2838 - } else { 2839 - set_hydrating(true); 2840 - set_hydrate_node(element2); 2841 - } 2842 - } 2843 - } 2844 - } 2845 - 2846 - // node_modules/svelte/src/internal/client/dom/elements/bindings/document.js 2847 - function bind_active_element(update2) { 2848 - listen(document, ["focusin", "focusout"], (event2) => { 2849 - if (event2 && event2.type === "focusout" && /** @type {FocusEvent} */ 2850 - event2.relatedTarget) { 2851 - return; 2852 - } 2853 - update2(document.activeElement); 2854 - }); 2855 - } 2856 - 2857 - // node_modules/svelte/src/internal/client/dom/elements/bindings/input.js 2858 - function bind_value(input, get2, set2 = get2) { 2859 - var batches = /* @__PURE__ */ new WeakSet(); 2860 - listen_to_event_and_reset_event(input, "input", async (is_reset) => { 2861 - if (true_default && input.type === "checkbox") { 2862 - bind_invalid_checkbox_value(); 2863 - } 2864 - var value = is_reset ? input.defaultValue : input.value; 2865 - value = is_numberlike_input(input) ? to_number(value) : value; 2866 - set2(value); 2867 - if (current_batch !== null) { 2868 - batches.add(current_batch); 2869 - } 2870 - await tick(); 2871 - if (value !== (value = get2())) { 2872 - var start = input.selectionStart; 2873 - var end = input.selectionEnd; 2874 - var length = input.value.length; 2875 - input.value = value ?? ""; 2876 - if (end !== null) { 2877 - var new_length = input.value.length; 2878 - if (start === end && end === length && new_length > length) { 2879 - input.selectionStart = new_length; 2880 - input.selectionEnd = new_length; 2881 - } else { 2882 - input.selectionStart = start; 2883 - input.selectionEnd = Math.min(end, new_length); 2884 - } 2885 - } 2886 - } 2887 - }); 2888 - if ( 2889 - // If we are hydrating and the value has since changed, 2890 - // then use the updated value from the input instead. 2891 - hydrating && input.defaultValue !== input.value || // If defaultValue is set, then value == defaultValue 2892 - // TODO Svelte 6: remove input.value check and set to empty string? 2893 - untrack(get2) == null && input.value 2894 - ) { 2895 - set2(is_numberlike_input(input) ? to_number(input.value) : input.value); 2896 - if (current_batch !== null) { 2897 - batches.add(current_batch); 2898 - } 2899 - } 2900 - render_effect(() => { 2901 - if (true_default && input.type === "checkbox") { 2902 - bind_invalid_checkbox_value(); 2903 - } 2904 - var value = get2(); 2905 - if (input === document.activeElement) { 2906 - var batch = ( 2907 - /** @type {Batch} */ 2908 - async_mode_flag ? previous_batch : current_batch 2909 - ); 2910 - if (batches.has(batch)) { 2911 - return; 2912 - } 2913 - } 2914 - if (is_numberlike_input(input) && value === to_number(input.value)) { 2915 - return; 2916 - } 2917 - if (input.type === "date" && !value && !input.value) { 2918 - return; 2919 - } 2920 - if (value !== input.value) { 2921 - input.value = value ?? ""; 2922 - } 2923 - }); 2924 - } 2925 - var pending = /* @__PURE__ */ new Set(); 2926 - function bind_group(inputs, group_index, input, get2, set2 = get2) { 2927 - var is_checkbox = input.getAttribute("type") === "checkbox"; 2928 - var binding_group = inputs; 2929 - let hydration_mismatch2 = false; 2930 - if (group_index !== null) { 2931 - for (var index2 of group_index) { 2932 - binding_group = binding_group[index2] ??= []; 2933 - } 2934 - } 2935 - binding_group.push(input); 2936 - listen_to_event_and_reset_event( 2937 - input, 2938 - "change", 2939 - () => { 2940 - var value = input.__value; 2941 - if (is_checkbox) { 2942 - value = get_binding_group_value(binding_group, value, input.checked); 2943 - } 2944 - set2(value); 2945 - }, 2946 - // TODO better default value handling 2947 - () => set2(is_checkbox ? [] : null) 2948 - ); 2949 - render_effect(() => { 2950 - var value = get2(); 2951 - if (hydrating && input.defaultChecked !== input.checked) { 2952 - hydration_mismatch2 = true; 2953 - return; 2954 - } 2955 - if (is_checkbox) { 2956 - value = value || []; 2957 - input.checked = value.includes(input.__value); 2958 - } else { 2959 - input.checked = is(input.__value, value); 2960 - } 2961 - }); 2962 - teardown(() => { 2963 - var index3 = binding_group.indexOf(input); 2964 - if (index3 !== -1) { 2965 - binding_group.splice(index3, 1); 2966 - } 2967 - }); 2968 - if (!pending.has(binding_group)) { 2969 - pending.add(binding_group); 2970 - queue_micro_task(() => { 2971 - binding_group.sort((a, b) => a.compareDocumentPosition(b) === 4 ? -1 : 1); 2972 - pending.delete(binding_group); 2973 - }); 2974 - } 2975 - queue_micro_task(() => { 2976 - if (hydration_mismatch2) { 2977 - var value; 2978 - if (is_checkbox) { 2979 - value = get_binding_group_value(binding_group, value, input.checked); 2980 - } else { 2981 - var hydration_input = binding_group.find((input2) => input2.checked); 2982 - value = hydration_input?.__value; 2983 - } 2984 - set2(value); 2985 - } 2986 - }); 2987 - } 2988 - function bind_checked(input, get2, set2 = get2) { 2989 - listen_to_event_and_reset_event(input, "change", (is_reset) => { 2990 - var value = is_reset ? input.defaultChecked : input.checked; 2991 - set2(value); 2992 - }); 2993 - if ( 2994 - // If we are hydrating and the value has since changed, 2995 - // then use the update value from the input instead. 2996 - hydrating && input.defaultChecked !== input.checked || // If defaultChecked is set, then checked == defaultChecked 2997 - untrack(get2) == null 2998 - ) { 2999 - set2(input.checked); 3000 - } 3001 - render_effect(() => { 3002 - var value = get2(); 3003 - input.checked = Boolean(value); 3004 - }); 3005 - } 3006 - function get_binding_group_value(group, __value, checked) { 3007 - var value = /* @__PURE__ */ new Set(); 3008 - for (var i = 0; i < group.length; i += 1) { 3009 - if (group[i].checked) { 3010 - value.add(group[i].__value); 3011 - } 3012 - } 3013 - if (!checked) { 3014 - value.delete(__value); 3015 - } 3016 - return Array.from(value); 3017 - } 3018 - function is_numberlike_input(input) { 3019 - var type = input.type; 3020 - return type === "number" || type === "range"; 3021 - } 3022 - function to_number(value) { 3023 - return value === "" ? null : +value; 3024 - } 3025 - function bind_files(input, get2, set2 = get2) { 3026 - listen_to_event_and_reset_event(input, "change", () => { 3027 - set2(input.files); 3028 - }); 3029 - if ( 3030 - // If we are hydrating and the value has since changed, 3031 - // then use the updated value from the input instead. 3032 - hydrating && input.files 3033 - ) { 3034 - set2(input.files); 3035 - } 3036 - render_effect(() => { 3037 - input.files = get2(); 3038 - }); 3039 - } 3040 - 3041 - // node_modules/svelte/src/internal/client/dom/elements/bindings/media.js 3042 - function time_ranges_to_array(ranges) { 3043 - var array = []; 3044 - for (var i = 0; i < ranges.length; i += 1) { 3045 - array.push({ start: ranges.start(i), end: ranges.end(i) }); 3046 - } 3047 - return array; 3048 - } 3049 - function bind_current_time(media, get2, set2 = get2) { 3050 - var raf_id; 3051 - var value; 3052 - var callback = () => { 3053 - cancelAnimationFrame(raf_id); 3054 - if (!media.paused) { 3055 - raf_id = requestAnimationFrame(callback); 3056 - } 3057 - var next_value = media.currentTime; 3058 - if (value !== next_value) { 3059 - set2(value = next_value); 3060 - } 3061 - }; 3062 - raf_id = requestAnimationFrame(callback); 3063 - media.addEventListener("timeupdate", callback); 3064 - render_effect(() => { 3065 - var next_value = Number(get2()); 3066 - if (value !== next_value && !isNaN( 3067 - /** @type {any} */ 3068 - next_value 3069 - )) { 3070 - media.currentTime = value = next_value; 3071 - } 3072 - }); 3073 - teardown(() => { 3074 - cancelAnimationFrame(raf_id); 3075 - media.removeEventListener("timeupdate", callback); 3076 - }); 3077 - } 3078 - function bind_buffered(media, set2) { 3079 - var current; 3080 - listen(media, ["loadedmetadata", "progress", "timeupdate", "seeking"], () => { 3081 - var ranges = media.buffered; 3082 - if (!current || current.length !== ranges.length || current.some((range, i) => ranges.start(i) !== range.start || ranges.end(i) !== range.end)) { 3083 - current = time_ranges_to_array(ranges); 3084 - set2(current); 3085 - } 3086 - }); 3087 - } 3088 - function bind_seekable(media, set2) { 3089 - listen(media, ["loadedmetadata"], () => set2(time_ranges_to_array(media.seekable))); 3090 - } 3091 - function bind_played(media, set2) { 3092 - listen(media, ["timeupdate"], () => set2(time_ranges_to_array(media.played))); 3093 - } 3094 - function bind_seeking(media, set2) { 3095 - listen(media, ["seeking", "seeked"], () => set2(media.seeking)); 3096 - } 3097 - function bind_ended(media, set2) { 3098 - listen(media, ["timeupdate", "ended"], () => set2(media.ended)); 3099 - } 3100 - function bind_ready_state(media, set2) { 3101 - listen( 3102 - media, 3103 - ["loadedmetadata", "loadeddata", "canplay", "canplaythrough", "playing", "waiting", "emptied"], 3104 - () => set2(media.readyState) 3105 - ); 3106 - } 3107 - function bind_playback_rate(media, get2, set2 = get2) { 3108 - effect(() => { 3109 - var value = Number(get2()); 3110 - if (value !== media.playbackRate && !isNaN(value)) { 3111 - media.playbackRate = value; 3112 - } 3113 - }); 3114 - effect(() => { 3115 - listen(media, ["ratechange"], () => { 3116 - set2(media.playbackRate); 3117 - }); 3118 - }); 3119 - } 3120 - function bind_paused(media, get2, set2 = get2) { 3121 - var paused = get2(); 3122 - var update2 = () => { 3123 - if (paused !== media.paused) { 3124 - set2(paused = media.paused); 3125 - } 3126 - }; 3127 - listen(media, ["play", "pause", "canplay"], update2, paused == null); 3128 - effect(() => { 3129 - if ((paused = !!get2()) !== media.paused) { 3130 - if (paused) { 3131 - media.pause(); 3132 - } else { 3133 - media.play().catch((error) => { 3134 - set2(paused = true); 3135 - throw error; 3136 - }); 3137 - } 3138 - } 3139 - }); 3140 - } 3141 - function bind_volume(media, get2, set2 = get2) { 3142 - var callback = () => { 3143 - set2(media.volume); 3144 - }; 3145 - if (get2() == null) { 3146 - callback(); 3147 - } 3148 - listen(media, ["volumechange"], callback, false); 3149 - render_effect(() => { 3150 - var value = Number(get2()); 3151 - if (value !== media.volume && !isNaN(value)) { 3152 - media.volume = value; 3153 - } 3154 - }); 3155 - } 3156 - function bind_muted(media, get2, set2 = get2) { 3157 - var callback = () => { 3158 - set2(media.muted); 3159 - }; 3160 - if (get2() == null) { 3161 - callback(); 3162 - } 3163 - listen(media, ["volumechange"], callback, false); 3164 - render_effect(() => { 3165 - var value = !!get2(); 3166 - if (media.muted !== value) media.muted = value; 3167 - }); 3168 - } 3169 - 3170 - // node_modules/svelte/src/internal/client/dom/elements/bindings/navigator.js 3171 - function bind_online(update2) { 3172 - listen(window, ["online", "offline"], () => { 3173 - update2(navigator.onLine); 3174 - }); 3175 - } 3176 - 3177 - // node_modules/svelte/src/internal/client/dom/elements/bindings/props.js 3178 - function bind_prop(props, prop2, value) { 3179 - var desc = get_descriptor(props, prop2); 3180 - if (desc && desc.set) { 3181 - props[prop2] = value; 3182 - teardown(() => { 3183 - props[prop2] = null; 3184 - }); 3185 - } 3186 - } 3187 - 3188 - // node_modules/svelte/src/internal/client/dom/elements/bindings/size.js 3189 - var ResizeObserverSingleton = class _ResizeObserverSingleton { 3190 - /** */ 3191 - #listeners = /* @__PURE__ */ new WeakMap(); 3192 - /** @type {ResizeObserver | undefined} */ 3193 - #observer; 3194 - /** @type {ResizeObserverOptions} */ 3195 - #options; 3196 - /** @static */ 3197 - static entries = /* @__PURE__ */ new WeakMap(); 3198 - /** @param {ResizeObserverOptions} options */ 3199 - constructor(options) { 3200 - this.#options = options; 3201 - } 3202 - /** 3203 - * @param {Element} element 3204 - * @param {(entry: ResizeObserverEntry) => any} listener 3205 - */ 3206 - observe(element2, listener) { 3207 - var listeners = this.#listeners.get(element2) || /* @__PURE__ */ new Set(); 3208 - listeners.add(listener); 3209 - this.#listeners.set(element2, listeners); 3210 - this.#getObserver().observe(element2, this.#options); 3211 - return () => { 3212 - var listeners2 = this.#listeners.get(element2); 3213 - listeners2.delete(listener); 3214 - if (listeners2.size === 0) { 3215 - this.#listeners.delete(element2); 3216 - this.#observer.unobserve(element2); 3217 - } 3218 - }; 3219 - } 3220 - #getObserver() { 3221 - return this.#observer ?? (this.#observer = new ResizeObserver( 3222 - /** @param {any} entries */ 3223 - (entries) => { 3224 - for (var entry of entries) { 3225 - _ResizeObserverSingleton.entries.set(entry.target, entry); 3226 - for (var listener of this.#listeners.get(entry.target) || []) { 3227 - listener(entry); 3228 - } 3229 - } 3230 - } 3231 - )); 3232 - } 3233 - }; 3234 - var resize_observer_content_box = new ResizeObserverSingleton({ 3235 - box: "content-box" 3236 - }); 3237 - var resize_observer_border_box = new ResizeObserverSingleton({ 3238 - box: "border-box" 3239 - }); 3240 - var resize_observer_device_pixel_content_box = new ResizeObserverSingleton({ 3241 - box: "device-pixel-content-box" 3242 - }); 3243 - function bind_resize_observer(element2, type, set2) { 3244 - var observer = type === "contentRect" || type === "contentBoxSize" ? resize_observer_content_box : type === "borderBoxSize" ? resize_observer_border_box : resize_observer_device_pixel_content_box; 3245 - var unsub = observer.observe( 3246 - element2, 3247 - /** @param {any} entry */ 3248 - (entry) => set2(entry[type]) 3249 - ); 3250 - teardown(unsub); 3251 - } 3252 - function bind_element_size(element2, type, set2) { 3253 - var unsub = resize_observer_border_box.observe(element2, () => set2(element2[type])); 3254 - effect(() => { 3255 - untrack(() => set2(element2[type])); 3256 - return unsub; 3257 - }); 3258 - } 3259 - 3260 - // node_modules/svelte/src/internal/client/dom/elements/bindings/this.js 3261 - function is_bound_this(bound_value, element_or_component) { 3262 - return bound_value === element_or_component || bound_value?.[STATE_SYMBOL] === element_or_component; 3263 - } 3264 - function bind_this(element_or_component = {}, update2, get_value, get_parts) { 3265 - var component_effect = ( 3266 - /** @type {ComponentContext} */ 3267 - component_context.r 3268 - ); 3269 - var parent = ( 3270 - /** @type {Effect} */ 3271 - active_effect 3272 - ); 3273 - effect(() => { 3274 - var old_parts; 3275 - var parts; 3276 - render_effect(() => { 3277 - old_parts = parts; 3278 - parts = get_parts?.() || []; 3279 - untrack(() => { 3280 - if (element_or_component !== get_value(...parts)) { 3281 - update2(element_or_component, ...parts); 3282 - if (old_parts && is_bound_this(get_value(...old_parts), element_or_component)) { 3283 - update2(null, ...old_parts); 3284 - } 3285 - } 3286 - }); 3287 - }); 3288 - return () => { 3289 - let p = parent; 3290 - while (p !== component_effect && p.parent !== null && p.parent.f & DESTROYING) { 3291 - p = p.parent; 3292 - } 3293 - const teardown2 = () => { 3294 - if (parts && is_bound_this(get_value(...parts), element_or_component)) { 3295 - update2(null, ...parts); 3296 - } 3297 - }; 3298 - const original_teardown = p.teardown; 3299 - p.teardown = () => { 3300 - teardown2(); 3301 - original_teardown?.(); 3302 - }; 3303 - }; 3304 - }); 3305 - return element_or_component; 3306 - } 3307 - 3308 - // node_modules/svelte/src/internal/client/dom/elements/bindings/universal.js 3309 - function bind_content_editable(property, element2, get2, set2 = get2) { 3310 - element2.addEventListener("input", () => { 3311 - set2(element2[property]); 3312 - }); 3313 - render_effect(() => { 3314 - var value = get2(); 3315 - if (element2[property] !== value) { 3316 - if (value == null) { 3317 - var non_null_value = element2[property]; 3318 - set2(non_null_value); 3319 - } else { 3320 - element2[property] = value + ""; 3321 - } 3322 - } 3323 - }); 3324 - } 3325 - function bind_property(property, event_name, element2, set2, get2) { 3326 - var handler = () => { 3327 - set2(element2[property]); 3328 - }; 3329 - element2.addEventListener(event_name, handler); 3330 - if (get2) { 3331 - render_effect(() => { 3332 - element2[property] = get2(); 3333 - }); 3334 - } else { 3335 - handler(); 3336 - } 3337 - if (element2 === document.body || element2 === window || element2 === document) { 3338 - teardown(() => { 3339 - element2.removeEventListener(event_name, handler); 3340 - }); 3341 - } 3342 - } 3343 - function bind_focused(element2, set2) { 3344 - listen(element2, ["focus", "blur"], () => { 3345 - set2(element2 === document.activeElement); 3346 - }); 3347 - } 3348 - 3349 - // node_modules/svelte/src/internal/client/dom/elements/bindings/window.js 3350 - function bind_window_scroll(type, get2, set2 = get2) { 3351 - var is_scrolling_x = type === "x"; 3352 - var target_handler = () => without_reactive_context(() => { 3353 - scrolling = true; 3354 - clearTimeout(timeout); 3355 - timeout = setTimeout(clear, 100); 3356 - set2(window[is_scrolling_x ? "scrollX" : "scrollY"]); 3357 - }); 3358 - addEventListener("scroll", target_handler, { 3359 - passive: true 3360 - }); 3361 - var scrolling = false; 3362 - var timeout; 3363 - var clear = () => { 3364 - scrolling = false; 3365 - }; 3366 - var first = true; 3367 - render_effect(() => { 3368 - var latest_value = get2(); 3369 - if (first) { 3370 - first = false; 3371 - } else if (!scrolling && latest_value != null) { 3372 - scrolling = true; 3373 - clearTimeout(timeout); 3374 - if (is_scrolling_x) { 3375 - scrollTo(latest_value, window.scrollY); 3376 - } else { 3377 - scrollTo(window.scrollX, latest_value); 3378 - } 3379 - timeout = setTimeout(clear, 100); 3380 - } 3381 - }); 3382 - effect(target_handler); 3383 - teardown(() => { 3384 - removeEventListener("scroll", target_handler); 3385 - }); 3386 - } 3387 - function bind_window_size(type, set2) { 3388 - listen(window, ["resize"], () => without_reactive_context(() => set2(window[type]))); 3389 - } 3390 - 3391 - // node_modules/svelte/src/internal/client/dom/legacy/lifecycle.js 3392 - function init(immutable = false) { 3393 - const context = ( 3394 - /** @type {ComponentContextLegacy} */ 3395 - component_context 3396 - ); 3397 - const callbacks = context.l.u; 3398 - if (!callbacks) return; 3399 - let props = () => deep_read_state(context.s); 3400 - if (immutable) { 3401 - let version = 0; 3402 - let prev = ( 3403 - /** @type {Record<string, any>} */ 3404 - {} 3405 - ); 3406 - const d = derived(() => { 3407 - let changed = false; 3408 - const props2 = context.s; 3409 - for (const key2 in props2) { 3410 - if (props2[key2] !== prev[key2]) { 3411 - prev[key2] = props2[key2]; 3412 - changed = true; 3413 - } 3414 - } 3415 - if (changed) version++; 3416 - return version; 3417 - }); 3418 - props = () => get(d); 3419 - } 3420 - if (callbacks.b.length) { 3421 - user_pre_effect(() => { 3422 - observe_all(context, props); 3423 - run_all(callbacks.b); 3424 - }); 3425 - } 3426 - user_effect(() => { 3427 - const fns = untrack(() => callbacks.m.map(run)); 3428 - return () => { 3429 - for (const fn of fns) { 3430 - if (typeof fn === "function") { 3431 - fn(); 3432 - } 3433 - } 3434 - }; 3435 - }); 3436 - if (callbacks.a.length) { 3437 - user_effect(() => { 3438 - observe_all(context, props); 3439 - run_all(callbacks.a); 3440 - }); 3441 - } 3442 - } 3443 - function observe_all(context, props) { 3444 - if (context.l.s) { 3445 - for (const signal of context.l.s) get(signal); 3446 - } 3447 - props(); 3448 - } 3449 - 3450 - // node_modules/svelte/src/internal/client/dom/legacy/misc.js 3451 - function reactive_import(fn) { 3452 - var s = source(0); 3453 - return function() { 3454 - if (arguments.length === 1) { 3455 - set(s, get(s) + 1); 3456 - return arguments[0]; 3457 - } else { 3458 - get(s); 3459 - return fn(); 3460 - } 3461 - }; 3462 - } 3463 - function bubble_event($$props, event2) { 3464 - var events = ( 3465 - /** @type {Record<string, Function[] | Function>} */ 3466 - $$props.$$events?.[event2.type] 3467 - ); 3468 - var callbacks = is_array(events) ? events.slice() : events == null ? [] : [events]; 3469 - for (var fn of callbacks) { 3470 - fn.call(this, event2); 3471 - } 3472 - } 3473 - function add_legacy_event_listener($$props, event_name, event_callback) { 3474 - $$props.$$events ||= {}; 3475 - $$props.$$events[event_name] ||= []; 3476 - $$props.$$events[event_name].push(event_callback); 3477 - } 3478 - function update_legacy_props($$new_props) { 3479 - for (var key2 in $$new_props) { 3480 - if (key2 in this) { 3481 - this[key2] = $$new_props[key2]; 3482 - } 3483 - } 3484 - } 3485 - 3486 - // node_modules/svelte/src/internal/client/reactivity/props.js 3487 - function update_prop(fn, d = 1) { 3488 - const value = fn(); 3489 - fn(value + d); 3490 - return value; 3491 - } 3492 - function update_pre_prop(fn, d = 1) { 3493 - const value = fn() + d; 3494 - fn(value); 3495 - return value; 3496 - } 3497 - var rest_props_handler = { 3498 - get(target, key2) { 3499 - if (target.exclude.includes(key2)) return; 3500 - return target.props[key2]; 3501 - }, 3502 - set(target, key2) { 3503 - if (true_default) { 3504 - props_rest_readonly(`${target.name}.${String(key2)}`); 3505 - } 3506 - return false; 3507 - }, 3508 - getOwnPropertyDescriptor(target, key2) { 3509 - if (target.exclude.includes(key2)) return; 3510 - if (key2 in target.props) { 3511 - return { 3512 - enumerable: true, 3513 - configurable: true, 3514 - value: target.props[key2] 3515 - }; 3516 - } 3517 - }, 3518 - has(target, key2) { 3519 - if (target.exclude.includes(key2)) return false; 3520 - return key2 in target.props; 3521 - }, 3522 - ownKeys(target) { 3523 - return Reflect.ownKeys(target.props).filter((key2) => !target.exclude.includes(key2)); 3524 - } 3525 - }; 3526 - function rest_props(props, exclude, name) { 3527 - return new Proxy( 3528 - true_default ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude }, 3529 - rest_props_handler 3530 - ); 3531 - } 3532 - var legacy_rest_props_handler = { 3533 - get(target, key2) { 3534 - if (target.exclude.includes(key2)) return; 3535 - get(target.version); 3536 - return key2 in target.special ? target.special[key2]() : target.props[key2]; 3537 - }, 3538 - set(target, key2, value) { 3539 - if (!(key2 in target.special)) { 3540 - var previous_effect = active_effect; 3541 - try { 3542 - set_active_effect(target.parent_effect); 3543 - target.special[key2] = prop( 3544 - { 3545 - get [key2]() { 3546 - return target.props[key2]; 3547 - } 3548 - }, 3549 - /** @type {string} */ 3550 - key2, 3551 - PROPS_IS_UPDATED 3552 - ); 3553 - } finally { 3554 - set_active_effect(previous_effect); 3555 - } 3556 - } 3557 - target.special[key2](value); 3558 - update(target.version); 3559 - return true; 3560 - }, 3561 - getOwnPropertyDescriptor(target, key2) { 3562 - if (target.exclude.includes(key2)) return; 3563 - if (key2 in target.props) { 3564 - return { 3565 - enumerable: true, 3566 - configurable: true, 3567 - value: target.props[key2] 3568 - }; 3569 - } 3570 - }, 3571 - deleteProperty(target, key2) { 3572 - if (target.exclude.includes(key2)) return true; 3573 - target.exclude.push(key2); 3574 - update(target.version); 3575 - return true; 3576 - }, 3577 - has(target, key2) { 3578 - if (target.exclude.includes(key2)) return false; 3579 - return key2 in target.props; 3580 - }, 3581 - ownKeys(target) { 3582 - return Reflect.ownKeys(target.props).filter((key2) => !target.exclude.includes(key2)); 3583 - } 3584 - }; 3585 - function legacy_rest_props(props, exclude) { 3586 - return new Proxy( 3587 - { 3588 - props, 3589 - exclude, 3590 - special: {}, 3591 - version: source(0), 3592 - // TODO this is only necessary because we need to track component 3593 - // destruction inside `prop`, because of `bind:this`, but it 3594 - // seems likely that we can simplify `bind:this` instead 3595 - parent_effect: ( 3596 - /** @type {Effect} */ 3597 - active_effect 3598 - ) 3599 - }, 3600 - legacy_rest_props_handler 3601 - ); 3602 - } 3603 - var spread_props_handler = { 3604 - get(target, key2) { 3605 - let i = target.props.length; 3606 - while (i--) { 3607 - let p = target.props[i]; 3608 - if (is_function(p)) p = p(); 3609 - if (typeof p === "object" && p !== null && key2 in p) return p[key2]; 3610 - } 3611 - }, 3612 - set(target, key2, value) { 3613 - let i = target.props.length; 3614 - while (i--) { 3615 - let p = target.props[i]; 3616 - if (is_function(p)) p = p(); 3617 - const desc = get_descriptor(p, key2); 3618 - if (desc && desc.set) { 3619 - desc.set(value); 3620 - return true; 3621 - } 3622 - } 3623 - return false; 3624 - }, 3625 - getOwnPropertyDescriptor(target, key2) { 3626 - let i = target.props.length; 3627 - while (i--) { 3628 - let p = target.props[i]; 3629 - if (is_function(p)) p = p(); 3630 - if (typeof p === "object" && p !== null && key2 in p) { 3631 - const descriptor = get_descriptor(p, key2); 3632 - if (descriptor && !descriptor.configurable) { 3633 - descriptor.configurable = true; 3634 - } 3635 - return descriptor; 3636 - } 3637 - } 3638 - }, 3639 - has(target, key2) { 3640 - if (key2 === STATE_SYMBOL || key2 === LEGACY_PROPS) return false; 3641 - for (let p of target.props) { 3642 - if (is_function(p)) p = p(); 3643 - if (p != null && key2 in p) return true; 3644 - } 3645 - return false; 3646 - }, 3647 - ownKeys(target) { 3648 - const keys = []; 3649 - for (let p of target.props) { 3650 - if (is_function(p)) p = p(); 3651 - if (!p) continue; 3652 - for (const key2 in p) { 3653 - if (!keys.includes(key2)) keys.push(key2); 3654 - } 3655 - for (const key2 of Object.getOwnPropertySymbols(p)) { 3656 - if (!keys.includes(key2)) keys.push(key2); 3657 - } 3658 - } 3659 - return keys; 3660 - } 3661 - }; 3662 - function spread_props(...props) { 3663 - return new Proxy({ props }, spread_props_handler); 3664 - } 3665 - function prop(props, key2, flags, fallback2) { 3666 - var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0; 3667 - var bindable = (flags & PROPS_IS_BINDABLE) !== 0; 3668 - var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0; 3669 - var fallback_value = ( 3670 - /** @type {V} */ 3671 - fallback2 3672 - ); 3673 - var fallback_dirty = true; 3674 - var get_fallback = () => { 3675 - if (fallback_dirty) { 3676 - fallback_dirty = false; 3677 - fallback_value = lazy ? untrack( 3678 - /** @type {() => V} */ 3679 - fallback2 3680 - ) : ( 3681 - /** @type {V} */ 3682 - fallback2 3683 - ); 3684 - } 3685 - return fallback_value; 3686 - }; 3687 - let setter; 3688 - if (bindable) { 3689 - var is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props; 3690 - setter = get_descriptor(props, key2)?.set ?? (is_entry_props && key2 in props ? (v) => props[key2] = v : void 0); 3691 - } 3692 - var initial_value; 3693 - var is_store_sub = false; 3694 - if (bindable) { 3695 - [initial_value, is_store_sub] = capture_store_binding(() => ( 3696 - /** @type {V} */ 3697 - props[key2] 3698 - )); 3699 - } else { 3700 - initial_value = /** @type {V} */ 3701 - props[key2]; 3702 - } 3703 - if (initial_value === void 0 && fallback2 !== void 0) { 3704 - initial_value = get_fallback(); 3705 - if (setter) { 3706 - if (runes) props_invalid_value(key2); 3707 - setter(initial_value); 3708 - } 3709 - } 3710 - var getter; 3711 - if (runes) { 3712 - getter = () => { 3713 - var value = ( 3714 - /** @type {V} */ 3715 - props[key2] 3716 - ); 3717 - if (value === void 0) return get_fallback(); 3718 - fallback_dirty = true; 3719 - return value; 3720 - }; 3721 - } else { 3722 - getter = () => { 3723 - var value = ( 3724 - /** @type {V} */ 3725 - props[key2] 3726 - ); 3727 - if (value !== void 0) { 3728 - fallback_value = /** @type {V} */ 3729 - void 0; 3730 - } 3731 - return value === void 0 ? fallback_value : value; 3732 - }; 3733 - } 3734 - if (runes && (flags & PROPS_IS_UPDATED) === 0) { 3735 - return getter; 3736 - } 3737 - if (setter) { 3738 - var legacy_parent = props.$$legacy; 3739 - return ( 3740 - /** @type {() => V} */ 3741 - (function(value, mutation) { 3742 - if (arguments.length > 0) { 3743 - if (!runes || !mutation || legacy_parent || is_store_sub) { 3744 - setter(mutation ? getter() : value); 3745 - } 3746 - return value; 3747 - } 3748 - return getter(); 3749 - }) 3750 - ); 3751 - } 3752 - var overridden = false; 3753 - var d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => { 3754 - overridden = false; 3755 - return getter(); 3756 - }); 3757 - if (true_default) { 3758 - d.label = key2; 3759 - } 3760 - if (bindable) get(d); 3761 - var parent_effect = ( 3762 - /** @type {Effect} */ 3763 - active_effect 3764 - ); 3765 - return ( 3766 - /** @type {() => V} */ 3767 - (function(value, mutation) { 3768 - if (arguments.length > 0) { 3769 - const new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value; 3770 - set(d, new_value); 3771 - overridden = true; 3772 - if (fallback_value !== void 0) { 3773 - fallback_value = new_value; 3774 - } 3775 - return value; 3776 - } 3777 - if (is_destroying_effect && overridden || (parent_effect.f & DESTROYED) !== 0) { 3778 - return d.v; 3779 - } 3780 - return get(d); 3781 - }) 3782 - ); 3783 - } 3784 - 3785 - // node_modules/svelte/src/internal/client/validate.js 3786 - function validate_binding(binding, blockers, get_object, get_property, line, column) { 3787 - run_after_blockers(blockers, () => { 3788 - var warned = false; 3789 - var filename = dev_current_component_function?.[FILENAME]; 3790 - render_effect(() => { 3791 - if (warned) return; 3792 - var [object, is_store_sub] = capture_store_binding(get_object); 3793 - if (is_store_sub) return; 3794 - var property = get_property(); 3795 - var ran = false; 3796 - var effect2 = render_effect(() => { 3797 - if (ran) return; 3798 - object[property]; 3799 - }); 3800 - ran = true; 3801 - if (effect2.deps === null) { 3802 - var location = `${filename}:${line}:${column}`; 3803 - binding_property_non_reactive(binding, location); 3804 - warned = true; 3805 - } 3806 - }); 3807 - }); 3808 - } 3809 - 3810 - // node_modules/svelte/src/internal/client/dom/elements/custom-element.js 3811 - var SvelteElement; 3812 - if (typeof HTMLElement === "function") { 3813 - SvelteElement = class extends HTMLElement { 3814 - /** The Svelte component constructor */ 3815 - $$ctor; 3816 - /** Slots */ 3817 - $$s; 3818 - /** @type {any} The Svelte component instance */ 3819 - $$c; 3820 - /** Whether or not the custom element is connected */ 3821 - $$cn = false; 3822 - /** @type {Record<string, any>} Component props data */ 3823 - $$d = {}; 3824 - /** `true` if currently in the process of reflecting component props back to attributes */ 3825 - $$r = false; 3826 - /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */ 3827 - $$p_d = {}; 3828 - /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */ 3829 - $$l = {}; 3830 - /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */ 3831 - $$l_u = /* @__PURE__ */ new Map(); 3832 - /** @type {any} The managed render effect for reflecting attributes */ 3833 - $$me; 3834 - /** @type {ShadowRoot | null} The ShadowRoot of the custom element */ 3835 - $$shadowRoot = null; 3836 - /** 3837 - * @param {*} $$componentCtor 3838 - * @param {*} $$slots 3839 - * @param {ShadowRootInit | undefined} shadow_root_init 3840 - */ 3841 - constructor($$componentCtor, $$slots, shadow_root_init) { 3842 - super(); 3843 - this.$$ctor = $$componentCtor; 3844 - this.$$s = $$slots; 3845 - if (shadow_root_init) { 3846 - this.$$shadowRoot = this.attachShadow(shadow_root_init); 3847 - } 3848 - } 3849 - /** 3850 - * @param {string} type 3851 - * @param {EventListenerOrEventListenerObject} listener 3852 - * @param {boolean | AddEventListenerOptions} [options] 3853 - */ 3854 - addEventListener(type, listener, options) { 3855 - this.$$l[type] = this.$$l[type] || []; 3856 - this.$$l[type].push(listener); 3857 - if (this.$$c) { 3858 - const unsub = this.$$c.$on(type, listener); 3859 - this.$$l_u.set(listener, unsub); 3860 - } 3861 - super.addEventListener(type, listener, options); 3862 - } 3863 - /** 3864 - * @param {string} type 3865 - * @param {EventListenerOrEventListenerObject} listener 3866 - * @param {boolean | AddEventListenerOptions} [options] 3867 - */ 3868 - removeEventListener(type, listener, options) { 3869 - super.removeEventListener(type, listener, options); 3870 - if (this.$$c) { 3871 - const unsub = this.$$l_u.get(listener); 3872 - if (unsub) { 3873 - unsub(); 3874 - this.$$l_u.delete(listener); 3875 - } 3876 - } 3877 - } 3878 - async connectedCallback() { 3879 - this.$$cn = true; 3880 - if (!this.$$c) { 3881 - let create_slot = function(name) { 3882 - return (anchor) => { 3883 - const slot2 = create_element("slot"); 3884 - if (name !== "default") slot2.name = name; 3885 - append(anchor, slot2); 3886 - }; 3887 - }; 3888 - await Promise.resolve(); 3889 - if (!this.$$cn || this.$$c) { 3890 - return; 3891 - } 3892 - const $$slots = {}; 3893 - const existing_slots = get_custom_elements_slots(this); 3894 - for (const name of this.$$s) { 3895 - if (name in existing_slots) { 3896 - if (name === "default" && !this.$$d.children) { 3897 - this.$$d.children = create_slot(name); 3898 - $$slots.default = true; 3899 - } else { 3900 - $$slots[name] = create_slot(name); 3901 - } 3902 - } 3903 - } 3904 - for (const attribute of this.attributes) { 3905 - const name = this.$$g_p(attribute.name); 3906 - if (!(name in this.$$d)) { 3907 - this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp"); 3908 - } 3909 - } 3910 - for (const key2 in this.$$p_d) { 3911 - if (!(key2 in this.$$d) && this[key2] !== void 0) { 3912 - this.$$d[key2] = this[key2]; 3913 - delete this[key2]; 3914 - } 3915 - } 3916 - this.$$c = createClassComponent({ 3917 - component: this.$$ctor, 3918 - target: this.$$shadowRoot || this, 3919 - props: { 3920 - ...this.$$d, 3921 - $$slots, 3922 - $$host: this 3923 - } 3924 - }); 3925 - this.$$me = effect_root(() => { 3926 - render_effect(() => { 3927 - this.$$r = true; 3928 - for (const key2 of object_keys(this.$$c)) { 3929 - if (!this.$$p_d[key2]?.reflect) continue; 3930 - this.$$d[key2] = this.$$c[key2]; 3931 - const attribute_value = get_custom_element_value( 3932 - key2, 3933 - this.$$d[key2], 3934 - this.$$p_d, 3935 - "toAttribute" 3936 - ); 3937 - if (attribute_value == null) { 3938 - this.removeAttribute(this.$$p_d[key2].attribute || key2); 3939 - } else { 3940 - this.setAttribute(this.$$p_d[key2].attribute || key2, attribute_value); 3941 - } 3942 - } 3943 - this.$$r = false; 3944 - }); 3945 - }); 3946 - for (const type in this.$$l) { 3947 - for (const listener of this.$$l[type]) { 3948 - const unsub = this.$$c.$on(type, listener); 3949 - this.$$l_u.set(listener, unsub); 3950 - } 3951 - } 3952 - this.$$l = {}; 3953 - } 3954 - } 3955 - // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte 3956 - // and setting attributes through setAttribute etc, this is helpful 3957 - /** 3958 - * @param {string} attr 3959 - * @param {string} _oldValue 3960 - * @param {string} newValue 3961 - */ 3962 - attributeChangedCallback(attr2, _oldValue, newValue) { 3963 - if (this.$$r) return; 3964 - attr2 = this.$$g_p(attr2); 3965 - this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp"); 3966 - this.$$c?.$set({ [attr2]: this.$$d[attr2] }); 3967 - } 3968 - disconnectedCallback() { 3969 - this.$$cn = false; 3970 - Promise.resolve().then(() => { 3971 - if (!this.$$cn && this.$$c) { 3972 - this.$$c.$destroy(); 3973 - this.$$me(); 3974 - this.$$c = void 0; 3975 - } 3976 - }); 3977 - } 3978 - /** 3979 - * @param {string} attribute_name 3980 - */ 3981 - $$g_p(attribute_name) { 3982 - return object_keys(this.$$p_d).find( 3983 - (key2) => this.$$p_d[key2].attribute === attribute_name || !this.$$p_d[key2].attribute && key2.toLowerCase() === attribute_name 3984 - ) || attribute_name; 3985 - } 3986 - }; 3987 - } 3988 - function get_custom_element_value(prop2, value, props_definition, transform) { 3989 - const type = props_definition[prop2]?.type; 3990 - value = type === "Boolean" && typeof value !== "boolean" ? value != null : value; 3991 - if (!transform || !props_definition[prop2]) { 3992 - return value; 3993 - } else if (transform === "toAttribute") { 3994 - switch (type) { 3995 - case "Object": 3996 - case "Array": 3997 - return value == null ? null : JSON.stringify(value); 3998 - case "Boolean": 3999 - return value ? "" : null; 4000 - case "Number": 4001 - return value == null ? null : value; 4002 - default: 4003 - return value; 4004 - } 4005 - } else { 4006 - switch (type) { 4007 - case "Object": 4008 - case "Array": 4009 - return value && JSON.parse(value); 4010 - case "Boolean": 4011 - return value; 4012 - // conversion already handled above 4013 - case "Number": 4014 - return value != null ? +value : value; 4015 - default: 4016 - return value; 4017 - } 4018 - } 4019 - } 4020 - function get_custom_elements_slots(element2) { 4021 - const result = {}; 4022 - element2.childNodes.forEach((node) => { 4023 - result[ 4024 - /** @type {Element} node */ 4025 - node.slot || "default" 4026 - ] = true; 4027 - }); 4028 - return result; 4029 - } 4030 - function create_custom_element(Component, props_definition, slots, exports, shadow_root_init, extend) { 4031 - let Class = class extends SvelteElement { 4032 - constructor() { 4033 - super(Component, slots, shadow_root_init); 4034 - this.$$p_d = props_definition; 4035 - } 4036 - static get observedAttributes() { 4037 - return object_keys(props_definition).map( 4038 - (key2) => (props_definition[key2].attribute || key2).toLowerCase() 4039 - ); 4040 - } 4041 - }; 4042 - object_keys(props_definition).forEach((prop2) => { 4043 - define_property(Class.prototype, prop2, { 4044 - get() { 4045 - return this.$$c && prop2 in this.$$c ? this.$$c[prop2] : this.$$d[prop2]; 4046 - }, 4047 - set(value) { 4048 - value = get_custom_element_value(prop2, value, props_definition); 4049 - this.$$d[prop2] = value; 4050 - var component2 = this.$$c; 4051 - if (component2) { 4052 - var setter = get_descriptor(component2, prop2)?.get; 4053 - if (setter) { 4054 - component2[prop2] = value; 4055 - } else { 4056 - component2.$set({ [prop2]: value }); 4057 - } 4058 - } 4059 - } 4060 - }); 4061 - }); 4062 - exports.forEach((property) => { 4063 - define_property(Class.prototype, property, { 4064 - get() { 4065 - return this.$$c?.[property]; 4066 - } 4067 - }); 4068 - }); 4069 - if (extend) { 4070 - Class = extend(Class); 4071 - } 4072 - Component.element = /** @type {any} */ 4073 - Class; 4074 - return Class; 4075 - } 4076 - 4077 - // node_modules/svelte/src/internal/client/dev/console-log.js 4078 - function log_if_contains_state(method, ...objects) { 4079 - untrack(() => { 4080 - try { 4081 - let has_state = false; 4082 - const transformed = []; 4083 - for (const obj of objects) { 4084 - if (obj && typeof obj === "object" && STATE_SYMBOL in obj) { 4085 - transformed.push(snapshot(obj, true)); 4086 - has_state = true; 4087 - } else { 4088 - transformed.push(obj); 4089 - } 4090 - } 4091 - if (has_state) { 4092 - console_log_state(method); 4093 - console.log("%c[snapshot]", "color: grey", ...transformed); 4094 - } 4095 - } catch { 4096 - } 4097 - }); 4098 - return objects; 4099 - } 4100 - 4101 - // node_modules/svelte/src/internal/client/hydratable.js 4102 - function hydratable(key2, fn) { 4103 - if (!async_mode_flag) { 4104 - experimental_async_required("hydratable"); 4105 - } 4106 - if (hydrating) { 4107 - const store = window.__svelte?.h; 4108 - if (store?.has(key2)) { 4109 - return ( 4110 - /** @type {T} */ 4111 - store.get(key2) 4112 - ); 4113 - } 4114 - if (true_default) { 4115 - hydratable_missing_but_required(key2); 4116 - } else { 4117 - hydratable_missing_but_expected(key2); 4118 - } 4119 - } 4120 - return fn(); 4121 - } 4122 - 4123 - // node_modules/svelte/src/index-client.js 4124 - if (true_default) { 4125 - let throw_rune_error = function(rune) { 4126 - if (!(rune in globalThis)) { 4127 - let value; 4128 - Object.defineProperty(globalThis, rune, { 4129 - configurable: true, 4130 - // eslint-disable-next-line getter-return 4131 - get: () => { 4132 - if (value !== void 0) { 4133 - return value; 4134 - } 4135 - rune_outside_svelte(rune); 4136 - }, 4137 - set: (v) => { 4138 - value = v; 4139 - } 4140 - }); 4141 - } 4142 - }; 4143 - throw_rune_error("$state"); 4144 - throw_rune_error("$effect"); 4145 - throw_rune_error("$derived"); 4146 - throw_rune_error("$inspect"); 4147 - throw_rune_error("$props"); 4148 - throw_rune_error("$bindable"); 4149 - } 4150 - function getAbortSignal() { 4151 - if (active_reaction === null) { 4152 - get_abort_signal_outside_reaction(); 4153 - } 4154 - return (active_reaction.ac ??= new AbortController()).signal; 4155 - } 4156 - function onMount(fn) { 4157 - if (component_context === null) { 4158 - lifecycle_outside_component("onMount"); 4159 - } 4160 - if (legacy_mode_flag && component_context.l !== null) { 4161 - init_update_callbacks(component_context).m.push(fn); 4162 - } else { 4163 - user_effect(() => { 4164 - const cleanup = untrack(fn); 4165 - if (typeof cleanup === "function") return ( 4166 - /** @type {() => void} */ 4167 - cleanup 4168 - ); 4169 - }); 4170 - } 4171 - } 4172 - function onDestroy(fn) { 4173 - if (component_context === null) { 4174 - lifecycle_outside_component("onDestroy"); 4175 - } 4176 - onMount(() => () => untrack(fn)); 4177 - } 4178 - function create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) { 4179 - return new CustomEvent(type, { detail, bubbles, cancelable }); 4180 - } 4181 - function createEventDispatcher() { 4182 - const active_component_context = component_context; 4183 - if (active_component_context === null) { 4184 - lifecycle_outside_component("createEventDispatcher"); 4185 - } 4186 - return (type, detail, options) => { 4187 - const events = ( 4188 - /** @type {Record<string, Function | Function[]>} */ 4189 - active_component_context.s.$$events?.[ 4190 - /** @type {string} */ 4191 - type 4192 - ] 4193 - ); 4194 - if (events) { 4195 - const callbacks = is_array(events) ? events.slice() : [events]; 4196 - const event2 = create_custom_event( 4197 - /** @type {string} */ 4198 - type, 4199 - detail, 4200 - options 4201 - ); 4202 - for (const fn of callbacks) { 4203 - fn.call(active_component_context.x, event2); 4204 - } 4205 - return !event2.defaultPrevented; 4206 - } 4207 - return true; 4208 - }; 4209 - } 4210 - function beforeUpdate(fn) { 4211 - if (component_context === null) { 4212 - lifecycle_outside_component("beforeUpdate"); 4213 - } 4214 - if (component_context.l === null) { 4215 - lifecycle_legacy_only("beforeUpdate"); 4216 - } 4217 - init_update_callbacks(component_context).b.push(fn); 4218 - } 4219 - function afterUpdate(fn) { 4220 - if (component_context === null) { 4221 - lifecycle_outside_component("afterUpdate"); 4222 - } 4223 - if (component_context.l === null) { 4224 - lifecycle_legacy_only("afterUpdate"); 4225 - } 4226 - init_update_callbacks(component_context).a.push(fn); 4227 - } 4228 - function init_update_callbacks(context) { 4229 - var l = ( 4230 - /** @type {ComponentContextLegacy} */ 4231 - context.l 4232 - ); 4233 - return l.u ??= { a: [], b: [], m: [] }; 4234 - } 4235 - 4236 - // node_modules/svelte/src/attachments/index.js 4237 - function createAttachmentKey() { 4238 - return Symbol(ATTACHMENT_KEY); 4239 - } 4240 - function fromAction(action2, fn = ( 4241 - /** @type {() => T} */ 4242 - noop 4243 - )) { 4244 - return (element2) => { 4245 - const { update: update2, destroy } = untrack(() => action2(element2, fn()) ?? {}); 4246 - if (update2) { 4247 - var ran = false; 4248 - render_effect(() => { 4249 - const arg = fn(); 4250 - if (ran) update2(arg); 4251 - }); 4252 - ran = true; 4253 - } 4254 - if (destroy) { 4255 - teardown(destroy); 4256 - } 4257 - }; 4258 - } 4259 - 4260 - export { 4261 - createAttachmentKey, 4262 - fromAction, 4263 - assign, 4264 - assign_async, 4265 - cleanup_styles, 4266 - add_locations, 4267 - hmr, 4268 - create_ownership_validator, 4269 - check_target, 4270 - legacy_api, 4271 - inspect, 4272 - async, 4273 - validate_snippet_args, 4274 - await_block, 4275 - if_block, 4276 - key, 4277 - css_props, 4278 - index, 4279 - each, 4280 - html, 4281 - slot, 4282 - sanitize_slots, 4283 - validate_void_dynamic_element, 4284 - validate_dynamic_element_tag, 4285 - validate_store, 4286 - prevent_snippet_stringification, 4287 - snippet, 4288 - wrap_snippet, 4289 - createRawSnippet, 4290 - component, 4291 - raf, 4292 - loop, 4293 - animation, 4294 - transition, 4295 - element, 4296 - head, 4297 - append_styles, 4298 - action, 4299 - attach, 4300 - attr, 4301 - clsx2 as clsx, 4302 - set_class, 4303 - set_style, 4304 - select_option, 4305 - init_select, 4306 - bind_select_value, 4307 - CLASS, 4308 - STYLE, 4309 - remove_input_defaults, 4310 - set_value, 4311 - set_checked, 4312 - set_selected, 4313 - set_default_checked, 4314 - set_default_value, 4315 - set_attribute, 4316 - set_xlink_attribute, 4317 - set_custom_element_data, 4318 - attribute_effect, 4319 - selectedcontent, 4320 - customizable_select, 4321 - bind_active_element, 4322 - bind_value, 4323 - bind_group, 4324 - bind_checked, 4325 - bind_files, 4326 - bind_current_time, 4327 - bind_buffered, 4328 - bind_seekable, 4329 - bind_played, 4330 - bind_seeking, 4331 - bind_ended, 4332 - bind_ready_state, 4333 - bind_playback_rate, 4334 - bind_paused, 4335 - bind_volume, 4336 - bind_muted, 4337 - bind_online, 4338 - bind_prop, 4339 - bind_resize_observer, 4340 - bind_element_size, 4341 - bind_this, 4342 - bind_content_editable, 4343 - bind_property, 4344 - bind_focused, 4345 - bind_window_scroll, 4346 - bind_window_size, 4347 - init, 4348 - reactive_import, 4349 - bubble_event, 4350 - add_legacy_event_listener, 4351 - update_legacy_props, 4352 - update_prop, 4353 - update_pre_prop, 4354 - rest_props, 4355 - legacy_rest_props, 4356 - spread_props, 4357 - prop, 4358 - validate_binding, 4359 - create_custom_element, 4360 - log_if_contains_state, 4361 - hydratable, 4362 - getAbortSignal, 4363 - onMount, 4364 - onDestroy, 4365 - createEventDispatcher, 4366 - beforeUpdate, 4367 - afterUpdate 4368 - }; 4369 - //# sourceMappingURL=chunk-LYAULJVB.js.map
-7
node_modules/.vite/deps/chunk-LYAULJVB.js.map
··· 1 - { 2 - "version": 3, 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/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/internal/client/hydratable.js", "../../svelte/src/index-client.js", "../../svelte/src/attachments/index.js"], 4 - "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 {string} operator\n * @param {any} rhs\n * @param {string} location\n */\nexport function assign(object, property, operator, rhs, location) {\n\treturn compare(\n\t\toperator === '='\n\t\t\t? (object[property] = rhs)\n\t\t\t: operator === '&&='\n\t\t\t\t? (object[property] &&= rhs())\n\t\t\t\t: operator === '||='\n\t\t\t\t\t? (object[property] ||= rhs())\n\t\t\t\t\t: operator === '??='\n\t\t\t\t\t\t? (object[property] ??= rhs())\n\t\t\t\t\t\t: null,\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 {string} operator\n * @param {any} rhs\n * @param {string} location\n */\nexport async function assign_async(object, property, operator, rhs, location) {\n\treturn compare(\n\t\toperator === '='\n\t\t\t? (object[property] = await rhs)\n\t\t\t: operator === '&&='\n\t\t\t\t? (object[property] &&= await rhs())\n\t\t\t\t: operator === '||='\n\t\t\t\t\t? (object[property] ||= await rhs())\n\t\t\t\t\t: operator === '??='\n\t\t\t\t\t\t? (object[property] ??= await rhs())\n\t\t\t\t\t\t: null,\n\t\tuntrack(() => object[property]),\n\t\tproperty,\n\t\tlocation\n\t);\n}\n", "/** @type {Map<String, Set<HTMLStyleElement>>} */\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 } 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[0] === HYDRATION_START) 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 { active_effect, 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\tvar result =\n\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\tnew.target ? new component(anchor, props) : component(anchor, props);\n\t\t\t\t// a component is not guaranteed to return something and we can't invoke getOwnPropertyDescriptors on undefined\n\t\t\t\tif (result) {\n\t\t\t\t\tObject.defineProperties(instance, Object.getOwnPropertyDescriptors(result));\n\t\t\t\t}\n\n\t\t\t\tif (ran) set_should_intro(true);\n\t\t\t});\n\n\t\t\t// Forward the nodes from the inner effect to the outer active effect which would\n\t\t\t// get them if the HMR wrapper wasn't there. Do this inside the block not outside\n\t\t\t// so that HMR updates to the component will also update the nodes on the active effect.\n\t\t\t/** @type {Effect} */ (active_effect).nodes = effect.nodes;\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<string, any>} 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<string, any>} 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, increment_pending } from '../../reactivity/async.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';\n\n/**\n * @param {TemplateNode} node\n * @param {Blocker[]} blockers\n * @param {Array<() => Promise<any>>} 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\tconst decrement_pending = increment_pending();\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\tdecrement_pending();\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<Batch, Key>} */\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<Key, Effect>}\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<Key, Branch>}\n\t */\n\t#offscreen = new Map();\n\n\t/**\n\t * Keys of effects that are currently outroing\n\t * @type {Set<Key>}\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 `<svelte:element>`\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/**\n\t * @param {Batch} batch\n\t */\n\t#commit = (batch) => {\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(batch);\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, current_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<V>) => 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 batch = /** @type {Batch} */ (current_batch);\n\n\t\t// we null out `current_batch` because otherwise `save(...)` will incorrectly restore it —\n\t\t// the batch will already have been committed by the time it resolves\n\t\tbatch.deactivate();\n\t\tvar input = get_input();\n\t\tbatch.activate();\n\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(false);\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(CATCH, 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\thydrate_node\n} from '../hydration.js';\nimport { block } from '../../reactivity/effects.js';\nimport { BranchManager } from './branches.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\t/** @type {TemplateNode | undefined} */\n\tvar marker;\n\tif (hydrating) {\n\t\tmarker = hydrate_node;\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\tvar data = read_hydration_instruction(/** @type {TemplateNode} */ (marker));\n\n\t\t\t// \"[n\" = branch n, \"[-1\" = else\n\t\t\tif (key !== parseInt(data.substring(1))) {\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(-1, 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<string, string>} 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\tmove_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, DESTROYED, 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<EachOutroGroup>} */ (state.outrogroups);\n\n\t\t\t\t\t\tdestroy_effects(state, 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(state, 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 {EachState} state\n * @param {Effect[]} to_destroy\n * @param {boolean} remove_dom\n */\nfunction destroy_effects(state, to_destroy, remove_dom = true) {\n\t/** @type {Set<Effect> | undefined} */\n\tvar preserved_effects;\n\n\t// The loop-in-a-loop isn't ideal, but we should only hit this in relatively rare cases\n\tif (state.pending.size > 0) {\n\t\tpreserved_effects = new Set();\n\n\t\tfor (const keys of state.pending.values()) {\n\t\t\tfor (const key of keys) {\n\t\t\t\tpreserved_effects.add(/** @type {EachItem} */ (state.items.get(key)).e);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (var i = 0; i < to_destroy.length; i++) {\n\t\tvar e = to_destroy[i];\n\n\t\tif (preserved_effects?.has(e)) {\n\t\t\te.f |= EFFECT_OFFSCREEN;\n\n\t\t\tconst fragment = document.createDocumentFragment();\n\t\t\tmove_effect(e, fragment);\n\t\t} else {\n\t\t\tdestroy_effect(to_destroy[i], remove_dom);\n\t\t}\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<V>, index: MaybeSource<number>) => 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<any, EachItem>} */\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\t/** @type {Map<Batch, Set<any>>} */\n\tvar pending = new Map();\n\n\tvar first_run = true;\n\n\t/**\n\t * @param {Batch} batch\n\t */\n\tfunction commit(batch) {\n\t\tif ((state.effect.f & DESTROYED) !== 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tstate.pending.delete(batch);\n\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\t/**\n\t * @param {Batch} batch\n\t */\n\tfunction discard(batch) {\n\t\tstate.pending.delete(batch);\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\tif (DEV) {\n\t\t\t\t// Check that the key function is idempotent (returns the same value when called twice)\n\t\t\t\tvar key_again = get_key(value, index);\n\t\t\t\tif (key !== key_again) {\n\t\t\t\t\te.each_key_volatile(String(index), String(key), String(key_again));\n\t\t\t\t}\n\t\t\t}\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\tpending.set(batch, keys);\n\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(discard);\n\t\t\t} else {\n\t\t\t\tcommit(batch);\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, pending, 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<V>} 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<Effect>} */\n\tvar seen;\n\n\t/** @type {Effect | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<Effect>} */\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 & 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.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 !== 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(state, 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<any, EachItem>} items\n * @param {Node} anchor\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source<V>, index: number | Value<number>, 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<any>} 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' */\n/** @import {} from 'trusted-types' */\nimport {\n\tFILENAME,\n\tHYDRATION_ERROR,\n\tNAMESPACE_SVG,\n\tNAMESPACE_MATHML\n} 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';\n\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 { create_element, 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 | TrustedHTML} 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 | TrustedHTML} get_value\n * @param {boolean} [is_controlled]\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(\n\tnode,\n\tget_value,\n\tis_controlled = false,\n\tsvg = false,\n\tmathml = false,\n\tskip_warning = false\n) {\n\tvar anchor = node;\n\n\t/** @type {string | TrustedHTML} */\n\tvar value = '';\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tif (hydrating) {\n\t\t\tanchor = set_hydrate_node(get_first_child(parent_node));\n\t\t}\n\t}\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 (is_controlled && !hydrating) {\n\t\t\t// When @html is the only child, use innerHTML directly.\n\t\t\t// This also handles contenteditable, where the user may delete the anchor comment.\n\t\t\teffect.nodes = null;\n\t\t\tparent_node.innerHTML = /** @type {string} */ (value);\n\n\t\t\tif (value !== '') {\n\t\t\t\tassign_nodes(\n\t\t\t\t\t/** @type {TemplateNode} */ (get_first_child(parent_node)),\n\t\t\t\t\t/** @type {TemplateNode} */ (parent_node.lastChild)\n\t\t\t\t);\n\t\t\t}\n\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\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// Use a <template>, <svg>, or <math> wrapper depending on context. If value is a TrustedHTML object,\n\t\t// it will be assigned directly to innerHTML without coercion — this allows {@html policy.createHTML(...)} to work.\n\t\tvar ns = svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : undefined;\n\t\tvar wrapper = /** @type {HTMLTemplateElement | SVGElement | MathMLElement} */ (\n\t\t\tcreate_element(svg ? 'svg' : mathml ? 'math' : 'template', ns)\n\t\t);\n\t\twrapper.innerHTML = /** @type {any} */ (value);\n\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = svg || mathml ? wrapper : /** @type {HTMLTemplateElement} */ (wrapper).content;\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<string, any>} $$props\n * @param {string} name\n * @param {Record<string, unknown>} 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<string, any>} props\n * @returns {Record<string, boolean>}\n */\nexport function sanitize_slots(props) {\n\t/** @type {Record<string, boolean>} */\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<Params>) => {\n * render: () => string\n * setup?: (element: Element) => void | (() => void)\n * }} fn\n * @returns {Snippet<Params>}\n */\nexport function createRawSnippet(fn) {\n\t// @ts-expect-error the types are a lie\n\treturn (/** @type {TemplateNode} */ anchor, /** @type {Getters<Params>} */ ...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);\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 {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tread_hydration_instruction,\n\tset_hydrate_node,\n\tset_hydrating,\n\tskip_nodes\n} from '../hydration.js';\nimport { BranchManager } from './branches.js';\nimport { HYDRATION_START, HYDRATION_START_ELSE } from '../../../../constants.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\t/** @type {TemplateNode | undefined} */\n\tvar hydration_start_node;\n\n\tif (hydrating) {\n\t\thydration_start_node = hydrate_node;\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\n\tblock(() => {\n\t\tvar component = get_component() ?? null;\n\n\t\tif (hydrating) {\n\t\t\tvar data = read_hydration_instruction(/** @type {TemplateNode} */ (hydration_start_node));\n\n\t\t\tvar server_had_component = data === HYDRATION_START;\n\t\t\tvar client_has_component = component !== null;\n\n\t\t\tif (server_had_component !== client_has_component) {\n\t\t\t\t// Hydration mismatch: skip the server-rendered nodes and render fresh\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(component, component && ((target) => render_fn(target, component)));\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(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<P | undefined>} 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 `<svelte:element>`, 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<P | undefined>} 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, EFFECT_PRESERVED, 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\t// normally a branch is the child of a block and would have the EFFECT_PRESERVED flag,\n\t\t// but since head blocks don't necessarily only have direct branch children we add it on the block itself\n\t\tblock(() => render_fn(anchor), HEAD_EFFECT | EFFECT_PRESERVED);\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<P>} 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 === '&' ? '&amp;' : ch === '\"' ? '&quot;' : '&lt;');\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';\nimport { has_own_property } from './utils.js';\n\n/**\n * `<div translate={false}>` should be rendered as `<div translate=\"no\">` and _not_\n * `<div translate=\"false\">`, which is equivalent to `<div translate=\"yes\">`. There\n * may be other odd cases that need to be added to this list in future\n * @type {Record<string, Map<any, string>>}\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 =\n\t\t(has_own_property.call(replacements, name) && 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<string, boolean>} [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 of Object.keys(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<string,any>} 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 of Object.keys(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<string, any> | [Record<string, any>, Record<string, any>]} [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<string,any> | undefined} */\n\t\tvar normal_styles;\n\n\t\t/** @type {Record<string,any> | 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<string, any>} [prev_classes]\n * @param {Record<string, any>} [next_classes]\n * @returns {Record<string, boolean> | 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<string, any>} prev\n * @param {Record<string, any>} 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<string, any> | [Record<string, any>, Record<string, any>]} [prev_styles]\n * @param {Record<string, any> | [Record<string, any>, Record<string, any>]} [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';\nimport { async_mode_flag } from '../../../../flags/index.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 <optgroup>\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\t// @ts-ignore\n\t\tselect.__value = 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// In sync mode render effects are executed during tree traversal -> needs current_batch\n\t\t\t// In async mode render effects are flushed once batch resolved, at which point current_batch is null -> needs previous_batch\n\t\t\tvar batch = /** @type {Batch} */ (async_mode_flag ? previous_batch : current_batch);\n\n\t\t\t// Don't update the <select> if it is focused. We can get here if, for example,\n\t\t\t// an update is deferred because of async work depending on the select:\n\t\t\t//\n\t\t\t// <select bind:value={selected}>...</select>\n\t\t\t// <p>{await find(selected)}</p>\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 <option> has a value attribute\n\tif ('__value' in option) {\n\t\treturn option.__value;\n\t} else {\n\t\treturn option.value;\n\t}\n}\n", "/** @import { Blocker, Effect } from '#client' */\nimport { DEV } from 'esm-env';\nimport { hydrating, set_hydrating } from '../hydration.js';\nimport { get_descriptors, get_prototype_of } from '../../../shared/utils.js';\nimport { create_event, delegate, delegated, event, event_symbol } from './events.js';\nimport { add_form_reset_listener, autofocus } from './misc.js';\nimport * as w from '../../warnings.js';\nimport { IS_XHTML, LOADING_ATTR_SYMBOL } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { is_capture_event, can_delegate_event, normalize_attribute } from '../../../../utils.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tget,\n\tset_active_effect,\n\tset_active_reaction\n} from '../../runtime.js';\nimport { attach } from './attachments.js';\nimport { clsx } from '../../../shared/attributes.js';\nimport { set_class } from './class.js';\nimport { set_style } from './style.js';\nimport { ATTACHMENT_KEY, NAMESPACE_HTML, UNINITIALIZED } from '../../../../constants.js';\nimport { branch, destroy_effect, effect, managed } from '../../reactivity/effects.js';\nimport { init_select, select_option } from './bindings/select.js';\nimport { flatten } from '../../reactivity/async.js';\n\nexport const CLASS = Symbol('class');\nexport const STYLE = Symbol('style');\n\nconst IS_CUSTOM_ELEMENT = Symbol('is custom element');\nconst IS_HTML = Symbol('is html');\n\nconst LINK_TAG = IS_XHTML ? 'link' : 'LINK';\nconst INPUT_TAG = IS_XHTML ? 'input' : 'INPUT';\nconst OPTION_TAG = IS_XHTML ? 'option' : 'OPTION';\nconst SELECT_TAG = IS_XHTML ? 'select' : 'SELECT';\nconst PROGRESS_TAG = IS_XHTML ? 'progress' : 'PROGRESS';\n\n/**\n * The value/checked attribute in the template actually corresponds to the defaultValue property, so we need\n * to remove it upon hydration to avoid a bug when someone resets the form value.\n * @param {HTMLInputElement} input\n * @returns {void}\n */\nexport function remove_input_defaults(input) {\n\tif (!hydrating) return;\n\n\tvar already_removed = false;\n\n\t// We try and remove the default attributes later, rather than sync during hydration.\n\t// Doing it sync during hydration has a negative impact on performance, but deferring the\n\t// work in an idle task alleviates this greatly. If a form reset event comes in before\n\t// the idle callback, then we ensure the input defaults are cleared just before.\n\tvar remove_defaults = () => {\n\t\tif (already_removed) return;\n\t\talready_removed = true;\n\n\t\t// Remove the attributes but preserve the values\n\t\tif (input.hasAttribute('value')) {\n\t\t\tvar value = input.value;\n\t\t\tset_attribute(input, 'value', null);\n\t\t\tinput.value = value;\n\t\t}\n\n\t\tif (input.hasAttribute('checked')) {\n\t\t\tvar checked = input.checked;\n\t\t\tset_attribute(input, 'checked', null);\n\t\t\tinput.checked = checked;\n\t\t}\n\t};\n\n\t// @ts-expect-error\n\tinput.__on_r = remove_defaults;\n\tqueue_micro_task(remove_defaults);\n\tadd_form_reset_listener();\n}\n\n/**\n * @param {Element} element\n * @param {any} value\n */\nexport function set_value(element, value) {\n\tvar attributes = get_attributes(element);\n\n\tif (\n\t\tattributes.value ===\n\t\t\t(attributes.value =\n\t\t\t\t// treat null and undefined the same for the initial value\n\t\t\t\tvalue ?? undefined) ||\n\t\t// @ts-expect-error\n\t\t// `progress` elements always need their value set when it's `0`\n\t\t(element.value === value && (value !== 0 || element.nodeName !== PROGRESS_TAG))\n\t) {\n\t\treturn;\n\t}\n\n\t// @ts-expect-error\n\telement.value = value ?? '';\n}\n\n/**\n * @param {Element} element\n * @param {boolean} checked\n */\nexport function set_checked(element, checked) {\n\tvar attributes = get_attributes(element);\n\n\tif (\n\t\tattributes.checked ===\n\t\t(attributes.checked =\n\t\t\t// treat null and undefined the same for the initial value\n\t\t\tchecked ?? undefined)\n\t) {\n\t\treturn;\n\t}\n\n\t// @ts-expect-error\n\telement.checked = checked;\n}\n\n/**\n * Sets the `selected` attribute on an `option` element.\n * Not set through the property because that doesn't reflect to the DOM,\n * which means it wouldn't be taken into account when a form is reset.\n * @param {HTMLOptionElement} element\n * @param {boolean} selected\n */\nexport function set_selected(element, selected) {\n\tif (selected) {\n\t\t// The selected option could've changed via user selection, and\n\t\t// setting the value without this check would set it back.\n\t\tif (!element.hasAttribute('selected')) {\n\t\t\telement.setAttribute('selected', '');\n\t\t}\n\t} else {\n\t\telement.removeAttribute('selected');\n\t}\n}\n\n/**\n * Applies the default checked property without influencing the current checked property.\n * @param {HTMLInputElement} element\n * @param {boolean} checked\n */\nexport function set_default_checked(element, checked) {\n\tconst existing_value = element.checked;\n\telement.defaultChecked = checked;\n\telement.checked = existing_value;\n}\n\n/**\n * Applies the default value property without influencing the current value property.\n * @param {HTMLInputElement | HTMLTextAreaElement} element\n * @param {string} value\n */\nexport function set_default_value(element, value) {\n\tconst existing_value = element.value;\n\telement.defaultValue = value;\n\telement.value = existing_value;\n}\n\n/**\n * @param {Element} element\n * @param {string} attribute\n * @param {string | null} value\n * @param {boolean} [skip_warning]\n */\nexport function set_attribute(element, attribute, value, skip_warning) {\n\tvar attributes = get_attributes(element);\n\n\tif (hydrating) {\n\t\tattributes[attribute] = element.getAttribute(attribute);\n\n\t\tif (\n\t\t\tattribute === 'src' ||\n\t\t\tattribute === 'srcset' ||\n\t\t\t(attribute === 'href' && element.nodeName === LINK_TAG)\n\t\t) {\n\t\t\tif (!skip_warning) {\n\t\t\t\tcheck_src_in_dev_hydration(element, attribute, value ?? '');\n\t\t\t}\n\n\t\t\t// If we reset these attributes, they would result in another network request, which we want to avoid.\n\t\t\t// We assume they are the same between client and server as checking if they are equal is expensive\n\t\t\t// (we can't just compare the strings as they can be different between client and server but result in the\n\t\t\t// same url, so we would need to create hidden anchor elements to compare them)\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (attributes[attribute] === (attributes[attribute] = value)) return;\n\n\tif (attribute === 'loading') {\n\t\t// @ts-expect-error\n\t\telement[LOADING_ATTR_SYMBOL] = value;\n\t}\n\n\tif (value == null) {\n\t\telement.removeAttribute(attribute);\n\t} else if (typeof value !== 'string' && get_setters(element).includes(attribute)) {\n\t\t// @ts-ignore\n\t\telement[attribute] = value;\n\t} else {\n\t\telement.setAttribute(attribute, value);\n\t}\n}\n\n/**\n * @param {Element} dom\n * @param {string} attribute\n * @param {string} value\n */\nexport function set_xlink_attribute(dom, attribute, value) {\n\tdom.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @param {string} prop\n * @param {any} value\n */\nexport function set_custom_element_data(node, prop, value) {\n\t// We need to ensure that setting custom element props, which can\n\t// invoke lifecycle methods on other custom elements, does not also\n\t// associate those lifecycle methods with the current active reaction\n\t// or effect\n\tvar previous_reaction = active_reaction;\n\tvar previous_effect = active_effect;\n\n\t// If we're hydrating but the custom element is from Svelte, and it already scaffolded,\n\t// then it might run block logic in hydration mode, which we have to prevent.\n\tlet was_hydrating = hydrating;\n\tif (hydrating) {\n\t\tset_hydrating(false);\n\t}\n\n\tset_active_reaction(null);\n\tset_active_effect(null);\n\n\ttry {\n\t\tif (\n\t\t\t// `style` should use `set_attribute` rather than the setter\n\t\t\tprop !== 'style' &&\n\t\t\t// Don't compute setters for custom elements while they aren't registered yet,\n\t\t\t// because during their upgrade/instantiation they might add more setters.\n\t\t\t// Instead, fall back to a simple \"an object, then set as property\" heuristic.\n\t\t\t(setters_cache.has(node.getAttribute('is') || node.nodeName) ||\n\t\t\t// customElements may not be available in browser extension contexts\n\t\t\t!customElements ||\n\t\t\tcustomElements.get(node.getAttribute('is') || node.nodeName.toLowerCase())\n\t\t\t\t? get_setters(node).includes(prop)\n\t\t\t\t: value && typeof value === 'object')\n\t\t) {\n\t\t\t// @ts-expect-error\n\t\t\tnode[prop] = value;\n\t\t} else {\n\t\t\t// We did getters etc checks already, stringify before passing to set_attribute\n\t\t\t// to ensure it doesn't invoke the same logic again, and potentially populating\n\t\t\t// the setters cache too early.\n\t\t\tset_attribute(node, prop, value == null ? value : String(value));\n\t\t}\n\t} finally {\n\t\tset_active_reaction(previous_reaction);\n\t\tset_active_effect(previous_effect);\n\t\tif (was_hydrating) {\n\t\t\tset_hydrating(true);\n\t\t}\n\t}\n}\n\n/**\n * Spreads attributes onto a DOM element, taking into account the currently set attributes\n * @param {Element & ElementCSSInlineStyle} element\n * @param {Record<string | symbol, any> | undefined} prev\n * @param {Record<string | symbol, any>} next New attributes - this function mutates this object\n * @param {string} [css_hash]\n * @param {boolean} [should_remove_defaults]\n * @param {boolean} [skip_warning]\n * @returns {Record<string, any>}\n */\nfunction set_attributes(\n\telement,\n\tprev,\n\tnext,\n\tcss_hash,\n\tshould_remove_defaults = false,\n\tskip_warning = false\n) {\n\tif (hydrating && should_remove_defaults && element.nodeName === INPUT_TAG) {\n\t\tvar input = /** @type {HTMLInputElement} */ (element);\n\t\tvar attribute = input.type === 'checkbox' ? 'defaultChecked' : 'defaultValue';\n\n\t\tif (!(attribute in next)) {\n\t\t\tremove_input_defaults(input);\n\t\t}\n\t}\n\n\tvar attributes = get_attributes(element);\n\n\tvar is_custom_element = attributes[IS_CUSTOM_ELEMENT];\n\tvar preserve_attribute_case = !attributes[IS_HTML];\n\n\t// If we're hydrating but the custom element is from Svelte, and it already scaffolded,\n\t// then it might run block logic in hydration mode, which we have to prevent.\n\tlet is_hydrating_custom_element = hydrating && is_custom_element;\n\tif (is_hydrating_custom_element) {\n\t\tset_hydrating(false);\n\t}\n\n\tvar current = prev || {};\n\tvar is_option_element = element.nodeName === OPTION_TAG;\n\n\tfor (var key in prev) {\n\t\tif (!(key in next)) {\n\t\t\tnext[key] = null;\n\t\t}\n\t}\n\n\tif (next.class) {\n\t\tnext.class = clsx(next.class);\n\t} else if (css_hash || next[CLASS]) {\n\t\tnext.class = null; /* force call to set_class() */\n\t}\n\n\tif (next[STYLE]) {\n\t\tnext.style ??= null; /* force call to set_style() */\n\t}\n\n\tvar setters = get_setters(element);\n\n\t// since key is captured we use const\n\tfor (const key in next) {\n\t\t// let instead of var because referenced in a closure\n\t\tlet value = next[key];\n\n\t\t// Up here because we want to do this for the initial value, too, even if it's undefined,\n\t\t// and this wouldn't be reached in case of undefined because of the equality check below\n\t\tif (is_option_element && key === 'value' && value == null) {\n\t\t\t// The <option> element is a special case because removing the value attribute means\n\t\t\t// the value is set to the text content of the option element, and setting the value\n\t\t\t// to null or undefined means the value is set to the string \"null\" or \"undefined\".\n\t\t\t// To align with how we handle this case in non-spread-scenarios, this logic is needed.\n\t\t\t// There's a super-edge-case bug here that is left in in favor of smaller code size:\n\t\t\t// Because of the \"set missing props to null\" logic above, we can't differentiate\n\t\t\t// between a missing value and an explicitly set value of null or undefined. That means\n\t\t\t// that once set, the value attribute of an <option> element can't be removed. This is\n\t\t\t// a very rare edge case, and removing the attribute altogether isn't possible either\n\t\t\t// for the <option value={undefined}> case, so we're not losing any functionality here.\n\t\t\t// @ts-ignore\n\t\t\telement.value = element.__value = '';\n\t\t\tcurrent[key] = value;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (key === 'class') {\n\t\t\tvar is_html = element.namespaceURI === 'http://www.w3.org/1999/xhtml';\n\t\t\tset_class(element, is_html, value, css_hash, prev?.[CLASS], next[CLASS]);\n\t\t\tcurrent[key] = value;\n\t\t\tcurrent[CLASS] = next[CLASS];\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (key === 'style') {\n\t\t\tset_style(element, value, prev?.[STYLE], next[STYLE]);\n\t\t\tcurrent[key] = value;\n\t\t\tcurrent[STYLE] = next[STYLE];\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar prev_value = current[key];\n\n\t\t// Skip if value is unchanged, unless it's `undefined` and the element still has the attribute\n\t\tif (value === prev_value && !(value === undefined && element.hasAttribute(key))) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tcurrent[key] = value;\n\n\t\tvar prefix = key[0] + key[1]; // this is faster than key.slice(0, 2)\n\t\tif (prefix === '$$') continue;\n\n\t\tif (prefix === 'on') {\n\t\t\t/** @type {{ capture?: true }} */\n\t\t\tconst opts = {};\n\t\t\tconst event_handle_key = '$$' + key;\n\t\t\tlet event_name = key.slice(2);\n\t\t\tvar is_delegated = can_delegate_event(event_name);\n\n\t\t\tif (is_capture_event(event_name)) {\n\t\t\t\tevent_name = event_name.slice(0, -7);\n\t\t\t\topts.capture = true;\n\t\t\t}\n\n\t\t\tif (!is_delegated && prev_value) {\n\t\t\t\t// Listening to same event but different handler -> our handle function below takes care of this\n\t\t\t\t// If we were to remove and add listeners in this case, it could happen that the event is \"swallowed\"\n\t\t\t\t// (the browser seems to not know yet that a new one exists now) and doesn't reach the handler\n\t\t\t\t// https://github.com/sveltejs/svelte/issues/11903\n\t\t\t\tif (value != null) continue;\n\n\t\t\t\telement.removeEventListener(event_name, current[event_handle_key], opts);\n\t\t\t\tcurrent[event_handle_key] = null;\n\t\t\t}\n\n\t\t\tif (is_delegated) {\n\t\t\t\tdelegated(event_name, element, value);\n\t\t\t\tdelegate([event_name]);\n\t\t\t} else if (value != null) {\n\t\t\t\t/**\n\t\t\t\t * @this {any}\n\t\t\t\t * @param {Event} evt\n\t\t\t\t */\n\t\t\t\tfunction handle(evt) {\n\t\t\t\t\tcurrent[key].call(this, evt);\n\t\t\t\t}\n\n\t\t\t\tcurrent[event_handle_key] = create_event(event_name, element, handle, opts);\n\t\t\t}\n\t\t} else if (key === 'style') {\n\t\t\t// avoid using the setter\n\t\t\tset_attribute(element, key, value);\n\t\t} else if (key === 'autofocus') {\n\t\t\tautofocus(/** @type {HTMLElement} */ (element), Boolean(value));\n\t\t} else if (!is_custom_element && (key === '__value' || (key === 'value' && value != null))) {\n\t\t\t// @ts-ignore We're not running this for custom elements because __value is actually\n\t\t\t// how Lit stores the current value on the element, and messing with that would break things.\n\t\t\telement.value = element.__value = value;\n\t\t} else if (key === 'selected' && is_option_element) {\n\t\t\tset_selected(/** @type {HTMLOptionElement} */ (element), value);\n\t\t} else {\n\t\t\tvar name = key;\n\t\t\tif (!preserve_attribute_case) {\n\t\t\t\tname = normalize_attribute(name);\n\t\t\t}\n\n\t\t\tvar is_default = name === 'defaultValue' || name === 'defaultChecked';\n\n\t\t\tif (value == null && !is_custom_element && !is_default) {\n\t\t\t\tattributes[key] = null;\n\n\t\t\t\tif (name === 'value' || name === 'checked') {\n\t\t\t\t\t// removing value/checked also removes defaultValue/defaultChecked — preserve\n\t\t\t\t\tlet input = /** @type {HTMLInputElement} */ (element);\n\t\t\t\t\tconst use_default = prev === undefined;\n\t\t\t\t\tif (name === 'value') {\n\t\t\t\t\t\tlet previous = input.defaultValue;\n\t\t\t\t\t\tinput.removeAttribute(name);\n\t\t\t\t\t\tinput.defaultValue = previous;\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tinput.value = input.__value = use_default ? previous : null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet previous = input.defaultChecked;\n\t\t\t\t\t\tinput.removeAttribute(name);\n\t\t\t\t\t\tinput.defaultChecked = previous;\n\t\t\t\t\t\tinput.checked = use_default ? previous : false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\telement.removeAttribute(key);\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tis_default ||\n\t\t\t\t(setters.includes(name) && (is_custom_element || typeof value !== 'string'))\n\t\t\t) {\n\t\t\t\t// @ts-ignore\n\t\t\t\telement[name] = value;\n\t\t\t\t// remove it from attributes's cache\n\t\t\t\tif (name in attributes) attributes[name] = UNINITIALIZED;\n\t\t\t} else if (typeof value !== 'function') {\n\t\t\t\tset_attribute(element, name, value, skip_warning);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (is_hydrating_custom_element) {\n\t\tset_hydrating(true);\n\t}\n\n\treturn current;\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} element\n * @param {(...expressions: any) => Record<string | symbol, any>} fn\n * @param {Array<() => any>} sync\n * @param {Array<() => Promise<any>>} async\n * @param {Blocker[]} blockers\n * @param {string} [css_hash]\n * @param {boolean} [should_remove_defaults]\n * @param {boolean} [skip_warning]\n */\nexport function attribute_effect(\n\telement,\n\tfn,\n\tsync = [],\n\tasync = [],\n\tblockers = [],\n\tcss_hash,\n\tshould_remove_defaults = false,\n\tskip_warning = false\n) {\n\tflatten(blockers, sync, async, (values) => {\n\t\t/** @type {Record<string | symbol, any> | undefined} */\n\t\tvar prev = undefined;\n\n\t\t/** @type {Record<symbol, Effect>} */\n\t\tvar effects = {};\n\n\t\tvar is_select = element.nodeName === SELECT_TAG;\n\t\tvar inited = false;\n\n\t\tmanaged(() => {\n\t\t\tvar next = fn(...values.map(get));\n\t\t\t/** @type {Record<string | symbol, any>} */\n\t\t\tvar current = set_attributes(\n\t\t\t\telement,\n\t\t\t\tprev,\n\t\t\t\tnext,\n\t\t\t\tcss_hash,\n\t\t\t\tshould_remove_defaults,\n\t\t\t\tskip_warning\n\t\t\t);\n\n\t\t\tif (inited && is_select && 'value' in next) {\n\t\t\t\tselect_option(/** @type {HTMLSelectElement} */ (element), next.value);\n\t\t\t}\n\n\t\t\tfor (let symbol of Object.getOwnPropertySymbols(effects)) {\n\t\t\t\tif (!next[symbol]) destroy_effect(effects[symbol]);\n\t\t\t}\n\n\t\t\tfor (let symbol of Object.getOwnPropertySymbols(next)) {\n\t\t\t\tvar n = next[symbol];\n\n\t\t\t\tif (symbol.description === ATTACHMENT_KEY && (!prev || n !== prev[symbol])) {\n\t\t\t\t\tif (effects[symbol]) destroy_effect(effects[symbol]);\n\t\t\t\t\teffects[symbol] = branch(() => attach(element, () => n));\n\t\t\t\t}\n\n\t\t\t\tcurrent[symbol] = n;\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t});\n\n\t\tif (is_select) {\n\t\t\tvar select = /** @type {HTMLSelectElement} */ (element);\n\n\t\t\teffect(() => {\n\t\t\t\tselect_option(select, /** @type {Record<string | symbol, any>} */ (prev).value, true);\n\t\t\t\tinit_select(select);\n\t\t\t});\n\t\t}\n\n\t\tinited = true;\n\t});\n}\n\n/**\n *\n * @param {Element} element\n */\nfunction get_attributes(element) {\n\treturn /** @type {Record<string | symbol, unknown>} **/ (\n\t\t// @ts-expect-error\n\t\telement.__attributes ??= {\n\t\t\t[IS_CUSTOM_ELEMENT]: element.nodeName.includes('-'),\n\t\t\t[IS_HTML]: element.namespaceURI === NAMESPACE_HTML\n\t\t}\n\t);\n}\n\n/** @type {Map<string, string[]>} */\nvar setters_cache = new Map();\n\n/** @param {Element} element */\nfunction get_setters(element) {\n\tvar cache_key = element.getAttribute('is') || element.nodeName;\n\tvar setters = setters_cache.get(cache_key);\n\tif (setters) return setters;\n\tsetters_cache.set(cache_key, (setters = []));\n\n\tvar descriptors;\n\tvar proto = element; // In the case of custom elements there might be setters on the instance\n\tvar element_proto = Element.prototype;\n\n\t// Stop at Element, from there on there's only unnecessary setters we're not interested in\n\t// Do not use contructor.name here as that's unreliable in some browser environments\n\twhile (element_proto !== proto) {\n\t\tdescriptors = get_descriptors(proto);\n\n\t\tfor (var key in descriptors) {\n\t\t\tif (descriptors[key].set) {\n\t\t\t\tsetters.push(key);\n\t\t\t}\n\t\t}\n\n\t\tproto = get_prototype_of(proto);\n\t}\n\n\treturn setters;\n}\n\n/**\n * @param {any} element\n * @param {string} attribute\n * @param {string} value\n */\nfunction check_src_in_dev_hydration(element, attribute, value) {\n\tif (!DEV) return;\n\tif (attribute === 'srcset' && srcset_url_equal(element, value)) return;\n\tif (src_url_equal(element.getAttribute(attribute) ?? '', value)) return;\n\n\tw.hydration_attribute_changed(\n\t\tattribute,\n\t\telement.outerHTML.replace(element.innerHTML, element.innerHTML && '...'),\n\t\tString(value)\n\t);\n}\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nfunction src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\treturn new URL(element_src, document.baseURI).href === new URL(url, document.baseURI).href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element\n * @param {string} srcset\n * @returns {boolean}\n */\nfunction srcset_url_equal(element, srcset) {\n\tvar element_urls = split_srcset(element.srcset);\n\tvar urls = split_srcset(srcset);\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n", "import { hydrating, reset, set_hydrate_node, set_hydrating } from '../hydration.js';\nimport { create_comment, create_element } from '../operations.js';\nimport { create_trusted_html } from '../reconciler.js';\nimport { attach } from './attachments.js';\n\n/** @type {boolean | null} */\nlet supported = null;\n\n/**\n * Checks if the browser supports rich HTML content inside `<option>` elements.\n * Modern browsers preserve HTML elements inside options, while older browsers\n * strip them during parsing, leaving only text content.\n * @returns {boolean}\n */\nfunction is_supported() {\n\tif (supported === null) {\n\t\tvar select = create_element('select');\n\t\tselect.innerHTML = create_trusted_html('<option><span>t</span></option>');\n\t\tsupported = /** @type {Element} */ (select.firstChild)?.firstChild?.nodeType === 1;\n\t}\n\n\treturn supported;\n}\n\n/**\n *\n * @param {HTMLElement} element\n * @param {(new_element: HTMLElement) => void} update_element\n */\nexport function selectedcontent(element, update_element) {\n\t// if it's not supported no need for special logic\n\tif (!is_supported()) return;\n\n\t// we use the attach function directly just to make sure is executed when is mounted to the dom\n\tattach(element, () => () => {\n\t\tconst select = element.closest('select');\n\t\tif (!select) return;\n\n\t\tconst observer = new MutationObserver((entries) => {\n\t\t\tvar selected = false;\n\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (entry.target === element) {\n\t\t\t\t\t// the `<selectedcontent>` already changed, no need to replace it\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// if the changes doesn't include the selected `<option>` we don't need to do anything\n\t\t\t\tselected ||= !!entry.target.parentElement?.closest('option')?.selected;\n\t\t\t}\n\n\t\t\tif (selected) {\n\t\t\t\t// replace the `<selectedcontent>` with a clone\n\t\t\t\telement.replaceWith((element = /** @type {HTMLElement} */ (element.cloneNode(true))));\n\t\t\t\tupdate_element(element);\n\t\t\t}\n\t\t});\n\n\t\tobserver.observe(select, {\n\t\t\tchildList: true,\n\t\t\tcharacterData: true,\n\t\t\tsubtree: true\n\t\t});\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t});\n}\n\n/**\n * Handles rich HTML content inside `<option>`, `<optgroup>`, or `<select>` elements with browser-specific branching.\n * Modern browsers preserve HTML inside options, while older browsers strip it to text only.\n *\n * @param {HTMLOptionElement | HTMLOptGroupElement | HTMLSelectElement} element The element to process\n * @param {() => void} rich_fn Function to process rich HTML content (modern browsers)\n */\nexport function customizable_select(element, rich_fn) {\n\tvar was_hydrating = hydrating;\n\n\tif (!is_supported()) {\n\t\tset_hydrating(false);\n\t\telement.textContent = '';\n\t\telement.append(create_comment(''));\n\t}\n\n\ttry {\n\t\trich_fn();\n\t} finally {\n\t\tif (was_hydrating) {\n\t\t\tif (hydrating) {\n\t\t\t\treset(element);\n\t\t\t} else {\n\t\t\t\tset_hydrating(true);\n\t\t\t\tset_hydrate_node(element);\n\t\t\t}\n\t\t}\n\t}\n}\n", "import { listen } from './shared.js';\n\n/**\n * @param {(activeElement: Element | null) => void} update\n * @returns {void}\n */\nexport function bind_active_element(update) {\n\tlisten(document, ['focusin', 'focusout'], (event) => {\n\t\tif (event && event.type === 'focusout' && /** @type {FocusEvent} */ (event).relatedTarget) {\n\t\t\t// The tests still pass if we remove this, because of JSDOM limitations, but it is necessary\n\t\t\t// to avoid temporarily resetting to `document.body`\n\t\t\treturn;\n\t\t}\n\n\t\tupdate(document.activeElement);\n\t});\n}\n", "/** @import { Batch } from '../../../reactivity/batch.js' */\nimport { DEV } from 'esm-env';\nimport { render_effect, teardown } from '../../../reactivity/effects.js';\nimport { listen_to_event_and_reset_event } from './shared.js';\nimport * as e from '../../../errors.js';\nimport { is } from '../../../proxy.js';\nimport { queue_micro_task } from '../../task.js';\nimport { hydrating } from '../../hydration.js';\nimport { tick, untrack } from '../../../runtime.js';\nimport { is_runes } from '../../../context.js';\nimport { current_batch, previous_batch } from '../../../reactivity/batch.js';\nimport { async_mode_flag } from '../../../../flags/index.js';\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_value(input, get, set = get) {\n\tvar batches = new WeakSet();\n\n\tlisten_to_event_and_reset_event(input, 'input', async (is_reset) => {\n\t\tif (DEV && input.type === 'checkbox') {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.bind_invalid_checkbox_value();\n\t\t}\n\n\t\t/** @type {any} */\n\t\tvar value = is_reset ? input.defaultValue : input.value;\n\t\tvalue = is_numberlike_input(input) ? to_number(value) : value;\n\t\tset(value);\n\n\t\tif (current_batch !== null) {\n\t\t\tbatches.add(current_batch);\n\t\t}\n\n\t\t// Because `{#each ...}` blocks work by updating sources inside the flush,\n\t\t// we need to wait a tick before checking to see if we should forcibly\n\t\t// update the input and reset the selection state\n\t\tawait tick();\n\n\t\t// Respect any validation in accessors\n\t\tif (value !== (value = get())) {\n\t\t\tvar start = input.selectionStart;\n\t\t\tvar end = input.selectionEnd;\n\t\t\tvar length = input.value.length;\n\n\t\t\t// the value is coerced on assignment\n\t\t\tinput.value = value ?? '';\n\n\t\t\t// Restore selection\n\t\t\tif (end !== null) {\n\t\t\t\tvar new_length = input.value.length;\n\t\t\t\t// If cursor was at end and new input is longer, move cursor to new end\n\t\t\t\tif (start === end && end === length && new_length > length) {\n\t\t\t\t\tinput.selectionStart = new_length;\n\t\t\t\t\tinput.selectionEnd = new_length;\n\t\t\t\t} else {\n\t\t\t\t\tinput.selectionStart = start;\n\t\t\t\t\tinput.selectionEnd = Math.min(end, new_length);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the updated value from the input instead.\n\t\t(hydrating && input.defaultValue !== input.value) ||\n\t\t// If defaultValue is set, then value == defaultValue\n\t\t// TODO Svelte 6: remove input.value check and set to empty string?\n\t\t(untrack(get) == null && input.value)\n\t) {\n\t\tset(is_numberlike_input(input) ? to_number(input.value) : input.value);\n\n\t\tif (current_batch !== null) {\n\t\t\tbatches.add(current_batch);\n\t\t}\n\t}\n\n\trender_effect(() => {\n\t\tif (DEV && input.type === 'checkbox') {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.bind_invalid_checkbox_value();\n\t\t}\n\n\t\tvar value = get();\n\n\t\tif (input === document.activeElement) {\n\t\t\t// In sync mode render effects are executed during tree traversal -> needs current_batch\n\t\t\t// In async mode render effects are flushed once batch resolved, at which point current_batch is null -> needs previous_batch\n\t\t\tvar batch = /** @type {Batch} */ (async_mode_flag ? previous_batch : current_batch);\n\n\t\t\t// Never rewrite the contents of a focused input. We can get here if, for example,\n\t\t\t// an update is deferred because of async work depending on the input:\n\t\t\t//\n\t\t\t// <input bind:value={query}>\n\t\t\t// <p>{await find(query)}</p>\n\t\t\tif (batches.has(batch)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (is_numberlike_input(input) && value === to_number(input.value)) {\n\t\t\t// handles 0 vs 00 case (see https://github.com/sveltejs/svelte/issues/9959)\n\t\t\treturn;\n\t\t}\n\n\t\tif (input.type === 'date' && !value && !input.value) {\n\t\t\t// Handles the case where a temporarily invalid date is set (while typing, for example with a leading 0 for the day)\n\t\t\t// and prevents this state from clearing the other parts of the date input (see https://github.com/sveltejs/svelte/issues/7897)\n\t\t\treturn;\n\t\t}\n\n\t\t// don't set the value of the input if it's the same to allow\n\t\t// minlength to work properly\n\t\tif (value !== input.value) {\n\t\t\t// @ts-expect-error the value is coerced on assignment\n\t\t\tinput.value = value ?? '';\n\t\t}\n\t});\n}\n\n/** @type {Set<HTMLInputElement[]>} */\nconst pending = new Set();\n\n/**\n * @param {HTMLInputElement[]} inputs\n * @param {null | [number]} group_index\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_group(inputs, group_index, input, get, set = get) {\n\tvar is_checkbox = input.getAttribute('type') === 'checkbox';\n\tvar binding_group = inputs;\n\n\t// needs to be let or related code isn't treeshaken out if it's always false\n\tlet hydration_mismatch = false;\n\n\tif (group_index !== null) {\n\t\tfor (var index of group_index) {\n\t\t\t// @ts-expect-error\n\t\t\tbinding_group = binding_group[index] ??= [];\n\t\t}\n\t}\n\n\tbinding_group.push(input);\n\n\tlisten_to_event_and_reset_event(\n\t\tinput,\n\t\t'change',\n\t\t() => {\n\t\t\t// @ts-ignore\n\t\t\tvar value = input.__value;\n\n\t\t\tif (is_checkbox) {\n\t\t\t\tvalue = get_binding_group_value(binding_group, value, input.checked);\n\t\t\t}\n\n\t\t\tset(value);\n\t\t},\n\t\t// TODO better default value handling\n\t\t() => set(is_checkbox ? [] : null)\n\t);\n\n\trender_effect(() => {\n\t\tvar value = get();\n\n\t\t// If we are hydrating and the value has since changed, then use the update value\n\t\t// from the input instead.\n\t\tif (hydrating && input.defaultChecked !== input.checked) {\n\t\t\thydration_mismatch = true;\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_checkbox) {\n\t\t\tvalue = value || [];\n\t\t\t// @ts-ignore\n\t\t\tinput.checked = value.includes(input.__value);\n\t\t} else {\n\t\t\t// @ts-ignore\n\t\t\tinput.checked = is(input.__value, value);\n\t\t}\n\t});\n\n\tteardown(() => {\n\t\tvar index = binding_group.indexOf(input);\n\n\t\tif (index !== -1) {\n\t\t\tbinding_group.splice(index, 1);\n\t\t}\n\t});\n\n\tif (!pending.has(binding_group)) {\n\t\tpending.add(binding_group);\n\n\t\tqueue_micro_task(() => {\n\t\t\t// necessary to maintain binding group order in all insertion scenarios\n\t\t\tbinding_group.sort((a, b) => (a.compareDocumentPosition(b) === 4 ? -1 : 1));\n\t\t\tpending.delete(binding_group);\n\t\t});\n\t}\n\n\tqueue_micro_task(() => {\n\t\tif (hydration_mismatch) {\n\t\t\tvar value;\n\n\t\t\tif (is_checkbox) {\n\t\t\t\tvalue = get_binding_group_value(binding_group, value, input.checked);\n\t\t\t} else {\n\t\t\t\tvar hydration_input = binding_group.find((input) => input.checked);\n\t\t\t\t// @ts-ignore\n\t\t\t\tvalue = hydration_input?.__value;\n\t\t\t}\n\n\t\t\tset(value);\n\t\t}\n\t});\n}\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_checked(input, get, set = get) {\n\tlisten_to_event_and_reset_event(input, 'change', (is_reset) => {\n\t\tvar value = is_reset ? input.defaultChecked : input.checked;\n\t\tset(value);\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the update value from the input instead.\n\t\t(hydrating && input.defaultChecked !== input.checked) ||\n\t\t// If defaultChecked is set, then checked == defaultChecked\n\t\tuntrack(get) == null\n\t) {\n\t\tset(input.checked);\n\t}\n\n\trender_effect(() => {\n\t\tvar value = get();\n\t\tinput.checked = Boolean(value);\n\t});\n}\n\n/**\n * @template V\n * @param {Array<HTMLInputElement>} group\n * @param {V} __value\n * @param {boolean} checked\n * @returns {V[]}\n */\nfunction get_binding_group_value(group, __value, checked) {\n\t/** @type {Set<V>} */\n\tvar value = new Set();\n\n\tfor (var i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) {\n\t\t\t// @ts-ignore\n\t\t\tvalue.add(group[i].__value);\n\t\t}\n\t}\n\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement} input\n */\nfunction is_numberlike_input(input) {\n\tvar type = input.type;\n\treturn type === 'number' || type === 'range';\n}\n\n/**\n * @param {string} value\n */\nfunction to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => FileList | null} get\n * @param {(value: FileList | null) => void} set\n */\nexport function bind_files(input, get, set = get) {\n\tlisten_to_event_and_reset_event(input, 'change', () => {\n\t\tset(input.files);\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the updated value from the input instead.\n\t\thydrating &&\n\t\tinput.files\n\t) {\n\t\tset(input.files);\n\t}\n\n\trender_effect(() => {\n\t\tinput.files = get();\n\t});\n}\n", "import { render_effect, effect, teardown } from '../../../reactivity/effects.js';\nimport { listen } from './shared.js';\n\n/** @param {TimeRanges} ranges */\nfunction time_ranges_to_array(ranges) {\n\tvar array = [];\n\n\tfor (var i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\n\treturn array;\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {() => number | undefined} get\n * @param {(value: number) => void} set\n * @returns {void}\n */\nexport function bind_current_time(media, get, set = get) {\n\t/** @type {number} */\n\tvar raf_id;\n\t/** @type {number} */\n\tvar value;\n\n\t// Ideally, listening to timeupdate would be enough, but it fires too infrequently for the currentTime\n\t// binding, which is why we use a raf loop, too. We additionally still listen to timeupdate because\n\t// the user could be scrubbing through the video using the native controls when the media is paused.\n\tvar callback = () => {\n\t\tcancelAnimationFrame(raf_id);\n\n\t\tif (!media.paused) {\n\t\t\traf_id = requestAnimationFrame(callback);\n\t\t}\n\n\t\tvar next_value = media.currentTime;\n\t\tif (value !== next_value) {\n\t\t\tset((value = next_value));\n\t\t}\n\t};\n\n\traf_id = requestAnimationFrame(callback);\n\tmedia.addEventListener('timeupdate', callback);\n\n\trender_effect(() => {\n\t\tvar next_value = Number(get());\n\n\t\tif (value !== next_value && !isNaN(/** @type {any} */ (next_value))) {\n\t\t\tmedia.currentTime = value = next_value;\n\t\t}\n\t});\n\n\tteardown(() => {\n\t\tcancelAnimationFrame(raf_id);\n\t\tmedia.removeEventListener('timeupdate', callback);\n\t});\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {(array: Array<{ start: number; end: number }>) => void} set\n */\nexport function bind_buffered(media, set) {\n\t/** @type {{ start: number; end: number; }[]} */\n\tvar current;\n\n\t// `buffered` can update without emitting any event, so we check it on various events.\n\t// By specs, `buffered` always returns a new object, so we have to compare deeply.\n\tlisten(media, ['loadedmetadata', 'progress', 'timeupdate', 'seeking'], () => {\n\t\tvar ranges = media.buffered;\n\n\t\tif (\n\t\t\t!current ||\n\t\t\tcurrent.length !== ranges.length ||\n\t\t\tcurrent.some((range, i) => ranges.start(i) !== range.start || ranges.end(i) !== range.end)\n\t\t) {\n\t\t\tcurrent = time_ranges_to_array(ranges);\n\t\t\tset(current);\n\t\t}\n\t});\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {(array: Array<{ start: number; end: number }>) => void} set\n */\nexport function bind_seekable(media, set) {\n\tlisten(media, ['loadedmetadata'], () => set(time_ranges_to_array(media.seekable)));\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {(array: Array<{ start: number; end: number }>) => void} set\n */\nexport function bind_played(media, set) {\n\tlisten(media, ['timeupdate'], () => set(time_ranges_to_array(media.played)));\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {(seeking: boolean) => void} set\n */\nexport function bind_seeking(media, set) {\n\tlisten(media, ['seeking', 'seeked'], () => set(media.seeking));\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {(seeking: boolean) => void} set\n */\nexport function bind_ended(media, set) {\n\tlisten(media, ['timeupdate', 'ended'], () => set(media.ended));\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {(ready_state: number) => void} set\n */\nexport function bind_ready_state(media, set) {\n\tlisten(\n\t\tmedia,\n\t\t['loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'emptied'],\n\t\t() => set(media.readyState)\n\t);\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {() => number | undefined} get\n * @param {(playback_rate: number) => void} set\n */\nexport function bind_playback_rate(media, get, set = get) {\n\t// Needs to happen after element is inserted into the dom (which is guaranteed by using effect),\n\t// else playback will be set back to 1 by the browser\n\teffect(() => {\n\t\tvar value = Number(get());\n\n\t\tif (value !== media.playbackRate && !isNaN(value)) {\n\t\t\tmedia.playbackRate = value;\n\t\t}\n\t});\n\n\t// Start listening to ratechange events after the element is inserted into the dom,\n\t// else playback will be set to 1 by the browser\n\teffect(() => {\n\t\tlisten(media, ['ratechange'], () => {\n\t\t\tset(media.playbackRate);\n\t\t});\n\t});\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {() => boolean | undefined} get\n * @param {(paused: boolean) => void} set\n */\nexport function bind_paused(media, get, set = get) {\n\tvar paused = get();\n\n\tvar update = () => {\n\t\tif (paused !== media.paused) {\n\t\t\tset((paused = media.paused));\n\t\t}\n\t};\n\n\t// If someone switches the src while media is playing, the player will pause.\n\t// Listen to the canplay event to get notified of this situation.\n\tlisten(media, ['play', 'pause', 'canplay'], update, paused == null);\n\n\t// Needs to be an effect to ensure media element is mounted: else, if paused is `false` (i.e. should play right away)\n\t// a \"The play() request was interrupted by a new load request\" error would be thrown because the resource isn't loaded yet.\n\teffect(() => {\n\t\tif ((paused = !!get()) !== media.paused) {\n\t\t\tif (paused) {\n\t\t\t\tmedia.pause();\n\t\t\t} else {\n\t\t\t\tmedia.play().catch((error) => {\n\t\t\t\t\tset((paused = true));\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {() => number | undefined} get\n * @param {(volume: number) => void} set\n */\nexport function bind_volume(media, get, set = get) {\n\tvar callback = () => {\n\t\tset(media.volume);\n\t};\n\n\tif (get() == null) {\n\t\tcallback();\n\t}\n\n\tlisten(media, ['volumechange'], callback, false);\n\n\trender_effect(() => {\n\t\tvar value = Number(get());\n\n\t\tif (value !== media.volume && !isNaN(value)) {\n\t\t\tmedia.volume = value;\n\t\t}\n\t});\n}\n\n/**\n * @param {HTMLVideoElement | HTMLAudioElement} media\n * @param {() => boolean | undefined} get\n * @param {(muted: boolean) => void} set\n */\nexport function bind_muted(media, get, set = get) {\n\tvar callback = () => {\n\t\tset(media.muted);\n\t};\n\n\tif (get() == null) {\n\t\tcallback();\n\t}\n\n\tlisten(media, ['volumechange'], callback, false);\n\n\trender_effect(() => {\n\t\tvar value = !!get();\n\n\t\tif (media.muted !== value) media.muted = value;\n\t});\n}\n", "import { listen } from './shared.js';\n\n/**\n * @param {(online: boolean) => void} update\n * @returns {void}\n */\nexport function bind_online(update) {\n\tlisten(window, ['online', 'offline'], () => {\n\t\tupdate(navigator.onLine);\n\t});\n}\n", "import { teardown } from '../../../reactivity/effects.js';\nimport { get_descriptor } from '../../../../shared/utils.js';\n\n/**\n * Makes an `export`ed (non-prop) variable available on the `$$props` object\n * so that consumers can do `bind:x` on the component.\n * @template V\n * @param {Record<string, unknown>} props\n * @param {string} prop\n * @param {V} value\n * @returns {void}\n */\nexport function bind_prop(props, prop, value) {\n\tvar desc = get_descriptor(props, prop);\n\n\tif (desc && desc.set) {\n\t\tprops[prop] = value;\n\t\tteardown(() => {\n\t\t\tprops[prop] = null;\n\t\t});\n\t}\n}\n", "import { effect, teardown } from '../../../reactivity/effects.js';\nimport { untrack } from '../../../runtime.js';\n\n/**\n * We create one listener for all elements\n * @see {@link https://groups.google.com/a/chromium.org/g/blink-dev/c/z6ienONUb5A/m/F5-VcUZtBAAJ Explanation}\n */\nclass ResizeObserverSingleton {\n\t/** */\n\t#listeners = new WeakMap();\n\n\t/** @type {ResizeObserver | undefined} */\n\t#observer;\n\n\t/** @type {ResizeObserverOptions} */\n\t#options;\n\n\t/** @static */\n\tstatic entries = new WeakMap();\n\n\t/** @param {ResizeObserverOptions} options */\n\tconstructor(options) {\n\t\tthis.#options = options;\n\t}\n\n\t/**\n\t * @param {Element} element\n\t * @param {(entry: ResizeObserverEntry) => any} listener\n\t */\n\tobserve(element, listener) {\n\t\tvar listeners = this.#listeners.get(element) || new Set();\n\t\tlisteners.add(listener);\n\n\t\tthis.#listeners.set(element, listeners);\n\t\tthis.#getObserver().observe(element, this.#options);\n\n\t\treturn () => {\n\t\t\tvar listeners = this.#listeners.get(element);\n\t\t\tlisteners.delete(listener);\n\n\t\t\tif (listeners.size === 0) {\n\t\t\t\tthis.#listeners.delete(element);\n\t\t\t\t/** @type {ResizeObserver} */ (this.#observer).unobserve(element);\n\t\t\t}\n\t\t};\n\t}\n\n\t#getObserver() {\n\t\treturn (\n\t\t\tthis.#observer ??\n\t\t\t(this.#observer = new ResizeObserver(\n\t\t\t\t/** @param {any} entries */ (entries) => {\n\t\t\t\t\tfor (var entry of entries) {\n\t\t\t\t\t\tResizeObserverSingleton.entries.set(entry.target, entry);\n\t\t\t\t\t\tfor (var listener of this.#listeners.get(entry.target) || []) {\n\t\t\t\t\t\t\tlistener(entry);\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);\n\t}\n}\n\nvar resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'content-box'\n});\n\nvar resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'border-box'\n});\n\nvar resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'device-pixel-content-box'\n});\n\n/**\n * @param {Element} element\n * @param {'contentRect' | 'contentBoxSize' | 'borderBoxSize' | 'devicePixelContentBoxSize'} type\n * @param {(entry: keyof ResizeObserverEntry) => void} set\n */\nexport function bind_resize_observer(element, type, set) {\n\tvar observer =\n\t\ttype === 'contentRect' || type === 'contentBoxSize'\n\t\t\t? resize_observer_content_box\n\t\t\t: type === 'borderBoxSize'\n\t\t\t\t? resize_observer_border_box\n\t\t\t\t: resize_observer_device_pixel_content_box;\n\n\tvar unsub = observer.observe(element, /** @param {any} entry */ (entry) => set(entry[type]));\n\tteardown(unsub);\n}\n\n/**\n * @param {HTMLElement} element\n * @param {'clientWidth' | 'clientHeight' | 'offsetWidth' | 'offsetHeight'} type\n * @param {(size: number) => void} set\n */\nexport function bind_element_size(element, type, set) {\n\tvar unsub = resize_observer_border_box.observe(element, () => set(element[type]));\n\n\teffect(() => {\n\t\t// The update could contain reads which should be ignored\n\t\tuntrack(() => set(element[type]));\n\t\treturn unsub;\n\t});\n}\n", "/** @import { ComponentContext, Effect } from '#client' */\nimport { DESTROYING, STATE_SYMBOL } from '#client/constants';\nimport { component_context } from '../../../context.js';\nimport { effect, render_effect } from '../../../reactivity/effects.js';\nimport { active_effect, untrack } from '../../../runtime.js';\n\n/**\n * @param {any} bound_value\n * @param {Element} element_or_component\n * @returns {boolean}\n */\nfunction is_bound_this(bound_value, element_or_component) {\n\treturn (\n\t\tbound_value === element_or_component || bound_value?.[STATE_SYMBOL] === element_or_component\n\t);\n}\n\n/**\n * @param {any} element_or_component\n * @param {(value: unknown, ...parts: unknown[]) => void} update\n * @param {(...parts: unknown[]) => unknown} get_value\n * @param {() => unknown[]} [get_parts] Set if the this binding is used inside an each block,\n * \t\t\t\t\t\t\t\t\t\treturns all the parts of the each block context that are used in the expression\n * @returns {void}\n */\nexport function bind_this(element_or_component = {}, update, get_value, get_parts) {\n\tvar component_effect = /** @type {ComponentContext} */ (component_context).r;\n\tvar parent = /** @type {Effect} */ (active_effect);\n\n\teffect(() => {\n\t\t/** @type {unknown[]} */\n\t\tvar old_parts;\n\n\t\t/** @type {unknown[]} */\n\t\tvar parts;\n\n\t\trender_effect(() => {\n\t\t\told_parts = parts;\n\t\t\t// We only track changes to the parts, not the value itself to avoid unnecessary reruns.\n\t\t\tparts = get_parts?.() || [];\n\n\t\t\tuntrack(() => {\n\t\t\t\tif (element_or_component !== get_value(...parts)) {\n\t\t\t\t\tupdate(element_or_component, ...parts);\n\t\t\t\t\t// If this is an effect rerun (cause: each block context changes), then nullify the binding at\n\t\t\t\t\t// the previous position if it isn't already taken over by a different effect.\n\t\t\t\t\tif (old_parts && is_bound_this(get_value(...old_parts), element_or_component)) {\n\t\t\t\t\t\tupdate(null, ...old_parts);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\t// When the bind:this effect is destroyed, we go up the effect parent chain until we find the last parent effect that is destroyed,\n\t\t\t// or the effect containing the component bind:this is in (whichever comes first). That way we can time the nulling of the binding\n\t\t\t// as close to user/developer expectation as possible.\n\t\t\t// TODO Svelte 6: Decide if we want to keep this logic or just always null the binding in the component effect's teardown\n\t\t\t// (which would be simpler, but less intuitive in some cases, and breaks the `ondestroy-before-cleanup` test)\n\t\t\tlet p = parent;\n\t\t\twhile (p !== component_effect && p.parent !== null && p.parent.f & DESTROYING) {\n\t\t\t\tp = p.parent;\n\t\t\t}\n\t\t\tconst teardown = () => {\n\t\t\t\tif (parts && is_bound_this(get_value(...parts), element_or_component)) {\n\t\t\t\t\tupdate(null, ...parts);\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst original_teardown = p.teardown;\n\t\t\tp.teardown = () => {\n\t\t\t\tteardown();\n\t\t\t\toriginal_teardown?.();\n\t\t\t};\n\t\t};\n\t});\n\n\treturn element_or_component;\n}\n", "import { render_effect, teardown } from '../../../reactivity/effects.js';\nimport { listen } from './shared.js';\n\n/**\n * @param {'innerHTML' | 'textContent' | 'innerText'} property\n * @param {HTMLElement} element\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_content_editable(property, element, get, set = get) {\n\telement.addEventListener('input', () => {\n\t\t// @ts-ignore\n\t\tset(element[property]);\n\t});\n\n\trender_effect(() => {\n\t\tvar value = get();\n\n\t\tif (element[property] !== value) {\n\t\t\tif (value == null) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tvar non_null_value = element[property];\n\t\t\t\tset(non_null_value);\n\t\t\t} else {\n\t\t\t\t// @ts-ignore\n\t\t\t\telement[property] = value + '';\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * @param {string} property\n * @param {string} event_name\n * @param {Element} element\n * @param {(value: unknown) => void} set\n * @param {() => unknown} [get]\n * @returns {void}\n */\nexport function bind_property(property, event_name, element, set, get) {\n\tvar handler = () => {\n\t\t// @ts-ignore\n\t\tset(element[property]);\n\t};\n\n\telement.addEventListener(event_name, handler);\n\n\tif (get) {\n\t\trender_effect(() => {\n\t\t\t// @ts-ignore\n\t\t\telement[property] = get();\n\t\t});\n\t} else {\n\t\thandler();\n\t}\n\n\t// @ts-ignore\n\tif (element === document.body || element === window || element === document) {\n\t\tteardown(() => {\n\t\t\telement.removeEventListener(event_name, handler);\n\t\t});\n\t}\n}\n\n/**\n * @param {HTMLElement} element\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_focused(element, set) {\n\tlisten(element, ['focus', 'blur'], () => {\n\t\tset(element === document.activeElement);\n\t});\n}\n", "import { effect, render_effect, teardown } from '../../../reactivity/effects.js';\nimport { listen, without_reactive_context } from './shared.js';\n\n/**\n * @param {'x' | 'y'} type\n * @param {() => number} get\n * @param {(value: number) => void} set\n * @returns {void}\n */\nexport function bind_window_scroll(type, get, set = get) {\n\tvar is_scrolling_x = type === 'x';\n\n\tvar target_handler = () =>\n\t\twithout_reactive_context(() => {\n\t\t\tscrolling = true;\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = setTimeout(clear, 100); // TODO use scrollend event if supported (or when supported everywhere?)\n\n\t\t\tset(window[is_scrolling_x ? 'scrollX' : 'scrollY']);\n\t\t});\n\n\taddEventListener('scroll', target_handler, {\n\t\tpassive: true\n\t});\n\n\tvar scrolling = false;\n\n\t/** @type {ReturnType<typeof setTimeout>} */\n\tvar timeout;\n\tvar clear = () => {\n\t\tscrolling = false;\n\t};\n\tvar first = true;\n\n\trender_effect(() => {\n\t\tvar latest_value = get();\n\t\t// Don't scroll to the initial value for accessibility reasons\n\t\tif (first) {\n\t\t\tfirst = false;\n\t\t} else if (!scrolling && latest_value != null) {\n\t\t\tscrolling = true;\n\t\t\tclearTimeout(timeout);\n\t\t\tif (is_scrolling_x) {\n\t\t\t\tscrollTo(latest_value, window.scrollY);\n\t\t\t} else {\n\t\t\t\tscrollTo(window.scrollX, latest_value);\n\t\t\t}\n\t\t\ttimeout = setTimeout(clear, 100);\n\t\t}\n\t});\n\n\t// Browsers don't fire the scroll event for the initial scroll position when scroll style isn't set to smooth\n\teffect(target_handler);\n\n\tteardown(() => {\n\t\tremoveEventListener('scroll', target_handler);\n\t});\n}\n\n/**\n * @param {'innerWidth' | 'innerHeight' | 'outerWidth' | 'outerHeight'} type\n * @param {(size: number) => void} set\n */\nexport function bind_window_size(type, set) {\n\tlisten(window, ['resize'], () => without_reactive_context(() => set(window[type])));\n}\n", "/** @import { ComponentContextLegacy } from '#client' */\nimport { run, run_all } from '../../../shared/utils.js';\nimport { component_context } from '../../context.js';\nimport { derived } from '../../reactivity/deriveds.js';\nimport { user_pre_effect, user_effect } from '../../reactivity/effects.js';\nimport { deep_read_state, get, untrack } from '../../runtime.js';\n\n/**\n * Legacy-mode only: Call `onMount` callbacks and set up `beforeUpdate`/`afterUpdate` effects\n * @param {boolean} [immutable]\n */\nexport function init(immutable = false) {\n\tconst context = /** @type {ComponentContextLegacy} */ (component_context);\n\n\tconst callbacks = context.l.u;\n\tif (!callbacks) return;\n\n\tlet props = () => deep_read_state(context.s);\n\n\tif (immutable) {\n\t\tlet version = 0;\n\t\tlet prev = /** @type {Record<string, any>} */ ({});\n\n\t\t// In legacy immutable mode, before/afterUpdate only fire if the object identity of a prop changes\n\t\tconst d = derived(() => {\n\t\t\tlet changed = false;\n\t\t\tconst props = context.s;\n\t\t\tfor (const key in props) {\n\t\t\t\tif (props[key] !== prev[key]) {\n\t\t\t\t\tprev[key] = props[key];\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (changed) version++;\n\t\t\treturn version;\n\t\t});\n\n\t\tprops = () => get(d);\n\t}\n\n\t// beforeUpdate\n\tif (callbacks.b.length) {\n\t\tuser_pre_effect(() => {\n\t\t\tobserve_all(context, props);\n\t\t\trun_all(callbacks.b);\n\t\t});\n\t}\n\n\t// onMount (must run before afterUpdate)\n\tuser_effect(() => {\n\t\tconst fns = untrack(() => callbacks.m.map(run));\n\t\treturn () => {\n\t\t\tfor (const fn of fns) {\n\t\t\t\tif (typeof fn === 'function') {\n\t\t\t\t\tfn();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t});\n\n\t// afterUpdate\n\tif (callbacks.a.length) {\n\t\tuser_effect(() => {\n\t\t\tobserve_all(context, props);\n\t\t\trun_all(callbacks.a);\n\t\t});\n\t}\n}\n\n/**\n * Invoke the getter of all signals associated with a component\n * so they can be registered to the effect this function is called in.\n * @param {ComponentContextLegacy} context\n * @param {(() => void)} props\n */\nfunction observe_all(context, props) {\n\tif (context.l.s) {\n\t\tfor (const signal of context.l.s) get(signal);\n\t}\n\n\tprops();\n}\n", "import { set, source } from '../../reactivity/sources.js';\nimport { get } from '../../runtime.js';\nimport { is_array } from '../../../shared/utils.js';\n\n/**\n * Under some circumstances, imports may be reactive in legacy mode. In that case,\n * they should be using `reactive_import` as part of the transformation\n * @param {() => any} fn\n */\nexport function reactive_import(fn) {\n\tvar s = source(0);\n\n\treturn function () {\n\t\tif (arguments.length === 1) {\n\t\t\tset(s, get(s) + 1);\n\t\t\treturn arguments[0];\n\t\t} else {\n\t\t\tget(s);\n\t\t\treturn fn();\n\t\t}\n\t};\n}\n\n/**\n * @this {any}\n * @param {Record<string, unknown>} $$props\n * @param {Event} event\n * @returns {void}\n */\nexport function bubble_event($$props, event) {\n\tvar events = /** @type {Record<string, Function[] | Function>} */ ($$props.$$events)?.[\n\t\tevent.type\n\t];\n\n\tvar callbacks = is_array(events) ? events.slice() : events == null ? [] : [events];\n\n\tfor (var fn of callbacks) {\n\t\t// Preserve \"this\" context\n\t\tfn.call(this, event);\n\t}\n}\n\n/**\n * Used to simulate `$on` on a component instance when `compatibility.componentApi === 4`\n * @param {Record<string, any>} $$props\n * @param {string} event_name\n * @param {Function} event_callback\n */\nexport function add_legacy_event_listener($$props, event_name, event_callback) {\n\t$$props.$$events ||= {};\n\t$$props.$$events[event_name] ||= [];\n\t$$props.$$events[event_name].push(event_callback);\n}\n\n/**\n * Used to simulate `$set` on a component instance when `compatibility.componentApi === 4`.\n * Needs component accessors so that it can call the setter of the prop. Therefore doesn't\n * work for updating props in `$$props` or `$$restProps`.\n * @this {Record<string, any>}\n * @param {Record<string, any>} $$new_props\n */\nexport function update_legacy_props($$new_props) {\n\tfor (var key in $$new_props) {\n\t\tif (key in this) {\n\t\t\tthis[key] = $$new_props[key];\n\t\t}\n\t}\n}\n", "/** @import { Effect, Source } from './types.js' */\nimport { DEV } from 'esm-env';\nimport {\n\tPROPS_IS_BINDABLE,\n\tPROPS_IS_IMMUTABLE,\n\tPROPS_IS_LAZY_INITIAL,\n\tPROPS_IS_RUNES,\n\tPROPS_IS_UPDATED\n} from '../../../constants.js';\nimport { get_descriptor, is_function } from '../../shared/utils.js';\nimport { set, source, update } from './sources.js';\nimport { derived, derived_safe_equal } from './deriveds.js';\nimport {\n\tactive_effect,\n\tget,\n\tis_destroying_effect,\n\tset_active_effect,\n\tuntrack\n} from '../runtime.js';\nimport * as e from '../errors.js';\nimport { DESTROYED, LEGACY_PROPS, STATE_SYMBOL } from '#client/constants';\nimport { proxy } from '../proxy.js';\nimport { capture_store_binding } from './store.js';\nimport { legacy_mode_flag } from '../../flags/index.js';\nimport { effect, render_effect } from './effects.js';\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_prop(fn, d = 1) {\n\tconst value = fn();\n\tfn(value + d);\n\treturn value;\n}\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_prop(fn, d = 1) {\n\tconst value = fn() + d;\n\tfn(value);\n\treturn value;\n}\n\n/**\n * The proxy handler for rest props (i.e. `const { x, ...rest } = $props()`).\n * Is passed the full `$$props` object and excludes the named props.\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, name?: string }>}}\n */\nconst rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\treturn target.props[key];\n\t},\n\tset(target, key) {\n\t\tif (DEV) {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.props_rest_readonly(`${target.name}.${String(key)}`);\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @param {string} [name]\n * @returns {Record<string, unknown>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function rest_props(props, exclude, name) {\n\treturn new Proxy(\n\t\tDEV ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude },\n\t\trest_props_handler\n\t);\n}\n\n/**\n * The proxy handler for legacy $$restProps and $$props\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, special: Record<string | symbol, (v?: unknown) => unknown>, version: Source<number>, parent_effect: Effect }>}}\n */\nconst legacy_rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tget(target.version);\n\t\treturn key in target.special ? target.special[key]() : target.props[key];\n\t},\n\tset(target, key, value) {\n\t\tif (!(key in target.special)) {\n\t\t\tvar previous_effect = active_effect;\n\n\t\t\ttry {\n\t\t\t\tset_active_effect(target.parent_effect);\n\n\t\t\t\t// Handle props that can temporarily get out of sync with the parent\n\t\t\t\t/** @type {Record<string, (v?: unknown) => unknown>} */\n\t\t\t\ttarget.special[key] = prop(\n\t\t\t\t\t{\n\t\t\t\t\t\tget [key]() {\n\t\t\t\t\t\t\treturn target.props[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t/** @type {string} */ (key),\n\t\t\t\t\tPROPS_IS_UPDATED\n\t\t\t\t);\n\t\t\t} finally {\n\t\t\t\tset_active_effect(previous_effect);\n\t\t\t}\n\t\t}\n\n\t\ttarget.special[key](value);\n\t\tupdate(target.version); // $$props is coarse-grained: when $$props.x is updated, usages of $$props.y etc are also rerun\n\t\treturn true;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\tdeleteProperty(target, key) {\n\t\t// Svelte 4 allowed for deletions on $$restProps\n\t\tif (target.exclude.includes(key)) return true;\n\t\ttarget.exclude.push(key);\n\t\tupdate(target.version);\n\t\treturn true;\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @returns {Record<string, unknown>}\n */\nexport function legacy_rest_props(props, exclude) {\n\treturn new Proxy(\n\t\t{\n\t\t\tprops,\n\t\t\texclude,\n\t\t\tspecial: {},\n\t\t\tversion: source(0),\n\t\t\t// TODO this is only necessary because we need to track component\n\t\t\t// destruction inside `prop`, because of `bind:this`, but it\n\t\t\t// seems likely that we can simplify `bind:this` instead\n\t\t\tparent_effect: /** @type {Effect} */ (active_effect)\n\t\t},\n\t\tlegacy_rest_props_handler\n\t);\n}\n\n/**\n * The proxy handler for spread props. Handles the incoming array of props\n * that looks like `() => { dynamic: props }, { static: prop }, ..` and wraps\n * them so that the whole thing is passed to the component as the `$$props` argument.\n * @type {ProxyHandler<{ props: Array<Record<string | symbol, unknown> | (() => Record<string | symbol, unknown>)> }>}}\n */\nconst spread_props_handler = {\n\tget(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) return p[key];\n\t\t}\n\t},\n\tset(target, key, value) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tconst desc = get_descriptor(p, key);\n\t\t\tif (desc && desc.set) {\n\t\t\t\tdesc.set(value);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) {\n\t\t\t\tconst descriptor = get_descriptor(p, key);\n\t\t\t\tif (descriptor && !descriptor.configurable) {\n\t\t\t\t\t// Prevent a \"Non-configurability Report Error\": The target is an array, it does\n\t\t\t\t\t// not actually contain this property. If it is now described as non-configurable,\n\t\t\t\t\t// the proxy throws a validation error. Setting it to true avoids that.\n\t\t\t\t\tdescriptor.configurable = true;\n\t\t\t\t}\n\t\t\t\treturn descriptor;\n\t\t\t}\n\t\t}\n\t},\n\thas(target, key) {\n\t\t// To prevent a false positive `is_entry_props` in the `prop` function\n\t\tif (key === STATE_SYMBOL || key === LEGACY_PROPS) return false;\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (p != null && key in p) return true;\n\t\t}\n\n\t\treturn false;\n\t},\n\townKeys(target) {\n\t\t/** @type {Array<string | symbol>} */\n\t\tconst keys = [];\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (!p) continue;\n\n\t\t\tfor (const key in p) {\n\t\t\t\tif (!keys.includes(key)) keys.push(key);\n\t\t\t}\n\n\t\t\tfor (const key of Object.getOwnPropertySymbols(p)) {\n\t\t\t\tif (!keys.includes(key)) keys.push(key);\n\t\t\t}\n\t\t}\n\n\t\treturn keys;\n\t}\n};\n\n/**\n * @param {Array<Record<string, unknown> | (() => Record<string, unknown>)>} props\n * @returns {any}\n */\nexport function spread_props(...props) {\n\treturn new Proxy({ props }, spread_props_handler);\n}\n\n/**\n * This function is responsible for synchronizing a possibly bound prop with the inner component state.\n * It is used whenever the compiler sees that the component writes to the prop, or when it has a default prop_value.\n * @template V\n * @param {Record<string, unknown>} props\n * @param {string} key\n * @param {number} flags\n * @param {V | (() => V)} [fallback]\n * @returns {(() => V | ((arg: V) => V) | ((arg: V, mutation: boolean) => V))}\n */\nexport function prop(props, key, flags, fallback) {\n\tvar runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;\n\tvar bindable = (flags & PROPS_IS_BINDABLE) !== 0;\n\tvar lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;\n\n\tvar fallback_value = /** @type {V} */ (fallback);\n\tvar fallback_dirty = true;\n\n\tvar get_fallback = () => {\n\t\tif (fallback_dirty) {\n\t\t\tfallback_dirty = false;\n\n\t\t\tfallback_value = lazy\n\t\t\t\t? untrack(/** @type {() => V} */ (fallback))\n\t\t\t\t: /** @type {V} */ (fallback);\n\t\t}\n\n\t\treturn fallback_value;\n\t};\n\n\t/** @type {((v: V) => void) | undefined} */\n\tlet setter;\n\n\tif (bindable) {\n\t\t// Can be the case when someone does `mount(Component, props)` with `let props = $state({...})`\n\t\t// or `createClassComponent(Component, props)`\n\t\tvar is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;\n\n\t\tsetter =\n\t\t\tget_descriptor(props, key)?.set ??\n\t\t\t(is_entry_props && key in props ? (v) => (props[key] = v) : undefined);\n\t}\n\n\t/** @type {V} */\n\tvar initial_value;\n\tvar is_store_sub = false;\n\n\tif (bindable) {\n\t\t[initial_value, is_store_sub] = capture_store_binding(() => /** @type {V} */ (props[key]));\n\t} else {\n\t\tinitial_value = /** @type {V} */ (props[key]);\n\t}\n\n\tif (initial_value === undefined && fallback !== undefined) {\n\t\tinitial_value = get_fallback();\n\n\t\tif (setter) {\n\t\t\tif (runes) e.props_invalid_value(key);\n\t\t\tsetter(initial_value);\n\t\t}\n\t}\n\n\t/** @type {() => V} */\n\tvar getter;\n\n\tif (runes) {\n\t\tgetter = () => {\n\t\t\tvar value = /** @type {V} */ (props[key]);\n\t\t\tif (value === undefined) return get_fallback();\n\t\t\tfallback_dirty = true;\n\t\t\treturn value;\n\t\t};\n\t} else {\n\t\tgetter = () => {\n\t\t\tvar value = /** @type {V} */ (props[key]);\n\n\t\t\tif (value !== undefined) {\n\t\t\t\t// in legacy mode, we don't revert to the fallback value\n\t\t\t\t// if the prop goes from defined to undefined. The easiest\n\t\t\t\t// way to model this is to make the fallback undefined\n\t\t\t\t// as soon as the prop has a value\n\t\t\t\tfallback_value = /** @type {V} */ (undefined);\n\t\t\t}\n\n\t\t\treturn value === undefined ? fallback_value : value;\n\t\t};\n\t}\n\n\t// prop is never written to — we only need a getter\n\tif (runes && (flags & PROPS_IS_UPDATED) === 0) {\n\t\treturn getter;\n\t}\n\n\t// prop is written to, but the parent component had `bind:foo` which\n\t// means we can just call `$$props.foo = value` directly\n\tif (setter) {\n\t\tvar legacy_parent = props.$$legacy;\n\t\treturn /** @type {() => V} */ (\n\t\t\tfunction (/** @type {V} */ value, /** @type {boolean} */ mutation) {\n\t\t\t\tif (arguments.length > 0) {\n\t\t\t\t\t// We don't want to notify if the value was mutated and the parent is in runes mode.\n\t\t\t\t\t// In that case the state proxy (if it exists) should take care of the notification.\n\t\t\t\t\t// If the parent is not in runes mode, we need to notify on mutation, too, that the prop\n\t\t\t\t\t// has changed because the parent will not be able to detect the change otherwise.\n\t\t\t\t\tif (!runes || !mutation || legacy_parent || is_store_sub) {\n\t\t\t\t\t\t/** @type {Function} */ (setter)(mutation ? getter() : value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\n\t\t\t\treturn getter();\n\t\t\t}\n\t\t);\n\t}\n\n\t// Either prop is written to, but there's no binding, which means we\n\t// create a derived that we can write to locally.\n\t// Or we are in legacy mode where we always create a derived to replicate that\n\t// Svelte 4 did not trigger updates when a primitive value was updated to the same value.\n\tvar overridden = false;\n\n\tvar d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => {\n\t\toverridden = false;\n\t\treturn getter();\n\t});\n\n\tif (DEV) {\n\t\td.label = key;\n\t}\n\n\t// Capture the initial value if it's bindable\n\tif (bindable) get(d);\n\n\tvar parent_effect = /** @type {Effect} */ (active_effect);\n\n\treturn /** @type {() => V} */ (\n\t\tfunction (/** @type {any} */ value, /** @type {boolean} */ mutation) {\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tconst new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value;\n\n\t\t\t\tset(d, new_value);\n\t\t\t\toverridden = true;\n\n\t\t\t\tif (fallback_value !== undefined) {\n\t\t\t\t\tfallback_value = new_value;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\t// special case — avoid recalculating the derived if we're in a\n\t\t\t// teardown function and the prop was overridden locally, or the\n\t\t\t// component was already destroyed (people could access props in a timeout)\n\t\t\tif ((is_destroying_effect && overridden) || (parent_effect.f & DESTROYED) !== 0) {\n\t\t\t\treturn d.v;\n\t\t\t}\n\n\t\t\treturn get(d);\n\t\t}\n\t);\n}\n", "/** @import { Blocker } from '#client' */\nimport { dev_current_component_function } from './context.js';\nimport { FILENAME } from '../../constants.js';\nimport { render_effect } from './reactivity/effects.js';\nimport * as w from './warnings.js';\nimport { capture_store_binding } from './reactivity/store.js';\nimport { run_after_blockers } from './reactivity/async.js';\n\n/**\n * @param {string} binding\n * @param {Blocker[]} blockers\n * @param {() => Record<string, any>} get_object\n * @param {() => string} get_property\n * @param {number} line\n * @param {number} column\n */\nexport function validate_binding(binding, blockers, get_object, get_property, line, column) {\n\trun_after_blockers(blockers, () => {\n\t\tvar warned = false;\n\n\t\tvar filename = dev_current_component_function?.[FILENAME];\n\n\t\trender_effect(() => {\n\t\t\tif (warned) return;\n\n\t\t\tvar [object, is_store_sub] = capture_store_binding(get_object);\n\n\t\t\tif (is_store_sub) return;\n\n\t\t\tvar property = get_property();\n\n\t\t\tvar ran = false;\n\n\t\t\t// by making the (possibly false, but it would be an extreme edge case) assumption\n\t\t\t// that a getter has a corresponding setter, we can determine if a property is\n\t\t\t// reactive by seeing if this effect has dependencies\n\t\t\tvar effect = render_effect(() => {\n\t\t\t\tif (ran) return;\n\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\t\tobject[property];\n\t\t\t});\n\n\t\t\tran = true;\n\n\t\t\tif (effect.deps === null) {\n\t\t\t\tvar location = `${filename}:${line}:${column}`;\n\t\t\t\tw.binding_property_non_reactive(binding, location);\n\n\t\t\t\twarned = true;\n\t\t\t}\n\t\t});\n\t});\n}\n", "import { createClassComponent } from '../../../../legacy/legacy-client.js';\nimport { effect_root, render_effect } from '../../reactivity/effects.js';\nimport { append } from '../template.js';\nimport { define_property, get_descriptor, object_keys } from '../../../shared/utils.js';\nimport { create_element } from '../operations.js';\n\n/**\n * @typedef {Object} CustomElementPropDefinition\n * @property {string} [attribute]\n * @property {boolean} [reflect]\n * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]\n */\n\n/** @type {any} */\nlet SvelteElement;\n\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t/** The Svelte component constructor */\n\t\t$$ctor;\n\t\t/** Slots */\n\t\t$$s;\n\t\t/** @type {any} The Svelte component instance */\n\t\t$$c;\n\t\t/** Whether or not the custom element is connected */\n\t\t$$cn = false;\n\t\t/** @type {Record<string, any>} Component props data */\n\t\t$$d = {};\n\t\t/** `true` if currently in the process of reflecting component props back to attributes */\n\t\t$$r = false;\n\t\t/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */\n\t\t$$p_d = {};\n\t\t/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */\n\t\t$$l = {};\n\t\t/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */\n\t\t$$l_u = new Map();\n\t\t/** @type {any} The managed render effect for reflecting attributes */\n\t\t$$me;\n\t\t/** @type {ShadowRoot | null} The ShadowRoot of the custom element */\n\t\t$$shadowRoot = null;\n\n\t\t/**\n\t\t * @param {*} $$componentCtor\n\t\t * @param {*} $$slots\n\t\t * @param {ShadowRootInit | undefined} shadow_root_init\n\t\t */\n\t\tconstructor($$componentCtor, $$slots, shadow_root_init) {\n\t\t\tsuper();\n\t\t\tthis.$$ctor = $$componentCtor;\n\t\t\tthis.$$s = $$slots;\n\n\t\t\tif (shadow_root_init) {\n\t\t\t\t// We need to store the reference to shadow root, because `closed` shadow root cannot be\n\t\t\t\t// accessed with `this.shadowRoot`.\n\t\t\t\tthis.$$shadowRoot = this.attachShadow(shadow_root_init);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @param {string} type\n\t\t * @param {EventListenerOrEventListenerObject} listener\n\t\t * @param {boolean | AddEventListenerOptions} [options]\n\t\t */\n\t\taddEventListener(type, listener, options) {\n\t\t\t// We can't determine upfront if the event is a custom event or not, so we have to\n\t\t\t// listen to both. If someone uses a custom event with the same name as a regular\n\t\t\t// browser event, this fires twice - we can't avoid that.\n\t\t\tthis.$$l[type] = this.$$l[type] || [];\n\t\t\tthis.$$l[type].push(listener);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\n\t\t/**\n\t\t * @param {string} type\n\t\t * @param {EventListenerOrEventListenerObject} listener\n\t\t * @param {boolean | AddEventListenerOptions} [options]\n\t\t */\n\t\tremoveEventListener(type, listener, options) {\n\t\t\tsuper.removeEventListener(type, listener, options);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$l_u.get(listener);\n\t\t\t\tif (unsub) {\n\t\t\t\t\tunsub();\n\t\t\t\t\tthis.$$l_u.delete(listener);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync connectedCallback() {\n\t\t\tthis.$$cn = true;\n\t\t\tif (!this.$$c) {\n\t\t\t\t// We wait one tick to let possible child slot elements be created/mounted\n\t\t\t\tawait Promise.resolve();\n\t\t\t\tif (!this.$$cn || this.$$c) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t/** @param {string} name */\n\t\t\t\tfunction create_slot(name) {\n\t\t\t\t\t/**\n\t\t\t\t\t * @param {Element} anchor\n\t\t\t\t\t */\n\t\t\t\t\treturn (anchor) => {\n\t\t\t\t\t\tconst slot = create_element('slot');\n\t\t\t\t\t\tif (name !== 'default') slot.name = name;\n\n\t\t\t\t\t\tappend(anchor, slot);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t/** @type {Record<string, any>} */\n\t\t\t\tconst $$slots = {};\n\t\t\t\tconst existing_slots = get_custom_elements_slots(this);\n\t\t\t\tfor (const name of this.$$s) {\n\t\t\t\t\tif (name in existing_slots) {\n\t\t\t\t\t\tif (name === 'default' && !this.$$d.children) {\n\t\t\t\t\t\t\tthis.$$d.children = create_slot(name);\n\t\t\t\t\t\t\t$$slots.default = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$$slots[name] = create_slot(name);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const attribute of this.attributes) {\n\t\t\t\t\t// this.$$data takes precedence over this.attributes\n\t\t\t\t\tconst name = this.$$g_p(attribute.name);\n\t\t\t\t\tif (!(name in this.$$d)) {\n\t\t\t\t\t\tthis.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, 'toProp');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Port over props that were set programmatically before ce was initialized\n\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\tif (!(key in this.$$d) && this[key] !== undefined) {\n\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\tthis.$$d[key] = this[key]; // don't transform, these were set through JavaScript\n\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\tdelete this[key]; // remove the property that shadows the getter/setter\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$c = createClassComponent({\n\t\t\t\t\tcomponent: this.$$ctor,\n\t\t\t\t\ttarget: this.$$shadowRoot || this,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...this.$$d,\n\t\t\t\t\t\t$$slots,\n\t\t\t\t\t\t$$host: this\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Reflect component props as attributes\n\t\t\t\tthis.$$me = effect_root(() => {\n\t\t\t\t\trender_effect(() => {\n\t\t\t\t\t\tthis.$$r = true;\n\t\t\t\t\t\tfor (const key of object_keys(this.$$c)) {\n\t\t\t\t\t\t\tif (!this.$$p_d[key]?.reflect) continue;\n\t\t\t\t\t\t\tthis.$$d[key] = this.$$c[key];\n\t\t\t\t\t\t\tconst attribute_value = get_custom_element_value(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tthis.$$d[key],\n\t\t\t\t\t\t\t\tthis.$$p_d,\n\t\t\t\t\t\t\t\t'toAttribute'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (attribute_value == null) {\n\t\t\t\t\t\t\t\tthis.removeAttribute(this.$$p_d[key].attribute || key);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.setAttribute(this.$$p_d[key].attribute || key, attribute_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$$r = false;\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tfor (const type in this.$$l) {\n\t\t\t\t\tfor (const listener of this.$$l[type]) {\n\t\t\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$l = {};\n\t\t\t}\n\t\t}\n\n\t\t// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte\n\t\t// and setting attributes through setAttribute etc, this is helpful\n\n\t\t/**\n\t\t * @param {string} attr\n\t\t * @param {string} _oldValue\n\t\t * @param {string} newValue\n\t\t */\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tif (this.$$r) return;\n\t\t\tattr = this.$$g_p(attr);\n\t\t\tthis.$$d[attr] = get_custom_element_value(attr, newValue, this.$$p_d, 'toProp');\n\t\t\tthis.$$c?.$set({ [attr]: this.$$d[attr] });\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tthis.$$cn = false;\n\t\t\t// In a microtask, because this could be a move within the DOM\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tif (!this.$$cn && this.$$c) {\n\t\t\t\t\tthis.$$c.$destroy();\n\t\t\t\t\tthis.$$me();\n\t\t\t\t\tthis.$$c = undefined;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * @param {string} attribute_name\n\t\t */\n\t\t$$g_p(attribute_name) {\n\t\t\treturn (\n\t\t\t\tobject_keys(this.$$p_d).find(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tthis.$$p_d[key].attribute === attribute_name ||\n\t\t\t\t\t\t(!this.$$p_d[key].attribute && key.toLowerCase() === attribute_name)\n\t\t\t\t) || attribute_name\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * @param {string} prop\n * @param {any} value\n * @param {Record<string, CustomElementPropDefinition>} props_definition\n * @param {'toAttribute' | 'toProp'} [transform]\n */\nfunction get_custom_element_value(prop, value, props_definition, transform) {\n\tconst type = props_definition[prop]?.type;\n\tvalue = type === 'Boolean' && typeof value !== 'boolean' ? value != null : value;\n\tif (!transform || !props_definition[prop]) {\n\t\treturn value;\n\t} else if (transform === 'toAttribute') {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value == null ? null : JSON.stringify(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value ? '' : null;\n\t\t\tcase 'Number':\n\t\t\t\treturn value == null ? null : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t} else {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value && JSON.parse(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value; // conversion already handled above\n\t\t\tcase 'Number':\n\t\t\t\treturn value != null ? +value : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * @param {HTMLElement} element\n */\nfunction get_custom_elements_slots(element) {\n\t/** @type {Record<string, true>} */\n\tconst result = {};\n\telement.childNodes.forEach((node) => {\n\t\tresult[/** @type {Element} node */ (node).slot || 'default'] = true;\n\t});\n\treturn result;\n}\n\n/**\n * @internal\n *\n * Turn a Svelte component into a custom element.\n * @param {any} Component A Svelte component function\n * @param {Record<string, CustomElementPropDefinition>} props_definition The props to observe\n * @param {string[]} slots The slots to create\n * @param {string[]} exports Explicitly exported values, other than props\n * @param {ShadowRootInit | undefined} shadow_root_init Options passed to shadow DOM constructor\n * @param {(ce: new () => HTMLElement) => new () => HTMLElement} [extend]\n */\nexport function create_custom_element(\n\tComponent,\n\tprops_definition,\n\tslots,\n\texports,\n\tshadow_root_init,\n\textend\n) {\n\tlet Class = class extends SvelteElement {\n\t\tconstructor() {\n\t\t\tsuper(Component, slots, shadow_root_init);\n\t\t\tthis.$$p_d = props_definition;\n\t\t}\n\t\tstatic get observedAttributes() {\n\t\t\treturn object_keys(props_definition).map((key) =>\n\t\t\t\t(props_definition[key].attribute || key).toLowerCase()\n\t\t\t);\n\t\t}\n\t};\n\tobject_keys(props_definition).forEach((prop) => {\n\t\tdefine_property(Class.prototype, prop, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop];\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tvalue = get_custom_element_value(prop, value, props_definition);\n\t\t\t\tthis.$$d[prop] = value;\n\t\t\t\tvar component = this.$$c;\n\n\t\t\t\tif (component) {\n\t\t\t\t\t// // If the instance has an accessor, use that instead\n\t\t\t\t\tvar setter = get_descriptor(component, prop)?.get;\n\n\t\t\t\t\tif (setter) {\n\t\t\t\t\t\tcomponent[prop] = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcomponent.$set({ [prop]: value });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\texports.forEach((property) => {\n\t\tdefine_property(Class.prototype, property, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c?.[property];\n\t\t\t}\n\t\t});\n\t});\n\tif (extend) {\n\t\t// @ts-expect-error - assigning here is fine\n\t\tClass = extend(Class);\n\t}\n\tComponent.element = /** @type {any} */ Class;\n\treturn Class;\n}\n", "import { STATE_SYMBOL } from '#client/constants';\nimport { snapshot } from '../../shared/clone.js';\nimport * as w from '../warnings.js';\nimport { untrack } from '../runtime.js';\n\n/**\n * @param {string} method\n * @param {...any} objects\n */\nexport function log_if_contains_state(method, ...objects) {\n\tuntrack(() => {\n\t\ttry {\n\t\t\tlet has_state = false;\n\t\t\tconst transformed = [];\n\n\t\t\tfor (const obj of objects) {\n\t\t\t\tif (obj && typeof obj === 'object' && STATE_SYMBOL in obj) {\n\t\t\t\t\ttransformed.push(snapshot(obj, true));\n\t\t\t\t\thas_state = true;\n\t\t\t\t} else {\n\t\t\t\t\ttransformed.push(obj);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (has_state) {\n\t\t\t\tw.console_log_state(method);\n\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log('%c[snapshot]', 'color: grey', ...transformed);\n\t\t\t}\n\t\t} catch {\n\t\t\t// Errors can occur when trying to snapshot objects with getters that throw or non-enumerable properties.\n\t\t}\n\t});\n\n\treturn objects;\n}\n", "import { async_mode_flag } from '../flags/index.js';\nimport { hydrating } from './dom/hydration.js';\nimport * as w from './warnings.js';\nimport * as e from './errors.js';\nimport { DEV } from 'esm-env';\n\n/**\n * @template T\n * @param {string} key\n * @param {() => T} fn\n * @returns {T}\n */\nexport function hydratable(key, fn) {\n\tif (!async_mode_flag) {\n\t\te.experimental_async_required('hydratable');\n\t}\n\n\tif (hydrating) {\n\t\tconst store = window.__svelte?.h;\n\n\t\tif (store?.has(key)) {\n\t\t\treturn /** @type {T} */ (store.get(key));\n\t\t}\n\n\t\tif (DEV) {\n\t\t\te.hydratable_missing_but_required(key);\n\t\t} else {\n\t\t\tw.hydratable_missing_but_expected(key);\n\t\t}\n\t}\n\n\treturn fn();\n}\n", "/** @import { ComponentContext, ComponentContextLegacy } from '#client' */\n/** @import { EventDispatcher } from './index.js' */\n/** @import { NotFunction } from './internal/types.js' */\nimport { active_reaction, untrack } from './internal/client/runtime.js';\nimport { is_array } from './internal/shared/utils.js';\nimport { user_effect } from './internal/client/index.js';\nimport * as e from './internal/client/errors.js';\nimport { legacy_mode_flag } from './internal/flags/index.js';\nimport { component_context } from './internal/client/context.js';\nimport { DEV } from 'esm-env';\n\nif (DEV) {\n\t/**\n\t * @param {string} rune\n\t */\n\tfunction throw_rune_error(rune) {\n\t\tif (!(rune in globalThis)) {\n\t\t\t// TODO if people start adjusting the \"this can contain runes\" config through v-p-s more, adjust this message\n\t\t\t/** @type {any} */\n\t\t\tlet value; // let's hope noone modifies this global, but belts and braces\n\t\t\tObject.defineProperty(globalThis, rune, {\n\t\t\t\tconfigurable: true,\n\t\t\t\t// eslint-disable-next-line getter-return\n\t\t\t\tget: () => {\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\te.rune_outside_svelte(rune);\n\t\t\t\t},\n\t\t\t\tset: (v) => {\n\t\t\t\t\tvalue = v;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tthrow_rune_error('$state');\n\tthrow_rune_error('$effect');\n\tthrow_rune_error('$derived');\n\tthrow_rune_error('$inspect');\n\tthrow_rune_error('$props');\n\tthrow_rune_error('$bindable');\n}\n\n/**\n * Returns an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that aborts when the current [derived](https://svelte.dev/docs/svelte/$derived) or [effect](https://svelte.dev/docs/svelte/$effect) re-runs or is destroyed.\n *\n * Must be called while a derived or effect is running.\n *\n * ```svelte\n * <script>\n * \timport { getAbortSignal } from 'svelte';\n *\n * \tlet { id } = $props();\n *\n * \tasync function getData(id) {\n * \t\tconst response = await fetch(`/items/${id}`, {\n * \t\t\tsignal: getAbortSignal()\n * \t\t});\n *\n * \t\treturn await response.json();\n * \t}\n *\n * \tconst data = $derived(await getData(id));\n * </script>\n * ```\n */\nexport function getAbortSignal() {\n\tif (active_reaction === null) {\n\t\te.get_abort_signal_outside_reaction();\n\t}\n\n\treturn (active_reaction.ac ??= new AbortController()).signal;\n}\n\n/**\n * `onMount`, like [`$effect`](https://svelte.dev/docs/svelte/$effect), schedules a function to run as soon as the component has been mounted to the DOM.\n * Unlike `$effect`, the provided function only runs once.\n *\n * It must be called during the component's initialisation (but doesn't need to live _inside_ the component;\n * it can be called from an external module). If a function is returned _synchronously_ from `onMount`,\n * it will be called when the component is unmounted.\n *\n * `onMount` functions do not run during [server-side rendering](https://svelte.dev/docs/svelte/svelte-server#render).\n *\n * @template T\n * @param {() => NotFunction<T> | Promise<NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tif (component_context === null) {\n\t\te.lifecycle_outside_component('onMount');\n\t}\n\n\tif (legacy_mode_flag && component_context.l !== null) {\n\t\tinit_update_callbacks(component_context).m.push(fn);\n\t} else {\n\t\tuser_effect(() => {\n\t\t\tconst cleanup = untrack(fn);\n\t\t\tif (typeof cleanup === 'function') return /** @type {() => void} */ (cleanup);\n\t\t});\n\t}\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tif (component_context === null) {\n\t\te.lifecycle_outside_component('onDestroy');\n\t}\n\n\tonMount(() => () => untrack(fn));\n}\n\n/**\n * @template [T=any]\n * @param {string} type\n * @param {T} [detail]\n * @param {any}params_0\n * @returns {CustomEvent<T>}\n */\nfunction create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: null; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events)\n * @template {Record<string, any>} [EventMap = any]\n * @returns {EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst active_component_context = component_context;\n\tif (active_component_context === null) {\n\t\te.lifecycle_outside_component('createEventDispatcher');\n\t}\n\n\t/**\n\t * @param [detail]\n\t * @param [options]\n\t */\n\treturn (type, detail, options) => {\n\t\tconst events = /** @type {Record<string, Function | Function[]>} */ (\n\t\t\tactive_component_context.s.$$events\n\t\t)?.[/** @type {string} */ (type)];\n\n\t\tif (events) {\n\t\t\tconst callbacks = is_array(events) ? events.slice() : [events];\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = create_custom_event(/** @type {string} */ (type), detail, options);\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\n\t\treturn true;\n\t};\n}\n\n// TODO mark beforeUpdate and afterUpdate as deprecated in Svelte 6\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`.\n *\n * In runes mode use `$effect.pre` instead.\n *\n * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tif (component_context === null) {\n\t\te.lifecycle_outside_component('beforeUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('beforeUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).b.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`.\n *\n * In runes mode use `$effect` instead.\n *\n * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tif (component_context === null) {\n\t\te.lifecycle_outside_component('afterUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('afterUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).a.push(fn);\n}\n\n/**\n * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate\n * @param {ComponentContext} context\n */\nfunction init_update_callbacks(context) {\n\tvar l = /** @type {ComponentContextLegacy} */ (context).l;\n\treturn (l.u ??= { a: [], b: [], m: [] });\n}\n\nexport { flushSync, fork } from './internal/client/reactivity/batch.js';\nexport {\n\tcreateContext,\n\tgetContext,\n\tgetAllContexts,\n\thasContext,\n\tsetContext\n} from './internal/client/context.js';\nexport { hydratable } from './internal/client/hydratable.js';\nexport { hydrate, mount, unmount } from './internal/client/render.js';\nexport { tick, untrack, settled } from './internal/client/runtime.js';\nexport { createRawSnippet } from './internal/client/dom/blocks/snippet.js';\n", "/** @import { Action, ActionReturn } from '../action/public' */\n/** @import { Attachment } from './public' */\nimport { noop, render_effect } from 'svelte/internal/client';\nimport { ATTACHMENT_KEY } from '../constants.js';\nimport { untrack } from '../index-client.js';\nimport { teardown } from '../internal/client/reactivity/effects.js';\n\n/**\n * Creates an object key that will be recognised as an attachment when the object is spread onto an element,\n * as a programmatic alternative to using `{@attach ...}`. This can be useful for library authors, though\n * is generally not needed when building an app.\n *\n * ```svelte\n * <script>\n * \timport { createAttachmentKey } from 'svelte/attachments';\n *\n * \tconst props = {\n * \t\tclass: 'cool',\n * \t\tonclick: () => alert('clicked'),\n * \t\t[createAttachmentKey()]: (node) => {\n * \t\t\tnode.textContent = 'attached!';\n * \t\t}\n * \t};\n * </script>\n *\n * <button {...props}>click me</button>\n * ```\n * @since 5.29\n */\nexport function createAttachmentKey() {\n\treturn Symbol(ATTACHMENT_KEY);\n}\n\n/**\n * Converts an [action](https://svelte.dev/docs/svelte/use) into an [attachment](https://svelte.dev/docs/svelte/@attach) keeping the same behavior.\n * It's useful if you want to start using attachments on components but you have actions provided by a library.\n *\n * Note that the second argument, if provided, must be a function that _returns_ the argument to the\n * action function, not the argument itself.\n *\n * ```svelte\n * <!-- with an action -->\n * <div use:foo={bar}>...</div>\n *\n * <!-- with an attachment -->\n * <div {@attach fromAction(foo, () => bar)}>...</div>\n * ```\n * @template {EventTarget} E\n * @template {unknown} T\n * @overload\n * @param {Action<E, T> | ((element: E, arg: T) => void | ActionReturn<T>)} action The action function\n * @param {() => T} fn A function that returns the argument for the action\n * @returns {Attachment<E>}\n */\n/**\n * Converts an [action](https://svelte.dev/docs/svelte/use) into an [attachment](https://svelte.dev/docs/svelte/@attach) keeping the same behavior.\n * It's useful if you want to start using attachments on components but you have actions provided by a library.\n *\n * Note that the second argument, if provided, must be a function that _returns_ the argument to the\n * action function, not the argument itself.\n *\n * ```svelte\n * <!-- with an action -->\n * <div use:foo={bar}>...</div>\n *\n * <!-- with an attachment -->\n * <div {@attach fromAction(foo, () => bar)}>...</div>\n * ```\n * @template {EventTarget} E\n * @overload\n * @param {Action<E, void> | ((element: E) => void | ActionReturn<void>)} action The action function\n * @returns {Attachment<E>}\n */\n/**\n * Converts an [action](https://svelte.dev/docs/svelte/use) into an [attachment](https://svelte.dev/docs/svelte/@attach) keeping the same behavior.\n * It's useful if you want to start using attachments on components but you have actions provided by a library.\n *\n * Note that the second argument, if provided, must be a function that _returns_ the argument to the\n * action function, not the argument itself.\n *\n * ```svelte\n * <!-- with an action -->\n * <div use:foo={bar}>...</div>\n *\n * <!-- with an attachment -->\n * <div {@attach fromAction(foo, () => bar)}>...</div>\n * ```\n *\n * @template {EventTarget} E\n * @template {unknown} T\n * @param {Action<E, T> | ((element: E, arg: T) => void | ActionReturn<T>)} action The action function\n * @param {() => T} fn A function that returns the argument for the action\n * @returns {Attachment<E>}\n * @since 5.32\n */\nexport function fromAction(action, fn = /** @type {() => T} */ (noop)) {\n\treturn (element) => {\n\t\tconst { update, destroy } = untrack(() => action(element, fn()) ?? {});\n\n\t\tif (update) {\n\t\t\tvar ran = false;\n\t\t\trender_effect(() => {\n\t\t\t\tconst arg = fn();\n\t\t\t\tif (ran) update(arg);\n\t\t\t});\n\t\t\tran = true;\n\t\t}\n\n\t\tif (destroy) {\n\t\t\tteardown(destroy);\n\t\t}\n\t};\n}\n"], 5 - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,QAAQ,GAAG,GAAG,UAAU,UAAU;AAC1C,MAAI,MAAM,KAAK,OAAO,MAAM,YAAY,gBAAgB,GAAG;AAC1D,IAAE;AAAA,MAAuB;AAAA;AAAA,MAAiC,kBAAkB,QAAQ;AAAA,IAAE;AAAA,EACvF;AAEA,SAAO;AACR;AASO,SAAS,OAAO,QAAQ,UAAU,UAAU,KAAK,UAAU;AACjE,SAAO;AAAA,IACN,aAAa,MACT,OAAO,QAAQ,IAAI,MACpB,aAAa,QACX,OAAO,QAAQ,MAAM,IAAI,IAC1B,aAAa,QACX,OAAO,QAAQ,MAAM,IAAI,IAC1B,aAAa,QACX,OAAO,QAAQ,MAAM,IAAI,IAC1B;AAAA,IACN,QAAQ,MAAM,OAAO,QAAQ,CAAC;AAAA,IAC9B;AAAA,IACA;AAAA,EACD;AACD;AASA,eAAsB,aAAa,QAAQ,UAAU,UAAU,KAAK,UAAU;AAC7E,SAAO;AAAA,I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,MAAM;AACjC,IAAE,sBAAsB,aAAa;AAAA,EACtC;AAEA,wBAAsB,iBAAiB,EAAE,EAAE,KAAK,EAAE;AACnD;AAMA,SAAS,sBAAsB,SAAS;AACvC,MAAI;AAAA;AAAA,IAA2C,QAAS;AAAA;AACxD,SAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,EAAE;AACvC;;;ACpNO,SAAS,sBAAsB;AACrC,SAAO,OAAO,cAAc;AAC7B;AAgEO,SAAS,WAAWC,SAAQ;AAAA;AAAA,EAA6B;AAAA,GAAO;AACtE,SAAO,CAACC,aAAY;AACnB,UAAM,EAAE,QAAAC,SAAQ,QAAQ,IAAI,QAAQ,MAAMF,QAAOC,UAAS,GAAG,CAAC,KAAK,CAAC,CAAC;AAErE,QAAIC,SAAQ;AACX,UAAI,MAAM;AACV,oBAAc,MAAM;AACnB,cAAM,MAAM,GAAG;AACf,YAAI,IAAK,CAAAA,QAAO,GAAG;AAAA,MACpB,CAAC;AACD,YAAM;AAAA,IACP;AAEA,QAAI,SAAS;AACZ,eAAS,OAAO;AAAA,IACjB;AAAA,EACD;AACD;", 6 - "names": ["hash", "element", "comment", "component", "effect", "component", "prop", "key", "component", "transition", "key", "offscreen", "effect", "branch", "v", "key", "fn", "key", "element", "key", "state", "effect", "key", "fallback", "pending", "index", "item", "next", "element", "effect", "hash", "next", "node", "key", "tag", "snippet", "component", "element", "html", "component", "now", "element", "effect", "animation", "to", "transition", "run", "block", "aborted", "tick", "keyframes", "styles", "t", "element", "anchor", "hash", "action", "clsx", "hash", "key", "append_styles", "hash", "key", "next", "key", "get", "set", "element", "prop", "next", "key", "clsx", "input", "async", "element", "update", "event", "get", "set", "hydration_mismatch", "index", "input", "get", "set", "update", "update", "prop", "element", "listeners", "set", "update", "teardown", "element", "get", "set", "get", "set", "props", "key", "event", "key", "key", "fallback", "effect", "slot", "key", "attr", "prop", "element", "component", "key", "event", "action", "element", "update"] 7 - }
-5128
node_modules/.vite/deps/chunk-TY5SIVJK.js
··· 1 - import { 2 - await_reactivity_loss, 3 - await_waterfall, 4 - hydration_mismatch, 5 - state_proxy_equality_mismatch, 6 - svelte_boundary_reset_noop, 7 - true_default 8 - } from "./chunk-GSVKEBRT.js"; 9 - import { 10 - async_mode_flag, 11 - legacy_mode_flag, 12 - tracing_mode_flag 13 - } from "./chunk-OHYQYV5R.js"; 14 - 15 - // node_modules/svelte/src/internal/shared/utils.js 16 - var is_array = Array.isArray; 17 - var index_of = Array.prototype.indexOf; 18 - var includes = Array.prototype.includes; 19 - var array_from = Array.from; 20 - var object_keys = Object.keys; 21 - var define_property = Object.defineProperty; 22 - var get_descriptor = Object.getOwnPropertyDescriptor; 23 - var get_descriptors = Object.getOwnPropertyDescriptors; 24 - var object_prototype = Object.prototype; 25 - var array_prototype = Array.prototype; 26 - var get_prototype_of = Object.getPrototypeOf; 27 - var is_extensible = Object.isExtensible; 28 - var has_own_property = Object.prototype.hasOwnProperty; 29 - function is_function(thing) { 30 - return typeof thing === "function"; 31 - } 32 - var noop = () => { 33 - }; 34 - function is_promise(value) { 35 - return typeof value?.then === "function"; 36 - } 37 - function run(fn) { 38 - return fn(); 39 - } 40 - function run_all(arr) { 41 - for (var i = 0; i < arr.length; i++) { 42 - arr[i](); 43 - } 44 - } 45 - function deferred() { 46 - var resolve; 47 - var reject; 48 - var promise = new Promise((res, rej) => { 49 - resolve = res; 50 - reject = rej; 51 - }); 52 - return { promise, resolve, reject }; 53 - } 54 - function fallback(value, fallback2, lazy = false) { 55 - return value === void 0 ? lazy ? ( 56 - /** @type {() => V} */ 57 - fallback2() 58 - ) : ( 59 - /** @type {V} */ 60 - fallback2 61 - ) : value; 62 - } 63 - function to_array(value, n) { 64 - if (Array.isArray(value)) { 65 - return value; 66 - } 67 - if (n === void 0 || !(Symbol.iterator in value)) { 68 - return Array.from(value); 69 - } 70 - const array = []; 71 - for (const element of value) { 72 - array.push(element); 73 - if (array.length === n) break; 74 - } 75 - return array; 76 - } 77 - function exclude_from_object(obj, keys) { 78 - var result = {}; 79 - for (var key in obj) { 80 - if (!keys.includes(key)) { 81 - result[key] = obj[key]; 82 - } 83 - } 84 - for (var symbol of Object.getOwnPropertySymbols(obj)) { 85 - if (Object.propertyIsEnumerable.call(obj, symbol) && !keys.includes(symbol)) { 86 - result[symbol] = obj[symbol]; 87 - } 88 - } 89 - return result; 90 - } 91 - 92 - // node_modules/svelte/src/internal/client/constants.js 93 - var DERIVED = 1 << 1; 94 - var EFFECT = 1 << 2; 95 - var RENDER_EFFECT = 1 << 3; 96 - var MANAGED_EFFECT = 1 << 24; 97 - var BLOCK_EFFECT = 1 << 4; 98 - var BRANCH_EFFECT = 1 << 5; 99 - var ROOT_EFFECT = 1 << 6; 100 - var BOUNDARY_EFFECT = 1 << 7; 101 - var CONNECTED = 1 << 9; 102 - var CLEAN = 1 << 10; 103 - var DIRTY = 1 << 11; 104 - var MAYBE_DIRTY = 1 << 12; 105 - var INERT = 1 << 13; 106 - var DESTROYED = 1 << 14; 107 - var REACTION_RAN = 1 << 15; 108 - var DESTROYING = 1 << 25; 109 - var EFFECT_TRANSPARENT = 1 << 16; 110 - var EAGER_EFFECT = 1 << 17; 111 - var HEAD_EFFECT = 1 << 18; 112 - var EFFECT_PRESERVED = 1 << 19; 113 - var USER_EFFECT = 1 << 20; 114 - var EFFECT_OFFSCREEN = 1 << 25; 115 - var WAS_MARKED = 1 << 16; 116 - var REACTION_IS_UPDATING = 1 << 21; 117 - var ASYNC = 1 << 22; 118 - var ERROR_VALUE = 1 << 23; 119 - var STATE_SYMBOL = /* @__PURE__ */ Symbol("$state"); 120 - var LEGACY_PROPS = /* @__PURE__ */ Symbol("legacy props"); 121 - var LOADING_ATTR_SYMBOL = /* @__PURE__ */ Symbol(""); 122 - var PROXY_PATH_SYMBOL = /* @__PURE__ */ Symbol("proxy path"); 123 - var STALE_REACTION = new class StaleReactionError extends Error { 124 - name = "StaleReactionError"; 125 - message = "The reaction that called `getAbortSignal()` was re-run or destroyed"; 126 - }(); 127 - var IS_XHTML = ( 128 - // We gotta write it like this because after downleveling the pure comment may end up in the wrong location 129 - !!globalThis.document?.contentType && globalThis.document.contentType.includes("xml") 130 - ); 131 - var ELEMENT_NODE = 1; 132 - var TEXT_NODE = 3; 133 - var COMMENT_NODE = 8; 134 - var DOCUMENT_FRAGMENT_NODE = 11; 135 - 136 - // node_modules/svelte/src/internal/shared/errors.js 137 - function experimental_async_required(name) { 138 - if (true_default) { 139 - const error = new Error(`experimental_async_required 140 - Cannot use \`${name}(...)\` unless the \`experimental.async\` compiler option is \`true\` 141 - https://svelte.dev/e/experimental_async_required`); 142 - error.name = "Svelte error"; 143 - throw error; 144 - } else { 145 - throw new Error(`https://svelte.dev/e/experimental_async_required`); 146 - } 147 - } 148 - function invalid_default_snippet() { 149 - if (true_default) { 150 - const error = new Error(`invalid_default_snippet 151 - Cannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead 152 - https://svelte.dev/e/invalid_default_snippet`); 153 - error.name = "Svelte error"; 154 - throw error; 155 - } else { 156 - throw new Error(`https://svelte.dev/e/invalid_default_snippet`); 157 - } 158 - } 159 - function invalid_snippet_arguments() { 160 - if (true_default) { 161 - const error = new Error(`invalid_snippet_arguments 162 - A snippet function was passed invalid arguments. Snippets should only be instantiated via \`{@render ...}\` 163 - https://svelte.dev/e/invalid_snippet_arguments`); 164 - error.name = "Svelte error"; 165 - throw error; 166 - } else { 167 - throw new Error(`https://svelte.dev/e/invalid_snippet_arguments`); 168 - } 169 - } 170 - function invariant_violation(message) { 171 - if (true_default) { 172 - const error = new Error(`invariant_violation 173 - An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${message}" 174 - https://svelte.dev/e/invariant_violation`); 175 - error.name = "Svelte error"; 176 - throw error; 177 - } else { 178 - throw new Error(`https://svelte.dev/e/invariant_violation`); 179 - } 180 - } 181 - function lifecycle_outside_component(name) { 182 - if (true_default) { 183 - const error = new Error(`lifecycle_outside_component 184 - \`${name}(...)\` can only be used during component initialisation 185 - https://svelte.dev/e/lifecycle_outside_component`); 186 - error.name = "Svelte error"; 187 - throw error; 188 - } else { 189 - throw new Error(`https://svelte.dev/e/lifecycle_outside_component`); 190 - } 191 - } 192 - function missing_context() { 193 - if (true_default) { 194 - const error = new Error(`missing_context 195 - Context was not set in a parent component 196 - https://svelte.dev/e/missing_context`); 197 - error.name = "Svelte error"; 198 - throw error; 199 - } else { 200 - throw new Error(`https://svelte.dev/e/missing_context`); 201 - } 202 - } 203 - function snippet_without_render_tag() { 204 - if (true_default) { 205 - const error = new Error(`snippet_without_render_tag 206 - Attempted to render a snippet without a \`{@render}\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \`{snippet}\` to \`{@render snippet()}\`. 207 - https://svelte.dev/e/snippet_without_render_tag`); 208 - error.name = "Svelte error"; 209 - throw error; 210 - } else { 211 - throw new Error(`https://svelte.dev/e/snippet_without_render_tag`); 212 - } 213 - } 214 - function store_invalid_shape(name) { 215 - if (true_default) { 216 - const error = new Error(`store_invalid_shape 217 - \`${name}\` is not a store with a \`subscribe\` method 218 - https://svelte.dev/e/store_invalid_shape`); 219 - error.name = "Svelte error"; 220 - throw error; 221 - } else { 222 - throw new Error(`https://svelte.dev/e/store_invalid_shape`); 223 - } 224 - } 225 - function svelte_element_invalid_this_value() { 226 - if (true_default) { 227 - const error = new Error(`svelte_element_invalid_this_value 228 - The \`this\` prop on \`<svelte:element>\` must be a string, if defined 229 - https://svelte.dev/e/svelte_element_invalid_this_value`); 230 - error.name = "Svelte error"; 231 - throw error; 232 - } else { 233 - throw new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`); 234 - } 235 - } 236 - 237 - // node_modules/svelte/src/internal/client/errors.js 238 - function async_derived_orphan() { 239 - if (true_default) { 240 - const error = new Error(`async_derived_orphan 241 - Cannot create a \`$derived(...)\` with an \`await\` expression outside of an effect tree 242 - https://svelte.dev/e/async_derived_orphan`); 243 - error.name = "Svelte error"; 244 - throw error; 245 - } else { 246 - throw new Error(`https://svelte.dev/e/async_derived_orphan`); 247 - } 248 - } 249 - function bind_invalid_checkbox_value() { 250 - if (true_default) { 251 - const error = new Error(`bind_invalid_checkbox_value 252 - Using \`bind:value\` together with a checkbox input is not allowed. Use \`bind:checked\` instead 253 - https://svelte.dev/e/bind_invalid_checkbox_value`); 254 - error.name = "Svelte error"; 255 - throw error; 256 - } else { 257 - throw new Error(`https://svelte.dev/e/bind_invalid_checkbox_value`); 258 - } 259 - } 260 - function component_api_changed(method, component) { 261 - if (true_default) { 262 - const error = new Error(`component_api_changed 263 - Calling \`${method}\` on a component instance (of ${component}) is no longer valid in Svelte 5 264 - https://svelte.dev/e/component_api_changed`); 265 - error.name = "Svelte error"; 266 - throw error; 267 - } else { 268 - throw new Error(`https://svelte.dev/e/component_api_changed`); 269 - } 270 - } 271 - function component_api_invalid_new(component, name) { 272 - if (true_default) { 273 - const error = new Error(`component_api_invalid_new 274 - Attempted to instantiate ${component} with \`new ${name}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`compatibility.componentApi\` compiler option to \`4\` to keep it working. 275 - https://svelte.dev/e/component_api_invalid_new`); 276 - error.name = "Svelte error"; 277 - throw error; 278 - } else { 279 - throw new Error(`https://svelte.dev/e/component_api_invalid_new`); 280 - } 281 - } 282 - function derived_references_self() { 283 - if (true_default) { 284 - const error = new Error(`derived_references_self 285 - A derived value cannot reference itself recursively 286 - https://svelte.dev/e/derived_references_self`); 287 - error.name = "Svelte error"; 288 - throw error; 289 - } else { 290 - throw new Error(`https://svelte.dev/e/derived_references_self`); 291 - } 292 - } 293 - function each_key_duplicate(a, b, value) { 294 - if (true_default) { 295 - const error = new Error(`each_key_duplicate 296 - ${value ? `Keyed each block has duplicate key \`${value}\` at indexes ${a} and ${b}` : `Keyed each block has duplicate key at indexes ${a} and ${b}`} 297 - https://svelte.dev/e/each_key_duplicate`); 298 - error.name = "Svelte error"; 299 - throw error; 300 - } else { 301 - throw new Error(`https://svelte.dev/e/each_key_duplicate`); 302 - } 303 - } 304 - function each_key_volatile(index, a, b) { 305 - if (true_default) { 306 - const error = new Error(`each_key_volatile 307 - Keyed each block has key that is not idempotent — the key for item at index ${index} was \`${a}\` but is now \`${b}\`. Keys must be the same each time for a given item 308 - https://svelte.dev/e/each_key_volatile`); 309 - error.name = "Svelte error"; 310 - throw error; 311 - } else { 312 - throw new Error(`https://svelte.dev/e/each_key_volatile`); 313 - } 314 - } 315 - function effect_in_teardown(rune) { 316 - if (true_default) { 317 - const error = new Error(`effect_in_teardown 318 - \`${rune}\` cannot be used inside an effect cleanup function 319 - https://svelte.dev/e/effect_in_teardown`); 320 - error.name = "Svelte error"; 321 - throw error; 322 - } else { 323 - throw new Error(`https://svelte.dev/e/effect_in_teardown`); 324 - } 325 - } 326 - function effect_in_unowned_derived() { 327 - if (true_default) { 328 - const error = new Error(`effect_in_unowned_derived 329 - Effect cannot be created inside a \`$derived\` value that was not itself created inside an effect 330 - https://svelte.dev/e/effect_in_unowned_derived`); 331 - error.name = "Svelte error"; 332 - throw error; 333 - } else { 334 - throw new Error(`https://svelte.dev/e/effect_in_unowned_derived`); 335 - } 336 - } 337 - function effect_orphan(rune) { 338 - if (true_default) { 339 - const error = new Error(`effect_orphan 340 - \`${rune}\` can only be used inside an effect (e.g. during component initialisation) 341 - https://svelte.dev/e/effect_orphan`); 342 - error.name = "Svelte error"; 343 - throw error; 344 - } else { 345 - throw new Error(`https://svelte.dev/e/effect_orphan`); 346 - } 347 - } 348 - function effect_pending_outside_reaction() { 349 - if (true_default) { 350 - const error = new Error(`effect_pending_outside_reaction 351 - \`$effect.pending()\` can only be called inside an effect or derived 352 - https://svelte.dev/e/effect_pending_outside_reaction`); 353 - error.name = "Svelte error"; 354 - throw error; 355 - } else { 356 - throw new Error(`https://svelte.dev/e/effect_pending_outside_reaction`); 357 - } 358 - } 359 - function effect_update_depth_exceeded() { 360 - if (true_default) { 361 - const error = new Error(`effect_update_depth_exceeded 362 - Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state 363 - https://svelte.dev/e/effect_update_depth_exceeded`); 364 - error.name = "Svelte error"; 365 - throw error; 366 - } else { 367 - throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`); 368 - } 369 - } 370 - function fork_discarded() { 371 - if (true_default) { 372 - const error = new Error(`fork_discarded 373 - Cannot commit a fork that was already discarded 374 - https://svelte.dev/e/fork_discarded`); 375 - error.name = "Svelte error"; 376 - throw error; 377 - } else { 378 - throw new Error(`https://svelte.dev/e/fork_discarded`); 379 - } 380 - } 381 - function fork_timing() { 382 - if (true_default) { 383 - const error = new Error(`fork_timing 384 - Cannot create a fork inside an effect or when state changes are pending 385 - https://svelte.dev/e/fork_timing`); 386 - error.name = "Svelte error"; 387 - throw error; 388 - } else { 389 - throw new Error(`https://svelte.dev/e/fork_timing`); 390 - } 391 - } 392 - function get_abort_signal_outside_reaction() { 393 - if (true_default) { 394 - const error = new Error(`get_abort_signal_outside_reaction 395 - \`getAbortSignal()\` can only be called inside an effect or derived 396 - https://svelte.dev/e/get_abort_signal_outside_reaction`); 397 - error.name = "Svelte error"; 398 - throw error; 399 - } else { 400 - throw new Error(`https://svelte.dev/e/get_abort_signal_outside_reaction`); 401 - } 402 - } 403 - function hydratable_missing_but_required(key) { 404 - if (true_default) { 405 - const error = new Error(`hydratable_missing_but_required 406 - Expected to find a hydratable with key \`${key}\` during hydration, but did not. 407 - https://svelte.dev/e/hydratable_missing_but_required`); 408 - error.name = "Svelte error"; 409 - throw error; 410 - } else { 411 - throw new Error(`https://svelte.dev/e/hydratable_missing_but_required`); 412 - } 413 - } 414 - function hydration_failed() { 415 - if (true_default) { 416 - const error = new Error(`hydration_failed 417 - Failed to hydrate the application 418 - https://svelte.dev/e/hydration_failed`); 419 - error.name = "Svelte error"; 420 - throw error; 421 - } else { 422 - throw new Error(`https://svelte.dev/e/hydration_failed`); 423 - } 424 - } 425 - function invalid_snippet() { 426 - if (true_default) { 427 - const error = new Error(`invalid_snippet 428 - Could not \`{@render}\` snippet due to the expression being \`null\` or \`undefined\`. Consider using optional chaining \`{@render snippet?.()}\` 429 - https://svelte.dev/e/invalid_snippet`); 430 - error.name = "Svelte error"; 431 - throw error; 432 - } else { 433 - throw new Error(`https://svelte.dev/e/invalid_snippet`); 434 - } 435 - } 436 - function lifecycle_legacy_only(name) { 437 - if (true_default) { 438 - const error = new Error(`lifecycle_legacy_only 439 - \`${name}(...)\` cannot be used in runes mode 440 - https://svelte.dev/e/lifecycle_legacy_only`); 441 - error.name = "Svelte error"; 442 - throw error; 443 - } else { 444 - throw new Error(`https://svelte.dev/e/lifecycle_legacy_only`); 445 - } 446 - } 447 - function props_invalid_value(key) { 448 - if (true_default) { 449 - const error = new Error(`props_invalid_value 450 - Cannot do \`bind:${key}={undefined}\` when \`${key}\` has a fallback value 451 - https://svelte.dev/e/props_invalid_value`); 452 - error.name = "Svelte error"; 453 - throw error; 454 - } else { 455 - throw new Error(`https://svelte.dev/e/props_invalid_value`); 456 - } 457 - } 458 - function props_rest_readonly(property) { 459 - if (true_default) { 460 - const error = new Error(`props_rest_readonly 461 - Rest element properties of \`$props()\` such as \`${property}\` are readonly 462 - https://svelte.dev/e/props_rest_readonly`); 463 - error.name = "Svelte error"; 464 - throw error; 465 - } else { 466 - throw new Error(`https://svelte.dev/e/props_rest_readonly`); 467 - } 468 - } 469 - function rune_outside_svelte(rune) { 470 - if (true_default) { 471 - const error = new Error(`rune_outside_svelte 472 - The \`${rune}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files 473 - https://svelte.dev/e/rune_outside_svelte`); 474 - error.name = "Svelte error"; 475 - throw error; 476 - } else { 477 - throw new Error(`https://svelte.dev/e/rune_outside_svelte`); 478 - } 479 - } 480 - function set_context_after_init() { 481 - if (true_default) { 482 - const error = new Error(`set_context_after_init 483 - \`setContext\` must be called when a component first initializes, not in a subsequent effect or after an \`await\` expression 484 - https://svelte.dev/e/set_context_after_init`); 485 - error.name = "Svelte error"; 486 - throw error; 487 - } else { 488 - throw new Error(`https://svelte.dev/e/set_context_after_init`); 489 - } 490 - } 491 - function state_descriptors_fixed() { 492 - if (true_default) { 493 - const error = new Error(`state_descriptors_fixed 494 - Property descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`. 495 - https://svelte.dev/e/state_descriptors_fixed`); 496 - error.name = "Svelte error"; 497 - throw error; 498 - } else { 499 - throw new Error(`https://svelte.dev/e/state_descriptors_fixed`); 500 - } 501 - } 502 - function state_prototype_fixed() { 503 - if (true_default) { 504 - const error = new Error(`state_prototype_fixed 505 - Cannot set prototype of \`$state\` object 506 - https://svelte.dev/e/state_prototype_fixed`); 507 - error.name = "Svelte error"; 508 - throw error; 509 - } else { 510 - throw new Error(`https://svelte.dev/e/state_prototype_fixed`); 511 - } 512 - } 513 - function state_unsafe_mutation() { 514 - if (true_default) { 515 - const error = new Error(`state_unsafe_mutation 516 - Updating state inside \`$derived(...)\`, \`$inspect(...)\` or a template expression is forbidden. If the value should not be reactive, declare it without \`$state\` 517 - https://svelte.dev/e/state_unsafe_mutation`); 518 - error.name = "Svelte error"; 519 - throw error; 520 - } else { 521 - throw new Error(`https://svelte.dev/e/state_unsafe_mutation`); 522 - } 523 - } 524 - function svelte_boundary_reset_onerror() { 525 - if (true_default) { 526 - const error = new Error(`svelte_boundary_reset_onerror 527 - A \`<svelte:boundary>\` \`reset\` function cannot be called while an error is still being handled 528 - https://svelte.dev/e/svelte_boundary_reset_onerror`); 529 - error.name = "Svelte error"; 530 - throw error; 531 - } else { 532 - throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`); 533 - } 534 - } 535 - 536 - // node_modules/svelte/src/constants.js 537 - var EACH_ITEM_REACTIVE = 1; 538 - var EACH_INDEX_REACTIVE = 1 << 1; 539 - var EACH_IS_CONTROLLED = 1 << 2; 540 - var EACH_IS_ANIMATED = 1 << 3; 541 - var EACH_ITEM_IMMUTABLE = 1 << 4; 542 - var PROPS_IS_IMMUTABLE = 1; 543 - var PROPS_IS_RUNES = 1 << 1; 544 - var PROPS_IS_UPDATED = 1 << 2; 545 - var PROPS_IS_BINDABLE = 1 << 3; 546 - var PROPS_IS_LAZY_INITIAL = 1 << 4; 547 - var TRANSITION_IN = 1; 548 - var TRANSITION_OUT = 1 << 1; 549 - var TRANSITION_GLOBAL = 1 << 2; 550 - var TEMPLATE_FRAGMENT = 1; 551 - var TEMPLATE_USE_IMPORT_NODE = 1 << 1; 552 - var TEMPLATE_USE_SVG = 1 << 2; 553 - var TEMPLATE_USE_MATHML = 1 << 3; 554 - var HYDRATION_START = "["; 555 - var HYDRATION_START_ELSE = "[!"; 556 - var HYDRATION_START_FAILED = "[?"; 557 - var HYDRATION_END = "]"; 558 - var HYDRATION_ERROR = {}; 559 - var ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1; 560 - var ELEMENT_IS_INPUT = 1 << 2; 561 - var UNINITIALIZED = /* @__PURE__ */ Symbol(); 562 - var FILENAME = /* @__PURE__ */ Symbol("filename"); 563 - var HMR = /* @__PURE__ */ Symbol("hmr"); 564 - var NAMESPACE_HTML = "http://www.w3.org/1999/xhtml"; 565 - var NAMESPACE_SVG = "http://www.w3.org/2000/svg"; 566 - var NAMESPACE_MATHML = "http://www.w3.org/1998/Math/MathML"; 567 - var ATTACHMENT_KEY = "@attach"; 568 - 569 - // node_modules/svelte/src/internal/client/context.js 570 - var component_context = null; 571 - function set_component_context(context) { 572 - component_context = context; 573 - } 574 - var dev_stack = null; 575 - function set_dev_stack(stack2) { 576 - dev_stack = stack2; 577 - } 578 - function add_svelte_meta(callback, type, component, line, column, additional) { 579 - const parent = dev_stack; 580 - dev_stack = { 581 - type, 582 - file: component[FILENAME], 583 - line, 584 - column, 585 - parent, 586 - ...additional 587 - }; 588 - try { 589 - return callback(); 590 - } finally { 591 - dev_stack = parent; 592 - } 593 - } 594 - var dev_current_component_function = null; 595 - function set_dev_current_component_function(fn) { 596 - dev_current_component_function = fn; 597 - } 598 - function createContext() { 599 - const key = {}; 600 - return [ 601 - () => { 602 - if (!hasContext(key)) { 603 - missing_context(); 604 - } 605 - return getContext(key); 606 - }, 607 - (context) => setContext(key, context) 608 - ]; 609 - } 610 - function getContext(key) { 611 - const context_map = get_or_init_context_map("getContext"); 612 - const result = ( 613 - /** @type {T} */ 614 - context_map.get(key) 615 - ); 616 - return result; 617 - } 618 - function setContext(key, context) { 619 - const context_map = get_or_init_context_map("setContext"); 620 - if (async_mode_flag) { 621 - var flags2 = ( 622 - /** @type {Effect} */ 623 - active_effect.f 624 - ); 625 - var valid = !active_reaction && (flags2 & BRANCH_EFFECT) !== 0 && // pop() runs synchronously, so this indicates we're setting context after an await 626 - !/** @type {ComponentContext} */ 627 - component_context.i; 628 - if (!valid) { 629 - set_context_after_init(); 630 - } 631 - } 632 - context_map.set(key, context); 633 - return context; 634 - } 635 - function hasContext(key) { 636 - const context_map = get_or_init_context_map("hasContext"); 637 - return context_map.has(key); 638 - } 639 - function getAllContexts() { 640 - const context_map = get_or_init_context_map("getAllContexts"); 641 - return ( 642 - /** @type {T} */ 643 - context_map 644 - ); 645 - } 646 - function push(props, runes = false, fn) { 647 - component_context = { 648 - p: component_context, 649 - i: false, 650 - c: null, 651 - e: null, 652 - s: props, 653 - x: null, 654 - r: ( 655 - /** @type {Effect} */ 656 - active_effect 657 - ), 658 - l: legacy_mode_flag && !runes ? { s: null, u: null, $: [] } : null 659 - }; 660 - if (true_default) { 661 - component_context.function = fn; 662 - dev_current_component_function = fn; 663 - } 664 - } 665 - function pop(component) { 666 - var context = ( 667 - /** @type {ComponentContext} */ 668 - component_context 669 - ); 670 - var effects = context.e; 671 - if (effects !== null) { 672 - context.e = null; 673 - for (var fn of effects) { 674 - create_user_effect(fn); 675 - } 676 - } 677 - if (component !== void 0) { 678 - context.x = component; 679 - } 680 - context.i = true; 681 - component_context = context.p; 682 - if (true_default) { 683 - dev_current_component_function = component_context?.function ?? null; 684 - } 685 - return component ?? /** @type {T} */ 686 - {}; 687 - } 688 - function is_runes() { 689 - return !legacy_mode_flag || component_context !== null && component_context.l === null; 690 - } 691 - function get_or_init_context_map(name) { 692 - if (component_context === null) { 693 - lifecycle_outside_component(name); 694 - } 695 - return component_context.c ??= new Map(get_parent_context(component_context) || void 0); 696 - } 697 - function get_parent_context(component_context2) { 698 - let parent = component_context2.p; 699 - while (parent !== null) { 700 - const context_map = parent.c; 701 - if (context_map !== null) { 702 - return context_map; 703 - } 704 - parent = parent.p; 705 - } 706 - return null; 707 - } 708 - 709 - // node_modules/svelte/src/internal/client/dom/task.js 710 - var micro_tasks = []; 711 - function run_micro_tasks() { 712 - var tasks = micro_tasks; 713 - micro_tasks = []; 714 - run_all(tasks); 715 - } 716 - function queue_micro_task(fn) { 717 - if (micro_tasks.length === 0 && !is_flushing_sync) { 718 - var tasks = micro_tasks; 719 - queueMicrotask(() => { 720 - if (tasks === micro_tasks) run_micro_tasks(); 721 - }); 722 - } 723 - micro_tasks.push(fn); 724 - } 725 - function flush_tasks() { 726 - while (micro_tasks.length > 0) { 727 - run_micro_tasks(); 728 - } 729 - } 730 - 731 - // node_modules/svelte/src/internal/client/error-handling.js 732 - var adjustments = /* @__PURE__ */ new WeakMap(); 733 - function handle_error(error) { 734 - var effect2 = active_effect; 735 - if (effect2 === null) { 736 - active_reaction.f |= ERROR_VALUE; 737 - return error; 738 - } 739 - if (true_default && error instanceof Error && !adjustments.has(error)) { 740 - adjustments.set(error, get_adjustments(error, effect2)); 741 - } 742 - if ((effect2.f & REACTION_RAN) === 0 && (effect2.f & EFFECT) === 0) { 743 - if (true_default && !effect2.parent && error instanceof Error) { 744 - apply_adjustments(error); 745 - } 746 - throw error; 747 - } 748 - invoke_error_boundary(error, effect2); 749 - } 750 - function invoke_error_boundary(error, effect2) { 751 - while (effect2 !== null) { 752 - if ((effect2.f & BOUNDARY_EFFECT) !== 0) { 753 - if ((effect2.f & REACTION_RAN) === 0) { 754 - throw error; 755 - } 756 - try { 757 - effect2.b.error(error); 758 - return; 759 - } catch (e) { 760 - error = e; 761 - } 762 - } 763 - effect2 = effect2.parent; 764 - } 765 - if (true_default && error instanceof Error) { 766 - apply_adjustments(error); 767 - } 768 - throw error; 769 - } 770 - function get_adjustments(error, effect2) { 771 - const message_descriptor = get_descriptor(error, "message"); 772 - if (message_descriptor && !message_descriptor.configurable) return; 773 - var indent = is_firefox ? " " : " "; 774 - var component_stack = ` 775 - ${indent}in ${effect2.fn?.name || "<unknown>"}`; 776 - var context = effect2.ctx; 777 - while (context !== null) { 778 - component_stack += ` 779 - ${indent}in ${context.function?.[FILENAME].split("/").pop()}`; 780 - context = context.p; 781 - } 782 - return { 783 - message: error.message + ` 784 - ${component_stack} 785 - `, 786 - stack: error.stack?.split("\n").filter((line) => !line.includes("svelte/src/internal")).join("\n") 787 - }; 788 - } 789 - function apply_adjustments(error) { 790 - const adjusted = adjustments.get(error); 791 - if (adjusted) { 792 - define_property(error, "message", { 793 - value: adjusted.message 794 - }); 795 - define_property(error, "stack", { 796 - value: adjusted.stack 797 - }); 798 - } 799 - } 800 - 801 - // node_modules/svelte/src/internal/client/reactivity/equality.js 802 - function equals(value) { 803 - return value === this.v; 804 - } 805 - function safe_not_equal(a, b) { 806 - return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function"; 807 - } 808 - function safe_equals(value) { 809 - return !safe_not_equal(value, this.v); 810 - } 811 - 812 - // node_modules/svelte/src/internal/shared/warnings.js 813 - var bold = "font-weight: bold"; 814 - var normal = "font-weight: normal"; 815 - function dynamic_void_element_content(tag2) { 816 - if (true_default) { 817 - console.warn(`%c[svelte] dynamic_void_element_content 818 - %c\`<svelte:element this="${tag2}">\` is a void element — it cannot have content 819 - https://svelte.dev/e/dynamic_void_element_content`, bold, normal); 820 - } else { 821 - console.warn(`https://svelte.dev/e/dynamic_void_element_content`); 822 - } 823 - } 824 - function state_snapshot_uncloneable(properties) { 825 - if (true_default) { 826 - console.warn( 827 - `%c[svelte] state_snapshot_uncloneable 828 - %c${properties ? `The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals: 829 - 830 - ${properties}` : "Value cannot be cloned with `$state.snapshot` — the original value was returned"} 831 - https://svelte.dev/e/state_snapshot_uncloneable`, 832 - bold, 833 - normal 834 - ); 835 - } else { 836 - console.warn(`https://svelte.dev/e/state_snapshot_uncloneable`); 837 - } 838 - } 839 - 840 - // node_modules/svelte/src/internal/shared/clone.js 841 - var empty = []; 842 - function snapshot(value, skip_warning = false, no_tojson = false) { 843 - if (true_default && !skip_warning) { 844 - const paths = []; 845 - const copy = clone(value, /* @__PURE__ */ new Map(), "", paths, null, no_tojson); 846 - if (paths.length === 1 && paths[0] === "") { 847 - state_snapshot_uncloneable(); 848 - } else if (paths.length > 0) { 849 - const slice = paths.length > 10 ? paths.slice(0, 7) : paths.slice(0, 10); 850 - const excess = paths.length - slice.length; 851 - let uncloned = slice.map((path) => `- <value>${path}`).join("\n"); 852 - if (excess > 0) uncloned += ` 853 - - ...and ${excess} more`; 854 - state_snapshot_uncloneable(uncloned); 855 - } 856 - return copy; 857 - } 858 - return clone(value, /* @__PURE__ */ new Map(), "", empty, null, no_tojson); 859 - } 860 - function clone(value, cloned, path, paths, original = null, no_tojson = false) { 861 - if (typeof value === "object" && value !== null) { 862 - var unwrapped = cloned.get(value); 863 - if (unwrapped !== void 0) return unwrapped; 864 - if (value instanceof Map) return ( 865 - /** @type {Snapshot<T>} */ 866 - new Map(value) 867 - ); 868 - if (value instanceof Set) return ( 869 - /** @type {Snapshot<T>} */ 870 - new Set(value) 871 - ); 872 - if (is_array(value)) { 873 - var copy = ( 874 - /** @type {Snapshot<any>} */ 875 - Array(value.length) 876 - ); 877 - cloned.set(value, copy); 878 - if (original !== null) { 879 - cloned.set(original, copy); 880 - } 881 - for (var i = 0; i < value.length; i += 1) { 882 - var element = value[i]; 883 - if (i in value) { 884 - copy[i] = clone(element, cloned, true_default ? `${path}[${i}]` : path, paths, null, no_tojson); 885 - } 886 - } 887 - return copy; 888 - } 889 - if (get_prototype_of(value) === object_prototype) { 890 - copy = {}; 891 - cloned.set(value, copy); 892 - if (original !== null) { 893 - cloned.set(original, copy); 894 - } 895 - for (var key of Object.keys(value)) { 896 - copy[key] = clone( 897 - // @ts-expect-error 898 - value[key], 899 - cloned, 900 - true_default ? `${path}.${key}` : path, 901 - paths, 902 - null, 903 - no_tojson 904 - ); 905 - } 906 - return copy; 907 - } 908 - if (value instanceof Date) { 909 - return ( 910 - /** @type {Snapshot<T>} */ 911 - structuredClone(value) 912 - ); 913 - } 914 - if (typeof /** @type {T & { toJSON?: any } } */ 915 - value.toJSON === "function" && !no_tojson) { 916 - return clone( 917 - /** @type {T & { toJSON(): any } } */ 918 - value.toJSON(), 919 - cloned, 920 - true_default ? `${path}.toJSON()` : path, 921 - paths, 922 - // Associate the instance with the toJSON clone 923 - value 924 - ); 925 - } 926 - } 927 - if (value instanceof EventTarget) { 928 - return ( 929 - /** @type {Snapshot<T>} */ 930 - value 931 - ); 932 - } 933 - try { 934 - return ( 935 - /** @type {Snapshot<T>} */ 936 - structuredClone(value) 937 - ); 938 - } catch (e) { 939 - if (true_default) { 940 - paths.push(path); 941 - } 942 - return ( 943 - /** @type {Snapshot<T>} */ 944 - value 945 - ); 946 - } 947 - } 948 - 949 - // node_modules/svelte/src/internal/client/dev/tracing.js 950 - var tracing_expressions = null; 951 - function log_entry(signal, entry) { 952 - const value = signal.v; 953 - if (value === UNINITIALIZED) { 954 - return; 955 - } 956 - const type = get_type(signal); 957 - const current_reaction = ( 958 - /** @type {Reaction} */ 959 - active_reaction 960 - ); 961 - const dirty = signal.wv > current_reaction.wv || current_reaction.wv === 0; 962 - const style = dirty ? "color: CornflowerBlue; font-weight: bold" : "color: grey; font-weight: normal"; 963 - console.groupCollapsed( 964 - signal.label ? `%c${type}%c ${signal.label}` : `%c${type}%c`, 965 - style, 966 - dirty ? "font-weight: normal" : style, 967 - typeof value === "object" && value !== null && STATE_SYMBOL in value ? snapshot(value, true) : value 968 - ); 969 - if (type === "$derived") { 970 - const deps = new Set( 971 - /** @type {Derived} */ 972 - signal.deps 973 - ); 974 - for (const dep of deps) { 975 - log_entry(dep); 976 - } 977 - } 978 - if (signal.created) { 979 - console.log(signal.created); 980 - } 981 - if (dirty && signal.updated) { 982 - for (const updated of signal.updated.values()) { 983 - if (updated.error) { 984 - console.log(updated.error); 985 - } 986 - } 987 - } 988 - if (entry) { 989 - for (var trace2 of entry.traces) { 990 - console.log(trace2); 991 - } 992 - } 993 - console.groupEnd(); 994 - } 995 - function get_type(signal) { 996 - if ((signal.f & (DERIVED | ASYNC)) !== 0) return "$derived"; 997 - return signal.label?.startsWith("$") ? "store" : "$state"; 998 - } 999 - function trace(label2, fn) { 1000 - var previously_tracing_expressions = tracing_expressions; 1001 - try { 1002 - tracing_expressions = { entries: /* @__PURE__ */ new Map(), reaction: active_reaction }; 1003 - var start = performance.now(); 1004 - var value = fn(); 1005 - var time = (performance.now() - start).toFixed(2); 1006 - var prefix = untrack(label2); 1007 - if (!effect_tracking()) { 1008 - console.log(`${prefix} %cran outside of an effect (${time}ms)`, "color: grey"); 1009 - } else if (tracing_expressions.entries.size === 0) { 1010 - console.log(`${prefix} %cno reactive dependencies (${time}ms)`, "color: grey"); 1011 - } else { 1012 - console.group(`${prefix} %c(${time}ms)`, "color: grey"); 1013 - var entries = tracing_expressions.entries; 1014 - untrack(() => { 1015 - for (const [signal, traces] of entries) { 1016 - log_entry(signal, traces); 1017 - } 1018 - }); 1019 - tracing_expressions = null; 1020 - console.groupEnd(); 1021 - } 1022 - return value; 1023 - } finally { 1024 - tracing_expressions = previously_tracing_expressions; 1025 - } 1026 - } 1027 - function tag(source2, label2) { 1028 - source2.label = label2; 1029 - tag_proxy(source2.v, label2); 1030 - return source2; 1031 - } 1032 - function tag_proxy(value, label2) { 1033 - value?.[PROXY_PATH_SYMBOL]?.(label2); 1034 - return value; 1035 - } 1036 - function label(value) { 1037 - if (typeof value === "symbol") return `Symbol(${value.description})`; 1038 - if (typeof value === "function") return "<function>"; 1039 - if (typeof value === "object" && value) return "<object>"; 1040 - return String(value); 1041 - } 1042 - 1043 - // node_modules/svelte/src/internal/shared/dev.js 1044 - function get_error(label2) { 1045 - const error = new Error(); 1046 - const stack2 = get_stack(); 1047 - if (stack2.length === 0) { 1048 - return null; 1049 - } 1050 - stack2.unshift("\n"); 1051 - define_property(error, "stack", { 1052 - value: stack2.join("\n") 1053 - }); 1054 - define_property(error, "name", { 1055 - value: label2 1056 - }); 1057 - return ( 1058 - /** @type {Error & { stack: string }} */ 1059 - error 1060 - ); 1061 - } 1062 - function get_stack() { 1063 - const limit = Error.stackTraceLimit; 1064 - Error.stackTraceLimit = Infinity; 1065 - const stack2 = new Error().stack; 1066 - Error.stackTraceLimit = limit; 1067 - if (!stack2) return []; 1068 - const lines = stack2.split("\n"); 1069 - const new_lines = []; 1070 - for (let i = 0; i < lines.length; i++) { 1071 - const line = lines[i]; 1072 - const posixified = line.replaceAll("\\", "/"); 1073 - if (line.trim() === "Error") { 1074 - continue; 1075 - } 1076 - if (line.includes("validate_each_keys")) { 1077 - return []; 1078 - } 1079 - if (posixified.includes("svelte/src/internal") || posixified.includes("node_modules/.vite")) { 1080 - continue; 1081 - } 1082 - new_lines.push(line); 1083 - } 1084 - return new_lines; 1085 - } 1086 - function invariant(condition, message) { 1087 - if (!true_default) { 1088 - throw new Error("invariant(...) was not guarded by if (DEV)"); 1089 - } 1090 - if (!condition) invariant_violation(message); 1091 - } 1092 - 1093 - // node_modules/svelte/src/reactivity/create-subscriber.js 1094 - function createSubscriber(start) { 1095 - let subscribers = 0; 1096 - let version = source(0); 1097 - let stop; 1098 - if (true_default) { 1099 - tag(version, "createSubscriber version"); 1100 - } 1101 - return () => { 1102 - if (effect_tracking()) { 1103 - get(version); 1104 - render_effect(() => { 1105 - if (subscribers === 0) { 1106 - stop = untrack(() => start(() => increment(version))); 1107 - } 1108 - subscribers += 1; 1109 - return () => { 1110 - queue_micro_task(() => { 1111 - subscribers -= 1; 1112 - if (subscribers === 0) { 1113 - stop?.(); 1114 - stop = void 0; 1115 - increment(version); 1116 - } 1117 - }); 1118 - }; 1119 - }); 1120 - } 1121 - }; 1122 - } 1123 - 1124 - // node_modules/svelte/src/internal/client/reactivity/status.js 1125 - var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN); 1126 - function set_signal_status(signal, status) { 1127 - signal.f = signal.f & STATUS_MASK | status; 1128 - } 1129 - function update_derived_status(derived3) { 1130 - if ((derived3.f & CONNECTED) !== 0 || derived3.deps === null) { 1131 - set_signal_status(derived3, CLEAN); 1132 - } else { 1133 - set_signal_status(derived3, MAYBE_DIRTY); 1134 - } 1135 - } 1136 - 1137 - // node_modules/svelte/src/internal/client/reactivity/utils.js 1138 - function clear_marked(deps) { 1139 - if (deps === null) return; 1140 - for (const dep of deps) { 1141 - if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) { 1142 - continue; 1143 - } 1144 - dep.f ^= WAS_MARKED; 1145 - clear_marked( 1146 - /** @type {Derived} */ 1147 - dep.deps 1148 - ); 1149 - } 1150 - } 1151 - function defer_effect(effect2, dirty_effects, maybe_dirty_effects) { 1152 - if ((effect2.f & DIRTY) !== 0) { 1153 - dirty_effects.add(effect2); 1154 - } else if ((effect2.f & MAYBE_DIRTY) !== 0) { 1155 - maybe_dirty_effects.add(effect2); 1156 - } 1157 - clear_marked(effect2.deps); 1158 - set_signal_status(effect2, CLEAN); 1159 - } 1160 - 1161 - // node_modules/svelte/src/internal/client/dom/blocks/boundary.js 1162 - var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED; 1163 - function boundary(node, props, children, transform_error) { 1164 - new Boundary(node, props, children, transform_error); 1165 - } 1166 - var Boundary = class { 1167 - /** @type {Boundary | null} */ 1168 - parent; 1169 - is_pending = false; 1170 - /** 1171 - * API-level transformError transform function. Transforms errors before they reach the `failed` snippet. 1172 - * Inherited from parent boundary, or defaults to identity. 1173 - * @type {(error: unknown) => unknown} 1174 - */ 1175 - transform_error; 1176 - /** @type {TemplateNode} */ 1177 - #anchor; 1178 - /** @type {TemplateNode | null} */ 1179 - #hydrate_open = hydrating ? hydrate_node : null; 1180 - /** @type {BoundaryProps} */ 1181 - #props; 1182 - /** @type {((anchor: Node) => void)} */ 1183 - #children; 1184 - /** @type {Effect} */ 1185 - #effect; 1186 - /** @type {Effect | null} */ 1187 - #main_effect = null; 1188 - /** @type {Effect | null} */ 1189 - #pending_effect = null; 1190 - /** @type {Effect | null} */ 1191 - #failed_effect = null; 1192 - /** @type {DocumentFragment | null} */ 1193 - #offscreen_fragment = null; 1194 - #local_pending_count = 0; 1195 - #pending_count = 0; 1196 - #pending_count_update_queued = false; 1197 - /** @type {Set<Effect>} */ 1198 - #dirty_effects = /* @__PURE__ */ new Set(); 1199 - /** @type {Set<Effect>} */ 1200 - #maybe_dirty_effects = /* @__PURE__ */ new Set(); 1201 - /** 1202 - * A source containing the number of pending async deriveds/expressions. 1203 - * Only created if `$effect.pending()` is used inside the boundary, 1204 - * otherwise updating the source results in needless `Batch.ensure()` 1205 - * calls followed by no-op flushes 1206 - * @type {Source<number> | null} 1207 - */ 1208 - #effect_pending = null; 1209 - #effect_pending_subscriber = createSubscriber(() => { 1210 - this.#effect_pending = source(this.#local_pending_count); 1211 - if (true_default) { 1212 - tag(this.#effect_pending, "$effect.pending()"); 1213 - } 1214 - return () => { 1215 - this.#effect_pending = null; 1216 - }; 1217 - }); 1218 - /** 1219 - * @param {TemplateNode} node 1220 - * @param {BoundaryProps} props 1221 - * @param {((anchor: Node) => void)} children 1222 - * @param {((error: unknown) => unknown) | undefined} [transform_error] 1223 - */ 1224 - constructor(node, props, children, transform_error) { 1225 - this.#anchor = node; 1226 - this.#props = props; 1227 - this.#children = (anchor) => { 1228 - var effect2 = ( 1229 - /** @type {Effect} */ 1230 - active_effect 1231 - ); 1232 - effect2.b = this; 1233 - effect2.f |= BOUNDARY_EFFECT; 1234 - children(anchor); 1235 - }; 1236 - this.parent = /** @type {Effect} */ 1237 - active_effect.b; 1238 - this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e); 1239 - this.#effect = block(() => { 1240 - if (hydrating) { 1241 - const comment = ( 1242 - /** @type {Comment} */ 1243 - this.#hydrate_open 1244 - ); 1245 - hydrate_next(); 1246 - const server_rendered_pending = comment.data === HYDRATION_START_ELSE; 1247 - const server_rendered_failed = comment.data.startsWith(HYDRATION_START_FAILED); 1248 - if (server_rendered_failed) { 1249 - const serialized_error = JSON.parse(comment.data.slice(HYDRATION_START_FAILED.length)); 1250 - this.#hydrate_failed_content(serialized_error); 1251 - } else if (server_rendered_pending) { 1252 - this.#hydrate_pending_content(); 1253 - } else { 1254 - this.#hydrate_resolved_content(); 1255 - } 1256 - } else { 1257 - this.#render(); 1258 - } 1259 - }, flags); 1260 - if (hydrating) { 1261 - this.#anchor = hydrate_node; 1262 - } 1263 - } 1264 - #hydrate_resolved_content() { 1265 - try { 1266 - this.#main_effect = branch(() => this.#children(this.#anchor)); 1267 - } catch (error) { 1268 - this.error(error); 1269 - } 1270 - } 1271 - /** 1272 - * @param {unknown} error The deserialized error from the server's hydration comment 1273 - */ 1274 - #hydrate_failed_content(error) { 1275 - const failed = this.#props.failed; 1276 - if (!failed) return; 1277 - this.#failed_effect = branch(() => { 1278 - failed( 1279 - this.#anchor, 1280 - () => error, 1281 - () => () => { 1282 - } 1283 - ); 1284 - }); 1285 - } 1286 - #hydrate_pending_content() { 1287 - const pending2 = this.#props.pending; 1288 - if (!pending2) return; 1289 - this.is_pending = true; 1290 - this.#pending_effect = branch(() => pending2(this.#anchor)); 1291 - queue_micro_task(() => { 1292 - var fragment = this.#offscreen_fragment = document.createDocumentFragment(); 1293 - var anchor = create_text(); 1294 - fragment.append(anchor); 1295 - this.#main_effect = this.#run(() => { 1296 - return branch(() => this.#children(anchor)); 1297 - }); 1298 - if (this.#pending_count === 0) { 1299 - this.#anchor.before(fragment); 1300 - this.#offscreen_fragment = null; 1301 - pause_effect( 1302 - /** @type {Effect} */ 1303 - this.#pending_effect, 1304 - () => { 1305 - this.#pending_effect = null; 1306 - } 1307 - ); 1308 - this.#resolve( 1309 - /** @type {Batch} */ 1310 - current_batch 1311 - ); 1312 - } 1313 - }); 1314 - } 1315 - #render() { 1316 - try { 1317 - this.is_pending = this.has_pending_snippet(); 1318 - this.#pending_count = 0; 1319 - this.#local_pending_count = 0; 1320 - this.#main_effect = branch(() => { 1321 - this.#children(this.#anchor); 1322 - }); 1323 - if (this.#pending_count > 0) { 1324 - var fragment = this.#offscreen_fragment = document.createDocumentFragment(); 1325 - move_effect(this.#main_effect, fragment); 1326 - const pending2 = ( 1327 - /** @type {(anchor: Node) => void} */ 1328 - this.#props.pending 1329 - ); 1330 - this.#pending_effect = branch(() => pending2(this.#anchor)); 1331 - } else { 1332 - this.#resolve( 1333 - /** @type {Batch} */ 1334 - current_batch 1335 - ); 1336 - } 1337 - } catch (error) { 1338 - this.error(error); 1339 - } 1340 - } 1341 - /** 1342 - * @param {Batch} batch 1343 - */ 1344 - #resolve(batch) { 1345 - this.is_pending = false; 1346 - batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects); 1347 - } 1348 - /** 1349 - * Defer an effect inside a pending boundary until the boundary resolves 1350 - * @param {Effect} effect 1351 - */ 1352 - defer_effect(effect2) { 1353 - defer_effect(effect2, this.#dirty_effects, this.#maybe_dirty_effects); 1354 - } 1355 - /** 1356 - * Returns `false` if the effect exists inside a boundary whose pending snippet is shown 1357 - * @returns {boolean} 1358 - */ 1359 - is_rendered() { 1360 - return !this.is_pending && (!this.parent || this.parent.is_rendered()); 1361 - } 1362 - has_pending_snippet() { 1363 - return !!this.#props.pending; 1364 - } 1365 - /** 1366 - * @template T 1367 - * @param {() => T} fn 1368 - */ 1369 - #run(fn) { 1370 - var previous_effect = active_effect; 1371 - var previous_reaction = active_reaction; 1372 - var previous_ctx = component_context; 1373 - set_active_effect(this.#effect); 1374 - set_active_reaction(this.#effect); 1375 - set_component_context(this.#effect.ctx); 1376 - try { 1377 - Batch.ensure(); 1378 - return fn(); 1379 - } catch (e) { 1380 - handle_error(e); 1381 - return null; 1382 - } finally { 1383 - set_active_effect(previous_effect); 1384 - set_active_reaction(previous_reaction); 1385 - set_component_context(previous_ctx); 1386 - } 1387 - } 1388 - /** 1389 - * Updates the pending count associated with the currently visible pending snippet, 1390 - * if any, such that we can replace the snippet with content once work is done 1391 - * @param {1 | -1} d 1392 - * @param {Batch} batch 1393 - */ 1394 - #update_pending_count(d, batch) { 1395 - if (!this.has_pending_snippet()) { 1396 - if (this.parent) { 1397 - this.parent.#update_pending_count(d, batch); 1398 - } 1399 - return; 1400 - } 1401 - this.#pending_count += d; 1402 - if (this.#pending_count === 0) { 1403 - this.#resolve(batch); 1404 - if (this.#pending_effect) { 1405 - pause_effect(this.#pending_effect, () => { 1406 - this.#pending_effect = null; 1407 - }); 1408 - } 1409 - if (this.#offscreen_fragment) { 1410 - this.#anchor.before(this.#offscreen_fragment); 1411 - this.#offscreen_fragment = null; 1412 - } 1413 - } 1414 - } 1415 - /** 1416 - * Update the source that powers `$effect.pending()` inside this boundary, 1417 - * and controls when the current `pending` snippet (if any) is removed. 1418 - * Do not call from inside the class 1419 - * @param {1 | -1} d 1420 - * @param {Batch} batch 1421 - */ 1422 - update_pending_count(d, batch) { 1423 - this.#update_pending_count(d, batch); 1424 - this.#local_pending_count += d; 1425 - if (!this.#effect_pending || this.#pending_count_update_queued) return; 1426 - this.#pending_count_update_queued = true; 1427 - queue_micro_task(() => { 1428 - this.#pending_count_update_queued = false; 1429 - if (this.#effect_pending) { 1430 - internal_set(this.#effect_pending, this.#local_pending_count); 1431 - } 1432 - }); 1433 - } 1434 - get_effect_pending() { 1435 - this.#effect_pending_subscriber(); 1436 - return get( 1437 - /** @type {Source<number>} */ 1438 - this.#effect_pending 1439 - ); 1440 - } 1441 - /** @param {unknown} error */ 1442 - error(error) { 1443 - var onerror = this.#props.onerror; 1444 - let failed = this.#props.failed; 1445 - if (!onerror && !failed) { 1446 - throw error; 1447 - } 1448 - if (this.#main_effect) { 1449 - destroy_effect(this.#main_effect); 1450 - this.#main_effect = null; 1451 - } 1452 - if (this.#pending_effect) { 1453 - destroy_effect(this.#pending_effect); 1454 - this.#pending_effect = null; 1455 - } 1456 - if (this.#failed_effect) { 1457 - destroy_effect(this.#failed_effect); 1458 - this.#failed_effect = null; 1459 - } 1460 - if (hydrating) { 1461 - set_hydrate_node( 1462 - /** @type {TemplateNode} */ 1463 - this.#hydrate_open 1464 - ); 1465 - next(); 1466 - set_hydrate_node(skip_nodes()); 1467 - } 1468 - var did_reset = false; 1469 - var calling_on_error = false; 1470 - const reset2 = () => { 1471 - if (did_reset) { 1472 - svelte_boundary_reset_noop(); 1473 - return; 1474 - } 1475 - did_reset = true; 1476 - if (calling_on_error) { 1477 - svelte_boundary_reset_onerror(); 1478 - } 1479 - if (this.#failed_effect !== null) { 1480 - pause_effect(this.#failed_effect, () => { 1481 - this.#failed_effect = null; 1482 - }); 1483 - } 1484 - this.#run(() => { 1485 - this.#render(); 1486 - }); 1487 - }; 1488 - const handle_error_result = (transformed_error) => { 1489 - try { 1490 - calling_on_error = true; 1491 - onerror?.(transformed_error, reset2); 1492 - calling_on_error = false; 1493 - } catch (error2) { 1494 - invoke_error_boundary(error2, this.#effect && this.#effect.parent); 1495 - } 1496 - if (failed) { 1497 - this.#failed_effect = this.#run(() => { 1498 - try { 1499 - return branch(() => { 1500 - var effect2 = ( 1501 - /** @type {Effect} */ 1502 - active_effect 1503 - ); 1504 - effect2.b = this; 1505 - effect2.f |= BOUNDARY_EFFECT; 1506 - failed( 1507 - this.#anchor, 1508 - () => transformed_error, 1509 - () => reset2 1510 - ); 1511 - }); 1512 - } catch (error2) { 1513 - invoke_error_boundary( 1514 - error2, 1515 - /** @type {Effect} */ 1516 - this.#effect.parent 1517 - ); 1518 - return null; 1519 - } 1520 - }); 1521 - } 1522 - }; 1523 - queue_micro_task(() => { 1524 - var result; 1525 - try { 1526 - result = this.transform_error(error); 1527 - } catch (e) { 1528 - invoke_error_boundary(e, this.#effect && this.#effect.parent); 1529 - return; 1530 - } 1531 - if (result !== null && typeof result === "object" && typeof /** @type {any} */ 1532 - result.then === "function") { 1533 - result.then( 1534 - handle_error_result, 1535 - /** @param {unknown} e */ 1536 - (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent) 1537 - ); 1538 - } else { 1539 - handle_error_result(result); 1540 - } 1541 - }); 1542 - } 1543 - }; 1544 - function pending() { 1545 - if (active_effect === null) { 1546 - effect_pending_outside_reaction(); 1547 - } 1548 - var boundary2 = active_effect.b; 1549 - if (boundary2 === null) { 1550 - return 0; 1551 - } 1552 - return boundary2.get_effect_pending(); 1553 - } 1554 - 1555 - // node_modules/svelte/src/internal/client/reactivity/async.js 1556 - function flatten(blockers, sync, async, fn) { 1557 - const d = is_runes() ? derived : derived_safe_equal; 1558 - var pending2 = blockers.filter((b) => !b.settled); 1559 - if (async.length === 0 && pending2.length === 0) { 1560 - fn(sync.map(d)); 1561 - return; 1562 - } 1563 - var parent = ( 1564 - /** @type {Effect} */ 1565 - active_effect 1566 - ); 1567 - var restore = capture(); 1568 - var blocker_promise = pending2.length === 1 ? pending2[0].promise : pending2.length > 1 ? Promise.all(pending2.map((b) => b.promise)) : null; 1569 - function finish(values) { 1570 - restore(); 1571 - try { 1572 - fn(values); 1573 - } catch (error) { 1574 - if ((parent.f & DESTROYED) === 0) { 1575 - invoke_error_boundary(error, parent); 1576 - } 1577 - } 1578 - unset_context(); 1579 - } 1580 - if (async.length === 0) { 1581 - blocker_promise.then(() => finish(sync.map(d))); 1582 - return; 1583 - } 1584 - var decrement_pending = increment_pending(); 1585 - function run3() { 1586 - Promise.all(async.map((expression) => async_derived(expression))).then((result) => finish([...sync.map(d), ...result])).catch((error) => invoke_error_boundary(error, parent)).finally(() => decrement_pending()); 1587 - } 1588 - if (blocker_promise) { 1589 - blocker_promise.then(() => { 1590 - restore(); 1591 - run3(); 1592 - unset_context(); 1593 - }); 1594 - } else { 1595 - run3(); 1596 - } 1597 - } 1598 - function run_after_blockers(blockers, fn) { 1599 - flatten(blockers, [], [], fn); 1600 - } 1601 - function capture() { 1602 - var previous_effect = ( 1603 - /** @type {Effect} */ 1604 - active_effect 1605 - ); 1606 - var previous_reaction = active_reaction; 1607 - var previous_component_context = component_context; 1608 - var previous_batch2 = ( 1609 - /** @type {Batch} */ 1610 - current_batch 1611 - ); 1612 - if (true_default) { 1613 - var previous_dev_stack = dev_stack; 1614 - } 1615 - return function restore(activate_batch = true) { 1616 - set_active_effect(previous_effect); 1617 - set_active_reaction(previous_reaction); 1618 - set_component_context(previous_component_context); 1619 - if (activate_batch && (previous_effect.f & DESTROYED) === 0) { 1620 - previous_batch2?.activate(); 1621 - previous_batch2?.apply(); 1622 - } 1623 - if (true_default) { 1624 - set_reactivity_loss_tracker(null); 1625 - set_dev_stack(previous_dev_stack); 1626 - } 1627 - }; 1628 - } 1629 - async function save(promise) { 1630 - var restore = capture(); 1631 - var value = await promise; 1632 - return () => { 1633 - restore(); 1634 - return value; 1635 - }; 1636 - } 1637 - async function track_reactivity_loss(promise) { 1638 - var previous_async_effect = reactivity_loss_tracker; 1639 - var value = await promise; 1640 - return () => { 1641 - set_reactivity_loss_tracker(previous_async_effect); 1642 - return value; 1643 - }; 1644 - } 1645 - async function* for_await_track_reactivity_loss(iterable) { 1646 - const iterator = iterable[Symbol.asyncIterator]?.() ?? iterable[Symbol.iterator]?.(); 1647 - if (iterator === void 0) { 1648 - throw new TypeError("value is not async iterable"); 1649 - } 1650 - let normal_completion = false; 1651 - try { 1652 - while (true) { 1653 - const { done, value } = (await track_reactivity_loss(iterator.next()))(); 1654 - if (done) { 1655 - normal_completion = true; 1656 - break; 1657 - } 1658 - yield value; 1659 - } 1660 - } finally { 1661 - if (!normal_completion && iterator.return !== void 0) { 1662 - return ( 1663 - /** @type {TReturn} */ 1664 - (await track_reactivity_loss(iterator.return()))().value 1665 - ); 1666 - } 1667 - } 1668 - } 1669 - function unset_context(deactivate_batch = true) { 1670 - set_active_effect(null); 1671 - set_active_reaction(null); 1672 - set_component_context(null); 1673 - if (deactivate_batch) current_batch?.deactivate(); 1674 - if (true_default) { 1675 - set_reactivity_loss_tracker(null); 1676 - set_dev_stack(null); 1677 - } 1678 - } 1679 - function run2(thunks) { 1680 - const restore = capture(); 1681 - const decrement_pending = increment_pending(); 1682 - var active = ( 1683 - /** @type {Effect} */ 1684 - active_effect 1685 - ); 1686 - var errored = null; 1687 - const handle_error2 = (error) => { 1688 - errored = { error }; 1689 - if (!aborted(active)) { 1690 - invoke_error_boundary(error, active); 1691 - } 1692 - }; 1693 - var promise = Promise.resolve(thunks[0]()).catch(handle_error2); 1694 - var blocker = { promise, settled: false }; 1695 - var blockers = [blocker]; 1696 - promise.finally(() => { 1697 - blocker.settled = true; 1698 - unset_context(); 1699 - }); 1700 - for (const fn of thunks.slice(1)) { 1701 - promise = promise.then(() => { 1702 - if (errored) { 1703 - throw errored.error; 1704 - } 1705 - if (aborted(active)) { 1706 - throw STALE_REACTION; 1707 - } 1708 - restore(); 1709 - return fn(); 1710 - }).catch(handle_error2); 1711 - const blocker2 = { promise, settled: false }; 1712 - blockers.push(blocker2); 1713 - promise.finally(() => { 1714 - blocker2.settled = true; 1715 - unset_context(); 1716 - }); 1717 - } 1718 - promise.then(() => Promise.resolve()).finally(() => decrement_pending()); 1719 - return blockers; 1720 - } 1721 - function wait(blockers) { 1722 - return Promise.all(blockers.map((b) => b.promise)); 1723 - } 1724 - function increment_pending() { 1725 - var effect2 = ( 1726 - /** @type {Effect} */ 1727 - active_effect 1728 - ); 1729 - var boundary2 = ( 1730 - /** @type {Boundary} */ 1731 - effect2.b 1732 - ); 1733 - var batch = ( 1734 - /** @type {Batch} */ 1735 - current_batch 1736 - ); 1737 - var blocking = boundary2.is_rendered(); 1738 - boundary2.update_pending_count(1, batch); 1739 - batch.increment(blocking, effect2); 1740 - return (skip = false) => { 1741 - boundary2.update_pending_count(-1, batch); 1742 - batch.decrement(blocking, effect2, skip); 1743 - }; 1744 - } 1745 - 1746 - // node_modules/svelte/src/internal/client/reactivity/deriveds.js 1747 - var reactivity_loss_tracker = null; 1748 - function set_reactivity_loss_tracker(v) { 1749 - reactivity_loss_tracker = v; 1750 - } 1751 - var recent_async_deriveds = /* @__PURE__ */ new Set(); 1752 - function derived(fn) { 1753 - var flags2 = DERIVED | DIRTY; 1754 - var parent_derived = active_reaction !== null && (active_reaction.f & DERIVED) !== 0 ? ( 1755 - /** @type {Derived} */ 1756 - active_reaction 1757 - ) : null; 1758 - if (active_effect !== null) { 1759 - active_effect.f |= EFFECT_PRESERVED; 1760 - } 1761 - const signal = { 1762 - ctx: component_context, 1763 - deps: null, 1764 - effects: null, 1765 - equals, 1766 - f: flags2, 1767 - fn, 1768 - reactions: null, 1769 - rv: 0, 1770 - v: ( 1771 - /** @type {V} */ 1772 - UNINITIALIZED 1773 - ), 1774 - wv: 0, 1775 - parent: parent_derived ?? active_effect, 1776 - ac: null 1777 - }; 1778 - if (true_default && tracing_mode_flag) { 1779 - signal.created = get_error("created at"); 1780 - } 1781 - return signal; 1782 - } 1783 - function async_derived(fn, label2, location) { 1784 - let parent = ( 1785 - /** @type {Effect | null} */ 1786 - active_effect 1787 - ); 1788 - if (parent === null) { 1789 - async_derived_orphan(); 1790 - } 1791 - var promise = ( 1792 - /** @type {Promise<V>} */ 1793 - /** @type {unknown} */ 1794 - void 0 1795 - ); 1796 - var signal = source( 1797 - /** @type {V} */ 1798 - UNINITIALIZED 1799 - ); 1800 - if (true_default) signal.label = label2; 1801 - var should_suspend = !active_reaction; 1802 - var deferreds = /* @__PURE__ */ new Map(); 1803 - async_effect(() => { 1804 - if (true_default) { 1805 - reactivity_loss_tracker = { 1806 - effect: ( 1807 - /** @type {Effect} */ 1808 - active_effect 1809 - ), 1810 - warned: false 1811 - }; 1812 - } 1813 - var effect2 = ( 1814 - /** @type {Effect} */ 1815 - active_effect 1816 - ); 1817 - var d = deferred(); 1818 - promise = d.promise; 1819 - try { 1820 - Promise.resolve(fn()).then(d.resolve, d.reject).finally(unset_context); 1821 - } catch (error) { 1822 - d.reject(error); 1823 - unset_context(); 1824 - } 1825 - if (true_default) { 1826 - reactivity_loss_tracker = null; 1827 - } 1828 - var batch = ( 1829 - /** @type {Batch} */ 1830 - current_batch 1831 - ); 1832 - if (should_suspend) { 1833 - if ((effect2.f & REACTION_RAN) !== 0) { 1834 - var decrement_pending = increment_pending(); 1835 - } 1836 - if ( 1837 - /** @type {Boundary} */ 1838 - parent.b.is_rendered() 1839 - ) { 1840 - deferreds.get(batch)?.reject(STALE_REACTION); 1841 - deferreds.delete(batch); 1842 - } else { 1843 - for (const d2 of deferreds.values()) { 1844 - d2.reject(STALE_REACTION); 1845 - } 1846 - deferreds.clear(); 1847 - } 1848 - deferreds.set(batch, d); 1849 - } 1850 - const handler = (value, error = void 0) => { 1851 - if (true_default) { 1852 - reactivity_loss_tracker = null; 1853 - } 1854 - if (decrement_pending) { 1855 - var skip = error === STALE_REACTION; 1856 - decrement_pending(skip); 1857 - } 1858 - if (error === STALE_REACTION || (effect2.f & DESTROYED) !== 0) { 1859 - return; 1860 - } 1861 - batch.activate(); 1862 - if (error) { 1863 - signal.f |= ERROR_VALUE; 1864 - internal_set(signal, error); 1865 - } else { 1866 - if ((signal.f & ERROR_VALUE) !== 0) { 1867 - signal.f ^= ERROR_VALUE; 1868 - } 1869 - internal_set(signal, value); 1870 - for (const [b, d2] of deferreds) { 1871 - deferreds.delete(b); 1872 - if (b === batch) break; 1873 - d2.reject(STALE_REACTION); 1874 - } 1875 - if (true_default && location !== void 0) { 1876 - recent_async_deriveds.add(signal); 1877 - setTimeout(() => { 1878 - if (recent_async_deriveds.has(signal)) { 1879 - await_waterfall( 1880 - /** @type {string} */ 1881 - signal.label, 1882 - location 1883 - ); 1884 - recent_async_deriveds.delete(signal); 1885 - } 1886 - }); 1887 - } 1888 - } 1889 - batch.deactivate(); 1890 - }; 1891 - d.promise.then(handler, (e) => handler(null, e || "unknown")); 1892 - }); 1893 - teardown(() => { 1894 - for (const d of deferreds.values()) { 1895 - d.reject(STALE_REACTION); 1896 - } 1897 - }); 1898 - if (true_default) { 1899 - signal.f |= ASYNC; 1900 - } 1901 - return new Promise((fulfil) => { 1902 - function next2(p) { 1903 - function go() { 1904 - if (p === promise) { 1905 - fulfil(signal); 1906 - } else { 1907 - next2(promise); 1908 - } 1909 - } 1910 - p.then(go, go); 1911 - } 1912 - next2(promise); 1913 - }); 1914 - } 1915 - function user_derived(fn) { 1916 - const d = derived(fn); 1917 - if (!async_mode_flag) push_reaction_value(d); 1918 - return d; 1919 - } 1920 - function derived_safe_equal(fn) { 1921 - const signal = derived(fn); 1922 - signal.equals = safe_equals; 1923 - return signal; 1924 - } 1925 - function destroy_derived_effects(derived3) { 1926 - var effects = derived3.effects; 1927 - if (effects !== null) { 1928 - derived3.effects = null; 1929 - for (var i = 0; i < effects.length; i += 1) { 1930 - destroy_effect( 1931 - /** @type {Effect} */ 1932 - effects[i] 1933 - ); 1934 - } 1935 - } 1936 - } 1937 - var stack = []; 1938 - function get_derived_parent_effect(derived3) { 1939 - var parent = derived3.parent; 1940 - while (parent !== null) { 1941 - if ((parent.f & DERIVED) === 0) { 1942 - return (parent.f & DESTROYED) === 0 ? ( 1943 - /** @type {Effect} */ 1944 - parent 1945 - ) : null; 1946 - } 1947 - parent = parent.parent; 1948 - } 1949 - return null; 1950 - } 1951 - function execute_derived(derived3) { 1952 - var value; 1953 - var prev_active_effect = active_effect; 1954 - set_active_effect(get_derived_parent_effect(derived3)); 1955 - if (true_default) { 1956 - let prev_eager_effects = eager_effects; 1957 - set_eager_effects(/* @__PURE__ */ new Set()); 1958 - try { 1959 - if (includes.call(stack, derived3)) { 1960 - derived_references_self(); 1961 - } 1962 - stack.push(derived3); 1963 - derived3.f &= ~WAS_MARKED; 1964 - destroy_derived_effects(derived3); 1965 - value = update_reaction(derived3); 1966 - } finally { 1967 - set_active_effect(prev_active_effect); 1968 - set_eager_effects(prev_eager_effects); 1969 - stack.pop(); 1970 - } 1971 - } else { 1972 - try { 1973 - derived3.f &= ~WAS_MARKED; 1974 - destroy_derived_effects(derived3); 1975 - value = update_reaction(derived3); 1976 - } finally { 1977 - set_active_effect(prev_active_effect); 1978 - } 1979 - } 1980 - return value; 1981 - } 1982 - function update_derived(derived3) { 1983 - var old_value = derived3.v; 1984 - var value = execute_derived(derived3); 1985 - if (!derived3.equals(value)) { 1986 - derived3.wv = increment_write_version(); 1987 - if (!current_batch?.is_fork || derived3.deps === null) { 1988 - derived3.v = value; 1989 - current_batch?.capture(derived3, old_value, true); 1990 - if (derived3.deps === null) { 1991 - set_signal_status(derived3, CLEAN); 1992 - return; 1993 - } 1994 - } 1995 - } 1996 - if (is_destroying_effect) { 1997 - return; 1998 - } 1999 - if (batch_values !== null) { 2000 - if (effect_tracking() || current_batch?.is_fork) { 2001 - batch_values.set(derived3, value); 2002 - } 2003 - } else { 2004 - update_derived_status(derived3); 2005 - } 2006 - } 2007 - function freeze_derived_effects(derived3) { 2008 - if (derived3.effects === null) return; 2009 - for (const e of derived3.effects) { 2010 - if (e.teardown || e.ac) { 2011 - e.teardown?.(); 2012 - e.ac?.abort(STALE_REACTION); 2013 - e.teardown = noop; 2014 - e.ac = null; 2015 - remove_reactions(e, 0); 2016 - destroy_effect_children(e); 2017 - } 2018 - } 2019 - } 2020 - function unfreeze_derived_effects(derived3) { 2021 - if (derived3.effects === null) return; 2022 - for (const e of derived3.effects) { 2023 - if (e.teardown) { 2024 - update_effect(e); 2025 - } 2026 - } 2027 - } 2028 - 2029 - // node_modules/svelte/src/internal/client/reactivity/sources.js 2030 - var eager_effects = /* @__PURE__ */ new Set(); 2031 - var old_values = /* @__PURE__ */ new Map(); 2032 - function set_eager_effects(v) { 2033 - eager_effects = v; 2034 - } 2035 - var eager_effects_deferred = false; 2036 - function set_eager_effects_deferred() { 2037 - eager_effects_deferred = true; 2038 - } 2039 - function source(v, stack2) { 2040 - var signal = { 2041 - f: 0, 2042 - // TODO ideally we could skip this altogether, but it causes type errors 2043 - v, 2044 - reactions: null, 2045 - equals, 2046 - rv: 0, 2047 - wv: 0 2048 - }; 2049 - if (true_default && tracing_mode_flag) { 2050 - signal.created = stack2 ?? get_error("created at"); 2051 - signal.updated = null; 2052 - signal.set_during_effect = false; 2053 - signal.trace = null; 2054 - } 2055 - return signal; 2056 - } 2057 - function state(v, stack2) { 2058 - const s = source(v, stack2); 2059 - push_reaction_value(s); 2060 - return s; 2061 - } 2062 - function mutable_source(initial_value, immutable = false, trackable = true) { 2063 - const s = source(initial_value); 2064 - if (!immutable) { 2065 - s.equals = safe_equals; 2066 - } 2067 - if (legacy_mode_flag && trackable && component_context !== null && component_context.l !== null) { 2068 - (component_context.l.s ??= []).push(s); 2069 - } 2070 - return s; 2071 - } 2072 - function mutate(source2, value) { 2073 - set( 2074 - source2, 2075 - untrack(() => get(source2)) 2076 - ); 2077 - return value; 2078 - } 2079 - function set(source2, value, should_proxy = false) { 2080 - if (active_reaction !== null && // since we are untracking the function inside `$inspect.with` we need to add this check 2081 - // to ensure we error if state is set inside an inspect effect 2082 - (!untracking || (active_reaction.f & EAGER_EFFECT) !== 0) && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 && (current_sources === null || !includes.call(current_sources, source2))) { 2083 - state_unsafe_mutation(); 2084 - } 2085 - let new_value = should_proxy ? proxy(value) : value; 2086 - if (true_default) { 2087 - tag_proxy( 2088 - new_value, 2089 - /** @type {string} */ 2090 - source2.label 2091 - ); 2092 - } 2093 - return internal_set(source2, new_value, legacy_updates); 2094 - } 2095 - function internal_set(source2, value, updated_during_traversal = null) { 2096 - if (!source2.equals(value)) { 2097 - var old_value = source2.v; 2098 - if (is_destroying_effect) { 2099 - old_values.set(source2, value); 2100 - } else { 2101 - old_values.set(source2, old_value); 2102 - } 2103 - source2.v = value; 2104 - var batch = Batch.ensure(); 2105 - batch.capture(source2, old_value); 2106 - if (true_default) { 2107 - if (tracing_mode_flag || active_effect !== null) { 2108 - source2.updated ??= /* @__PURE__ */ new Map(); 2109 - const count = (source2.updated.get("")?.count ?? 0) + 1; 2110 - source2.updated.set("", { error: ( 2111 - /** @type {any} */ 2112 - null 2113 - ), count }); 2114 - if (tracing_mode_flag || count > 5) { 2115 - const error = get_error("updated at"); 2116 - if (error !== null) { 2117 - let entry = source2.updated.get(error.stack); 2118 - if (!entry) { 2119 - entry = { error, count: 0 }; 2120 - source2.updated.set(error.stack, entry); 2121 - } 2122 - entry.count++; 2123 - } 2124 - } 2125 - } 2126 - if (active_effect !== null) { 2127 - source2.set_during_effect = true; 2128 - } 2129 - } 2130 - if ((source2.f & DERIVED) !== 0) { 2131 - const derived3 = ( 2132 - /** @type {Derived} */ 2133 - source2 2134 - ); 2135 - if ((source2.f & DIRTY) !== 0) { 2136 - execute_derived(derived3); 2137 - } 2138 - if (batch_values === null) { 2139 - update_derived_status(derived3); 2140 - } 2141 - } 2142 - source2.wv = increment_write_version(); 2143 - mark_reactions(source2, DIRTY, updated_during_traversal); 2144 - if (is_runes() && active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) { 2145 - if (untracked_writes === null) { 2146 - set_untracked_writes([source2]); 2147 - } else { 2148 - untracked_writes.push(source2); 2149 - } 2150 - } 2151 - if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) { 2152 - flush_eager_effects(); 2153 - } 2154 - } 2155 - return value; 2156 - } 2157 - function flush_eager_effects() { 2158 - eager_effects_deferred = false; 2159 - for (const effect2 of eager_effects) { 2160 - if ((effect2.f & CLEAN) !== 0) { 2161 - set_signal_status(effect2, MAYBE_DIRTY); 2162 - } 2163 - if (is_dirty(effect2)) { 2164 - update_effect(effect2); 2165 - } 2166 - } 2167 - eager_effects.clear(); 2168 - } 2169 - function update(source2, d = 1) { 2170 - var value = get(source2); 2171 - var result = d === 1 ? value++ : value--; 2172 - set(source2, value); 2173 - return result; 2174 - } 2175 - function update_pre(source2, d = 1) { 2176 - var value = get(source2); 2177 - return set(source2, d === 1 ? ++value : --value); 2178 - } 2179 - function increment(source2) { 2180 - set(source2, source2.v + 1); 2181 - } 2182 - function mark_reactions(signal, status, updated_during_traversal) { 2183 - var reactions = signal.reactions; 2184 - if (reactions === null) return; 2185 - var runes = is_runes(); 2186 - var length = reactions.length; 2187 - for (var i = 0; i < length; i++) { 2188 - var reaction = reactions[i]; 2189 - var flags2 = reaction.f; 2190 - if (!runes && reaction === active_effect) continue; 2191 - if (true_default && (flags2 & EAGER_EFFECT) !== 0) { 2192 - eager_effects.add(reaction); 2193 - continue; 2194 - } 2195 - var not_dirty = (flags2 & DIRTY) === 0; 2196 - if (not_dirty) { 2197 - set_signal_status(reaction, status); 2198 - } 2199 - if ((flags2 & DERIVED) !== 0) { 2200 - var derived3 = ( 2201 - /** @type {Derived} */ 2202 - reaction 2203 - ); 2204 - batch_values?.delete(derived3); 2205 - if ((flags2 & WAS_MARKED) === 0) { 2206 - if (flags2 & CONNECTED) { 2207 - reaction.f |= WAS_MARKED; 2208 - } 2209 - mark_reactions(derived3, MAYBE_DIRTY, updated_during_traversal); 2210 - } 2211 - } else if (not_dirty) { 2212 - var effect2 = ( 2213 - /** @type {Effect} */ 2214 - reaction 2215 - ); 2216 - if ((flags2 & BLOCK_EFFECT) !== 0 && eager_block_effects !== null) { 2217 - eager_block_effects.add(effect2); 2218 - } 2219 - if (updated_during_traversal !== null) { 2220 - updated_during_traversal.push(effect2); 2221 - } else { 2222 - schedule_effect(effect2); 2223 - } 2224 - } 2225 - } 2226 - } 2227 - 2228 - // node_modules/svelte/src/store/utils.js 2229 - function subscribe_to_store(store, run3, invalidate) { 2230 - if (store == null) { 2231 - run3(void 0); 2232 - if (invalidate) invalidate(void 0); 2233 - return noop; 2234 - } 2235 - const unsub = untrack( 2236 - () => store.subscribe( 2237 - run3, 2238 - // @ts-expect-error 2239 - invalidate 2240 - ) 2241 - ); 2242 - return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; 2243 - } 2244 - 2245 - // node_modules/svelte/src/store/shared/index.js 2246 - var subscriber_queue = []; 2247 - function readable(value, start) { 2248 - return { 2249 - subscribe: writable(value, start).subscribe 2250 - }; 2251 - } 2252 - function writable(value, start = noop) { 2253 - let stop = null; 2254 - const subscribers = /* @__PURE__ */ new Set(); 2255 - function set2(new_value) { 2256 - if (safe_not_equal(value, new_value)) { 2257 - value = new_value; 2258 - if (stop) { 2259 - const run_queue = !subscriber_queue.length; 2260 - for (const subscriber of subscribers) { 2261 - subscriber[1](); 2262 - subscriber_queue.push(subscriber, value); 2263 - } 2264 - if (run_queue) { 2265 - for (let i = 0; i < subscriber_queue.length; i += 2) { 2266 - subscriber_queue[i][0](subscriber_queue[i + 1]); 2267 - } 2268 - subscriber_queue.length = 0; 2269 - } 2270 - } 2271 - } 2272 - } 2273 - function update2(fn) { 2274 - set2(fn( 2275 - /** @type {T} */ 2276 - value 2277 - )); 2278 - } 2279 - function subscribe(run3, invalidate = noop) { 2280 - const subscriber = [run3, invalidate]; 2281 - subscribers.add(subscriber); 2282 - if (subscribers.size === 1) { 2283 - stop = start(set2, update2) || noop; 2284 - } 2285 - run3( 2286 - /** @type {T} */ 2287 - value 2288 - ); 2289 - return () => { 2290 - subscribers.delete(subscriber); 2291 - if (subscribers.size === 0 && stop) { 2292 - stop(); 2293 - stop = null; 2294 - } 2295 - }; 2296 - } 2297 - return { set: set2, update: update2, subscribe }; 2298 - } 2299 - function derived2(stores, fn, initial_value) { 2300 - const single = !Array.isArray(stores); 2301 - const stores_array = single ? [stores] : stores; 2302 - if (!stores_array.every(Boolean)) { 2303 - throw new Error("derived() expects stores as input, got a falsy value"); 2304 - } 2305 - const auto = fn.length < 2; 2306 - return readable(initial_value, (set2, update2) => { 2307 - let started = false; 2308 - const values = []; 2309 - let pending2 = 0; 2310 - let cleanup = noop; 2311 - const sync = () => { 2312 - if (pending2) { 2313 - return; 2314 - } 2315 - cleanup(); 2316 - const result = fn(single ? values[0] : values, set2, update2); 2317 - if (auto) { 2318 - set2(result); 2319 - } else { 2320 - cleanup = typeof result === "function" ? result : noop; 2321 - } 2322 - }; 2323 - const unsubscribers = stores_array.map( 2324 - (store, i) => subscribe_to_store( 2325 - store, 2326 - (value) => { 2327 - values[i] = value; 2328 - pending2 &= ~(1 << i); 2329 - if (started) { 2330 - sync(); 2331 - } 2332 - }, 2333 - () => { 2334 - pending2 |= 1 << i; 2335 - } 2336 - ) 2337 - ); 2338 - started = true; 2339 - sync(); 2340 - return function stop() { 2341 - run_all(unsubscribers); 2342 - cleanup(); 2343 - started = false; 2344 - }; 2345 - }); 2346 - } 2347 - function readonly(store) { 2348 - return { 2349 - // @ts-expect-error TODO i suspect the bind is unnecessary 2350 - subscribe: store.subscribe.bind(store) 2351 - }; 2352 - } 2353 - function get2(store) { 2354 - let value; 2355 - subscribe_to_store(store, (_) => value = _)(); 2356 - return value; 2357 - } 2358 - 2359 - // node_modules/svelte/src/internal/client/reactivity/store.js 2360 - var legacy_is_updating_store = false; 2361 - var is_store_binding = false; 2362 - var IS_UNMOUNTED = /* @__PURE__ */ Symbol(); 2363 - function store_get(store, store_name, stores) { 2364 - const entry = stores[store_name] ??= { 2365 - store: null, 2366 - source: mutable_source(void 0), 2367 - unsubscribe: noop 2368 - }; 2369 - if (true_default) { 2370 - entry.source.label = store_name; 2371 - } 2372 - if (entry.store !== store && !(IS_UNMOUNTED in stores)) { 2373 - entry.unsubscribe(); 2374 - entry.store = store ?? null; 2375 - if (store == null) { 2376 - entry.source.v = void 0; 2377 - entry.unsubscribe = noop; 2378 - } else { 2379 - var is_synchronous_callback = true; 2380 - entry.unsubscribe = subscribe_to_store(store, (v) => { 2381 - if (is_synchronous_callback) { 2382 - entry.source.v = v; 2383 - } else { 2384 - set(entry.source, v); 2385 - } 2386 - }); 2387 - is_synchronous_callback = false; 2388 - } 2389 - } 2390 - if (store && IS_UNMOUNTED in stores) { 2391 - return get2(store); 2392 - } 2393 - return get(entry.source); 2394 - } 2395 - function store_unsub(store, store_name, stores) { 2396 - let entry = stores[store_name]; 2397 - if (entry && entry.store !== store) { 2398 - entry.unsubscribe(); 2399 - entry.unsubscribe = noop; 2400 - } 2401 - return store; 2402 - } 2403 - function store_set(store, value) { 2404 - update_with_flag(store, value); 2405 - return value; 2406 - } 2407 - function invalidate_store(stores, store_name) { 2408 - var entry = stores[store_name]; 2409 - if (entry.store !== null) { 2410 - store_set(entry.store, entry.source.v); 2411 - } 2412 - } 2413 - function setup_stores() { 2414 - const stores = {}; 2415 - function cleanup() { 2416 - teardown(() => { 2417 - for (var store_name in stores) { 2418 - const ref = stores[store_name]; 2419 - ref.unsubscribe(); 2420 - } 2421 - define_property(stores, IS_UNMOUNTED, { 2422 - enumerable: false, 2423 - value: true 2424 - }); 2425 - }); 2426 - } 2427 - return [stores, cleanup]; 2428 - } 2429 - function update_with_flag(store, value) { 2430 - legacy_is_updating_store = true; 2431 - try { 2432 - store.set(value); 2433 - } finally { 2434 - legacy_is_updating_store = false; 2435 - } 2436 - } 2437 - function store_mutate(store, expression, new_value) { 2438 - update_with_flag(store, new_value); 2439 - return expression; 2440 - } 2441 - function update_store(store, store_value, d = 1) { 2442 - update_with_flag(store, store_value + d); 2443 - return store_value; 2444 - } 2445 - function update_pre_store(store, store_value, d = 1) { 2446 - const value = store_value + d; 2447 - update_with_flag(store, value); 2448 - return value; 2449 - } 2450 - function mark_store_binding() { 2451 - is_store_binding = true; 2452 - } 2453 - function capture_store_binding(fn) { 2454 - var previous_is_store_binding = is_store_binding; 2455 - try { 2456 - is_store_binding = false; 2457 - return [fn(), is_store_binding]; 2458 - } finally { 2459 - is_store_binding = previous_is_store_binding; 2460 - } 2461 - } 2462 - 2463 - // node_modules/svelte/src/internal/client/reactivity/batch.js 2464 - var batches = /* @__PURE__ */ new Set(); 2465 - var current_batch = null; 2466 - var previous_batch = null; 2467 - var batch_values = null; 2468 - var last_scheduled_effect = null; 2469 - var is_flushing_sync = false; 2470 - var is_processing = false; 2471 - var collected_effects = null; 2472 - var legacy_updates = null; 2473 - var flush_count = 0; 2474 - var source_stacks = true_default ? /* @__PURE__ */ new Set() : null; 2475 - var uid = 1; 2476 - var Batch = class _Batch { 2477 - id = uid++; 2478 - /** 2479 - * The current values of any signals that are updated in this batch. 2480 - * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment) 2481 - * They keys of this map are identical to `this.#previous` 2482 - * @type {Map<Value, [any, boolean]>} 2483 - */ 2484 - current = /* @__PURE__ */ new Map(); 2485 - /** 2486 - * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place. 2487 - * They keys of this map are identical to `this.#current` 2488 - * @type {Map<Value, any>} 2489 - */ 2490 - previous = /* @__PURE__ */ new Map(); 2491 - /** 2492 - * When the batch is committed (and the DOM is updated), we need to remove old branches 2493 - * and append new ones by calling the functions added inside (if/each/key/etc) blocks 2494 - * @type {Set<(batch: Batch) => void>} 2495 - */ 2496 - #commit_callbacks = /* @__PURE__ */ new Set(); 2497 - /** 2498 - * If a fork is discarded, we need to destroy any effects that are no longer needed 2499 - * @type {Set<(batch: Batch) => void>} 2500 - */ 2501 - #discard_callbacks = /* @__PURE__ */ new Set(); 2502 - /** 2503 - * Async effects that are currently in flight 2504 - * @type {Map<Effect, number>} 2505 - */ 2506 - #pending = /* @__PURE__ */ new Map(); 2507 - /** 2508 - * Async effects that are currently in flight, _not_ inside a pending boundary 2509 - * @type {Map<Effect, number>} 2510 - */ 2511 - #blocking_pending = /* @__PURE__ */ new Map(); 2512 - /** 2513 - * A deferred that resolves when the batch is committed, used with `settled()` 2514 - * TODO replace with Promise.withResolvers once supported widely enough 2515 - * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null} 2516 - */ 2517 - #deferred = null; 2518 - /** 2519 - * The root effects that need to be flushed 2520 - * @type {Effect[]} 2521 - */ 2522 - #roots = []; 2523 - /** 2524 - * Effects created while this batch was active. 2525 - * @type {Effect[]} 2526 - */ 2527 - #new_effects = []; 2528 - /** 2529 - * Deferred effects (which run after async work has completed) that are DIRTY 2530 - * @type {Set<Effect>} 2531 - */ 2532 - #dirty_effects = /* @__PURE__ */ new Set(); 2533 - /** 2534 - * Deferred effects that are MAYBE_DIRTY 2535 - * @type {Set<Effect>} 2536 - */ 2537 - #maybe_dirty_effects = /* @__PURE__ */ new Set(); 2538 - /** 2539 - * A map of branches that still exist, but will be destroyed when this batch 2540 - * is committed — we skip over these during `process`. 2541 - * The value contains child effects that were dirty/maybe_dirty before being reset, 2542 - * so they can be rescheduled if the branch survives. 2543 - * @type {Map<Effect, { d: Effect[], m: Effect[] }>} 2544 - */ 2545 - #skipped_branches = /* @__PURE__ */ new Map(); 2546 - is_fork = false; 2547 - #decrement_queued = false; 2548 - /** @type {Set<Batch>} */ 2549 - #blockers = /* @__PURE__ */ new Set(); 2550 - #is_deferred() { 2551 - return this.is_fork || this.#blocking_pending.size > 0; 2552 - } 2553 - #is_blocked() { 2554 - for (const batch of this.#blockers) { 2555 - for (const effect2 of batch.#blocking_pending.keys()) { 2556 - var skipped = false; 2557 - var e = effect2; 2558 - while (e.parent !== null) { 2559 - if (this.#skipped_branches.has(e)) { 2560 - skipped = true; 2561 - break; 2562 - } 2563 - e = e.parent; 2564 - } 2565 - if (!skipped) { 2566 - return true; 2567 - } 2568 - } 2569 - } 2570 - return false; 2571 - } 2572 - /** 2573 - * Add an effect to the #skipped_branches map and reset its children 2574 - * @param {Effect} effect 2575 - */ 2576 - skip_effect(effect2) { 2577 - if (!this.#skipped_branches.has(effect2)) { 2578 - this.#skipped_branches.set(effect2, { d: [], m: [] }); 2579 - } 2580 - } 2581 - /** 2582 - * Remove an effect from the #skipped_branches map and reschedule 2583 - * any tracked dirty/maybe_dirty child effects 2584 - * @param {Effect} effect 2585 - */ 2586 - unskip_effect(effect2) { 2587 - var tracked = this.#skipped_branches.get(effect2); 2588 - if (tracked) { 2589 - this.#skipped_branches.delete(effect2); 2590 - for (var e of tracked.d) { 2591 - set_signal_status(e, DIRTY); 2592 - this.schedule(e); 2593 - } 2594 - for (e of tracked.m) { 2595 - set_signal_status(e, MAYBE_DIRTY); 2596 - this.schedule(e); 2597 - } 2598 - } 2599 - } 2600 - #process() { 2601 - if (flush_count++ > 1e3) { 2602 - batches.delete(this); 2603 - infinite_loop_guard(); 2604 - } 2605 - if (!this.#is_deferred()) { 2606 - for (const e of this.#dirty_effects) { 2607 - this.#maybe_dirty_effects.delete(e); 2608 - set_signal_status(e, DIRTY); 2609 - this.schedule(e); 2610 - } 2611 - for (const e of this.#maybe_dirty_effects) { 2612 - set_signal_status(e, MAYBE_DIRTY); 2613 - this.schedule(e); 2614 - } 2615 - } 2616 - const roots = this.#roots; 2617 - this.#roots = []; 2618 - this.apply(); 2619 - var effects = collected_effects = []; 2620 - var render_effects = []; 2621 - var updates = legacy_updates = []; 2622 - for (const root of roots) { 2623 - try { 2624 - this.#traverse(root, effects, render_effects); 2625 - } catch (e) { 2626 - reset_all(root); 2627 - throw e; 2628 - } 2629 - } 2630 - current_batch = null; 2631 - if (updates.length > 0) { 2632 - var batch = _Batch.ensure(); 2633 - for (const e of updates) { 2634 - batch.schedule(e); 2635 - } 2636 - } 2637 - collected_effects = null; 2638 - legacy_updates = null; 2639 - if (this.#is_deferred() || this.#is_blocked()) { 2640 - this.#defer_effects(render_effects); 2641 - this.#defer_effects(effects); 2642 - for (const [e, t] of this.#skipped_branches) { 2643 - reset_branch(e, t); 2644 - } 2645 - } else { 2646 - if (this.#pending.size === 0) { 2647 - batches.delete(this); 2648 - } 2649 - this.#dirty_effects.clear(); 2650 - this.#maybe_dirty_effects.clear(); 2651 - for (const fn of this.#commit_callbacks) fn(this); 2652 - this.#commit_callbacks.clear(); 2653 - previous_batch = this; 2654 - flush_queued_effects(render_effects); 2655 - flush_queued_effects(effects); 2656 - previous_batch = null; 2657 - this.#deferred?.resolve(); 2658 - } 2659 - var next_batch = ( 2660 - /** @type {Batch | null} */ 2661 - /** @type {unknown} */ 2662 - current_batch 2663 - ); 2664 - if (this.#roots.length > 0) { 2665 - const batch2 = next_batch ??= this; 2666 - batch2.#roots.push(...this.#roots.filter((r) => !batch2.#roots.includes(r))); 2667 - } 2668 - if (next_batch !== null) { 2669 - batches.add(next_batch); 2670 - if (true_default) { 2671 - for (const source2 of this.current.keys()) { 2672 - source_stacks.add(source2); 2673 - } 2674 - } 2675 - next_batch.#process(); 2676 - } 2677 - if (!batches.has(this)) { 2678 - this.#commit(); 2679 - } 2680 - } 2681 - /** 2682 - * Traverse the effect tree, executing effects or stashing 2683 - * them for later execution as appropriate 2684 - * @param {Effect} root 2685 - * @param {Effect[]} effects 2686 - * @param {Effect[]} render_effects 2687 - */ 2688 - #traverse(root, effects, render_effects) { 2689 - root.f ^= CLEAN; 2690 - var effect2 = root.first; 2691 - while (effect2 !== null) { 2692 - var flags2 = effect2.f; 2693 - var is_branch = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0; 2694 - var is_skippable_branch = is_branch && (flags2 & CLEAN) !== 0; 2695 - var skip = is_skippable_branch || (flags2 & INERT) !== 0 || this.#skipped_branches.has(effect2); 2696 - if (!skip && effect2.fn !== null) { 2697 - if (is_branch) { 2698 - effect2.f ^= CLEAN; 2699 - } else if ((flags2 & EFFECT) !== 0) { 2700 - effects.push(effect2); 2701 - } else if (async_mode_flag && (flags2 & (RENDER_EFFECT | MANAGED_EFFECT)) !== 0) { 2702 - render_effects.push(effect2); 2703 - } else if (is_dirty(effect2)) { 2704 - if ((flags2 & BLOCK_EFFECT) !== 0) this.#maybe_dirty_effects.add(effect2); 2705 - update_effect(effect2); 2706 - } 2707 - var child2 = effect2.first; 2708 - if (child2 !== null) { 2709 - effect2 = child2; 2710 - continue; 2711 - } 2712 - } 2713 - while (effect2 !== null) { 2714 - var next2 = effect2.next; 2715 - if (next2 !== null) { 2716 - effect2 = next2; 2717 - break; 2718 - } 2719 - effect2 = effect2.parent; 2720 - } 2721 - } 2722 - } 2723 - /** 2724 - * @param {Effect[]} effects 2725 - */ 2726 - #defer_effects(effects) { 2727 - for (var i = 0; i < effects.length; i += 1) { 2728 - defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects); 2729 - } 2730 - } 2731 - /** 2732 - * Associate a change to a given source with the current 2733 - * batch, noting its previous and current values 2734 - * @param {Value} source 2735 - * @param {any} old_value 2736 - * @param {boolean} [is_derived] 2737 - */ 2738 - capture(source2, old_value, is_derived = false) { 2739 - if (old_value !== UNINITIALIZED && !this.previous.has(source2)) { 2740 - this.previous.set(source2, old_value); 2741 - } 2742 - if ((source2.f & ERROR_VALUE) === 0) { 2743 - this.current.set(source2, [source2.v, is_derived]); 2744 - batch_values?.set(source2, source2.v); 2745 - } 2746 - } 2747 - activate() { 2748 - current_batch = this; 2749 - } 2750 - deactivate() { 2751 - current_batch = null; 2752 - batch_values = null; 2753 - } 2754 - flush() { 2755 - var source_stacks2 = true_default ? /* @__PURE__ */ new Set() : null; 2756 - try { 2757 - is_processing = true; 2758 - current_batch = this; 2759 - this.#process(); 2760 - } finally { 2761 - flush_count = 0; 2762 - last_scheduled_effect = null; 2763 - collected_effects = null; 2764 - legacy_updates = null; 2765 - is_processing = false; 2766 - current_batch = null; 2767 - batch_values = null; 2768 - old_values.clear(); 2769 - if (true_default) { 2770 - for ( 2771 - const source2 of 2772 - /** @type {Set<Source>} */ 2773 - source_stacks2 2774 - ) { 2775 - source2.updated = null; 2776 - } 2777 - } 2778 - } 2779 - } 2780 - discard() { 2781 - for (const fn of this.#discard_callbacks) fn(this); 2782 - this.#discard_callbacks.clear(); 2783 - batches.delete(this); 2784 - } 2785 - /** 2786 - * @param {Effect} effect 2787 - */ 2788 - register_created_effect(effect2) { 2789 - this.#new_effects.push(effect2); 2790 - } 2791 - #commit() { 2792 - for (const batch of batches) { 2793 - var is_earlier = batch.id < this.id; 2794 - var sources = []; 2795 - for (const [source3, [value, is_derived]] of this.current) { 2796 - if (batch.current.has(source3)) { 2797 - var batch_value = ( 2798 - /** @type {[any, boolean]} */ 2799 - batch.current.get(source3)[0] 2800 - ); 2801 - if (is_earlier && value !== batch_value) { 2802 - batch.current.set(source3, [value, is_derived]); 2803 - } else { 2804 - continue; 2805 - } 2806 - } 2807 - sources.push(source3); 2808 - } 2809 - var others = [...batch.current.keys()].filter((s) => !this.current.has(s)); 2810 - if (others.length === 0) { 2811 - if (is_earlier) { 2812 - batch.discard(); 2813 - } 2814 - } else if (sources.length > 0) { 2815 - if (true_default) { 2816 - invariant(batch.#roots.length === 0, "Batch has scheduled roots"); 2817 - } 2818 - batch.activate(); 2819 - var marked = /* @__PURE__ */ new Set(); 2820 - var checked = /* @__PURE__ */ new Map(); 2821 - for (var source2 of sources) { 2822 - mark_effects(source2, others, marked, checked); 2823 - } 2824 - checked = /* @__PURE__ */ new Map(); 2825 - var current_unequal = [...batch.current.keys()].filter( 2826 - (c) => this.current.has(c) ? ( 2827 - /** @type {[any, boolean]} */ 2828 - this.current.get(c)[0] !== c 2829 - ) : true 2830 - ); 2831 - for (const effect2 of this.#new_effects) { 2832 - if ((effect2.f & (DESTROYED | INERT | EAGER_EFFECT)) === 0 && depends_on(effect2, current_unequal, checked)) { 2833 - if ((effect2.f & (ASYNC | BLOCK_EFFECT)) !== 0) { 2834 - set_signal_status(effect2, DIRTY); 2835 - batch.schedule(effect2); 2836 - } else { 2837 - batch.#dirty_effects.add(effect2); 2838 - } 2839 - } 2840 - } 2841 - if (batch.#roots.length > 0) { 2842 - batch.apply(); 2843 - for (var root of batch.#roots) { 2844 - batch.#traverse(root, [], []); 2845 - } 2846 - batch.#roots = []; 2847 - } 2848 - batch.deactivate(); 2849 - } 2850 - } 2851 - for (const batch of batches) { 2852 - if (batch.#blockers.has(this)) { 2853 - batch.#blockers.delete(this); 2854 - if (batch.#blockers.size === 0 && !batch.#is_deferred()) { 2855 - batch.activate(); 2856 - batch.#process(); 2857 - } 2858 - } 2859 - } 2860 - } 2861 - /** 2862 - * @param {boolean} blocking 2863 - * @param {Effect} effect 2864 - */ 2865 - increment(blocking, effect2) { 2866 - let pending_count = this.#pending.get(effect2) ?? 0; 2867 - this.#pending.set(effect2, pending_count + 1); 2868 - if (blocking) { 2869 - let blocking_pending_count = this.#blocking_pending.get(effect2) ?? 0; 2870 - this.#blocking_pending.set(effect2, blocking_pending_count + 1); 2871 - } 2872 - } 2873 - /** 2874 - * @param {boolean} blocking 2875 - * @param {Effect} effect 2876 - * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction) 2877 - */ 2878 - decrement(blocking, effect2, skip) { 2879 - let pending_count = this.#pending.get(effect2) ?? 0; 2880 - if (pending_count === 1) { 2881 - this.#pending.delete(effect2); 2882 - } else { 2883 - this.#pending.set(effect2, pending_count - 1); 2884 - } 2885 - if (blocking) { 2886 - let blocking_pending_count = this.#blocking_pending.get(effect2) ?? 0; 2887 - if (blocking_pending_count === 1) { 2888 - this.#blocking_pending.delete(effect2); 2889 - } else { 2890 - this.#blocking_pending.set(effect2, blocking_pending_count - 1); 2891 - } 2892 - } 2893 - if (this.#decrement_queued || skip) return; 2894 - this.#decrement_queued = true; 2895 - queue_micro_task(() => { 2896 - this.#decrement_queued = false; 2897 - this.flush(); 2898 - }); 2899 - } 2900 - /** 2901 - * @param {Set<Effect>} dirty_effects 2902 - * @param {Set<Effect>} maybe_dirty_effects 2903 - */ 2904 - transfer_effects(dirty_effects, maybe_dirty_effects) { 2905 - for (const e of dirty_effects) { 2906 - this.#dirty_effects.add(e); 2907 - } 2908 - for (const e of maybe_dirty_effects) { 2909 - this.#maybe_dirty_effects.add(e); 2910 - } 2911 - dirty_effects.clear(); 2912 - maybe_dirty_effects.clear(); 2913 - } 2914 - /** @param {(batch: Batch) => void} fn */ 2915 - oncommit(fn) { 2916 - this.#commit_callbacks.add(fn); 2917 - } 2918 - /** @param {(batch: Batch) => void} fn */ 2919 - ondiscard(fn) { 2920 - this.#discard_callbacks.add(fn); 2921 - } 2922 - settled() { 2923 - return (this.#deferred ??= deferred()).promise; 2924 - } 2925 - static ensure() { 2926 - if (current_batch === null) { 2927 - const batch = current_batch = new _Batch(); 2928 - if (!is_processing) { 2929 - batches.add(current_batch); 2930 - if (!is_flushing_sync) { 2931 - queue_micro_task(() => { 2932 - if (current_batch !== batch) { 2933 - return; 2934 - } 2935 - batch.flush(); 2936 - }); 2937 - } 2938 - } 2939 - } 2940 - return current_batch; 2941 - } 2942 - apply() { 2943 - if (!async_mode_flag || !this.is_fork && batches.size === 1) { 2944 - batch_values = null; 2945 - return; 2946 - } 2947 - batch_values = /* @__PURE__ */ new Map(); 2948 - for (const [source2, [value]] of this.current) { 2949 - batch_values.set(source2, value); 2950 - } 2951 - for (const batch of batches) { 2952 - if (batch === this || batch.is_fork) continue; 2953 - var intersects = false; 2954 - var differs = false; 2955 - if (batch.id < this.id) { 2956 - for (const [source2, [, is_derived]] of batch.current) { 2957 - if (is_derived) continue; 2958 - intersects ||= this.current.has(source2); 2959 - differs ||= !this.current.has(source2); 2960 - } 2961 - } 2962 - if (intersects && differs) { 2963 - this.#blockers.add(batch); 2964 - } else { 2965 - for (const [source2, previous] of batch.previous) { 2966 - if (!batch_values.has(source2)) { 2967 - batch_values.set(source2, previous); 2968 - } 2969 - } 2970 - } 2971 - } 2972 - } 2973 - /** 2974 - * 2975 - * @param {Effect} effect 2976 - */ 2977 - schedule(effect2) { 2978 - last_scheduled_effect = effect2; 2979 - if (effect2.b?.is_pending && (effect2.f & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0 && (effect2.f & REACTION_RAN) === 0) { 2980 - effect2.b.defer_effect(effect2); 2981 - return; 2982 - } 2983 - var e = effect2; 2984 - while (e.parent !== null) { 2985 - e = e.parent; 2986 - var flags2 = e.f; 2987 - if (collected_effects !== null && e === active_effect) { 2988 - if (async_mode_flag) return; 2989 - if ((active_reaction === null || (active_reaction.f & DERIVED) === 0) && !legacy_is_updating_store) { 2990 - return; 2991 - } 2992 - } 2993 - if ((flags2 & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) { 2994 - if ((flags2 & CLEAN) === 0) { 2995 - return; 2996 - } 2997 - e.f ^= CLEAN; 2998 - } 2999 - } 3000 - this.#roots.push(e); 3001 - } 3002 - }; 3003 - function flushSync(fn) { 3004 - var was_flushing_sync = is_flushing_sync; 3005 - is_flushing_sync = true; 3006 - try { 3007 - var result; 3008 - if (fn) { 3009 - if (current_batch !== null && !current_batch.is_fork) { 3010 - current_batch.flush(); 3011 - } 3012 - result = fn(); 3013 - } 3014 - while (true) { 3015 - flush_tasks(); 3016 - if (current_batch === null) { 3017 - return ( 3018 - /** @type {T} */ 3019 - result 3020 - ); 3021 - } 3022 - current_batch.flush(); 3023 - } 3024 - } finally { 3025 - is_flushing_sync = was_flushing_sync; 3026 - } 3027 - } 3028 - function infinite_loop_guard() { 3029 - if (true_default) { 3030 - var updates = /* @__PURE__ */ new Map(); 3031 - for ( 3032 - const source2 of 3033 - /** @type {Batch} */ 3034 - current_batch.current.keys() 3035 - ) { 3036 - for (const [stack2, update2] of source2.updated ?? []) { 3037 - var entry = updates.get(stack2); 3038 - if (!entry) { 3039 - entry = { error: update2.error, count: 0 }; 3040 - updates.set(stack2, entry); 3041 - } 3042 - entry.count += update2.count; 3043 - } 3044 - } 3045 - for (const update2 of updates.values()) { 3046 - if (update2.error) { 3047 - console.error(update2.error); 3048 - } 3049 - } 3050 - } 3051 - try { 3052 - effect_update_depth_exceeded(); 3053 - } catch (error) { 3054 - if (true_default) { 3055 - define_property(error, "stack", { value: "" }); 3056 - } 3057 - invoke_error_boundary(error, last_scheduled_effect); 3058 - } 3059 - } 3060 - var eager_block_effects = null; 3061 - function flush_queued_effects(effects) { 3062 - var length = effects.length; 3063 - if (length === 0) return; 3064 - var i = 0; 3065 - while (i < length) { 3066 - var effect2 = effects[i++]; 3067 - if ((effect2.f & (DESTROYED | INERT)) === 0 && is_dirty(effect2)) { 3068 - eager_block_effects = /* @__PURE__ */ new Set(); 3069 - update_effect(effect2); 3070 - if (effect2.deps === null && effect2.first === null && effect2.nodes === null && effect2.teardown === null && effect2.ac === null) { 3071 - unlink_effect(effect2); 3072 - } 3073 - if (eager_block_effects?.size > 0) { 3074 - old_values.clear(); 3075 - for (const e of eager_block_effects) { 3076 - if ((e.f & (DESTROYED | INERT)) !== 0) continue; 3077 - const ordered_effects = [e]; 3078 - let ancestor = e.parent; 3079 - while (ancestor !== null) { 3080 - if (eager_block_effects.has(ancestor)) { 3081 - eager_block_effects.delete(ancestor); 3082 - ordered_effects.push(ancestor); 3083 - } 3084 - ancestor = ancestor.parent; 3085 - } 3086 - for (let j = ordered_effects.length - 1; j >= 0; j--) { 3087 - const e2 = ordered_effects[j]; 3088 - if ((e2.f & (DESTROYED | INERT)) !== 0) continue; 3089 - update_effect(e2); 3090 - } 3091 - } 3092 - eager_block_effects.clear(); 3093 - } 3094 - } 3095 - } 3096 - eager_block_effects = null; 3097 - } 3098 - function mark_effects(value, sources, marked, checked) { 3099 - if (marked.has(value)) return; 3100 - marked.add(value); 3101 - if (value.reactions !== null) { 3102 - for (const reaction of value.reactions) { 3103 - const flags2 = reaction.f; 3104 - if ((flags2 & DERIVED) !== 0) { 3105 - mark_effects( 3106 - /** @type {Derived} */ 3107 - reaction, 3108 - sources, 3109 - marked, 3110 - checked 3111 - ); 3112 - } else if ((flags2 & (ASYNC | BLOCK_EFFECT)) !== 0 && (flags2 & DIRTY) === 0 && depends_on(reaction, sources, checked)) { 3113 - set_signal_status(reaction, DIRTY); 3114 - schedule_effect( 3115 - /** @type {Effect} */ 3116 - reaction 3117 - ); 3118 - } 3119 - } 3120 - } 3121 - } 3122 - function mark_eager_effects(value, effects) { 3123 - if (value.reactions === null) return; 3124 - for (const reaction of value.reactions) { 3125 - const flags2 = reaction.f; 3126 - if ((flags2 & DERIVED) !== 0) { 3127 - mark_eager_effects( 3128 - /** @type {Derived} */ 3129 - reaction, 3130 - effects 3131 - ); 3132 - } else if ((flags2 & EAGER_EFFECT) !== 0) { 3133 - set_signal_status(reaction, DIRTY); 3134 - effects.add( 3135 - /** @type {Effect} */ 3136 - reaction 3137 - ); 3138 - } 3139 - } 3140 - } 3141 - function depends_on(reaction, sources, checked) { 3142 - const depends = checked.get(reaction); 3143 - if (depends !== void 0) return depends; 3144 - if (reaction.deps !== null) { 3145 - for (const dep of reaction.deps) { 3146 - if (includes.call(sources, dep)) { 3147 - return true; 3148 - } 3149 - if ((dep.f & DERIVED) !== 0 && depends_on( 3150 - /** @type {Derived} */ 3151 - dep, 3152 - sources, 3153 - checked 3154 - )) { 3155 - checked.set( 3156 - /** @type {Derived} */ 3157 - dep, 3158 - true 3159 - ); 3160 - return true; 3161 - } 3162 - } 3163 - } 3164 - checked.set(reaction, false); 3165 - return false; 3166 - } 3167 - function schedule_effect(effect2) { 3168 - current_batch.schedule(effect2); 3169 - } 3170 - var eager_versions = []; 3171 - function eager_flush() { 3172 - try { 3173 - flushSync(() => { 3174 - for (const version of eager_versions) { 3175 - update(version); 3176 - } 3177 - }); 3178 - } finally { 3179 - eager_versions = []; 3180 - } 3181 - } 3182 - function eager(fn) { 3183 - var version = source(0); 3184 - var initial = true; 3185 - var value = ( 3186 - /** @type {T} */ 3187 - void 0 3188 - ); 3189 - get(version); 3190 - eager_effect(() => { 3191 - if (initial) { 3192 - var previous_batch_values = batch_values; 3193 - try { 3194 - batch_values = null; 3195 - value = fn(); 3196 - } finally { 3197 - batch_values = previous_batch_values; 3198 - } 3199 - return; 3200 - } 3201 - if (eager_versions.length === 0) { 3202 - queue_micro_task(eager_flush); 3203 - } 3204 - eager_versions.push(version); 3205 - }); 3206 - initial = false; 3207 - return value; 3208 - } 3209 - function reset_branch(effect2, tracked) { 3210 - if ((effect2.f & BRANCH_EFFECT) !== 0 && (effect2.f & CLEAN) !== 0) { 3211 - return; 3212 - } 3213 - if ((effect2.f & DIRTY) !== 0) { 3214 - tracked.d.push(effect2); 3215 - } else if ((effect2.f & MAYBE_DIRTY) !== 0) { 3216 - tracked.m.push(effect2); 3217 - } 3218 - set_signal_status(effect2, CLEAN); 3219 - var e = effect2.first; 3220 - while (e !== null) { 3221 - reset_branch(e, tracked); 3222 - e = e.next; 3223 - } 3224 - } 3225 - function reset_all(effect2) { 3226 - set_signal_status(effect2, CLEAN); 3227 - var e = effect2.first; 3228 - while (e !== null) { 3229 - reset_all(e); 3230 - e = e.next; 3231 - } 3232 - } 3233 - function fork(fn) { 3234 - if (!async_mode_flag) { 3235 - experimental_async_required("fork"); 3236 - } 3237 - if (current_batch !== null) { 3238 - fork_timing(); 3239 - } 3240 - var batch = Batch.ensure(); 3241 - batch.is_fork = true; 3242 - batch_values = /* @__PURE__ */ new Map(); 3243 - var committed = false; 3244 - var settled2 = batch.settled(); 3245 - flushSync(fn); 3246 - for (var [source2, value] of batch.previous) { 3247 - source2.v = value; 3248 - } 3249 - return { 3250 - commit: async () => { 3251 - if (committed) { 3252 - await settled2; 3253 - return; 3254 - } 3255 - if (!batches.has(batch)) { 3256 - fork_discarded(); 3257 - } 3258 - committed = true; 3259 - batch.is_fork = false; 3260 - for (var [source3, [value2]] of batch.current) { 3261 - source3.v = value2; 3262 - source3.wv = increment_write_version(); 3263 - } 3264 - flushSync(() => { 3265 - var eager_effects2 = /* @__PURE__ */ new Set(); 3266 - for (var source4 of batch.current.keys()) { 3267 - mark_eager_effects(source4, eager_effects2); 3268 - } 3269 - set_eager_effects(eager_effects2); 3270 - flush_eager_effects(); 3271 - }); 3272 - batch.flush(); 3273 - await settled2; 3274 - }, 3275 - discard: () => { 3276 - for (var source3 of batch.current.keys()) { 3277 - source3.wv = increment_write_version(); 3278 - } 3279 - if (!committed && batches.has(batch)) { 3280 - batch.discard(); 3281 - } 3282 - } 3283 - }; 3284 - } 3285 - 3286 - // node_modules/svelte/src/internal/client/dom/elements/misc.js 3287 - function autofocus(dom, value) { 3288 - if (value) { 3289 - const body = document.body; 3290 - dom.autofocus = true; 3291 - queue_micro_task(() => { 3292 - if (document.activeElement === body) { 3293 - dom.focus(); 3294 - } 3295 - }); 3296 - } 3297 - } 3298 - function remove_textarea_child(dom) { 3299 - if (hydrating && get_first_child(dom) !== null) { 3300 - clear_text_content(dom); 3301 - } 3302 - } 3303 - var listening_to_form_reset = false; 3304 - function add_form_reset_listener() { 3305 - if (!listening_to_form_reset) { 3306 - listening_to_form_reset = true; 3307 - document.addEventListener( 3308 - "reset", 3309 - (evt) => { 3310 - Promise.resolve().then(() => { 3311 - if (!evt.defaultPrevented) { 3312 - for ( 3313 - const e of 3314 - /**@type {HTMLFormElement} */ 3315 - evt.target.elements 3316 - ) { 3317 - e.__on_r?.(); 3318 - } 3319 - } 3320 - }); 3321 - }, 3322 - // In the capture phase to guarantee we get noticed of it (no possibility of stopPropagation) 3323 - { capture: true } 3324 - ); 3325 - } 3326 - } 3327 - 3328 - // node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js 3329 - function listen(target, events, handler, call_handler_immediately = true) { 3330 - if (call_handler_immediately) { 3331 - handler(); 3332 - } 3333 - for (var name of events) { 3334 - target.addEventListener(name, handler); 3335 - } 3336 - teardown(() => { 3337 - for (var name2 of events) { 3338 - target.removeEventListener(name2, handler); 3339 - } 3340 - }); 3341 - } 3342 - function without_reactive_context(fn) { 3343 - var previous_reaction = active_reaction; 3344 - var previous_effect = active_effect; 3345 - set_active_reaction(null); 3346 - set_active_effect(null); 3347 - try { 3348 - return fn(); 3349 - } finally { 3350 - set_active_reaction(previous_reaction); 3351 - set_active_effect(previous_effect); 3352 - } 3353 - } 3354 - function listen_to_event_and_reset_event(element, event, handler, on_reset = handler) { 3355 - element.addEventListener(event, () => without_reactive_context(handler)); 3356 - const prev = element.__on_r; 3357 - if (prev) { 3358 - element.__on_r = () => { 3359 - prev(); 3360 - on_reset(true); 3361 - }; 3362 - } else { 3363 - element.__on_r = () => on_reset(true); 3364 - } 3365 - add_form_reset_listener(); 3366 - } 3367 - 3368 - // node_modules/svelte/src/internal/client/reactivity/effects.js 3369 - function validate_effect(rune) { 3370 - if (active_effect === null) { 3371 - if (active_reaction === null) { 3372 - effect_orphan(rune); 3373 - } 3374 - effect_in_unowned_derived(); 3375 - } 3376 - if (is_destroying_effect) { 3377 - effect_in_teardown(rune); 3378 - } 3379 - } 3380 - function push_effect(effect2, parent_effect) { 3381 - var parent_last = parent_effect.last; 3382 - if (parent_last === null) { 3383 - parent_effect.last = parent_effect.first = effect2; 3384 - } else { 3385 - parent_last.next = effect2; 3386 - effect2.prev = parent_last; 3387 - parent_effect.last = effect2; 3388 - } 3389 - } 3390 - function create_effect(type, fn) { 3391 - var parent = active_effect; 3392 - if (true_default) { 3393 - while (parent !== null && (parent.f & EAGER_EFFECT) !== 0) { 3394 - parent = parent.parent; 3395 - } 3396 - } 3397 - if (parent !== null && (parent.f & INERT) !== 0) { 3398 - type |= INERT; 3399 - } 3400 - var effect2 = { 3401 - ctx: component_context, 3402 - deps: null, 3403 - nodes: null, 3404 - f: type | DIRTY | CONNECTED, 3405 - first: null, 3406 - fn, 3407 - last: null, 3408 - next: null, 3409 - parent, 3410 - b: parent && parent.b, 3411 - prev: null, 3412 - teardown: null, 3413 - wv: 0, 3414 - ac: null 3415 - }; 3416 - if (true_default) { 3417 - effect2.component_function = dev_current_component_function; 3418 - } 3419 - current_batch?.register_created_effect(effect2); 3420 - var e = effect2; 3421 - if ((type & EFFECT) !== 0) { 3422 - if (collected_effects !== null) { 3423 - collected_effects.push(effect2); 3424 - } else { 3425 - Batch.ensure().schedule(effect2); 3426 - } 3427 - } else if (fn !== null) { 3428 - try { 3429 - update_effect(effect2); 3430 - } catch (e2) { 3431 - destroy_effect(effect2); 3432 - throw e2; 3433 - } 3434 - if (e.deps === null && e.teardown === null && e.nodes === null && e.first === e.last && // either `null`, or a singular child 3435 - (e.f & EFFECT_PRESERVED) === 0) { 3436 - e = e.first; 3437 - if ((type & BLOCK_EFFECT) !== 0 && (type & EFFECT_TRANSPARENT) !== 0 && e !== null) { 3438 - e.f |= EFFECT_TRANSPARENT; 3439 - } 3440 - } 3441 - } 3442 - if (e !== null) { 3443 - e.parent = parent; 3444 - if (parent !== null) { 3445 - push_effect(e, parent); 3446 - } 3447 - if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0 && (type & ROOT_EFFECT) === 0) { 3448 - var derived3 = ( 3449 - /** @type {Derived} */ 3450 - active_reaction 3451 - ); 3452 - (derived3.effects ??= []).push(e); 3453 - } 3454 - } 3455 - return effect2; 3456 - } 3457 - function effect_tracking() { 3458 - return active_reaction !== null && !untracking; 3459 - } 3460 - function teardown(fn) { 3461 - const effect2 = create_effect(RENDER_EFFECT, null); 3462 - set_signal_status(effect2, CLEAN); 3463 - effect2.teardown = fn; 3464 - return effect2; 3465 - } 3466 - function user_effect(fn) { 3467 - validate_effect("$effect"); 3468 - if (true_default) { 3469 - define_property(fn, "name", { 3470 - value: "$effect" 3471 - }); 3472 - } 3473 - var flags2 = ( 3474 - /** @type {Effect} */ 3475 - active_effect.f 3476 - ); 3477 - var defer = !active_reaction && (flags2 & BRANCH_EFFECT) !== 0 && (flags2 & REACTION_RAN) === 0; 3478 - if (defer) { 3479 - var context = ( 3480 - /** @type {ComponentContext} */ 3481 - component_context 3482 - ); 3483 - (context.e ??= []).push(fn); 3484 - } else { 3485 - return create_user_effect(fn); 3486 - } 3487 - } 3488 - function create_user_effect(fn) { 3489 - return create_effect(EFFECT | USER_EFFECT, fn); 3490 - } 3491 - function user_pre_effect(fn) { 3492 - validate_effect("$effect.pre"); 3493 - if (true_default) { 3494 - define_property(fn, "name", { 3495 - value: "$effect.pre" 3496 - }); 3497 - } 3498 - return create_effect(RENDER_EFFECT | USER_EFFECT, fn); 3499 - } 3500 - function eager_effect(fn) { 3501 - return create_effect(EAGER_EFFECT, fn); 3502 - } 3503 - function effect_root(fn) { 3504 - Batch.ensure(); 3505 - const effect2 = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn); 3506 - return () => { 3507 - destroy_effect(effect2); 3508 - }; 3509 - } 3510 - function component_root(fn) { 3511 - Batch.ensure(); 3512 - const effect2 = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn); 3513 - return (options = {}) => { 3514 - return new Promise((fulfil) => { 3515 - if (options.outro) { 3516 - pause_effect(effect2, () => { 3517 - destroy_effect(effect2); 3518 - fulfil(void 0); 3519 - }); 3520 - } else { 3521 - destroy_effect(effect2); 3522 - fulfil(void 0); 3523 - } 3524 - }); 3525 - }; 3526 - } 3527 - function effect(fn) { 3528 - return create_effect(EFFECT, fn); 3529 - } 3530 - function legacy_pre_effect(deps, fn) { 3531 - var context = ( 3532 - /** @type {ComponentContextLegacy} */ 3533 - component_context 3534 - ); 3535 - var token = { effect: null, ran: false, deps }; 3536 - context.l.$.push(token); 3537 - token.effect = render_effect(() => { 3538 - deps(); 3539 - if (token.ran) return; 3540 - token.ran = true; 3541 - var effect2 = ( 3542 - /** @type {Effect} */ 3543 - active_effect 3544 - ); 3545 - try { 3546 - set_active_effect(effect2.parent); 3547 - untrack(fn); 3548 - } finally { 3549 - set_active_effect(effect2); 3550 - } 3551 - }); 3552 - } 3553 - function legacy_pre_effect_reset() { 3554 - var context = ( 3555 - /** @type {ComponentContextLegacy} */ 3556 - component_context 3557 - ); 3558 - render_effect(() => { 3559 - for (var token of context.l.$) { 3560 - token.deps(); 3561 - var effect2 = token.effect; 3562 - if ((effect2.f & CLEAN) !== 0 && effect2.deps !== null) { 3563 - set_signal_status(effect2, MAYBE_DIRTY); 3564 - } 3565 - if (is_dirty(effect2)) { 3566 - update_effect(effect2); 3567 - } 3568 - token.ran = false; 3569 - } 3570 - }); 3571 - } 3572 - function async_effect(fn) { 3573 - return create_effect(ASYNC | EFFECT_PRESERVED, fn); 3574 - } 3575 - function render_effect(fn, flags2 = 0) { 3576 - return create_effect(RENDER_EFFECT | flags2, fn); 3577 - } 3578 - function template_effect(fn, sync = [], async = [], blockers = []) { 3579 - flatten(blockers, sync, async, (values) => { 3580 - create_effect(RENDER_EFFECT, () => fn(...values.map(get))); 3581 - }); 3582 - } 3583 - function deferred_template_effect(fn, sync = [], async = [], blockers = []) { 3584 - if (async.length > 0 || blockers.length > 0) { 3585 - var decrement_pending = increment_pending(); 3586 - } 3587 - flatten(blockers, sync, async, (values) => { 3588 - create_effect(EFFECT, () => fn(...values.map(get))); 3589 - if (decrement_pending) { 3590 - decrement_pending(); 3591 - } 3592 - }); 3593 - } 3594 - function block(fn, flags2 = 0) { 3595 - var effect2 = create_effect(BLOCK_EFFECT | flags2, fn); 3596 - if (true_default) { 3597 - effect2.dev_stack = dev_stack; 3598 - } 3599 - return effect2; 3600 - } 3601 - function managed(fn, flags2 = 0) { 3602 - var effect2 = create_effect(MANAGED_EFFECT | flags2, fn); 3603 - if (true_default) { 3604 - effect2.dev_stack = dev_stack; 3605 - } 3606 - return effect2; 3607 - } 3608 - function branch(fn) { 3609 - return create_effect(BRANCH_EFFECT | EFFECT_PRESERVED, fn); 3610 - } 3611 - function execute_effect_teardown(effect2) { 3612 - var teardown2 = effect2.teardown; 3613 - if (teardown2 !== null) { 3614 - const previously_destroying_effect = is_destroying_effect; 3615 - const previous_reaction = active_reaction; 3616 - set_is_destroying_effect(true); 3617 - set_active_reaction(null); 3618 - try { 3619 - teardown2.call(null); 3620 - } finally { 3621 - set_is_destroying_effect(previously_destroying_effect); 3622 - set_active_reaction(previous_reaction); 3623 - } 3624 - } 3625 - } 3626 - function destroy_effect_children(signal, remove_dom = false) { 3627 - var effect2 = signal.first; 3628 - signal.first = signal.last = null; 3629 - while (effect2 !== null) { 3630 - const controller = effect2.ac; 3631 - if (controller !== null) { 3632 - without_reactive_context(() => { 3633 - controller.abort(STALE_REACTION); 3634 - }); 3635 - } 3636 - var next2 = effect2.next; 3637 - if ((effect2.f & ROOT_EFFECT) !== 0) { 3638 - effect2.parent = null; 3639 - } else { 3640 - destroy_effect(effect2, remove_dom); 3641 - } 3642 - effect2 = next2; 3643 - } 3644 - } 3645 - function destroy_block_effect_children(signal) { 3646 - var effect2 = signal.first; 3647 - while (effect2 !== null) { 3648 - var next2 = effect2.next; 3649 - if ((effect2.f & BRANCH_EFFECT) === 0) { 3650 - destroy_effect(effect2); 3651 - } 3652 - effect2 = next2; 3653 - } 3654 - } 3655 - function destroy_effect(effect2, remove_dom = true) { 3656 - var removed = false; 3657 - if ((remove_dom || (effect2.f & HEAD_EFFECT) !== 0) && effect2.nodes !== null && effect2.nodes.end !== null) { 3658 - remove_effect_dom( 3659 - effect2.nodes.start, 3660 - /** @type {TemplateNode} */ 3661 - effect2.nodes.end 3662 - ); 3663 - removed = true; 3664 - } 3665 - set_signal_status(effect2, DESTROYING); 3666 - destroy_effect_children(effect2, remove_dom && !removed); 3667 - remove_reactions(effect2, 0); 3668 - var transitions = effect2.nodes && effect2.nodes.t; 3669 - if (transitions !== null) { 3670 - for (const transition of transitions) { 3671 - transition.stop(); 3672 - } 3673 - } 3674 - execute_effect_teardown(effect2); 3675 - effect2.f ^= DESTROYING; 3676 - effect2.f |= DESTROYED; 3677 - var parent = effect2.parent; 3678 - if (parent !== null && parent.first !== null) { 3679 - unlink_effect(effect2); 3680 - } 3681 - if (true_default) { 3682 - effect2.component_function = null; 3683 - } 3684 - effect2.next = effect2.prev = effect2.teardown = effect2.ctx = effect2.deps = effect2.fn = effect2.nodes = effect2.ac = effect2.b = null; 3685 - } 3686 - function remove_effect_dom(node, end) { 3687 - while (node !== null) { 3688 - var next2 = node === end ? null : get_next_sibling(node); 3689 - node.remove(); 3690 - node = next2; 3691 - } 3692 - } 3693 - function unlink_effect(effect2) { 3694 - var parent = effect2.parent; 3695 - var prev = effect2.prev; 3696 - var next2 = effect2.next; 3697 - if (prev !== null) prev.next = next2; 3698 - if (next2 !== null) next2.prev = prev; 3699 - if (parent !== null) { 3700 - if (parent.first === effect2) parent.first = next2; 3701 - if (parent.last === effect2) parent.last = prev; 3702 - } 3703 - } 3704 - function pause_effect(effect2, callback, destroy = true) { 3705 - var transitions = []; 3706 - pause_children(effect2, transitions, true); 3707 - var fn = () => { 3708 - if (destroy) destroy_effect(effect2); 3709 - if (callback) callback(); 3710 - }; 3711 - var remaining = transitions.length; 3712 - if (remaining > 0) { 3713 - var check = () => --remaining || fn(); 3714 - for (var transition of transitions) { 3715 - transition.out(check); 3716 - } 3717 - } else { 3718 - fn(); 3719 - } 3720 - } 3721 - function pause_children(effect2, transitions, local) { 3722 - if ((effect2.f & INERT) !== 0) return; 3723 - effect2.f ^= INERT; 3724 - var t = effect2.nodes && effect2.nodes.t; 3725 - if (t !== null) { 3726 - for (const transition of t) { 3727 - if (transition.is_global || local) { 3728 - transitions.push(transition); 3729 - } 3730 - } 3731 - } 3732 - var child2 = effect2.first; 3733 - while (child2 !== null) { 3734 - var sibling2 = child2.next; 3735 - var transparent = (child2.f & EFFECT_TRANSPARENT) !== 0 || // If this is a branch effect without a block effect parent, 3736 - // it means the parent block effect was pruned. In that case, 3737 - // transparency information was transferred to the branch effect. 3738 - (child2.f & BRANCH_EFFECT) !== 0 && (effect2.f & BLOCK_EFFECT) !== 0; 3739 - pause_children(child2, transitions, transparent ? local : false); 3740 - child2 = sibling2; 3741 - } 3742 - } 3743 - function resume_effect(effect2) { 3744 - resume_children(effect2, true); 3745 - } 3746 - function resume_children(effect2, local) { 3747 - if ((effect2.f & INERT) === 0) return; 3748 - effect2.f ^= INERT; 3749 - if ((effect2.f & CLEAN) === 0) { 3750 - set_signal_status(effect2, DIRTY); 3751 - Batch.ensure().schedule(effect2); 3752 - } 3753 - var child2 = effect2.first; 3754 - while (child2 !== null) { 3755 - var sibling2 = child2.next; 3756 - var transparent = (child2.f & EFFECT_TRANSPARENT) !== 0 || (child2.f & BRANCH_EFFECT) !== 0; 3757 - resume_children(child2, transparent ? local : false); 3758 - child2 = sibling2; 3759 - } 3760 - var t = effect2.nodes && effect2.nodes.t; 3761 - if (t !== null) { 3762 - for (const transition of t) { 3763 - if (transition.is_global || local) { 3764 - transition.in(); 3765 - } 3766 - } 3767 - } 3768 - } 3769 - function aborted(effect2 = ( 3770 - /** @type {Effect} */ 3771 - active_effect 3772 - )) { 3773 - return (effect2.f & DESTROYED) !== 0; 3774 - } 3775 - function move_effect(effect2, fragment) { 3776 - if (!effect2.nodes) return; 3777 - var node = effect2.nodes.start; 3778 - var end = effect2.nodes.end; 3779 - while (node !== null) { 3780 - var next2 = node === end ? null : get_next_sibling(node); 3781 - fragment.append(node); 3782 - node = next2; 3783 - } 3784 - } 3785 - 3786 - // node_modules/svelte/src/internal/client/legacy.js 3787 - var captured_signals = null; 3788 - function capture_signals(fn) { 3789 - var previous_captured_signals = captured_signals; 3790 - try { 3791 - captured_signals = /* @__PURE__ */ new Set(); 3792 - untrack(fn); 3793 - if (previous_captured_signals !== null) { 3794 - for (var signal of captured_signals) { 3795 - previous_captured_signals.add(signal); 3796 - } 3797 - } 3798 - return captured_signals; 3799 - } finally { 3800 - captured_signals = previous_captured_signals; 3801 - } 3802 - } 3803 - function invalidate_inner_signals(fn) { 3804 - for (var signal of capture_signals(fn)) { 3805 - internal_set(signal, signal.v); 3806 - } 3807 - } 3808 - 3809 - // node_modules/svelte/src/internal/client/runtime.js 3810 - var is_updating_effect = false; 3811 - var is_destroying_effect = false; 3812 - function set_is_destroying_effect(value) { 3813 - is_destroying_effect = value; 3814 - } 3815 - var active_reaction = null; 3816 - var untracking = false; 3817 - function set_active_reaction(reaction) { 3818 - active_reaction = reaction; 3819 - } 3820 - var active_effect = null; 3821 - function set_active_effect(effect2) { 3822 - active_effect = effect2; 3823 - } 3824 - var current_sources = null; 3825 - function push_reaction_value(value) { 3826 - if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & DERIVED) !== 0)) { 3827 - if (current_sources === null) { 3828 - current_sources = [value]; 3829 - } else { 3830 - current_sources.push(value); 3831 - } 3832 - } 3833 - } 3834 - var new_deps = null; 3835 - var skipped_deps = 0; 3836 - var untracked_writes = null; 3837 - function set_untracked_writes(value) { 3838 - untracked_writes = value; 3839 - } 3840 - var write_version = 1; 3841 - var read_version = 0; 3842 - var update_version = read_version; 3843 - function set_update_version(value) { 3844 - update_version = value; 3845 - } 3846 - function increment_write_version() { 3847 - return ++write_version; 3848 - } 3849 - function is_dirty(reaction) { 3850 - var flags2 = reaction.f; 3851 - if ((flags2 & DIRTY) !== 0) { 3852 - return true; 3853 - } 3854 - if (flags2 & DERIVED) { 3855 - reaction.f &= ~WAS_MARKED; 3856 - } 3857 - if ((flags2 & MAYBE_DIRTY) !== 0) { 3858 - var dependencies = ( 3859 - /** @type {Value[]} */ 3860 - reaction.deps 3861 - ); 3862 - var length = dependencies.length; 3863 - for (var i = 0; i < length; i++) { 3864 - var dependency = dependencies[i]; 3865 - if (is_dirty( 3866 - /** @type {Derived} */ 3867 - dependency 3868 - )) { 3869 - update_derived( 3870 - /** @type {Derived} */ 3871 - dependency 3872 - ); 3873 - } 3874 - if (dependency.wv > reaction.wv) { 3875 - return true; 3876 - } 3877 - } 3878 - if ((flags2 & CONNECTED) !== 0 && // During time traveling we don't want to reset the status so that 3879 - // traversal of the graph in the other batches still happens 3880 - batch_values === null) { 3881 - set_signal_status(reaction, CLEAN); 3882 - } 3883 - } 3884 - return false; 3885 - } 3886 - function schedule_possible_effect_self_invalidation(signal, effect2, root = true) { 3887 - var reactions = signal.reactions; 3888 - if (reactions === null) return; 3889 - if (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) { 3890 - return; 3891 - } 3892 - for (var i = 0; i < reactions.length; i++) { 3893 - var reaction = reactions[i]; 3894 - if ((reaction.f & DERIVED) !== 0) { 3895 - schedule_possible_effect_self_invalidation( 3896 - /** @type {Derived} */ 3897 - reaction, 3898 - effect2, 3899 - false 3900 - ); 3901 - } else if (effect2 === reaction) { 3902 - if (root) { 3903 - set_signal_status(reaction, DIRTY); 3904 - } else if ((reaction.f & CLEAN) !== 0) { 3905 - set_signal_status(reaction, MAYBE_DIRTY); 3906 - } 3907 - schedule_effect( 3908 - /** @type {Effect} */ 3909 - reaction 3910 - ); 3911 - } 3912 - } 3913 - } 3914 - function update_reaction(reaction) { 3915 - var previous_deps = new_deps; 3916 - var previous_skipped_deps = skipped_deps; 3917 - var previous_untracked_writes = untracked_writes; 3918 - var previous_reaction = active_reaction; 3919 - var previous_sources = current_sources; 3920 - var previous_component_context = component_context; 3921 - var previous_untracking = untracking; 3922 - var previous_update_version = update_version; 3923 - var flags2 = reaction.f; 3924 - new_deps = /** @type {null | Value[]} */ 3925 - null; 3926 - skipped_deps = 0; 3927 - untracked_writes = null; 3928 - active_reaction = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null; 3929 - current_sources = null; 3930 - set_component_context(reaction.ctx); 3931 - untracking = false; 3932 - update_version = ++read_version; 3933 - if (reaction.ac !== null) { 3934 - without_reactive_context(() => { 3935 - reaction.ac.abort(STALE_REACTION); 3936 - }); 3937 - reaction.ac = null; 3938 - } 3939 - try { 3940 - reaction.f |= REACTION_IS_UPDATING; 3941 - var fn = ( 3942 - /** @type {Function} */ 3943 - reaction.fn 3944 - ); 3945 - var result = fn(); 3946 - reaction.f |= REACTION_RAN; 3947 - var deps = reaction.deps; 3948 - var is_fork = current_batch?.is_fork; 3949 - if (new_deps !== null) { 3950 - var i; 3951 - if (!is_fork) { 3952 - remove_reactions(reaction, skipped_deps); 3953 - } 3954 - if (deps !== null && skipped_deps > 0) { 3955 - deps.length = skipped_deps + new_deps.length; 3956 - for (i = 0; i < new_deps.length; i++) { 3957 - deps[skipped_deps + i] = new_deps[i]; 3958 - } 3959 - } else { 3960 - reaction.deps = deps = new_deps; 3961 - } 3962 - if (effect_tracking() && (reaction.f & CONNECTED) !== 0) { 3963 - for (i = skipped_deps; i < deps.length; i++) { 3964 - (deps[i].reactions ??= []).push(reaction); 3965 - } 3966 - } 3967 - } else if (!is_fork && deps !== null && skipped_deps < deps.length) { 3968 - remove_reactions(reaction, skipped_deps); 3969 - deps.length = skipped_deps; 3970 - } 3971 - if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0) { 3972 - for (i = 0; i < /** @type {Source[]} */ 3973 - untracked_writes.length; i++) { 3974 - schedule_possible_effect_self_invalidation( 3975 - untracked_writes[i], 3976 - /** @type {Effect} */ 3977 - reaction 3978 - ); 3979 - } 3980 - } 3981 - if (previous_reaction !== null && previous_reaction !== reaction) { 3982 - read_version++; 3983 - if (previous_reaction.deps !== null) { 3984 - for (let i2 = 0; i2 < previous_skipped_deps; i2 += 1) { 3985 - previous_reaction.deps[i2].rv = read_version; 3986 - } 3987 - } 3988 - if (previous_deps !== null) { 3989 - for (const dep of previous_deps) { 3990 - dep.rv = read_version; 3991 - } 3992 - } 3993 - if (untracked_writes !== null) { 3994 - if (previous_untracked_writes === null) { 3995 - previous_untracked_writes = untracked_writes; 3996 - } else { 3997 - previous_untracked_writes.push(.../** @type {Source[]} */ 3998 - untracked_writes); 3999 - } 4000 - } 4001 - } 4002 - if ((reaction.f & ERROR_VALUE) !== 0) { 4003 - reaction.f ^= ERROR_VALUE; 4004 - } 4005 - return result; 4006 - } catch (error) { 4007 - return handle_error(error); 4008 - } finally { 4009 - reaction.f ^= REACTION_IS_UPDATING; 4010 - new_deps = previous_deps; 4011 - skipped_deps = previous_skipped_deps; 4012 - untracked_writes = previous_untracked_writes; 4013 - active_reaction = previous_reaction; 4014 - current_sources = previous_sources; 4015 - set_component_context(previous_component_context); 4016 - untracking = previous_untracking; 4017 - update_version = previous_update_version; 4018 - } 4019 - } 4020 - function remove_reaction(signal, dependency) { 4021 - let reactions = dependency.reactions; 4022 - if (reactions !== null) { 4023 - var index = index_of.call(reactions, signal); 4024 - if (index !== -1) { 4025 - var new_length = reactions.length - 1; 4026 - if (new_length === 0) { 4027 - reactions = dependency.reactions = null; 4028 - } else { 4029 - reactions[index] = reactions[new_length]; 4030 - reactions.pop(); 4031 - } 4032 - } 4033 - } 4034 - if (reactions === null && (dependency.f & DERIVED) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear 4035 - // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps` 4036 - // allows us to skip the expensive work of disconnecting and immediately reconnecting it 4037 - (new_deps === null || !includes.call(new_deps, dependency))) { 4038 - var derived3 = ( 4039 - /** @type {Derived} */ 4040 - dependency 4041 - ); 4042 - if ((derived3.f & CONNECTED) !== 0) { 4043 - derived3.f ^= CONNECTED; 4044 - derived3.f &= ~WAS_MARKED; 4045 - } 4046 - update_derived_status(derived3); 4047 - freeze_derived_effects(derived3); 4048 - remove_reactions(derived3, 0); 4049 - } 4050 - } 4051 - function remove_reactions(signal, start_index) { 4052 - var dependencies = signal.deps; 4053 - if (dependencies === null) return; 4054 - for (var i = start_index; i < dependencies.length; i++) { 4055 - remove_reaction(signal, dependencies[i]); 4056 - } 4057 - } 4058 - function update_effect(effect2) { 4059 - var flags2 = effect2.f; 4060 - if ((flags2 & DESTROYED) !== 0) { 4061 - return; 4062 - } 4063 - set_signal_status(effect2, CLEAN); 4064 - var previous_effect = active_effect; 4065 - var was_updating_effect = is_updating_effect; 4066 - active_effect = effect2; 4067 - is_updating_effect = true; 4068 - if (true_default) { 4069 - var previous_component_fn = dev_current_component_function; 4070 - set_dev_current_component_function(effect2.component_function); 4071 - var previous_stack = ( 4072 - /** @type {any} */ 4073 - dev_stack 4074 - ); 4075 - set_dev_stack(effect2.dev_stack ?? dev_stack); 4076 - } 4077 - try { 4078 - if ((flags2 & (BLOCK_EFFECT | MANAGED_EFFECT)) !== 0) { 4079 - destroy_block_effect_children(effect2); 4080 - } else { 4081 - destroy_effect_children(effect2); 4082 - } 4083 - execute_effect_teardown(effect2); 4084 - var teardown2 = update_reaction(effect2); 4085 - effect2.teardown = typeof teardown2 === "function" ? teardown2 : null; 4086 - effect2.wv = write_version; 4087 - if (true_default && tracing_mode_flag && (effect2.f & DIRTY) !== 0 && effect2.deps !== null) { 4088 - for (var dep of effect2.deps) { 4089 - if (dep.set_during_effect) { 4090 - dep.wv = increment_write_version(); 4091 - dep.set_during_effect = false; 4092 - } 4093 - } 4094 - } 4095 - } finally { 4096 - is_updating_effect = was_updating_effect; 4097 - active_effect = previous_effect; 4098 - if (true_default) { 4099 - set_dev_current_component_function(previous_component_fn); 4100 - set_dev_stack(previous_stack); 4101 - } 4102 - } 4103 - } 4104 - async function tick() { 4105 - if (async_mode_flag) { 4106 - return new Promise((f) => { 4107 - requestAnimationFrame(() => f()); 4108 - setTimeout(() => f()); 4109 - }); 4110 - } 4111 - await Promise.resolve(); 4112 - flushSync(); 4113 - } 4114 - function settled() { 4115 - return Batch.ensure().settled(); 4116 - } 4117 - function get(signal) { 4118 - var flags2 = signal.f; 4119 - var is_derived = (flags2 & DERIVED) !== 0; 4120 - captured_signals?.add(signal); 4121 - if (active_reaction !== null && !untracking) { 4122 - var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0; 4123 - if (!destroyed && (current_sources === null || !includes.call(current_sources, signal))) { 4124 - var deps = active_reaction.deps; 4125 - if ((active_reaction.f & REACTION_IS_UPDATING) !== 0) { 4126 - if (signal.rv < read_version) { 4127 - signal.rv = read_version; 4128 - if (new_deps === null && deps !== null && deps[skipped_deps] === signal) { 4129 - skipped_deps++; 4130 - } else if (new_deps === null) { 4131 - new_deps = [signal]; 4132 - } else { 4133 - new_deps.push(signal); 4134 - } 4135 - } 4136 - } else { 4137 - (active_reaction.deps ??= []).push(signal); 4138 - var reactions = signal.reactions; 4139 - if (reactions === null) { 4140 - signal.reactions = [active_reaction]; 4141 - } else if (!includes.call(reactions, active_reaction)) { 4142 - reactions.push(active_reaction); 4143 - } 4144 - } 4145 - } 4146 - } 4147 - if (true_default) { 4148 - if (!untracking && reactivity_loss_tracker && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & REACTION_IS_UPDATING) === 0) { 4149 - reactivity_loss_tracker.warned = true; 4150 - await_reactivity_loss( 4151 - /** @type {string} */ 4152 - signal.label 4153 - ); 4154 - var trace2 = get_error("traced at"); 4155 - if (trace2) console.warn(trace2); 4156 - } 4157 - recent_async_deriveds.delete(signal); 4158 - if (tracing_mode_flag && !untracking && tracing_expressions !== null && active_reaction !== null && tracing_expressions.reaction === active_reaction) { 4159 - if (signal.trace) { 4160 - signal.trace(); 4161 - } else { 4162 - trace2 = get_error("traced at"); 4163 - if (trace2) { 4164 - var entry = tracing_expressions.entries.get(signal); 4165 - if (entry === void 0) { 4166 - entry = { traces: [] }; 4167 - tracing_expressions.entries.set(signal, entry); 4168 - } 4169 - var last = entry.traces[entry.traces.length - 1]; 4170 - if (trace2.stack !== last?.stack) { 4171 - entry.traces.push(trace2); 4172 - } 4173 - } 4174 - } 4175 - } 4176 - } 4177 - if (is_destroying_effect && old_values.has(signal)) { 4178 - return old_values.get(signal); 4179 - } 4180 - if (is_derived) { 4181 - var derived3 = ( 4182 - /** @type {Derived} */ 4183 - signal 4184 - ); 4185 - if (is_destroying_effect) { 4186 - var value = derived3.v; 4187 - if ((derived3.f & CLEAN) === 0 && derived3.reactions !== null || depends_on_old_values(derived3)) { 4188 - value = execute_derived(derived3); 4189 - } 4190 - old_values.set(derived3, value); 4191 - return value; 4192 - } 4193 - var should_connect = (derived3.f & CONNECTED) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & CONNECTED) !== 0); 4194 - var is_new = (derived3.f & REACTION_RAN) === 0; 4195 - if (is_dirty(derived3)) { 4196 - if (should_connect) { 4197 - derived3.f |= CONNECTED; 4198 - } 4199 - update_derived(derived3); 4200 - } 4201 - if (should_connect && !is_new) { 4202 - unfreeze_derived_effects(derived3); 4203 - reconnect(derived3); 4204 - } 4205 - } 4206 - if (batch_values?.has(signal)) { 4207 - return batch_values.get(signal); 4208 - } 4209 - if ((signal.f & ERROR_VALUE) !== 0) { 4210 - throw signal.v; 4211 - } 4212 - return signal.v; 4213 - } 4214 - function reconnect(derived3) { 4215 - derived3.f |= CONNECTED; 4216 - if (derived3.deps === null) return; 4217 - for (const dep of derived3.deps) { 4218 - (dep.reactions ??= []).push(derived3); 4219 - if ((dep.f & DERIVED) !== 0 && (dep.f & CONNECTED) === 0) { 4220 - unfreeze_derived_effects( 4221 - /** @type {Derived} */ 4222 - dep 4223 - ); 4224 - reconnect( 4225 - /** @type {Derived} */ 4226 - dep 4227 - ); 4228 - } 4229 - } 4230 - } 4231 - function depends_on_old_values(derived3) { 4232 - if (derived3.v === UNINITIALIZED) return true; 4233 - if (derived3.deps === null) return false; 4234 - for (const dep of derived3.deps) { 4235 - if (old_values.has(dep)) { 4236 - return true; 4237 - } 4238 - if ((dep.f & DERIVED) !== 0 && depends_on_old_values( 4239 - /** @type {Derived} */ 4240 - dep 4241 - )) { 4242 - return true; 4243 - } 4244 - } 4245 - return false; 4246 - } 4247 - function safe_get(signal) { 4248 - return signal && get(signal); 4249 - } 4250 - function untrack(fn) { 4251 - var previous_untracking = untracking; 4252 - try { 4253 - untracking = true; 4254 - return fn(); 4255 - } finally { 4256 - untracking = previous_untracking; 4257 - } 4258 - } 4259 - function deep_read_state(value) { 4260 - if (typeof value !== "object" || !value || value instanceof EventTarget) { 4261 - return; 4262 - } 4263 - if (STATE_SYMBOL in value) { 4264 - deep_read(value); 4265 - } else if (!Array.isArray(value)) { 4266 - for (let key in value) { 4267 - const prop = value[key]; 4268 - if (typeof prop === "object" && prop && STATE_SYMBOL in prop) { 4269 - deep_read(prop); 4270 - } 4271 - } 4272 - } 4273 - } 4274 - function deep_read(value, visited = /* @__PURE__ */ new Set()) { 4275 - if (typeof value === "object" && value !== null && // We don't want to traverse DOM elements 4276 - !(value instanceof EventTarget) && !visited.has(value)) { 4277 - visited.add(value); 4278 - if (value instanceof Date) { 4279 - value.getTime(); 4280 - } 4281 - for (let key in value) { 4282 - try { 4283 - deep_read(value[key], visited); 4284 - } catch (e) { 4285 - } 4286 - } 4287 - const proto = get_prototype_of(value); 4288 - if (proto !== Object.prototype && proto !== Array.prototype && proto !== Map.prototype && proto !== Set.prototype && proto !== Date.prototype) { 4289 - const descriptors = get_descriptors(proto); 4290 - for (let key in descriptors) { 4291 - const get3 = descriptors[key].get; 4292 - if (get3) { 4293 - try { 4294 - get3.call(value); 4295 - } catch (e) { 4296 - } 4297 - } 4298 - } 4299 - } 4300 - } 4301 - } 4302 - 4303 - // node_modules/svelte/src/internal/client/proxy.js 4304 - var regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/; 4305 - function proxy(value) { 4306 - if (typeof value !== "object" || value === null || STATE_SYMBOL in value) { 4307 - return value; 4308 - } 4309 - const prototype = get_prototype_of(value); 4310 - if (prototype !== object_prototype && prototype !== array_prototype) { 4311 - return value; 4312 - } 4313 - var sources = /* @__PURE__ */ new Map(); 4314 - var is_proxied_array = is_array(value); 4315 - var version = state(0); 4316 - var stack2 = true_default && tracing_mode_flag ? get_error("created at") : null; 4317 - var parent_version = update_version; 4318 - var with_parent = (fn) => { 4319 - if (update_version === parent_version) { 4320 - return fn(); 4321 - } 4322 - var reaction = active_reaction; 4323 - var version2 = update_version; 4324 - set_active_reaction(null); 4325 - set_update_version(parent_version); 4326 - var result = fn(); 4327 - set_active_reaction(reaction); 4328 - set_update_version(version2); 4329 - return result; 4330 - }; 4331 - if (is_proxied_array) { 4332 - sources.set("length", state( 4333 - /** @type {any[]} */ 4334 - value.length, 4335 - stack2 4336 - )); 4337 - if (true_default) { 4338 - value = /** @type {any} */ 4339 - inspectable_array( 4340 - /** @type {any[]} */ 4341 - value 4342 - ); 4343 - } 4344 - } 4345 - var path = ""; 4346 - let updating = false; 4347 - function update_path(new_path) { 4348 - if (updating) return; 4349 - updating = true; 4350 - path = new_path; 4351 - tag(version, `${path} version`); 4352 - for (const [prop, source2] of sources) { 4353 - tag(source2, get_label(path, prop)); 4354 - } 4355 - updating = false; 4356 - } 4357 - return new Proxy( 4358 - /** @type {any} */ 4359 - value, 4360 - { 4361 - defineProperty(_, prop, descriptor) { 4362 - if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) { 4363 - state_descriptors_fixed(); 4364 - } 4365 - var s = sources.get(prop); 4366 - if (s === void 0) { 4367 - with_parent(() => { 4368 - var s2 = state(descriptor.value, stack2); 4369 - sources.set(prop, s2); 4370 - if (true_default && typeof prop === "string") { 4371 - tag(s2, get_label(path, prop)); 4372 - } 4373 - return s2; 4374 - }); 4375 - } else { 4376 - set(s, descriptor.value, true); 4377 - } 4378 - return true; 4379 - }, 4380 - deleteProperty(target, prop) { 4381 - var s = sources.get(prop); 4382 - if (s === void 0) { 4383 - if (prop in target) { 4384 - const s2 = with_parent(() => state(UNINITIALIZED, stack2)); 4385 - sources.set(prop, s2); 4386 - increment(version); 4387 - if (true_default) { 4388 - tag(s2, get_label(path, prop)); 4389 - } 4390 - } 4391 - } else { 4392 - set(s, UNINITIALIZED); 4393 - increment(version); 4394 - } 4395 - return true; 4396 - }, 4397 - get(target, prop, receiver) { 4398 - if (prop === STATE_SYMBOL) { 4399 - return value; 4400 - } 4401 - if (true_default && prop === PROXY_PATH_SYMBOL) { 4402 - return update_path; 4403 - } 4404 - var s = sources.get(prop); 4405 - var exists = prop in target; 4406 - if (s === void 0 && (!exists || get_descriptor(target, prop)?.writable)) { 4407 - s = with_parent(() => { 4408 - var p = proxy(exists ? target[prop] : UNINITIALIZED); 4409 - var s2 = state(p, stack2); 4410 - if (true_default) { 4411 - tag(s2, get_label(path, prop)); 4412 - } 4413 - return s2; 4414 - }); 4415 - sources.set(prop, s); 4416 - } 4417 - if (s !== void 0) { 4418 - var v = get(s); 4419 - return v === UNINITIALIZED ? void 0 : v; 4420 - } 4421 - return Reflect.get(target, prop, receiver); 4422 - }, 4423 - getOwnPropertyDescriptor(target, prop) { 4424 - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop); 4425 - if (descriptor && "value" in descriptor) { 4426 - var s = sources.get(prop); 4427 - if (s) descriptor.value = get(s); 4428 - } else if (descriptor === void 0) { 4429 - var source2 = sources.get(prop); 4430 - var value2 = source2?.v; 4431 - if (source2 !== void 0 && value2 !== UNINITIALIZED) { 4432 - return { 4433 - enumerable: true, 4434 - configurable: true, 4435 - value: value2, 4436 - writable: true 4437 - }; 4438 - } 4439 - } 4440 - return descriptor; 4441 - }, 4442 - has(target, prop) { 4443 - if (prop === STATE_SYMBOL) { 4444 - return true; 4445 - } 4446 - var s = sources.get(prop); 4447 - var has = s !== void 0 && s.v !== UNINITIALIZED || Reflect.has(target, prop); 4448 - if (s !== void 0 || active_effect !== null && (!has || get_descriptor(target, prop)?.writable)) { 4449 - if (s === void 0) { 4450 - s = with_parent(() => { 4451 - var p = has ? proxy(target[prop]) : UNINITIALIZED; 4452 - var s2 = state(p, stack2); 4453 - if (true_default) { 4454 - tag(s2, get_label(path, prop)); 4455 - } 4456 - return s2; 4457 - }); 4458 - sources.set(prop, s); 4459 - } 4460 - var value2 = get(s); 4461 - if (value2 === UNINITIALIZED) { 4462 - return false; 4463 - } 4464 - } 4465 - return has; 4466 - }, 4467 - set(target, prop, value2, receiver) { 4468 - var s = sources.get(prop); 4469 - var has = prop in target; 4470 - if (is_proxied_array && prop === "length") { 4471 - for (var i = value2; i < /** @type {Source<number>} */ 4472 - s.v; i += 1) { 4473 - var other_s = sources.get(i + ""); 4474 - if (other_s !== void 0) { 4475 - set(other_s, UNINITIALIZED); 4476 - } else if (i in target) { 4477 - other_s = with_parent(() => state(UNINITIALIZED, stack2)); 4478 - sources.set(i + "", other_s); 4479 - if (true_default) { 4480 - tag(other_s, get_label(path, i)); 4481 - } 4482 - } 4483 - } 4484 - } 4485 - if (s === void 0) { 4486 - if (!has || get_descriptor(target, prop)?.writable) { 4487 - s = with_parent(() => state(void 0, stack2)); 4488 - if (true_default) { 4489 - tag(s, get_label(path, prop)); 4490 - } 4491 - set(s, proxy(value2)); 4492 - sources.set(prop, s); 4493 - } 4494 - } else { 4495 - has = s.v !== UNINITIALIZED; 4496 - var p = with_parent(() => proxy(value2)); 4497 - set(s, p); 4498 - } 4499 - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop); 4500 - if (descriptor?.set) { 4501 - descriptor.set.call(receiver, value2); 4502 - } 4503 - if (!has) { 4504 - if (is_proxied_array && typeof prop === "string") { 4505 - var ls = ( 4506 - /** @type {Source<number>} */ 4507 - sources.get("length") 4508 - ); 4509 - var n = Number(prop); 4510 - if (Number.isInteger(n) && n >= ls.v) { 4511 - set(ls, n + 1); 4512 - } 4513 - } 4514 - increment(version); 4515 - } 4516 - return true; 4517 - }, 4518 - ownKeys(target) { 4519 - get(version); 4520 - var own_keys = Reflect.ownKeys(target).filter((key2) => { 4521 - var source3 = sources.get(key2); 4522 - return source3 === void 0 || source3.v !== UNINITIALIZED; 4523 - }); 4524 - for (var [key, source2] of sources) { 4525 - if (source2.v !== UNINITIALIZED && !(key in target)) { 4526 - own_keys.push(key); 4527 - } 4528 - } 4529 - return own_keys; 4530 - }, 4531 - setPrototypeOf() { 4532 - state_prototype_fixed(); 4533 - } 4534 - } 4535 - ); 4536 - } 4537 - function get_label(path, prop) { 4538 - if (typeof prop === "symbol") return `${path}[Symbol(${prop.description ?? ""})]`; 4539 - if (regex_is_valid_identifier.test(prop)) return `${path}.${prop}`; 4540 - return /^\d+$/.test(prop) ? `${path}[${prop}]` : `${path}['${prop}']`; 4541 - } 4542 - function get_proxied_value(value) { 4543 - try { 4544 - if (value !== null && typeof value === "object" && STATE_SYMBOL in value) { 4545 - return value[STATE_SYMBOL]; 4546 - } 4547 - } catch { 4548 - } 4549 - return value; 4550 - } 4551 - function is(a, b) { 4552 - return Object.is(get_proxied_value(a), get_proxied_value(b)); 4553 - } 4554 - var ARRAY_MUTATING_METHODS = /* @__PURE__ */ new Set([ 4555 - "copyWithin", 4556 - "fill", 4557 - "pop", 4558 - "push", 4559 - "reverse", 4560 - "shift", 4561 - "sort", 4562 - "splice", 4563 - "unshift" 4564 - ]); 4565 - function inspectable_array(array) { 4566 - return new Proxy(array, { 4567 - get(target, prop, receiver) { 4568 - var value = Reflect.get(target, prop, receiver); 4569 - if (!ARRAY_MUTATING_METHODS.has( 4570 - /** @type {string} */ 4571 - prop 4572 - )) { 4573 - return value; 4574 - } 4575 - return function(...args) { 4576 - set_eager_effects_deferred(); 4577 - var result = value.apply(this, args); 4578 - flush_eager_effects(); 4579 - return result; 4580 - }; 4581 - } 4582 - }); 4583 - } 4584 - 4585 - // node_modules/svelte/src/internal/client/dev/equality.js 4586 - function init_array_prototype_warnings() { 4587 - const array_prototype2 = Array.prototype; 4588 - const cleanup = Array.__svelte_cleanup; 4589 - if (cleanup) { 4590 - cleanup(); 4591 - } 4592 - const { indexOf, lastIndexOf, includes: includes2 } = array_prototype2; 4593 - array_prototype2.indexOf = function(item, from_index) { 4594 - const index = indexOf.call(this, item, from_index); 4595 - if (index === -1) { 4596 - for (let i = from_index ?? 0; i < this.length; i += 1) { 4597 - if (get_proxied_value(this[i]) === item) { 4598 - state_proxy_equality_mismatch("array.indexOf(...)"); 4599 - break; 4600 - } 4601 - } 4602 - } 4603 - return index; 4604 - }; 4605 - array_prototype2.lastIndexOf = function(item, from_index) { 4606 - const index = lastIndexOf.call(this, item, from_index ?? this.length - 1); 4607 - if (index === -1) { 4608 - for (let i = 0; i <= (from_index ?? this.length - 1); i += 1) { 4609 - if (get_proxied_value(this[i]) === item) { 4610 - state_proxy_equality_mismatch("array.lastIndexOf(...)"); 4611 - break; 4612 - } 4613 - } 4614 - } 4615 - return index; 4616 - }; 4617 - array_prototype2.includes = function(item, from_index) { 4618 - const has = includes2.call(this, item, from_index); 4619 - if (!has) { 4620 - for (let i = 0; i < this.length; i += 1) { 4621 - if (get_proxied_value(this[i]) === item) { 4622 - state_proxy_equality_mismatch("array.includes(...)"); 4623 - break; 4624 - } 4625 - } 4626 - } 4627 - return has; 4628 - }; 4629 - Array.__svelte_cleanup = () => { 4630 - array_prototype2.indexOf = indexOf; 4631 - array_prototype2.lastIndexOf = lastIndexOf; 4632 - array_prototype2.includes = includes2; 4633 - }; 4634 - } 4635 - function strict_equals(a, b, equal = true) { 4636 - try { 4637 - if (a === b !== (get_proxied_value(a) === get_proxied_value(b))) { 4638 - state_proxy_equality_mismatch(equal ? "===" : "!=="); 4639 - } 4640 - } catch { 4641 - } 4642 - return a === b === equal; 4643 - } 4644 - function equals2(a, b, equal = true) { 4645 - if (a == b !== (get_proxied_value(a) == get_proxied_value(b))) { 4646 - state_proxy_equality_mismatch(equal ? "==" : "!="); 4647 - } 4648 - return a == b === equal; 4649 - } 4650 - 4651 - // node_modules/svelte/src/internal/client/dom/operations.js 4652 - var $window; 4653 - var $document; 4654 - var is_firefox; 4655 - var first_child_getter; 4656 - var next_sibling_getter; 4657 - function init_operations() { 4658 - if ($window !== void 0) { 4659 - return; 4660 - } 4661 - $window = window; 4662 - $document = document; 4663 - is_firefox = /Firefox/.test(navigator.userAgent); 4664 - var element_prototype = Element.prototype; 4665 - var node_prototype = Node.prototype; 4666 - var text_prototype = Text.prototype; 4667 - first_child_getter = get_descriptor(node_prototype, "firstChild").get; 4668 - next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get; 4669 - if (is_extensible(element_prototype)) { 4670 - element_prototype.__click = void 0; 4671 - element_prototype.__className = void 0; 4672 - element_prototype.__attributes = null; 4673 - element_prototype.__style = void 0; 4674 - element_prototype.__e = void 0; 4675 - } 4676 - if (is_extensible(text_prototype)) { 4677 - text_prototype.__t = void 0; 4678 - } 4679 - if (true_default) { 4680 - element_prototype.__svelte_meta = null; 4681 - init_array_prototype_warnings(); 4682 - } 4683 - } 4684 - function create_text(value = "") { 4685 - return document.createTextNode(value); 4686 - } 4687 - function get_first_child(node) { 4688 - return ( 4689 - /** @type {TemplateNode | null} */ 4690 - first_child_getter.call(node) 4691 - ); 4692 - } 4693 - function get_next_sibling(node) { 4694 - return ( 4695 - /** @type {TemplateNode | null} */ 4696 - next_sibling_getter.call(node) 4697 - ); 4698 - } 4699 - function child(node, is_text) { 4700 - if (!hydrating) { 4701 - return get_first_child(node); 4702 - } 4703 - var child2 = get_first_child(hydrate_node); 4704 - if (child2 === null) { 4705 - child2 = hydrate_node.appendChild(create_text()); 4706 - } else if (is_text && child2.nodeType !== TEXT_NODE) { 4707 - var text = create_text(); 4708 - child2?.before(text); 4709 - set_hydrate_node(text); 4710 - return text; 4711 - } 4712 - if (is_text) { 4713 - merge_text_nodes( 4714 - /** @type {Text} */ 4715 - child2 4716 - ); 4717 - } 4718 - set_hydrate_node(child2); 4719 - return child2; 4720 - } 4721 - function first_child(node, is_text = false) { 4722 - if (!hydrating) { 4723 - var first = get_first_child(node); 4724 - if (first instanceof Comment && first.data === "") return get_next_sibling(first); 4725 - return first; 4726 - } 4727 - if (is_text) { 4728 - if (hydrate_node?.nodeType !== TEXT_NODE) { 4729 - var text = create_text(); 4730 - hydrate_node?.before(text); 4731 - set_hydrate_node(text); 4732 - return text; 4733 - } 4734 - merge_text_nodes( 4735 - /** @type {Text} */ 4736 - hydrate_node 4737 - ); 4738 - } 4739 - return hydrate_node; 4740 - } 4741 - function sibling(node, count = 1, is_text = false) { 4742 - let next_sibling = hydrating ? hydrate_node : node; 4743 - var last_sibling; 4744 - while (count--) { 4745 - last_sibling = next_sibling; 4746 - next_sibling = /** @type {TemplateNode} */ 4747 - get_next_sibling(next_sibling); 4748 - } 4749 - if (!hydrating) { 4750 - return next_sibling; 4751 - } 4752 - if (is_text) { 4753 - if (next_sibling?.nodeType !== TEXT_NODE) { 4754 - var text = create_text(); 4755 - if (next_sibling === null) { 4756 - last_sibling?.after(text); 4757 - } else { 4758 - next_sibling.before(text); 4759 - } 4760 - set_hydrate_node(text); 4761 - return text; 4762 - } 4763 - merge_text_nodes( 4764 - /** @type {Text} */ 4765 - next_sibling 4766 - ); 4767 - } 4768 - set_hydrate_node(next_sibling); 4769 - return next_sibling; 4770 - } 4771 - function clear_text_content(node) { 4772 - node.textContent = ""; 4773 - } 4774 - function should_defer_append() { 4775 - if (!async_mode_flag) return false; 4776 - if (eager_block_effects !== null) return false; 4777 - var flags2 = ( 4778 - /** @type {Effect} */ 4779 - active_effect.f 4780 - ); 4781 - return (flags2 & REACTION_RAN) !== 0; 4782 - } 4783 - function create_element(tag2, namespace, is2) { 4784 - let options = is2 ? { is: is2 } : void 0; 4785 - return ( 4786 - /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */ 4787 - document.createElementNS(namespace ?? NAMESPACE_HTML, tag2, options) 4788 - ); 4789 - } 4790 - function create_fragment() { 4791 - return document.createDocumentFragment(); 4792 - } 4793 - function create_comment(data = "") { 4794 - return document.createComment(data); 4795 - } 4796 - function set_attribute(element, key, value = "") { 4797 - if (key.startsWith("xlink:")) { 4798 - element.setAttributeNS("http://www.w3.org/1999/xlink", key, value); 4799 - return; 4800 - } 4801 - return element.setAttribute(key, value); 4802 - } 4803 - function merge_text_nodes(text) { 4804 - if ( 4805 - /** @type {string} */ 4806 - text.nodeValue.length < 65536 4807 - ) { 4808 - return; 4809 - } 4810 - let next2 = text.nextSibling; 4811 - while (next2 !== null && next2.nodeType === TEXT_NODE) { 4812 - next2.remove(); 4813 - text.nodeValue += /** @type {string} */ 4814 - next2.nodeValue; 4815 - next2 = text.nextSibling; 4816 - } 4817 - } 4818 - 4819 - // node_modules/svelte/src/internal/client/dom/hydration.js 4820 - var hydrating = false; 4821 - function set_hydrating(value) { 4822 - hydrating = value; 4823 - } 4824 - var hydrate_node; 4825 - function set_hydrate_node(node) { 4826 - if (node === null) { 4827 - hydration_mismatch(); 4828 - throw HYDRATION_ERROR; 4829 - } 4830 - return hydrate_node = node; 4831 - } 4832 - function hydrate_next() { 4833 - return set_hydrate_node(get_next_sibling(hydrate_node)); 4834 - } 4835 - function reset(node) { 4836 - if (!hydrating) return; 4837 - if (get_next_sibling(hydrate_node) !== null) { 4838 - hydration_mismatch(); 4839 - throw HYDRATION_ERROR; 4840 - } 4841 - hydrate_node = node; 4842 - } 4843 - function hydrate_template(template) { 4844 - if (hydrating) { 4845 - hydrate_node = template.content; 4846 - } 4847 - } 4848 - function next(count = 1) { 4849 - if (hydrating) { 4850 - var i = count; 4851 - var node = hydrate_node; 4852 - while (i--) { 4853 - node = /** @type {TemplateNode} */ 4854 - get_next_sibling(node); 4855 - } 4856 - hydrate_node = node; 4857 - } 4858 - } 4859 - function skip_nodes(remove = true) { 4860 - var depth = 0; 4861 - var node = hydrate_node; 4862 - while (true) { 4863 - if (node.nodeType === COMMENT_NODE) { 4864 - var data = ( 4865 - /** @type {Comment} */ 4866 - node.data 4867 - ); 4868 - if (data === HYDRATION_END) { 4869 - if (depth === 0) return node; 4870 - depth -= 1; 4871 - } else if (data === HYDRATION_START || data === HYDRATION_START_ELSE || // "[1", "[2", etc. for if blocks 4872 - data[0] === "[" && !isNaN(Number(data.slice(1)))) { 4873 - depth += 1; 4874 - } 4875 - } 4876 - var next2 = ( 4877 - /** @type {TemplateNode} */ 4878 - get_next_sibling(node) 4879 - ); 4880 - if (remove) node.remove(); 4881 - node = next2; 4882 - } 4883 - } 4884 - function read_hydration_instruction(node) { 4885 - if (!node || node.nodeType !== COMMENT_NODE) { 4886 - hydration_mismatch(); 4887 - throw HYDRATION_ERROR; 4888 - } 4889 - return ( 4890 - /** @type {Comment} */ 4891 - node.data 4892 - ); 4893 - } 4894 - 4895 - export { 4896 - is_array, 4897 - array_from, 4898 - object_keys, 4899 - define_property, 4900 - get_descriptor, 4901 - get_descriptors, 4902 - get_prototype_of, 4903 - has_own_property, 4904 - is_function, 4905 - noop, 4906 - is_promise, 4907 - run, 4908 - run_all, 4909 - deferred, 4910 - fallback, 4911 - to_array, 4912 - exclude_from_object, 4913 - BLOCK_EFFECT, 4914 - BRANCH_EFFECT, 4915 - DIRTY, 4916 - MAYBE_DIRTY, 4917 - INERT, 4918 - DESTROYED, 4919 - REACTION_RAN, 4920 - DESTROYING, 4921 - EFFECT_TRANSPARENT, 4922 - HEAD_EFFECT, 4923 - EFFECT_PRESERVED, 4924 - EFFECT_OFFSCREEN, 4925 - STATE_SYMBOL, 4926 - LEGACY_PROPS, 4927 - LOADING_ATTR_SYMBOL, 4928 - IS_XHTML, 4929 - ELEMENT_NODE, 4930 - TEXT_NODE, 4931 - COMMENT_NODE, 4932 - DOCUMENT_FRAGMENT_NODE, 4933 - experimental_async_required, 4934 - invalid_default_snippet, 4935 - invalid_snippet_arguments, 4936 - lifecycle_outside_component, 4937 - snippet_without_render_tag, 4938 - store_invalid_shape, 4939 - svelte_element_invalid_this_value, 4940 - bind_invalid_checkbox_value, 4941 - component_api_changed, 4942 - component_api_invalid_new, 4943 - each_key_duplicate, 4944 - each_key_volatile, 4945 - get_abort_signal_outside_reaction, 4946 - hydratable_missing_but_required, 4947 - hydration_failed, 4948 - invalid_snippet, 4949 - lifecycle_legacy_only, 4950 - props_invalid_value, 4951 - props_rest_readonly, 4952 - rune_outside_svelte, 4953 - EACH_ITEM_REACTIVE, 4954 - EACH_INDEX_REACTIVE, 4955 - EACH_IS_CONTROLLED, 4956 - EACH_IS_ANIMATED, 4957 - EACH_ITEM_IMMUTABLE, 4958 - PROPS_IS_IMMUTABLE, 4959 - PROPS_IS_RUNES, 4960 - PROPS_IS_UPDATED, 4961 - PROPS_IS_BINDABLE, 4962 - PROPS_IS_LAZY_INITIAL, 4963 - TRANSITION_IN, 4964 - TRANSITION_OUT, 4965 - TRANSITION_GLOBAL, 4966 - TEMPLATE_FRAGMENT, 4967 - TEMPLATE_USE_IMPORT_NODE, 4968 - TEMPLATE_USE_SVG, 4969 - TEMPLATE_USE_MATHML, 4970 - HYDRATION_START, 4971 - HYDRATION_START_ELSE, 4972 - HYDRATION_END, 4973 - HYDRATION_ERROR, 4974 - UNINITIALIZED, 4975 - FILENAME, 4976 - HMR, 4977 - NAMESPACE_HTML, 4978 - NAMESPACE_SVG, 4979 - NAMESPACE_MATHML, 4980 - ATTACHMENT_KEY, 4981 - hydrating, 4982 - set_hydrating, 4983 - hydrate_node, 4984 - set_hydrate_node, 4985 - hydrate_next, 4986 - reset, 4987 - hydrate_template, 4988 - next, 4989 - skip_nodes, 4990 - read_hydration_instruction, 4991 - safe_not_equal, 4992 - dynamic_void_element_content, 4993 - snapshot, 4994 - trace, 4995 - tag, 4996 - tag_proxy, 4997 - label, 4998 - get_error, 4999 - component_context, 5000 - dev_stack, 5001 - add_svelte_meta, 5002 - dev_current_component_function, 5003 - set_dev_current_component_function, 5004 - createContext, 5005 - getContext, 5006 - setContext, 5007 - hasContext, 5008 - getAllContexts, 5009 - push, 5010 - pop, 5011 - is_runes, 5012 - queue_micro_task, 5013 - invoke_error_boundary, 5014 - set_signal_status, 5015 - readable, 5016 - writable, 5017 - derived2 as derived, 5018 - readonly, 5019 - get2 as get, 5020 - store_get, 5021 - store_unsub, 5022 - store_set, 5023 - invalidate_store, 5024 - setup_stores, 5025 - store_mutate, 5026 - update_store, 5027 - update_pre_store, 5028 - mark_store_binding, 5029 - capture_store_binding, 5030 - current_batch, 5031 - previous_batch, 5032 - is_flushing_sync, 5033 - Batch, 5034 - flushSync, 5035 - eager, 5036 - fork, 5037 - createSubscriber, 5038 - boundary, 5039 - pending, 5040 - flatten, 5041 - run_after_blockers, 5042 - capture, 5043 - save, 5044 - track_reactivity_loss, 5045 - for_await_track_reactivity_loss, 5046 - unset_context, 5047 - run2, 5048 - wait, 5049 - increment_pending, 5050 - derived as derived2, 5051 - async_derived, 5052 - user_derived, 5053 - derived_safe_equal, 5054 - source, 5055 - state, 5056 - mutable_source, 5057 - mutate, 5058 - set, 5059 - internal_set, 5060 - update, 5061 - update_pre, 5062 - increment, 5063 - proxy, 5064 - is, 5065 - strict_equals, 5066 - equals2 as equals, 5067 - $window, 5068 - $document, 5069 - is_firefox, 5070 - init_operations, 5071 - create_text, 5072 - get_first_child, 5073 - get_next_sibling, 5074 - child, 5075 - first_child, 5076 - sibling, 5077 - clear_text_content, 5078 - should_defer_append, 5079 - create_element, 5080 - create_fragment, 5081 - create_comment, 5082 - set_attribute, 5083 - merge_text_nodes, 5084 - autofocus, 5085 - remove_textarea_child, 5086 - add_form_reset_listener, 5087 - listen, 5088 - without_reactive_context, 5089 - listen_to_event_and_reset_event, 5090 - validate_effect, 5091 - effect_tracking, 5092 - teardown, 5093 - user_effect, 5094 - user_pre_effect, 5095 - eager_effect, 5096 - effect_root, 5097 - component_root, 5098 - effect, 5099 - legacy_pre_effect, 5100 - legacy_pre_effect_reset, 5101 - render_effect, 5102 - template_effect, 5103 - deferred_template_effect, 5104 - block, 5105 - managed, 5106 - branch, 5107 - destroy_effect, 5108 - remove_effect_dom, 5109 - pause_effect, 5110 - resume_effect, 5111 - aborted, 5112 - move_effect, 5113 - invalidate_inner_signals, 5114 - is_destroying_effect, 5115 - active_reaction, 5116 - set_active_reaction, 5117 - active_effect, 5118 - set_active_effect, 5119 - update_version, 5120 - tick, 5121 - settled, 5122 - get as get2, 5123 - safe_get, 5124 - untrack, 5125 - deep_read_state, 5126 - deep_read 5127 - }; 5128 - //# sourceMappingURL=chunk-TY5SIVJK.js.map
-7
node_modules/.vite/deps/chunk-TY5SIVJK.js.map
··· 1 - { 2 - "version": 3, 3 - "sources": ["../../svelte/src/internal/shared/utils.js", "../../svelte/src/internal/client/constants.js", "../../svelte/src/internal/shared/errors.js", "../../svelte/src/internal/client/errors.js", "../../svelte/src/constants.js", "../../svelte/src/internal/client/context.js", "../../svelte/src/internal/client/dom/task.js", "../../svelte/src/internal/client/error-handling.js", "../../svelte/src/internal/client/reactivity/equality.js", "../../svelte/src/internal/shared/warnings.js", "../../svelte/src/internal/shared/clone.js", "../../svelte/src/internal/client/dev/tracing.js", "../../svelte/src/internal/shared/dev.js", "../../svelte/src/reactivity/create-subscriber.js", "../../svelte/src/internal/client/reactivity/status.js", "../../svelte/src/internal/client/reactivity/utils.js", "../../svelte/src/internal/client/dom/blocks/boundary.js", "../../svelte/src/internal/client/reactivity/async.js", "../../svelte/src/internal/client/reactivity/deriveds.js", "../../svelte/src/internal/client/reactivity/sources.js", "../../svelte/src/store/utils.js", "../../svelte/src/store/shared/index.js", "../../svelte/src/internal/client/reactivity/store.js", "../../svelte/src/internal/client/reactivity/batch.js", "../../svelte/src/internal/client/dom/elements/misc.js", "../../svelte/src/internal/client/dom/elements/bindings/shared.js", "../../svelte/src/internal/client/reactivity/effects.js", "../../svelte/src/internal/client/legacy.js", "../../svelte/src/internal/client/runtime.js", "../../svelte/src/internal/client/proxy.js", "../../svelte/src/internal/client/dev/equality.js", "../../svelte/src/internal/client/dom/operations.js", "../../svelte/src/internal/client/dom/hydration.js"], 4 - "sourcesContent": ["// Store the references to globals in case someone tries to monkey patch these, causing the below\n// to de-opt (this occurs often when using popular extensions).\nexport var is_array = Array.isArray;\nexport var index_of = Array.prototype.indexOf;\nexport var includes = Array.prototype.includes;\nexport var array_from = Array.from;\nexport var object_keys = Object.keys;\nexport var define_property = Object.defineProperty;\nexport var get_descriptor = Object.getOwnPropertyDescriptor;\nexport var get_descriptors = Object.getOwnPropertyDescriptors;\nexport var object_prototype = Object.prototype;\nexport var array_prototype = Array.prototype;\nexport var get_prototype_of = Object.getPrototypeOf;\nexport var is_extensible = Object.isExtensible;\nexport var has_own_property = Object.prototype.hasOwnProperty;\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\nexport const noop = () => {};\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n\n/**\n * @template [T=any]\n * @param {any} value\n * @returns {value is PromiseLike<T>}\n */\nexport function is_promise(value) {\n\treturn typeof value?.then === 'function';\n}\n\n/** @param {Function} fn */\nexport function run(fn) {\n\treturn fn();\n}\n\n/** @param {Array<() => void>} arr */\nexport function run_all(arr) {\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tarr[i]();\n\t}\n}\n\n/**\n * TODO replace with Promise.withResolvers once supported widely enough\n * @template [T=void]\n */\nexport function deferred() {\n\t/** @type {(value: T) => void} */\n\tvar resolve;\n\n\t/** @type {(reason: any) => void} */\n\tvar reject;\n\n\t/** @type {Promise<T>} */\n\tvar promise = new Promise((res, rej) => {\n\t\tresolve = res;\n\t\treject = rej;\n\t});\n\n\t// @ts-expect-error\n\treturn { promise, resolve, reject };\n}\n\n/**\n * @template V\n * @param {V} value\n * @param {V | (() => V)} fallback\n * @param {boolean} [lazy]\n * @returns {V}\n */\nexport function fallback(value, fallback, lazy = false) {\n\treturn value === undefined\n\t\t? lazy\n\t\t\t? /** @type {() => V} */ (fallback)()\n\t\t\t: /** @type {V} */ (fallback)\n\t\t: value;\n}\n\n/**\n * When encountering a situation like `let [a, b, c] = $derived(blah())`,\n * we need to stash an intermediate value that `a`, `b`, and `c` derive\n * from, in case it's an iterable\n * @template T\n * @param {ArrayLike<T> | Iterable<T>} value\n * @param {number} [n]\n * @returns {Array<T>}\n */\nexport function to_array(value, n) {\n\t// return arrays unchanged\n\tif (Array.isArray(value)) {\n\t\treturn value;\n\t}\n\n\t// if value is not iterable, or `n` is unspecified (indicates a rest\n\t// element, which means we're not concerned about unbounded iterables)\n\t// convert to an array with `Array.from`\n\tif (n === undefined || !(Symbol.iterator in value)) {\n\t\treturn Array.from(value);\n\t}\n\n\t// otherwise, populate an array with `n` values\n\n\t/** @type {T[]} */\n\tconst array = [];\n\n\tfor (const element of value) {\n\t\tarray.push(element);\n\t\tif (array.length === n) break;\n\t}\n\n\treturn array;\n}\n\n/**\n * @param {Record<string | symbol, unknown>} obj\n * @param {Array<string | symbol>} keys\n * @returns {Record<string | symbol, unknown>}\n */\nexport function exclude_from_object(obj, keys) {\n\t/** @type {Record<string | symbol, unknown>} */\n\tvar result = {};\n\n\tfor (var key in obj) {\n\t\tif (!keys.includes(key)) {\n\t\t\tresult[key] = obj[key];\n\t\t}\n\t}\n\n\tfor (var symbol of Object.getOwnPropertySymbols(obj)) {\n\t\tif (Object.propertyIsEnumerable.call(obj, symbol) && !keys.includes(symbol)) {\n\t\t\tresult[symbol] = obj[symbol];\n\t\t}\n\t}\n\n\treturn result;\n}\n", "// General flags\nexport const DERIVED = 1 << 1;\nexport const EFFECT = 1 << 2;\nexport const RENDER_EFFECT = 1 << 3;\n/**\n * An effect that does not destroy its child effects when it reruns.\n * Runs as part of render effects, i.e. not eagerly as part of tree traversal or effect flushing.\n */\nexport const MANAGED_EFFECT = 1 << 24;\n/**\n * An effect that does not destroy its child effects when it reruns (like MANAGED_EFFECT).\n * Runs eagerly as part of tree traversal or effect flushing.\n */\nexport const BLOCK_EFFECT = 1 << 4;\nexport const BRANCH_EFFECT = 1 << 5;\nexport const ROOT_EFFECT = 1 << 6;\nexport const BOUNDARY_EFFECT = 1 << 7;\n/**\n * Indicates that a reaction is connected to an effect root — either it is an effect,\n * or it is a derived that is depended on by at least one effect. If a derived has\n * no dependents, we can disconnect it from the graph, allowing it to either be\n * GC'd or reconnected later if an effect comes to depend on it again\n */\nexport const CONNECTED = 1 << 9;\nexport const CLEAN = 1 << 10;\nexport const DIRTY = 1 << 11;\nexport const MAYBE_DIRTY = 1 << 12;\nexport const INERT = 1 << 13;\nexport const DESTROYED = 1 << 14;\n/** Set once a reaction has run for the first time */\nexport const REACTION_RAN = 1 << 15;\n/** Effect is in the process of getting destroyed. Can be observed in child teardown functions */\nexport const DESTROYING = 1 << 25;\n\n// Flags exclusive to effects\n/**\n * 'Transparent' effects do not create a transition boundary.\n * This is on a block effect 99% of the time but may also be on a branch effect if its parent block effect was pruned\n */\nexport const EFFECT_TRANSPARENT = 1 << 16;\nexport const EAGER_EFFECT = 1 << 17;\nexport const HEAD_EFFECT = 1 << 18;\nexport const EFFECT_PRESERVED = 1 << 19;\nexport const USER_EFFECT = 1 << 20;\nexport const EFFECT_OFFSCREEN = 1 << 25;\n\n// Flags exclusive to deriveds\n/**\n * Tells that we marked this derived and its reactions as visited during the \"mark as (maybe) dirty\"-phase.\n * Will be lifted during execution of the derived and during checking its dirty state (both are necessary\n * because a derived might be checked but not executed).\n */\nexport const WAS_MARKED = 1 << 16;\n\n// Flags used for async\nexport const REACTION_IS_UPDATING = 1 << 21;\nexport const ASYNC = 1 << 22;\n\nexport const ERROR_VALUE = 1 << 23;\n\nexport const STATE_SYMBOL = Symbol('$state');\nexport const LEGACY_PROPS = Symbol('legacy props');\nexport const LOADING_ATTR_SYMBOL = Symbol('');\nexport const PROXY_PATH_SYMBOL = Symbol('proxy path');\n\n/** allow users to ignore aborted signal errors if `reason.name === 'StaleReactionError` */\nexport const STALE_REACTION = new (class StaleReactionError extends Error {\n\tname = 'StaleReactionError';\n\tmessage = 'The reaction that called `getAbortSignal()` was re-run or destroyed';\n})();\n\nexport const IS_XHTML =\n\t// We gotta write it like this because after downleveling the pure comment may end up in the wrong location\n\t!!globalThis.document?.contentType &&\n\t/* @__PURE__ */ globalThis.document.contentType.includes('xml');\nexport const ELEMENT_NODE = 1;\nexport const TEXT_NODE = 3;\nexport const COMMENT_NODE = 8;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n", "/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\n/**\n * Cannot use `%name%(...)` unless the `experimental.async` compiler option is `true`\n * @param {string} name\n * @returns {never}\n */\nexport function experimental_async_required(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`experimental_async_required\\nCannot use \\`${name}(...)\\` unless the \\`experimental.async\\` compiler option is \\`true\\`\\nhttps://svelte.dev/e/experimental_async_required`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/experimental_async_required`);\n\t}\n}\n\n/**\n * Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead\n * @returns {never}\n */\nexport function invalid_default_snippet() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_default_snippet\\nCannot use \\`{@render children(...)}\\` if the parent component uses \\`let:\\` directives. Consider using a named snippet instead\\nhttps://svelte.dev/e/invalid_default_snippet`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_default_snippet`);\n\t}\n}\n\n/**\n * A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`\n * @returns {never}\n */\nexport function invalid_snippet_arguments() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_snippet_arguments\\nA snippet function was passed invalid arguments. Snippets should only be instantiated via \\`{@render ...}\\`\\nhttps://svelte.dev/e/invalid_snippet_arguments`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_snippet_arguments`);\n\t}\n}\n\n/**\n * An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: \"%message%\"\n * @param {string} message\n * @returns {never}\n */\nexport function invariant_violation(message) {\n\tif (DEV) {\n\t\tconst error = new Error(`invariant_violation\\nAn invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: \"${message}\"\\nhttps://svelte.dev/e/invariant_violation`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invariant_violation`);\n\t}\n}\n\n/**\n * `%name%(...)` can only be used during component initialisation\n * @param {string} name\n * @returns {never}\n */\nexport function lifecycle_outside_component(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`lifecycle_outside_component\\n\\`${name}(...)\\` can only be used during component initialisation\\nhttps://svelte.dev/e/lifecycle_outside_component`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/lifecycle_outside_component`);\n\t}\n}\n\n/**\n * Context was not set in a parent component\n * @returns {never}\n */\nexport function missing_context() {\n\tif (DEV) {\n\t\tconst error = new Error(`missing_context\\nContext was not set in a parent component\\nhttps://svelte.dev/e/missing_context`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/missing_context`);\n\t}\n}\n\n/**\n * Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.\n * @returns {never}\n */\nexport function snippet_without_render_tag() {\n\tif (DEV) {\n\t\tconst error = new Error(`snippet_without_render_tag\\nAttempted to render a snippet without a \\`{@render}\\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \\`{snippet}\\` to \\`{@render snippet()}\\`.\\nhttps://svelte.dev/e/snippet_without_render_tag`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/snippet_without_render_tag`);\n\t}\n}\n\n/**\n * `%name%` is not a store with a `subscribe` method\n * @param {string} name\n * @returns {never}\n */\nexport function store_invalid_shape(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`store_invalid_shape\\n\\`${name}\\` is not a store with a \\`subscribe\\` method\\nhttps://svelte.dev/e/store_invalid_shape`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/store_invalid_shape`);\n\t}\n}\n\n/**\n * The `this` prop on `<svelte:element>` must be a string, if defined\n * @returns {never}\n */\nexport function svelte_element_invalid_this_value() {\n\tif (DEV) {\n\t\tconst error = new Error(`svelte_element_invalid_this_value\\nThe \\`this\\` prop on \\`<svelte:element>\\` must be a string, if defined\\nhttps://svelte.dev/e/svelte_element_invalid_this_value`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`);\n\t}\n}", "/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\nexport * from '../shared/errors.js';\n\n/**\n * Cannot create a `$derived(...)` with an `await` expression outside of an effect tree\n * @returns {never}\n */\nexport function async_derived_orphan() {\n\tif (DEV) {\n\t\tconst error = new Error(`async_derived_orphan\\nCannot create a \\`$derived(...)\\` with an \\`await\\` expression outside of an effect tree\\nhttps://svelte.dev/e/async_derived_orphan`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/async_derived_orphan`);\n\t}\n}\n\n/**\n * Using `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\n * @returns {never}\n */\nexport function bind_invalid_checkbox_value() {\n\tif (DEV) {\n\t\tconst error = new Error(`bind_invalid_checkbox_value\\nUsing \\`bind:value\\` together with a checkbox input is not allowed. Use \\`bind:checked\\` instead\\nhttps://svelte.dev/e/bind_invalid_checkbox_value`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/bind_invalid_checkbox_value`);\n\t}\n}\n\n/**\n * Component %component% has an export named `%key%` that a consumer component is trying to access using `bind:%key%`, which is disallowed. Instead, use `bind:this` (e.g. `<%name% bind:this={component} />`) and then access the property on the bound component instance (e.g. `component.%key%`)\n * @param {string} component\n * @param {string} key\n * @param {string} name\n * @returns {never}\n */\nexport function bind_invalid_export(component, key, name) {\n\tif (DEV) {\n\t\tconst error = new Error(`bind_invalid_export\\nComponent ${component} has an export named \\`${key}\\` that a consumer component is trying to access using \\`bind:${key}\\`, which is disallowed. Instead, use \\`bind:this\\` (e.g. \\`<${name} bind:this={component} />\\`) and then access the property on the bound component instance (e.g. \\`component.${key}\\`)\\nhttps://svelte.dev/e/bind_invalid_export`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/bind_invalid_export`);\n\t}\n}\n\n/**\n * A component is attempting to bind to a non-bindable property `%key%` belonging to %component% (i.e. `<%name% bind:%key%={...}>`). To mark a property as bindable: `let { %key% = $bindable() } = $props()`\n * @param {string} key\n * @param {string} component\n * @param {string} name\n * @returns {never}\n */\nexport function bind_not_bindable(key, component, name) {\n\tif (DEV) {\n\t\tconst error = new Error(`bind_not_bindable\\nA component is attempting to bind to a non-bindable property \\`${key}\\` belonging to ${component} (i.e. \\`<${name} bind:${key}={...}>\\`). To mark a property as bindable: \\`let { ${key} = $bindable() } = $props()\\`\\nhttps://svelte.dev/e/bind_not_bindable`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/bind_not_bindable`);\n\t}\n}\n\n/**\n * Calling `%method%` on a component instance (of %component%) is no longer valid in Svelte 5\n * @param {string} method\n * @param {string} component\n * @returns {never}\n */\nexport function component_api_changed(method, component) {\n\tif (DEV) {\n\t\tconst error = new Error(`component_api_changed\\nCalling \\`${method}\\` on a component instance (of ${component}) is no longer valid in Svelte 5\\nhttps://svelte.dev/e/component_api_changed`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/component_api_changed`);\n\t}\n}\n\n/**\n * Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working.\n * @param {string} component\n * @param {string} name\n * @returns {never}\n */\nexport function component_api_invalid_new(component, name) {\n\tif (DEV) {\n\t\tconst error = new Error(`component_api_invalid_new\\nAttempted to instantiate ${component} with \\`new ${name}\\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \\`compatibility.componentApi\\` compiler option to \\`4\\` to keep it working.\\nhttps://svelte.dev/e/component_api_invalid_new`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/component_api_invalid_new`);\n\t}\n}\n\n/**\n * A derived value cannot reference itself recursively\n * @returns {never}\n */\nexport function derived_references_self() {\n\tif (DEV) {\n\t\tconst error = new Error(`derived_references_self\\nA derived value cannot reference itself recursively\\nhttps://svelte.dev/e/derived_references_self`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/derived_references_self`);\n\t}\n}\n\n/**\n * Keyed each block has duplicate key `%value%` at indexes %a% and %b%\n * @param {string} a\n * @param {string} b\n * @param {string | undefined | null} [value]\n * @returns {never}\n */\nexport function each_key_duplicate(a, b, value) {\n\tif (DEV) {\n\t\tconst error = new Error(`each_key_duplicate\\n${value\n\t\t\t? `Keyed each block has duplicate key \\`${value}\\` at indexes ${a} and ${b}`\n\t\t\t: `Keyed each block has duplicate key at indexes ${a} and ${b}`}\\nhttps://svelte.dev/e/each_key_duplicate`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/each_key_duplicate`);\n\t}\n}\n\n/**\n * Keyed each block has key that is not idempotent — the key for item at index %index% was `%a%` but is now `%b%`. Keys must be the same each time for a given item\n * @param {string} index\n * @param {string} a\n * @param {string} b\n * @returns {never}\n */\nexport function each_key_volatile(index, a, b) {\n\tif (DEV) {\n\t\tconst error = new Error(`each_key_volatile\\nKeyed each block has key that is not idempotent — the key for item at index ${index} was \\`${a}\\` but is now \\`${b}\\`. Keys must be the same each time for a given item\\nhttps://svelte.dev/e/each_key_volatile`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/each_key_volatile`);\n\t}\n}\n\n/**\n * `%rune%` cannot be used inside an effect cleanup function\n * @param {string} rune\n * @returns {never}\n */\nexport function effect_in_teardown(rune) {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_in_teardown\\n\\`${rune}\\` cannot be used inside an effect cleanup function\\nhttps://svelte.dev/e/effect_in_teardown`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_in_teardown`);\n\t}\n}\n\n/**\n * Effect cannot be created inside a `$derived` value that was not itself created inside an effect\n * @returns {never}\n */\nexport function effect_in_unowned_derived() {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_in_unowned_derived\\nEffect cannot be created inside a \\`$derived\\` value that was not itself created inside an effect\\nhttps://svelte.dev/e/effect_in_unowned_derived`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_in_unowned_derived`);\n\t}\n}\n\n/**\n * `%rune%` can only be used inside an effect (e.g. during component initialisation)\n * @param {string} rune\n * @returns {never}\n */\nexport function effect_orphan(rune) {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_orphan\\n\\`${rune}\\` can only be used inside an effect (e.g. during component initialisation)\\nhttps://svelte.dev/e/effect_orphan`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_orphan`);\n\t}\n}\n\n/**\n * `$effect.pending()` can only be called inside an effect or derived\n * @returns {never}\n */\nexport function effect_pending_outside_reaction() {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_pending_outside_reaction\\n\\`$effect.pending()\\` can only be called inside an effect or derived\\nhttps://svelte.dev/e/effect_pending_outside_reaction`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_pending_outside_reaction`);\n\t}\n}\n\n/**\n * Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state\n * @returns {never}\n */\nexport function effect_update_depth_exceeded() {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_update_depth_exceeded\\nMaximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state\\nhttps://svelte.dev/e/effect_update_depth_exceeded`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);\n\t}\n}\n\n/**\n * Cannot use `flushSync` inside an effect\n * @returns {never}\n */\nexport function flush_sync_in_effect() {\n\tif (DEV) {\n\t\tconst error = new Error(`flush_sync_in_effect\\nCannot use \\`flushSync\\` inside an effect\\nhttps://svelte.dev/e/flush_sync_in_effect`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/flush_sync_in_effect`);\n\t}\n}\n\n/**\n * Cannot commit a fork that was already discarded\n * @returns {never}\n */\nexport function fork_discarded() {\n\tif (DEV) {\n\t\tconst error = new Error(`fork_discarded\\nCannot commit a fork that was already discarded\\nhttps://svelte.dev/e/fork_discarded`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/fork_discarded`);\n\t}\n}\n\n/**\n * Cannot create a fork inside an effect or when state changes are pending\n * @returns {never}\n */\nexport function fork_timing() {\n\tif (DEV) {\n\t\tconst error = new Error(`fork_timing\\nCannot create a fork inside an effect or when state changes are pending\\nhttps://svelte.dev/e/fork_timing`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/fork_timing`);\n\t}\n}\n\n/**\n * `getAbortSignal()` can only be called inside an effect or derived\n * @returns {never}\n */\nexport function get_abort_signal_outside_reaction() {\n\tif (DEV) {\n\t\tconst error = new Error(`get_abort_signal_outside_reaction\\n\\`getAbortSignal()\\` can only be called inside an effect or derived\\nhttps://svelte.dev/e/get_abort_signal_outside_reaction`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/get_abort_signal_outside_reaction`);\n\t}\n}\n\n/**\n * Expected to find a hydratable with key `%key%` during hydration, but did not.\n * @param {string} key\n * @returns {never}\n */\nexport function hydratable_missing_but_required(key) {\n\tif (DEV) {\n\t\tconst error = new Error(`hydratable_missing_but_required\\nExpected to find a hydratable with key \\`${key}\\` during hydration, but did not.\\nhttps://svelte.dev/e/hydratable_missing_but_required`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/hydratable_missing_but_required`);\n\t}\n}\n\n/**\n * Failed to hydrate the application\n * @returns {never}\n */\nexport function hydration_failed() {\n\tif (DEV) {\n\t\tconst error = new Error(`hydration_failed\\nFailed to hydrate the application\\nhttps://svelte.dev/e/hydration_failed`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/hydration_failed`);\n\t}\n}\n\n/**\n * Could not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\n * @returns {never}\n */\nexport function invalid_snippet() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_snippet\\nCould not \\`{@render}\\` snippet due to the expression being \\`null\\` or \\`undefined\\`. Consider using optional chaining \\`{@render snippet?.()}\\`\\nhttps://svelte.dev/e/invalid_snippet`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_snippet`);\n\t}\n}\n\n/**\n * `%name%(...)` cannot be used in runes mode\n * @param {string} name\n * @returns {never}\n */\nexport function lifecycle_legacy_only(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`lifecycle_legacy_only\\n\\`${name}(...)\\` cannot be used in runes mode\\nhttps://svelte.dev/e/lifecycle_legacy_only`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/lifecycle_legacy_only`);\n\t}\n}\n\n/**\n * Cannot do `bind:%key%={undefined}` when `%key%` has a fallback value\n * @param {string} key\n * @returns {never}\n */\nexport function props_invalid_value(key) {\n\tif (DEV) {\n\t\tconst error = new Error(`props_invalid_value\\nCannot do \\`bind:${key}={undefined}\\` when \\`${key}\\` has a fallback value\\nhttps://svelte.dev/e/props_invalid_value`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/props_invalid_value`);\n\t}\n}\n\n/**\n * Rest element properties of `$props()` such as `%property%` are readonly\n * @param {string} property\n * @returns {never}\n */\nexport function props_rest_readonly(property) {\n\tif (DEV) {\n\t\tconst error = new Error(`props_rest_readonly\\nRest element properties of \\`$props()\\` such as \\`${property}\\` are readonly\\nhttps://svelte.dev/e/props_rest_readonly`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/props_rest_readonly`);\n\t}\n}\n\n/**\n * The `%rune%` rune is only available inside `.svelte` and `.svelte.js/ts` files\n * @param {string} rune\n * @returns {never}\n */\nexport function rune_outside_svelte(rune) {\n\tif (DEV) {\n\t\tconst error = new Error(`rune_outside_svelte\\nThe \\`${rune}\\` rune is only available inside \\`.svelte\\` and \\`.svelte.js/ts\\` files\\nhttps://svelte.dev/e/rune_outside_svelte`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/rune_outside_svelte`);\n\t}\n}\n\n/**\n * `setContext` must be called when a component first initializes, not in a subsequent effect or after an `await` expression\n * @returns {never}\n */\nexport function set_context_after_init() {\n\tif (DEV) {\n\t\tconst error = new Error(`set_context_after_init\\n\\`setContext\\` must be called when a component first initializes, not in a subsequent effect or after an \\`await\\` expression\\nhttps://svelte.dev/e/set_context_after_init`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/set_context_after_init`);\n\t}\n}\n\n/**\n * Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\n * @returns {never}\n */\nexport function state_descriptors_fixed() {\n\tif (DEV) {\n\t\tconst error = new Error(`state_descriptors_fixed\\nProperty descriptors defined on \\`$state\\` objects must contain \\`value\\` and always be \\`enumerable\\`, \\`configurable\\` and \\`writable\\`.\\nhttps://svelte.dev/e/state_descriptors_fixed`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/state_descriptors_fixed`);\n\t}\n}\n\n/**\n * Cannot set prototype of `$state` object\n * @returns {never}\n */\nexport function state_prototype_fixed() {\n\tif (DEV) {\n\t\tconst error = new Error(`state_prototype_fixed\\nCannot set prototype of \\`$state\\` object\\nhttps://svelte.dev/e/state_prototype_fixed`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/state_prototype_fixed`);\n\t}\n}\n\n/**\n * Updating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\n * @returns {never}\n */\nexport function state_unsafe_mutation() {\n\tif (DEV) {\n\t\tconst error = new Error(`state_unsafe_mutation\\nUpdating state inside \\`$derived(...)\\`, \\`$inspect(...)\\` or a template expression is forbidden. If the value should not be reactive, declare it without \\`$state\\`\\nhttps://svelte.dev/e/state_unsafe_mutation`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/state_unsafe_mutation`);\n\t}\n}\n\n/**\n * A `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\n * @returns {never}\n */\nexport function svelte_boundary_reset_onerror() {\n\tif (DEV) {\n\t\tconst error = new Error(`svelte_boundary_reset_onerror\\nA \\`<svelte:boundary>\\` \\`reset\\` function cannot be called while an error is still being handled\\nhttps://svelte.dev/e/svelte_boundary_reset_onerror`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);\n\t}\n}", "export const EACH_ITEM_REACTIVE = 1;\nexport const EACH_INDEX_REACTIVE = 1 << 1;\n/** See EachBlock interface metadata.is_controlled for an explanation what this is */\nexport const EACH_IS_CONTROLLED = 1 << 2;\nexport const EACH_IS_ANIMATED = 1 << 3;\nexport const EACH_ITEM_IMMUTABLE = 1 << 4;\n\nexport const PROPS_IS_IMMUTABLE = 1;\nexport const PROPS_IS_RUNES = 1 << 1;\nexport const PROPS_IS_UPDATED = 1 << 2;\nexport const PROPS_IS_BINDABLE = 1 << 3;\nexport const PROPS_IS_LAZY_INITIAL = 1 << 4;\n\nexport const TRANSITION_IN = 1;\nexport const TRANSITION_OUT = 1 << 1;\nexport const TRANSITION_GLOBAL = 1 << 2;\n\nexport const TEMPLATE_FRAGMENT = 1;\nexport const TEMPLATE_USE_IMPORT_NODE = 1 << 1;\nexport const TEMPLATE_USE_SVG = 1 << 2;\nexport const TEMPLATE_USE_MATHML = 1 << 3;\n\nexport const HYDRATION_START = '[';\n/** used to indicate that an `{:else}...` block was rendered */\nexport const HYDRATION_START_ELSE = '[!';\n/** used to indicate that a boundary's `failed` snippet was rendered on the server */\nexport const HYDRATION_START_FAILED = '[?';\nexport const HYDRATION_END = ']';\nexport const HYDRATION_ERROR = {};\n\nexport const ELEMENT_IS_NAMESPACED = 1;\nexport const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;\nexport const ELEMENT_IS_INPUT = 1 << 2;\n\nexport const UNINITIALIZED = Symbol();\n\n// Dev-time component properties\nexport const FILENAME = Symbol('filename');\nexport const HMR = Symbol('hmr');\n\nexport const NAMESPACE_HTML = 'http://www.w3.org/1999/xhtml';\nexport const NAMESPACE_SVG = 'http://www.w3.org/2000/svg';\nexport const NAMESPACE_MATHML = 'http://www.w3.org/1998/Math/MathML';\n\n// we use a list of ignorable runtime warnings because not every runtime warning\n// can be ignored and we want to keep the validation for svelte-ignore in place\nexport const IGNORABLE_RUNTIME_WARNINGS = /** @type {const} */ ([\n\t'await_waterfall',\n\t'await_reactivity_loss',\n\t'state_snapshot_uncloneable',\n\t'binding_property_non_reactive',\n\t'hydration_attribute_changed',\n\t'hydration_html_changed',\n\t'ownership_invalid_binding',\n\t'ownership_invalid_mutation'\n]);\n\n/**\n * Whitespace inside one of these elements will not result in\n * a whitespace node being created in any circumstances. (This\n * list is almost certainly very incomplete)\n * TODO this is currently unused\n */\nexport const ELEMENTS_WITHOUT_TEXT = ['audio', 'datalist', 'dl', 'optgroup', 'select', 'video'];\n\nexport const ATTACHMENT_KEY = '@attach';\n", "/** @import { ComponentContext, DevStackEntry, Effect } from '#client' */\nimport { DEV } from 'esm-env';\nimport * as e from './errors.js';\nimport { active_effect, active_reaction } from './runtime.js';\nimport { create_user_effect } from './reactivity/effects.js';\nimport { async_mode_flag, legacy_mode_flag } from '../flags/index.js';\nimport { FILENAME } from '../../constants.js';\nimport { BRANCH_EFFECT } from './constants.js';\n\n/** @type {ComponentContext | null} */\nexport let component_context = null;\n\n/** @param {ComponentContext | null} context */\nexport function set_component_context(context) {\n\tcomponent_context = context;\n}\n\n/** @type {DevStackEntry | null} */\nexport let dev_stack = null;\n\n/** @param {DevStackEntry | null} stack */\nexport function set_dev_stack(stack) {\n\tdev_stack = stack;\n}\n\n/**\n * Execute a callback with a new dev stack entry\n * @param {() => any} callback - Function to execute\n * @param {DevStackEntry['type']} type - Type of block/component\n * @param {any} component - Component function\n * @param {number} line - Line number\n * @param {number} column - Column number\n * @param {Record<string, any>} [additional] - Any additional properties to add to the dev stack entry\n * @returns {any}\n */\nexport function add_svelte_meta(callback, type, component, line, column, additional) {\n\tconst parent = dev_stack;\n\n\tdev_stack = {\n\t\ttype,\n\t\tfile: component[FILENAME],\n\t\tline,\n\t\tcolumn,\n\t\tparent,\n\t\t...additional\n\t};\n\n\ttry {\n\t\treturn callback();\n\t} finally {\n\t\tdev_stack = parent;\n\t}\n}\n\n/**\n * The current component function. Different from current component context:\n * ```html\n * <!-- App.svelte -->\n * <Foo>\n * <Bar /> <!-- context == Foo.svelte, function == App.svelte -->\n * </Foo>\n * ```\n * @type {ComponentContext['function']}\n */\nexport let dev_current_component_function = null;\n\n/** @param {ComponentContext['function']} fn */\nexport function set_dev_current_component_function(fn) {\n\tdev_current_component_function = fn;\n}\n\n/**\n * Returns a `[get, set]` pair of functions for working with context in a type-safe way.\n *\n * `get` will throw an error if no parent component called `set`.\n *\n * @template T\n * @returns {[() => T, (context: T) => T]}\n * @since 5.40.0\n */\nexport function createContext() {\n\tconst key = {};\n\n\treturn [\n\t\t() => {\n\t\t\tif (!hasContext(key)) {\n\t\t\t\te.missing_context();\n\t\t\t}\n\n\t\t\treturn getContext(key);\n\t\t},\n\t\t(context) => setContext(key, context)\n\t];\n}\n\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * [`createContext`](https://svelte.dev/docs/svelte/svelte#createContext) is a type-safe alternative.\n *\n * @template T\n * @param {any} key\n * @returns {T}\n */\nexport function getContext(key) {\n\tconst context_map = get_or_init_context_map('getContext');\n\tconst result = /** @type {T} */ (context_map.get(key));\n\treturn result;\n}\n\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * [`createContext`](https://svelte.dev/docs/svelte/svelte#createContext) is a type-safe alternative.\n *\n * @template T\n * @param {any} key\n * @param {T} context\n * @returns {T}\n */\nexport function setContext(key, context) {\n\tconst context_map = get_or_init_context_map('setContext');\n\n\tif (async_mode_flag) {\n\t\tvar flags = /** @type {Effect} */ (active_effect).f;\n\t\tvar valid =\n\t\t\t!active_reaction &&\n\t\t\t(flags & BRANCH_EFFECT) !== 0 &&\n\t\t\t// pop() runs synchronously, so this indicates we're setting context after an await\n\t\t\t!(/** @type {ComponentContext} */ (component_context).i);\n\n\t\tif (!valid) {\n\t\t\te.set_context_after_init();\n\t\t}\n\t}\n\n\tcontext_map.set(key, context);\n\treturn context;\n}\n\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * @param {any} key\n * @returns {boolean}\n */\nexport function hasContext(key) {\n\tconst context_map = get_or_init_context_map('hasContext');\n\treturn context_map.has(key);\n}\n\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * @template {Map<any, any>} [T=Map<any, any>]\n * @returns {T}\n */\nexport function getAllContexts() {\n\tconst context_map = get_or_init_context_map('getAllContexts');\n\treturn /** @type {T} */ (context_map);\n}\n\n/**\n * @param {Record<string, unknown>} props\n * @param {any} runes\n * @param {Function} [fn]\n * @returns {void}\n */\nexport function push(props, runes = false, fn) {\n\tcomponent_context = {\n\t\tp: component_context,\n\t\ti: false,\n\t\tc: null,\n\t\te: null,\n\t\ts: props,\n\t\tx: null,\n\t\tr: /** @type {Effect} */ (active_effect),\n\t\tl: legacy_mode_flag && !runes ? { s: null, u: null, $: [] } : null\n\t};\n\n\tif (DEV) {\n\t\t// component function\n\t\tcomponent_context.function = fn;\n\t\tdev_current_component_function = fn;\n\t}\n}\n\n/**\n * @template {Record<string, any>} T\n * @param {T} [component]\n * @returns {T}\n */\nexport function pop(component) {\n\tvar context = /** @type {ComponentContext} */ (component_context);\n\tvar effects = context.e;\n\n\tif (effects !== null) {\n\t\tcontext.e = null;\n\n\t\tfor (var fn of effects) {\n\t\t\tcreate_user_effect(fn);\n\t\t}\n\t}\n\n\tif (component !== undefined) {\n\t\tcontext.x = component;\n\t}\n\n\tcontext.i = true;\n\n\tcomponent_context = context.p;\n\n\tif (DEV) {\n\t\tdev_current_component_function = component_context?.function ?? null;\n\t}\n\n\treturn component ?? /** @type {T} */ ({});\n}\n\n/** @returns {boolean} */\nexport function is_runes() {\n\treturn !legacy_mode_flag || (component_context !== null && component_context.l === null);\n}\n\n/**\n * @param {string} name\n * @returns {Map<unknown, unknown>}\n */\nfunction get_or_init_context_map(name) {\n\tif (component_context === null) {\n\t\te.lifecycle_outside_component(name);\n\t}\n\n\treturn (component_context.c ??= new Map(get_parent_context(component_context) || undefined));\n}\n\n/**\n * @param {ComponentContext} component_context\n * @returns {Map<unknown, unknown> | null}\n */\nfunction get_parent_context(component_context) {\n\tlet parent = component_context.p;\n\twhile (parent !== null) {\n\t\tconst context_map = parent.c;\n\t\tif (context_map !== null) {\n\t\t\treturn context_map;\n\t\t}\n\t\tparent = parent.p;\n\t}\n\treturn null;\n}\n", "import { run_all } from '../../shared/utils.js';\nimport { is_flushing_sync } from '../reactivity/batch.js';\n\n/** @type {Array<() => void>} */\nlet micro_tasks = [];\n\nfunction run_micro_tasks() {\n\tvar tasks = micro_tasks;\n\tmicro_tasks = [];\n\trun_all(tasks);\n}\n\n/**\n * @param {() => void} fn\n */\nexport function queue_micro_task(fn) {\n\tif (micro_tasks.length === 0 && !is_flushing_sync) {\n\t\tvar tasks = micro_tasks;\n\t\tqueueMicrotask(() => {\n\t\t\t// If this is false, a flushSync happened in the meantime. Do _not_ run new scheduled microtasks in that case\n\t\t\t// as the ordering of microtasks would be broken at that point - consider this case:\n\t\t\t// - queue_micro_task schedules microtask A to flush task X\n\t\t\t// - synchronously after, flushSync runs, processing task X\n\t\t\t// - synchronously after, some other microtask B is scheduled, but not through queue_micro_task but for example a Promise.resolve() in user code\n\t\t\t// - synchronously after, queue_micro_task schedules microtask C to flush task Y\n\t\t\t// - one tick later, microtask A now resolves, flushing task Y before microtask B, which is incorrect\n\t\t\t// This if check prevents that race condition (that realistically will only happen in tests)\n\t\t\tif (tasks === micro_tasks) run_micro_tasks();\n\t\t});\n\t}\n\n\tmicro_tasks.push(fn);\n}\n\n/**\n * Synchronously run any queued tasks.\n */\nexport function flush_tasks() {\n\twhile (micro_tasks.length > 0) {\n\t\trun_micro_tasks();\n\t}\n}\n", "/** @import { Derived, Effect } from '#client' */\n/** @import { Boundary } from './dom/blocks/boundary.js' */\nimport { DEV } from 'esm-env';\nimport { FILENAME } from '../../constants.js';\nimport { is_firefox } from './dom/operations.js';\nimport { ERROR_VALUE, BOUNDARY_EFFECT, REACTION_RAN, EFFECT } from './constants.js';\nimport { define_property, get_descriptor } from '../shared/utils.js';\nimport { active_effect, active_reaction } from './runtime.js';\n\nconst adjustments = new WeakMap();\n\n/**\n * @param {unknown} error\n */\nexport function handle_error(error) {\n\tvar effect = active_effect;\n\n\t// for unowned deriveds, don't throw until we read the value\n\tif (effect === null) {\n\t\t/** @type {Derived} */ (active_reaction).f |= ERROR_VALUE;\n\t\treturn error;\n\t}\n\n\tif (DEV && error instanceof Error && !adjustments.has(error)) {\n\t\tadjustments.set(error, get_adjustments(error, effect));\n\t}\n\n\t// if the error occurred while creating this subtree, we let it\n\t// bubble up until it hits a boundary that can handle it, unless\n\t// it's an $effect in which case it doesn't run immediately\n\tif ((effect.f & REACTION_RAN) === 0 && (effect.f & EFFECT) === 0) {\n\t\tif (DEV && !effect.parent && error instanceof Error) {\n\t\t\tapply_adjustments(error);\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\t// otherwise we bubble up the effect tree ourselves\n\tinvoke_error_boundary(error, effect);\n}\n\n/**\n * @param {unknown} error\n * @param {Effect | null} effect\n */\nexport function invoke_error_boundary(error, effect) {\n\twhile (effect !== null) {\n\t\tif ((effect.f & BOUNDARY_EFFECT) !== 0) {\n\t\t\tif ((effect.f & REACTION_RAN) === 0) {\n\t\t\t\t// we are still creating the boundary effect\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t/** @type {Boundary} */ (effect.b).error(error);\n\t\t\t\treturn;\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\n\t\teffect = effect.parent;\n\t}\n\n\tif (DEV && error instanceof Error) {\n\t\tapply_adjustments(error);\n\t}\n\n\tthrow error;\n}\n\n/**\n * Add useful information to the error message/stack in development\n * @param {Error} error\n * @param {Effect} effect\n */\nfunction get_adjustments(error, effect) {\n\tconst message_descriptor = get_descriptor(error, 'message');\n\n\t// if the message was already changed and it's not configurable we can't change it\n\t// or it will throw a different error swallowing the original error\n\tif (message_descriptor && !message_descriptor.configurable) return;\n\n\tvar indent = is_firefox ? ' ' : '\\t';\n\tvar component_stack = `\\n${indent}in ${effect.fn?.name || '<unknown>'}`;\n\tvar context = effect.ctx;\n\n\twhile (context !== null) {\n\t\tcomponent_stack += `\\n${indent}in ${context.function?.[FILENAME].split('/').pop()}`;\n\t\tcontext = context.p;\n\t}\n\n\treturn {\n\t\tmessage: error.message + `\\n${component_stack}\\n`,\n\t\tstack: error.stack\n\t\t\t?.split('\\n')\n\t\t\t.filter((line) => !line.includes('svelte/src/internal'))\n\t\t\t.join('\\n')\n\t};\n}\n\n/**\n * @param {Error} error\n */\nfunction apply_adjustments(error) {\n\tconst adjusted = adjustments.get(error);\n\n\tif (adjusted) {\n\t\tdefine_property(error, 'message', {\n\t\t\tvalue: adjusted.message\n\t\t});\n\n\t\tdefine_property(error, 'stack', {\n\t\t\tvalue: adjusted.stack\n\t\t});\n\t}\n}\n", "/** @import { Equals } from '#client' */\n\n/** @type {Equals} */\nexport function equals(value) {\n\treturn value === this.v;\n}\n\n/**\n * @param {unknown} a\n * @param {unknown} b\n * @returns {boolean}\n */\nexport function safe_not_equal(a, b) {\n\treturn a != a\n\t\t? b == b\n\t\t: a !== b || (a !== null && typeof a === 'object') || typeof a === 'function';\n}\n\n/**\n * @param {unknown} a\n * @param {unknown} b\n * @returns {boolean}\n */\nexport function not_equal(a, b) {\n\treturn a !== b;\n}\n\n/** @type {Equals} */\nexport function safe_equals(value) {\n\treturn !safe_not_equal(value, this.v);\n}\n", "/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\nvar bold = 'font-weight: bold';\nvar normal = 'font-weight: normal';\n\n/**\n * `<svelte:element this=\"%tag%\">` is a void element — it cannot have content\n * @param {string} tag\n */\nexport function dynamic_void_element_content(tag) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] dynamic_void_element_content\\n%c\\`<svelte:element this=\"${tag}\">\\` is a void element — it cannot have content\\nhttps://svelte.dev/e/dynamic_void_element_content`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/dynamic_void_element_content`);\n\t}\n}\n\n/**\n * The following properties cannot be cloned with `$state.snapshot` — the return value contains the originals:\n * \n * %properties%\n * @param {string | undefined | null} [properties]\n */\nexport function state_snapshot_uncloneable(properties) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[svelte] state_snapshot_uncloneable\\n%c${properties\n\t\t\t\t? `The following properties cannot be cloned with \\`$state.snapshot\\` — the return value contains the originals:\n\n${properties}`\n\t\t\t\t: 'Value cannot be cloned with `$state.snapshot` — the original value was returned'}\\nhttps://svelte.dev/e/state_snapshot_uncloneable`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/state_snapshot_uncloneable`);\n\t}\n}", "/** @import { Snapshot } from './types' */\nimport { DEV } from 'esm-env';\nimport * as w from './warnings.js';\nimport { get_prototype_of, is_array, object_prototype } from './utils.js';\n\n/**\n * In dev, we keep track of which properties could not be cloned. In prod\n * we don't bother, but we keep a dummy array around so that the\n * signature stays the same\n * @type {string[]}\n */\nconst empty = [];\n\n/**\n * @template T\n * @param {T} value\n * @param {boolean} [skip_warning]\n * @param {boolean} [no_tojson]\n * @returns {Snapshot<T>}\n */\nexport function snapshot(value, skip_warning = false, no_tojson = false) {\n\tif (DEV && !skip_warning) {\n\t\t/** @type {string[]} */\n\t\tconst paths = [];\n\n\t\tconst copy = clone(value, new Map(), '', paths, null, no_tojson);\n\t\tif (paths.length === 1 && paths[0] === '') {\n\t\t\t// value could not be cloned\n\t\t\tw.state_snapshot_uncloneable();\n\t\t} else if (paths.length > 0) {\n\t\t\t// some properties could not be cloned\n\t\t\tconst slice = paths.length > 10 ? paths.slice(0, 7) : paths.slice(0, 10);\n\t\t\tconst excess = paths.length - slice.length;\n\n\t\t\tlet uncloned = slice.map((path) => `- <value>${path}`).join('\\n');\n\t\t\tif (excess > 0) uncloned += `\\n- ...and ${excess} more`;\n\n\t\t\tw.state_snapshot_uncloneable(uncloned);\n\t\t}\n\n\t\treturn copy;\n\t}\n\n\treturn clone(value, new Map(), '', empty, null, no_tojson);\n}\n\n/**\n * @template T\n * @param {T} value\n * @param {Map<T, Snapshot<T>>} cloned\n * @param {string} path\n * @param {string[]} paths\n * @param {null | T} [original] The original value, if `value` was produced from a `toJSON` call\n * @param {boolean} [no_tojson]\n * @returns {Snapshot<T>}\n */\nfunction clone(value, cloned, path, paths, original = null, no_tojson = false) {\n\tif (typeof value === 'object' && value !== null) {\n\t\tvar unwrapped = cloned.get(value);\n\t\tif (unwrapped !== undefined) return unwrapped;\n\n\t\tif (value instanceof Map) return /** @type {Snapshot<T>} */ (new Map(value));\n\t\tif (value instanceof Set) return /** @type {Snapshot<T>} */ (new Set(value));\n\n\t\tif (is_array(value)) {\n\t\t\tvar copy = /** @type {Snapshot<any>} */ (Array(value.length));\n\t\t\tcloned.set(value, copy);\n\n\t\t\tif (original !== null) {\n\t\t\t\tcloned.set(original, copy);\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < value.length; i += 1) {\n\t\t\t\tvar element = value[i];\n\t\t\t\tif (i in value) {\n\t\t\t\t\tcopy[i] = clone(element, cloned, DEV ? `${path}[${i}]` : path, paths, null, no_tojson);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn copy;\n\t\t}\n\n\t\tif (get_prototype_of(value) === object_prototype) {\n\t\t\t/** @type {Snapshot<any>} */\n\t\t\tcopy = {};\n\t\t\tcloned.set(value, copy);\n\n\t\t\tif (original !== null) {\n\t\t\t\tcloned.set(original, copy);\n\t\t\t}\n\n\t\t\tfor (var key of Object.keys(value)) {\n\t\t\t\tcopy[key] = clone(\n\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\tvalue[key],\n\t\t\t\t\tcloned,\n\t\t\t\t\tDEV ? `${path}.${key}` : path,\n\t\t\t\t\tpaths,\n\t\t\t\t\tnull,\n\t\t\t\t\tno_tojson\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn copy;\n\t\t}\n\n\t\tif (value instanceof Date) {\n\t\t\treturn /** @type {Snapshot<T>} */ (structuredClone(value));\n\t\t}\n\n\t\tif (typeof (/** @type {T & { toJSON?: any } } */ (value).toJSON) === 'function' && !no_tojson) {\n\t\t\treturn clone(\n\t\t\t\t/** @type {T & { toJSON(): any } } */ (value).toJSON(),\n\t\t\t\tcloned,\n\t\t\t\tDEV ? `${path}.toJSON()` : path,\n\t\t\t\tpaths,\n\t\t\t\t// Associate the instance with the toJSON clone\n\t\t\t\tvalue\n\t\t\t);\n\t\t}\n\t}\n\n\tif (value instanceof EventTarget) {\n\t\t// can't be cloned\n\t\treturn /** @type {Snapshot<T>} */ (value);\n\t}\n\n\ttry {\n\t\treturn /** @type {Snapshot<T>} */ (structuredClone(value));\n\t} catch (e) {\n\t\tif (DEV) {\n\t\t\tpaths.push(path);\n\t\t}\n\n\t\treturn /** @type {Snapshot<T>} */ (value);\n\t}\n}\n", "/** @import { Derived, Reaction, Value } from '#client' */\nimport { UNINITIALIZED } from '../../../constants.js';\nimport { snapshot } from '../../shared/clone.js';\nimport { DERIVED, ASYNC, PROXY_PATH_SYMBOL, STATE_SYMBOL } from '#client/constants';\nimport { effect_tracking } from '../reactivity/effects.js';\nimport { active_reaction, untrack } from '../runtime.js';\n\n/**\n * @typedef {{\n * traces: Error[];\n * }} TraceEntry\n */\n\n/** @type {{ reaction: Reaction | null, entries: Map<Value, TraceEntry> } | null} */\nexport let tracing_expressions = null;\n\n/**\n * @param {Value} signal\n * @param {TraceEntry} [entry]\n */\nfunction log_entry(signal, entry) {\n\tconst value = signal.v;\n\n\tif (value === UNINITIALIZED) {\n\t\treturn;\n\t}\n\n\tconst type = get_type(signal);\n\tconst current_reaction = /** @type {Reaction} */ (active_reaction);\n\tconst dirty = signal.wv > current_reaction.wv || current_reaction.wv === 0;\n\tconst style = dirty\n\t\t? 'color: CornflowerBlue; font-weight: bold'\n\t\t: 'color: grey; font-weight: normal';\n\n\t// eslint-disable-next-line no-console\n\tconsole.groupCollapsed(\n\t\tsignal.label ? `%c${type}%c ${signal.label}` : `%c${type}%c`,\n\t\tstyle,\n\t\tdirty ? 'font-weight: normal' : style,\n\t\ttypeof value === 'object' && value !== null && STATE_SYMBOL in value\n\t\t\t? snapshot(value, true)\n\t\t\t: value\n\t);\n\n\tif (type === '$derived') {\n\t\tconst deps = new Set(/** @type {Derived} */ (signal).deps);\n\t\tfor (const dep of deps) {\n\t\t\tlog_entry(dep);\n\t\t}\n\t}\n\n\tif (signal.created) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.log(signal.created);\n\t}\n\n\tif (dirty && signal.updated) {\n\t\tfor (const updated of signal.updated.values()) {\n\t\t\tif (updated.error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log(updated.error);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (entry) {\n\t\tfor (var trace of entry.traces) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.log(trace);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line no-console\n\tconsole.groupEnd();\n}\n\n/**\n * @param {Value} signal\n * @returns {'$state' | '$derived' | 'store'}\n */\nfunction get_type(signal) {\n\tif ((signal.f & (DERIVED | ASYNC)) !== 0) return '$derived';\n\treturn signal.label?.startsWith('$') ? 'store' : '$state';\n}\n\n/**\n * @template T\n * @param {() => string} label\n * @param {() => T} fn\n */\nexport function trace(label, fn) {\n\tvar previously_tracing_expressions = tracing_expressions;\n\n\ttry {\n\t\ttracing_expressions = { entries: new Map(), reaction: active_reaction };\n\n\t\tvar start = performance.now();\n\t\tvar value = fn();\n\t\tvar time = (performance.now() - start).toFixed(2);\n\n\t\tvar prefix = untrack(label);\n\n\t\tif (!effect_tracking()) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.log(`${prefix} %cran outside of an effect (${time}ms)`, 'color: grey');\n\t\t} else if (tracing_expressions.entries.size === 0) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.log(`${prefix} %cno reactive dependencies (${time}ms)`, 'color: grey');\n\t\t} else {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.group(`${prefix} %c(${time}ms)`, 'color: grey');\n\n\t\t\tvar entries = tracing_expressions.entries;\n\n\t\t\tuntrack(() => {\n\t\t\t\tfor (const [signal, traces] of entries) {\n\t\t\t\t\tlog_entry(signal, traces);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\ttracing_expressions = null;\n\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.groupEnd();\n\t\t}\n\n\t\treturn value;\n\t} finally {\n\t\ttracing_expressions = previously_tracing_expressions;\n\t}\n}\n\n/**\n * @param {Value} source\n * @param {string} label\n */\nexport function tag(source, label) {\n\tsource.label = label;\n\ttag_proxy(source.v, label);\n\n\treturn source;\n}\n\n/**\n * @param {unknown} value\n * @param {string} label\n */\nexport function tag_proxy(value, label) {\n\t// @ts-expect-error\n\tvalue?.[PROXY_PATH_SYMBOL]?.(label);\n\treturn value;\n}\n\n/**\n * @param {unknown} value\n */\nexport function label(value) {\n\tif (typeof value === 'symbol') return `Symbol(${value.description})`;\n\tif (typeof value === 'function') return '<function>';\n\tif (typeof value === 'object' && value) return '<object>';\n\treturn String(value);\n}\n", "import { DEV } from 'esm-env';\nimport { define_property } from './utils.js';\nimport * as e from './errors.js';\n\n/**\n * @param {string} label\n * @returns {Error & { stack: string } | null}\n */\nexport function get_error(label) {\n\tconst error = new Error();\n\tconst stack = get_stack();\n\n\tif (stack.length === 0) {\n\t\treturn null;\n\t}\n\n\tstack.unshift('\\n');\n\n\tdefine_property(error, 'stack', {\n\t\tvalue: stack.join('\\n')\n\t});\n\n\tdefine_property(error, 'name', {\n\t\tvalue: label\n\t});\n\n\treturn /** @type {Error & { stack: string }} */ (error);\n}\n\n/**\n * @returns {string[]}\n */\nexport function get_stack() {\n\t// @ts-ignore - doesn't exist everywhere\n\tconst limit = Error.stackTraceLimit;\n\t// @ts-ignore - doesn't exist everywhere\n\tError.stackTraceLimit = Infinity;\n\tconst stack = new Error().stack;\n\t// @ts-ignore - doesn't exist everywhere\n\tError.stackTraceLimit = limit;\n\n\tif (!stack) return [];\n\n\tconst lines = stack.split('\\n');\n\tconst new_lines = [];\n\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tconst line = lines[i];\n\t\tconst posixified = line.replaceAll('\\\\', '/');\n\n\t\tif (line.trim() === 'Error') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (line.includes('validate_each_keys')) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (posixified.includes('svelte/src/internal') || posixified.includes('node_modules/.vite')) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tnew_lines.push(line);\n\t}\n\n\treturn new_lines;\n}\n\n/**\n * @param {boolean} condition\n * @param {string} message\n */\nexport function invariant(condition, message) {\n\tif (!DEV) {\n\t\tthrow new Error('invariant(...) was not guarded by if (DEV)');\n\t}\n\n\tif (!condition) e.invariant_violation(message);\n}\n", "import { get, tick, untrack } from '../internal/client/runtime.js';\nimport { effect_tracking, render_effect } from '../internal/client/reactivity/effects.js';\nimport { source, increment } from '../internal/client/reactivity/sources.js';\nimport { tag } from '../internal/client/dev/tracing.js';\nimport { DEV } from 'esm-env';\nimport { queue_micro_task } from '../internal/client/dom/task.js';\n\n/**\n * Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.\n * It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.\n *\n * If `subscribe` is called inside an effect (including indirectly, for example inside a getter),\n * the `start` callback will be called with an `update` function. Whenever `update` is called, the effect re-runs.\n *\n * If `start` returns a cleanup function, it will be called when the effect is destroyed.\n *\n * If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects\n * are active, and the returned teardown function will only be called when all effects are destroyed.\n *\n * It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):\n *\n * ```js\n * import { createSubscriber } from 'svelte/reactivity';\n * import { on } from 'svelte/events';\n *\n * export class MediaQuery {\n * \t#query;\n * \t#subscribe;\n *\n * \tconstructor(query) {\n * \t\tthis.#query = window.matchMedia(`(${query})`);\n *\n * \t\tthis.#subscribe = createSubscriber((update) => {\n * \t\t\t// when the `change` event occurs, re-run any effects that read `this.current`\n * \t\t\tconst off = on(this.#query, 'change', update);\n *\n * \t\t\t// stop listening when all the effects are destroyed\n * \t\t\treturn () => off();\n * \t\t});\n * \t}\n *\n * \tget current() {\n * \t\t// This makes the getter reactive, if read in an effect\n * \t\tthis.#subscribe();\n *\n * \t\t// Return the current state of the query, whether or not we're in an effect\n * \t\treturn this.#query.matches;\n * \t}\n * }\n * ```\n * @param {(update: () => void) => (() => void) | void} start\n * @since 5.7.0\n */\nexport function createSubscriber(start) {\n\tlet subscribers = 0;\n\tlet version = source(0);\n\t/** @type {(() => void) | void} */\n\tlet stop;\n\n\tif (DEV) {\n\t\ttag(version, 'createSubscriber version');\n\t}\n\n\treturn () => {\n\t\tif (effect_tracking()) {\n\t\t\tget(version);\n\n\t\t\trender_effect(() => {\n\t\t\t\tif (subscribers === 0) {\n\t\t\t\t\tstop = untrack(() => start(() => increment(version)));\n\t\t\t\t}\n\n\t\t\t\tsubscribers += 1;\n\n\t\t\t\treturn () => {\n\t\t\t\t\tqueue_micro_task(() => {\n\t\t\t\t\t\t// Only count down after a microtask, else we would reach 0 before our own render effect reruns,\n\t\t\t\t\t\t// but reach 1 again when the tick callback of the prior teardown runs. That would mean we\n\t\t\t\t\t\t// re-subcribe unnecessarily and create a memory leak because the old subscription is never cleaned up.\n\t\t\t\t\t\tsubscribers -= 1;\n\n\t\t\t\t\t\tif (subscribers === 0) {\n\t\t\t\t\t\t\tstop?.();\n\t\t\t\t\t\t\tstop = undefined;\n\t\t\t\t\t\t\t// Increment the version to ensure any dependent deriveds are marked dirty when the subscription is picked up again later.\n\t\t\t\t\t\t\t// If we didn't do this then the comparison of write versions would determine that the derived has a later version than\n\t\t\t\t\t\t\t// the subscriber, and it would not be re-run.\n\t\t\t\t\t\t\tincrement(version);\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}\n\t};\n}\n", "/** @import { Derived, Signal } from '#client' */\nimport { CLEAN, CONNECTED, DIRTY, MAYBE_DIRTY } from '#client/constants';\n\nconst STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);\n\n/**\n * @param {Signal} signal\n * @param {number} status\n */\nexport function set_signal_status(signal, status) {\n\tsignal.f = (signal.f & STATUS_MASK) | status;\n}\n\n/**\n * Set a derived's status to CLEAN or MAYBE_DIRTY based on its connection state.\n * @param {Derived} derived\n */\nexport function update_derived_status(derived) {\n\t// Only mark as MAYBE_DIRTY if disconnected and has dependencies.\n\tif ((derived.f & CONNECTED) !== 0 || derived.deps === null) {\n\t\tset_signal_status(derived, CLEAN);\n\t} else {\n\t\tset_signal_status(derived, MAYBE_DIRTY);\n\t}\n}\n", "/** @import { Derived, Effect, Value } from '#client' */\nimport { CLEAN, DERIVED, DIRTY, MAYBE_DIRTY, WAS_MARKED } from '#client/constants';\nimport { set_signal_status } from './status.js';\n\n/**\n * @param {Value[] | null} deps\n */\nfunction clear_marked(deps) {\n\tif (deps === null) return;\n\n\tfor (const dep of deps) {\n\t\tif ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdep.f ^= WAS_MARKED;\n\n\t\tclear_marked(/** @type {Derived} */ (dep).deps);\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @param {Set<Effect>} dirty_effects\n * @param {Set<Effect>} maybe_dirty_effects\n */\nexport function defer_effect(effect, dirty_effects, maybe_dirty_effects) {\n\tif ((effect.f & DIRTY) !== 0) {\n\t\tdirty_effects.add(effect);\n\t} else if ((effect.f & MAYBE_DIRTY) !== 0) {\n\t\tmaybe_dirty_effects.add(effect);\n\t}\n\n\t// Since we're not executing these effects now, we need to clear any WAS_MARKED flags\n\t// so that other batches can correctly reach these effects during their own traversal\n\tclear_marked(effect.deps);\n\n\t// mark as clean so they get scheduled if they depend on pending async state\n\tset_signal_status(effect, CLEAN);\n}\n", "/** @import { Effect, Source, TemplateNode, } from '#client' */\nimport {\n\tBOUNDARY_EFFECT,\n\tDIRTY,\n\tEFFECT_PRESERVED,\n\tEFFECT_TRANSPARENT,\n\tMAYBE_DIRTY\n} from '#client/constants';\nimport { HYDRATION_START_ELSE, HYDRATION_START_FAILED } from '../../../../constants.js';\nimport { component_context, set_component_context } from '../../context.js';\nimport { handle_error, invoke_error_boundary } from '../../error-handling.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\tmove_effect,\n\tpause_effect\n} from '../../reactivity/effects.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tget,\n\tset_active_effect,\n\tset_active_reaction\n} from '../../runtime.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tnext,\n\tskip_nodes,\n\tset_hydrate_node\n} from '../hydration.js';\nimport { queue_micro_task } from '../task.js';\nimport * as e from '../../errors.js';\nimport * as w from '../../warnings.js';\nimport { DEV } from 'esm-env';\nimport { Batch, current_batch, schedule_effect } from '../../reactivity/batch.js';\nimport { internal_set, source } from '../../reactivity/sources.js';\nimport { tag } from '../../dev/tracing.js';\nimport { createSubscriber } from '../../../../reactivity/create-subscriber.js';\nimport { create_text } from '../operations.js';\nimport { defer_effect } from '../../reactivity/utils.js';\nimport { set_signal_status } from '../../reactivity/status.js';\n\n/**\n * @typedef {{\n * \t onerror?: (error: unknown, reset: () => void) => void;\n * failed?: (anchor: Node, error: () => unknown, reset: () => () => void) => void;\n * pending?: (anchor: Node) => void;\n * }} BoundaryProps\n */\n\nvar flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;\n\n/**\n * @param {TemplateNode} node\n * @param {BoundaryProps} props\n * @param {((anchor: Node) => void)} children\n * @param {((error: unknown) => unknown) | undefined} [transform_error]\n * @returns {void}\n */\nexport function boundary(node, props, children, transform_error) {\n\tnew Boundary(node, props, children, transform_error);\n}\n\nexport class Boundary {\n\t/** @type {Boundary | null} */\n\tparent;\n\n\tis_pending = false;\n\n\t/**\n\t * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.\n\t * Inherited from parent boundary, or defaults to identity.\n\t * @type {(error: unknown) => unknown}\n\t */\n\ttransform_error;\n\n\t/** @type {TemplateNode} */\n\t#anchor;\n\n\t/** @type {TemplateNode | null} */\n\t#hydrate_open = hydrating ? hydrate_node : null;\n\n\t/** @type {BoundaryProps} */\n\t#props;\n\n\t/** @type {((anchor: Node) => void)} */\n\t#children;\n\n\t/** @type {Effect} */\n\t#effect;\n\n\t/** @type {Effect | null} */\n\t#main_effect = null;\n\n\t/** @type {Effect | null} */\n\t#pending_effect = null;\n\n\t/** @type {Effect | null} */\n\t#failed_effect = null;\n\n\t/** @type {DocumentFragment | null} */\n\t#offscreen_fragment = null;\n\n\t#local_pending_count = 0;\n\t#pending_count = 0;\n\t#pending_count_update_queued = false;\n\n\t/** @type {Set<Effect>} */\n\t#dirty_effects = new Set();\n\n\t/** @type {Set<Effect>} */\n\t#maybe_dirty_effects = new Set();\n\n\t/**\n\t * A source containing the number of pending async deriveds/expressions.\n\t * Only created if `$effect.pending()` is used inside the boundary,\n\t * otherwise updating the source results in needless `Batch.ensure()`\n\t * calls followed by no-op flushes\n\t * @type {Source<number> | null}\n\t */\n\t#effect_pending = null;\n\n\t#effect_pending_subscriber = createSubscriber(() => {\n\t\tthis.#effect_pending = source(this.#local_pending_count);\n\n\t\tif (DEV) {\n\t\t\ttag(this.#effect_pending, '$effect.pending()');\n\t\t}\n\n\t\treturn () => {\n\t\t\tthis.#effect_pending = null;\n\t\t};\n\t});\n\n\t/**\n\t * @param {TemplateNode} node\n\t * @param {BoundaryProps} props\n\t * @param {((anchor: Node) => void)} children\n\t * @param {((error: unknown) => unknown) | undefined} [transform_error]\n\t */\n\tconstructor(node, props, children, transform_error) {\n\t\tthis.#anchor = node;\n\t\tthis.#props = props;\n\n\t\tthis.#children = (anchor) => {\n\t\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\t\teffect.b = this;\n\t\t\teffect.f |= BOUNDARY_EFFECT;\n\n\t\t\tchildren(anchor);\n\t\t};\n\n\t\tthis.parent = /** @type {Effect} */ (active_effect).b;\n\n\t\t// Inherit transform_error from parent boundary, or use the provided one, or default to identity\n\t\tthis.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);\n\n\t\tthis.#effect = block(() => {\n\t\t\tif (hydrating) {\n\t\t\t\tconst comment = /** @type {Comment} */ (this.#hydrate_open);\n\t\t\t\thydrate_next();\n\n\t\t\t\tconst server_rendered_pending = comment.data === HYDRATION_START_ELSE;\n\t\t\t\tconst server_rendered_failed = comment.data.startsWith(HYDRATION_START_FAILED);\n\n\t\t\t\tif (server_rendered_failed) {\n\t\t\t\t\t// Server rendered the failed snippet - hydrate it.\n\t\t\t\t\t// The serialized error is embedded in the comment: <!--[?<json>-->\n\t\t\t\t\tconst serialized_error = JSON.parse(comment.data.slice(HYDRATION_START_FAILED.length));\n\t\t\t\t\tthis.#hydrate_failed_content(serialized_error);\n\t\t\t\t} else if (server_rendered_pending) {\n\t\t\t\t\tthis.#hydrate_pending_content();\n\t\t\t\t} else {\n\t\t\t\t\tthis.#hydrate_resolved_content();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.#render();\n\t\t\t}\n\t\t}, flags);\n\n\t\tif (hydrating) {\n\t\t\tthis.#anchor = hydrate_node;\n\t\t}\n\t}\n\n\t#hydrate_resolved_content() {\n\t\ttry {\n\t\t\tthis.#main_effect = branch(() => this.#children(this.#anchor));\n\t\t} catch (error) {\n\t\t\tthis.error(error);\n\t\t}\n\t}\n\n\t/**\n\t * @param {unknown} error The deserialized error from the server's hydration comment\n\t */\n\t#hydrate_failed_content(error) {\n\t\tconst failed = this.#props.failed;\n\t\tif (!failed) return;\n\n\t\tthis.#failed_effect = branch(() => {\n\t\t\tfailed(\n\t\t\t\tthis.#anchor,\n\t\t\t\t() => error,\n\t\t\t\t() => () => {}\n\t\t\t);\n\t\t});\n\t}\n\n\t#hydrate_pending_content() {\n\t\tconst pending = this.#props.pending;\n\t\tif (!pending) return;\n\n\t\tthis.is_pending = true;\n\t\tthis.#pending_effect = branch(() => pending(this.#anchor));\n\n\t\tqueue_micro_task(() => {\n\t\t\tvar fragment = (this.#offscreen_fragment = document.createDocumentFragment());\n\t\t\tvar anchor = create_text();\n\n\t\t\tfragment.append(anchor);\n\n\t\t\tthis.#main_effect = this.#run(() => {\n\t\t\t\treturn branch(() => this.#children(anchor));\n\t\t\t});\n\n\t\t\tif (this.#pending_count === 0) {\n\t\t\t\tthis.#anchor.before(fragment);\n\t\t\t\tthis.#offscreen_fragment = null;\n\n\t\t\t\tpause_effect(/** @type {Effect} */ (this.#pending_effect), () => {\n\t\t\t\t\tthis.#pending_effect = null;\n\t\t\t\t});\n\n\t\t\t\tthis.#resolve(/** @type {Batch} */ (current_batch));\n\t\t\t}\n\t\t});\n\t}\n\n\t#render() {\n\t\ttry {\n\t\t\tthis.is_pending = this.has_pending_snippet();\n\t\t\tthis.#pending_count = 0;\n\t\t\tthis.#local_pending_count = 0;\n\n\t\t\tthis.#main_effect = branch(() => {\n\t\t\t\tthis.#children(this.#anchor);\n\t\t\t});\n\n\t\t\tif (this.#pending_count > 0) {\n\t\t\t\tvar fragment = (this.#offscreen_fragment = document.createDocumentFragment());\n\t\t\t\tmove_effect(this.#main_effect, fragment);\n\n\t\t\t\tconst pending = /** @type {(anchor: Node) => void} */ (this.#props.pending);\n\t\t\t\tthis.#pending_effect = branch(() => pending(this.#anchor));\n\t\t\t} else {\n\t\t\t\tthis.#resolve(/** @type {Batch} */ (current_batch));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.error(error);\n\t\t}\n\t}\n\n\t/**\n\t * @param {Batch} batch\n\t */\n\t#resolve(batch) {\n\t\tthis.is_pending = false;\n\n\t\t// any effects that were previously deferred should be transferred\n\t\t// to the batch, which will flush in the next microtask\n\t\tbatch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);\n\t}\n\n\t/**\n\t * Defer an effect inside a pending boundary until the boundary resolves\n\t * @param {Effect} effect\n\t */\n\tdefer_effect(effect) {\n\t\tdefer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);\n\t}\n\n\t/**\n\t * Returns `false` if the effect exists inside a boundary whose pending snippet is shown\n\t * @returns {boolean}\n\t */\n\tis_rendered() {\n\t\treturn !this.is_pending && (!this.parent || this.parent.is_rendered());\n\t}\n\n\thas_pending_snippet() {\n\t\treturn !!this.#props.pending;\n\t}\n\n\t/**\n\t * @template T\n\t * @param {() => T} fn\n\t */\n\t#run(fn) {\n\t\tvar previous_effect = active_effect;\n\t\tvar previous_reaction = active_reaction;\n\t\tvar previous_ctx = component_context;\n\n\t\tset_active_effect(this.#effect);\n\t\tset_active_reaction(this.#effect);\n\t\tset_component_context(this.#effect.ctx);\n\n\t\ttry {\n\t\t\tBatch.ensure();\n\t\t\treturn fn();\n\t\t} catch (e) {\n\t\t\thandle_error(e);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tset_active_effect(previous_effect);\n\t\t\tset_active_reaction(previous_reaction);\n\t\t\tset_component_context(previous_ctx);\n\t\t}\n\t}\n\n\t/**\n\t * Updates the pending count associated with the currently visible pending snippet,\n\t * if any, such that we can replace the snippet with content once work is done\n\t * @param {1 | -1} d\n\t * @param {Batch} batch\n\t */\n\t#update_pending_count(d, batch) {\n\t\tif (!this.has_pending_snippet()) {\n\t\t\tif (this.parent) {\n\t\t\t\tthis.parent.#update_pending_count(d, batch);\n\t\t\t}\n\n\t\t\t// if there's no parent, we're in a scope with no pending snippet\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#pending_count += d;\n\n\t\tif (this.#pending_count === 0) {\n\t\t\tthis.#resolve(batch);\n\n\t\t\tif (this.#pending_effect) {\n\t\t\t\tpause_effect(this.#pending_effect, () => {\n\t\t\t\t\tthis.#pending_effect = null;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.#offscreen_fragment) {\n\t\t\t\tthis.#anchor.before(this.#offscreen_fragment);\n\t\t\t\tthis.#offscreen_fragment = null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Update the source that powers `$effect.pending()` inside this boundary,\n\t * and controls when the current `pending` snippet (if any) is removed.\n\t * Do not call from inside the class\n\t * @param {1 | -1} d\n\t * @param {Batch} batch\n\t */\n\tupdate_pending_count(d, batch) {\n\t\tthis.#update_pending_count(d, batch);\n\n\t\tthis.#local_pending_count += d;\n\n\t\tif (!this.#effect_pending || this.#pending_count_update_queued) return;\n\t\tthis.#pending_count_update_queued = true;\n\n\t\tqueue_micro_task(() => {\n\t\t\tthis.#pending_count_update_queued = false;\n\t\t\tif (this.#effect_pending) {\n\t\t\t\tinternal_set(this.#effect_pending, this.#local_pending_count);\n\t\t\t}\n\t\t});\n\t}\n\n\tget_effect_pending() {\n\t\tthis.#effect_pending_subscriber();\n\t\treturn get(/** @type {Source<number>} */ (this.#effect_pending));\n\t}\n\n\t/** @param {unknown} error */\n\terror(error) {\n\t\tvar onerror = this.#props.onerror;\n\t\tlet failed = this.#props.failed;\n\n\t\t// If we have nothing to capture the error, or if we hit an error while\n\t\t// rendering the fallback, re-throw for another boundary to handle\n\t\tif (!onerror && !failed) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (this.#main_effect) {\n\t\t\tdestroy_effect(this.#main_effect);\n\t\t\tthis.#main_effect = null;\n\t\t}\n\n\t\tif (this.#pending_effect) {\n\t\t\tdestroy_effect(this.#pending_effect);\n\t\t\tthis.#pending_effect = null;\n\t\t}\n\n\t\tif (this.#failed_effect) {\n\t\t\tdestroy_effect(this.#failed_effect);\n\t\t\tthis.#failed_effect = null;\n\t\t}\n\n\t\tif (hydrating) {\n\t\t\tset_hydrate_node(/** @type {TemplateNode} */ (this.#hydrate_open));\n\t\t\tnext();\n\t\t\tset_hydrate_node(skip_nodes());\n\t\t}\n\n\t\tvar did_reset = false;\n\t\tvar calling_on_error = false;\n\n\t\tconst reset = () => {\n\t\t\tif (did_reset) {\n\t\t\t\tw.svelte_boundary_reset_noop();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdid_reset = true;\n\n\t\t\tif (calling_on_error) {\n\t\t\t\te.svelte_boundary_reset_onerror();\n\t\t\t}\n\n\t\t\tif (this.#failed_effect !== null) {\n\t\t\t\tpause_effect(this.#failed_effect, () => {\n\t\t\t\t\tthis.#failed_effect = null;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.#run(() => {\n\t\t\t\tthis.#render();\n\t\t\t});\n\t\t};\n\n\t\t/** @param {unknown} transformed_error */\n\t\tconst handle_error_result = (transformed_error) => {\n\t\t\ttry {\n\t\t\t\tcalling_on_error = true;\n\t\t\t\tonerror?.(transformed_error, reset);\n\t\t\t\tcalling_on_error = false;\n\t\t\t} catch (error) {\n\t\t\t\tinvoke_error_boundary(error, this.#effect && this.#effect.parent);\n\t\t\t}\n\n\t\t\tif (failed) {\n\t\t\t\tthis.#failed_effect = this.#run(() => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn branch(() => {\n\t\t\t\t\t\t\t// errors in `failed` snippets cause the boundary to error again\n\t\t\t\t\t\t\t// TODO Svelte 6: revisit this decision, most likely better to go to parent boundary instead\n\t\t\t\t\t\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\t\t\t\t\t\teffect.b = this;\n\t\t\t\t\t\t\teffect.f |= BOUNDARY_EFFECT;\n\n\t\t\t\t\t\t\tfailed(\n\t\t\t\t\t\t\t\tthis.#anchor,\n\t\t\t\t\t\t\t\t() => transformed_error,\n\t\t\t\t\t\t\t\t() => reset\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tinvoke_error_boundary(error, /** @type {Effect} */ (this.#effect.parent));\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tqueue_micro_task(() => {\n\t\t\t// Run the error through the API-level transformError transform (e.g. SvelteKit's handleError)\n\t\t\t/** @type {unknown} */\n\t\t\tvar result;\n\t\t\ttry {\n\t\t\t\tresult = this.transform_error(error);\n\t\t\t} catch (e) {\n\t\t\t\tinvoke_error_boundary(e, this.#effect && this.#effect.parent);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tresult !== null &&\n\t\t\t\ttypeof result === 'object' &&\n\t\t\t\ttypeof (/** @type {any} */ (result).then) === 'function'\n\t\t\t) {\n\t\t\t\t// transformError returned a Promise — wait for it\n\t\t\t\t/** @type {any} */ (result).then(\n\t\t\t\t\thandle_error_result,\n\t\t\t\t\t/** @param {unknown} e */\n\t\t\t\t\t(e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Synchronous result — handle immediately\n\t\t\t\thandle_error_result(result);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport function pending() {\n\tif (active_effect === null) {\n\t\te.effect_pending_outside_reaction();\n\t}\n\n\tvar boundary = active_effect.b;\n\n\tif (boundary === null) {\n\t\treturn 0; // TODO eventually we will need this to be global\n\t}\n\n\treturn boundary.get_effect_pending();\n}\n", "/** @import { Blocker, Effect, Value } from '#client' */\nimport { DESTROYED, STALE_REACTION } from '#client/constants';\nimport { DEV } from 'esm-env';\nimport {\n\tcomponent_context,\n\tdev_stack,\n\tis_runes,\n\tset_component_context,\n\tset_dev_stack\n} from '../context.js';\nimport { Boundary } from '../dom/blocks/boundary.js';\nimport { invoke_error_boundary } from '../error-handling.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tset_active_effect,\n\tset_active_reaction\n} from '../runtime.js';\nimport { Batch, current_batch } from './batch.js';\nimport {\n\tasync_derived,\n\treactivity_loss_tracker,\n\tderived,\n\tderived_safe_equal,\n\tset_reactivity_loss_tracker\n} from './deriveds.js';\nimport { aborted } from './effects.js';\n\n/**\n * @param {Blocker[]} blockers\n * @param {Array<() => any>} sync\n * @param {Array<() => Promise<any>>} async\n * @param {(values: Value[]) => any} fn\n */\nexport function flatten(blockers, sync, async, fn) {\n\tconst d = is_runes() ? derived : derived_safe_equal;\n\n\t// Filter out already-settled blockers - no need to wait for them\n\tvar pending = blockers.filter((b) => !b.settled);\n\n\tif (async.length === 0 && pending.length === 0) {\n\t\tfn(sync.map(d));\n\t\treturn;\n\t}\n\n\tvar parent = /** @type {Effect} */ (active_effect);\n\n\tvar restore = capture();\n\tvar blocker_promise =\n\t\tpending.length === 1\n\t\t\t? pending[0].promise\n\t\t\t: pending.length > 1\n\t\t\t\t? Promise.all(pending.map((b) => b.promise))\n\t\t\t\t: null;\n\n\t/** @param {Value[]} values */\n\tfunction finish(values) {\n\t\trestore();\n\n\t\ttry {\n\t\t\tfn(values);\n\t\t} catch (error) {\n\t\t\tif ((parent.f & DESTROYED) === 0) {\n\t\t\t\tinvoke_error_boundary(error, parent);\n\t\t\t}\n\t\t}\n\n\t\tunset_context();\n\t}\n\n\t// Fast path: blockers but no async expressions\n\tif (async.length === 0) {\n\t\t/** @type {Promise<any>} */ (blocker_promise).then(() => finish(sync.map(d)));\n\t\treturn;\n\t}\n\n\tvar decrement_pending = increment_pending();\n\n\t// Full path: has async expressions\n\tfunction run() {\n\t\tPromise.all(async.map((expression) => async_derived(expression)))\n\t\t\t.then((result) => finish([...sync.map(d), ...result]))\n\t\t\t.catch((error) => invoke_error_boundary(error, parent))\n\t\t\t.finally(() => decrement_pending());\n\t}\n\n\tif (blocker_promise) {\n\t\tblocker_promise.then(() => {\n\t\t\trestore();\n\t\t\trun();\n\t\t\tunset_context();\n\t\t});\n\t} else {\n\t\trun();\n\t}\n}\n\n/**\n * @param {Blocker[]} blockers\n * @param {(values: Value[]) => any} fn\n */\nexport function run_after_blockers(blockers, fn) {\n\tflatten(blockers, [], [], fn);\n}\n\n/**\n * Captures the current effect context so that we can restore it after\n * some asynchronous work has happened (so that e.g. `await a + b`\n * causes `b` to be registered as a dependency).\n */\nexport function capture() {\n\tvar previous_effect = /** @type {Effect} */ (active_effect);\n\tvar previous_reaction = active_reaction;\n\tvar previous_component_context = component_context;\n\tvar previous_batch = /** @type {Batch} */ (current_batch);\n\n\tif (DEV) {\n\t\tvar previous_dev_stack = dev_stack;\n\t}\n\n\treturn function restore(activate_batch = true) {\n\t\tset_active_effect(previous_effect);\n\t\tset_active_reaction(previous_reaction);\n\t\tset_component_context(previous_component_context);\n\n\t\tif (activate_batch && (previous_effect.f & DESTROYED) === 0) {\n\t\t\t// TODO we only need optional chaining here because `{#await ...}` blocks\n\t\t\t// are anomalous. Once we retire them we can get rid of it\n\t\t\tprevious_batch?.activate();\n\t\t\tprevious_batch?.apply();\n\t\t}\n\n\t\tif (DEV) {\n\t\t\tset_reactivity_loss_tracker(null);\n\t\t\tset_dev_stack(previous_dev_stack);\n\t\t}\n\t};\n}\n\n/**\n * Wraps an `await` expression in such a way that the effect context that was\n * active before the expression evaluated can be reapplied afterwards —\n * `await a + b` becomes `(await $.save(a))() + b`\n * @template T\n * @param {Promise<T>} promise\n * @returns {Promise<() => T>}\n */\nexport async function save(promise) {\n\tvar restore = capture();\n\tvar value = await promise;\n\n\treturn () => {\n\t\trestore();\n\t\treturn value;\n\t};\n}\n\n/**\n * Reset `current_async_effect` after the `promise` resolves, so\n * that we can emit `await_reactivity_loss` warnings\n * @template T\n * @param {Promise<T>} promise\n * @returns {Promise<() => T>}\n */\nexport async function track_reactivity_loss(promise) {\n\tvar previous_async_effect = reactivity_loss_tracker;\n\tvar value = await promise;\n\n\treturn () => {\n\t\tset_reactivity_loss_tracker(previous_async_effect);\n\t\treturn value;\n\t};\n}\n\n/**\n * Used in `for await` loops in DEV, so\n * that we can emit `await_reactivity_loss` warnings\n * after each `async_iterator` result resolves and\n * after the `async_iterator` return resolves (if it runs)\n * @template T\n * @template TReturn\n * @param {Iterable<T> | AsyncIterable<T>} iterable\n * @returns {AsyncGenerator<T, TReturn | undefined>}\n */\nexport async function* for_await_track_reactivity_loss(iterable) {\n\t// This is based on the algorithms described in ECMA-262:\n\t// ForIn/OfBodyEvaluation\n\t// https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset\n\t// AsyncIteratorClose\n\t// https://tc39.es/ecma262/multipage/abstract-operations.html#sec-asynciteratorclose\n\n\t/** @type {AsyncIterator<T, TReturn>} */\n\t// @ts-ignore\n\tconst iterator = iterable[Symbol.asyncIterator]?.() ?? iterable[Symbol.iterator]?.();\n\n\tif (iterator === undefined) {\n\t\tthrow new TypeError('value is not async iterable');\n\t}\n\n\t/** Whether the completion of the iterator was \"normal\", meaning it wasn't ended via `break` or a similar method */\n\tlet normal_completion = false;\n\ttry {\n\t\twhile (true) {\n\t\t\tconst { done, value } = (await track_reactivity_loss(iterator.next()))();\n\t\t\tif (done) {\n\t\t\t\tnormal_completion = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tyield value;\n\t\t}\n\t} finally {\n\t\t// If the iterator had an abrupt completion and `return` is defined on the iterator, call it and return the value\n\t\tif (!normal_completion && iterator.return !== undefined) {\n\t\t\t// eslint-disable-next-line no-unsafe-finally\n\t\t\treturn /** @type {TReturn} */ ((await track_reactivity_loss(iterator.return()))().value);\n\t\t}\n\t}\n}\n\nexport function unset_context(deactivate_batch = true) {\n\tset_active_effect(null);\n\tset_active_reaction(null);\n\tset_component_context(null);\n\tif (deactivate_batch) current_batch?.deactivate();\n\n\tif (DEV) {\n\t\tset_reactivity_loss_tracker(null);\n\t\tset_dev_stack(null);\n\t}\n}\n\n/**\n * @param {Array<() => void | Promise<void>>} thunks\n */\nexport function run(thunks) {\n\tconst restore = capture();\n\n\tconst decrement_pending = increment_pending();\n\n\tvar active = /** @type {Effect} */ (active_effect);\n\n\t/** @type {null | { error: any }} */\n\tvar errored = null;\n\n\t/** @param {any} error */\n\tconst handle_error = (error) => {\n\t\terrored = { error }; // wrap in object in case a promise rejects with a falsy value\n\n\t\tif (!aborted(active)) {\n\t\t\tinvoke_error_boundary(error, active);\n\t\t}\n\t};\n\n\tvar promise = Promise.resolve(thunks[0]()).catch(handle_error);\n\n\t/** @type {Blocker} */\n\tvar blocker = { promise, settled: false };\n\tvar blockers = [blocker];\n\n\tpromise.finally(() => {\n\t\tblocker.settled = true;\n\t\tunset_context();\n\t});\n\n\tfor (const fn of thunks.slice(1)) {\n\t\tpromise = promise\n\t\t\t.then(() => {\n\t\t\t\tif (errored) {\n\t\t\t\t\tthrow errored.error;\n\t\t\t\t}\n\n\t\t\t\tif (aborted(active)) {\n\t\t\t\t\tthrow STALE_REACTION;\n\t\t\t\t}\n\n\t\t\t\trestore();\n\t\t\t\treturn fn();\n\t\t\t})\n\t\t\t.catch(handle_error);\n\n\t\tconst blocker = { promise, settled: false };\n\t\tblockers.push(blocker);\n\n\t\tpromise.finally(() => {\n\t\t\tblocker.settled = true;\n\t\t\tunset_context();\n\t\t});\n\t}\n\n\tpromise\n\t\t// wait one more tick, so that template effects are\n\t\t// guaranteed to run before `$effect(...)`\n\t\t.then(() => Promise.resolve())\n\t\t.finally(() => decrement_pending());\n\n\treturn blockers;\n}\n\n/**\n * @param {Blocker[]} blockers\n */\nexport function wait(blockers) {\n\treturn Promise.all(blockers.map((b) => b.promise));\n}\n\n/**\n * @returns {(skip?: boolean) => void}\n */\nexport function increment_pending() {\n\tvar effect = /** @type {Effect} */ (active_effect);\n\tvar boundary = /** @type {Boundary} */ (effect.b);\n\tvar batch = /** @type {Batch} */ (current_batch);\n\tvar blocking = boundary.is_rendered();\n\n\tboundary.update_pending_count(1, batch);\n\tbatch.increment(blocking, effect);\n\n\treturn (skip = false) => {\n\t\tboundary.update_pending_count(-1, batch);\n\t\tbatch.decrement(blocking, effect, skip);\n\t};\n}\n", "/** @import { Derived, Effect, Source } from '#client' */\n/** @import { Batch } from './batch.js'; */\n/** @import { Boundary } from '../dom/blocks/boundary.js'; */\nimport { DEV } from 'esm-env';\nimport {\n\tERROR_VALUE,\n\tDERIVED,\n\tDIRTY,\n\tEFFECT_PRESERVED,\n\tSTALE_REACTION,\n\tASYNC,\n\tWAS_MARKED,\n\tDESTROYED,\n\tCLEAN,\n\tREACTION_RAN\n} from '#client/constants';\nimport {\n\tactive_reaction,\n\tactive_effect,\n\tupdate_reaction,\n\tincrement_write_version,\n\tset_active_effect,\n\tpush_reaction_value,\n\tis_destroying_effect,\n\tupdate_effect,\n\tremove_reactions\n} from '../runtime.js';\nimport { equals, safe_equals } from './equality.js';\nimport * as e from '../errors.js';\nimport * as w from '../warnings.js';\nimport {\n\tasync_effect,\n\tdestroy_effect,\n\tdestroy_effect_children,\n\teffect_tracking,\n\tteardown\n} from './effects.js';\nimport { eager_effects, internal_set, set_eager_effects, source } from './sources.js';\nimport { get_error } from '../../shared/dev.js';\nimport { async_mode_flag, tracing_mode_flag } from '../../flags/index.js';\nimport { component_context } from '../context.js';\nimport { UNINITIALIZED } from '../../../constants.js';\nimport { batch_values, current_batch } from './batch.js';\nimport { increment_pending, unset_context } from './async.js';\nimport { deferred, includes, noop } from '../../shared/utils.js';\nimport { set_signal_status, update_derived_status } from './status.js';\n\n/**\n * This allows us to track 'reactivity loss' that occurs when signals\n * are read after a non-context-restoring `await`. Dev-only\n * @type {{ effect: Effect, warned: boolean } | null}\n */\nexport let reactivity_loss_tracker = null;\n\n/** @param {{ effect: Effect, warned: boolean } | null} v */\nexport function set_reactivity_loss_tracker(v) {\n\treactivity_loss_tracker = v;\n}\n\nexport const recent_async_deriveds = new Set();\n\n/**\n * @template V\n * @param {() => V} fn\n * @returns {Derived<V>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function derived(fn) {\n\tvar flags = DERIVED | DIRTY;\n\tvar parent_derived =\n\t\tactive_reaction !== null && (active_reaction.f & DERIVED) !== 0\n\t\t\t? /** @type {Derived} */ (active_reaction)\n\t\t\t: null;\n\n\tif (active_effect !== null) {\n\t\t// Since deriveds are evaluated lazily, any effects created inside them are\n\t\t// created too late to ensure that the parent effect is added to the tree\n\t\tactive_effect.f |= EFFECT_PRESERVED;\n\t}\n\n\t/** @type {Derived<V>} */\n\tconst signal = {\n\t\tctx: component_context,\n\t\tdeps: null,\n\t\teffects: null,\n\t\tequals,\n\t\tf: flags,\n\t\tfn,\n\t\treactions: null,\n\t\trv: 0,\n\t\tv: /** @type {V} */ (UNINITIALIZED),\n\t\twv: 0,\n\t\tparent: parent_derived ?? active_effect,\n\t\tac: null\n\t};\n\n\tif (DEV && tracing_mode_flag) {\n\t\tsignal.created = get_error('created at');\n\t}\n\n\treturn signal;\n}\n\n/**\n * @template V\n * @param {() => V | Promise<V>} fn\n * @param {string} [label]\n * @param {string} [location] If provided, print a warning if the value is not read immediately after update\n * @returns {Promise<Source<V>>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function async_derived(fn, label, location) {\n\tlet parent = /** @type {Effect | null} */ (active_effect);\n\n\tif (parent === null) {\n\t\te.async_derived_orphan();\n\t}\n\n\tvar promise = /** @type {Promise<V>} */ (/** @type {unknown} */ (undefined));\n\tvar signal = source(/** @type {V} */ (UNINITIALIZED));\n\n\tif (DEV) signal.label = label;\n\n\t// only suspend in async deriveds created on initialisation\n\tvar should_suspend = !active_reaction;\n\n\t/** @type {Map<Batch, ReturnType<typeof deferred<V>>>} */\n\tvar deferreds = new Map();\n\n\tasync_effect(() => {\n\t\tif (DEV) {\n\t\t\treactivity_loss_tracker = {\n\t\t\t\teffect: /** @type {Effect} */ (active_effect),\n\t\t\t\twarned: false\n\t\t\t};\n\t\t}\n\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\t/** @type {ReturnType<typeof deferred<V>>} */\n\t\tvar d = deferred();\n\t\tpromise = d.promise;\n\n\t\ttry {\n\t\t\t// If this code is changed at some point, make sure to still access the then property\n\t\t\t// of fn() to read any signals it might access, so that we track them as dependencies.\n\t\t\t// We call `unset_context` to undo any `save` calls that happen inside `fn()`\n\t\t\tPromise.resolve(fn()).then(d.resolve, d.reject).finally(unset_context);\n\t\t} catch (error) {\n\t\t\td.reject(error);\n\t\t\tunset_context();\n\t\t}\n\n\t\tif (DEV) {\n\t\t\treactivity_loss_tracker = null;\n\t\t}\n\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\n\t\tif (should_suspend) {\n\t\t\t// we only increment the batch's pending state for updates, not creation, otherwise\n\t\t\t// we will decrement to zero before the work that depends on this promise (e.g. a\n\t\t\t// template effect) has initialized, causing the batch to resolve prematurely\n\t\t\tif ((effect.f & REACTION_RAN) !== 0) {\n\t\t\t\tvar decrement_pending = increment_pending();\n\t\t\t}\n\n\t\t\tif (/** @type {Boundary} */ (parent.b).is_rendered()) {\n\t\t\t\tdeferreds.get(batch)?.reject(STALE_REACTION);\n\t\t\t\tdeferreds.delete(batch); // delete to ensure correct order in Map iteration below\n\t\t\t} else {\n\t\t\t\t// While the boundary is still showing pending, a new run supersedes all older in-flight runs\n\t\t\t\t// for this async expression. Cancel eagerly so resolution cannot commit stale values.\n\t\t\t\tfor (const d of deferreds.values()) {\n\t\t\t\t\td.reject(STALE_REACTION);\n\t\t\t\t}\n\t\t\t\tdeferreds.clear();\n\t\t\t}\n\n\t\t\tdeferreds.set(batch, d);\n\t\t}\n\n\t\t/**\n\t\t * @param {any} value\n\t\t * @param {unknown} error\n\t\t */\n\t\tconst handler = (value, error = undefined) => {\n\t\t\tif (DEV) {\n\t\t\t\treactivity_loss_tracker = null;\n\t\t\t}\n\n\t\t\tif (decrement_pending) {\n\t\t\t\t// don't trigger an update if we're only here because\n\t\t\t\t// the promise was superseded before it could resolve\n\t\t\t\tvar skip = error === STALE_REACTION;\n\t\t\t\tdecrement_pending(skip);\n\t\t\t}\n\n\t\t\tif (error === STALE_REACTION || (effect.f & DESTROYED) !== 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbatch.activate();\n\n\t\t\tif (error) {\n\t\t\t\tsignal.f |= ERROR_VALUE;\n\n\t\t\t\t// @ts-expect-error the error is the wrong type, but we don't care\n\t\t\t\tinternal_set(signal, error);\n\t\t\t} else {\n\t\t\t\tif ((signal.f & ERROR_VALUE) !== 0) {\n\t\t\t\t\tsignal.f ^= ERROR_VALUE;\n\t\t\t\t}\n\n\t\t\t\tinternal_set(signal, value);\n\n\t\t\t\t// All prior async derived runs are now stale\n\t\t\t\tfor (const [b, d] of deferreds) {\n\t\t\t\t\tdeferreds.delete(b);\n\t\t\t\t\tif (b === batch) break;\n\t\t\t\t\td.reject(STALE_REACTION);\n\t\t\t\t}\n\n\t\t\t\tif (DEV && location !== undefined) {\n\t\t\t\t\trecent_async_deriveds.add(signal);\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tif (recent_async_deriveds.has(signal)) {\n\t\t\t\t\t\t\tw.await_waterfall(/** @type {string} */ (signal.label), location);\n\t\t\t\t\t\t\trecent_async_deriveds.delete(signal);\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\tbatch.deactivate();\n\t\t};\n\n\t\td.promise.then(handler, (e) => handler(null, e || 'unknown'));\n\t});\n\n\tteardown(() => {\n\t\tfor (const d of deferreds.values()) {\n\t\t\td.reject(STALE_REACTION);\n\t\t}\n\t});\n\n\tif (DEV) {\n\t\t// add a flag that lets this be printed as a derived\n\t\t// when using `$inspect.trace()`\n\t\tsignal.f |= ASYNC;\n\t}\n\n\treturn new Promise((fulfil) => {\n\t\t/** @param {Promise<V>} p */\n\t\tfunction next(p) {\n\t\t\tfunction go() {\n\t\t\t\tif (p === promise) {\n\t\t\t\t\tfulfil(signal);\n\t\t\t\t} else {\n\t\t\t\t\t// if the effect re-runs before the initial promise\n\t\t\t\t\t// resolves, delay resolution until we have a value\n\t\t\t\t\tnext(promise);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tp.then(go, go);\n\t\t}\n\n\t\tnext(promise);\n\t});\n}\n\n/**\n * @template V\n * @param {() => V} fn\n * @returns {Derived<V>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function user_derived(fn) {\n\tconst d = derived(fn);\n\n\tif (!async_mode_flag) push_reaction_value(d);\n\n\treturn d;\n}\n\n/**\n * @template V\n * @param {() => V} fn\n * @returns {Derived<V>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function derived_safe_equal(fn) {\n\tconst signal = derived(fn);\n\tsignal.equals = safe_equals;\n\treturn signal;\n}\n\n/**\n * @param {Derived} derived\n * @returns {void}\n */\nexport function destroy_derived_effects(derived) {\n\tvar effects = derived.effects;\n\n\tif (effects !== null) {\n\t\tderived.effects = null;\n\n\t\tfor (var i = 0; i < effects.length; i += 1) {\n\t\t\tdestroy_effect(/** @type {Effect} */ (effects[i]));\n\t\t}\n\t}\n}\n\n/**\n * The currently updating deriveds, used to detect infinite recursion\n * in dev mode and provide a nicer error than 'too much recursion'\n * @type {Derived[]}\n */\nlet stack = [];\n\n/**\n * @param {Derived} derived\n * @returns {Effect | null}\n */\nfunction get_derived_parent_effect(derived) {\n\tvar parent = derived.parent;\n\twhile (parent !== null) {\n\t\tif ((parent.f & DERIVED) === 0) {\n\t\t\t// The original parent effect might've been destroyed but the derived\n\t\t\t// is used elsewhere now - do not return the destroyed effect in that case\n\t\t\treturn (parent.f & DESTROYED) === 0 ? /** @type {Effect} */ (parent) : null;\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\treturn null;\n}\n\n/**\n * @template T\n * @param {Derived} derived\n * @returns {T}\n */\nexport function execute_derived(derived) {\n\tvar value;\n\tvar prev_active_effect = active_effect;\n\n\tset_active_effect(get_derived_parent_effect(derived));\n\n\tif (DEV) {\n\t\tlet prev_eager_effects = eager_effects;\n\t\tset_eager_effects(new Set());\n\t\ttry {\n\t\t\tif (includes.call(stack, derived)) {\n\t\t\t\te.derived_references_self();\n\t\t\t}\n\n\t\t\tstack.push(derived);\n\n\t\t\tderived.f &= ~WAS_MARKED;\n\t\t\tdestroy_derived_effects(derived);\n\t\t\tvalue = update_reaction(derived);\n\t\t} finally {\n\t\t\tset_active_effect(prev_active_effect);\n\t\t\tset_eager_effects(prev_eager_effects);\n\t\t\tstack.pop();\n\t\t}\n\t} else {\n\t\ttry {\n\t\t\tderived.f &= ~WAS_MARKED;\n\t\t\tdestroy_derived_effects(derived);\n\t\t\tvalue = update_reaction(derived);\n\t\t} finally {\n\t\t\tset_active_effect(prev_active_effect);\n\t\t}\n\t}\n\n\treturn value;\n}\n\n/**\n * @param {Derived} derived\n * @returns {void}\n */\nexport function update_derived(derived) {\n\tvar old_value = derived.v;\n\tvar value = execute_derived(derived);\n\n\tif (!derived.equals(value)) {\n\t\tderived.wv = increment_write_version();\n\n\t\t// in a fork, we don't update the underlying value, just `batch_values`.\n\t\t// the underlying value will be updated when the fork is committed.\n\t\t// otherwise, the next time we get here after a 'real world' state\n\t\t// change, `derived.equals` may incorrectly return `true`\n\t\tif (!current_batch?.is_fork || derived.deps === null) {\n\t\t\tderived.v = value;\n\t\t\tcurrent_batch?.capture(derived, old_value, true);\n\n\t\t\t// deriveds without dependencies should never be recomputed\n\t\t\tif (derived.deps === null) {\n\t\t\t\tset_signal_status(derived, CLEAN);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// don't mark derived clean if we're reading it inside a\n\t// cleanup function, or it will cache a stale value\n\tif (is_destroying_effect) {\n\t\treturn;\n\t}\n\n\t// During time traveling we don't want to reset the status so that\n\t// traversal of the graph in the other batches still happens\n\tif (batch_values !== null) {\n\t\t// only cache the value if we're in a tracking context, otherwise we won't\n\t\t// clear the cache in `mark_reactions` when dependencies are updated\n\t\tif (effect_tracking() || current_batch?.is_fork) {\n\t\t\tbatch_values.set(derived, value);\n\t\t}\n\t} else {\n\t\tupdate_derived_status(derived);\n\t}\n}\n\n/**\n * @param {Derived} derived\n */\nexport function freeze_derived_effects(derived) {\n\tif (derived.effects === null) return;\n\n\tfor (const e of derived.effects) {\n\t\t// if the effect has a teardown function or abort signal, call it\n\t\tif (e.teardown || e.ac) {\n\t\t\te.teardown?.();\n\t\t\te.ac?.abort(STALE_REACTION);\n\n\t\t\t// make it a noop so it doesn't get called again if the derived\n\t\t\t// is unfrozen. we don't set it to `null`, because the existence\n\t\t\t// of a teardown function is what determines whether the\n\t\t\t// effect runs again during unfreezing\n\t\t\te.teardown = noop;\n\t\t\te.ac = null;\n\n\t\t\tremove_reactions(e, 0);\n\t\t\tdestroy_effect_children(e);\n\t\t}\n\t}\n}\n\n/**\n * @param {Derived} derived\n */\nexport function unfreeze_derived_effects(derived) {\n\tif (derived.effects === null) return;\n\n\tfor (const e of derived.effects) {\n\t\t// if the effect was previously frozen — indicated by the presence\n\t\t// of a teardown function — unfreeze it\n\t\tif (e.teardown) {\n\t\t\tupdate_effect(e);\n\t\t}\n\t}\n}\n", "/** @import { Derived, Effect, Source, Value } from '#client' */\nimport { DEV } from 'esm-env';\nimport {\n\tactive_reaction,\n\tactive_effect,\n\tuntracked_writes,\n\tget,\n\tset_untracked_writes,\n\tuntrack,\n\tincrement_write_version,\n\tupdate_effect,\n\tcurrent_sources,\n\tis_dirty,\n\tuntracking,\n\tis_destroying_effect,\n\tpush_reaction_value\n} from '../runtime.js';\nimport { equals, safe_equals } from './equality.js';\nimport {\n\tCLEAN,\n\tDERIVED,\n\tDIRTY,\n\tBRANCH_EFFECT,\n\tEAGER_EFFECT,\n\tMAYBE_DIRTY,\n\tBLOCK_EFFECT,\n\tROOT_EFFECT,\n\tASYNC,\n\tWAS_MARKED,\n\tCONNECTED\n} from '#client/constants';\nimport * as e from '../errors.js';\nimport { legacy_mode_flag, tracing_mode_flag } from '../../flags/index.js';\nimport { includes } from '../../shared/utils.js';\nimport { tag_proxy } from '../dev/tracing.js';\nimport { get_error } from '../../shared/dev.js';\nimport { component_context, is_runes } from '../context.js';\nimport {\n\tBatch,\n\tbatch_values,\n\teager_block_effects,\n\tschedule_effect,\n\tlegacy_updates\n} from './batch.js';\nimport { proxy } from '../proxy.js';\nimport { execute_derived } from './deriveds.js';\nimport { set_signal_status, update_derived_status } from './status.js';\n\n/** @type {Set<any>} */\nexport let eager_effects = new Set();\n\n/** @type {Map<Source, any>} */\nexport const old_values = new Map();\n\n/**\n * @param {Set<any>} v\n */\nexport function set_eager_effects(v) {\n\teager_effects = v;\n}\n\nlet eager_effects_deferred = false;\n\nexport function set_eager_effects_deferred() {\n\teager_effects_deferred = true;\n}\n\n/**\n * @template V\n * @param {V} v\n * @param {Error | null} [stack]\n * @returns {Source<V>}\n */\n// TODO rename this to `state` throughout the codebase\nexport function source(v, stack) {\n\t/** @type {Value} */\n\tvar signal = {\n\t\tf: 0, // TODO ideally we could skip this altogether, but it causes type errors\n\t\tv,\n\t\treactions: null,\n\t\tequals,\n\t\trv: 0,\n\t\twv: 0\n\t};\n\n\tif (DEV && tracing_mode_flag) {\n\t\tsignal.created = stack ?? get_error('created at');\n\t\tsignal.updated = null;\n\t\tsignal.set_during_effect = false;\n\t\tsignal.trace = null;\n\t}\n\n\treturn signal;\n}\n\n/**\n * @template V\n * @param {V} v\n * @param {Error | null} [stack]\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function state(v, stack) {\n\tconst s = source(v, stack);\n\n\tpush_reaction_value(s);\n\n\treturn s;\n}\n\n/**\n * @template V\n * @param {V} initial_value\n * @param {boolean} [immutable]\n * @returns {Source<V>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function mutable_source(initial_value, immutable = false, trackable = true) {\n\tconst s = source(initial_value);\n\tif (!immutable) {\n\t\ts.equals = safe_equals;\n\t}\n\n\t// bind the signal to the component context, in case we need to\n\t// track updates to trigger beforeUpdate/afterUpdate callbacks\n\tif (legacy_mode_flag && trackable && component_context !== null && component_context.l !== null) {\n\t\t(component_context.l.s ??= []).push(s);\n\t}\n\n\treturn s;\n}\n\n/**\n * @template V\n * @param {Value<V>} source\n * @param {V} value\n */\nexport function mutate(source, value) {\n\tset(\n\t\tsource,\n\t\tuntrack(() => get(source))\n\t);\n\treturn value;\n}\n\n/**\n * @template V\n * @param {Source<V>} source\n * @param {V} value\n * @param {boolean} [should_proxy]\n * @returns {V}\n */\nexport function set(source, value, should_proxy = false) {\n\tif (\n\t\tactive_reaction !== null &&\n\t\t// since we are untracking the function inside `$inspect.with` we need to add this check\n\t\t// to ensure we error if state is set inside an inspect effect\n\t\t(!untracking || (active_reaction.f & EAGER_EFFECT) !== 0) &&\n\t\tis_runes() &&\n\t\t(active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 &&\n\t\t(current_sources === null || !includes.call(current_sources, source))\n\t) {\n\t\te.state_unsafe_mutation();\n\t}\n\n\tlet new_value = should_proxy ? proxy(value) : value;\n\n\tif (DEV) {\n\t\ttag_proxy(new_value, /** @type {string} */ (source.label));\n\t}\n\n\treturn internal_set(source, new_value, legacy_updates);\n}\n\n/**\n * @template V\n * @param {Source<V>} source\n * @param {V} value\n * @param {Effect[] | null} [updated_during_traversal]\n * @returns {V}\n */\nexport function internal_set(source, value, updated_during_traversal = null) {\n\tif (!source.equals(value)) {\n\t\tvar old_value = source.v;\n\n\t\tif (is_destroying_effect) {\n\t\t\told_values.set(source, value);\n\t\t} else {\n\t\t\told_values.set(source, old_value);\n\t\t}\n\n\t\tsource.v = value;\n\n\t\tvar batch = Batch.ensure();\n\t\tbatch.capture(source, old_value);\n\n\t\tif (DEV) {\n\t\t\tif (tracing_mode_flag || active_effect !== null) {\n\t\t\t\tsource.updated ??= new Map();\n\n\t\t\t\t// For performance reasons, when not using $inspect.trace, we only start collecting stack traces\n\t\t\t\t// after the same source has been updated more than 5 times in the same flush cycle.\n\t\t\t\tconst count = (source.updated.get('')?.count ?? 0) + 1;\n\t\t\t\tsource.updated.set('', { error: /** @type {any} */ (null), count });\n\n\t\t\t\tif (tracing_mode_flag || count > 5) {\n\t\t\t\t\tconst error = get_error('updated at');\n\n\t\t\t\t\tif (error !== null) {\n\t\t\t\t\t\tlet entry = source.updated.get(error.stack);\n\n\t\t\t\t\t\tif (!entry) {\n\t\t\t\t\t\t\tentry = { error, count: 0 };\n\t\t\t\t\t\t\tsource.updated.set(error.stack, entry);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tentry.count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (active_effect !== null) {\n\t\t\t\tsource.set_during_effect = true;\n\t\t\t}\n\t\t}\n\n\t\tif ((source.f & DERIVED) !== 0) {\n\t\t\tconst derived = /** @type {Derived} */ (source);\n\n\t\t\t// if we are assigning to a dirty derived we set it to clean/maybe dirty but we also eagerly execute it to track the dependencies\n\t\t\tif ((source.f & DIRTY) !== 0) {\n\t\t\t\texecute_derived(derived);\n\t\t\t}\n\n\t\t\t// During time traveling we don't want to reset the status so that\n\t\t\t// traversal of the graph in the other batches still happens\n\t\t\tif (batch_values === null) {\n\t\t\t\tupdate_derived_status(derived);\n\t\t\t}\n\t\t}\n\n\t\tsource.wv = increment_write_version();\n\n\t\t// For debugging, in case you want to know which reactions are being scheduled:\n\t\t// log_reactions(source);\n\t\tmark_reactions(source, DIRTY, updated_during_traversal);\n\n\t\t// It's possible that the current reaction might not have up-to-date dependencies\n\t\t// whilst it's actively running. So in the case of ensuring it registers the reaction\n\t\t// properly for itself, we need to ensure the current effect actually gets\n\t\t// scheduled. i.e: `$effect(() => x++)`\n\t\tif (\n\t\t\tis_runes() &&\n\t\t\tactive_effect !== null &&\n\t\t\t(active_effect.f & CLEAN) !== 0 &&\n\t\t\t(active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0\n\t\t) {\n\t\t\tif (untracked_writes === null) {\n\t\t\t\tset_untracked_writes([source]);\n\t\t\t} else {\n\t\t\t\tuntracked_writes.push(source);\n\t\t\t}\n\t\t}\n\n\t\tif (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) {\n\t\t\tflush_eager_effects();\n\t\t}\n\t}\n\n\treturn value;\n}\n\nexport function flush_eager_effects() {\n\teager_effects_deferred = false;\n\n\tfor (const effect of eager_effects) {\n\t\t// Mark clean inspect-effects as maybe dirty and then check their dirtiness\n\t\t// instead of just updating the effects - this way we avoid overfiring.\n\t\tif ((effect.f & CLEAN) !== 0) {\n\t\t\tset_signal_status(effect, MAYBE_DIRTY);\n\t\t}\n\n\t\tif (is_dirty(effect)) {\n\t\t\tupdate_effect(effect);\n\t\t}\n\t}\n\n\teager_effects.clear();\n}\n\n/**\n * @template {number | bigint} T\n * @param {Source<T>} source\n * @param {1 | -1} [d]\n * @returns {T}\n */\nexport function update(source, d = 1) {\n\tvar value = get(source);\n\tvar result = d === 1 ? value++ : value--;\n\n\tset(source, value);\n\n\t// @ts-expect-error\n\treturn result;\n}\n\n/**\n * @template {number | bigint} T\n * @param {Source<T>} source\n * @param {1 | -1} [d]\n * @returns {T}\n */\nexport function update_pre(source, d = 1) {\n\tvar value = get(source);\n\n\t// @ts-expect-error\n\t// eslint-disable-next-line no-useless-assignment -- `++`/`--` used for return value, not side effect on `value`\n\treturn set(source, d === 1 ? ++value : --value);\n}\n\n/**\n * Silently (without using `get`) increment a source\n * @param {Source<number>} source\n */\nexport function increment(source) {\n\tset(source, source.v + 1);\n}\n\n/**\n * @param {Value} signal\n * @param {number} status should be DIRTY or MAYBE_DIRTY\n * @param {Effect[] | null} updated_during_traversal\n * @returns {void}\n */\nfunction mark_reactions(signal, status, updated_during_traversal) {\n\tvar reactions = signal.reactions;\n\tif (reactions === null) return;\n\n\tvar runes = is_runes();\n\tvar length = reactions.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tvar reaction = reactions[i];\n\t\tvar flags = reaction.f;\n\n\t\t// In legacy mode, skip the current effect to prevent infinite loops\n\t\tif (!runes && reaction === active_effect) continue;\n\n\t\t// Inspect effects need to run immediately, so that the stack trace makes sense\n\t\tif (DEV && (flags & EAGER_EFFECT) !== 0) {\n\t\t\teager_effects.add(reaction);\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar not_dirty = (flags & DIRTY) === 0;\n\n\t\t// don't set a DIRTY reaction to MAYBE_DIRTY\n\t\tif (not_dirty) {\n\t\t\tset_signal_status(reaction, status);\n\t\t}\n\n\t\tif ((flags & DERIVED) !== 0) {\n\t\t\tvar derived = /** @type {Derived} */ (reaction);\n\n\t\t\tbatch_values?.delete(derived);\n\n\t\t\tif ((flags & WAS_MARKED) === 0) {\n\t\t\t\t// Only connected deriveds can be reliably unmarked right away\n\t\t\t\tif (flags & CONNECTED) {\n\t\t\t\t\treaction.f |= WAS_MARKED;\n\t\t\t\t}\n\n\t\t\t\tmark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);\n\t\t\t}\n\t\t} else if (not_dirty) {\n\t\t\tvar effect = /** @type {Effect} */ (reaction);\n\n\t\t\tif ((flags & BLOCK_EFFECT) !== 0 && eager_block_effects !== null) {\n\t\t\t\teager_block_effects.add(effect);\n\t\t\t}\n\n\t\t\tif (updated_during_traversal !== null) {\n\t\t\t\tupdated_during_traversal.push(effect);\n\t\t\t} else {\n\t\t\t\tschedule_effect(effect);\n\t\t\t}\n\t\t}\n\t}\n}\n", "/** @import { Readable } from './public' */\nimport { untrack } from '../internal/client/runtime.js';\nimport { noop } from '../internal/shared/utils.js';\n\n/**\n * @template T\n * @param {Readable<T> | null | undefined} store\n * @param {(value: T) => void} run\n * @param {(value: T) => void} [invalidate]\n * @returns {() => void}\n */\nexport function subscribe_to_store(store, run, invalidate) {\n\tif (store == null) {\n\t\t// @ts-expect-error\n\t\trun(undefined);\n\n\t\t// @ts-expect-error\n\t\tif (invalidate) invalidate(undefined);\n\n\t\treturn noop;\n\t}\n\n\t// Svelte store takes a private second argument\n\t// StartStopNotifier could mutate state, and we want to silence the corresponding validation error\n\tconst unsub = untrack(() =>\n\t\tstore.subscribe(\n\t\t\trun,\n\t\t\t// @ts-expect-error\n\t\t\tinvalidate\n\t\t)\n\t);\n\n\t// Also support RxJS\n\t// @ts-expect-error TODO fix this in the types?\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n", "/** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */\n/** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */\nimport { noop, run_all } from '../../internal/shared/utils.js';\nimport { safe_not_equal } from '../../internal/client/reactivity/equality.js';\nimport { subscribe_to_store } from '../utils.js';\n\n/**\n * @type {Array<SubscribeInvalidateTuple<any> | any>}\n */\nconst subscriber_queue = [];\n\n/**\n * Creates a `Readable` store that allows reading by subscription.\n *\n * @template T\n * @param {T} [value] initial value\n * @param {StartStopNotifier<T>} [start]\n * @returns {Readable<T>}\n */\nexport function readable(value, start) {\n\treturn {\n\t\tsubscribe: writable(value, start).subscribe\n\t};\n}\n\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n *\n * @template T\n * @param {T} [value] initial value\n * @param {StartStopNotifier<T>} [start]\n * @returns {Writable<T>}\n */\nexport function writable(value, start = noop) {\n\t/** @type {Unsubscriber | null} */\n\tlet stop = null;\n\n\t/** @type {Set<SubscribeInvalidateTuple<T>>} */\n\tconst subscribers = new Set();\n\n\t/**\n\t * @param {T} new_value\n\t * @returns {void}\n\t */\n\tfunction set(new_value) {\n\t\tif (safe_not_equal(value, new_value)) {\n\t\t\tvalue = new_value;\n\t\t\tif (stop) {\n\t\t\t\t// store is ready\n\t\t\t\tconst run_queue = !subscriber_queue.length;\n\t\t\t\tfor (const subscriber of subscribers) {\n\t\t\t\t\tsubscriber[1]();\n\t\t\t\t\tsubscriber_queue.push(subscriber, value);\n\t\t\t\t}\n\t\t\t\tif (run_queue) {\n\t\t\t\t\tfor (let i = 0; i < subscriber_queue.length; i += 2) {\n\t\t\t\t\t\tsubscriber_queue[i][0](subscriber_queue[i + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tsubscriber_queue.length = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @param {Updater<T>} fn\n\t * @returns {void}\n\t */\n\tfunction update(fn) {\n\t\tset(fn(/** @type {T} */ (value)));\n\t}\n\n\t/**\n\t * @param {Subscriber<T>} run\n\t * @param {() => void} [invalidate]\n\t * @returns {Unsubscriber}\n\t */\n\tfunction subscribe(run, invalidate = noop) {\n\t\t/** @type {SubscribeInvalidateTuple<T>} */\n\t\tconst subscriber = [run, invalidate];\n\t\tsubscribers.add(subscriber);\n\t\tif (subscribers.size === 1) {\n\t\t\tstop = start(set, update) || noop;\n\t\t}\n\t\trun(/** @type {T} */ (value));\n\t\treturn () => {\n\t\t\tsubscribers.delete(subscriber);\n\t\t\tif (subscribers.size === 0 && stop) {\n\t\t\t\tstop();\n\t\t\t\tstop = null;\n\t\t\t}\n\t\t};\n\t}\n\treturn { set, update, subscribe };\n}\n\n/**\n * Derived value store by synchronizing one or more readable stores and\n * applying an aggregation function over its input values.\n *\n * @template {Stores} S\n * @template T\n * @overload\n * @param {S} stores\n * @param {(values: StoresValues<S>, set: (value: T) => void, update: (fn: Updater<T>) => void) => Unsubscriber | void} fn\n * @param {T} [initial_value]\n * @returns {Readable<T>}\n */\n/**\n * Derived value store by synchronizing one or more readable stores and\n * applying an aggregation function over its input values.\n *\n * @template {Stores} S\n * @template T\n * @overload\n * @param {S} stores\n * @param {(values: StoresValues<S>) => T} fn\n * @param {T} [initial_value]\n * @returns {Readable<T>}\n */\n/**\n * @template {Stores} S\n * @template T\n * @param {S} stores\n * @param {Function} fn\n * @param {T} [initial_value]\n * @returns {Readable<T>}\n */\nexport function derived(stores, fn, initial_value) {\n\tconst single = !Array.isArray(stores);\n\t/** @type {Array<Readable<any>>} */\n\tconst stores_array = single ? [stores] : stores;\n\tif (!stores_array.every(Boolean)) {\n\t\tthrow new Error('derived() expects stores as input, got a falsy value');\n\t}\n\tconst auto = fn.length < 2;\n\treturn readable(initial_value, (set, update) => {\n\t\tlet started = false;\n\t\t/** @type {T[]} */\n\t\tconst values = [];\n\t\tlet pending = 0;\n\t\tlet cleanup = noop;\n\t\tconst sync = () => {\n\t\t\tif (pending) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcleanup();\n\t\t\tconst result = fn(single ? values[0] : values, set, update);\n\t\t\tif (auto) {\n\t\t\t\tset(result);\n\t\t\t} else {\n\t\t\t\tcleanup = typeof result === 'function' ? result : noop;\n\t\t\t}\n\t\t};\n\t\tconst unsubscribers = stores_array.map((store, i) =>\n\t\t\tsubscribe_to_store(\n\t\t\t\tstore,\n\t\t\t\t(value) => {\n\t\t\t\t\tvalues[i] = value;\n\t\t\t\t\tpending &= ~(1 << i);\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tsync();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tpending |= 1 << i;\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\t\tstarted = true;\n\t\tsync();\n\t\treturn function stop() {\n\t\t\trun_all(unsubscribers);\n\t\t\tcleanup();\n\t\t\t// We need to set this to false because callbacks can still happen despite having unsubscribed:\n\t\t\t// Callbacks might already be placed in the queue which doesn't know it should no longer\n\t\t\t// invoke this derived store.\n\t\t\tstarted = false;\n\t\t};\n\t});\n}\n\n/**\n * Takes a store and returns a new one derived from the old one that is readable.\n *\n * @template T\n * @param {Readable<T>} store - store to make readonly\n * @returns {Readable<T>}\n */\nexport function readonly(store) {\n\treturn {\n\t\t// @ts-expect-error TODO i suspect the bind is unnecessary\n\t\tsubscribe: store.subscribe.bind(store)\n\t};\n}\n\n/**\n * Get the current value from a store by subscribing and immediately unsubscribing.\n *\n * @template T\n * @param {Readable<T>} store\n * @returns {T}\n */\nexport function get(store) {\n\tlet value;\n\tsubscribe_to_store(store, (_) => (value = _))();\n\t// @ts-expect-error\n\treturn value;\n}\n", "/** @import { StoreReferencesContainer } from '#client' */\n/** @import { Store } from '#shared' */\nimport { subscribe_to_store } from '../../../store/utils.js';\nimport { get as get_store } from '../../../store/shared/index.js';\nimport { define_property, noop } from '../../shared/utils.js';\nimport { get } from '../runtime.js';\nimport { teardown } from './effects.js';\nimport { mutable_source, set } from './sources.js';\nimport { DEV } from 'esm-env';\n\n/**\n * We set this to `true` when updating a store so that we correctly\n * schedule effects if the update takes place inside a `$:` effect\n */\nexport let legacy_is_updating_store = false;\n\n/**\n * Whether or not the prop currently being read is a store binding, as in\n * `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in\n * runes mode, and skip `binding_property_non_reactive` validation\n */\nlet is_store_binding = false;\n\nlet IS_UNMOUNTED = Symbol();\n\n/**\n * Gets the current value of a store. If the store isn't subscribed to yet, it will create a proxy\n * signal that will be updated when the store is. The store references container is needed to\n * track reassignments to stores and to track the correct component context.\n * @template V\n * @param {Store<V> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n * @returns {V}\n */\nexport function store_get(store, store_name, stores) {\n\tconst entry = (stores[store_name] ??= {\n\t\tstore: null,\n\t\tsource: mutable_source(undefined),\n\t\tunsubscribe: noop\n\t});\n\n\tif (DEV) {\n\t\tentry.source.label = store_name;\n\t}\n\n\t// if the component that setup this is already unmounted we don't want to register a subscription\n\tif (entry.store !== store && !(IS_UNMOUNTED in stores)) {\n\t\tentry.unsubscribe();\n\t\tentry.store = store ?? null;\n\n\t\tif (store == null) {\n\t\t\tentry.source.v = undefined; // see synchronous callback comment below\n\t\t\tentry.unsubscribe = noop;\n\t\t} else {\n\t\t\tvar is_synchronous_callback = true;\n\n\t\t\tentry.unsubscribe = subscribe_to_store(store, (v) => {\n\t\t\t\tif (is_synchronous_callback) {\n\t\t\t\t\t// If the first updates to the store value (possibly multiple of them) are synchronously\n\t\t\t\t\t// inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value\n\t\t\t\t\tentry.source.v = v;\n\t\t\t\t} else {\n\t\t\t\t\tset(entry.source, v);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tis_synchronous_callback = false;\n\t\t}\n\t}\n\n\t// if the component that setup this stores is already unmounted the source will be out of sync\n\t// so we just use the `get` for the stores, less performant but it avoids to create a memory leak\n\t// and it will keep the value consistent\n\tif (store && IS_UNMOUNTED in stores) {\n\t\treturn get_store(store);\n\t}\n\n\treturn get(entry.source);\n}\n\n/**\n * Unsubscribe from a store if it's not the same as the one in the store references container.\n * We need this in addition to `store_get` because someone could unsubscribe from a store but\n * then never subscribe to the new one (if any), causing the subscription to stay open wrongfully.\n * @param {Store<any> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n */\nexport function store_unsub(store, store_name, stores) {\n\t/** @type {StoreReferencesContainer[''] | undefined} */\n\tlet entry = stores[store_name];\n\n\tif (entry && entry.store !== store) {\n\t\t// Don't reset store yet, so that store_get above can resubscribe to new store if necessary\n\t\tentry.unsubscribe();\n\t\tentry.unsubscribe = noop;\n\t}\n\n\treturn store;\n}\n\n/**\n * Sets the new value of a store and returns that value.\n * @template V\n * @param {Store<V>} store\n * @param {V} value\n * @returns {V}\n */\nexport function store_set(store, value) {\n\tupdate_with_flag(store, value);\n\treturn value;\n}\n\n/**\n * @param {StoreReferencesContainer} stores\n * @param {string} store_name\n */\nexport function invalidate_store(stores, store_name) {\n\tvar entry = stores[store_name];\n\tif (entry.store !== null) {\n\t\tstore_set(entry.store, entry.source.v);\n\t}\n}\n\n/**\n * Unsubscribes from all auto-subscribed stores on destroy\n * @returns {[StoreReferencesContainer, ()=>void]}\n */\nexport function setup_stores() {\n\t/** @type {StoreReferencesContainer} */\n\tconst stores = {};\n\n\tfunction cleanup() {\n\t\tteardown(() => {\n\t\t\tfor (var store_name in stores) {\n\t\t\t\tconst ref = stores[store_name];\n\t\t\t\tref.unsubscribe();\n\t\t\t}\n\t\t\tdefine_property(stores, IS_UNMOUNTED, {\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t});\n\t}\n\n\treturn [stores, cleanup];\n}\n\n/**\n * @param {Store<V>} store\n * @param {V} value\n * @template V\n */\nfunction update_with_flag(store, value) {\n\tlegacy_is_updating_store = true;\n\n\ttry {\n\t\tstore.set(value);\n\t} finally {\n\t\tlegacy_is_updating_store = false;\n\t}\n}\n\n/**\n * Updates a store with a new value.\n * @param {Store<V>} store the store to update\n * @param {any} expression the expression that mutates the store\n * @param {V} new_value the new store value\n * @template V\n */\nexport function store_mutate(store, expression, new_value) {\n\tupdate_with_flag(store, new_value);\n\treturn expression;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_store(store, store_value, d = 1) {\n\tupdate_with_flag(store, store_value + d);\n\treturn store_value;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_store(store, store_value, d = 1) {\n\tconst value = store_value + d;\n\tupdate_with_flag(store, value);\n\treturn value;\n}\n\n/**\n * Called inside prop getters to communicate that the prop is a store binding\n */\nexport function mark_store_binding() {\n\tis_store_binding = true;\n}\n\n/**\n * Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.\n * Used to prevent `binding_property_non_reactive` validation false positives and\n * ensure that these props are treated as mutable even in runes mode\n * @template T\n * @param {() => T} fn\n * @returns {[T, boolean]}\n */\nexport function capture_store_binding(fn) {\n\tvar previous_is_store_binding = is_store_binding;\n\n\ttry {\n\t\tis_store_binding = false;\n\t\treturn [fn(), is_store_binding];\n\t} finally {\n\t\tis_store_binding = previous_is_store_binding;\n\t}\n}\n", "/** @import { Fork } from 'svelte' */\n/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */\nimport {\n\tBLOCK_EFFECT,\n\tBRANCH_EFFECT,\n\tCLEAN,\n\tDESTROYED,\n\tDIRTY,\n\tEFFECT,\n\tASYNC,\n\tINERT,\n\tRENDER_EFFECT,\n\tROOT_EFFECT,\n\tMAYBE_DIRTY,\n\tDERIVED,\n\tEAGER_EFFECT,\n\tERROR_VALUE,\n\tMANAGED_EFFECT,\n\tREACTION_RAN\n} from '#client/constants';\nimport { async_mode_flag } from '../../flags/index.js';\nimport { deferred, define_property, includes } from '../../shared/utils.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tget,\n\tincrement_write_version,\n\tis_dirty,\n\tupdate_effect\n} from '../runtime.js';\nimport * as e from '../errors.js';\nimport { flush_tasks, queue_micro_task } from '../dom/task.js';\nimport { DEV } from 'esm-env';\nimport { invoke_error_boundary } from '../error-handling.js';\nimport { flush_eager_effects, old_values, set_eager_effects, source, update } from './sources.js';\nimport { eager_effect, unlink_effect } from './effects.js';\nimport { defer_effect } from './utils.js';\nimport { UNINITIALIZED } from '../../../constants.js';\nimport { set_signal_status } from './status.js';\nimport { legacy_is_updating_store } from './store.js';\nimport { invariant } from '../../shared/dev.js';\nimport { log_effect_tree } from '../dev/debug.js';\n\n/** @type {Set<Batch>} */\nconst batches = new Set();\n\n/** @type {Batch | null} */\nexport let current_batch = null;\n\n/**\n * This is needed to avoid overwriting inputs\n * @type {Batch | null}\n */\nexport let previous_batch = null;\n\n/**\n * When time travelling (i.e. working in one batch, while other batches\n * still have ongoing work), we ignore the real values of affected\n * signals in favour of their values within the batch\n * @type {Map<Value, any> | null}\n */\nexport let batch_values = null;\n\n/** @type {Effect | null} */\nlet last_scheduled_effect = null;\n\nexport let is_flushing_sync = false;\nlet is_processing = false;\n\n/**\n * During traversal, this is an array. Newly created effects are (if not immediately\n * executed) pushed to this array, rather than going through the scheduling\n * rigamarole that would cause another turn of the flush loop.\n * @type {Effect[] | null}\n */\nexport let collected_effects = null;\n\n/**\n * An array of effects that are marked during traversal as a result of a `set`\n * (not `internal_set`) call. These will be added to the next batch and\n * trigger another `batch.process()`\n * @type {Effect[] | null}\n * @deprecated when we get rid of legacy mode and stores, we can get rid of this\n */\nexport let legacy_updates = null;\n\nvar flush_count = 0;\nvar source_stacks = DEV ? new Set() : null;\n\nlet uid = 1;\n\nexport class Batch {\n\tid = uid++;\n\n\t/**\n\t * The current values of any signals that are updated in this batch.\n\t * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)\n\t * They keys of this map are identical to `this.#previous`\n\t * @type {Map<Value, [any, boolean]>}\n\t */\n\tcurrent = new Map();\n\n\t/**\n\t * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.\n\t * They keys of this map are identical to `this.#current`\n\t * @type {Map<Value, any>}\n\t */\n\tprevious = new Map();\n\n\t/**\n\t * When the batch is committed (and the DOM is updated), we need to remove old branches\n\t * and append new ones by calling the functions added inside (if/each/key/etc) blocks\n\t * @type {Set<(batch: Batch) => void>}\n\t */\n\t#commit_callbacks = new Set();\n\n\t/**\n\t * If a fork is discarded, we need to destroy any effects that are no longer needed\n\t * @type {Set<(batch: Batch) => void>}\n\t */\n\t#discard_callbacks = new Set();\n\n\t/**\n\t * Async effects that are currently in flight\n\t * @type {Map<Effect, number>}\n\t */\n\t#pending = new Map();\n\n\t/**\n\t * Async effects that are currently in flight, _not_ inside a pending boundary\n\t * @type {Map<Effect, number>}\n\t */\n\t#blocking_pending = new Map();\n\n\t/**\n\t * A deferred that resolves when the batch is committed, used with `settled()`\n\t * TODO replace with Promise.withResolvers once supported widely enough\n\t * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}\n\t */\n\t#deferred = null;\n\n\t/**\n\t * The root effects that need to be flushed\n\t * @type {Effect[]}\n\t */\n\t#roots = [];\n\n\t/**\n\t * Effects created while this batch was active.\n\t * @type {Effect[]}\n\t */\n\t#new_effects = [];\n\n\t/**\n\t * Deferred effects (which run after async work has completed) that are DIRTY\n\t * @type {Set<Effect>}\n\t */\n\t#dirty_effects = new Set();\n\n\t/**\n\t * Deferred effects that are MAYBE_DIRTY\n\t * @type {Set<Effect>}\n\t */\n\t#maybe_dirty_effects = new Set();\n\n\t/**\n\t * A map of branches that still exist, but will be destroyed when this batch\n\t * is committed — we skip over these during `process`.\n\t * The value contains child effects that were dirty/maybe_dirty before being reset,\n\t * so they can be rescheduled if the branch survives.\n\t * @type {Map<Effect, { d: Effect[], m: Effect[] }>}\n\t */\n\t#skipped_branches = new Map();\n\n\tis_fork = false;\n\n\t#decrement_queued = false;\n\n\t/** @type {Set<Batch>} */\n\t#blockers = new Set();\n\n\t#is_deferred() {\n\t\treturn this.is_fork || this.#blocking_pending.size > 0;\n\t}\n\n\t#is_blocked() {\n\t\tfor (const batch of this.#blockers) {\n\t\t\tfor (const effect of batch.#blocking_pending.keys()) {\n\t\t\t\tvar skipped = false;\n\t\t\t\tvar e = effect;\n\n\t\t\t\twhile (e.parent !== null) {\n\t\t\t\t\tif (this.#skipped_branches.has(e)) {\n\t\t\t\t\t\tskipped = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\te = e.parent;\n\t\t\t\t}\n\n\t\t\t\tif (!skipped) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Add an effect to the #skipped_branches map and reset its children\n\t * @param {Effect} effect\n\t */\n\tskip_effect(effect) {\n\t\tif (!this.#skipped_branches.has(effect)) {\n\t\t\tthis.#skipped_branches.set(effect, { d: [], m: [] });\n\t\t}\n\t}\n\n\t/**\n\t * Remove an effect from the #skipped_branches map and reschedule\n\t * any tracked dirty/maybe_dirty child effects\n\t * @param {Effect} effect\n\t */\n\tunskip_effect(effect) {\n\t\tvar tracked = this.#skipped_branches.get(effect);\n\t\tif (tracked) {\n\t\t\tthis.#skipped_branches.delete(effect);\n\n\t\t\tfor (var e of tracked.d) {\n\t\t\t\tset_signal_status(e, DIRTY);\n\t\t\t\tthis.schedule(e);\n\t\t\t}\n\n\t\t\tfor (e of tracked.m) {\n\t\t\t\tset_signal_status(e, MAYBE_DIRTY);\n\t\t\t\tthis.schedule(e);\n\t\t\t}\n\t\t}\n\t}\n\n\t#process() {\n\t\tif (flush_count++ > 1000) {\n\t\t\tbatches.delete(this);\n\t\t\tinfinite_loop_guard();\n\t\t}\n\n\t\t// we only reschedule previously-deferred effects if we expect\n\t\t// to be able to run them after processing the batch\n\t\tif (!this.#is_deferred()) {\n\t\t\tfor (const e of this.#dirty_effects) {\n\t\t\t\tthis.#maybe_dirty_effects.delete(e);\n\t\t\t\tset_signal_status(e, DIRTY);\n\t\t\t\tthis.schedule(e);\n\t\t\t}\n\n\t\t\tfor (const e of this.#maybe_dirty_effects) {\n\t\t\t\tset_signal_status(e, MAYBE_DIRTY);\n\t\t\t\tthis.schedule(e);\n\t\t\t}\n\t\t}\n\n\t\tconst roots = this.#roots;\n\t\tthis.#roots = [];\n\n\t\tthis.apply();\n\n\t\t/** @type {Effect[]} */\n\t\tvar effects = (collected_effects = []);\n\n\t\t/** @type {Effect[]} */\n\t\tvar render_effects = [];\n\n\t\t/**\n\t\t * @type {Effect[]}\n\t\t * @deprecated when we get rid of legacy mode and stores, we can get rid of this\n\t\t */\n\t\tvar updates = (legacy_updates = []);\n\n\t\tfor (const root of roots) {\n\t\t\ttry {\n\t\t\t\tthis.#traverse(root, effects, render_effects);\n\t\t\t} catch (e) {\n\t\t\t\treset_all(root);\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\n\t\t// any writes should take effect in a subsequent batch\n\t\tcurrent_batch = null;\n\n\t\tif (updates.length > 0) {\n\t\t\tvar batch = Batch.ensure();\n\t\t\tfor (const e of updates) {\n\t\t\t\tbatch.schedule(e);\n\t\t\t}\n\t\t}\n\n\t\tcollected_effects = null;\n\t\tlegacy_updates = null;\n\n\t\tif (this.#is_deferred() || this.#is_blocked()) {\n\t\t\tthis.#defer_effects(render_effects);\n\t\t\tthis.#defer_effects(effects);\n\n\t\t\tfor (const [e, t] of this.#skipped_branches) {\n\t\t\t\treset_branch(e, t);\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.#pending.size === 0) {\n\t\t\t\tbatches.delete(this);\n\t\t\t}\n\n\t\t\t// clear effects. Those that are still needed will be rescheduled through unskipping the skipped branches.\n\t\t\tthis.#dirty_effects.clear();\n\t\t\tthis.#maybe_dirty_effects.clear();\n\n\t\t\t// append/remove branches\n\t\t\tfor (const fn of this.#commit_callbacks) fn(this);\n\t\t\tthis.#commit_callbacks.clear();\n\n\t\t\tprevious_batch = this;\n\t\t\tflush_queued_effects(render_effects);\n\t\t\tflush_queued_effects(effects);\n\t\t\tprevious_batch = null;\n\n\t\t\tthis.#deferred?.resolve();\n\t\t}\n\n\t\tvar next_batch = /** @type {Batch | null} */ (/** @type {unknown} */ (current_batch));\n\n\t\t// Edge case: During traversal new branches might create effects that run immediately and set state,\n\t\t// causing an effect and therefore a root to be scheduled again. We need to traverse the current batch\n\t\t// once more in that case - most of the time this will just clean up dirty branches.\n\t\tif (this.#roots.length > 0) {\n\t\t\tconst batch = (next_batch ??= this);\n\t\t\tbatch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));\n\t\t}\n\n\t\tif (next_batch !== null) {\n\t\t\tbatches.add(next_batch);\n\n\t\t\tif (DEV) {\n\t\t\t\tfor (const source of this.current.keys()) {\n\t\t\t\t\t/** @type {Set<Source>} */ (source_stacks).add(source);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext_batch.#process();\n\t\t}\n\n\t\tif (!batches.has(this)) {\n\t\t\tthis.#commit();\n\t\t}\n\t}\n\n\t/**\n\t * Traverse the effect tree, executing effects or stashing\n\t * them for later execution as appropriate\n\t * @param {Effect} root\n\t * @param {Effect[]} effects\n\t * @param {Effect[]} render_effects\n\t */\n\t#traverse(root, effects, render_effects) {\n\t\troot.f ^= CLEAN;\n\n\t\tvar effect = root.first;\n\n\t\twhile (effect !== null) {\n\t\t\tvar flags = effect.f;\n\t\t\tvar is_branch = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0;\n\t\t\tvar is_skippable_branch = is_branch && (flags & CLEAN) !== 0;\n\n\t\t\tvar skip = is_skippable_branch || (flags & INERT) !== 0 || this.#skipped_branches.has(effect);\n\n\t\t\tif (!skip && effect.fn !== null) {\n\t\t\t\tif (is_branch) {\n\t\t\t\t\teffect.f ^= CLEAN;\n\t\t\t\t} else if ((flags & EFFECT) !== 0) {\n\t\t\t\t\teffects.push(effect);\n\t\t\t\t} else if (async_mode_flag && (flags & (RENDER_EFFECT | MANAGED_EFFECT)) !== 0) {\n\t\t\t\t\trender_effects.push(effect);\n\t\t\t\t} else if (is_dirty(effect)) {\n\t\t\t\t\tif ((flags & BLOCK_EFFECT) !== 0) this.#maybe_dirty_effects.add(effect);\n\t\t\t\t\tupdate_effect(effect);\n\t\t\t\t}\n\n\t\t\t\tvar child = effect.first;\n\n\t\t\t\tif (child !== null) {\n\t\t\t\t\teffect = child;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (effect !== null) {\n\t\t\t\tvar next = effect.next;\n\n\t\t\t\tif (next !== null) {\n\t\t\t\t\teffect = next;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\teffect = effect.parent;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @param {Effect[]} effects\n\t */\n\t#defer_effects(effects) {\n\t\tfor (var i = 0; i < effects.length; i += 1) {\n\t\t\tdefer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);\n\t\t}\n\t}\n\n\t/**\n\t * Associate a change to a given source with the current\n\t * batch, noting its previous and current values\n\t * @param {Value} source\n\t * @param {any} old_value\n\t * @param {boolean} [is_derived]\n\t */\n\tcapture(source, old_value, is_derived = false) {\n\t\tif (old_value !== UNINITIALIZED && !this.previous.has(source)) {\n\t\t\tthis.previous.set(source, old_value);\n\t\t}\n\n\t\t// Don't save errors in `batch_values`, or they won't be thrown in `runtime.js#get`\n\t\tif ((source.f & ERROR_VALUE) === 0) {\n\t\t\tthis.current.set(source, [source.v, is_derived]);\n\t\t\tbatch_values?.set(source, source.v);\n\t\t}\n\t}\n\n\tactivate() {\n\t\tcurrent_batch = this;\n\t}\n\n\tdeactivate() {\n\t\tcurrent_batch = null;\n\t\tbatch_values = null;\n\t}\n\n\tflush() {\n\t\tvar source_stacks = DEV ? new Set() : null;\n\n\t\ttry {\n\t\t\tis_processing = true;\n\t\t\tcurrent_batch = this;\n\n\t\t\tthis.#process();\n\t\t} finally {\n\t\t\tflush_count = 0;\n\t\t\tlast_scheduled_effect = null;\n\t\t\tcollected_effects = null;\n\t\t\tlegacy_updates = null;\n\t\t\tis_processing = false;\n\n\t\t\tcurrent_batch = null;\n\t\t\tbatch_values = null;\n\n\t\t\told_values.clear();\n\n\t\t\tif (DEV) {\n\t\t\t\tfor (const source of /** @type {Set<Source>} */ (source_stacks)) {\n\t\t\t\t\tsource.updated = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tdiscard() {\n\t\tfor (const fn of this.#discard_callbacks) fn(this);\n\t\tthis.#discard_callbacks.clear();\n\n\t\tbatches.delete(this);\n\t}\n\n\t/**\n\t * @param {Effect} effect\n\t */\n\tregister_created_effect(effect) {\n\t\tthis.#new_effects.push(effect);\n\t}\n\n\t#commit() {\n\t\t// If there are other pending batches, they now need to be 'rebased' —\n\t\t// in other words, we re-run block/async effects with the newly\n\t\t// committed state, unless the batch in question has a more\n\t\t// recent value for a given source\n\t\tfor (const batch of batches) {\n\t\t\tvar is_earlier = batch.id < this.id;\n\n\t\t\t/** @type {Source[]} */\n\t\t\tvar sources = [];\n\n\t\t\tfor (const [source, [value, is_derived]] of this.current) {\n\t\t\t\tif (batch.current.has(source)) {\n\t\t\t\t\tvar batch_value = /** @type {[any, boolean]} */ (batch.current.get(source))[0]; // faster than destructuring\n\n\t\t\t\t\tif (is_earlier && value !== batch_value) {\n\t\t\t\t\t\t// bring the value up to date\n\t\t\t\t\t\tbatch.current.set(source, [value, is_derived]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// same value or later batch has more recent value,\n\t\t\t\t\t\t// no need to re-run these effects\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsources.push(source);\n\t\t\t}\n\n\t\t\t// Re-run async/block effects that depend on distinct values changed in both batches\n\t\t\tvar others = [...batch.current.keys()].filter((s) => !this.current.has(s));\n\n\t\t\tif (others.length === 0) {\n\t\t\t\tif (is_earlier) {\n\t\t\t\t\t// this batch is now obsolete and can be discarded\n\t\t\t\t\tbatch.discard();\n\t\t\t\t}\n\t\t\t} else if (sources.length > 0) {\n\t\t\t\tif (DEV) {\n\t\t\t\t\tinvariant(batch.#roots.length === 0, 'Batch has scheduled roots');\n\t\t\t\t}\n\n\t\t\t\tbatch.activate();\n\n\t\t\t\t/** @type {Set<Value>} */\n\t\t\t\tvar marked = new Set();\n\n\t\t\t\t/** @type {Map<Reaction, boolean>} */\n\t\t\t\tvar checked = new Map();\n\n\t\t\t\tfor (var source of sources) {\n\t\t\t\t\tmark_effects(source, others, marked, checked);\n\t\t\t\t}\n\n\t\t\t\tchecked = new Map();\n\t\t\t\tvar current_unequal = [...batch.current.keys()].filter((c) =>\n\t\t\t\t\tthis.current.has(c) ? /** @type {[any, boolean]} */ (this.current.get(c))[0] !== c : true\n\t\t\t\t);\n\n\t\t\t\tfor (const effect of this.#new_effects) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t(effect.f & (DESTROYED | INERT | EAGER_EFFECT)) === 0 &&\n\t\t\t\t\t\tdepends_on(effect, current_unequal, checked)\n\t\t\t\t\t) {\n\t\t\t\t\t\tif ((effect.f & (ASYNC | BLOCK_EFFECT)) !== 0) {\n\t\t\t\t\t\t\tset_signal_status(effect, DIRTY);\n\t\t\t\t\t\t\tbatch.schedule(effect);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbatch.#dirty_effects.add(effect);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Only apply and traverse when we know we triggered async work with marking the effects\n\t\t\t\tif (batch.#roots.length > 0) {\n\t\t\t\t\tbatch.apply();\n\n\t\t\t\t\tfor (var root of batch.#roots) {\n\t\t\t\t\t\tbatch.#traverse(root, [], []);\n\t\t\t\t\t}\n\n\t\t\t\t\tbatch.#roots = [];\n\t\t\t\t}\n\n\t\t\t\tbatch.deactivate();\n\t\t\t}\n\t\t}\n\n\t\tfor (const batch of batches) {\n\t\t\tif (batch.#blockers.has(this)) {\n\t\t\t\tbatch.#blockers.delete(this);\n\n\t\t\t\tif (batch.#blockers.size === 0 && !batch.#is_deferred()) {\n\t\t\t\t\tbatch.activate();\n\t\t\t\t\tbatch.#process();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @param {boolean} blocking\n\t * @param {Effect} effect\n\t */\n\tincrement(blocking, effect) {\n\t\tlet pending_count = this.#pending.get(effect) ?? 0;\n\t\tthis.#pending.set(effect, pending_count + 1);\n\n\t\tif (blocking) {\n\t\t\tlet blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;\n\t\t\tthis.#blocking_pending.set(effect, blocking_pending_count + 1);\n\t\t}\n\t}\n\n\t/**\n\t * @param {boolean} blocking\n\t * @param {Effect} effect\n\t * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)\n\t */\n\tdecrement(blocking, effect, skip) {\n\t\tlet pending_count = this.#pending.get(effect) ?? 0;\n\n\t\tif (pending_count === 1) {\n\t\t\tthis.#pending.delete(effect);\n\t\t} else {\n\t\t\tthis.#pending.set(effect, pending_count - 1);\n\t\t}\n\n\t\tif (blocking) {\n\t\t\tlet blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;\n\n\t\t\tif (blocking_pending_count === 1) {\n\t\t\t\tthis.#blocking_pending.delete(effect);\n\t\t\t} else {\n\t\t\t\tthis.#blocking_pending.set(effect, blocking_pending_count - 1);\n\t\t\t}\n\t\t}\n\n\t\tif (this.#decrement_queued || skip) return;\n\t\tthis.#decrement_queued = true;\n\n\t\tqueue_micro_task(() => {\n\t\t\tthis.#decrement_queued = false;\n\t\t\tthis.flush();\n\t\t});\n\t}\n\n\t/**\n\t * @param {Set<Effect>} dirty_effects\n\t * @param {Set<Effect>} maybe_dirty_effects\n\t */\n\ttransfer_effects(dirty_effects, maybe_dirty_effects) {\n\t\tfor (const e of dirty_effects) {\n\t\t\tthis.#dirty_effects.add(e);\n\t\t}\n\n\t\tfor (const e of maybe_dirty_effects) {\n\t\t\tthis.#maybe_dirty_effects.add(e);\n\t\t}\n\n\t\tdirty_effects.clear();\n\t\tmaybe_dirty_effects.clear();\n\t}\n\n\t/** @param {(batch: Batch) => void} fn */\n\toncommit(fn) {\n\t\tthis.#commit_callbacks.add(fn);\n\t}\n\n\t/** @param {(batch: Batch) => void} fn */\n\tondiscard(fn) {\n\t\tthis.#discard_callbacks.add(fn);\n\t}\n\n\tsettled() {\n\t\treturn (this.#deferred ??= deferred()).promise;\n\t}\n\n\tstatic ensure() {\n\t\tif (current_batch === null) {\n\t\t\tconst batch = (current_batch = new Batch());\n\n\t\t\tif (!is_processing) {\n\t\t\t\tbatches.add(current_batch);\n\n\t\t\t\tif (!is_flushing_sync) {\n\t\t\t\t\tqueue_micro_task(() => {\n\t\t\t\t\t\tif (current_batch !== batch) {\n\t\t\t\t\t\t\t// a flushSync happened in the meantime\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbatch.flush();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn current_batch;\n\t}\n\n\tapply() {\n\t\tif (!async_mode_flag || (!this.is_fork && batches.size === 1)) {\n\t\t\tbatch_values = null;\n\t\t\treturn;\n\t\t}\n\n\t\t// if there are multiple batches, we are 'time travelling' —\n\t\t// we need to override values with the ones in this batch...\n\t\tbatch_values = new Map();\n\t\tfor (const [source, [value]] of this.current) {\n\t\t\tbatch_values.set(source, value);\n\t\t}\n\n\t\t// ...and undo changes belonging to other batches unless they block this one\n\t\tfor (const batch of batches) {\n\t\t\tif (batch === this || batch.is_fork) continue;\n\n\t\t\t// A batch is blocked on an earlier batch if it overlaps with the earlier batch's changes but is not a superset\n\t\t\tvar intersects = false;\n\t\t\tvar differs = false;\n\n\t\t\tif (batch.id < this.id) {\n\t\t\t\tfor (const [source, [, is_derived]] of batch.current) {\n\t\t\t\t\t// Derived values don't partake in the blocking mechanism, because a derived could\n\t\t\t\t\t// be triggered in one batch already but not the other one yet, causing a false-positive\n\t\t\t\t\tif (is_derived) continue;\n\n\t\t\t\t\tintersects ||= this.current.has(source);\n\t\t\t\t\tdiffers ||= !this.current.has(source);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (intersects && differs) {\n\t\t\t\tthis.#blockers.add(batch);\n\t\t\t} else {\n\t\t\t\tfor (const [source, previous] of batch.previous) {\n\t\t\t\t\tif (!batch_values.has(source)) {\n\t\t\t\t\t\tbatch_values.set(source, previous);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {Effect} effect\n\t */\n\tschedule(effect) {\n\t\tlast_scheduled_effect = effect;\n\n\t\t// defer render effects inside a pending boundary\n\t\t// TODO the `REACTION_RAN` check is only necessary because of legacy `$:` effects AFAICT — we can remove later\n\t\tif (\n\t\t\teffect.b?.is_pending &&\n\t\t\t(effect.f & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0 &&\n\t\t\t(effect.f & REACTION_RAN) === 0\n\t\t) {\n\t\t\teffect.b.defer_effect(effect);\n\t\t\treturn;\n\t\t}\n\n\t\tvar e = effect;\n\n\t\twhile (e.parent !== null) {\n\t\t\te = e.parent;\n\t\t\tvar flags = e.f;\n\n\t\t\t// if the effect is being scheduled because a parent (each/await/etc) block\n\t\t\t// updated an internal source, or because a branch is being unskipped,\n\t\t\t// bail out or we'll cause a second flush\n\t\t\tif (collected_effects !== null && e === active_effect) {\n\t\t\t\tif (async_mode_flag) return;\n\n\t\t\t\t// in sync mode, render effects run during traversal. in an extreme edge case\n\t\t\t\t// — namely that we're setting a value inside a derived read during traversal —\n\t\t\t\t// they can be made dirty after they have already been visited, in which\n\t\t\t\t// case we shouldn't bail out. we also shouldn't bail out if we're\n\t\t\t\t// updating a store inside a `$:`, since this might invalidate\n\t\t\t\t// effects that were already visited\n\t\t\t\tif (\n\t\t\t\t\t(active_reaction === null || (active_reaction.f & DERIVED) === 0) &&\n\t\t\t\t\t!legacy_is_updating_store\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) {\n\t\t\t\tif ((flags & CLEAN) === 0) {\n\t\t\t\t\t// branch is already dirty, bail\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\te.f ^= CLEAN;\n\t\t\t}\n\t\t}\n\n\t\tthis.#roots.push(e);\n\t}\n}\n\n/**\n * Synchronously flush any pending updates.\n * Returns void if no callback is provided, otherwise returns the result of calling the callback.\n * @template [T=void]\n * @param {(() => T) | undefined} [fn]\n * @returns {T}\n */\nexport function flushSync(fn) {\n\tvar was_flushing_sync = is_flushing_sync;\n\tis_flushing_sync = true;\n\n\ttry {\n\t\tvar result;\n\n\t\tif (fn) {\n\t\t\tif (current_batch !== null && !current_batch.is_fork) {\n\t\t\t\tcurrent_batch.flush();\n\t\t\t}\n\n\t\t\tresult = fn();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tflush_tasks();\n\n\t\t\tif (current_batch === null) {\n\t\t\t\treturn /** @type {T} */ (result);\n\t\t\t}\n\n\t\t\tcurrent_batch.flush();\n\t\t}\n\t} finally {\n\t\tis_flushing_sync = was_flushing_sync;\n\t}\n}\n\nfunction infinite_loop_guard() {\n\tif (DEV) {\n\t\tvar updates = new Map();\n\n\t\tfor (const source of /** @type {Batch} */ (current_batch).current.keys()) {\n\t\t\tfor (const [stack, update] of source.updated ?? []) {\n\t\t\t\tvar entry = updates.get(stack);\n\n\t\t\t\tif (!entry) {\n\t\t\t\t\tentry = { error: update.error, count: 0 };\n\t\t\t\t\tupdates.set(stack, entry);\n\t\t\t\t}\n\n\t\t\t\tentry.count += update.count;\n\t\t\t}\n\t\t}\n\n\t\tfor (const update of updates.values()) {\n\t\t\tif (update.error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error(update.error);\n\t\t\t}\n\t\t}\n\t}\n\n\ttry {\n\t\te.effect_update_depth_exceeded();\n\t} catch (error) {\n\t\tif (DEV) {\n\t\t\t// stack contains no useful information, replace it\n\t\t\tdefine_property(error, 'stack', { value: '' });\n\t\t}\n\n\t\t// Best effort: invoke the boundary nearest the most recent\n\t\t// effect and hope that it's relevant to the infinite loop\n\t\tinvoke_error_boundary(error, last_scheduled_effect);\n\t}\n}\n\n/** @type {Set<Effect> | null} */\nexport let eager_block_effects = null;\n\n/**\n * @param {Array<Effect>} effects\n * @returns {void}\n */\nfunction flush_queued_effects(effects) {\n\tvar length = effects.length;\n\tif (length === 0) return;\n\n\tvar i = 0;\n\n\twhile (i < length) {\n\t\tvar effect = effects[i++];\n\n\t\tif ((effect.f & (DESTROYED | INERT)) === 0 && is_dirty(effect)) {\n\t\t\teager_block_effects = new Set();\n\n\t\t\tupdate_effect(effect);\n\n\t\t\t// Effects with no dependencies or teardown do not get added to the effect tree.\n\t\t\t// Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we\n\t\t\t// don't know if we need to keep them until they are executed. Doing the check\n\t\t\t// here (rather than in `update_effect`) allows us to skip the work for\n\t\t\t// immediate effects.\n\t\t\tif (\n\t\t\t\teffect.deps === null &&\n\t\t\t\teffect.first === null &&\n\t\t\t\teffect.nodes === null &&\n\t\t\t\teffect.teardown === null &&\n\t\t\t\teffect.ac === null\n\t\t\t) {\n\t\t\t\t// remove this effect from the graph\n\t\t\t\tunlink_effect(effect);\n\t\t\t}\n\n\t\t\t// If update_effect() has a flushSync() in it, we may have flushed another flush_queued_effects(),\n\t\t\t// which already handled this logic and did set eager_block_effects to null.\n\t\t\tif (eager_block_effects?.size > 0) {\n\t\t\t\told_values.clear();\n\n\t\t\t\tfor (const e of eager_block_effects) {\n\t\t\t\t\t// Skip eager effects that have already been unmounted\n\t\t\t\t\tif ((e.f & (DESTROYED | INERT)) !== 0) continue;\n\n\t\t\t\t\t// Run effects in order from ancestor to descendant, else we could run into nullpointers\n\t\t\t\t\t/** @type {Effect[]} */\n\t\t\t\t\tconst ordered_effects = [e];\n\t\t\t\t\tlet ancestor = e.parent;\n\t\t\t\t\twhile (ancestor !== null) {\n\t\t\t\t\t\tif (eager_block_effects.has(ancestor)) {\n\t\t\t\t\t\t\teager_block_effects.delete(ancestor);\n\t\t\t\t\t\t\tordered_effects.push(ancestor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tancestor = ancestor.parent;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (let j = ordered_effects.length - 1; j >= 0; j--) {\n\t\t\t\t\t\tconst e = ordered_effects[j];\n\t\t\t\t\t\t// Skip eager effects that have already been unmounted\n\t\t\t\t\t\tif ((e.f & (DESTROYED | INERT)) !== 0) continue;\n\t\t\t\t\t\tupdate_effect(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\teager_block_effects.clear();\n\t\t\t}\n\t\t}\n\t}\n\n\teager_block_effects = null;\n}\n\n/**\n * This is similar to `mark_reactions`, but it only marks async/block effects\n * depending on `value` and at least one of the other `sources`, so that\n * these effects can re-run after another batch has been committed\n * @param {Value} value\n * @param {Source[]} sources\n * @param {Set<Value>} marked\n * @param {Map<Reaction, boolean>} checked\n */\nfunction mark_effects(value, sources, marked, checked) {\n\tif (marked.has(value)) return;\n\tmarked.add(value);\n\n\tif (value.reactions !== null) {\n\t\tfor (const reaction of value.reactions) {\n\t\t\tconst flags = reaction.f;\n\n\t\t\tif ((flags & DERIVED) !== 0) {\n\t\t\t\tmark_effects(/** @type {Derived} */ (reaction), sources, marked, checked);\n\t\t\t} else if (\n\t\t\t\t(flags & (ASYNC | BLOCK_EFFECT)) !== 0 &&\n\t\t\t\t(flags & DIRTY) === 0 &&\n\t\t\t\tdepends_on(reaction, sources, checked)\n\t\t\t) {\n\t\t\t\tset_signal_status(reaction, DIRTY);\n\t\t\t\tschedule_effect(/** @type {Effect} */ (reaction));\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * When committing a fork, we need to trigger eager effects so that\n * any `$state.eager(...)` expressions update immediately. This\n * function allows us to discover them\n * @param {Value} value\n * @param {Set<Effect>} effects\n */\nfunction mark_eager_effects(value, effects) {\n\tif (value.reactions === null) return;\n\n\tfor (const reaction of value.reactions) {\n\t\tconst flags = reaction.f;\n\n\t\tif ((flags & DERIVED) !== 0) {\n\t\t\tmark_eager_effects(/** @type {Derived} */ (reaction), effects);\n\t\t} else if ((flags & EAGER_EFFECT) !== 0) {\n\t\t\tset_signal_status(reaction, DIRTY);\n\t\t\teffects.add(/** @type {Effect} */ (reaction));\n\t\t}\n\t}\n}\n\n/**\n * @param {Reaction} reaction\n * @param {Source[]} sources\n * @param {Map<Reaction, boolean>} checked\n */\nfunction depends_on(reaction, sources, checked) {\n\tconst depends = checked.get(reaction);\n\tif (depends !== undefined) return depends;\n\n\tif (reaction.deps !== null) {\n\t\tfor (const dep of reaction.deps) {\n\t\t\tif (includes.call(sources, dep)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ((dep.f & DERIVED) !== 0 && depends_on(/** @type {Derived} */ (dep), sources, checked)) {\n\t\t\t\tchecked.set(/** @type {Derived} */ (dep), true);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\tchecked.set(reaction, false);\n\n\treturn false;\n}\n\n/**\n * @param {Effect} effect\n * @returns {void}\n */\nexport function schedule_effect(effect) {\n\t/** @type {Batch} */ (current_batch).schedule(effect);\n}\n\n/** @type {Source<number>[]} */\nlet eager_versions = [];\n\nfunction eager_flush() {\n\ttry {\n\t\tflushSync(() => {\n\t\t\tfor (const version of eager_versions) {\n\t\t\t\tupdate(version);\n\t\t\t}\n\t\t});\n\t} finally {\n\t\teager_versions = [];\n\t}\n}\n\n/**\n * Implementation of `$state.eager(fn())`\n * @template T\n * @param {() => T} fn\n * @returns {T}\n */\nexport function eager(fn) {\n\tvar version = source(0);\n\tvar initial = true;\n\tvar value = /** @type {T} */ (undefined);\n\n\tget(version);\n\n\teager_effect(() => {\n\t\tif (initial) {\n\t\t\t// the first time this runs, we create an eager effect\n\t\t\t// that will run eagerly whenever the expression changes\n\t\t\tvar previous_batch_values = batch_values;\n\n\t\t\ttry {\n\t\t\t\tbatch_values = null;\n\t\t\t\tvalue = fn();\n\t\t\t} finally {\n\t\t\t\tbatch_values = previous_batch_values;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// the second time this effect runs, it's to schedule a\n\t\t// `version` update. since this will recreate the effect,\n\t\t// we don't need to evaluate the expression here\n\t\tif (eager_versions.length === 0) {\n\t\t\tqueue_micro_task(eager_flush);\n\t\t}\n\n\t\teager_versions.push(version);\n\t});\n\n\tinitial = false;\n\n\treturn value;\n}\n\n/**\n * Mark all the effects inside a skipped branch CLEAN, so that\n * they can be correctly rescheduled later. Tracks dirty and maybe_dirty\n * effects so they can be rescheduled if the branch survives.\n * @param {Effect} effect\n * @param {{ d: Effect[], m: Effect[] }} tracked\n */\nfunction reset_branch(effect, tracked) {\n\t// clean branch = nothing dirty inside, no need to traverse further\n\tif ((effect.f & BRANCH_EFFECT) !== 0 && (effect.f & CLEAN) !== 0) {\n\t\treturn;\n\t}\n\n\tif ((effect.f & DIRTY) !== 0) {\n\t\ttracked.d.push(effect);\n\t} else if ((effect.f & MAYBE_DIRTY) !== 0) {\n\t\ttracked.m.push(effect);\n\t}\n\n\tset_signal_status(effect, CLEAN);\n\n\tvar e = effect.first;\n\twhile (e !== null) {\n\t\treset_branch(e, tracked);\n\t\te = e.next;\n\t}\n}\n\n/**\n * Mark an entire effect tree clean following an error\n * @param {Effect} effect\n */\nfunction reset_all(effect) {\n\tset_signal_status(effect, CLEAN);\n\n\tvar e = effect.first;\n\twhile (e !== null) {\n\t\treset_all(e);\n\t\te = e.next;\n\t}\n}\n\n/**\n * Creates a 'fork', in which state changes are evaluated but not applied to the DOM.\n * This is useful for speculatively loading data (for example) when you suspect that\n * the user is about to take some action.\n *\n * Frameworks like SvelteKit can use this to preload data when the user touches or\n * hovers over a link, making any subsequent navigation feel instantaneous.\n *\n * The `fn` parameter is a synchronous function that modifies some state. The\n * state changes will be reverted after the fork is initialised, then reapplied\n * if and when the fork is eventually committed.\n *\n * When it becomes clear that a fork will _not_ be committed (e.g. because the\n * user navigated elsewhere), it must be discarded to avoid leaking memory.\n *\n * @param {() => void} fn\n * @returns {Fork}\n * @since 5.42\n */\nexport function fork(fn) {\n\tif (!async_mode_flag) {\n\t\te.experimental_async_required('fork');\n\t}\n\n\tif (current_batch !== null) {\n\t\te.fork_timing();\n\t}\n\n\tvar batch = Batch.ensure();\n\tbatch.is_fork = true;\n\tbatch_values = new Map();\n\n\tvar committed = false;\n\tvar settled = batch.settled();\n\n\tflushSync(fn);\n\n\t// revert state changes\n\tfor (var [source, value] of batch.previous) {\n\t\tsource.v = value;\n\t}\n\n\treturn {\n\t\tcommit: async () => {\n\t\t\tif (committed) {\n\t\t\t\tawait settled;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!batches.has(batch)) {\n\t\t\t\te.fork_discarded();\n\t\t\t}\n\n\t\t\tcommitted = true;\n\n\t\t\tbatch.is_fork = false;\n\n\t\t\t// apply changes and update write versions so deriveds see the change\n\t\t\tfor (var [source, [value]] of batch.current) {\n\t\t\t\tsource.v = value;\n\t\t\t\tsource.wv = increment_write_version();\n\t\t\t}\n\n\t\t\t// trigger any `$state.eager(...)` expressions with the new state.\n\t\t\t// eager effects don't get scheduled like other effects, so we\n\t\t\t// can't just encounter them during traversal, we need to\n\t\t\t// proactively flush them\n\t\t\t// TODO maybe there's a better implementation?\n\t\t\tflushSync(() => {\n\t\t\t\t/** @type {Set<Effect>} */\n\t\t\t\tvar eager_effects = new Set();\n\n\t\t\t\tfor (var source of batch.current.keys()) {\n\t\t\t\t\tmark_eager_effects(source, eager_effects);\n\t\t\t\t}\n\n\t\t\t\tset_eager_effects(eager_effects);\n\t\t\t\tflush_eager_effects();\n\t\t\t});\n\n\t\t\tbatch.flush();\n\t\t\tawait settled;\n\t\t},\n\t\tdiscard: () => {\n\t\t\t// cause any MAYBE_DIRTY deriveds to update\n\t\t\t// if they depend on things thath changed\n\t\t\t// inside the discarded fork\n\t\t\tfor (var source of batch.current.keys()) {\n\t\t\t\tsource.wv = increment_write_version();\n\t\t\t}\n\n\t\t\tif (!committed && batches.has(batch)) {\n\t\t\t\tbatch.discard();\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Forcibly remove all current batches, to prevent cross-talk between tests\n */\nexport function clear() {\n\tbatches.clear();\n}\n", "import { hydrating } from '../hydration.js';\nimport { clear_text_content, get_first_child } from '../operations.js';\nimport { queue_micro_task } from '../task.js';\n\n/**\n * @param {HTMLElement} dom\n * @param {boolean} value\n * @returns {void}\n */\nexport function autofocus(dom, value) {\n\tif (value) {\n\t\tconst body = document.body;\n\t\tdom.autofocus = true;\n\n\t\tqueue_micro_task(() => {\n\t\t\tif (document.activeElement === body) {\n\t\t\t\tdom.focus();\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * The child of a textarea actually corresponds to the defaultValue property, so we need\n * to remove it upon hydration to avoid a bug when someone resets the form value.\n * @param {HTMLTextAreaElement} dom\n * @returns {void}\n */\nexport function remove_textarea_child(dom) {\n\tif (hydrating && get_first_child(dom) !== null) {\n\t\tclear_text_content(dom);\n\t}\n}\n\nlet listening_to_form_reset = false;\n\nexport function add_form_reset_listener() {\n\tif (!listening_to_form_reset) {\n\t\tlistening_to_form_reset = true;\n\t\tdocument.addEventListener(\n\t\t\t'reset',\n\t\t\t(evt) => {\n\t\t\t\t// Needs to happen one tick later or else the dom properties of the form\n\t\t\t\t// elements have not updated to their reset values yet\n\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\tif (!evt.defaultPrevented) {\n\t\t\t\t\t\tfor (const e of /**@type {HTMLFormElement} */ (evt.target).elements) {\n\t\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\t\te.__on_r?.();\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\t// In the capture phase to guarantee we get noticed of it (no possibility of stopPropagation)\n\t\t\t{ capture: true }\n\t\t);\n\t}\n}\n", "import { teardown } from '../../../reactivity/effects.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tset_active_effect,\n\tset_active_reaction\n} from '../../../runtime.js';\nimport { add_form_reset_listener } from '../misc.js';\n\n/**\n * Fires the handler once immediately (unless corresponding arg is set to `false`),\n * then listens to the given events until the render effect context is destroyed\n * @param {EventTarget} target\n * @param {Array<string>} events\n * @param {(event?: Event) => void} handler\n * @param {any} call_handler_immediately\n */\nexport function listen(target, events, handler, call_handler_immediately = true) {\n\tif (call_handler_immediately) {\n\t\thandler();\n\t}\n\n\tfor (var name of events) {\n\t\ttarget.addEventListener(name, handler);\n\t}\n\n\tteardown(() => {\n\t\tfor (var name of events) {\n\t\t\ttarget.removeEventListener(name, handler);\n\t\t}\n\t});\n}\n\n/**\n * @template T\n * @param {() => T} fn\n */\nexport function without_reactive_context(fn) {\n\tvar previous_reaction = active_reaction;\n\tvar previous_effect = active_effect;\n\tset_active_reaction(null);\n\tset_active_effect(null);\n\ttry {\n\t\treturn fn();\n\t} finally {\n\t\tset_active_reaction(previous_reaction);\n\t\tset_active_effect(previous_effect);\n\t}\n}\n\n/**\n * Listen to the given event, and then instantiate a global form reset listener if not already done,\n * to notify all bindings when the form is reset\n * @param {HTMLElement} element\n * @param {string} event\n * @param {(is_reset?: true) => void} handler\n * @param {(is_reset?: true) => void} [on_reset]\n */\nexport function listen_to_event_and_reset_event(element, event, handler, on_reset = handler) {\n\telement.addEventListener(event, () => without_reactive_context(handler));\n\t// @ts-expect-error\n\tconst prev = element.__on_r;\n\tif (prev) {\n\t\t// special case for checkbox that can have multiple binds (group & checked)\n\t\t// @ts-expect-error\n\t\telement.__on_r = () => {\n\t\t\tprev();\n\t\t\ton_reset(true);\n\t\t};\n\t} else {\n\t\t// @ts-expect-error\n\t\telement.__on_r = () => on_reset(true);\n\t}\n\n\tadd_form_reset_listener();\n}\n", "/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */\nimport {\n\tis_dirty,\n\tactive_effect,\n\tactive_reaction,\n\tupdate_effect,\n\tget,\n\tis_destroying_effect,\n\tremove_reactions,\n\tset_active_reaction,\n\tset_is_destroying_effect,\n\tuntrack,\n\tuntracking,\n\tset_active_effect\n} from '../runtime.js';\nimport {\n\tDIRTY,\n\tBRANCH_EFFECT,\n\tRENDER_EFFECT,\n\tEFFECT,\n\tDESTROYED,\n\tINERT,\n\tREACTION_RAN,\n\tBLOCK_EFFECT,\n\tROOT_EFFECT,\n\tEFFECT_TRANSPARENT,\n\tDERIVED,\n\tCLEAN,\n\tEAGER_EFFECT,\n\tHEAD_EFFECT,\n\tMAYBE_DIRTY,\n\tEFFECT_PRESERVED,\n\tSTALE_REACTION,\n\tUSER_EFFECT,\n\tASYNC,\n\tCONNECTED,\n\tMANAGED_EFFECT,\n\tDESTROYING\n} from '#client/constants';\nimport * as e from '../errors.js';\nimport { DEV } from 'esm-env';\nimport { define_property } from '../../shared/utils.js';\nimport { get_next_sibling } from '../dom/operations.js';\nimport { component_context, dev_current_component_function, dev_stack } from '../context.js';\nimport { Batch, collected_effects, current_batch } from './batch.js';\nimport { flatten, increment_pending } from './async.js';\nimport { without_reactive_context } from '../dom/elements/bindings/shared.js';\nimport { set_signal_status } from './status.js';\n\n/**\n * @param {'$effect' | '$effect.pre' | '$inspect'} rune\n */\nexport function validate_effect(rune) {\n\tif (active_effect === null) {\n\t\tif (active_reaction === null) {\n\t\t\te.effect_orphan(rune);\n\t\t}\n\n\t\te.effect_in_unowned_derived();\n\t}\n\n\tif (is_destroying_effect) {\n\t\te.effect_in_teardown(rune);\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @param {Effect} parent_effect\n */\nfunction push_effect(effect, parent_effect) {\n\tvar parent_last = parent_effect.last;\n\tif (parent_last === null) {\n\t\tparent_effect.last = parent_effect.first = effect;\n\t} else {\n\t\tparent_last.next = effect;\n\t\teffect.prev = parent_last;\n\t\tparent_effect.last = effect;\n\t}\n}\n\n/**\n * @param {number} type\n * @param {null | (() => void | (() => void))} fn\n * @returns {Effect}\n */\nfunction create_effect(type, fn) {\n\tvar parent = active_effect;\n\n\tif (DEV) {\n\t\t// Ensure the parent is never an inspect effect\n\t\twhile (parent !== null && (parent.f & EAGER_EFFECT) !== 0) {\n\t\t\tparent = parent.parent;\n\t\t}\n\t}\n\n\tif (parent !== null && (parent.f & INERT) !== 0) {\n\t\ttype |= INERT;\n\t}\n\n\t/** @type {Effect} */\n\tvar effect = {\n\t\tctx: component_context,\n\t\tdeps: null,\n\t\tnodes: null,\n\t\tf: type | DIRTY | CONNECTED,\n\t\tfirst: null,\n\t\tfn,\n\t\tlast: null,\n\t\tnext: null,\n\t\tparent,\n\t\tb: parent && parent.b,\n\t\tprev: null,\n\t\tteardown: null,\n\t\twv: 0,\n\t\tac: null\n\t};\n\n\tif (DEV) {\n\t\teffect.component_function = dev_current_component_function;\n\t}\n\n\tcurrent_batch?.register_created_effect(effect);\n\n\t/** @type {Effect | null} */\n\tvar e = effect;\n\n\tif ((type & EFFECT) !== 0) {\n\t\tif (collected_effects !== null) {\n\t\t\t// created during traversal — collect and run afterwards\n\t\t\tcollected_effects.push(effect);\n\t\t} else {\n\t\t\t// schedule for later\n\t\t\tBatch.ensure().schedule(effect);\n\t\t}\n\t} else if (fn !== null) {\n\t\ttry {\n\t\t\tupdate_effect(effect);\n\t\t} catch (e) {\n\t\t\tdestroy_effect(effect);\n\t\t\tthrow e;\n\t\t}\n\n\t\t// if an effect doesn't need to be kept in the tree (because it\n\t\t// won't re-run, has no DOM, and has no teardown etc)\n\t\t// then we skip it and go to its child (if any)\n\t\tif (\n\t\t\te.deps === null &&\n\t\t\te.teardown === null &&\n\t\t\te.nodes === null &&\n\t\t\te.first === e.last && // either `null`, or a singular child\n\t\t\t(e.f & EFFECT_PRESERVED) === 0\n\t\t) {\n\t\t\te = e.first;\n\t\t\tif ((type & BLOCK_EFFECT) !== 0 && (type & EFFECT_TRANSPARENT) !== 0 && e !== null) {\n\t\t\t\te.f |= EFFECT_TRANSPARENT;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (e !== null) {\n\t\te.parent = parent;\n\n\t\tif (parent !== null) {\n\t\t\tpush_effect(e, parent);\n\t\t}\n\n\t\t// if we're in a derived, add the effect there too\n\t\tif (\n\t\t\tactive_reaction !== null &&\n\t\t\t(active_reaction.f & DERIVED) !== 0 &&\n\t\t\t(type & ROOT_EFFECT) === 0\n\t\t) {\n\t\t\tvar derived = /** @type {Derived} */ (active_reaction);\n\t\t\t(derived.effects ??= []).push(e);\n\t\t}\n\t}\n\n\treturn effect;\n}\n\n/**\n * Internal representation of `$effect.tracking()`\n * @returns {boolean}\n */\nexport function effect_tracking() {\n\treturn active_reaction !== null && !untracking;\n}\n\n/**\n * @param {() => void} fn\n */\nexport function teardown(fn) {\n\tconst effect = create_effect(RENDER_EFFECT, null);\n\tset_signal_status(effect, CLEAN);\n\teffect.teardown = fn;\n\treturn effect;\n}\n\n/**\n * Internal representation of `$effect(...)`\n * @param {() => void | (() => void)} fn\n */\nexport function user_effect(fn) {\n\tvalidate_effect('$effect');\n\n\tif (DEV) {\n\t\tdefine_property(fn, 'name', {\n\t\t\tvalue: '$effect'\n\t\t});\n\t}\n\n\t// Non-nested `$effect(...)` in a component should be deferred\n\t// until the component is mounted\n\tvar flags = /** @type {Effect} */ (active_effect).f;\n\tvar defer = !active_reaction && (flags & BRANCH_EFFECT) !== 0 && (flags & REACTION_RAN) === 0;\n\n\tif (defer) {\n\t\t// Top-level `$effect(...)` in an unmounted component — defer until mount\n\t\tvar context = /** @type {ComponentContext} */ (component_context);\n\t\t(context.e ??= []).push(fn);\n\t} else {\n\t\t// Everything else — create immediately\n\t\treturn create_user_effect(fn);\n\t}\n}\n\n/**\n * @param {() => void | (() => void)} fn\n */\nexport function create_user_effect(fn) {\n\treturn create_effect(EFFECT | USER_EFFECT, fn);\n}\n\n/**\n * Internal representation of `$effect.pre(...)`\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function user_pre_effect(fn) {\n\tvalidate_effect('$effect.pre');\n\tif (DEV) {\n\t\tdefine_property(fn, 'name', {\n\t\t\tvalue: '$effect.pre'\n\t\t});\n\t}\n\treturn create_effect(RENDER_EFFECT | USER_EFFECT, fn);\n}\n\n/** @param {() => void | (() => void)} fn */\nexport function eager_effect(fn) {\n\treturn create_effect(EAGER_EFFECT, fn);\n}\n\n/**\n * Internal representation of `$effect.root(...)`\n * @param {() => void | (() => void)} fn\n * @returns {() => void}\n */\nexport function effect_root(fn) {\n\tBatch.ensure();\n\tconst effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn);\n\n\treturn () => {\n\t\tdestroy_effect(effect);\n\t};\n}\n\n/**\n * An effect root whose children can transition out\n * @param {() => void} fn\n * @returns {(options?: { outro?: boolean }) => Promise<void>}\n */\nexport function component_root(fn) {\n\tBatch.ensure();\n\tconst effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn);\n\n\treturn (options = {}) => {\n\t\treturn new Promise((fulfil) => {\n\t\t\tif (options.outro) {\n\t\t\t\tpause_effect(effect, () => {\n\t\t\t\t\tdestroy_effect(effect);\n\t\t\t\t\tfulfil(undefined);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdestroy_effect(effect);\n\t\t\t\tfulfil(undefined);\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function effect(fn) {\n\treturn create_effect(EFFECT, fn);\n}\n\n/**\n * Internal representation of `$: ..`\n * @param {() => any} deps\n * @param {() => void | (() => void)} fn\n */\nexport function legacy_pre_effect(deps, fn) {\n\tvar context = /** @type {ComponentContextLegacy} */ (component_context);\n\n\t/** @type {{ effect: null | Effect, ran: boolean, deps: () => any }} */\n\tvar token = { effect: null, ran: false, deps };\n\n\tcontext.l.$.push(token);\n\n\ttoken.effect = render_effect(() => {\n\t\tdeps();\n\n\t\t// If this legacy pre effect has already run before the end of the reset, then\n\t\t// bail out to emulate the same behavior.\n\t\tif (token.ran) return;\n\n\t\ttoken.ran = true;\n\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\t// here, we lie: by setting `active_effect` to be the parent branch, any writes\n\t\t// that happen inside `fn` will _not_ cause an unnecessary reschedule, because\n\t\t// the affected effects will be children of `active_effect`. this is safe\n\t\t// because these effects are known to run in the correct order\n\t\ttry {\n\t\t\tset_active_effect(effect.parent);\n\t\t\tuntrack(fn);\n\t\t} finally {\n\t\t\tset_active_effect(effect);\n\t\t}\n\t});\n}\n\nexport function legacy_pre_effect_reset() {\n\tvar context = /** @type {ComponentContextLegacy} */ (component_context);\n\n\trender_effect(() => {\n\t\t// Run dirty `$:` statements\n\t\tfor (var token of context.l.$) {\n\t\t\ttoken.deps();\n\n\t\t\tvar effect = token.effect;\n\n\t\t\t// If the effect is CLEAN, then make it MAYBE_DIRTY. This ensures we traverse through\n\t\t\t// the effects dependencies and correctly ensure each dependency is up-to-date.\n\t\t\tif ((effect.f & CLEAN) !== 0 && effect.deps !== null) {\n\t\t\t\tset_signal_status(effect, MAYBE_DIRTY);\n\t\t\t}\n\n\t\t\tif (is_dirty(effect)) {\n\t\t\t\tupdate_effect(effect);\n\t\t\t}\n\n\t\t\ttoken.ran = false;\n\t\t}\n\t});\n}\n\n/**\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function async_effect(fn) {\n\treturn create_effect(ASYNC | EFFECT_PRESERVED, fn);\n}\n\n/**\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function render_effect(fn, flags = 0) {\n\treturn create_effect(RENDER_EFFECT | flags, fn);\n}\n\n/**\n * @param {(...expressions: any) => void | (() => void)} fn\n * @param {Array<() => any>} sync\n * @param {Array<() => Promise<any>>} async\n * @param {Blocker[]} blockers\n */\nexport function template_effect(fn, sync = [], async = [], blockers = []) {\n\tflatten(blockers, sync, async, (values) => {\n\t\tcreate_effect(RENDER_EFFECT, () => fn(...values.map(get)));\n\t});\n}\n\n/**\n * Like `template_effect`, but with an effect which is deferred until the batch commits\n * @param {(...expressions: any) => void | (() => void)} fn\n * @param {Array<() => any>} sync\n * @param {Array<() => Promise<any>>} async\n * @param {Blocker[]} blockers\n */\nexport function deferred_template_effect(fn, sync = [], async = [], blockers = []) {\n\tif (async.length > 0 || blockers.length > 0) {\n\t\tvar decrement_pending = increment_pending();\n\t}\n\n\tflatten(blockers, sync, async, (values) => {\n\t\tcreate_effect(EFFECT, () => fn(...values.map(get)));\n\n\t\tif (decrement_pending) {\n\t\t\tdecrement_pending();\n\t\t}\n\t});\n}\n\n/**\n * @param {(() => void)} fn\n * @param {number} flags\n */\nexport function block(fn, flags = 0) {\n\tvar effect = create_effect(BLOCK_EFFECT | flags, fn);\n\tif (DEV) {\n\t\teffect.dev_stack = dev_stack;\n\t}\n\treturn effect;\n}\n\n/**\n * @param {(() => void)} fn\n * @param {number} flags\n */\nexport function managed(fn, flags = 0) {\n\tvar effect = create_effect(MANAGED_EFFECT | flags, fn);\n\tif (DEV) {\n\t\teffect.dev_stack = dev_stack;\n\t}\n\treturn effect;\n}\n\n/**\n * @param {(() => void)} fn\n */\nexport function branch(fn) {\n\treturn create_effect(BRANCH_EFFECT | EFFECT_PRESERVED, fn);\n}\n\n/**\n * @param {Effect} effect\n */\nexport function execute_effect_teardown(effect) {\n\tvar teardown = effect.teardown;\n\tif (teardown !== null) {\n\t\tconst previously_destroying_effect = is_destroying_effect;\n\t\tconst previous_reaction = active_reaction;\n\t\tset_is_destroying_effect(true);\n\t\tset_active_reaction(null);\n\t\ttry {\n\t\t\tteardown.call(null);\n\t\t} finally {\n\t\t\tset_is_destroying_effect(previously_destroying_effect);\n\t\t\tset_active_reaction(previous_reaction);\n\t\t}\n\t}\n}\n\n/**\n * @param {Effect} signal\n * @param {boolean} remove_dom\n * @returns {void}\n */\nexport function destroy_effect_children(signal, remove_dom = false) {\n\tvar effect = signal.first;\n\tsignal.first = signal.last = null;\n\n\twhile (effect !== null) {\n\t\tconst controller = effect.ac;\n\n\t\tif (controller !== null) {\n\t\t\twithout_reactive_context(() => {\n\t\t\t\tcontroller.abort(STALE_REACTION);\n\t\t\t});\n\t\t}\n\n\t\tvar next = effect.next;\n\n\t\tif ((effect.f & ROOT_EFFECT) !== 0) {\n\t\t\t// this is now an independent root\n\t\t\teffect.parent = null;\n\t\t} else {\n\t\t\tdestroy_effect(effect, remove_dom);\n\t\t}\n\n\t\teffect = next;\n\t}\n}\n\n/**\n * @param {Effect} signal\n * @returns {void}\n */\nexport function destroy_block_effect_children(signal) {\n\tvar effect = signal.first;\n\n\twhile (effect !== null) {\n\t\tvar next = effect.next;\n\t\tif ((effect.f & BRANCH_EFFECT) === 0) {\n\t\t\tdestroy_effect(effect);\n\t\t}\n\t\teffect = next;\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @param {boolean} [remove_dom]\n * @returns {void}\n */\nexport function destroy_effect(effect, remove_dom = true) {\n\tvar removed = false;\n\n\tif (\n\t\t(remove_dom || (effect.f & HEAD_EFFECT) !== 0) &&\n\t\teffect.nodes !== null &&\n\t\teffect.nodes.end !== null\n\t) {\n\t\tremove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));\n\t\tremoved = true;\n\t}\n\n\tset_signal_status(effect, DESTROYING);\n\tdestroy_effect_children(effect, remove_dom && !removed);\n\tremove_reactions(effect, 0);\n\n\tvar transitions = effect.nodes && effect.nodes.t;\n\n\tif (transitions !== null) {\n\t\tfor (const transition of transitions) {\n\t\t\ttransition.stop();\n\t\t}\n\t}\n\n\texecute_effect_teardown(effect);\n\n\teffect.f ^= DESTROYING;\n\teffect.f |= DESTROYED;\n\n\tvar parent = effect.parent;\n\n\t// If the parent doesn't have any children, then skip this work altogether\n\tif (parent !== null && parent.first !== null) {\n\t\tunlink_effect(effect);\n\t}\n\n\tif (DEV) {\n\t\teffect.component_function = null;\n\t}\n\n\t// `first` and `child` are nulled out in destroy_effect_children\n\t// we don't null out `parent` so that error propagation can work correctly\n\teffect.next =\n\t\teffect.prev =\n\t\teffect.teardown =\n\t\teffect.ctx =\n\t\teffect.deps =\n\t\teffect.fn =\n\t\teffect.nodes =\n\t\teffect.ac =\n\t\teffect.b =\n\t\t\tnull;\n}\n\n/**\n *\n * @param {TemplateNode | null} node\n * @param {TemplateNode} end\n */\nexport function remove_effect_dom(node, end) {\n\twhile (node !== null) {\n\t\t/** @type {TemplateNode | null} */\n\t\tvar next = node === end ? null : get_next_sibling(node);\n\n\t\tnode.remove();\n\t\tnode = next;\n\t}\n}\n\n/**\n * Detach an effect from the effect tree, freeing up memory and\n * reducing the amount of work that happens on subsequent traversals\n * @param {Effect} effect\n */\nexport function unlink_effect(effect) {\n\tvar parent = effect.parent;\n\tvar prev = effect.prev;\n\tvar next = effect.next;\n\n\tif (prev !== null) prev.next = next;\n\tif (next !== null) next.prev = prev;\n\n\tif (parent !== null) {\n\t\tif (parent.first === effect) parent.first = next;\n\t\tif (parent.last === effect) parent.last = prev;\n\t}\n}\n\n/**\n * When a block effect is removed, we don't immediately destroy it or yank it\n * out of the DOM, because it might have transitions. Instead, we 'pause' it.\n * It stays around (in memory, and in the DOM) until outro transitions have\n * completed, and if the state change is reversed then we _resume_ it.\n * A paused effect does not update, and the DOM subtree becomes inert.\n * @param {Effect} effect\n * @param {() => void} [callback]\n * @param {boolean} [destroy]\n */\nexport function pause_effect(effect, callback, destroy = true) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\n\tpause_children(effect, transitions, true);\n\n\tvar fn = () => {\n\t\tif (destroy) destroy_effect(effect);\n\t\tif (callback) callback();\n\t};\n\n\tvar remaining = transitions.length;\n\tif (remaining > 0) {\n\t\tvar check = () => --remaining || fn();\n\t\tfor (var transition of transitions) {\n\t\t\ttransition.out(check);\n\t\t}\n\t} else {\n\t\tfn();\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @param {TransitionManager[]} transitions\n * @param {boolean} local\n */\nfunction pause_children(effect, transitions, local) {\n\tif ((effect.f & INERT) !== 0) return;\n\teffect.f ^= INERT;\n\n\tvar t = effect.nodes && effect.nodes.t;\n\n\tif (t !== null) {\n\t\tfor (const transition of t) {\n\t\t\tif (transition.is_global || local) {\n\t\t\t\ttransitions.push(transition);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar child = effect.first;\n\n\twhile (child !== null) {\n\t\tvar sibling = child.next;\n\t\tvar transparent =\n\t\t\t(child.f & EFFECT_TRANSPARENT) !== 0 ||\n\t\t\t// If this is a branch effect without a block effect parent,\n\t\t\t// it means the parent block effect was pruned. In that case,\n\t\t\t// transparency information was transferred to the branch effect.\n\t\t\t((child.f & BRANCH_EFFECT) !== 0 && (effect.f & BLOCK_EFFECT) !== 0);\n\t\t// TODO we don't need to call pause_children recursively with a linked list in place\n\t\t// it's slightly more involved though as we have to account for `transparent` changing\n\t\t// through the tree.\n\t\tpause_children(child, transitions, transparent ? local : false);\n\t\tchild = sibling;\n\t}\n}\n\n/**\n * The opposite of `pause_effect`. We call this if (for example)\n * `x` becomes falsy then truthy: `{#if x}...{/if}`\n * @param {Effect} effect\n */\nexport function resume_effect(effect) {\n\tresume_children(effect, true);\n}\n\n/**\n * @param {Effect} effect\n * @param {boolean} local\n */\nfunction resume_children(effect, local) {\n\tif ((effect.f & INERT) === 0) return;\n\teffect.f ^= INERT;\n\n\t// If a dependency of this effect changed while it was paused,\n\t// schedule the effect to update. we don't use `is_dirty`\n\t// here because we don't want to eagerly recompute a derived like\n\t// `{#if foo}{foo.bar()}{/if}` if `foo` is now `undefined\n\tif ((effect.f & CLEAN) === 0) {\n\t\tset_signal_status(effect, DIRTY);\n\t\tBatch.ensure().schedule(effect); // Assumption: This happens during the commit phase of the batch, causing another flush, but it's safe\n\t}\n\n\tvar child = effect.first;\n\n\twhile (child !== null) {\n\t\tvar sibling = child.next;\n\t\tvar transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0;\n\t\t// TODO we don't need to call resume_children recursively with a linked list in place\n\t\t// it's slightly more involved though as we have to account for `transparent` changing\n\t\t// through the tree.\n\t\tresume_children(child, transparent ? local : false);\n\t\tchild = sibling;\n\t}\n\n\tvar t = effect.nodes && effect.nodes.t;\n\n\tif (t !== null) {\n\t\tfor (const transition of t) {\n\t\t\tif (transition.is_global || local) {\n\t\t\t\ttransition.in();\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function aborted(effect = /** @type {Effect} */ (active_effect)) {\n\treturn (effect.f & DESTROYED) !== 0;\n}\n\n/**\n * @param {Effect} effect\n * @param {DocumentFragment} fragment\n */\nexport function move_effect(effect, fragment) {\n\tif (!effect.nodes) return;\n\n\t/** @type {TemplateNode | null} */\n\tvar node = effect.nodes.start;\n\tvar end = effect.nodes.end;\n\n\twhile (node !== null) {\n\t\t/** @type {TemplateNode | null} */\n\t\tvar next = node === end ? null : get_next_sibling(node);\n\n\t\tfragment.append(node);\n\t\tnode = next;\n\t}\n}\n", "/** @import { Value } from '#client' */\nimport { internal_set } from './reactivity/sources.js';\nimport { untrack } from './runtime.js';\n\n/**\n * @type {Set<Value> | null}\n * @deprecated\n */\nexport let captured_signals = null;\n\n/**\n * Capture an array of all the signals that are read when `fn` is called\n * @template T\n * @param {() => T} fn\n */\nfunction capture_signals(fn) {\n\tvar previous_captured_signals = captured_signals;\n\n\ttry {\n\t\tcaptured_signals = new Set();\n\n\t\tuntrack(fn);\n\n\t\tif (previous_captured_signals !== null) {\n\t\t\tfor (var signal of captured_signals) {\n\t\t\t\tprevious_captured_signals.add(signal);\n\t\t\t}\n\t\t}\n\n\t\treturn captured_signals;\n\t} finally {\n\t\tcaptured_signals = previous_captured_signals;\n\t}\n}\n\n/**\n * Invokes a function and captures all signals that are read during the invocation,\n * then invalidates them.\n * @param {() => any} fn\n * @deprecated\n */\nexport function invalidate_inner_signals(fn) {\n\tfor (var signal of capture_signals(fn)) {\n\t\tinternal_set(signal, signal.v);\n\t}\n}\n", "/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */\nimport { DEV } from 'esm-env';\nimport { get_descriptors, get_prototype_of, includes, index_of } from '../shared/utils.js';\nimport {\n\tdestroy_block_effect_children,\n\tdestroy_effect_children,\n\teffect_tracking,\n\texecute_effect_teardown\n} from './reactivity/effects.js';\nimport {\n\tDIRTY,\n\tMAYBE_DIRTY,\n\tCLEAN,\n\tDERIVED,\n\tDESTROYED,\n\tBRANCH_EFFECT,\n\tSTATE_SYMBOL,\n\tBLOCK_EFFECT,\n\tROOT_EFFECT,\n\tCONNECTED,\n\tREACTION_IS_UPDATING,\n\tSTALE_REACTION,\n\tERROR_VALUE,\n\tWAS_MARKED,\n\tMANAGED_EFFECT,\n\tREACTION_RAN\n} from './constants.js';\nimport { old_values } from './reactivity/sources.js';\nimport {\n\treactivity_loss_tracker,\n\texecute_derived,\n\tfreeze_derived_effects,\n\trecent_async_deriveds,\n\tunfreeze_derived_effects,\n\tupdate_derived\n} from './reactivity/deriveds.js';\nimport { async_mode_flag, tracing_mode_flag } from '../flags/index.js';\nimport { tracing_expressions } from './dev/tracing.js';\nimport { get_error } from '../shared/dev.js';\nimport {\n\tcomponent_context,\n\tdev_current_component_function,\n\tdev_stack,\n\tis_runes,\n\tset_component_context,\n\tset_dev_current_component_function,\n\tset_dev_stack\n} from './context.js';\nimport {\n\tBatch,\n\tbatch_values,\n\tcurrent_batch,\n\tflushSync,\n\tschedule_effect\n} from './reactivity/batch.js';\nimport { handle_error } from './error-handling.js';\nimport { UNINITIALIZED } from '../../constants.js';\nimport { captured_signals } from './legacy.js';\nimport { without_reactive_context } from './dom/elements/bindings/shared.js';\nimport { set_signal_status, update_derived_status } from './reactivity/status.js';\nimport * as w from './warnings.js';\n\nlet is_updating_effect = false;\n\nexport let is_destroying_effect = false;\n\n/** @param {boolean} value */\nexport function set_is_destroying_effect(value) {\n\tis_destroying_effect = value;\n}\n\n/** @type {null | Reaction} */\nexport let active_reaction = null;\n\nexport let untracking = false;\n\n/** @param {null | Reaction} reaction */\nexport function set_active_reaction(reaction) {\n\tactive_reaction = reaction;\n}\n\n/** @type {null | Effect} */\nexport let active_effect = null;\n\n/** @param {null | Effect} effect */\nexport function set_active_effect(effect) {\n\tactive_effect = effect;\n}\n\n/**\n * When sources are created within a reaction, reading and writing\n * them within that reaction should not cause a re-run\n * @type {null | Source[]}\n */\nexport let current_sources = null;\n\n/** @param {Value} value */\nexport function push_reaction_value(value) {\n\tif (active_reaction !== null && (!async_mode_flag || (active_reaction.f & DERIVED) !== 0)) {\n\t\tif (current_sources === null) {\n\t\t\tcurrent_sources = [value];\n\t\t} else {\n\t\t\tcurrent_sources.push(value);\n\t\t}\n\t}\n}\n\n/**\n * The dependencies of the reaction that is currently being executed. In many cases,\n * the dependencies are unchanged between runs, and so this will be `null` unless\n * and until a new dependency is accessed — we track this via `skipped_deps`\n * @type {null | Value[]}\n */\nlet new_deps = null;\n\nlet skipped_deps = 0;\n\n/**\n * Tracks writes that the effect it's executed in doesn't listen to yet,\n * so that the dependency can be added to the effect later on if it then reads it\n * @type {null | Source[]}\n */\nexport let untracked_writes = null;\n\n/** @param {null | Source[]} value */\nexport function set_untracked_writes(value) {\n\tuntracked_writes = value;\n}\n\n/**\n * @type {number} Used by sources and deriveds for handling updates.\n * Version starts from 1 so that unowned deriveds differentiate between a created effect and a run one for tracing\n **/\nexport let write_version = 1;\n\n/** @type {number} Used to version each read of a source of derived to avoid duplicating depedencies inside a reaction */\nlet read_version = 0;\n\nexport let update_version = read_version;\n\n/** @param {number} value */\nexport function set_update_version(value) {\n\tupdate_version = value;\n}\n\nexport function increment_write_version() {\n\treturn ++write_version;\n}\n\n/**\n * Determines whether a derived or effect is dirty.\n * If it is MAYBE_DIRTY, will set the status to CLEAN\n * @param {Reaction} reaction\n * @returns {boolean}\n */\nexport function is_dirty(reaction) {\n\tvar flags = reaction.f;\n\n\tif ((flags & DIRTY) !== 0) {\n\t\treturn true;\n\t}\n\n\tif (flags & DERIVED) {\n\t\treaction.f &= ~WAS_MARKED;\n\t}\n\n\tif ((flags & MAYBE_DIRTY) !== 0) {\n\t\tvar dependencies = /** @type {Value[]} */ (reaction.deps);\n\t\tvar length = dependencies.length;\n\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tvar dependency = dependencies[i];\n\n\t\t\tif (is_dirty(/** @type {Derived} */ (dependency))) {\n\t\t\t\tupdate_derived(/** @type {Derived} */ (dependency));\n\t\t\t}\n\n\t\t\tif (dependency.wv > reaction.wv) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\t(flags & CONNECTED) !== 0 &&\n\t\t\t// During time traveling we don't want to reset the status so that\n\t\t\t// traversal of the graph in the other batches still happens\n\t\t\tbatch_values === null\n\t\t) {\n\t\t\tset_signal_status(reaction, CLEAN);\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * @param {Value} signal\n * @param {Effect} effect\n * @param {boolean} [root]\n */\nfunction schedule_possible_effect_self_invalidation(signal, effect, root = true) {\n\tvar reactions = signal.reactions;\n\tif (reactions === null) return;\n\n\tif (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) {\n\t\treturn;\n\t}\n\n\tfor (var i = 0; i < reactions.length; i++) {\n\t\tvar reaction = reactions[i];\n\n\t\tif ((reaction.f & DERIVED) !== 0) {\n\t\t\tschedule_possible_effect_self_invalidation(/** @type {Derived} */ (reaction), effect, false);\n\t\t} else if (effect === reaction) {\n\t\t\tif (root) {\n\t\t\t\tset_signal_status(reaction, DIRTY);\n\t\t\t} else if ((reaction.f & CLEAN) !== 0) {\n\t\t\t\tset_signal_status(reaction, MAYBE_DIRTY);\n\t\t\t}\n\t\t\tschedule_effect(/** @type {Effect} */ (reaction));\n\t\t}\n\t}\n}\n\n/** @param {Reaction} reaction */\nexport function update_reaction(reaction) {\n\tvar previous_deps = new_deps;\n\tvar previous_skipped_deps = skipped_deps;\n\tvar previous_untracked_writes = untracked_writes;\n\tvar previous_reaction = active_reaction;\n\tvar previous_sources = current_sources;\n\tvar previous_component_context = component_context;\n\tvar previous_untracking = untracking;\n\tvar previous_update_version = update_version;\n\n\tvar flags = reaction.f;\n\n\tnew_deps = /** @type {null | Value[]} */ (null);\n\tskipped_deps = 0;\n\tuntracked_writes = null;\n\tactive_reaction = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null;\n\n\tcurrent_sources = null;\n\tset_component_context(reaction.ctx);\n\tuntracking = false;\n\tupdate_version = ++read_version;\n\n\tif (reaction.ac !== null) {\n\t\twithout_reactive_context(() => {\n\t\t\t/** @type {AbortController} */ (reaction.ac).abort(STALE_REACTION);\n\t\t});\n\n\t\treaction.ac = null;\n\t}\n\n\ttry {\n\t\treaction.f |= REACTION_IS_UPDATING;\n\t\tvar fn = /** @type {Function} */ (reaction.fn);\n\t\tvar result = fn();\n\t\treaction.f |= REACTION_RAN;\n\t\tvar deps = reaction.deps;\n\n\t\t// Don't remove reactions during fork;\n\t\t// they must remain for when fork is discarded\n\t\tvar is_fork = current_batch?.is_fork;\n\n\t\tif (new_deps !== null) {\n\t\t\tvar i;\n\n\t\t\tif (!is_fork) {\n\t\t\t\tremove_reactions(reaction, skipped_deps);\n\t\t\t}\n\n\t\t\tif (deps !== null && skipped_deps > 0) {\n\t\t\t\tdeps.length = skipped_deps + new_deps.length;\n\t\t\t\tfor (i = 0; i < new_deps.length; i++) {\n\t\t\t\t\tdeps[skipped_deps + i] = new_deps[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treaction.deps = deps = new_deps;\n\t\t\t}\n\n\t\t\tif (effect_tracking() && (reaction.f & CONNECTED) !== 0) {\n\t\t\t\tfor (i = skipped_deps; i < deps.length; i++) {\n\t\t\t\t\t(deps[i].reactions ??= []).push(reaction);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!is_fork && deps !== null && skipped_deps < deps.length) {\n\t\t\tremove_reactions(reaction, skipped_deps);\n\t\t\tdeps.length = skipped_deps;\n\t\t}\n\n\t\t// If we're inside an effect and we have untracked writes, then we need to\n\t\t// ensure that if any of those untracked writes result in re-invalidation\n\t\t// of the current effect, then that happens accordingly\n\t\tif (\n\t\t\tis_runes() &&\n\t\t\tuntracked_writes !== null &&\n\t\t\t!untracking &&\n\t\t\tdeps !== null &&\n\t\t\t(reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0\n\t\t) {\n\t\t\tfor (i = 0; i < /** @type {Source[]} */ (untracked_writes).length; i++) {\n\t\t\t\tschedule_possible_effect_self_invalidation(\n\t\t\t\t\tuntracked_writes[i],\n\t\t\t\t\t/** @type {Effect} */ (reaction)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// If we are returning to an previous reaction then\n\t\t// we need to increment the read version to ensure that\n\t\t// any dependencies in this reaction aren't marked with\n\t\t// the same version\n\t\tif (previous_reaction !== null && previous_reaction !== reaction) {\n\t\t\tread_version++;\n\n\t\t\t// update the `rv` of the previous reaction's deps — both existing and new —\n\t\t\t// so that they are not added again\n\t\t\tif (previous_reaction.deps !== null) {\n\t\t\t\tfor (let i = 0; i < previous_skipped_deps; i += 1) {\n\t\t\t\t\tprevious_reaction.deps[i].rv = read_version;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (previous_deps !== null) {\n\t\t\t\tfor (const dep of previous_deps) {\n\t\t\t\t\tdep.rv = read_version;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (untracked_writes !== null) {\n\t\t\t\tif (previous_untracked_writes === null) {\n\t\t\t\t\tprevious_untracked_writes = untracked_writes;\n\t\t\t\t} else {\n\t\t\t\t\tprevious_untracked_writes.push(.../** @type {Source[]} */ (untracked_writes));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ((reaction.f & ERROR_VALUE) !== 0) {\n\t\t\treaction.f ^= ERROR_VALUE;\n\t\t}\n\n\t\treturn result;\n\t} catch (error) {\n\t\treturn handle_error(error);\n\t} finally {\n\t\treaction.f ^= REACTION_IS_UPDATING;\n\t\tnew_deps = previous_deps;\n\t\tskipped_deps = previous_skipped_deps;\n\t\tuntracked_writes = previous_untracked_writes;\n\t\tactive_reaction = previous_reaction;\n\t\tcurrent_sources = previous_sources;\n\t\tset_component_context(previous_component_context);\n\t\tuntracking = previous_untracking;\n\t\tupdate_version = previous_update_version;\n\t}\n}\n\n/**\n * @template V\n * @param {Reaction} signal\n * @param {Value<V>} dependency\n * @returns {void}\n */\nfunction remove_reaction(signal, dependency) {\n\tlet reactions = dependency.reactions;\n\tif (reactions !== null) {\n\t\tvar index = index_of.call(reactions, signal);\n\t\tif (index !== -1) {\n\t\t\tvar new_length = reactions.length - 1;\n\t\t\tif (new_length === 0) {\n\t\t\t\treactions = dependency.reactions = null;\n\t\t\t} else {\n\t\t\t\t// Swap with last element and then remove.\n\t\t\t\treactions[index] = reactions[new_length];\n\t\t\t\treactions.pop();\n\t\t\t}\n\t\t}\n\t}\n\n\t// If the derived has no reactions, then we can disconnect it from the graph,\n\t// allowing it to either reconnect in the future, or be GC'd by the VM.\n\tif (\n\t\treactions === null &&\n\t\t(dependency.f & DERIVED) !== 0 &&\n\t\t// Destroying a child effect while updating a parent effect can cause a dependency to appear\n\t\t// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`\n\t\t// allows us to skip the expensive work of disconnecting and immediately reconnecting it\n\t\t(new_deps === null || !includes.call(new_deps, dependency))\n\t) {\n\t\tvar derived = /** @type {Derived} */ (dependency);\n\n\t\t// If we are working with a derived that is owned by an effect, then mark it as being\n\t\t// disconnected and remove the mark flag, as it cannot be reliably removed otherwise\n\t\tif ((derived.f & CONNECTED) !== 0) {\n\t\t\tderived.f ^= CONNECTED;\n\t\t\tderived.f &= ~WAS_MARKED;\n\t\t}\n\n\t\tupdate_derived_status(derived);\n\n\t\t// freeze any effects inside this derived\n\t\tfreeze_derived_effects(derived);\n\n\t\t// Disconnect any reactions owned by this reaction\n\t\tremove_reactions(derived, 0);\n\t}\n}\n\n/**\n * @param {Reaction} signal\n * @param {number} start_index\n * @returns {void}\n */\nexport function remove_reactions(signal, start_index) {\n\tvar dependencies = signal.deps;\n\tif (dependencies === null) return;\n\n\tfor (var i = start_index; i < dependencies.length; i++) {\n\t\tremove_reaction(signal, dependencies[i]);\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @returns {void}\n */\nexport function update_effect(effect) {\n\tvar flags = effect.f;\n\n\tif ((flags & DESTROYED) !== 0) {\n\t\treturn;\n\t}\n\n\tset_signal_status(effect, CLEAN);\n\n\tvar previous_effect = active_effect;\n\tvar was_updating_effect = is_updating_effect;\n\n\tactive_effect = effect;\n\tis_updating_effect = true;\n\n\tif (DEV) {\n\t\tvar previous_component_fn = dev_current_component_function;\n\t\tset_dev_current_component_function(effect.component_function);\n\t\tvar previous_stack = /** @type {any} */ (dev_stack);\n\t\t// only block effects have a dev stack, keep the current one otherwise\n\t\tset_dev_stack(effect.dev_stack ?? dev_stack);\n\t}\n\n\ttry {\n\t\tif ((flags & (BLOCK_EFFECT | MANAGED_EFFECT)) !== 0) {\n\t\t\tdestroy_block_effect_children(effect);\n\t\t} else {\n\t\t\tdestroy_effect_children(effect);\n\t\t}\n\n\t\texecute_effect_teardown(effect);\n\t\tvar teardown = update_reaction(effect);\n\t\teffect.teardown = typeof teardown === 'function' ? teardown : null;\n\t\teffect.wv = write_version;\n\n\t\t// In DEV, increment versions of any sources that were written to during the effect,\n\t\t// so that they are correctly marked as dirty when the effect re-runs\n\t\tif (DEV && tracing_mode_flag && (effect.f & DIRTY) !== 0 && effect.deps !== null) {\n\t\t\tfor (var dep of effect.deps) {\n\t\t\t\tif (dep.set_during_effect) {\n\t\t\t\t\tdep.wv = increment_write_version();\n\t\t\t\t\tdep.set_during_effect = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} finally {\n\t\tis_updating_effect = was_updating_effect;\n\t\tactive_effect = previous_effect;\n\n\t\tif (DEV) {\n\t\t\tset_dev_current_component_function(previous_component_fn);\n\t\t\tset_dev_stack(previous_stack);\n\t\t}\n\t}\n}\n\n/**\n * Returns a promise that resolves once any pending state changes have been applied.\n * @returns {Promise<void>}\n */\nexport async function tick() {\n\tif (async_mode_flag) {\n\t\treturn new Promise((f) => {\n\t\t\t// Race them against each other - in almost all cases requestAnimationFrame will fire first,\n\t\t\t// but e.g. in case the window is not focused or a view transition happens, requestAnimationFrame\n\t\t\t// will be delayed and setTimeout helps us resolve fast enough in that case\n\t\t\trequestAnimationFrame(() => f());\n\t\t\tsetTimeout(() => f());\n\t\t});\n\t}\n\n\tawait Promise.resolve();\n\n\t// By calling flushSync we guarantee that any pending state changes are applied after one tick.\n\t// TODO look into whether we can make flushing subsequent updates synchronously in the future.\n\tflushSync();\n}\n\n/**\n * Returns a promise that resolves once any state changes, and asynchronous work resulting from them,\n * have resolved and the DOM has been updated\n * @returns {Promise<void>}\n * @since 5.36\n */\nexport function settled() {\n\treturn Batch.ensure().settled();\n}\n\n/**\n * @template V\n * @param {Value<V>} signal\n * @returns {V}\n */\nexport function get(signal) {\n\tvar flags = signal.f;\n\tvar is_derived = (flags & DERIVED) !== 0;\n\n\tcaptured_signals?.add(signal);\n\n\t// Register the dependency on the current reaction signal.\n\tif (active_reaction !== null && !untracking) {\n\t\t// if we're in a derived that is being read inside an _async_ derived,\n\t\t// it's possible that the effect was already destroyed. In this case,\n\t\t// we don't add the dependency, because that would create a memory leak\n\t\tvar destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0;\n\n\t\tif (!destroyed && (current_sources === null || !includes.call(current_sources, signal))) {\n\t\t\tvar deps = active_reaction.deps;\n\n\t\t\tif ((active_reaction.f & REACTION_IS_UPDATING) !== 0) {\n\t\t\t\t// we're in the effect init/update cycle\n\t\t\t\tif (signal.rv < read_version) {\n\t\t\t\t\tsignal.rv = read_version;\n\n\t\t\t\t\t// If the signal is accessing the same dependencies in the same\n\t\t\t\t\t// order as it did last time, increment `skipped_deps`\n\t\t\t\t\t// rather than updating `new_deps`, which creates GC cost\n\t\t\t\t\tif (new_deps === null && deps !== null && deps[skipped_deps] === signal) {\n\t\t\t\t\t\tskipped_deps++;\n\t\t\t\t\t} else if (new_deps === null) {\n\t\t\t\t\t\tnew_deps = [signal];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnew_deps.push(signal);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// we're adding a dependency outside the init/update cycle\n\t\t\t\t// (i.e. after an `await`)\n\t\t\t\t(active_reaction.deps ??= []).push(signal);\n\n\t\t\t\tvar reactions = signal.reactions;\n\n\t\t\t\tif (reactions === null) {\n\t\t\t\t\tsignal.reactions = [active_reaction];\n\t\t\t\t} else if (!includes.call(reactions, active_reaction)) {\n\t\t\t\t\treactions.push(active_reaction);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (DEV) {\n\t\tif (\n\t\t\t!untracking &&\n\t\t\treactivity_loss_tracker &&\n\t\t\t!reactivity_loss_tracker.warned &&\n\t\t\t(reactivity_loss_tracker.effect.f & REACTION_IS_UPDATING) === 0\n\t\t) {\n\t\t\treactivity_loss_tracker.warned = true;\n\n\t\t\tw.await_reactivity_loss(/** @type {string} */ (signal.label));\n\n\t\t\tvar trace = get_error('traced at');\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tif (trace) console.warn(trace);\n\t\t}\n\n\t\trecent_async_deriveds.delete(signal);\n\n\t\tif (\n\t\t\ttracing_mode_flag &&\n\t\t\t!untracking &&\n\t\t\ttracing_expressions !== null &&\n\t\t\tactive_reaction !== null &&\n\t\t\ttracing_expressions.reaction === active_reaction\n\t\t) {\n\t\t\t// Used when mapping state between special blocks like `each`\n\t\t\tif (signal.trace) {\n\t\t\t\tsignal.trace();\n\t\t\t} else {\n\t\t\t\ttrace = get_error('traced at');\n\n\t\t\t\tif (trace) {\n\t\t\t\t\tvar entry = tracing_expressions.entries.get(signal);\n\n\t\t\t\t\tif (entry === undefined) {\n\t\t\t\t\t\tentry = { traces: [] };\n\t\t\t\t\t\ttracing_expressions.entries.set(signal, entry);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar last = entry.traces[entry.traces.length - 1];\n\n\t\t\t\t\t// traces can be duplicated, e.g. by `snapshot` invoking both\n\t\t\t\t\t// both `getOwnPropertyDescriptor` and `get` traps at once\n\t\t\t\t\tif (trace.stack !== last?.stack) {\n\t\t\t\t\t\tentry.traces.push(trace);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (is_destroying_effect && old_values.has(signal)) {\n\t\treturn old_values.get(signal);\n\t}\n\n\tif (is_derived) {\n\t\tvar derived = /** @type {Derived} */ (signal);\n\n\t\tif (is_destroying_effect) {\n\t\t\tvar value = derived.v;\n\n\t\t\t// if the derived is dirty and has reactions, or depends on the values that just changed, re-execute\n\t\t\t// (a derived can be maybe_dirty due to the effect destroy removing its last reaction)\n\t\t\tif (\n\t\t\t\t((derived.f & CLEAN) === 0 && derived.reactions !== null) ||\n\t\t\t\tdepends_on_old_values(derived)\n\t\t\t) {\n\t\t\t\tvalue = execute_derived(derived);\n\t\t\t}\n\n\t\t\told_values.set(derived, value);\n\n\t\t\treturn value;\n\t\t}\n\n\t\t// connect disconnected deriveds if we are reading them inside an effect,\n\t\t// or inside another derived that is already connected\n\t\tvar should_connect =\n\t\t\t(derived.f & CONNECTED) === 0 &&\n\t\t\t!untracking &&\n\t\t\tactive_reaction !== null &&\n\t\t\t(is_updating_effect || (active_reaction.f & CONNECTED) !== 0);\n\n\t\tvar is_new = (derived.f & REACTION_RAN) === 0;\n\n\t\tif (is_dirty(derived)) {\n\t\t\tif (should_connect) {\n\t\t\t\t// set the flag before `update_derived`, so that the derived\n\t\t\t\t// is added as a reaction to its dependencies\n\t\t\t\tderived.f |= CONNECTED;\n\t\t\t}\n\n\t\t\tupdate_derived(derived);\n\t\t}\n\n\t\tif (should_connect && !is_new) {\n\t\t\tunfreeze_derived_effects(derived);\n\t\t\treconnect(derived);\n\t\t}\n\t}\n\n\tif (batch_values?.has(signal)) {\n\t\treturn batch_values.get(signal);\n\t}\n\n\tif ((signal.f & ERROR_VALUE) !== 0) {\n\t\tthrow signal.v;\n\t}\n\n\treturn signal.v;\n}\n\n/**\n * (Re)connect a disconnected derived, so that it is notified\n * of changes in `mark_reactions`\n * @param {Derived} derived\n */\nfunction reconnect(derived) {\n\tderived.f |= CONNECTED;\n\n\tif (derived.deps === null) return;\n\n\tfor (const dep of derived.deps) {\n\t\t(dep.reactions ??= []).push(derived);\n\n\t\tif ((dep.f & DERIVED) !== 0 && (dep.f & CONNECTED) === 0) {\n\t\t\tunfreeze_derived_effects(/** @type {Derived} */ (dep));\n\t\t\treconnect(/** @type {Derived} */ (dep));\n\t\t}\n\t}\n}\n\n/** @param {Derived} derived */\nfunction depends_on_old_values(derived) {\n\tif (derived.v === UNINITIALIZED) return true; // we don't know, so assume the worst\n\tif (derived.deps === null) return false;\n\n\tfor (const dep of derived.deps) {\n\t\tif (old_values.has(dep)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((dep.f & DERIVED) !== 0 && depends_on_old_values(/** @type {Derived} */ (dep))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Like `get`, but checks for `undefined`. Used for `var` declarations because they can be accessed before being declared\n * @template V\n * @param {Value<V> | undefined} signal\n * @returns {V | undefined}\n */\nexport function safe_get(signal) {\n\treturn signal && get(signal);\n}\n\n/**\n * When used inside a [`$derived`](https://svelte.dev/docs/svelte/$derived) or [`$effect`](https://svelte.dev/docs/svelte/$effect),\n * any state read inside `fn` will not be treated as a dependency.\n *\n * ```ts\n * $effect(() => {\n * // this will run when `data` changes, but not when `time` changes\n * save(data, {\n * timestamp: untrack(() => time)\n * });\n * });\n * ```\n * @template T\n * @param {() => T} fn\n * @returns {T}\n */\nexport function untrack(fn) {\n\tvar previous_untracking = untracking;\n\ttry {\n\t\tuntracking = true;\n\t\treturn fn();\n\t} finally {\n\t\tuntracking = previous_untracking;\n\t}\n}\n\n/**\n * Possibly traverse an object and read all its properties so that they're all reactive in case this is `$state`.\n * Does only check first level of an object for performance reasons (heuristic should be good for 99% of all cases).\n * @param {any} value\n * @returns {void}\n */\nexport function deep_read_state(value) {\n\tif (typeof value !== 'object' || !value || value instanceof EventTarget) {\n\t\treturn;\n\t}\n\n\tif (STATE_SYMBOL in value) {\n\t\tdeep_read(value);\n\t} else if (!Array.isArray(value)) {\n\t\tfor (let key in value) {\n\t\t\tconst prop = value[key];\n\t\t\tif (typeof prop === 'object' && prop && STATE_SYMBOL in prop) {\n\t\t\t\tdeep_read(prop);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Deeply traverse an object and read all its properties\n * so that they're all reactive in case this is `$state`\n * @param {any} value\n * @param {Set<any>} visited\n * @returns {void}\n */\nexport function deep_read(value, visited = new Set()) {\n\tif (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t// We don't want to traverse DOM elements\n\t\t!(value instanceof EventTarget) &&\n\t\t!visited.has(value)\n\t) {\n\t\tvisited.add(value);\n\t\t// When working with a possible SvelteDate, this\n\t\t// will ensure we capture changes to it.\n\t\tif (value instanceof Date) {\n\t\t\tvalue.getTime();\n\t\t}\n\t\tfor (let key in value) {\n\t\t\ttry {\n\t\t\t\tdeep_read(value[key], visited);\n\t\t\t} catch (e) {\n\t\t\t\t// continue\n\t\t\t}\n\t\t}\n\t\tconst proto = get_prototype_of(value);\n\t\tif (\n\t\t\tproto !== Object.prototype &&\n\t\t\tproto !== Array.prototype &&\n\t\t\tproto !== Map.prototype &&\n\t\t\tproto !== Set.prototype &&\n\t\t\tproto !== Date.prototype\n\t\t) {\n\t\t\tconst descriptors = get_descriptors(proto);\n\t\t\tfor (let key in descriptors) {\n\t\t\t\tconst get = descriptors[key].get;\n\t\t\t\tif (get) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tget.call(value);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t// continue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n", "/** @import { Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport {\n\tget,\n\tactive_effect,\n\tupdate_version,\n\tactive_reaction,\n\tset_update_version,\n\tset_active_reaction\n} from './runtime.js';\nimport {\n\tarray_prototype,\n\tget_descriptor,\n\tget_prototype_of,\n\tis_array,\n\tobject_prototype\n} from '../shared/utils.js';\nimport {\n\tstate as source,\n\tset,\n\tincrement,\n\tflush_eager_effects,\n\tset_eager_effects_deferred\n} from './reactivity/sources.js';\nimport { PROXY_PATH_SYMBOL, STATE_SYMBOL } from '#client/constants';\nimport { UNINITIALIZED } from '../../constants.js';\nimport * as e from './errors.js';\nimport { tag } from './dev/tracing.js';\nimport { get_error } from '../shared/dev.js';\nimport { tracing_mode_flag } from '../flags/index.js';\n\n// TODO move all regexes into shared module?\nconst regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;\n\n/**\n * @template T\n * @param {T} value\n * @returns {T}\n */\nexport function proxy(value) {\n\t// if non-proxyable, or is already a proxy, return `value`\n\tif (typeof value !== 'object' || value === null || STATE_SYMBOL in value) {\n\t\treturn value;\n\t}\n\n\tconst prototype = get_prototype_of(value);\n\n\tif (prototype !== object_prototype && prototype !== array_prototype) {\n\t\treturn value;\n\t}\n\n\t/** @type {Map<any, Source<any>>} */\n\tvar sources = new Map();\n\tvar is_proxied_array = is_array(value);\n\tvar version = source(0);\n\n\tvar stack = DEV && tracing_mode_flag ? get_error('created at') : null;\n\tvar parent_version = update_version;\n\n\t/**\n\t * Executes the proxy in the context of the reaction it was originally created in, if any\n\t * @template T\n\t * @param {() => T} fn\n\t */\n\tvar with_parent = (fn) => {\n\t\tif (update_version === parent_version) {\n\t\t\treturn fn();\n\t\t}\n\n\t\t// child source is being created after the initial proxy —\n\t\t// prevent it from being associated with the current reaction\n\t\tvar reaction = active_reaction;\n\t\tvar version = update_version;\n\n\t\tset_active_reaction(null);\n\t\tset_update_version(parent_version);\n\n\t\tvar result = fn();\n\n\t\tset_active_reaction(reaction);\n\t\tset_update_version(version);\n\n\t\treturn result;\n\t};\n\n\tif (is_proxied_array) {\n\t\t// We need to create the length source eagerly to ensure that\n\t\t// mutations to the array are properly synced with our proxy\n\t\tsources.set('length', source(/** @type {any[]} */ (value).length, stack));\n\t\tif (DEV) {\n\t\t\tvalue = /** @type {any} */ (inspectable_array(/** @type {any[]} */ (value)));\n\t\t}\n\t}\n\n\t/** Used in dev for $inspect.trace() */\n\tvar path = '';\n\tlet updating = false;\n\t/** @param {string} new_path */\n\tfunction update_path(new_path) {\n\t\tif (updating) return;\n\t\tupdating = true;\n\t\tpath = new_path;\n\n\t\ttag(version, `${path} version`);\n\n\t\t// rename all child sources and child proxies\n\t\tfor (const [prop, source] of sources) {\n\t\t\ttag(source, get_label(path, prop));\n\t\t}\n\t\tupdating = false;\n\t}\n\n\treturn new Proxy(/** @type {any} */ (value), {\n\t\tdefineProperty(_, prop, descriptor) {\n\t\t\tif (\n\t\t\t\t!('value' in descriptor) ||\n\t\t\t\tdescriptor.configurable === false ||\n\t\t\t\tdescriptor.enumerable === false ||\n\t\t\t\tdescriptor.writable === false\n\t\t\t) {\n\t\t\t\t// we disallow non-basic descriptors, because unless they are applied to the\n\t\t\t\t// target object — which we avoid, so that state can be forked — we will run\n\t\t\t\t// afoul of the various invariants\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/getOwnPropertyDescriptor#invariants\n\t\t\t\te.state_descriptors_fixed();\n\t\t\t}\n\t\t\tvar s = sources.get(prop);\n\t\t\tif (s === undefined) {\n\t\t\t\twith_parent(() => {\n\t\t\t\t\tvar s = source(descriptor.value, stack);\n\t\t\t\t\tsources.set(prop, s);\n\t\t\t\t\tif (DEV && typeof prop === 'string') {\n\t\t\t\t\t\ttag(s, get_label(path, prop));\n\t\t\t\t\t}\n\t\t\t\t\treturn s;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tset(s, descriptor.value, true);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\tdeleteProperty(target, prop) {\n\t\t\tvar s = sources.get(prop);\n\n\t\t\tif (s === undefined) {\n\t\t\t\tif (prop in target) {\n\t\t\t\t\tconst s = with_parent(() => source(UNINITIALIZED, stack));\n\t\t\t\t\tsources.set(prop, s);\n\t\t\t\t\tincrement(version);\n\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\ttag(s, get_label(path, prop));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tset(s, UNINITIALIZED);\n\t\t\t\tincrement(version);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\tget(target, prop, receiver) {\n\t\t\tif (prop === STATE_SYMBOL) {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tif (DEV && prop === PROXY_PATH_SYMBOL) {\n\t\t\t\treturn update_path;\n\t\t\t}\n\n\t\t\tvar s = sources.get(prop);\n\t\t\tvar exists = prop in target;\n\n\t\t\t// create a source, but only if it's an own property and not a prototype property\n\t\t\tif (s === undefined && (!exists || get_descriptor(target, prop)?.writable)) {\n\t\t\t\ts = with_parent(() => {\n\t\t\t\t\tvar p = proxy(exists ? target[prop] : UNINITIALIZED);\n\t\t\t\t\tvar s = source(p, stack);\n\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\ttag(s, get_label(path, prop));\n\t\t\t\t\t}\n\n\t\t\t\t\treturn s;\n\t\t\t\t});\n\n\t\t\t\tsources.set(prop, s);\n\t\t\t}\n\n\t\t\tif (s !== undefined) {\n\t\t\t\tvar v = get(s);\n\t\t\t\treturn v === UNINITIALIZED ? undefined : v;\n\t\t\t}\n\n\t\t\treturn Reflect.get(target, prop, receiver);\n\t\t},\n\n\t\tgetOwnPropertyDescriptor(target, prop) {\n\t\t\tvar descriptor = Reflect.getOwnPropertyDescriptor(target, prop);\n\n\t\t\tif (descriptor && 'value' in descriptor) {\n\t\t\t\tvar s = sources.get(prop);\n\t\t\t\tif (s) descriptor.value = get(s);\n\t\t\t} else if (descriptor === undefined) {\n\t\t\t\tvar source = sources.get(prop);\n\t\t\t\tvar value = source?.v;\n\n\t\t\t\tif (source !== undefined && value !== UNINITIALIZED) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tenumerable: true,\n\t\t\t\t\t\tconfigurable: true,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\twritable: true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn descriptor;\n\t\t},\n\n\t\thas(target, prop) {\n\t\t\tif (prop === STATE_SYMBOL) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tvar s = sources.get(prop);\n\t\t\tvar has = (s !== undefined && s.v !== UNINITIALIZED) || Reflect.has(target, prop);\n\n\t\t\tif (\n\t\t\t\ts !== undefined ||\n\t\t\t\t(active_effect !== null && (!has || get_descriptor(target, prop)?.writable))\n\t\t\t) {\n\t\t\t\tif (s === undefined) {\n\t\t\t\t\ts = with_parent(() => {\n\t\t\t\t\t\tvar p = has ? proxy(target[prop]) : UNINITIALIZED;\n\t\t\t\t\t\tvar s = source(p, stack);\n\n\t\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\t\ttag(s, get_label(path, prop));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t});\n\n\t\t\t\t\tsources.set(prop, s);\n\t\t\t\t}\n\n\t\t\t\tvar value = get(s);\n\t\t\t\tif (value === UNINITIALIZED) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn has;\n\t\t},\n\n\t\tset(target, prop, value, receiver) {\n\t\t\tvar s = sources.get(prop);\n\t\t\tvar has = prop in target;\n\n\t\t\t// variable.length = value -> clear all signals with index >= value\n\t\t\tif (is_proxied_array && prop === 'length') {\n\t\t\t\tfor (var i = value; i < /** @type {Source<number>} */ (s).v; i += 1) {\n\t\t\t\t\tvar other_s = sources.get(i + '');\n\t\t\t\t\tif (other_s !== undefined) {\n\t\t\t\t\t\tset(other_s, UNINITIALIZED);\n\t\t\t\t\t} else if (i in target) {\n\t\t\t\t\t\t// If the item exists in the original, we need to create an uninitialized source,\n\t\t\t\t\t\t// else a later read of the property would result in a source being created with\n\t\t\t\t\t\t// the value of the original item at that index.\n\t\t\t\t\t\tother_s = with_parent(() => source(UNINITIALIZED, stack));\n\t\t\t\t\t\tsources.set(i + '', other_s);\n\n\t\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\t\ttag(other_s, get_label(path, i));\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\t// If we haven't yet created a source for this property, we need to ensure\n\t\t\t// we do so otherwise if we read it later, then the write won't be tracked and\n\t\t\t// the heuristics of effects will be different vs if we had read the proxied\n\t\t\t// object property before writing to that property.\n\t\t\tif (s === undefined) {\n\t\t\t\tif (!has || get_descriptor(target, prop)?.writable) {\n\t\t\t\t\ts = with_parent(() => source(undefined, stack));\n\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\ttag(s, get_label(path, prop));\n\t\t\t\t\t}\n\t\t\t\t\tset(s, proxy(value));\n\n\t\t\t\t\tsources.set(prop, s);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thas = s.v !== UNINITIALIZED;\n\n\t\t\t\tvar p = with_parent(() => proxy(value));\n\t\t\t\tset(s, p);\n\t\t\t}\n\n\t\t\tvar descriptor = Reflect.getOwnPropertyDescriptor(target, prop);\n\n\t\t\t// Set the new value before updating any signals so that any listeners get the new value\n\t\t\tif (descriptor?.set) {\n\t\t\t\tdescriptor.set.call(receiver, value);\n\t\t\t}\n\n\t\t\tif (!has) {\n\t\t\t\t// If we have mutated an array directly, we might need to\n\t\t\t\t// signal that length has also changed. Do it before updating metadata\n\t\t\t\t// to ensure that iterating over the array as a result of a metadata update\n\t\t\t\t// will not cause the length to be out of sync.\n\t\t\t\tif (is_proxied_array && typeof prop === 'string') {\n\t\t\t\t\tvar ls = /** @type {Source<number>} */ (sources.get('length'));\n\t\t\t\t\tvar n = Number(prop);\n\n\t\t\t\t\tif (Number.isInteger(n) && n >= ls.v) {\n\t\t\t\t\t\tset(ls, n + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tincrement(version);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\townKeys(target) {\n\t\t\tget(version);\n\n\t\t\tvar own_keys = Reflect.ownKeys(target).filter((key) => {\n\t\t\t\tvar source = sources.get(key);\n\t\t\t\treturn source === undefined || source.v !== UNINITIALIZED;\n\t\t\t});\n\n\t\t\tfor (var [key, source] of sources) {\n\t\t\t\tif (source.v !== UNINITIALIZED && !(key in target)) {\n\t\t\t\t\town_keys.push(key);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn own_keys;\n\t\t},\n\n\t\tsetPrototypeOf() {\n\t\t\te.state_prototype_fixed();\n\t\t}\n\t});\n}\n\n/**\n * @param {string} path\n * @param {string | symbol} prop\n */\nfunction get_label(path, prop) {\n\tif (typeof prop === 'symbol') return `${path}[Symbol(${prop.description ?? ''})]`;\n\tif (regex_is_valid_identifier.test(prop)) return `${path}.${prop}`;\n\treturn /^\\d+$/.test(prop) ? `${path}[${prop}]` : `${path}['${prop}']`;\n}\n\n/**\n * @param {any} value\n */\nexport function get_proxied_value(value) {\n\ttry {\n\t\tif (value !== null && typeof value === 'object' && STATE_SYMBOL in value) {\n\t\t\treturn value[STATE_SYMBOL];\n\t\t}\n\t} catch {\n\t\t// the above if check can throw an error if the value in question\n\t\t// is the contentWindow of an iframe on another domain, in which\n\t\t// case we want to just return the value (because it's definitely\n\t\t// not a proxied value) so we don't break any JavaScript interacting\n\t\t// with that iframe (such as various payment companies client side\n\t\t// JavaScript libraries interacting with their iframes on the same\n\t\t// domain)\n\t}\n\n\treturn value;\n}\n\n/**\n * @param {any} a\n * @param {any} b\n */\nexport function is(a, b) {\n\treturn Object.is(get_proxied_value(a), get_proxied_value(b));\n}\n\nconst ARRAY_MUTATING_METHODS = new Set([\n\t'copyWithin',\n\t'fill',\n\t'pop',\n\t'push',\n\t'reverse',\n\t'shift',\n\t'sort',\n\t'splice',\n\t'unshift'\n]);\n\n/**\n * Wrap array mutating methods so $inspect is triggered only once and\n * to prevent logging an array in intermediate state (e.g. with an empty slot)\n * @param {any[]} array\n */\nfunction inspectable_array(array) {\n\treturn new Proxy(array, {\n\t\tget(target, prop, receiver) {\n\t\t\tvar value = Reflect.get(target, prop, receiver);\n\t\t\tif (!ARRAY_MUTATING_METHODS.has(/** @type {string} */ (prop))) {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @this {any[]}\n\t\t\t * @param {any[]} args\n\t\t\t */\n\t\t\treturn function (...args) {\n\t\t\t\tset_eager_effects_deferred();\n\t\t\t\tvar result = value.apply(this, args);\n\t\t\t\tflush_eager_effects();\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\t});\n}\n", "import * as w from '../warnings.js';\nimport { get_proxied_value } from '../proxy.js';\n\nexport function init_array_prototype_warnings() {\n\tconst array_prototype = Array.prototype;\n\t// The REPL ends up here over and over, and this prevents it from adding more and more patches\n\t// of the same kind to the prototype, which would slow down everything over time.\n\t// @ts-expect-error\n\tconst cleanup = Array.__svelte_cleanup;\n\tif (cleanup) {\n\t\tcleanup();\n\t}\n\n\tconst { indexOf, lastIndexOf, includes } = array_prototype;\n\n\tarray_prototype.indexOf = function (item, from_index) {\n\t\tconst index = indexOf.call(this, item, from_index);\n\n\t\tif (index === -1) {\n\t\t\tfor (let i = from_index ?? 0; i < this.length; i += 1) {\n\t\t\t\tif (get_proxied_value(this[i]) === item) {\n\t\t\t\t\tw.state_proxy_equality_mismatch('array.indexOf(...)');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t};\n\n\tarray_prototype.lastIndexOf = function (item, from_index) {\n\t\t// we need to specify this.length - 1 because it's probably using something like\n\t\t// `arguments` inside so passing undefined is different from not passing anything\n\t\tconst index = lastIndexOf.call(this, item, from_index ?? this.length - 1);\n\n\t\tif (index === -1) {\n\t\t\tfor (let i = 0; i <= (from_index ?? this.length - 1); i += 1) {\n\t\t\t\tif (get_proxied_value(this[i]) === item) {\n\t\t\t\t\tw.state_proxy_equality_mismatch('array.lastIndexOf(...)');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t};\n\n\tarray_prototype.includes = function (item, from_index) {\n\t\tconst has = includes.call(this, item, from_index);\n\n\t\tif (!has) {\n\t\t\tfor (let i = 0; i < this.length; i += 1) {\n\t\t\t\tif (get_proxied_value(this[i]) === item) {\n\t\t\t\t\tw.state_proxy_equality_mismatch('array.includes(...)');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn has;\n\t};\n\n\t// @ts-expect-error\n\tArray.__svelte_cleanup = () => {\n\t\tarray_prototype.indexOf = indexOf;\n\t\tarray_prototype.lastIndexOf = lastIndexOf;\n\t\tarray_prototype.includes = includes;\n\t};\n}\n\n/**\n * @param {any} a\n * @param {any} b\n * @param {boolean} equal\n * @returns {boolean}\n */\nexport function strict_equals(a, b, equal = true) {\n\t// try-catch needed because this tries to read properties of `a` and `b`,\n\t// which could be disallowed for example in a secure context\n\ttry {\n\t\tif ((a === b) !== (get_proxied_value(a) === get_proxied_value(b))) {\n\t\t\tw.state_proxy_equality_mismatch(equal ? '===' : '!==');\n\t\t}\n\t} catch {}\n\n\treturn (a === b) === equal;\n}\n\n/**\n * @param {any} a\n * @param {any} b\n * @param {boolean} equal\n * @returns {boolean}\n */\nexport function equals(a, b, equal = true) {\n\tif ((a == b) !== (get_proxied_value(a) == get_proxied_value(b))) {\n\t\tw.state_proxy_equality_mismatch(equal ? '==' : '!=');\n\t}\n\n\treturn (a == b) === equal;\n}\n", "/** @import { Effect, TemplateNode } from '#client' */\nimport { hydrate_node, hydrating, set_hydrate_node } from './hydration.js';\nimport { DEV } from 'esm-env';\nimport { init_array_prototype_warnings } from '../dev/equality.js';\nimport { get_descriptor, is_extensible } from '../../shared/utils.js';\nimport { active_effect } from '../runtime.js';\nimport { async_mode_flag } from '../../flags/index.js';\nimport { TEXT_NODE, REACTION_RAN } from '#client/constants';\nimport { eager_block_effects } from '../reactivity/batch.js';\nimport { NAMESPACE_HTML } from '../../../constants.js';\n\n// export these for reference in the compiled code, making global name deduplication unnecessary\n/** @type {Window} */\nexport var $window;\n\n/** @type {Document} */\nexport var $document;\n\n/** @type {boolean} */\nexport var is_firefox;\n\n/** @type {() => Node | null} */\nvar first_child_getter;\n/** @type {() => Node | null} */\nvar next_sibling_getter;\n\n/**\n * Initialize these lazily to avoid issues when using the runtime in a server context\n * where these globals are not available while avoiding a separate server entry point\n */\nexport function init_operations() {\n\tif ($window !== undefined) {\n\t\treturn;\n\t}\n\n\t$window = window;\n\t$document = document;\n\tis_firefox = /Firefox/.test(navigator.userAgent);\n\n\tvar element_prototype = Element.prototype;\n\tvar node_prototype = Node.prototype;\n\tvar text_prototype = Text.prototype;\n\n\t// @ts-ignore\n\tfirst_child_getter = get_descriptor(node_prototype, 'firstChild').get;\n\t// @ts-ignore\n\tnext_sibling_getter = get_descriptor(node_prototype, 'nextSibling').get;\n\n\tif (is_extensible(element_prototype)) {\n\t\t// the following assignments improve perf of lookups on DOM nodes\n\t\t// @ts-expect-error\n\t\telement_prototype.__click = undefined;\n\t\t// @ts-expect-error\n\t\telement_prototype.__className = undefined;\n\t\t// @ts-expect-error\n\t\telement_prototype.__attributes = null;\n\t\t// @ts-expect-error\n\t\telement_prototype.__style = undefined;\n\t\t// @ts-expect-error\n\t\telement_prototype.__e = undefined;\n\t}\n\n\tif (is_extensible(text_prototype)) {\n\t\t// @ts-expect-error\n\t\ttext_prototype.__t = undefined;\n\t}\n\n\tif (DEV) {\n\t\t// @ts-expect-error\n\t\telement_prototype.__svelte_meta = null;\n\n\t\tinit_array_prototype_warnings();\n\t}\n}\n\n/**\n * @param {string} value\n * @returns {Text}\n */\nexport function create_text(value = '') {\n\treturn document.createTextNode(value);\n}\n\n/**\n * @template {Node} N\n * @param {N} node\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function get_first_child(node) {\n\treturn /** @type {TemplateNode | null} */ (first_child_getter.call(node));\n}\n\n/**\n * @template {Node} N\n * @param {N} node\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function get_next_sibling(node) {\n\treturn /** @type {TemplateNode | null} */ (next_sibling_getter.call(node));\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @template {Node} N\n * @param {N} node\n * @param {boolean} is_text\n * @returns {TemplateNode | null}\n */\nexport function child(node, is_text) {\n\tif (!hydrating) {\n\t\treturn get_first_child(node);\n\t}\n\n\tvar child = get_first_child(hydrate_node);\n\n\t// Child can be null if we have an element with a single child, like `<p>{text}</p>`, where `text` is empty\n\tif (child === null) {\n\t\tchild = hydrate_node.appendChild(create_text());\n\t} else if (is_text && child.nodeType !== TEXT_NODE) {\n\t\tvar text = create_text();\n\t\tchild?.before(text);\n\t\tset_hydrate_node(text);\n\t\treturn text;\n\t}\n\n\tif (is_text) {\n\t\tmerge_text_nodes(/** @type {Text} */ (child));\n\t}\n\n\tset_hydrate_node(child);\n\treturn child;\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @param {TemplateNode} node\n * @param {boolean} [is_text]\n * @returns {TemplateNode | null}\n */\nexport function first_child(node, is_text = false) {\n\tif (!hydrating) {\n\t\tvar first = get_first_child(node);\n\n\t\t// TODO prevent user comments with the empty string when preserveComments is true\n\t\tif (first instanceof Comment && first.data === '') return get_next_sibling(first);\n\n\t\treturn first;\n\t}\n\n\tif (is_text) {\n\t\t// if an {expression} is empty during SSR, there might be no\n\t\t// text node to hydrate — we must therefore create one\n\t\tif (hydrate_node?.nodeType !== TEXT_NODE) {\n\t\t\tvar text = create_text();\n\n\t\t\thydrate_node?.before(text);\n\t\t\tset_hydrate_node(text);\n\t\t\treturn text;\n\t\t}\n\n\t\tmerge_text_nodes(/** @type {Text} */ (hydrate_node));\n\t}\n\n\treturn hydrate_node;\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @param {TemplateNode} node\n * @param {number} count\n * @param {boolean} is_text\n * @returns {TemplateNode | null}\n */\nexport function sibling(node, count = 1, is_text = false) {\n\tlet next_sibling = hydrating ? hydrate_node : node;\n\tvar last_sibling;\n\n\twhile (count--) {\n\t\tlast_sibling = next_sibling;\n\t\tnext_sibling = /** @type {TemplateNode} */ (get_next_sibling(next_sibling));\n\t}\n\n\tif (!hydrating) {\n\t\treturn next_sibling;\n\t}\n\n\tif (is_text) {\n\t\t// if a sibling {expression} is empty during SSR, there might be no\n\t\t// text node to hydrate — we must therefore create one\n\t\tif (next_sibling?.nodeType !== TEXT_NODE) {\n\t\t\tvar text = create_text();\n\t\t\t// If the next sibling is `null` and we're handling text then it's because\n\t\t\t// the SSR content was empty for the text, so we need to generate a new text\n\t\t\t// node and insert it after the last sibling\n\t\t\tif (next_sibling === null) {\n\t\t\t\tlast_sibling?.after(text);\n\t\t\t} else {\n\t\t\t\tnext_sibling.before(text);\n\t\t\t}\n\t\t\tset_hydrate_node(text);\n\t\t\treturn text;\n\t\t}\n\n\t\tmerge_text_nodes(/** @type {Text} */ (next_sibling));\n\t}\n\n\tset_hydrate_node(next_sibling);\n\treturn next_sibling;\n}\n\n/**\n * @template {Node} N\n * @param {N} node\n * @returns {void}\n */\nexport function clear_text_content(node) {\n\tnode.textContent = '';\n}\n\n/**\n * Returns `true` if we're updating the current block, for example `condition` in\n * an `{#if condition}` block just changed. In this case, the branch should be\n * appended (or removed) at the same time as other updates within the\n * current `<svelte:boundary>`\n */\nexport function should_defer_append() {\n\tif (!async_mode_flag) return false;\n\tif (eager_block_effects !== null) return false;\n\n\tvar flags = /** @type {Effect} */ (active_effect).f;\n\treturn (flags & REACTION_RAN) !== 0;\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap | string} T\n * @param {T} tag\n * @param {string} [namespace]\n * @param {string} [is]\n * @returns {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element}\n */\nexport function create_element(tag, namespace, is) {\n\tlet options = is ? { is } : undefined;\n\treturn /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */ (\n\t\tdocument.createElementNS(namespace ?? NAMESPACE_HTML, tag, options)\n\t);\n}\n\nexport function create_fragment() {\n\treturn document.createDocumentFragment();\n}\n\n/**\n * @param {string} data\n * @returns\n */\nexport function create_comment(data = '') {\n\treturn document.createComment(data);\n}\n\n/**\n * @param {Element} element\n * @param {string} key\n * @param {string} value\n * @returns\n */\nexport function set_attribute(element, key, value = '') {\n\tif (key.startsWith('xlink:')) {\n\t\telement.setAttributeNS('http://www.w3.org/1999/xlink', key, value);\n\t\treturn;\n\t}\n\treturn element.setAttribute(key, value);\n}\n\n/**\n * Browsers split text nodes larger than 65536 bytes when parsing.\n * For hydration to succeed, we need to stitch them back together\n * @param {Text} text\n */\nexport function merge_text_nodes(text) {\n\tif (/** @type {string} */ (text.nodeValue).length < 65536) {\n\t\treturn;\n\t}\n\n\tlet next = text.nextSibling;\n\n\twhile (next !== null && next.nodeType === TEXT_NODE) {\n\t\tnext.remove();\n\n\t\t/** @type {string} */ (text.nodeValue) += /** @type {string} */ (next.nodeValue);\n\n\t\tnext = text.nextSibling;\n\t}\n}\n", "/** @import { TemplateNode } from '#client' */\n\nimport { COMMENT_NODE } from '#client/constants';\nimport {\n\tHYDRATION_END,\n\tHYDRATION_ERROR,\n\tHYDRATION_START,\n\tHYDRATION_START_ELSE\n} from '../../../constants.js';\nimport * as w from '../warnings.js';\nimport { get_next_sibling } from './operations.js';\n\n/**\n * Use this variable to guard everything related to hydration code so it can be treeshaken out\n * if the user doesn't use the `hydrate` method and these code paths are therefore not needed.\n */\nexport let hydrating = false;\n\n/** @param {boolean} value */\nexport function set_hydrating(value) {\n\thydrating = value;\n}\n\n/**\n * The node that is currently being hydrated. This starts out as the first node inside the opening\n * <!--[--> comment, and updates each time a component calls `$.child(...)` or `$.sibling(...)`.\n * When entering a block (e.g. `{#if ...}`), `hydrate_node` is the block opening comment; by the\n * time we leave the block it is the closing comment, which serves as the block's anchor.\n * @type {TemplateNode}\n */\nexport let hydrate_node;\n\n/** @param {TemplateNode | null} node */\nexport function set_hydrate_node(node) {\n\tif (node === null) {\n\t\tw.hydration_mismatch();\n\t\tthrow HYDRATION_ERROR;\n\t}\n\n\treturn (hydrate_node = node);\n}\n\nexport function hydrate_next() {\n\treturn set_hydrate_node(get_next_sibling(hydrate_node));\n}\n\n/** @param {TemplateNode} node */\nexport function reset(node) {\n\tif (!hydrating) return;\n\n\t// If the node has remaining siblings, something has gone wrong\n\tif (get_next_sibling(hydrate_node) !== null) {\n\t\tw.hydration_mismatch();\n\t\tthrow HYDRATION_ERROR;\n\t}\n\n\thydrate_node = node;\n}\n\n/**\n * @param {HTMLTemplateElement} template\n */\nexport function hydrate_template(template) {\n\tif (hydrating) {\n\t\t// @ts-expect-error TemplateNode doesn't include DocumentFragment, but it's actually fine\n\t\thydrate_node = template.content;\n\t}\n}\n\nexport function next(count = 1) {\n\tif (hydrating) {\n\t\tvar i = count;\n\t\tvar node = hydrate_node;\n\n\t\twhile (i--) {\n\t\t\tnode = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\t}\n\n\t\thydrate_node = node;\n\t}\n}\n\n/**\n * Skips or removes (depending on {@link remove}) all nodes starting at `hydrate_node` up until the next hydration end comment\n * @param {boolean} remove\n */\nexport function skip_nodes(remove = true) {\n\tvar depth = 0;\n\tvar node = hydrate_node;\n\n\twhile (true) {\n\t\tif (node.nodeType === COMMENT_NODE) {\n\t\t\tvar data = /** @type {Comment} */ (node).data;\n\n\t\t\tif (data === HYDRATION_END) {\n\t\t\t\tif (depth === 0) return node;\n\t\t\t\tdepth -= 1;\n\t\t\t} else if (\n\t\t\t\tdata === HYDRATION_START ||\n\t\t\t\tdata === HYDRATION_START_ELSE ||\n\t\t\t\t// \"[1\", \"[2\", etc. for if blocks\n\t\t\t\t(data[0] === '[' && !isNaN(Number(data.slice(1))))\n\t\t\t) {\n\t\t\t\tdepth += 1;\n\t\t\t}\n\t\t}\n\n\t\tvar next = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tif (remove) node.remove();\n\t\tnode = next;\n\t}\n}\n\n/**\n *\n * @param {TemplateNode} node\n */\nexport function read_hydration_instruction(node) {\n\tif (!node || node.nodeType !== COMMENT_NODE) {\n\t\tw.hydration_mismatch();\n\t\tthrow HYDRATION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AA,EAChB;AACD;AAMO,SAAS,WAAW,SAAS,MAAM;AACzC,MAAI,QAAQ;AACZ,MAAI,OAAO;AAEX,SAAO,MAAM;AACZ,QAAI,KAAK,aAAa,cAAc;AACnC,UAAI;AAAA;AAAA,QAA+B,KAAM;AAAA;AAEzC,UAAI,SAAS,eAAe;AAC3B,YAAI,UAAU,EAAG,QAAO;AACxB,iBAAS;AAAA,MACV,WACC,SAAS,mBACT,SAAS;AAAA,MAER,KAAK,CAAC,MAAM,OAAO,CAAC,MAAM,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,GAC/C;AACD,iBAAS;AAAA,MACV;AAAA,IACD;AAEA,QAAIC;AAAA;AAAA,MAAoC,iBAAiB,IAAI;AAAA;AAC7D,QAAI,OAAQ,MAAK,OAAO;AACxB,WAAOA;AAAA,EACR;AACD;AAMO,SAAS,2BAA2B,MAAM;AAChD,MAAI,CAAC,QAAQ,KAAK,aAAa,cAAc;AAC5C,IAAE,mBAAmB;AACrB,UAAM;AAAA,EACP;AAEA;AAAA;AAAA,IAA+B,KAAM;AAAA;AACtC;", 6 - "names": ["fallback", "stack", "flags", "component_context", "effect", "tag", "trace", "label", "source", "label", "stack", "derived", "effect", "effect", "pending", "reset", "error", "boundary", "pending", "run", "previous_batch", "handle_error", "blocker", "effect", "boundary", "flags", "label", "effect", "d", "next", "derived", "stack", "source", "derived", "effect", "flags", "run", "set", "update", "run", "derived", "pending", "get", "get", "effect", "batch", "source", "flags", "child", "next", "source_stacks", "stack", "update", "e", "settled", "value", "eager_effects", "name", "effect", "e", "derived", "flags", "teardown", "next", "child", "sibling", "effect", "flags", "i", "derived", "teardown", "trace", "get", "stack", "version", "source", "s", "value", "key", "array_prototype", "includes", "equals", "child", "flags", "tag", "is", "next", "next"] 7 - }
-1005
node_modules/.vite/deps/chunk-YT4LSJJ5.js
··· 1 - import { 2 - all_registered_events, 3 - handle_event_propagation, 4 - on, 5 - root_event_handles 6 - } from "./chunk-DSSJOGTL.js"; 7 - import { 8 - COMMENT_NODE, 9 - DIRTY, 10 - DOCUMENT_FRAGMENT_NODE, 11 - FILENAME, 12 - HYDRATION_END, 13 - HYDRATION_ERROR, 14 - HYDRATION_START, 15 - IS_XHTML, 16 - LEGACY_PROPS, 17 - MAYBE_DIRTY, 18 - NAMESPACE_MATHML, 19 - NAMESPACE_SVG, 20 - REACTION_RAN, 21 - STATE_SYMBOL, 22 - TEMPLATE_FRAGMENT, 23 - TEMPLATE_USE_IMPORT_NODE, 24 - TEMPLATE_USE_MATHML, 25 - TEMPLATE_USE_SVG, 26 - TEXT_NODE, 27 - active_effect, 28 - array_from, 29 - boundary, 30 - clear_text_content, 31 - component_context, 32 - component_root, 33 - create_comment, 34 - create_element, 35 - create_fragment, 36 - create_text, 37 - define_property, 38 - dev_current_component_function, 39 - flushSync, 40 - get2 as get, 41 - get_first_child, 42 - get_next_sibling, 43 - hydrate_next, 44 - hydrate_node, 45 - hydrating, 46 - hydration_failed, 47 - init_operations, 48 - is_array, 49 - is_firefox, 50 - lifecycle_outside_component, 51 - merge_text_nodes, 52 - mutable_source, 53 - noop, 54 - pop, 55 - push, 56 - set, 57 - set_attribute, 58 - set_hydrate_node, 59 - set_hydrating, 60 - set_signal_status, 61 - user_pre_effect 62 - } from "./chunk-TY5SIVJK.js"; 63 - import { 64 - hydration_mismatch, 65 - legacy_recursive_reactive_block, 66 - lifecycle_double_unmount, 67 - state_proxy_unmount, 68 - true_default 69 - } from "./chunk-GSVKEBRT.js"; 70 - import { 71 - async_mode_flag 72 - } from "./chunk-OHYQYV5R.js"; 73 - 74 - // node_modules/svelte/src/internal/client/dom/reconciler.js 75 - var policy = ( 76 - // We gotta write it like this because after downleveling the pure comment may end up in the wrong location 77 - globalThis?.window?.trustedTypes && globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { 78 - /** @param {string} html */ 79 - createHTML: (html) => { 80 - return html; 81 - } 82 - }) 83 - ); 84 - function create_trusted_html(html) { 85 - return ( 86 - /** @type {string} */ 87 - policy?.createHTML(html) ?? html 88 - ); 89 - } 90 - function create_fragment_from_html(html) { 91 - var elem = create_element("template"); 92 - elem.innerHTML = create_trusted_html(html.replaceAll("<!>", "<!---->")); 93 - return elem.content; 94 - } 95 - 96 - // node_modules/svelte/src/internal/client/dom/template.js 97 - var TEMPLATE_TAG = IS_XHTML ? "template" : "TEMPLATE"; 98 - var SCRIPT_TAG = IS_XHTML ? "script" : "SCRIPT"; 99 - function assign_nodes(start, end) { 100 - var effect = ( 101 - /** @type {Effect} */ 102 - active_effect 103 - ); 104 - if (effect.nodes === null) { 105 - effect.nodes = { start, end, a: null, t: null }; 106 - } 107 - } 108 - function from_html(content, flags) { 109 - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; 110 - var use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0; 111 - var node; 112 - var has_start = !content.startsWith("<!>"); 113 - return () => { 114 - if (hydrating) { 115 - assign_nodes(hydrate_node, null); 116 - return hydrate_node; 117 - } 118 - if (node === void 0) { 119 - node = create_fragment_from_html(has_start ? content : "<!>" + content); 120 - if (!is_fragment) node = /** @type {TemplateNode} */ 121 - get_first_child(node); 122 - } 123 - var clone = ( 124 - /** @type {TemplateNode} */ 125 - use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true) 126 - ); 127 - if (is_fragment) { 128 - var start = ( 129 - /** @type {TemplateNode} */ 130 - get_first_child(clone) 131 - ); 132 - var end = ( 133 - /** @type {TemplateNode} */ 134 - clone.lastChild 135 - ); 136 - assign_nodes(start, end); 137 - } else { 138 - assign_nodes(clone, clone); 139 - } 140 - return clone; 141 - }; 142 - } 143 - function from_namespace(content, flags, ns = "svg") { 144 - var has_start = !content.startsWith("<!>"); 145 - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; 146 - var wrapped = `<${ns}>${has_start ? content : "<!>" + content}</${ns}>`; 147 - var node; 148 - return () => { 149 - if (hydrating) { 150 - assign_nodes(hydrate_node, null); 151 - return hydrate_node; 152 - } 153 - if (!node) { 154 - var fragment = ( 155 - /** @type {DocumentFragment} */ 156 - create_fragment_from_html(wrapped) 157 - ); 158 - var root = ( 159 - /** @type {Element} */ 160 - get_first_child(fragment) 161 - ); 162 - if (is_fragment) { 163 - node = document.createDocumentFragment(); 164 - while (get_first_child(root)) { 165 - node.appendChild( 166 - /** @type {TemplateNode} */ 167 - get_first_child(root) 168 - ); 169 - } 170 - } else { 171 - node = /** @type {Element} */ 172 - get_first_child(root); 173 - } 174 - } 175 - var clone = ( 176 - /** @type {TemplateNode} */ 177 - node.cloneNode(true) 178 - ); 179 - if (is_fragment) { 180 - var start = ( 181 - /** @type {TemplateNode} */ 182 - get_first_child(clone) 183 - ); 184 - var end = ( 185 - /** @type {TemplateNode} */ 186 - clone.lastChild 187 - ); 188 - assign_nodes(start, end); 189 - } else { 190 - assign_nodes(clone, clone); 191 - } 192 - return clone; 193 - }; 194 - } 195 - function from_svg(content, flags) { 196 - return from_namespace(content, flags, "svg"); 197 - } 198 - function from_mathml(content, flags) { 199 - return from_namespace(content, flags, "math"); 200 - } 201 - function fragment_from_tree(structure, ns) { 202 - var fragment = create_fragment(); 203 - for (var item of structure) { 204 - if (typeof item === "string") { 205 - fragment.append(create_text(item)); 206 - continue; 207 - } 208 - if (item === void 0 || item[0][0] === "/") { 209 - fragment.append(create_comment(item ? item[0].slice(3) : "")); 210 - continue; 211 - } 212 - const [name, attributes, ...children] = item; 213 - const namespace = name === "svg" ? NAMESPACE_SVG : name === "math" ? NAMESPACE_MATHML : ns; 214 - var element = create_element(name, namespace, attributes?.is); 215 - for (var key in attributes) { 216 - set_attribute(element, key, attributes[key]); 217 - } 218 - if (children.length > 0) { 219 - var target = element.nodeName === TEMPLATE_TAG ? ( 220 - /** @type {HTMLTemplateElement} */ 221 - element.content 222 - ) : element; 223 - target.append( 224 - fragment_from_tree(children, element.nodeName === "foreignObject" ? void 0 : namespace) 225 - ); 226 - } 227 - fragment.append(element); 228 - } 229 - return fragment; 230 - } 231 - function from_tree(structure, flags) { 232 - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; 233 - var use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0; 234 - var node; 235 - return () => { 236 - if (hydrating) { 237 - assign_nodes(hydrate_node, null); 238 - return hydrate_node; 239 - } 240 - if (node === void 0) { 241 - const ns = (flags & TEMPLATE_USE_SVG) !== 0 ? NAMESPACE_SVG : (flags & TEMPLATE_USE_MATHML) !== 0 ? NAMESPACE_MATHML : void 0; 242 - node = fragment_from_tree(structure, ns); 243 - if (!is_fragment) node = /** @type {TemplateNode} */ 244 - get_first_child(node); 245 - } 246 - var clone = ( 247 - /** @type {TemplateNode} */ 248 - use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true) 249 - ); 250 - if (is_fragment) { 251 - var start = ( 252 - /** @type {TemplateNode} */ 253 - get_first_child(clone) 254 - ); 255 - var end = ( 256 - /** @type {TemplateNode} */ 257 - clone.lastChild 258 - ); 259 - assign_nodes(start, end); 260 - } else { 261 - assign_nodes(clone, clone); 262 - } 263 - return clone; 264 - }; 265 - } 266 - function with_script(fn) { 267 - return () => run_scripts(fn()); 268 - } 269 - function run_scripts(node) { 270 - if (hydrating) return node; 271 - const is_fragment = node.nodeType === DOCUMENT_FRAGMENT_NODE; 272 - const scripts = ( 273 - /** @type {HTMLElement} */ 274 - node.nodeName === SCRIPT_TAG ? [ 275 - /** @type {HTMLScriptElement} */ 276 - node 277 - ] : node.querySelectorAll("script") 278 - ); 279 - const effect = ( 280 - /** @type {Effect & { nodes: EffectNodes }} */ 281 - active_effect 282 - ); 283 - for (const script of scripts) { 284 - const clone = create_element("script"); 285 - for (var attribute of script.attributes) { 286 - clone.setAttribute(attribute.name, attribute.value); 287 - } 288 - clone.textContent = script.textContent; 289 - if (is_fragment ? node.firstChild === script : node === script) { 290 - effect.nodes.start = clone; 291 - } 292 - if (is_fragment ? node.lastChild === script : node === script) { 293 - effect.nodes.end = clone; 294 - } 295 - script.replaceWith(clone); 296 - } 297 - return node; 298 - } 299 - function text(value = "") { 300 - if (!hydrating) { 301 - var t = create_text(value + ""); 302 - assign_nodes(t, t); 303 - return t; 304 - } 305 - var node = hydrate_node; 306 - if (node.nodeType !== TEXT_NODE) { 307 - node.before(node = create_text()); 308 - set_hydrate_node(node); 309 - } else { 310 - merge_text_nodes( 311 - /** @type {Text} */ 312 - node 313 - ); 314 - } 315 - assign_nodes(node, node); 316 - return node; 317 - } 318 - function comment() { 319 - if (hydrating) { 320 - assign_nodes(hydrate_node, null); 321 - return hydrate_node; 322 - } 323 - var frag = document.createDocumentFragment(); 324 - var start = document.createComment(""); 325 - var anchor = create_text(); 326 - frag.append(start, anchor); 327 - assign_nodes(start, anchor); 328 - return frag; 329 - } 330 - function append(anchor, dom) { 331 - if (hydrating) { 332 - var effect = ( 333 - /** @type {Effect & { nodes: EffectNodes }} */ 334 - active_effect 335 - ); 336 - if ((effect.f & REACTION_RAN) === 0 || effect.nodes.end === null) { 337 - effect.nodes.end = hydrate_node; 338 - } 339 - hydrate_next(); 340 - return; 341 - } 342 - if (anchor === null) { 343 - return; 344 - } 345 - anchor.before( 346 - /** @type {Node} */ 347 - dom 348 - ); 349 - } 350 - function props_id() { 351 - if (hydrating && hydrate_node && hydrate_node.nodeType === COMMENT_NODE && hydrate_node.textContent?.startsWith(`$`)) { 352 - const id = hydrate_node.textContent.substring(1); 353 - hydrate_next(); 354 - return id; 355 - } 356 - (window.__svelte ??= {}).uid ??= 1; 357 - return `c${window.__svelte.uid++}`; 358 - } 359 - 360 - // node_modules/svelte/src/utils.js 361 - var regex_return_characters = /\r/g; 362 - function hash(str) { 363 - str = str.replace(regex_return_characters, ""); 364 - let hash2 = 5381; 365 - let i = str.length; 366 - while (i--) hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i); 367 - return (hash2 >>> 0).toString(36); 368 - } 369 - var VOID_ELEMENT_NAMES = [ 370 - "area", 371 - "base", 372 - "br", 373 - "col", 374 - "command", 375 - "embed", 376 - "hr", 377 - "img", 378 - "input", 379 - "keygen", 380 - "link", 381 - "meta", 382 - "param", 383 - "source", 384 - "track", 385 - "wbr" 386 - ]; 387 - function is_void(name) { 388 - return VOID_ELEMENT_NAMES.includes(name) || name.toLowerCase() === "!doctype"; 389 - } 390 - function is_capture_event(name) { 391 - return name.endsWith("capture") && name !== "gotpointercapture" && name !== "lostpointercapture"; 392 - } 393 - var DELEGATED_EVENTS = [ 394 - "beforeinput", 395 - "click", 396 - "change", 397 - "dblclick", 398 - "contextmenu", 399 - "focusin", 400 - "focusout", 401 - "input", 402 - "keydown", 403 - "keyup", 404 - "mousedown", 405 - "mousemove", 406 - "mouseout", 407 - "mouseover", 408 - "mouseup", 409 - "pointerdown", 410 - "pointermove", 411 - "pointerout", 412 - "pointerover", 413 - "pointerup", 414 - "touchend", 415 - "touchmove", 416 - "touchstart" 417 - ]; 418 - function can_delegate_event(event_name) { 419 - return DELEGATED_EVENTS.includes(event_name); 420 - } 421 - var DOM_BOOLEAN_ATTRIBUTES = [ 422 - "allowfullscreen", 423 - "async", 424 - "autofocus", 425 - "autoplay", 426 - "checked", 427 - "controls", 428 - "default", 429 - "disabled", 430 - "formnovalidate", 431 - "indeterminate", 432 - "inert", 433 - "ismap", 434 - "loop", 435 - "multiple", 436 - "muted", 437 - "nomodule", 438 - "novalidate", 439 - "open", 440 - "playsinline", 441 - "readonly", 442 - "required", 443 - "reversed", 444 - "seamless", 445 - "selected", 446 - "webkitdirectory", 447 - "defer", 448 - "disablepictureinpicture", 449 - "disableremoteplayback" 450 - ]; 451 - var ATTRIBUTE_ALIASES = { 452 - // no `class: 'className'` because we handle that separately 453 - formnovalidate: "formNoValidate", 454 - ismap: "isMap", 455 - nomodule: "noModule", 456 - playsinline: "playsInline", 457 - readonly: "readOnly", 458 - defaultvalue: "defaultValue", 459 - defaultchecked: "defaultChecked", 460 - srcobject: "srcObject", 461 - novalidate: "noValidate", 462 - allowfullscreen: "allowFullscreen", 463 - disablepictureinpicture: "disablePictureInPicture", 464 - disableremoteplayback: "disableRemotePlayback" 465 - }; 466 - function normalize_attribute(name) { 467 - name = name.toLowerCase(); 468 - return ATTRIBUTE_ALIASES[name] ?? name; 469 - } 470 - var DOM_PROPERTIES = [ 471 - ...DOM_BOOLEAN_ATTRIBUTES, 472 - "formNoValidate", 473 - "isMap", 474 - "noModule", 475 - "playsInline", 476 - "readOnly", 477 - "value", 478 - "volume", 479 - "defaultValue", 480 - "defaultChecked", 481 - "srcObject", 482 - "noValidate", 483 - "allowFullscreen", 484 - "disablePictureInPicture", 485 - "disableRemotePlayback" 486 - ]; 487 - var PASSIVE_EVENTS = ["touchstart", "touchmove"]; 488 - function is_passive_event(name) { 489 - return PASSIVE_EVENTS.includes(name); 490 - } 491 - var STATE_CREATION_RUNES = ( 492 - /** @type {const} */ 493 - [ 494 - "$state", 495 - "$state.raw", 496 - "$derived", 497 - "$derived.by" 498 - ] 499 - ); 500 - var RUNES = ( 501 - /** @type {const} */ 502 - [ 503 - ...STATE_CREATION_RUNES, 504 - "$state.eager", 505 - "$state.snapshot", 506 - "$props", 507 - "$props.id", 508 - "$bindable", 509 - "$effect", 510 - "$effect.pre", 511 - "$effect.tracking", 512 - "$effect.root", 513 - "$effect.pending", 514 - "$inspect", 515 - "$inspect().with", 516 - "$inspect.trace", 517 - "$host" 518 - ] 519 - ); 520 - var RAW_TEXT_ELEMENTS = ( 521 - /** @type {const} */ 522 - ["textarea", "script", "style", "title"] 523 - ); 524 - function is_raw_text_element(name) { 525 - return RAW_TEXT_ELEMENTS.includes( 526 - /** @type {typeof RAW_TEXT_ELEMENTS[number]} */ 527 - name 528 - ); 529 - } 530 - function sanitize_location(location) { 531 - return ( 532 - /** @type {T} */ 533 - location?.replace(/\//g, "/​") 534 - ); 535 - } 536 - 537 - // node_modules/svelte/src/internal/client/render.js 538 - var should_intro = true; 539 - function set_should_intro(value) { 540 - should_intro = value; 541 - } 542 - function set_text(text2, value) { 543 - var str = value == null ? "" : typeof value === "object" ? `${value}` : value; 544 - if (str !== (text2.__t ??= text2.nodeValue)) { 545 - text2.__t = str; 546 - text2.nodeValue = `${str}`; 547 - } 548 - } 549 - function mount(component, options) { 550 - return _mount(component, options); 551 - } 552 - function hydrate(component, options) { 553 - init_operations(); 554 - options.intro = options.intro ?? false; 555 - const target = options.target; 556 - const was_hydrating = hydrating; 557 - const previous_hydrate_node = hydrate_node; 558 - try { 559 - var anchor = get_first_child(target); 560 - while (anchor && (anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ 561 - anchor.data !== HYDRATION_START)) { 562 - anchor = get_next_sibling(anchor); 563 - } 564 - if (!anchor) { 565 - throw HYDRATION_ERROR; 566 - } 567 - set_hydrating(true); 568 - set_hydrate_node( 569 - /** @type {Comment} */ 570 - anchor 571 - ); 572 - const instance = _mount(component, { ...options, anchor }); 573 - set_hydrating(false); 574 - return ( 575 - /** @type {Exports} */ 576 - instance 577 - ); 578 - } catch (error) { 579 - if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) { 580 - throw error; 581 - } 582 - if (error !== HYDRATION_ERROR) { 583 - console.warn("Failed to hydrate: ", error); 584 - } 585 - if (options.recover === false) { 586 - hydration_failed(); 587 - } 588 - init_operations(); 589 - clear_text_content(target); 590 - set_hydrating(false); 591 - return mount(component, options); 592 - } finally { 593 - set_hydrating(was_hydrating); 594 - set_hydrate_node(previous_hydrate_node); 595 - } 596 - } 597 - var listeners = /* @__PURE__ */ new Map(); 598 - function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) { 599 - init_operations(); 600 - var component = void 0; 601 - var unmount2 = component_root(() => { 602 - var anchor_node = anchor ?? target.appendChild(create_text()); 603 - boundary( 604 - /** @type {TemplateNode} */ 605 - anchor_node, 606 - { 607 - pending: () => { 608 - } 609 - }, 610 - (anchor_node2) => { 611 - push({}); 612 - var ctx = ( 613 - /** @type {ComponentContext} */ 614 - component_context 615 - ); 616 - if (context) ctx.c = context; 617 - if (events) { 618 - props.$$events = events; 619 - } 620 - if (hydrating) { 621 - assign_nodes( 622 - /** @type {TemplateNode} */ 623 - anchor_node2, 624 - null 625 - ); 626 - } 627 - should_intro = intro; 628 - component = Component(anchor_node2, props) || {}; 629 - should_intro = true; 630 - if (hydrating) { 631 - active_effect.nodes.end = hydrate_node; 632 - if (hydrate_node === null || hydrate_node.nodeType !== COMMENT_NODE || /** @type {Comment} */ 633 - hydrate_node.data !== HYDRATION_END) { 634 - hydration_mismatch(); 635 - throw HYDRATION_ERROR; 636 - } 637 - } 638 - pop(); 639 - }, 640 - transformError 641 - ); 642 - var registered_events = /* @__PURE__ */ new Set(); 643 - var event_handle = (events2) => { 644 - for (var i = 0; i < events2.length; i++) { 645 - var event_name = events2[i]; 646 - if (registered_events.has(event_name)) continue; 647 - registered_events.add(event_name); 648 - var passive2 = is_passive_event(event_name); 649 - for (const node of [target, document]) { 650 - var counts = listeners.get(node); 651 - if (counts === void 0) { 652 - counts = /* @__PURE__ */ new Map(); 653 - listeners.set(node, counts); 654 - } 655 - var count = counts.get(event_name); 656 - if (count === void 0) { 657 - node.addEventListener(event_name, handle_event_propagation, { passive: passive2 }); 658 - counts.set(event_name, 1); 659 - } else { 660 - counts.set(event_name, count + 1); 661 - } 662 - } 663 - } 664 - }; 665 - event_handle(array_from(all_registered_events)); 666 - root_event_handles.add(event_handle); 667 - return () => { 668 - for (var event_name of registered_events) { 669 - for (const node of [target, document]) { 670 - var counts = ( 671 - /** @type {Map<string, number>} */ 672 - listeners.get(node) 673 - ); 674 - var count = ( 675 - /** @type {number} */ 676 - counts.get(event_name) 677 - ); 678 - if (--count == 0) { 679 - node.removeEventListener(event_name, handle_event_propagation); 680 - counts.delete(event_name); 681 - if (counts.size === 0) { 682 - listeners.delete(node); 683 - } 684 - } else { 685 - counts.set(event_name, count); 686 - } 687 - } 688 - } 689 - root_event_handles.delete(event_handle); 690 - if (anchor_node !== anchor) { 691 - anchor_node.parentNode?.removeChild(anchor_node); 692 - } 693 - }; 694 - }); 695 - mounted_components.set(component, unmount2); 696 - return component; 697 - } 698 - var mounted_components = /* @__PURE__ */ new WeakMap(); 699 - function unmount(component, options) { 700 - const fn = mounted_components.get(component); 701 - if (fn) { 702 - mounted_components.delete(component); 703 - return fn(options); 704 - } 705 - if (true_default) { 706 - if (STATE_SYMBOL in component) { 707 - state_proxy_unmount(); 708 - } else { 709 - lifecycle_double_unmount(); 710 - } 711 - } 712 - return Promise.resolve(); 713 - } 714 - 715 - // node_modules/svelte/src/internal/client/dom/legacy/event-modifiers.js 716 - function trusted(fn) { 717 - return function(...args) { 718 - var event = ( 719 - /** @type {Event} */ 720 - args[0] 721 - ); 722 - if (event.isTrusted) { 723 - fn?.apply(this, args); 724 - } 725 - }; 726 - } 727 - function self(fn) { 728 - return function(...args) { 729 - var event = ( 730 - /** @type {Event} */ 731 - args[0] 732 - ); 733 - if (event.target === this) { 734 - fn?.apply(this, args); 735 - } 736 - }; 737 - } 738 - function stopPropagation(fn) { 739 - return function(...args) { 740 - var event = ( 741 - /** @type {Event} */ 742 - args[0] 743 - ); 744 - event.stopPropagation(); 745 - return fn?.apply(this, args); 746 - }; 747 - } 748 - function once(fn) { 749 - var ran = false; 750 - return function(...args) { 751 - if (ran) return; 752 - ran = true; 753 - return fn?.apply(this, args); 754 - }; 755 - } 756 - function stopImmediatePropagation(fn) { 757 - return function(...args) { 758 - var event = ( 759 - /** @type {Event} */ 760 - args[0] 761 - ); 762 - event.stopImmediatePropagation(); 763 - return fn?.apply(this, args); 764 - }; 765 - } 766 - function preventDefault(fn) { 767 - return function(...args) { 768 - var event = ( 769 - /** @type {Event} */ 770 - args[0] 771 - ); 772 - event.preventDefault(); 773 - return fn?.apply(this, args); 774 - }; 775 - } 776 - function passive(node, [event, handler]) { 777 - user_pre_effect(() => { 778 - return on(node, event, handler() ?? noop, { 779 - passive: true 780 - }); 781 - }); 782 - } 783 - function nonpassive(node, [event, handler]) { 784 - user_pre_effect(() => { 785 - return on(node, event, handler() ?? noop, { 786 - passive: false 787 - }); 788 - }); 789 - } 790 - 791 - // node_modules/svelte/src/legacy/legacy-client.js 792 - function createClassComponent(options) { 793 - return new Svelte4Component(options); 794 - } 795 - function asClassComponent(component) { 796 - return class extends Svelte4Component { 797 - /** @param {any} options */ 798 - constructor(options) { 799 - super({ 800 - component, 801 - ...options 802 - }); 803 - } 804 - }; 805 - } 806 - var Svelte4Component = class { 807 - /** @type {any} */ 808 - #events; 809 - /** @type {Record<string, any>} */ 810 - #instance; 811 - /** 812 - * @param {ComponentConstructorOptions & { 813 - * component: any; 814 - * }} options 815 - */ 816 - constructor(options) { 817 - var sources = /* @__PURE__ */ new Map(); 818 - var add_source = (key, value) => { 819 - var s = mutable_source(value, false, false); 820 - sources.set(key, s); 821 - return s; 822 - }; 823 - const props = new Proxy( 824 - { ...options.props || {}, $$events: {} }, 825 - { 826 - get(target, prop) { 827 - return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); 828 - }, 829 - has(target, prop) { 830 - if (prop === LEGACY_PROPS) return true; 831 - get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); 832 - return Reflect.has(target, prop); 833 - }, 834 - set(target, prop, value) { 835 - set(sources.get(prop) ?? add_source(prop, value), value); 836 - return Reflect.set(target, prop, value); 837 - } 838 - } 839 - ); 840 - this.#instance = (options.hydrate ? hydrate : mount)(options.component, { 841 - target: options.target, 842 - anchor: options.anchor, 843 - props, 844 - context: options.context, 845 - intro: options.intro ?? false, 846 - recover: options.recover, 847 - transformError: options.transformError 848 - }); 849 - if (!async_mode_flag && (!options?.props?.$$host || options.sync === false)) { 850 - flushSync(); 851 - } 852 - this.#events = props.$$events; 853 - for (const key of Object.keys(this.#instance)) { 854 - if (key === "$set" || key === "$destroy" || key === "$on") continue; 855 - define_property(this, key, { 856 - get() { 857 - return this.#instance[key]; 858 - }, 859 - /** @param {any} value */ 860 - set(value) { 861 - this.#instance[key] = value; 862 - }, 863 - enumerable: true 864 - }); 865 - } 866 - this.#instance.$set = /** @param {Record<string, any>} next */ 867 - (next) => { 868 - Object.assign(props, next); 869 - }; 870 - this.#instance.$destroy = () => { 871 - unmount(this.#instance); 872 - }; 873 - } 874 - /** @param {Record<string, any>} props */ 875 - $set(props) { 876 - this.#instance.$set(props); 877 - } 878 - /** 879 - * @param {string} event 880 - * @param {(...args: any[]) => any} callback 881 - * @returns {any} 882 - */ 883 - $on(event, callback) { 884 - this.#events[event] = this.#events[event] || []; 885 - const cb = (...args) => callback.call(this, ...args); 886 - this.#events[event].push(cb); 887 - return () => { 888 - this.#events[event] = this.#events[event].filter( 889 - /** @param {any} fn */ 890 - (fn) => fn !== cb 891 - ); 892 - }; 893 - } 894 - $destroy() { 895 - this.#instance.$destroy(); 896 - } 897 - }; 898 - function run(fn) { 899 - user_pre_effect(() => { 900 - fn(); 901 - var effect = ( 902 - /** @type {import('#client').Effect} */ 903 - active_effect 904 - ); 905 - if ((effect.f & DIRTY) !== 0) { 906 - let filename = "a file (we can't know which one)"; 907 - if (true_default) { 908 - filename = dev_current_component_function?.[FILENAME] ?? filename; 909 - } 910 - legacy_recursive_reactive_block(filename); 911 - set_signal_status(effect, MAYBE_DIRTY); 912 - } 913 - }); 914 - } 915 - function handlers(...handlers2) { 916 - return function(event) { 917 - const { stopImmediatePropagation: stopImmediatePropagation2 } = event; 918 - let stopped = false; 919 - event.stopImmediatePropagation = () => { 920 - stopped = true; 921 - stopImmediatePropagation2.call(event); 922 - }; 923 - const errors = []; 924 - for (const handler of handlers2) { 925 - try { 926 - handler?.call(this, event); 927 - } catch (e) { 928 - errors.push(e); 929 - } 930 - if (stopped) { 931 - break; 932 - } 933 - } 934 - for (let error of errors) { 935 - queueMicrotask(() => { 936 - throw error; 937 - }); 938 - } 939 - }; 940 - } 941 - function createBubbler() { 942 - const active_component_context = component_context; 943 - if (active_component_context === null) { 944 - lifecycle_outside_component("createBubbler"); 945 - } 946 - return (type) => (event) => { 947 - const events = ( 948 - /** @type {Record<string, Function | Function[]>} */ 949 - active_component_context.s.$$events?.[ 950 - /** @type {any} */ 951 - type 952 - ] 953 - ); 954 - if (events) { 955 - const callbacks = is_array(events) ? events.slice() : [events]; 956 - for (const fn of callbacks) { 957 - fn.call(active_component_context.x, event); 958 - } 959 - return !event.defaultPrevented; 960 - } 961 - return true; 962 - }; 963 - } 964 - 965 - export { 966 - hash, 967 - is_void, 968 - is_capture_event, 969 - can_delegate_event, 970 - normalize_attribute, 971 - is_raw_text_element, 972 - sanitize_location, 973 - create_trusted_html, 974 - create_fragment_from_html, 975 - assign_nodes, 976 - from_html, 977 - from_svg, 978 - from_mathml, 979 - from_tree, 980 - with_script, 981 - text, 982 - comment, 983 - append, 984 - props_id, 985 - should_intro, 986 - set_should_intro, 987 - set_text, 988 - mount, 989 - hydrate, 990 - unmount, 991 - trusted, 992 - self, 993 - stopPropagation, 994 - once, 995 - stopImmediatePropagation, 996 - preventDefault, 997 - passive, 998 - nonpassive, 999 - createClassComponent, 1000 - asClassComponent, 1001 - run, 1002 - handlers, 1003 - createBubbler 1004 - }; 1005 - //# sourceMappingURL=chunk-YT4LSJJ5.js.map
-7
node_modules/.vite/deps/chunk-YT4LSJJ5.js.map
··· 1 - { 2 - "version": 3, 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"], 4 - "sourcesContent": ["import { 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 */\nexport function create_trusted_html(html) {\n\treturn /** @type {string} */ (policy?.createHTML(html) ?? html);\n}\n\n/**\n * @param {string} html\n */\nexport function create_fragment_from_html(html) {\n\tvar elem = create_element('template');\n\telem.innerHTML = create_trusted_html(html.replaceAll('<!>', '<!---->')); // XHTML compliance\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);\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}</${ns}>`;\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));\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 `['// <data>']`\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 `<svelte:element>` 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<string, string>}\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// Matches valid HTML/SVG/MathML element names and custom element names.\n// https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n//\n// Standard elements: ASCII alpha start, followed by ASCII alphanumerics.\n// Custom elements: ASCII alpha start, followed by any mix of PCENChar (which\n// includes ASCII alphanumerics, `-`, `.`, `_`, and specified Unicode ranges),\n// with at least one hyphen required somewhere after the first character.\n//\n// Rejects strings containing whitespace, quotes, angle brackets, slashes, equals,\n// or other characters that could break out of a tag-name token and enable markup injection.\nexport const REGEX_VALID_TAG_NAME =\n\t/^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\\-_\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}]+)*$/u;\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 `<svelte:element>` 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<string, any>} Props\n * @template {Record<string, any>} Exports\n * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component\n * @param {MountOptions<Props>} 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<string, any>} Props\n * @template {Record<string, any>} Exports\n * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component\n * @param {{} extends Props ? {\n * \t\ttarget: Document | Element | ShadowRoot;\n * \t\tprops?: Props;\n * \t\tevents?: Record<string, (e: any) => any>;\n * \tcontext?: Map<any, any>;\n * \t\tintro?: boolean;\n * \t\trecover?: boolean;\n *\t\ttransformError?: (error: unknown) => unknown;\n * \t} : {\n * \t\ttarget: Document | Element | ShadowRoot;\n * \t\tprops: Props;\n * \t\tevents?: Record<string, (e: any) => any>;\n * \tcontext?: Map<any, any>;\n * \t\tintro?: boolean;\n * \t\trecover?: boolean;\n *\t\ttransformError?: (error: unknown) => unknown;\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<EventTarget, Map<string, number>>} */\nconst listeners = new Map();\n\n/**\n * @template {Record<string, any>} Exports\n * @param {ComponentType<SvelteComponent<any>> | Component<any>} Component\n * @param {MountOptions} options\n * @returns {Exports}\n */\nfunction _mount(\n\tComponent,\n\t{ target, anchor, props = {}, events, context, intro = true, transformError }\n) {\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\ttransformError\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<string>} */\n\t\tvar registered_events = new Set();\n\n\t\t/** @param {Array<string>} 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<string, number>} */ (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<string, any>} component\n * @param {{ outro?: boolean }} [options]\n * @returns {Promise<void>}\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<unknown>) => 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<unknown>) => 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<unknown>) => 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<unknown>) => 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<unknown>) => 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<unknown>) => 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<string, any>} Props\n * @template {Record<string, any>} Exports\n * @template {Record<string, any>} Events\n * @template {Record<string, any>} Slots\n *\n * @param {ComponentConstructorOptions<Props> & {\n * \tcomponent: ComponentType<SvelteComponent<Props, Events, Slots>> | Component<Props>;\n * }} options\n * @returns {SvelteComponent<Props, Events, Slots> & 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<string, any>} Props\n * @template {Record<string, any>} Exports\n * @template {Record<string, any>} Events\n * @template {Record<string, any>} Slots\n *\n * @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component\n * @returns {ComponentType<SvelteComponent<Props, Events, Slots> & 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<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType\n */\n\nclass Svelte4Component {\n\t/** @type {any} */\n\t#events;\n\n\t/** @type {Record<string, any>} */\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\ttransformError: options.transformError\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<string, any>} 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<string, any>} 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<string, Function | Function[]>} */ (\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"], 5 - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAM;AAAA;AAAA,EAEL,YAAY,QAAQ,gBACJ,WAAW,OAAO,aAAa,aAAa,uBAAuB;AAAA;AAAA,IAElF,YAAY,CAAC,SAAS;AACrB,aAAO;AAAA,IACR;AAAA,EACD,CAAC;AAAA;AAGK,SAAS,oBAAoB,MAAM;AACzC;AAAA;AAAA,IAA8B,QAAQ,WAAW,IAAI,KAAK;AAAA;AAC3D;AAKO,SAAS,0BAA0B,MAAM;AAC/C,MAAI,OAAO,eAAe,UAAU;AACpC,OAAK,YAAY,oBAAoB,KAAK,WAAW,OAAO,SAAS,CAAC;AACtE,SAAO,KAAK;AACb;;;ACQA,IAAM,eAAe,WAAW,aAAa;AAC7C,IAAM,aAAa,WAAW,WAAW;AAMlC,SAAS,aAAa,OAAO,KAAK;AACxC,MAAI;AAAA;AAAA,IAAgC;AAAA;AACpC,MAAI,OAAO,UAAU,MAAM;AAC1B,WAAO,QAAQ,EAAE,OAAO,KAAK,GAAG,MAAM,GAAG,KAAK;AAAA,EAC/C;AACD;AAQO,SAAS,UAAU,SAAS,OAAO;AACzC,MAAI,eAAe,QAAQ,uBAAuB;AAClD,MAAI,mBAAmB,QAAQ,8BAA8B;AAG7D,MAAI;AAMJ,MAAI,YAAY,CAAC,QAAQ,WA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MACD;AAAA,IACD;AAEA,aAAS,SAAS,QAAQ;AACzB,qBAAe,MAAM;AACpB,cAAM;AAAA,MACP,CAAC;AAAA,IACF;AAAA,EACD;AACD;AAMO,SAAS,gBAAgB;AAC/B,QAAM,2BAA2B;AACjC,MAAI,6BAA6B,MAAM;AACtC,IAAE,4BAA4B,eAAe;AAAA,EAC9C;AAEA,SAAO,CAAqB,SAAS,CAAoB,UAAU;AAClE,UAAM;AAAA;AAAA,MACL,yBAAyB,EAAE;AAAA;AAAA,QACJ;AAAA,MAAK;AAAA;AAE7B,QAAI,QAAQ;AACX,YAAM,YAAY,SAAS,MAAM,IAAI,OAAO,MAAM,IAAI,CAAC,MAAM;AAC7D,iBAAW,MAAM,WAAW;AAC3B,WAAG,KAAK,yBAAyB,GAAG,KAAK;AAAA,MAC1C;AACA,aAAO,CAAC,MAAM;AAAA,IACf;AACA,WAAO;AAAA,EACR;AACD;", 6 - "names": ["hash", "text", "unmount", "anchor_node", "events", "passive", "handlers", "stopImmediatePropagation"] 7 - }
+6 -5
node_modules/.vite/deps/svelte.js
··· 7 7 hydratable, 8 8 onDestroy, 9 9 onMount 10 - } from "./chunk-LYAULJVB.js"; 10 + } from "./chunk-CUKAGXEG.js"; 11 11 import "./chunk-U7P2NEEE.js"; 12 12 import { 13 13 hydrate, 14 14 mount, 15 15 unmount 16 - } from "./chunk-YT4LSJJ5.js"; 17 - import "./chunk-DSSJOGTL.js"; 16 + } from "./chunk-NGIUFUAZ.js"; 17 + import "./chunk-BZYIP436.js"; 18 18 import { 19 19 createContext, 20 20 flushSync, ··· 26 26 settled, 27 27 tick, 28 28 untrack 29 - } from "./chunk-TY5SIVJK.js"; 30 - import "./chunk-GSVKEBRT.js"; 29 + } from "./chunk-7EVP6DBN.js"; 30 + import "./chunk-XGCWAT63.js"; 31 + import "./chunk-HNWPC2PS.js"; 31 32 import "./chunk-OHYQYV5R.js"; 32 33 export { 33 34 afterUpdate,
+6 -5
node_modules/.vite/deps/svelte_attachments.js
··· 1 1 import { 2 2 createAttachmentKey, 3 3 fromAction 4 - } from "./chunk-LYAULJVB.js"; 4 + } from "./chunk-CUKAGXEG.js"; 5 5 import "./chunk-U7P2NEEE.js"; 6 - import "./chunk-YT4LSJJ5.js"; 7 - import "./chunk-DSSJOGTL.js"; 8 - import "./chunk-TY5SIVJK.js"; 9 - import "./chunk-GSVKEBRT.js"; 6 + import "./chunk-NGIUFUAZ.js"; 7 + import "./chunk-BZYIP436.js"; 8 + import "./chunk-7EVP6DBN.js"; 9 + import "./chunk-XGCWAT63.js"; 10 + import "./chunk-HNWPC2PS.js"; 10 11 import "./chunk-OHYQYV5R.js"; 11 12 export { 12 13 createAttachmentKey,
+4 -3
node_modules/.vite/deps/svelte_events.js
··· 1 1 import "./chunk-7RQDXF5S.js"; 2 2 import { 3 3 on 4 - } from "./chunk-DSSJOGTL.js"; 5 - import "./chunk-TY5SIVJK.js"; 6 - import "./chunk-GSVKEBRT.js"; 4 + } from "./chunk-BZYIP436.js"; 5 + import "./chunk-7EVP6DBN.js"; 6 + import "./chunk-XGCWAT63.js"; 7 + import "./chunk-HNWPC2PS.js"; 7 8 import "./chunk-OHYQYV5R.js"; 8 9 export { 9 10 on
+6 -5
node_modules/.vite/deps/svelte_internal_client.js
··· 96 96 validate_store, 97 97 validate_void_dynamic_element, 98 98 wrap_snippet 99 - } from "./chunk-LYAULJVB.js"; 99 + } from "./chunk-CUKAGXEG.js"; 100 100 import "./chunk-U7P2NEEE.js"; 101 101 import { 102 102 append, ··· 115 115 text, 116 116 trusted, 117 117 with_script 118 - } from "./chunk-YT4LSJJ5.js"; 118 + } from "./chunk-NGIUFUAZ.js"; 119 119 import { 120 120 apply, 121 121 delegate, 122 122 delegated, 123 123 event, 124 124 replay_events 125 - } from "./chunk-DSSJOGTL.js"; 125 + } from "./chunk-BZYIP436.js"; 126 126 import { 127 127 $document, 128 128 $window, ··· 200 200 user_effect, 201 201 user_pre_effect, 202 202 wait 203 - } from "./chunk-TY5SIVJK.js"; 204 - import "./chunk-GSVKEBRT.js"; 203 + } from "./chunk-7EVP6DBN.js"; 204 + import "./chunk-XGCWAT63.js"; 205 + import "./chunk-HNWPC2PS.js"; 205 206 import "./chunk-OHYQYV5R.js"; 206 207 export { 207 208 CLASS,
+5 -4
node_modules/.vite/deps/svelte_legacy.js
··· 12 12 stopImmediatePropagation, 13 13 stopPropagation, 14 14 trusted 15 - } from "./chunk-YT4LSJJ5.js"; 16 - import "./chunk-DSSJOGTL.js"; 17 - import "./chunk-TY5SIVJK.js"; 18 - import "./chunk-GSVKEBRT.js"; 15 + } from "./chunk-NGIUFUAZ.js"; 16 + import "./chunk-BZYIP436.js"; 17 + import "./chunk-7EVP6DBN.js"; 18 + import "./chunk-XGCWAT63.js"; 19 + import "./chunk-HNWPC2PS.js"; 19 20 import "./chunk-OHYQYV5R.js"; 20 21 export { 21 22 asClassComponent,
+8 -7
node_modules/.vite/deps/svelte_motion.js
··· 1 1 import { 2 2 MediaQuery 3 - } from "./chunk-FQXKS6MM.js"; 4 - import "./chunk-2ZGNHB6A.js"; 3 + } from "./chunk-K5DCWF3A.js"; 4 + import "./chunk-SSJEA4FD.js"; 5 5 import "./chunk-7RQDXF5S.js"; 6 6 import { 7 7 linear ··· 9 9 import { 10 10 loop, 11 11 raf 12 - } from "./chunk-LYAULJVB.js"; 12 + } from "./chunk-CUKAGXEG.js"; 13 13 import "./chunk-U7P2NEEE.js"; 14 - import "./chunk-YT4LSJJ5.js"; 15 - import "./chunk-DSSJOGTL.js"; 14 + import "./chunk-NGIUFUAZ.js"; 15 + import "./chunk-BZYIP436.js"; 16 16 import { 17 17 deferred, 18 18 get2 as get, ··· 22 22 state, 23 23 tag, 24 24 writable 25 - } from "./chunk-TY5SIVJK.js"; 25 + } from "./chunk-7EVP6DBN.js"; 26 + import "./chunk-XGCWAT63.js"; 26 27 import { 27 28 true_default 28 - } from "./chunk-GSVKEBRT.js"; 29 + } from "./chunk-HNWPC2PS.js"; 29 30 import "./chunk-OHYQYV5R.js"; 30 31 31 32 // node_modules/svelte/src/motion/utils.js
+1 -1
node_modules/.vite/deps/svelte_motion.js.map
··· 2 2 "version": 3, 3 3 "sources": ["../../svelte/src/motion/utils.js", "../../svelte/src/motion/spring.js", "../../svelte/src/motion/tweened.js", "../../svelte/src/motion/index.js"], 4 4 "sourcesContent": ["/**\n * @param {any} obj\n * @returns {obj is Date}\n */\nexport function is_date(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Date]';\n}\n", "/** @import { Task } from '#client' */\n/** @import { TickContext } from './private.js' */\n/** @import { Spring as SpringStore, SpringOptions, SpringUpdateOptions } from './public.js' */\nimport { writable } from '../store/shared/index.js';\nimport { loop } from '../internal/client/loop.js';\nimport { raf } from '../internal/client/timing.js';\nimport { is_date } from './utils.js';\nimport { set, state } from '../internal/client/reactivity/sources.js';\nimport { render_effect } from '../internal/client/reactivity/effects.js';\nimport { tag } from '../internal/client/dev/tracing.js';\nimport { get } from '../internal/client/runtime.js';\nimport { deferred, noop } from '../internal/shared/utils.js';\nimport { DEV } from 'esm-env';\n\n/**\n * @template T\n * @param {TickContext} ctx\n * @param {T} last_value\n * @param {T} current_value\n * @param {T} target_value\n * @returns {T}\n */\nfunction tick_spring(ctx, last_value, current_value, target_value) {\n\tif (typeof current_value === 'number' || is_date(current_value)) {\n\t\t// @ts-ignore\n\t\tconst delta = target_value - current_value;\n\t\t// @ts-ignore\n\t\tconst velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0\n\t\tconst spring = ctx.opts.stiffness * delta;\n\t\tconst damper = ctx.opts.damping * velocity;\n\t\tconst acceleration = (spring - damper) * ctx.inv_mass;\n\t\tconst d = (velocity + acceleration) * ctx.dt;\n\t\tif (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) {\n\t\t\treturn target_value; // settled\n\t\t} else {\n\t\t\tctx.settled = false; // signal loop to keep ticking\n\t\t\t// @ts-ignore\n\t\t\treturn is_date(current_value) ? new Date(current_value.getTime() + d) : current_value + d;\n\t\t}\n\t} else if (Array.isArray(current_value)) {\n\t\t// @ts-ignore\n\t\treturn current_value.map((_, i) =>\n\t\t\t// @ts-ignore\n\t\t\ttick_spring(ctx, last_value[i], current_value[i], target_value[i])\n\t\t);\n\t} else if (typeof current_value === 'object') {\n\t\tconst next_value = {};\n\t\tfor (const k in current_value) {\n\t\t\t// @ts-ignore\n\t\t\tnext_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]);\n\t\t}\n\t\t// @ts-ignore\n\t\treturn next_value;\n\t} else {\n\t\tthrow new Error(`Cannot spring ${typeof current_value} values`);\n\t}\n}\n\n/**\n * The spring function in Svelte creates a store whose value is animated, with a motion that simulates the behavior of a spring. This means when the value changes, instead of transitioning at a steady rate, it \"bounces\" like a spring would, depending on the physics parameters provided. This adds a level of realism to the transitions and can enhance the user experience.\n *\n * @deprecated Use [`Spring`](https://svelte.dev/docs/svelte/svelte-motion#Spring) instead\n * @template [T=any]\n * @param {T} [value]\n * @param {SpringOptions} [opts]\n * @returns {SpringStore<T>}\n */\nexport function spring(value, opts = {}) {\n\tconst store = writable(value);\n\tconst { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;\n\t/** @type {number} */\n\tlet last_time;\n\t/** @type {Task | null} */\n\tlet task;\n\t/** @type {object} */\n\tlet current_token;\n\n\tlet last_value = /** @type {T} */ (value);\n\tlet target_value = /** @type {T | undefined} */ (value);\n\n\tlet inv_mass = 1;\n\tlet inv_mass_recovery_rate = 0;\n\tlet cancel_task = false;\n\t/**\n\t * @param {T} new_value\n\t * @param {SpringUpdateOptions} opts\n\t * @returns {Promise<void>}\n\t */\n\tfunction set(new_value, opts = {}) {\n\t\ttarget_value = new_value;\n\t\tconst token = (current_token = {});\n\t\tif (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) {\n\t\t\tcancel_task = true; // cancel any running animation\n\t\t\tlast_time = raf.now();\n\t\t\tlast_value = new_value;\n\t\t\tstore.set((value = target_value));\n\t\t\treturn Promise.resolve();\n\t\t} else if (opts.soft) {\n\t\t\tconst rate = opts.soft === true ? 0.5 : +opts.soft;\n\t\t\tinv_mass_recovery_rate = 1 / (rate * 60);\n\t\t\tinv_mass = 0; // infinite mass, unaffected by spring forces\n\t\t}\n\t\tif (!task) {\n\t\t\tlast_time = raf.now();\n\t\t\tcancel_task = false;\n\t\t\ttask = loop((now) => {\n\t\t\t\tif (cancel_task) {\n\t\t\t\t\tcancel_task = false;\n\t\t\t\t\ttask = null;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tinv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1);\n\n\t\t\t\t// clamp elapsed time to 1/30th of a second, so that longer pauses\n\t\t\t\t// (blocked thread or inactive tab) don't cause the spring to go haywire\n\t\t\t\tconst elapsed = Math.min(now - last_time, 1000 / 30);\n\n\t\t\t\t/** @type {TickContext} */\n\t\t\t\tconst ctx = {\n\t\t\t\t\tinv_mass,\n\t\t\t\t\topts: spring,\n\t\t\t\t\tsettled: true,\n\t\t\t\t\tdt: (elapsed * 60) / 1000\n\t\t\t\t};\n\t\t\t\t// @ts-ignore\n\t\t\t\tconst next_value = tick_spring(ctx, last_value, value, target_value);\n\t\t\t\tlast_time = now;\n\t\t\t\tlast_value = /** @type {T} */ (value);\n\t\t\t\tstore.set((value = /** @type {T} */ (next_value)));\n\t\t\t\tif (ctx.settled) {\n\t\t\t\t\ttask = null;\n\t\t\t\t}\n\t\t\t\treturn !ctx.settled;\n\t\t\t});\n\t\t}\n\t\treturn new Promise((fulfil) => {\n\t\t\t/** @type {Task} */ (task).promise.then(() => {\n\t\t\t\tif (token === current_token) fulfil();\n\t\t\t});\n\t\t});\n\t}\n\t/** @type {SpringStore<T>} */\n\t// @ts-expect-error - class-only properties are missing\n\tconst spring = {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(/** @type {T} */ (target_value), /** @type {T} */ (value)), opts),\n\t\tsubscribe: store.subscribe,\n\t\tstiffness,\n\t\tdamping,\n\t\tprecision\n\t};\n\treturn spring;\n}\n\n/**\n * A wrapper for a value that behaves in a spring-like fashion. Changes to `spring.target` will cause `spring.current` to\n * move towards it over time, taking account of the `spring.stiffness` and `spring.damping` parameters.\n *\n * ```svelte\n * <script>\n * \timport { Spring } from 'svelte/motion';\n *\n * \tconst spring = new Spring(0);\n * </script>\n *\n * <input type=\"range\" bind:value={spring.target} />\n * <input type=\"range\" bind:value={spring.current} disabled />\n * ```\n * @template T\n * @since 5.8.0\n */\nexport class Spring {\n\t#stiffness = state(0.15);\n\t#damping = state(0.8);\n\t#precision = state(0.01);\n\n\t#current;\n\t#target;\n\n\t#last_value = /** @type {T} */ (undefined);\n\t#last_time = 0;\n\n\t#inverse_mass = 1;\n\t#momentum = 0;\n\n\t/** @type {import('../internal/client/types').Task | null} */\n\t#task = null;\n\n\t/** @type {ReturnType<typeof deferred> | null} */\n\t#deferred = null;\n\n\t/**\n\t * @param {T} value\n\t * @param {SpringOptions} [options]\n\t */\n\tconstructor(value, options = {}) {\n\t\tthis.#current = DEV ? tag(state(value), 'Spring.current') : state(value);\n\t\tthis.#target = DEV ? tag(state(value), 'Spring.target') : state(value);\n\n\t\tif (typeof options.stiffness === 'number') this.#stiffness.v = clamp(options.stiffness, 0, 1);\n\t\tif (typeof options.damping === 'number') this.#damping.v = clamp(options.damping, 0, 1);\n\t\tif (typeof options.precision === 'number') this.#precision.v = options.precision;\n\n\t\tif (DEV) {\n\t\t\ttag(this.#stiffness, 'Spring.stiffness');\n\t\t\ttag(this.#damping, 'Spring.damping');\n\t\t\ttag(this.#precision, 'Spring.precision');\n\t\t\ttag(this.#current, 'Spring.current');\n\t\t\ttag(this.#target, 'Spring.target');\n\t\t}\n\t}\n\n\t/**\n\t * Create a spring whose value is bound to the return value of `fn`. This must be called\n\t * inside an effect root (for example, during component initialisation).\n\t *\n\t * ```svelte\n\t * <script>\n\t * \timport { Spring } from 'svelte/motion';\n\t *\n\t * \tlet { number } = $props();\n\t *\n\t * \tconst spring = Spring.of(() => number);\n\t * </script>\n\t * ```\n\t * @template U\n\t * @param {() => U} fn\n\t * @param {SpringOptions} [options]\n\t */\n\tstatic of(fn, options) {\n\t\tconst spring = new Spring(fn(), options);\n\n\t\trender_effect(() => {\n\t\t\tspring.set(fn());\n\t\t});\n\n\t\treturn spring;\n\t}\n\n\t/** @param {T} value */\n\t#update(value) {\n\t\tset(this.#target, value);\n\n\t\tthis.#current.v ??= value;\n\t\tthis.#last_value ??= this.#current.v;\n\n\t\tif (!this.#task) {\n\t\t\tthis.#last_time = raf.now();\n\n\t\t\tvar inv_mass_recovery_rate = 1000 / (this.#momentum * 60);\n\n\t\t\tthis.#task ??= loop((now) => {\n\t\t\t\tthis.#inverse_mass = Math.min(this.#inverse_mass + inv_mass_recovery_rate, 1);\n\n\t\t\t\t// clamp elapsed time to 1/30th of a second, so that longer pauses\n\t\t\t\t// (blocked thread or inactive tab) don't cause the spring to go haywire\n\t\t\t\tconst elapsed = Math.min(now - this.#last_time, 1000 / 30);\n\n\t\t\t\t/** @type {import('./private').TickContext} */\n\t\t\t\tconst ctx = {\n\t\t\t\t\tinv_mass: this.#inverse_mass,\n\t\t\t\t\topts: {\n\t\t\t\t\t\tstiffness: this.#stiffness.v,\n\t\t\t\t\t\tdamping: this.#damping.v,\n\t\t\t\t\t\tprecision: this.#precision.v\n\t\t\t\t\t},\n\t\t\t\t\tsettled: true,\n\t\t\t\t\tdt: (elapsed * 60) / 1000\n\t\t\t\t};\n\n\t\t\t\tvar next = tick_spring(ctx, this.#last_value, this.#current.v, this.#target.v);\n\t\t\t\tthis.#last_value = this.#current.v;\n\t\t\t\tthis.#last_time = now;\n\t\t\t\tset(this.#current, next);\n\n\t\t\t\tif (ctx.settled) {\n\t\t\t\t\tthis.#task = null;\n\t\t\t\t}\n\n\t\t\t\treturn !ctx.settled;\n\t\t\t});\n\t\t}\n\n\t\treturn this.#task.promise;\n\t}\n\n\t/**\n\t * Sets `spring.target` to `value` and returns a `Promise` that resolves if and when `spring.current` catches up to it.\n\t *\n\t * If `options.instant` is `true`, `spring.current` immediately matches `spring.target`.\n\t *\n\t * If `options.preserveMomentum` is provided, the spring will continue on its current trajectory for\n\t * the specified number of milliseconds. This is useful for things like 'fling' gestures.\n\t *\n\t * @param {T} value\n\t * @param {SpringUpdateOptions} [options]\n\t */\n\tset(value, options) {\n\t\tthis.#deferred?.reject(new Error('Aborted'));\n\n\t\tif (options?.instant || this.#current.v === undefined) {\n\t\t\tthis.#task?.abort();\n\t\t\tthis.#task = null;\n\t\t\tset(this.#current, set(this.#target, value));\n\t\t\tthis.#last_value = value;\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tif (options?.preserveMomentum) {\n\t\t\tthis.#inverse_mass = 0;\n\t\t\tthis.#momentum = options.preserveMomentum;\n\t\t}\n\n\t\tvar d = (this.#deferred = deferred());\n\t\td.promise.catch(noop);\n\n\t\tthis.#update(value).then(() => {\n\t\t\tif (d !== this.#deferred) return;\n\t\t\td.resolve(undefined);\n\t\t});\n\n\t\treturn d.promise;\n\t}\n\n\tget current() {\n\t\treturn get(this.#current);\n\t}\n\n\tget damping() {\n\t\treturn get(this.#damping);\n\t}\n\n\tset damping(v) {\n\t\tset(this.#damping, clamp(v, 0, 1));\n\t}\n\n\tget precision() {\n\t\treturn get(this.#precision);\n\t}\n\n\tset precision(v) {\n\t\tset(this.#precision, v);\n\t}\n\n\tget stiffness() {\n\t\treturn get(this.#stiffness);\n\t}\n\n\tset stiffness(v) {\n\t\tset(this.#stiffness, clamp(v, 0, 1));\n\t}\n\n\tget target() {\n\t\treturn get(this.#target);\n\t}\n\n\tset target(v) {\n\t\tthis.set(v);\n\t}\n}\n\n/**\n * @param {number} n\n * @param {number} min\n * @param {number} max\n */\nfunction clamp(n, min, max) {\n\treturn Math.max(min, Math.min(max, n));\n}\n", "/** @import { Task } from '../internal/client/types' */\n/** @import { Tweened, TweenOptions } from './public' */\nimport { writable } from '../store/shared/index.js';\nimport { raf } from '../internal/client/timing.js';\nimport { loop } from '../internal/client/loop.js';\nimport { linear } from '../easing/index.js';\nimport { is_date } from './utils.js';\nimport { set, state } from '../internal/client/reactivity/sources.js';\nimport { tag } from '../internal/client/dev/tracing.js';\nimport { get, render_effect } from 'svelte/internal/client';\nimport { DEV } from 'esm-env';\n\n/**\n * @template T\n * @param {T} a\n * @param {T} b\n * @returns {(t: number) => T}\n */\nfunction get_interpolator(a, b) {\n\tif (a === b || a !== a) return () => a;\n\n\tconst type = typeof a;\n\tif (type !== typeof b || Array.isArray(a) !== Array.isArray(b)) {\n\t\tthrow new Error('Cannot interpolate values of different type');\n\t}\n\n\tif (Array.isArray(a)) {\n\t\tconst arr = /** @type {Array<any>} */ (b).map((bi, i) => {\n\t\t\treturn get_interpolator(/** @type {Array<any>} */ (a)[i], bi);\n\t\t});\n\n\t\t// @ts-ignore\n\t\treturn (t) => arr.map((fn) => fn(t));\n\t}\n\n\tif (type === 'object') {\n\t\tif (!a || !b) {\n\t\t\tthrow new Error('Object cannot be null');\n\t\t}\n\n\t\tif (is_date(a) && is_date(b)) {\n\t\t\tconst an = a.getTime();\n\t\t\tconst bn = b.getTime();\n\t\t\tconst delta = bn - an;\n\n\t\t\t// @ts-ignore\n\t\t\treturn (t) => new Date(an + t * delta);\n\t\t}\n\n\t\tconst keys = Object.keys(b);\n\n\t\t/** @type {Record<string, (t: number) => T>} */\n\t\tconst interpolators = {};\n\t\tkeys.forEach((key) => {\n\t\t\t// @ts-ignore\n\t\t\tinterpolators[key] = get_interpolator(a[key], b[key]);\n\t\t});\n\n\t\t// @ts-ignore\n\t\treturn (t) => {\n\t\t\t/** @type {Record<string, any>} */\n\t\t\tconst result = {};\n\t\t\tkeys.forEach((key) => {\n\t\t\t\tresult[key] = interpolators[key](t);\n\t\t\t});\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tif (type === 'number') {\n\t\tconst delta = /** @type {number} */ (b) - /** @type {number} */ (a);\n\t\t// @ts-ignore\n\t\treturn (t) => a + t * delta;\n\t}\n\n\t// for non-numeric values, snap to the final value immediately\n\treturn () => b;\n}\n\n/**\n * A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time.\n *\n * @deprecated Use [`Tween`](https://svelte.dev/docs/svelte/svelte-motion#Tween) instead\n * @template T\n * @param {T} [value]\n * @param {TweenOptions<T>} [defaults]\n * @returns {Tweened<T>}\n */\nexport function tweened(value, defaults = {}) {\n\tconst store = writable(value);\n\t/** @type {Task} */\n\tlet task;\n\tlet target_value = value;\n\t/**\n\t * @param {T} new_value\n\t * @param {TweenOptions<T>} [opts]\n\t */\n\tfunction set(new_value, opts) {\n\t\ttarget_value = new_value;\n\n\t\tif (value == null) {\n\t\t\tstore.set((value = new_value));\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\t/** @type {Task | null} */\n\t\tlet previous_task = task;\n\n\t\tlet started = false;\n\t\tlet {\n\t\t\tdelay = 0,\n\t\t\tduration = 400,\n\t\t\teasing = linear,\n\t\t\tinterpolate = get_interpolator\n\t\t} = { ...defaults, ...opts };\n\n\t\tif (duration === 0) {\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\t\t\tstore.set((value = target_value));\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tconst start = raf.now() + delay;\n\n\t\t/** @type {(t: number) => T} */\n\t\tlet fn;\n\t\ttask = loop((now) => {\n\t\t\tif (now < start) return true;\n\t\t\tif (!started) {\n\t\t\t\tfn = interpolate(/** @type {any} */ (value), new_value);\n\t\t\t\tif (typeof duration === 'function')\n\t\t\t\t\tduration = duration(/** @type {any} */ (value), new_value);\n\t\t\t\tstarted = true;\n\t\t\t}\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\t\t\tconst elapsed = now - start;\n\t\t\tif (elapsed > /** @type {number} */ (duration)) {\n\t\t\t\tstore.set((value = new_value));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// @ts-ignore\n\t\t\tstore.set((value = fn(easing(elapsed / duration))));\n\t\t\treturn true;\n\t\t});\n\t\treturn task.promise;\n\t}\n\treturn {\n\t\tset,\n\t\tupdate: (fn, opts) =>\n\t\t\tset(fn(/** @type {any} */ (target_value), /** @type {any} */ (value)), opts),\n\t\tsubscribe: store.subscribe\n\t};\n}\n\n/**\n * A wrapper for a value that tweens smoothly to its target value. Changes to `tween.target` will cause `tween.current` to\n * move towards it over time, taking account of the `delay`, `duration` and `easing` options.\n *\n * ```svelte\n * <script>\n * \timport { Tween } from 'svelte/motion';\n *\n * \tconst tween = new Tween(0);\n * </script>\n *\n * <input type=\"range\" bind:value={tween.target} />\n * <input type=\"range\" bind:value={tween.current} disabled />\n * ```\n * @template T\n * @since 5.8.0\n */\nexport class Tween {\n\t#current;\n\t#target;\n\n\t/** @type {TweenOptions<T>} */\n\t#defaults;\n\n\t/** @type {import('../internal/client/types').Task | null} */\n\t#task = null;\n\n\t/**\n\t * @param {T} value\n\t * @param {TweenOptions<T>} options\n\t */\n\tconstructor(value, options = {}) {\n\t\tthis.#current = state(value);\n\t\tthis.#target = state(value);\n\t\tthis.#defaults = options;\n\n\t\tif (DEV) {\n\t\t\ttag(this.#current, 'Tween.current');\n\t\t\ttag(this.#target, 'Tween.target');\n\t\t}\n\t}\n\n\t/**\n\t * Create a tween whose value is bound to the return value of `fn`. This must be called\n\t * inside an effect root (for example, during component initialisation).\n\t *\n\t * ```svelte\n\t * <script>\n\t * \timport { Tween } from 'svelte/motion';\n\t *\n\t * \tlet { number } = $props();\n\t *\n\t * \tconst tween = Tween.of(() => number);\n\t * </script>\n\t * ```\n\t * @template U\n\t * @param {() => U} fn\n\t * @param {TweenOptions<U>} [options]\n\t */\n\tstatic of(fn, options) {\n\t\tconst tween = new Tween(fn(), options);\n\n\t\trender_effect(() => {\n\t\t\ttween.set(fn());\n\t\t});\n\n\t\treturn tween;\n\t}\n\n\t/**\n\t * Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it.\n\t *\n\t * If `options` are provided, they will override the tween's defaults.\n\t * @param {T} value\n\t * @param {TweenOptions<T>} [options]\n\t * @returns\n\t */\n\tset(value, options) {\n\t\tset(this.#target, value);\n\n\t\tlet {\n\t\t\tdelay = 0,\n\t\t\tduration = 400,\n\t\t\teasing = linear,\n\t\t\tinterpolate = get_interpolator\n\t\t} = { ...this.#defaults, ...options };\n\n\t\tif (duration === 0) {\n\t\t\tthis.#task?.abort();\n\t\t\tset(this.#current, value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tconst start = raf.now() + delay;\n\n\t\t/** @type {(t: number) => T} */\n\t\tlet fn;\n\t\tlet started = false;\n\t\tlet previous_task = this.#task;\n\n\t\tthis.#task = loop((now) => {\n\t\t\tif (now < start) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!started) {\n\t\t\t\tstarted = true;\n\n\t\t\t\tconst prev = this.#current.v;\n\n\t\t\t\tfn = interpolate(prev, value);\n\n\t\t\t\tif (typeof duration === 'function') {\n\t\t\t\t\tduration = duration(prev, value);\n\t\t\t\t}\n\n\t\t\t\tprevious_task?.abort();\n\t\t\t}\n\n\t\t\tconst elapsed = now - start;\n\n\t\t\tif (elapsed > /** @type {number} */ (duration)) {\n\t\t\t\tset(this.#current, value);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tset(this.#current, fn(easing(elapsed / /** @type {number} */ (duration))));\n\t\t\treturn true;\n\t\t});\n\n\t\treturn this.#task.promise;\n\t}\n\n\tget current() {\n\t\treturn get(this.#current);\n\t}\n\n\tget target() {\n\t\treturn get(this.#target);\n\t}\n\n\tset target(v) {\n\t\tthis.set(v);\n\t}\n}\n", "import { MediaQuery } from 'svelte/reactivity';\n\nexport * from './spring.js';\nexport * from './tweened.js';\n\n/**\n * A [media query](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery) that matches if the user [prefers reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion).\n *\n * ```svelte\n * <script>\n * \timport { prefersReducedMotion } from 'svelte/motion';\n * \timport { fly } from 'svelte/transition';\n *\n * \tlet visible = $state(false);\n * </script>\n *\n * <button onclick={() => visible = !visible}>\n * \ttoggle\n * </button>\n *\n * {#if visible}\n * \t<p transition:fly={{ y: prefersReducedMotion.current ? 0 : 200 }}>\n * \t\tflies in, unless the user prefers reduced motion\n * \t</p>\n * {/if}\n * ```\n * @type {MediaQuery}\n * @since 5.7.0\n */\nexport const prefersReducedMotion = /*@__PURE__*/ new MediaQuery(\n\t'(prefers-reduced-motion: reduce)'\n);\n"], 5 - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,QAAQ,KAAK;AAC5B,SAAO,OAAO,UAAU,SAAS,KAAK,GAAG,MAAM;AAChD;;;ACgBA,SAAS,YAAY,KAAK,YAAY,eAAe,cAAc;AAClE,MAAI,OAAO,kBAAkB,YAAY,QAAQ,aAAa,GAAG;AAEhE,UAAM,QAAQ,eAAe;AAE7B,UAAM,YAAY,gBAAgB,eAAe,IAAI,MAAM,IAAI;AAC/D,UAAMA,UAAS,IAAI,KAAK,YAAY;AACpC,UAAM,SAAS,IAAI,KAAK,UAAU;AAClC,UAAM,gBAAgBA,UAAS,UAAU,IAAI;AAC7C,UAAM,KAAK,WAAW,gBAAgB,IAAI;AAC1C,QAAI,KAAK,IAAI,CAAC,IAAI,IAAI,KAAK,aAAa,KAAK,IAAI,KAAK,IAAI,IAAI,KAAK,WAAW;AAC7E,aAAO;AAAA,IACR,OAAO;AACN,UAAI,UAAU;AAEd,aAAO,QAAQ,aAAa,IAAI,IAAI,KAAK,cAAc,QAAQ,IAAI,CAAC,IAAI,gBAAgB;AAAA,IACzF;AAAA,EACD,WAAW,MAAM,QAAQ,aAAa,GAAG;AAExC,WAAO,cAAc;AAAA,MAAI,CAAC,GAAG;AAAA;AAAA,QAE5B,YAAY,KAAK,WAAW,CAAC,GAAG,cAAc,CAAC,GAAG,aA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AAA,EACX;AACD;;;ACnRO,IAAM,uBAAqC,IAAI;AAAA,EACrD;AACD;", 6 6 "names": ["spring", "set", "opts", "set"] 7 7 }
+8 -7
node_modules/.vite/deps/svelte_reactivity.js
··· 5 5 SvelteSet, 6 6 SvelteURL, 7 7 SvelteURLSearchParams 8 - } from "./chunk-FQXKS6MM.js"; 9 - import "./chunk-2ZGNHB6A.js"; 8 + } from "./chunk-K5DCWF3A.js"; 9 + import "./chunk-SSJEA4FD.js"; 10 10 import "./chunk-7RQDXF5S.js"; 11 - import "./chunk-LYAULJVB.js"; 11 + import "./chunk-CUKAGXEG.js"; 12 12 import "./chunk-U7P2NEEE.js"; 13 - import "./chunk-YT4LSJJ5.js"; 14 - import "./chunk-DSSJOGTL.js"; 13 + import "./chunk-NGIUFUAZ.js"; 14 + import "./chunk-BZYIP436.js"; 15 15 import { 16 16 createSubscriber 17 - } from "./chunk-TY5SIVJK.js"; 18 - import "./chunk-GSVKEBRT.js"; 17 + } from "./chunk-7EVP6DBN.js"; 18 + import "./chunk-XGCWAT63.js"; 19 + import "./chunk-HNWPC2PS.js"; 19 20 import "./chunk-OHYQYV5R.js"; 20 21 export { 21 22 MediaQuery,
+7 -6
node_modules/.vite/deps/svelte_reactivity_window.js
··· 1 1 import { 2 2 ReactiveValue 3 - } from "./chunk-2ZGNHB6A.js"; 3 + } from "./chunk-SSJEA4FD.js"; 4 4 import "./chunk-7RQDXF5S.js"; 5 - import "./chunk-LYAULJVB.js"; 5 + import "./chunk-CUKAGXEG.js"; 6 6 import "./chunk-U7P2NEEE.js"; 7 - import "./chunk-YT4LSJJ5.js"; 7 + import "./chunk-NGIUFUAZ.js"; 8 8 import { 9 9 on 10 - } from "./chunk-DSSJOGTL.js"; 10 + } from "./chunk-BZYIP436.js"; 11 11 import { 12 12 get2 as get, 13 13 set, 14 14 source, 15 15 tag 16 - } from "./chunk-TY5SIVJK.js"; 16 + } from "./chunk-7EVP6DBN.js"; 17 + import "./chunk-XGCWAT63.js"; 17 18 import { 18 19 true_default 19 - } from "./chunk-GSVKEBRT.js"; 20 + } from "./chunk-HNWPC2PS.js"; 20 21 import "./chunk-OHYQYV5R.js"; 21 22 22 23 // node_modules/svelte/src/reactivity/window/index.js
+1 -1
node_modules/.vite/deps/svelte_reactivity_window.js.map
··· 2 2 "version": 3, 3 3 "sources": ["../../svelte/src/reactivity/window/index.js"], 4 4 "sourcesContent": ["import { BROWSER, DEV } from 'esm-env';\nimport { on } from '../../events/index.js';\nimport { ReactiveValue } from '../reactive-value.js';\nimport { get } from '../../internal/client/index.js';\nimport { set, source } from '../../internal/client/reactivity/sources.js';\nimport { tag } from '../../internal/client/dev/tracing.js';\n\n/**\n * `scrollX.current` is a reactive view of `window.scrollX`. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const scrollX = new ReactiveValue(\n\tBROWSER ? () => window.scrollX : () => undefined,\n\t(update) => on(window, 'scroll', update)\n);\n\n/**\n * `scrollY.current` is a reactive view of `window.scrollY`. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const scrollY = new ReactiveValue(\n\tBROWSER ? () => window.scrollY : () => undefined,\n\t(update) => on(window, 'scroll', update)\n);\n\n/**\n * `innerWidth.current` is a reactive view of `window.innerWidth`. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const innerWidth = new ReactiveValue(\n\tBROWSER ? () => window.innerWidth : () => undefined,\n\t(update) => on(window, 'resize', update)\n);\n\n/**\n * `innerHeight.current` is a reactive view of `window.innerHeight`. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const innerHeight = new ReactiveValue(\n\tBROWSER ? () => window.innerHeight : () => undefined,\n\t(update) => on(window, 'resize', update)\n);\n\n/**\n * `outerWidth.current` is a reactive view of `window.outerWidth`. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const outerWidth = new ReactiveValue(\n\tBROWSER ? () => window.outerWidth : () => undefined,\n\t(update) => on(window, 'resize', update)\n);\n\n/**\n * `outerHeight.current` is a reactive view of `window.outerHeight`. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const outerHeight = new ReactiveValue(\n\tBROWSER ? () => window.outerHeight : () => undefined,\n\t(update) => on(window, 'resize', update)\n);\n\n/**\n * `screenLeft.current` is a reactive view of `window.screenLeft`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const screenLeft = new ReactiveValue(\n\tBROWSER ? () => window.screenLeft : () => undefined,\n\t(update) => {\n\t\tlet value = window.screenLeft;\n\n\t\tlet frame = requestAnimationFrame(function check() {\n\t\t\tframe = requestAnimationFrame(check);\n\n\t\t\tif (value !== (value = window.screenLeft)) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t});\n\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(frame);\n\t\t};\n\t}\n);\n\n/**\n * `screenTop.current` is a reactive view of `window.screenTop`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const screenTop = new ReactiveValue(\n\tBROWSER ? () => window.screenTop : () => undefined,\n\t(update) => {\n\t\tlet value = window.screenTop;\n\n\t\tlet frame = requestAnimationFrame(function check() {\n\t\t\tframe = requestAnimationFrame(check);\n\n\t\t\tif (value !== (value = window.screenTop)) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t});\n\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(frame);\n\t\t};\n\t}\n);\n\n/**\n * `online.current` is a reactive view of `navigator.onLine`. On the server it is `undefined`.\n * @since 5.11.0\n */\nexport const online = new ReactiveValue(\n\tBROWSER ? () => navigator.onLine : () => undefined,\n\t(update) => {\n\t\tconst unsub_online = on(window, 'online', update);\n\t\tconst unsub_offline = on(window, 'offline', update);\n\t\treturn () => {\n\t\t\tunsub_online();\n\t\t\tunsub_offline();\n\t\t};\n\t}\n);\n\n/**\n * `devicePixelRatio.current` is a reactive view of `window.devicePixelRatio`. On the server it is `undefined`.\n * Note that behaviour differs between browsers — on Chrome it will respond to the current zoom level,\n * on Firefox and Safari it won't.\n * @type {{ get current(): number | undefined }}\n * @since 5.11.0\n */\nexport const devicePixelRatio = /* @__PURE__ */ new (class DevicePixelRatio {\n\t#dpr = source(BROWSER ? window.devicePixelRatio : undefined);\n\n\t#update() {\n\t\tconst off = on(\n\t\t\twindow.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),\n\t\t\t'change',\n\t\t\t() => {\n\t\t\t\tset(this.#dpr, window.devicePixelRatio);\n\n\t\t\t\toff();\n\t\t\t\tthis.#update();\n\t\t\t}\n\t\t);\n\t}\n\n\tconstructor() {\n\t\tif (BROWSER) {\n\t\t\tthis.#update();\n\t\t}\n\n\t\tif (DEV) {\n\t\t\ttag(this.#dpr, 'window.devicePixelRatio');\n\t\t}\n\t}\n\n\tget current() {\n\t\tget(this.#dpr);\n\t\treturn BROWSER ? window.devicePixelRatio : undefined;\n\t}\n})();\n"], 5 - "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAWO,IAAM,UAAU,IAAI;AAAA,EAC1B,eAAU,MAAM,OAAO,UAAU,MAAM;AAAA,EACvC,CAAC,WAAW,GAAG,QAAQ,UAAU,MAAM;AACxC;AAMO,IAAM,UAAU,IAAI;AAAA,EAC1B,eAAU,MAAM,OAAO,UAAU,MAAM;AAAA,EACvC,CAAC,WAAW,GAAG,QAAQ,UAAU,MAAM;AACxC;AAMO,IAAM,aAAa,IAAI;AAAA,EAC7B,eAAU,MAAM,OAAO,aAAa,MAAM;AAAA,EAC1C,CAAC,WAAW,GAAG,QAAQ,UAAU,MAAM;AACxC;AAMO,IAAM,cAAc,IAAI;AAAA,EAC9B,eAAU,MAAM,OAAO,cAAc,MAAM;AAAA,EAC3C,CAAC,WAAW,GAAG,QAAQ,UAAU,MAAM;AACxC;AAMO,IAAM,aAAa,IAAI;AAAA,EAC7B,eAAU,MAAM,OAAO,aAAa,MAAM;AAAA,EAC1C,CAAC,WAAW,GAAG,QAAQ,UAAU,MAAM;AACxC;AAMO,IAAM,cAAc,IAAI;AAAA,EAC9B,eAAU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I,UAAU;AACb,QAAI,KAAK,IAAI;AACb,WAAO,eAAU,OAAO,mBAAmB;AAAA,EAC5C;AACD,EAAG;", 6 6 "names": [] 7 7 }
+3 -2
node_modules/.vite/deps/svelte_store.js
··· 12 12 set_active_effect, 13 13 set_active_reaction, 14 14 writable 15 - } from "./chunk-TY5SIVJK.js"; 16 - import "./chunk-GSVKEBRT.js"; 15 + } from "./chunk-7EVP6DBN.js"; 16 + import "./chunk-XGCWAT63.js"; 17 + import "./chunk-HNWPC2PS.js"; 17 18 import "./chunk-OHYQYV5R.js"; 18 19 19 20 // node_modules/svelte/src/store/index-client.js
+1 -1
node_modules/.vite/deps/svelte_store.js.map
··· 2 2 "version": 3, 3 3 "sources": ["../../svelte/src/store/index-client.js"], 4 4 "sourcesContent": ["/** @import { Readable, Writable } from './public.js' */\nimport {\n\teffect_root,\n\teffect_tracking,\n\trender_effect\n} from '../internal/client/reactivity/effects.js';\nimport { get, writable } from './shared/index.js';\nimport { createSubscriber } from '../reactivity/create-subscriber.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tset_active_effect,\n\tset_active_reaction\n} from '../internal/client/runtime.js';\n\nexport { derived, get, readable, readonly, writable } from './shared/index.js';\n\n/**\n * @template V\n * @overload\n * @param {() => V} get\n * @param {(v: V) => void} set\n * @returns {Writable<V>}\n */\n/**\n * @template V\n * @overload\n * @param {() => V} get\n * @returns {Readable<V>}\n */\n/**\n * Create a store from a function that returns state, and (to make a writable store), an\n * optional second function that sets state.\n *\n * ```ts\n * import { toStore } from 'svelte/store';\n *\n * let count = $state(0);\n *\n * const store = toStore(() => count, (v) => (count = v));\n * ```\n * @template V\n * @param {() => V} get\n * @param {(v: V) => void} [set]\n * @returns {Writable<V> | Readable<V>}\n */\nexport function toStore(get, set) {\n\tvar effect = active_effect;\n\tvar reaction = active_reaction;\n\tvar init_value = get();\n\n\tconst store = writable(init_value, (set) => {\n\t\t// If the value has changed before we call subscribe, then\n\t\t// we need to treat the value as already having run\n\t\tvar ran = init_value !== get();\n\n\t\t// TODO do we need a different implementation on the server?\n\t\tvar teardown;\n\t\t// Apply the reaction and effect at the time of toStore being called\n\t\tvar previous_reaction = active_reaction;\n\t\tvar previous_effect = active_effect;\n\t\tset_active_reaction(reaction);\n\t\tset_active_effect(effect);\n\n\t\ttry {\n\t\t\tteardown = effect_root(() => {\n\t\t\t\trender_effect(() => {\n\t\t\t\t\tconst value = get();\n\t\t\t\t\tif (ran) set(value);\n\t\t\t\t});\n\t\t\t});\n\t\t} finally {\n\t\t\tset_active_reaction(previous_reaction);\n\t\t\tset_active_effect(previous_effect);\n\t\t}\n\n\t\tran = true;\n\n\t\treturn teardown;\n\t});\n\n\tif (set) {\n\t\treturn {\n\t\t\tset,\n\t\t\tupdate: (fn) => set(fn(get())),\n\t\t\tsubscribe: store.subscribe\n\t\t};\n\t}\n\n\treturn {\n\t\tsubscribe: store.subscribe\n\t};\n}\n\n/**\n * @template V\n * @overload\n * @param {Writable<V>} store\n * @returns {{ current: V }}\n */\n/**\n * @template V\n * @overload\n * @param {Readable<V>} store\n * @returns {{ readonly current: V }}\n */\n/**\n * Convert a store to an object with a reactive `current` property. If `store`\n * is a readable store, `current` will be a readonly property.\n *\n * ```ts\n * import { fromStore, get, writable } from 'svelte/store';\n *\n * const store = writable(0);\n *\n * const count = fromStore(store);\n *\n * count.current; // 0;\n * store.set(1);\n * count.current; // 1\n *\n * count.current += 1;\n * get(store); // 2\n * ```\n * @template V\n * @param {Writable<V> | Readable<V>} store\n */\nexport function fromStore(store) {\n\tlet value = /** @type {V} */ (undefined);\n\n\tconst subscribe = createSubscriber((update) => {\n\t\tlet ran = false;\n\n\t\tconst unsubscribe = store.subscribe((v) => {\n\t\t\tvalue = v;\n\t\t\tif (ran) update();\n\t\t});\n\n\t\tran = true;\n\n\t\treturn unsubscribe;\n\t});\n\n\tfunction current() {\n\t\tif (effect_tracking()) {\n\t\t\tsubscribe();\n\t\t\treturn value;\n\t\t}\n\n\t\treturn get(store);\n\t}\n\n\tif ('set' in store) {\n\t\treturn {\n\t\t\tget current() {\n\t\t\t\treturn current();\n\t\t\t},\n\t\t\tset current(v) {\n\t\t\t\tstore.set(v);\n\t\t\t}\n\t\t};\n\t}\n\n\treturn {\n\t\tget current() {\n\t\t\treturn current();\n\t\t}\n\t};\n}\n"], 5 - "mappings": ";;;;;;;;;;;;;;;;;;;AA8CO,SAAS,QAAQA,MAAK,KAAK;AACjC,MAAI,SAAS;AACb,MAAI,WAAW;AACf,MAAI,aAAaA,KAAI;AAErB,QAAM,QAAQ,SAAS,YAAY,CAACC,SAAQ;AAG3C,QAAI,MAAM,eAAeD,KAAI;AAG7B,QAAI;AAEJ,QAAI,oBAAoB;AACxB,QAAI,kBAAkB;AACtB,wBAAoB,QAAQ;AAC5B,sBAAkB,MAAM;AAExB,QAAI;AACH,iBAAW,YAAY,MAAM;AAC5B,sBAAc,MAAM;AACnB,gBAAM,QAAQA,KAAI;AAClB,cAAI,IAAK,CAAAC,KAAI,KAAK;AAAA,QACnB,CAAC;AAAA,MACF,CAAC;AAAA,IACF,UAAE;AACD,0BAAoB,iBAAiB;AACrC,wBAAkB,eAAe;AAAA,IAClC;AAEA,UAAM;AAEN,WAAO;AAAA,EACR,CAAC;AAED,MAAI,KAAK;AACR,WAAO;AAAA,MACN;AAAA,MACA,QAAQ,CAAC,OAAO,IAAI,GAAGD,KAAI,CAAC,CAAC;AAAA,MAC7B,WAAW,MAAM;AAAA,IAClB;AAAA,EACD;AAEA,SAAO;AAAA,IACN,WAAW,MAAM;AAAA,EAClB;AACD;AAmCO,SAAS,UAAU,OAAO;AAChC,MAAI;AAAA;AAAA,IAA0B;AAAA;AAE9B,QAAM,YAAY,iBAAiB,CAAC,WAAW;AAC9C,QAAI,MAAM;AAEV,UAAM,cAAc,MAAM,UAAU,CAAC,MAAM;AAC1C,cAAQ;AACR,UAAI,IAAK,QAAO;AAAA,IACjB,CAAC;AAED,UAAM;AAEN,WAAO;AAAA,EACR,CAAC;AAED,WAAS,UA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AC9C,QAAI,MAAM;AAEV,UAAM,cAAc,MAAM,UAAU,CAAC,MAAM;AAC1C,cAAQ;AACR,UAAI,IAAK,QAAO;AAAA,IACjB,CAAC;AAED,UAAM;AAEN,WAAO;AAAA,EACR,CAAC;AAED,WAAS,UAAU;AAClB,QAAI,gBAAgB,GAAG;AACtB,gBAAU;AACV,aAAO;AAAA,IACR;AAEA,WAAO,IAAI,KAAK;AAAA,EACjB;AAEA,MAAI,SAAS,OAAO;AACnB,WAAO;AAAA,MACN,IAAI,UAAU;AACb,eAAO,QAAQ;AAAA,MAChB;AAAA,MACA,IAAI,QAAQ,GAAG;AACd,cAAM,IAAI,CAAC;AAAA,MACZ;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AAAA,IACN,IAAI,UAAU;AACb,aAAO,QAAQ;AAAA,IAChB;AAAA,EACD;AACD;", 6 6 "names": ["get", "set"] 7 7 }
+4 -2
node_modules/.vite/deps/svelte_transition.js
··· 1 1 import { 2 - transition_slide_display, 2 + transition_slide_display 3 + } from "./chunk-XGCWAT63.js"; 4 + import { 3 5 true_default 4 - } from "./chunk-GSVKEBRT.js"; 6 + } from "./chunk-HNWPC2PS.js"; 5 7 6 8 // node_modules/svelte/src/transition/index.js 7 9 var linear = (x) => x;
+1 -1
node_modules/.vite/deps/svelte_transition.js.map
··· 2 2 "version": 3, 3 3 "sources": ["../../svelte/src/transition/index.js"], 4 4 "sourcesContent": ["/** @import { BlurParams, CrossfadeParams, DrawParams, FadeParams, FlyParams, ScaleParams, SlideParams, TransitionConfig } from './public' */\n\nimport { DEV } from 'esm-env';\nimport * as w from '../internal/client/warnings.js';\n\n/** @param {number} x */\nconst linear = (x) => x;\n\n/** @param {number} t */\nfunction cubic_out(t) {\n\tconst f = t - 1.0;\n\treturn f * f * f + 1.0;\n}\n\n/**\n * @param {number} t\n * @returns {number}\n */\nfunction cubic_in_out(t) {\n\treturn t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\n\n/** @param {number | string} value\n * @returns {[number, string]}\n */\nfunction split_css_unit(value) {\n\tconst split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n\treturn split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];\n}\n\n/**\n * Animates a `blur` filter alongside an element's opacity.\n *\n * @param {Element} node\n * @param {BlurParams} [params]\n * @returns {TransitionConfig}\n */\nexport function blur(\n\tnode,\n\t{ delay = 0, duration = 400, easing = cubic_in_out, amount = 5, opacity = 0 } = {}\n) {\n\tconst style = getComputedStyle(node);\n\tconst target_opacity = +style.opacity;\n\tconst f = style.filter === 'none' ? '' : style.filter;\n\tconst od = target_opacity * (1 - opacity);\n\tconst [value, unit] = split_css_unit(amount);\n\treturn {\n\t\tdelay,\n\t\tduration,\n\t\teasing,\n\t\tcss: (_t, u) => `opacity: ${target_opacity - od * u}; filter: ${f} blur(${u * value}${unit});`\n\t};\n}\n\n/**\n * Animates the opacity of an element from 0 to the current opacity for `in` transitions and from the current opacity to 0 for `out` transitions.\n *\n * @param {Element} node\n * @param {FadeParams} [params]\n * @returns {TransitionConfig}\n */\nexport function fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n\tconst o = +getComputedStyle(node).opacity;\n\treturn {\n\t\tdelay,\n\t\tduration,\n\t\teasing,\n\t\tcss: (t) => `opacity: ${t * o}`\n\t};\n}\n\n/**\n * Animates the x and y positions and the opacity of an element. `in` transitions animate from the provided values, passed as parameters to the element's default values. `out` transitions animate from the element's default values to the provided values.\n *\n * @param {Element} node\n * @param {FlyParams} [params]\n * @returns {TransitionConfig}\n */\nexport function fly(\n\tnode,\n\t{ delay = 0, duration = 400, easing = cubic_out, x = 0, y = 0, opacity = 0 } = {}\n) {\n\tconst style = getComputedStyle(node);\n\tconst target_opacity = +style.opacity;\n\tconst transform = style.transform === 'none' ? '' : style.transform;\n\tconst od = target_opacity * (1 - opacity);\n\tconst [x_value, x_unit] = split_css_unit(x);\n\tconst [y_value, y_unit] = split_css_unit(y);\n\treturn {\n\t\tdelay,\n\t\tduration,\n\t\teasing,\n\t\tcss: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x_value}${x_unit}, ${(1 - t) * y_value}${y_unit});\n\t\t\topacity: ${target_opacity - od * u}`\n\t};\n}\n\nvar slide_warning = false;\n\n/**\n * Slides an element in and out.\n *\n * @param {Element} node\n * @param {SlideParams} [params]\n * @returns {TransitionConfig}\n */\nexport function slide(node, { delay = 0, duration = 400, easing = cubic_out, axis = 'y' } = {}) {\n\tconst style = getComputedStyle(node);\n\n\tif (DEV && !slide_warning && /(contents|inline|table)/.test(style.display)) {\n\t\tslide_warning = true;\n\t\tPromise.resolve().then(() => (slide_warning = false));\n\t\tw.transition_slide_display(style.display);\n\t}\n\n\tconst opacity = +style.opacity;\n\tconst primary_property = axis === 'y' ? 'height' : 'width';\n\tconst primary_property_value = parseFloat(style[primary_property]);\n\tconst secondary_properties = axis === 'y' ? ['top', 'bottom'] : ['left', 'right'];\n\tconst capitalized_secondary_properties = secondary_properties.map(\n\t\t(e) => /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */ (`${e[0].toUpperCase()}${e.slice(1)}`)\n\t);\n\tconst padding_start_value = parseFloat(style[`padding${capitalized_secondary_properties[0]}`]);\n\tconst padding_end_value = parseFloat(style[`padding${capitalized_secondary_properties[1]}`]);\n\tconst margin_start_value = parseFloat(style[`margin${capitalized_secondary_properties[0]}`]);\n\tconst margin_end_value = parseFloat(style[`margin${capitalized_secondary_properties[1]}`]);\n\tconst border_width_start_value = parseFloat(\n\t\tstyle[`border${capitalized_secondary_properties[0]}Width`]\n\t);\n\tconst border_width_end_value = parseFloat(\n\t\tstyle[`border${capitalized_secondary_properties[1]}Width`]\n\t);\n\treturn {\n\t\tdelay,\n\t\tduration,\n\t\teasing,\n\t\tcss: (t) =>\n\t\t\t'overflow: hidden;' +\n\t\t\t`opacity: ${Math.min(t * 20, 1) * opacity};` +\n\t\t\t`${primary_property}: ${t * primary_property_value}px;` +\n\t\t\t`padding-${secondary_properties[0]}: ${t * padding_start_value}px;` +\n\t\t\t`padding-${secondary_properties[1]}: ${t * padding_end_value}px;` +\n\t\t\t`margin-${secondary_properties[0]}: ${t * margin_start_value}px;` +\n\t\t\t`margin-${secondary_properties[1]}: ${t * margin_end_value}px;` +\n\t\t\t`border-${secondary_properties[0]}-width: ${t * border_width_start_value}px;` +\n\t\t\t`border-${secondary_properties[1]}-width: ${t * border_width_end_value}px;` +\n\t\t\t`min-${primary_property}: 0`\n\t};\n}\n\n/**\n * Animates the opacity and scale of an element. `in` transitions animate from the provided values, passed as parameters, to an element's current (default) values. `out` transitions animate from an element's default values to the provided values.\n *\n * @param {Element} node\n * @param {ScaleParams} [params]\n * @returns {TransitionConfig}\n */\nexport function scale(\n\tnode,\n\t{ delay = 0, duration = 400, easing = cubic_out, start = 0, opacity = 0 } = {}\n) {\n\tconst style = getComputedStyle(node);\n\tconst target_opacity = +style.opacity;\n\tconst transform = style.transform === 'none' ? '' : style.transform;\n\tconst sd = 1 - start;\n\tconst od = target_opacity * (1 - opacity);\n\treturn {\n\t\tdelay,\n\t\tduration,\n\t\teasing,\n\t\tcss: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - sd * u});\n\t\t\topacity: ${target_opacity - od * u}\n\t\t`\n\t};\n}\n\n/**\n * Animates the stroke of an SVG element, like a snake in a tube. `in` transitions begin with the path invisible and draw the path to the screen over time. `out` transitions start in a visible state and gradually erase the path. `draw` only works with elements that have a `getTotalLength` method, like `<path>` and `<polyline>`.\n *\n * @param {SVGElement & { getTotalLength(): number }} node\n * @param {DrawParams} [params]\n * @returns {TransitionConfig}\n */\nexport function draw(node, { delay = 0, speed, duration, easing = cubic_in_out } = {}) {\n\tlet len = node.getTotalLength();\n\tconst style = getComputedStyle(node);\n\tif (style.strokeLinecap !== 'butt') {\n\t\tlen += parseInt(style.strokeWidth);\n\t}\n\tif (duration === undefined) {\n\t\tif (speed === undefined) {\n\t\t\tduration = 800;\n\t\t} else {\n\t\t\tduration = len / speed;\n\t\t}\n\t} else if (typeof duration === 'function') {\n\t\tduration = duration(len);\n\t}\n\treturn {\n\t\tdelay,\n\t\tduration,\n\t\teasing,\n\t\tcss: (_, u) => `\n\t\t\tstroke-dasharray: ${len};\n\t\t\tstroke-dashoffset: ${u * len};\n\t\t`\n\t};\n}\n\n/**\n * @template T\n * @template S\n * @param {T} tar\n * @param {S} src\n * @returns {T & S}\n */\nfunction assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn /** @type {T & S} */ (tar);\n}\n\n/**\n * The `crossfade` function creates a pair of [transitions](https://svelte.dev/docs/svelte/transition) called `send` and `receive`. When an element is 'sent', it looks for a corresponding element being 'received', and generates a transition that transforms the element to its counterpart's position and fades it out. When an element is 'received', the reverse happens. If there is no counterpart, the `fallback` transition is used.\n *\n * @param {CrossfadeParams & {\n * \tfallback?: (node: Element, params: CrossfadeParams, intro: boolean) => TransitionConfig;\n * }} params\n * @returns {[(node: any, params: CrossfadeParams & { key: any; }) => () => TransitionConfig, (node: any, params: CrossfadeParams & { key: any; }) => () => TransitionConfig]}\n */\nexport function crossfade({ fallback, ...defaults }) {\n\t/** @type {Map<any, Element>} */\n\tconst to_receive = new Map();\n\t/** @type {Map<any, Element>} */\n\tconst to_send = new Map();\n\n\t/**\n\t * @param {Element} from_node\n\t * @param {Element} node\n\t * @param {CrossfadeParams} params\n\t * @returns {TransitionConfig}\n\t */\n\tfunction crossfade(from_node, node, params) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = /** @param {number} d */ (d) => Math.sqrt(d) * 30,\n\t\t\teasing = cubic_out\n\t\t} = assign(assign({}, defaults), params);\n\t\tconst from = from_node.getBoundingClientRect();\n\t\tconst to = node.getBoundingClientRect();\n\t\tconst dx = from.left - to.left;\n\t\tconst dy = from.top - to.top;\n\t\tconst dw = from.width / to.width;\n\t\tconst dh = from.height / to.height;\n\t\tconst d = Math.sqrt(dx * dx + dy * dy);\n\t\tconst style = getComputedStyle(node);\n\t\tconst transform = style.transform === 'none' ? '' : style.transform;\n\t\tconst opacity = +style.opacity;\n\t\treturn {\n\t\t\tdelay,\n\t\t\tduration: typeof duration === 'function' ? duration(d) : duration,\n\t\t\teasing,\n\t\t\tcss: (t, u) => `\n\t\t\t opacity: ${t * opacity};\n\t\t\t transform-origin: top left;\n\t\t\t transform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${\n\t\t\t\t\t\tt + (1 - t) * dh\n\t\t\t\t\t});\n\t\t `\n\t\t};\n\t}\n\n\t/**\n\t * @param {Map<any, Element>} items\n\t * @param {Map<any, Element>} counterparts\n\t * @param {boolean} intro\n\t * @returns {(node: any, params: CrossfadeParams & { key: any; }) => () => TransitionConfig}\n\t */\n\tfunction transition(items, counterparts, intro) {\n\t\t// @ts-expect-error TODO improve typings (are the public types wrong?)\n\t\treturn (node, params) => {\n\t\t\titems.set(params.key, node);\n\t\t\treturn () => {\n\t\t\t\tif (counterparts.has(params.key)) {\n\t\t\t\t\tconst other_node = counterparts.get(params.key);\n\t\t\t\t\tcounterparts.delete(params.key);\n\t\t\t\t\treturn crossfade(/** @type {Element} */ (other_node), node, params);\n\t\t\t\t}\n\t\t\t\t// if the node is disappearing altogether\n\t\t\t\t// (i.e. wasn't claimed by the other list)\n\t\t\t\t// then we need to supply an outro\n\t\t\t\titems.delete(params.key);\n\t\t\t\treturn fallback && fallback(node, params, intro);\n\t\t\t};\n\t\t};\n\t}\n\treturn [transition(to_send, to_receive, false), transition(to_receive, to_send, true)];\n}\n"], 5 - "mappings": ";;;;;;AAMA,IAAM,SAAS,CAAC,MAAM;AAGtB,SAAS,UAAU,GAAG;AACrB,QAAM,IAAI,IAAI;AACd,SAAO,IAAI,IAAI,IAAI;AACpB;AAMA,SAAS,aAAa,GAAG;AACxB,SAAO,IAAI,MAAM,IAAM,IAAI,IAAI,IAAI,MA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UAAU,OAAO,aAAa,aAAa,SAAS,CAAC,IAAI;AAAA,MACzD;AAAA,MACA,KAAK,CAAC,GAAG,MAAM;AAAA,iBACD,IAAI,OAAO;AAAA;AAAA,mBAET,SAAS,cAAc,IAAI,EAAE,MAAM,IAAI,EAAE,aAAa,KAAK,IAAI,KAAK,EAAE,KACnF,KAAK,IAAI,KAAK,EACf;AAAA;AAAA,IAEH;AAAA,EACD;AAQA,WAAS,WAAW,OAAO,cAAc,OAAO;AAE/C,WAAO,CAAC,MAAM,WAAW;AACxB,YAAM,IAAI,OAAO,KAAK,IAAI;AAC1B,aAAO,MAAM;AACZ,YAAI,aAAa,IAAI,OAAO,GAAG,GAAG;AACjC,gBAAM,aAAa,aAAa,IAAI,OAAO,GAAG;AAC9C,uBAAa,OAAO,OAAO,GAAG;AAC9B,iBAAOD;AAAA;AAAA,YAAkC;AAAA,YAAa;AAAA,YAAM;AAAA,UAAM;AAAA,QACnE;AAIA,cAAM,OAAO,OAAO,GAAG;AACvB,eAAO,YAAY,SAAS,MAAM,QAAQ,KAAK;AAAA,MAChD;AAAA,IACD;AAAA,EACD;AACA,SAAO,CAAC,WAAW,SAAS,YAAY,KAAK,GAAG,WAAW,YAAY,SAAS,IAAI,CAAC;AACtF;", 6 6 "names": ["crossfade", "d"] 7 7 }
opengraph.afphoto

This is a binary file and will not be displayed.

opengraph.afphoto~lock~

This is a binary file and will not be displayed.

+2 -1
package.json
··· 9 9 "preview": "vite preview", 10 10 "prepare": "svelte-kit sync || echo ''", 11 11 "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 12 - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" 12 + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 13 + "deploy": "cd infra && npm run deploy" 13 14 }, 14 15 "devDependencies": { 15 16 "@sveltejs/adapter-auto": "^7.0.0",
+7 -7
src/app.html
··· 2 2 <html lang="en"> 3 3 <head> 4 4 <meta charset="utf-8" /> 5 - <link rel="icon" href="/frogicon.png" /> 5 + <link rel="icon" href="/earl-favicon.png" /> 6 6 <meta name="viewport" content="width=device-width, initial-scale=1" /> 7 - <meta property="og:title" content="vod frog" /> 8 - <meta property="og:description" content="vod frog, i put the vods on a frog" /> 7 + <meta property="og:title" content="VoD Jam" /> 8 + <meta property="og:description" content="VoD Jam" /> 9 9 <meta property="og:image" content="/opengraph.png" /> 10 10 <meta property="og:type" content="website" /> 11 11 <meta name="twitter:card" content="summary_large_image" /> 12 - <meta name="twitter:title" content="vod frog" /> 13 - <meta name="twitter:description" content="vod frog, i put the vods on a frog" /> 12 + <meta name="twitter:title" content="VoD Jam" /> 13 + <meta name="twitter:description" content="VoD Jam" /> 14 14 <meta name="twitter:image" content="/opengraph.png" /> 15 - <meta name="description" content="vod frog, i put the vods on a frog" /> 16 - <title>vod frog</title> 15 + <meta name="description" content="VoD Jam" /> 16 + <title>VoD Jam</title> 17 17 %sveltekit.head% 18 18 </head> 19 19 <body>
+43
src/lib/Footer.svelte
··· 1 + <footer class="credits-footer"> 2 + <p class="credit credit-main">original code by <a href="https://witchsky.app/profile/goose.art" target="_blank" class="credit-link">@goose.art</a></p> 3 + <p class="credit">fonts by Patrick H. Lauke</p> 4 + <p class="credit">sprites from <a href="https://www.spriters-resource.com/sega_genesis/toejamearl/" target="_blank" class="credit-link">The Spriters Resource</a></p> 5 + </footer> 6 + 7 + <style> 8 + .credits-footer { 9 + text-align: center; 10 + padding: 40px 20px 24px; 11 + margin-top: 20px; 12 + } 13 + 14 + .credit { 15 + margin: 4px 0; 16 + animation: font-switch 4s steps(1) infinite; 17 + font-size: 0.75rem; 18 + color: #E8E0FF; 19 + opacity: 0.7; 20 + text-shadow: 21 + -1px -1px 0 rgba(11, 14, 23, 0.8), 22 + 1px -1px 0 rgba(11, 14, 23, 0.8), 23 + -1px 1px 0 rgba(11, 14, 23, 0.8), 24 + 1px 1px 0 rgba(11, 14, 23, 0.8); 25 + } 26 + 27 + .credit-main { 28 + font-size: 0.9rem; 29 + opacity: 1; 30 + margin-bottom: 8px; 31 + } 32 + 33 + .credit-link { 34 + color: #E8E0FF; 35 + text-decoration: underline; 36 + text-decoration-color: #FF6B2C; 37 + transition: color 0.15s; 38 + } 39 + 40 + .credit-link:hover { 41 + color: #FF6B2C; 42 + } 43 + </style>
-104
src/lib/FrogHeader.svelte
··· 1 - <script lang="ts"> 2 - let { onHomeClick }: { onHomeClick?: () => void } = $props(); 3 - 4 - function handleClick(e: MouseEvent) { 5 - if (onHomeClick) { 6 - e.preventDefault(); 7 - onHomeClick(); 8 - } 9 - } 10 - </script> 11 - 12 - <header class="frog-header"> 13 - <div class="title-area"> 14 - <a href="/" class="logo-link" onclick={handleClick}><h1 class="logo-text">vod frog</h1></a> 15 - <img src="/froggie.png" alt="A cute frog" class="header-frog" /> 16 - </div> 17 - <div class="subtitle-lines"> 18 - <p class="subtitle">an exploration by</p> 19 - <p class="subtitle"><a href="https://witchsky.app/profile/goose.art" target="_blank" class="subtitle-link">@goose.art</a> using <a href="https://witchsky.app/profile/stream.place" target="_blank" class="subtitle-link">@stream.place</a></p> 20 - </div> 21 - </header> 22 - 23 - <style> 24 - .frog-header { 25 - padding: 30px 20px 50px; 26 - position: relative; 27 - } 28 - 29 - .title-area { 30 - position: relative; 31 - display: inline-block; 32 - } 33 - 34 - .logo-link { 35 - text-decoration: none; 36 - color: inherit; 37 - } 38 - 39 - .logo-text { 40 - font-family: 'PicNic', cursive, system-ui; 41 - font-size: clamp(3rem, 8vw, 5.5rem); 42 - color: #0A182B; 43 - margin: 0; 44 - line-height: 0.9; 45 - font-weight: 400; 46 - letter-spacing: -1px; 47 - position: relative; 48 - z-index: 1; 49 - } 50 - 51 - .header-frog { 52 - position: absolute; 53 - right: -80px; 54 - top: -60px; 55 - width: clamp(120px, 18vw, 220px); 56 - height: auto; 57 - z-index: 2; 58 - transform: rotate(-10deg); 59 - filter: drop-shadow(2px 4px 6px rgba(10, 24, 43, 0.3)); 60 - transition: transform 0.3s ease; 61 - } 62 - 63 - .header-frog:hover { 64 - transform: rotate(5deg) scale(1.1); 65 - } 66 - 67 - .subtitle-lines { 68 - margin-top: 6px; 69 - position: relative; 70 - z-index: 0; 71 - } 72 - 73 - .subtitle-link { 74 - color: #0A182B; 75 - text-decoration: underline; 76 - text-decoration-color: #FF3992; 77 - transition: color 0.15s; 78 - } 79 - 80 - .subtitle-link:hover { 81 - color: #FF3992; 82 - } 83 - 84 - .subtitle { 85 - font-family: 'PicNic', cursive, system-ui; 86 - font-size: clamp(0.85rem, 2vw, 1.15rem); 87 - color: #0A182B; 88 - margin: 0; 89 - line-height: 1.4; 90 - opacity: 0.85; 91 - } 92 - 93 - @media (max-width: 600px) { 94 - .frog-header { 95 - padding: 20px 16px 8px; 96 - } 97 - 98 - .header-frog { 99 - right: -100px; 100 - top: -20px; 101 - } 102 - } 103 - </style> 104 -
+5 -56
src/lib/MeshBackground.svelte
··· 1 - <script lang="ts"> 2 - // Mesh gradient background using SVG radial gradients 3 - // Ranges from vibrant green to desaturated greens with blue pools in corners 4 - </script> 5 - 6 - <div class="mesh-bg"> 7 - <svg 8 - xmlns="http://www.w3.org/2000/svg" 9 - viewBox="0 0 1000 1000" 10 - preserveAspectRatio="none" 11 - class="mesh-svg" 12 - > 13 - <defs> 14 - <!-- Base green fill --> 15 - <radialGradient id="g1" cx="50%" cy="40%" r="70%"> 16 - <stop offset="0%" stop-color="#39FF44" /> 17 - <stop offset="60%" stop-color="#2BBF33" /> 18 - <stop offset="100%" stop-color="#1A8C22" /> 19 - </radialGradient> 20 - <!-- Top-right blue pool --> 21 - <radialGradient id="g2" cx="90%" cy="5%" r="45%"> 22 - <stop offset="0%" stop-color="#3992FF" stop-opacity="0.9" /> 23 - <stop offset="50%" stop-color="#3992FF" stop-opacity="0.4" /> 24 - <stop offset="100%" stop-color="#3992FF" stop-opacity="0" /> 25 - </radialGradient> 26 - <!-- Bottom-left blue pool --> 27 - <radialGradient id="g3" cx="5%" cy="95%" r="40%"> 28 - <stop offset="0%" stop-color="#3992FF" stop-opacity="0.7" /> 29 - <stop offset="50%" stop-color="#3992FF" stop-opacity="0.3" /> 30 - <stop offset="100%" stop-color="#3992FF" stop-opacity="0" /> 31 - </radialGradient> 32 - <!-- Top-left lighter green --> 33 - <radialGradient id="g4" cx="15%" cy="10%" r="50%"> 34 - <stop offset="0%" stop-color="#5FFF66" stop-opacity="0.6" /> 35 - <stop offset="100%" stop-color="#39FF44" stop-opacity="0" /> 36 - </radialGradient> 37 - <!-- Center warm spot --> 38 - <radialGradient id="g5" cx="50%" cy="50%" r="50%"> 39 - <stop offset="0%" stop-color="#4AFF54" stop-opacity="0.3" /> 40 - <stop offset="100%" stop-color="#2BBF33" stop-opacity="0" /> 41 - </radialGradient> 42 - </defs> 43 - <rect width="1000" height="1000" fill="url(#g1)" /> 44 - <rect width="1000" height="1000" fill="url(#g2)" /> 45 - <rect width="1000" height="1000" fill="url(#g3)" /> 46 - <rect width="1000" height="1000" fill="url(#g4)" /> 47 - <rect width="1000" height="1000" fill="url(#g5)" /> 48 - </svg> 49 - </div> 1 + <div class="tiled-bg"></div> 50 2 51 3 <style> 52 - .mesh-bg { 4 + .tiled-bg { 53 5 position: fixed; 54 6 inset: 0; 55 7 z-index: -2; 56 - overflow: hidden; 57 - } 58 - 59 - .mesh-svg { 60 - width: 100%; 61 - height: 100%; 8 + background: url('/background.gif') repeat; 9 + background-size: 256px 256px; 10 + image-rendering: pixelated; 62 11 } 63 12 </style>
+31
src/lib/SpriteTime.svelte
··· 1 + <script lang="ts"> 2 + let { time, height = 20 }: { time: string; height?: number } = $props(); 3 + 4 + function charToSrc(ch: string): string | null { 5 + if (ch >= '0' && ch <= '9') return `/num-${ch}.png`; 6 + if (ch === ':') return '/colon.png'; 7 + return null; 8 + } 9 + 10 + let chars = $derived(time.split('').filter(ch => charToSrc(ch) !== null)); 11 + </script> 12 + 13 + <span class="sprite-time"> 14 + {#each chars as ch} 15 + <img src={charToSrc(ch)} alt={ch} style="height: {height}px;" class="digit" /> 16 + {/each} 17 + </span> 18 + 19 + <style> 20 + .sprite-time { 21 + display: inline-flex; 22 + align-items: center; 23 + gap: 1px; 24 + } 25 + 26 + .digit { 27 + width: auto; 28 + image-rendering: pixelated; 29 + vertical-align: middle; 30 + } 31 + </style>
+110
src/lib/ToejamHeader.svelte
··· 1 + <script lang="ts"> 2 + let { onHomeClick }: { onHomeClick?: () => void } = $props(); 3 + 4 + function handleClick(e: MouseEvent) { 5 + if (onHomeClick) { 6 + e.preventDefault(); 7 + onHomeClick(); 8 + } 9 + } 10 + </script> 11 + 12 + <header class="toejam-header"> 13 + <div class="title-area"> 14 + <a href="/" class="logo-link" onclick={handleClick}><img src="/vod-jam.png" alt="VoD Jam" class="logo-img" /></a> 15 + <img src="/toe-jam-earl.png" alt="ToeJam & Earl" class="header-toejam" /> 16 + </div> 17 + <div class="subtitle-lines"> 18 + <p class="subtitle">an exploration by</p> 19 + <p class="subtitle"><a href="https://bsky.app/profile/kandake.africa" target="_blank" class="subtitle-link">@kandeka.africa</a> using <a href="https://witchsky.app/profile/stream.place" target="_blank" class="subtitle-link">@stream.place</a></p> 20 + </div> 21 + </header> 22 + 23 + <style> 24 + .toejam-header { 25 + padding: 30px 20px 50px; 26 + position: relative; 27 + } 28 + 29 + .title-area { 30 + position: relative; 31 + display: inline-block; 32 + } 33 + 34 + .logo-link { 35 + text-decoration: none; 36 + color: inherit; 37 + } 38 + 39 + .logo-img { 40 + width: clamp(200px, 40vw, 500px); 41 + height: auto; 42 + position: relative; 43 + z-index: 1; 44 + display: block; 45 + } 46 + 47 + .header-toejam { 48 + position: absolute; 49 + right: -60px; 50 + bottom: -30px; 51 + width: clamp(80px, 12vw, 160px); 52 + height: auto; 53 + z-index: 2; 54 + transform: rotate(-10deg); 55 + filter: drop-shadow(2px 4px 6px rgba(10, 24, 43, 0.3)); 56 + transition: transform 0.3s ease; 57 + } 58 + 59 + .header-toejam:hover { 60 + transform: rotate(5deg) scale(1.1); 61 + } 62 + 63 + .subtitle-lines { 64 + margin-top: 6px; 65 + position: relative; 66 + z-index: 0; 67 + } 68 + 69 + .subtitle-link { 70 + color: #E8E0FF; 71 + text-decoration: underline; 72 + text-decoration-color: #FF6B2C; 73 + transition: color 0.15s; 74 + text-shadow: 75 + -1px -1px 0 rgba(11, 14, 23, 0.8), 76 + 1px -1px 0 rgba(11, 14, 23, 0.8), 77 + -1px 1px 0 rgba(11, 14, 23, 0.8), 78 + 1px 1px 0 rgba(11, 14, 23, 0.8); 79 + } 80 + 81 + .subtitle-link:hover { 82 + color: #FF6B2C; 83 + } 84 + 85 + .subtitle { 86 + animation: font-switch 4s steps(1) infinite; 87 + font-size: clamp(0.65rem, 1.4vw, 0.85rem); 88 + color: #E8E0FF; 89 + margin: 0; 90 + line-height: 1.4; 91 + opacity: 0.85; 92 + text-shadow: 93 + -1px -1px 0 rgba(11, 14, 23, 0.8), 94 + 1px -1px 0 rgba(11, 14, 23, 0.8), 95 + -1px 1px 0 rgba(11, 14, 23, 0.8), 96 + 1px 1px 0 rgba(11, 14, 23, 0.8); 97 + } 98 + 99 + @media (max-width: 600px) { 100 + .toejam-header { 101 + padding: 20px 16px 8px; 102 + } 103 + 104 + .header-toejam { 105 + right: -40px; 106 + bottom: -20px; 107 + } 108 + } 109 + </style> 110 +
+62 -45
src/lib/VideoCard.svelte
··· 6 6 - Thumbnail loaded from the creator's PDS via livestream record 7 7 - Hover scrub preview: creates a hidden <video> element, seeks it on mousemove, 8 8 and draws frames to a canvas overlaid on the thumbnail 9 - - Hopping frog sprite follows the scrub position 9 + - Hopping toejam sprite follows the scrub position 10 10 - Creator name links to their profile page 11 11 - Card position is jittered (rotation + translate) seeded by the creator DID 12 12 --> ··· 23 23 } from './api'; 24 24 import { getCardOffsets, seededRandom } from './theme'; 25 25 import WavyBorder from './WavyBorder.svelte'; 26 + import SpriteTime from './SpriteTime.svelte'; 26 27 27 28 let { video, onSelect }: { video: VideoRecord; onSelect: (video: VideoRecord) => void } = 28 29 $props(); ··· 126 127 hasFrame = true; 127 128 } 128 129 129 - let frogFrame = $state(0); // alternates 0/1 for stand/jump 130 - let lastFrogProgress = 0; 131 - let frogFlipped = $state(false); // true when scrubbing backward 130 + let earlFrame = $state(1); // cycles 1-4 for earl-walk 131 + let lastEarlProgress = 0; 132 + let earlDirection = $state<'right' | 'left'>('right'); 132 133 133 134 function onMouseEnter() { scrubbing = true; initScrub(); } 134 135 function onMouseMove(e: MouseEvent) { 135 136 if (!thumbEl) return; 136 137 const rect = thumbEl.getBoundingClientRect(); 137 138 const newProgress = Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width)); 138 - const delta = newProgress - lastFrogProgress; 139 - // Toggle frog frame every ~3% of scrub distance 139 + const delta = newProgress - lastEarlProgress; 140 + // Cycle earl frame every ~3% of scrub distance 140 141 if (Math.abs(delta) > 0.03) { 141 - frogFrame = frogFrame === 0 ? 1 : 0; 142 - frogFlipped = delta < 0; 143 - lastFrogProgress = newProgress; 142 + earlFrame = (earlFrame % 4) + 1; 143 + earlDirection = delta < 0 ? 'left' : 'right'; 144 + lastEarlProgress = newProgress; 144 145 } 145 146 scrubProgress = newProgress; 146 147 seekToProgress(scrubProgress); ··· 149 150 </script> 150 151 151 152 <button class="card" style={cardStyle} onclick={() => onSelect(video)}> 152 - <WavyBorder seed={rkey} fill="#39FF44" strokeColor="#0A182B" strokeWidth={2.2} padding="clamp(24px, 4vw, 36px)"> 153 - <span class="duration-badge">{formatDuration(video.value.duration)}</span> 154 - <div class="thumb-wrapper"> 155 - <WavyBorder seed={rkey + '-thumb'} fill="#3992FF" strokeColor="#0A182B" strokeWidth={1.5} padding={0}> 153 + <WavyBorder seed={rkey} fillImage="/border.png" strokeColor="#0B0E17" strokeWidth={2.2} padding="clamp(24px, 4vw, 36px)"> 154 + <div class="card-inner"> 155 + <span class="duration-badge"><SpriteTime time={formatDuration(video.value.duration)} height={22} /></span> 156 + <div class="thumb-wrapper"> 156 157 <div 157 158 class="thumbnail" 158 159 bind:this={thumbEl} ··· 183 184 {/if} 184 185 {#if scrubbing} 185 186 <div 186 - class="scrub-frog" 187 + class="scrub-earl" 187 188 style="left: {scrubProgress * 100}%;" 188 - class:flipped={frogFlipped} 189 189 > 190 190 <img 191 - src={frogFrame === 0 ? '/froggiestand.png' : '/froggiejump.png'} 192 - alt="hop" 193 - class="frog-sprite" 191 + src={`/earl-walk-${earlDirection}-${earlFrame}.png`} 192 + alt="earl" 193 + class="earl-sprite" 194 194 /> 195 195 </div> 196 196 {/if} 197 197 <div class="thumb-shadow"></div> 198 198 </div> 199 - </WavyBorder> 200 - </div> 201 - <div class="info"> 202 - <h3 class="title">{video.value.title}</h3> 203 - <a href="/profile/{creatorHandle.replace('@', '')}" class="creator" onclick={(e: MouseEvent) => e.stopPropagation()}>{creatorHandle}</a> 204 - <p class="date">{formatDate(video.value.createdAt)}</p> 199 + </div> 200 + <div class="info"> 201 + <h3 class="title">{video.value.title}</h3> 202 + <a href="/profile/{creatorHandle.replace('@', '')}" class="creator" onclick={(e: MouseEvent) => e.stopPropagation()}>{creatorHandle}</a> 203 + <p class="date">{formatDate(video.value.createdAt)}</p> 204 + </div> 205 205 </div> 206 206 </WavyBorder> 207 207 </button> ··· 209 209 <style> 210 210 .card { 211 211 all: unset; 212 - cursor: url('/frogcursor-small.png') 12 12, pointer; 212 + cursor: inherit; 213 213 display: flex; 214 214 flex-direction: column; 215 215 transition: transform 0.2s ease; 216 216 position: relative; 217 217 } 218 218 219 - 219 + .card-inner { 220 + background: url('/space.png') center / cover no-repeat; 221 + padding: 10px; 222 + border-radius: 2px; 223 + } 220 224 221 225 .duration-badge { 222 226 display: block; 223 - font-family: 'PicNic', cursive, system-ui; 227 + animation: font-switch 4s steps(1) infinite; 224 228 font-size: 1.4rem; 225 - color: #FF3992; 229 + color: #FF6B2C; 226 230 font-weight: bold; 227 231 letter-spacing: 0.5px; 228 232 margin-bottom: 8px; ··· 237 241 position: relative; 238 242 width: 100%; 239 243 aspect-ratio: 16 / 9; 240 - background: linear-gradient(135deg, #3992FF, #1E4E8C); 244 + background: #0B0E17; 241 245 display: flex; 242 246 align-items: center; 243 247 justify-content: center; ··· 251 255 height: 100%; 252 256 object-fit: cover; 253 257 transition: opacity 0.15s; 258 + z-index: 1; 254 259 } 255 260 .thumb-img.hidden { opacity: 0; } 256 261 ··· 261 266 height: 100%; 262 267 opacity: 0; 263 268 pointer-events: none; 269 + z-index: 2; 264 270 } 265 271 .scrub-canvas.visible { opacity: 1; } 266 272 267 - .scrub-frog { 273 + .scrub-earl { 268 274 position: absolute; 269 275 bottom: 0%; 270 276 z-index: 4; ··· 273 279 transition: left 0.05s linear; 274 280 } 275 281 276 - .scrub-frog.flipped { 277 - transform: translateX(-50%) scaleX(-1); 278 - } 279 - 280 - .frog-sprite { 282 + .earl-sprite { 281 283 width: 48px; 282 284 height: auto; 283 285 filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); 284 - image-rendering: auto; 286 + image-rendering: pixelated; 285 287 } 286 288 287 289 .thumb-shadow { ··· 317 319 } 318 320 .scrub-bar-fill { 319 321 height: 100%; 320 - background: #FF3992; 322 + background: #FF6B2C; 321 323 transition: width 0.05s linear; 322 324 } 323 325 ··· 327 329 328 330 .title { 329 331 margin: 0; 330 - font-family: 'Fang', system-ui, sans-serif; 331 332 font-size: 0.9rem; 333 + animation: font-switch 4s steps(1) infinite; 332 334 font-weight: 700; 333 - color: #0A182B; 335 + color: #E8E0FF; 334 336 line-height: 1.3; 335 337 display: -webkit-box; 336 338 -webkit-line-clamp: 2; 337 339 line-clamp: 2; 338 340 -webkit-box-orient: vertical; 339 341 overflow: hidden; 342 + text-shadow: 343 + -1px -1px 0 rgba(11, 14, 23, 0.8), 344 + 1px -1px 0 rgba(11, 14, 23, 0.8), 345 + -1px 1px 0 rgba(11, 14, 23, 0.8), 346 + 1px 1px 0 rgba(11, 14, 23, 0.8); 340 347 } 341 348 342 349 .creator { 343 350 display: block; 344 351 margin: 4px 0 0; 345 - font-family: 'Fang', system-ui, sans-serif; 352 + animation: font-switch 4s steps(1) infinite; 346 353 font-size: 0.8rem; 347 - color: #0A182B; 354 + color: #E8E0FF; 348 355 opacity: 0.8; 349 356 text-decoration: underline; 350 - text-decoration-color: #FF3992; 357 + text-decoration-color: #FF6B2C; 351 358 transition: color 0.15s; 359 + text-shadow: 360 + -1px -1px 0 rgba(11, 14, 23, 0.8), 361 + 1px -1px 0 rgba(11, 14, 23, 0.8), 362 + -1px 1px 0 rgba(11, 14, 23, 0.8), 363 + 1px 1px 0 rgba(11, 14, 23, 0.8); 352 364 } 353 365 354 366 .creator:hover { 355 - color: #FF3992; 367 + color: #FF6B2C; 356 368 } 357 369 358 370 .date { 359 371 margin: 2px 0 0; 360 - font-family: 'Fang', system-ui, sans-serif; 372 + animation: font-switch 4s steps(1) infinite; 361 373 font-size: 0.75rem; 362 - color: #FF3992; 374 + color: #FF6B2C; 363 375 font-style: italic; 376 + text-shadow: 377 + -1px -1px 0 rgba(11, 14, 23, 0.8), 378 + 1px -1px 0 rgba(11, 14, 23, 0.8), 379 + -1px 1px 0 rgba(11, 14, 23, 0.8), 380 + 1px 1px 0 rgba(11, 14, 23, 0.8); 364 381 } 365 382 </style>
+63 -41
src/lib/VideoPlayer.svelte
··· 2 2 import { onMount } from "svelte"; 3 3 import Hls from "hls.js"; 4 4 import WavyBorder from "./WavyBorder.svelte"; 5 + import SpriteTime from "./SpriteTime.svelte"; 5 6 6 7 // HLS video source URL (m3u8 playlist) 7 8 let { src }: { src: string } = $props(); ··· 15 16 let currentTime = $state(0); 16 17 let duration = $state(0); 17 18 18 - // Frog scrub bar — the frog's position along the bar represents playback progress. 19 - // Users can click the bar or grab the frog to seek. 19 + // Earl scrub bar — earl's position along the bar represents playback progress. 20 + // Users can click the bar or grab earl to seek. 20 21 let scrubBarEl: HTMLDivElement | undefined = $state(); 21 22 let isScrubbing = $state(false); 22 23 let scrubProgress = $state(0); 23 - let frogFrame = $state(0); 24 - let frogFlipped = $state(false); 25 - let lastFrogProgress = 0; 24 + let earlFrame = $state(1); 25 + let earlDirection = $state<'right' | 'left'>('right'); 26 + let lastEarlProgress = 0; 26 27 let showControls = $state(true); 27 28 let hideTimeout: ReturnType<typeof setTimeout> | null = null; 28 29 ··· 95 96 ); 96 97 }); 97 98 98 - let lastHopProgress = 0; // Track progress to trigger frog hops at intervals 99 + let lastHopProgress = 0; // Track progress to trigger toejam hops at intervals 99 100 100 - /** Sync scrub position with playback, and animate the frog hopping */ 101 + /** Sync scrub position with playback, and animate the toejam hopping */ 101 102 function onTimeUpdate() { 102 103 if (!videoEl || isScrubbing) return; 103 104 currentTime = videoEl.currentTime; 104 105 duration = videoEl.duration || 0; 105 106 const newProgress = duration > 0 ? currentTime / duration : 0; 106 107 107 - // Hop the frog as playback advances 108 + // Hop earl as playback advances 108 109 const delta = newProgress - lastHopProgress; 109 110 if (Math.abs(delta) > 0.002) { 110 - frogFrame = frogFrame === 0 ? 1 : 0; 111 - frogFlipped = delta < 0; 111 + earlFrame = (earlFrame % 4) + 1; 112 + earlDirection = delta < 0 ? 'left' : 'right'; 112 113 lastHopProgress = newProgress; 113 114 } 114 115 ··· 150 151 0, 151 152 Math.min(1, (e.clientX - rect.left) / rect.width), 152 153 ); 153 - const delta = pct - lastFrogProgress; 154 + const delta = pct - lastEarlProgress; 154 155 if (Math.abs(delta) > 0.02) { 155 - frogFrame = frogFrame === 0 ? 1 : 0; 156 - frogFlipped = delta < 0; 157 - lastFrogProgress = pct; 156 + earlFrame = (earlFrame % 4) + 1; 157 + earlDirection = delta < 0 ? 'left' : 'right'; 158 + lastEarlProgress = pct; 158 159 } 159 160 scrubProgress = pct; 160 161 if (videoEl && duration > 0) { ··· 181 182 window.addEventListener("mouseup", onScrubUp); 182 183 } 183 184 184 - /** Start scrubbing by grabbing the frog sprite directly */ 185 - function onFrogDown(e: MouseEvent) { 185 + /** Start scrubbing by grabbing the toejam sprite directly */ 186 + function onToejamDown(e: MouseEvent) { 186 187 e.preventDefault(); 187 188 e.stopPropagation(); 188 189 isScrubbing = true; ··· 226 227 if (playing) showControls = false; 227 228 }, 2500); 228 229 } 230 + 231 + function formatTime(seconds: number): string { 232 + const s = Math.floor(seconds); 233 + const h = Math.floor(s / 3600); 234 + const m = Math.floor((s % 3600) / 60); 235 + const sec = s % 60; 236 + if (h > 0) return `${h}:${String(m).padStart(2, '0')}:${String(sec).padStart(2, '0')}`; 237 + return `${m}:${String(sec).padStart(2, '0')}`; 238 + } 229 239 </script> 230 240 231 241 <WavyBorder seed="player-main" padding={4}> ··· 249 259 <track kind="captions" /> 250 260 </video> 251 261 252 - <!-- Minimal controls: frog scrub bar + frogeye fullscreen --> 262 + <!-- Minimal controls: earl scrub bar + ship fullscreen --> 253 263 <div class="controls" class:visible={showControls || !playing}> 254 - <!-- Frog scrub area (no visible bar — frog position IS the progress) --> 264 + <div class="time-display"> 265 + <SpriteTime time={formatTime(currentTime)} height={16} /> 266 + <span class="time-sep">/</span> 267 + <SpriteTime time={formatTime(duration)} height={16} /> 268 + </div> 269 + <!-- Earl scrub area (no visible bar — earl position IS the progress) --> 255 270 <!-- svelte-ignore a11y_no_static_element_interactions --> 256 271 <div 257 272 class="scrub-bar" ··· 265 280 > 266 281 <!-- svelte-ignore a11y_no_static_element_interactions --> 267 282 <div 268 - class="scrub-frog" 283 + class="scrub-earl" 269 284 style="left: {scrubProgress * 100}%;" 270 - class:flipped={frogFlipped} 271 - onmousedown={onFrogDown} 285 + onmousedown={onToejamDown} 272 286 > 273 287 <img 274 - src={frogFrame === 0 275 - ? "/froggiestand.png" 276 - : "/froggiejump.png"} 288 + src={`/earl-walk-${earlDirection}-${earlFrame}.png`} 277 289 alt="scrub" 278 - class="frog-sprite" 290 + class="earl-sprite" 279 291 draggable="false" 280 292 /> 281 293 </div> 282 294 </div> 283 295 </div> 284 296 285 - <!-- Frogeye fullscreen toggle — bottom right --> 297 + <!-- Ship fullscreen toggle — bottom right --> 286 298 <button 287 299 class="fullscreen-btn" 288 300 class:visible={showControls || !playing} 289 301 onclick={toggleFullscreen} 290 302 title={isFullscreen ? "Exit fullscreen" : "Fullscreen"} 291 303 > 292 - <img src="/frogeye.png" alt="fullscreen" class="frogeye" /> 304 + <img src="/ship.png" alt="fullscreen" class="ship-icon" /> 293 305 </button> 294 306 295 307 ··· 304 316 .player-wrapper { 305 317 position: relative; 306 318 width: 100%; 307 - background: #0a182b; 319 + background: #0B0E17; 308 320 overflow: hidden; 309 321 } 310 322 ··· 327 339 cursor: pointer; 328 340 } 329 341 330 - /* Frog scrub area — no visible bar, frog position is the progress */ 342 + /* Earl scrub area — no visible bar, earl position is the progress */ 331 343 .controls { 332 344 position: absolute; 333 345 bottom: 5%; ··· 343 355 pointer-events: auto; 344 356 } 345 357 358 + .time-display { 359 + display: flex; 360 + align-items: center; 361 + gap: 4px; 362 + margin-bottom: 4px; 363 + } 364 + 365 + .time-sep { 366 + color: #FFD93D; 367 + font-family: 'Comic Sans MS', 'Comic Sans', cursive, system-ui; 368 + font-size: 0.85rem; 369 + } 370 + 346 371 .scrub-bar { 347 372 position: relative; 348 373 height: 48px; 349 374 cursor: pointer; 350 375 } 351 376 352 - .scrub-frog { 377 + .scrub-earl { 353 378 position: absolute; 354 379 bottom: 0; 355 380 transform: translateX(-50%); ··· 359 384 padding: 6px; 360 385 } 361 386 362 - .scrub-frog:active { 387 + .scrub-earl:active { 363 388 cursor: grabbing; 364 389 } 365 390 366 - .scrub-frog.flipped { 367 - transform: translateX(-50%) scaleX(-1); 368 - } 369 - 370 - .frog-sprite { 391 + .earl-sprite { 371 392 width: 48px; 372 393 height: auto; 373 394 filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); 374 395 pointer-events: none; 396 + image-rendering: pixelated; 375 397 } 376 398 377 - /* Frogeye fullscreen button */ 399 + /* Ship fullscreen button */ 378 400 .fullscreen-btn { 379 401 all: unset; 380 402 position: absolute; ··· 396 418 transform: scale(1.15); 397 419 } 398 420 399 - .frogeye { 421 + .ship-icon { 400 422 width: 44px; 401 423 height: 44px; 402 424 filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); ··· 409 431 bottom: 15%; 410 432 left: 10%; 411 433 right: 10%; 412 - background: rgba(255, 57, 146, 0.85); 413 - color: #ffdeed; 434 + background: rgba(255, 107, 44, 0.85); 435 + color: #FFD93D; 414 436 padding: 8px 12px; 415 437 border-radius: 6px; 416 - font-family: "Fang", system-ui, sans-serif; 438 + font-family: 'Comic Sans MS', 'Comic Sans', cursive, system-ui; 417 439 font-size: 0.8rem; 418 440 } 419 441 </style>
+70 -90
src/lib/WavyBorder.svelte
··· 1 1 <!-- 2 - WavyBorder: A procedurally generated wobbly rectangular border. 2 + WavyBorder: A procedurally generated spikey rectangular border. 3 3 4 - The shape is built from layered sine waves along each edge, seeded by a string 5 - so every instance is unique but deterministic. The content is clipped to the 6 - wavy shape using a CSS polygon, while the visible outline is rendered as an 7 - SVG path on top. Both are derived from the same control points to stay aligned. 4 + The shape is built from layered sine waves with sharp spike peaks along each 5 + edge, seeded by a string so every instance is unique but deterministic. 6 + Supports optional tiled image fills via fillImage prop. 8 7 --> 9 8 <script lang="ts"> 10 9 import { seededRandom } from './theme'; 11 10 12 - let { seed, fill = '#39FF44', strokeColor = '#0A182B', strokeWidth = 3, padding = '16px', children }: { 11 + let { seed, fill = '#141833', fillImage, fillImageMode = 'tile', strokeColor = '#0B0E17', strokeWidth = 3, padding = '16px', children }: { 13 12 seed: string; 14 13 fill?: string; 14 + fillImage?: string; 15 + fillImageMode?: 'tile' | 'cover'; 15 16 strokeColor?: string; 16 17 strokeWidth?: number; 17 18 padding?: string | number; ··· 20 21 21 22 const paddingValue = typeof padding === 'number' ? `${padding}px` : padding; 22 23 23 - const { pts, svgPath } = generateWavyShape(seed); 24 + const { pts, svgPath } = generateSpikeyShape(seed); 24 25 25 26 // Convert the points to a CSS polygon for clipping 26 27 const clipPolygon = `polygon(${pts.map(([x, y]) => `${x.toFixed(2)}% ${y.toFixed(2)}%`).join(', ')})`; 27 28 29 + const fillStyle = fillImage 30 + ? fillImageMode === 'cover' 31 + ? `background-image: url(${fillImage}); background-size: cover; background-position: center; image-rendering: pixelated;` 32 + : `background-image: url(${fillImage}); background-size: 32px 32px; background-repeat: repeat; image-rendering: pixelated;` 33 + : `background: ${fill};`; 34 + 28 35 /** 29 - * Generate the wavy shape for this border. 30 - * Returns both the SVG bezier path (for the stroke) and densely sampled 31 - * polygon points (for the CSS clip-path). All coordinates are in 0-100 space. 36 + * Generate a spikey shape — 90s Sega Genesis style jagged edges. 37 + * Uses triangle-wave spikes with seeded variation in height and spacing. 32 38 */ 33 - function generateWavyShape(s: string): { pts: [number, number][]; svgPath: string } { 34 - const margin = 1; // % inset from the element edges 35 - const amp = 2.5; // % max wobble amplitude 36 - const segs = 16; // control points per edge 39 + function generateSpikeyShape(s: string): { pts: [number, number][]; svgPath: string } { 40 + const margin = 1; // % inset from edge 41 + const baseAmp = 2; // % spike height 42 + const spikes = 10; // spikes per edge 37 43 38 - // Edges 0=top, 1=right, 2=bottom, 3=left 39 - // Vertical edges (1,3) get lower frequency since they're often shorter in wide boxes 40 - const edgeParams = [0, 1, 2, 3].map((e) => { 41 - const isVertical = e === 1 || e === 3; 42 - const freqScale = isVertical ? 0.5 : 1; 43 - return { 44 - phase1: seededRandom(s, e * 10 + 1) * Math.PI * 2, 45 - phase2: seededRandom(s, e * 10 + 2) * Math.PI * 2, 46 - freq1: (1.5 + seededRandom(s, e * 10 + 3) * 1.5) * freqScale, 47 - freq2: (3 + seededRandom(s, e * 10 + 4) * 2) * freqScale, 48 - ampScale: 0.7 + seededRandom(s, e * 10 + 5) * 0.6, 49 - }; 50 - }); 44 + const edgeParams = [0, 1, 2, 3].map((e) => ({ 45 + ampScale: 0.6 + seededRandom(s, e * 10 + 1) * 0.8, 46 + phase: seededRandom(s, e * 10 + 2) * 0.3, // offset the spike pattern 47 + jitter: seededRandom(s, e * 10 + 3) * 0.4, // per-spike height variation 48 + })); 51 49 52 - /** Compute the perpendicular wobble offset at position t along an edge */ 53 - function wobble(edgeIdx: number, t: number): number { 50 + const points: [number, number][] = []; 51 + 52 + /** Add spike points along an edge */ 53 + function addEdge(edgeIdx: number, start: [number, number], end: [number, number], inward: [number, number]) { 54 54 const p = edgeParams[edgeIdx]; 55 - const w1 = Math.sin(t * p.freq1 * Math.PI * 2 + p.phase1) * amp * 0.7; 56 - const w2 = Math.sin(t * p.freq2 * Math.PI * 2 + p.phase2) * amp * 0.3; 57 - return (w1 + w2) * p.ampScale; 58 - } 55 + const count = spikes; 59 56 60 - const points: [number, number][] = []; 57 + for (let i = 0; i <= count; i++) { 58 + const t = i / count + p.phase / count; 59 + const clampedT = Math.max(0, Math.min(1, t)); 60 + const x = start[0] + (end[0] - start[0]) * clampedT; 61 + const y = start[1] + (end[1] - start[1]) * clampedT; 61 62 62 - for (let i = 0; i <= segs; i++) { 63 - const t = i / segs; 64 - points.push([margin + t * (100 - 2 * margin), margin + wobble(0, t)]); 65 - } 66 - for (let i = 1; i <= segs; i++) { 67 - const t = i / segs; 68 - points.push([(100 - margin) + wobble(1, t), margin + t * (100 - 2 * margin)]); 69 - } 70 - for (let i = 1; i <= segs; i++) { 71 - const t = i / segs; 72 - points.push([(100 - margin) - t * (100 - 2 * margin), (100 - margin) + wobble(2, t)]); 73 - } 74 - for (let i = 1; i < segs; i++) { 75 - const t = i / segs; 76 - points.push([margin + wobble(3, t), (100 - margin) - t * (100 - 2 * margin)]); 77 - } 63 + // Base point (on the edge line) 64 + points.push([x, y]); 78 65 79 - // Build smooth SVG path with Catmull-Rom splines 80 - let d = `M ${points[0][0].toFixed(1)} ${points[0][1].toFixed(1)}`; 81 - for (let i = 0; i < points.length; i++) { 82 - const p0 = points[(i - 1 + points.length) % points.length]; 83 - const p1 = points[i]; 84 - const p2 = points[(i + 1) % points.length]; 85 - const p3 = points[(i + 2) % points.length]; 86 - const tension = 0.3; 87 - const cp1x = p1[0] + (p2[0] - p0[0]) * tension; 88 - const cp1y = p1[1] + (p2[1] - p0[1]) * tension; 89 - const cp2x = p2[0] - (p3[0] - p1[0]) * tension; 90 - const cp2y = p2[1] - (p3[1] - p1[1]) * tension; 91 - d += ` C ${cp1x.toFixed(1)} ${cp1y.toFixed(1)}, ${cp2x.toFixed(1)} ${cp2y.toFixed(1)}, ${p2[0].toFixed(1)} ${p2[1].toFixed(1)}`; 66 + // Spike tip between this point and the next 67 + if (i < count) { 68 + const tMid = (i + 0.5) / count + p.phase / count; 69 + const clampedMid = Math.max(0, Math.min(1, tMid)); 70 + const mx = start[0] + (end[0] - start[0]) * clampedMid; 71 + const my = start[1] + (end[1] - start[1]) * clampedMid; 72 + const spikeHeight = baseAmp * p.ampScale * (0.6 + seededRandom(s, edgeIdx * 100 + i) * p.jitter + (1 - p.jitter) * 0.4); 73 + points.push([ 74 + mx + inward[0] * spikeHeight, 75 + my + inward[1] * spikeHeight, 76 + ]); 77 + } 78 + } 92 79 } 93 - d += ' Z'; 94 80 95 - // Sample many points along the spline for the CSS polygon 96 - const sampledPts: [number, number][] = []; 97 - const totalPts = points.length; 98 - const samplesPerSegment = 10; 99 - for (let i = 0; i < totalPts; i++) { 100 - const p0 = points[(i - 1 + totalPts) % totalPts]; 101 - const p1 = points[i]; 102 - const p2 = points[(i + 1) % totalPts]; 103 - const p3 = points[(i + 2) % totalPts]; 104 - const tension = 0.3; 105 - const cp1x = p1[0] + (p2[0] - p0[0]) * tension; 106 - const cp1y = p1[1] + (p2[1] - p0[1]) * tension; 107 - const cp2x = p2[0] - (p3[0] - p1[0]) * tension; 108 - const cp2y = p2[1] - (p3[1] - p1[1]) * tension; 81 + const m = margin; 82 + const M = 100 - margin; 109 83 110 - for (let j = 0; j < samplesPerSegment; j++) { 111 - const t = j / samplesPerSegment; 112 - const mt = 1 - t; 113 - // Cubic bezier: P = (1-t)^3*P1 + 3(1-t)^2*t*CP1 + 3(1-t)*t^2*CP2 + t^3*P2 114 - const x = mt*mt*mt*p1[0] + 3*mt*mt*t*cp1x + 3*mt*t*t*cp2x + t*t*t*p2[0]; 115 - const y = mt*mt*mt*p1[1] + 3*mt*mt*t*cp1y + 3*mt*t*t*cp2y + t*t*t*p2[1]; 116 - sampledPts.push([x, y]); 117 - } 84 + // Top edge: spikes point inward (downward) 85 + addEdge(0, [m, m], [M, m], [0, 1]); 86 + // Right edge: spikes point inward (leftward) 87 + addEdge(1, [M, m], [M, M], [-1, 0]); 88 + // Bottom edge: spikes point inward (upward), travel right-to-left 89 + addEdge(2, [M, M], [m, M], [0, -1]); 90 + // Left edge: spikes point inward (rightward), travel bottom-to-top 91 + addEdge(3, [m, M], [m, m], [1, 0]); 92 + 93 + // Build SVG path with sharp line segments (no curves — spikey!) 94 + let d = `M ${points[0][0].toFixed(2)} ${points[0][1].toFixed(2)}`; 95 + for (let i = 1; i < points.length; i++) { 96 + d += ` L ${points[i][0].toFixed(2)} ${points[i][1].toFixed(2)}`; 118 97 } 98 + d += ' Z'; 119 99 120 - return { pts: sampledPts, svgPath: d }; 100 + return { pts: points, svgPath: d }; 121 101 } 122 102 </script> 123 103 124 104 <div class="wavy-container" style="--padding: {paddingValue};"> 125 105 <!-- Clipped container: fill + content --> 126 106 <div class="wavy-clipped" style="clip-path: {clipPolygon};"> 127 - <div class="wavy-fill" style="background: {fill};"></div> 107 + <div class="wavy-fill" style={fillStyle}></div> 128 108 <div class="wavy-content"> 129 109 {@render children()} 130 110 </div> ··· 137 117 fill="none" 138 118 stroke={strokeColor} 139 119 stroke-width={strokeWidth} 140 - stroke-linejoin="round" 141 - stroke-linecap="round" 120 + stroke-linejoin="miter" 121 + stroke-linecap="square" 142 122 /> 143 123 </svg> 144 124 </div>
+1 -1
src/lib/WavyCircle.svelte
··· 5 5 <script lang="ts"> 6 6 import { seededRandom } from './theme'; 7 7 8 - let { seed, fill = '#39FF44', strokeColor = '#0A182B', strokeWidth = 2, size = 48, children }: { 8 + let { seed, fill = '#141833', strokeColor = '#0B0E17', strokeWidth = 2, size = 48, children }: { 9 9 seed: string; 10 10 fill?: string; 11 11 strokeColor?: string;
+14 -15
src/lib/theme.ts
··· 1 1 /** 2 - * VodFrog theme: color scheme, seeded randomness, and card layout utilities. 2 + * VoD Jam theme: deep space color scheme, seeded randomness, and card layout utilities. 3 3 */ 4 4 5 - /** Brand colors from the design spec */ 5 + /** Brand colors — ToeJam & Earl deep space palette */ 6 6 export const colors = { 7 - green: '#39FF44', // Main vibrant green 8 - blue: '#3992FF', // Water blue 9 - orange: '#FFA639', // Orange accent 10 - pink: '#FF3992', // Pink accent 11 - lightPink: '#FFDEED', // Light pink for dark regions 12 - darkBlue: '#0A182B', // Near-black blue for text/outlines 13 - 14 - // Derived shades 15 - greenDark: '#1A8C22', 16 - greenMuted: '#2BBF33', 17 - blueDark: '#1E4E8C', 18 - blueLight: '#6BB3FF', 7 + spaceBlack: '#0B0E17', // Deep space black 8 + darkNavy: '#141833', // Dark navy (card/border fills) 9 + mediumBlue: '#1E2952', // Medium space blue 10 + orange: '#FF6B2C', // Funky orange accent 11 + yellow: '#FFD93D', // Star yellow accent 12 + lavender: '#E8E0FF', // Pale lavender (text on dark) 13 + deepBlue: '#0A182B', // Near-black blue for outlines 19 14 } as const; 20 15 21 16 /** ··· 30 25 const char = str.charCodeAt(i); 31 26 hash = ((hash << 5) - hash + char) | 0; 32 27 } 28 + // Extra mixing for better distribution 29 + hash = ((hash >> 16) ^ hash) * 0x45d9f3b | 0; 30 + hash = ((hash >> 16) ^ hash) * 0x45d9f3b | 0; 31 + hash = (hash >> 16) ^ hash; 33 32 return (((hash % 65536) + 65536) % 65536) / 65536; 34 33 } 35 34 ··· 47 46 const r3 = seededRandom(seed, 2); 48 47 49 48 return { 50 - rotation: (r1 - 0.5) * 10, // ±5 degrees 49 + rotation: (r1 - 0.5) * 20, // ±10 degrees 51 50 translateX: (r2 - 0.5) * 60, // ±30px horizontal jitter 52 51 translateY: (r3 - 0.5) * 60, // ±30px vertical jitter 53 52 };
+39 -25
src/routes/+layout.svelte
··· 1 1 <script lang="ts"> 2 + import { onMount, onDestroy } from 'svelte'; 2 3 import MeshBackground from '$lib/MeshBackground.svelte'; 3 - import PlantOverlay from '$lib/PlantOverlay.svelte'; 4 4 5 5 let { children } = $props(); 6 + 7 + let cursorInterval: ReturnType<typeof setInterval>; 8 + 9 + onMount(() => { 10 + const frames = [ 11 + "url('/toe-jam-standing-1.png') 16 16, auto", 12 + "url('/toe-jam-standing-2.png') 16 16, auto", 13 + "url('/toe-jam-standing-3.png') 16 16, auto", 14 + ]; 15 + let i = 0; 16 + document.documentElement.style.cursor = frames[0]; 17 + cursorInterval = setInterval(() => { 18 + i = (i + 1) % frames.length; 19 + document.documentElement.style.cursor = frames[i]; 20 + }, 200); 21 + }); 22 + 23 + onDestroy(() => { 24 + if (cursorInterval) clearInterval(cursorInterval); 25 + }); 6 26 </script> 7 27 8 28 <svelte:head> 9 - <link rel="icon" href="/frogicon.png" /> 29 + <link rel="icon" href="/earl-favicon.png" /> 10 30 <style> 11 31 @font-face { 12 - font-family: 'PicNic'; 13 - src: url('/fonts/PicNic-Regular.otf') format('opentype'); 32 + font-family: 'ToeJamEarl1'; 33 + src: url('/fonts/toejam-earl-variant-1-colour.colr.ttf.woff2') format('woff2'); 14 34 font-weight: normal; 15 35 font-style: normal; 16 36 font-display: swap; 17 37 } 18 38 @font-face { 19 - font-family: 'Fang'; 20 - src: url('/fonts/Fang-Roman.otf') format('opentype'); 39 + font-family: 'ToeJamEarl2'; 40 + src: url('/fonts/toejam-earl-variant-2-colour.colr.ttf.woff2') format('woff2'); 21 41 font-weight: normal; 22 42 font-style: normal; 23 43 font-display: swap; 24 44 } 25 - @font-face { 26 - font-family: 'Fang'; 27 - src: url('/fonts/Fang-Italic.otf') format('opentype'); 28 - font-weight: normal; 29 - font-style: italic; 30 - font-display: swap; 31 - } 32 - /* Cursor must be in global head style to override everything */ 33 - *, *::before, *::after { 34 - cursor: url('/frogcursor-small.png') 8 4, auto !important; 45 + /* Animated cursor — body and descendants inherit from html (set via JS) */ 46 + body, body *, body *::before, body *::after { 47 + cursor: inherit !important; 35 48 } 36 - a, button, [role="button"], input[type="submit"], select, summary { 37 - cursor: url('/frogcursor-small.png') 8 4, pointer !important; 49 + /* Font-switch animation for ToeJam & Earl color fonts */ 50 + @keyframes font-switch { 51 + 0%, 49.9% { font-family: 'ToeJamEarl1', 'Comic Sans MS', 'Comic Sans', cursive, system-ui; } 52 + 50%, 100% { font-family: 'ToeJamEarl2', 'Comic Sans MS', 'Comic Sans', cursive, system-ui; } 38 53 } 39 54 </style> 40 55 </svelte:head> 41 56 42 57 <MeshBackground /> 43 - <PlantOverlay /> 44 58 45 59 {@render children()} 46 60 ··· 53 67 } 54 68 55 69 :global(body) { 56 - font-family: 'Fang', system-ui, -apple-system, BlinkMacSystemFont, sans-serif; 70 + font-family: 'Comic Sans MS', 'Comic Sans', cursive, system-ui; 57 71 } 58 72 59 73 :global(*) { ··· 62 76 63 77 /* Selection color to match theme */ 64 78 :global(::selection) { 65 - background: #FF399280; 66 - color: #FFDEED; 79 + background: #FF6B2C80; 80 + color: #E8E0FF; 67 81 } 68 82 69 83 /* Scrollbar theming */ ··· 72 86 } 73 87 74 88 :global(::-webkit-scrollbar-track) { 75 - background: #1A8C22; 89 + background: #0B0E17; 76 90 } 77 91 78 92 :global(::-webkit-scrollbar-thumb) { 79 - background: #0A182B; 93 + background: #1E2952; 80 94 border-radius: 5px; 81 95 } 82 96 83 97 :global(::-webkit-scrollbar-thumb:hover) { 84 - background: #FF3992; 98 + background: #FF6B2C; 85 99 } 86 100 </style>
+92 -56
src/routes/+page.svelte
··· 12 12 } from "$lib/api"; 13 13 import VideoPlayer from "$lib/VideoPlayer.svelte"; 14 14 import VideoCard from "$lib/VideoCard.svelte"; 15 - import FrogHeader from "$lib/FrogHeader.svelte"; 15 + import ToejamHeader from "$lib/ToejamHeader.svelte"; 16 16 import WavyBorder from "$lib/WavyBorder.svelte"; 17 17 import WavyCircle from "$lib/WavyCircle.svelte"; 18 + import SpriteTime from "$lib/SpriteTime.svelte"; 19 + import Footer from "$lib/Footer.svelte"; 18 20 19 21 const PAGE_SIZE = 9; 20 22 ··· 116 118 <svelte:window onpopstate={onPopState} /> 117 119 118 120 <svelte:head> 119 - <title>vod frog</title> 121 + <title>VoD Jam</title> 120 122 </svelte:head> 121 123 122 124 <div class="app"> 123 - <FrogHeader onHomeClick={closePlayer} /> 125 + <ToejamHeader onHomeClick={closePlayer} /> 124 126 125 127 {#if selectedVideo} 126 128 <section class="player-section"> 127 - <VideoPlayer src={getPlaylistUrl(selectedVideo.uri)} /> 128 - <div class="player-info"> 129 - <WavyBorder seed="player-info" fill="#39FF44" strokeColor="#0A182B" strokeWidth={1.8} padding="32px clamp(40px, 6vw, 80px)"> 130 - <h2 class="player-title">{selectedVideo.value.title}</h2> 131 - <div class="player-meta-row"> 132 - {#if selectedAvatar} 133 - <a href="/profile/{selectedHandle?.replace('@', '') || selectedVideo.value.creator}" class="creator-avatar-link"> 134 - <WavyCircle seed={selectedVideo.value.creator} fill="#FFDEED" strokeColor="#0A182B" strokeWidth={1.5} size={40}> 135 - <img src={selectedAvatar} alt="" /> 136 - </WavyCircle> 137 - </a> 138 - {/if} 139 - <p class="player-meta"> 140 - <a href="/profile/{selectedHandle?.replace('@', '') || selectedVideo.value.creator}" class="creator-tag" 141 - >{selectedHandle || 142 - selectedVideo.value.creator}</a 143 - > 144 - <span class="dot">·</span> 145 - {formatDate(selectedVideo.value.createdAt)} 146 - <span class="dot">·</span> 147 - {formatDuration(selectedVideo.value.duration)} 148 - </p> 129 + <WavyBorder seed="player-space" fillImage="/border.png" strokeColor="#0B0E17" strokeWidth={2.5} padding="clamp(24px, 4vw, 48px)"> 130 + <div class="player-inner"> 131 + <VideoPlayer src={getPlaylistUrl(selectedVideo.uri)} /> 132 + <div class="player-info"> 133 + <h2 class="player-title">{selectedVideo.value.title}</h2> 134 + <div class="player-meta-row"> 135 + {#if selectedAvatar} 136 + <a href="/profile/{selectedHandle?.replace('@', '') || selectedVideo.value.creator}" class="creator-avatar-link"> 137 + <WavyCircle seed={selectedVideo.value.creator} fill="#FFD93D" strokeColor="#0B0E17" strokeWidth={1.5} size={40}> 138 + <img src={selectedAvatar} alt="" /> 139 + </WavyCircle> 140 + </a> 141 + {/if} 142 + <p class="player-meta"> 143 + <a href="/profile/{selectedHandle?.replace('@', '') || selectedVideo.value.creator}" class="creator-tag" 144 + >{selectedHandle || 145 + selectedVideo.value.creator}</a 146 + > 147 + <span class="dot">·</span> 148 + {formatDate(selectedVideo.value.createdAt)} 149 + <span class="dot">·</span> 150 + <SpriteTime time={formatDuration(selectedVideo.value.duration)} height={16} /> 151 + </p> 152 + </div> 149 153 </div> 150 - </WavyBorder> 151 - </div> 154 + </div> 155 + </WavyBorder> 152 156 </section> 153 157 {/if} 154 158 ··· 175 179 </button> 176 180 {/if} 177 181 </div> 182 + 183 + <Footer /> 178 184 </div> 179 185 180 186 <style> ··· 188 194 margin-bottom: 40px; 189 195 margin-top: 20px; 190 196 padding: 0 10px; 197 + } 198 + 199 + .player-inner { 200 + background: url('/space.png') center / cover no-repeat; 201 + padding: 24px; 191 202 } 192 203 193 204 .player-info { ··· 212 223 213 224 .player-title { 214 225 margin: 0; 215 - font-family: "PicNic", cursive, system-ui; 216 226 font-size: clamp(1.4rem, 3vw, 2rem); 217 - color: #0a182b; 227 + color: #E8E0FF; 228 + animation: font-switch 4s steps(1) infinite; 229 + text-shadow: 230 + -1px -1px 0 rgba(11, 14, 23, 0.8), 231 + 1px -1px 0 rgba(11, 14, 23, 0.8), 232 + -1px 1px 0 rgba(11, 14, 23, 0.8), 233 + 1px 1px 0 rgba(11, 14, 23, 0.8); 218 234 } 219 235 220 236 .player-meta { 221 237 margin: 6px 0 0; 222 - font-family: "Fang", system-ui, sans-serif; 223 - color: #0a182b; 238 + animation: font-switch 4s steps(1) infinite; 239 + color: #E8E0FF; 224 240 opacity: 0.7; 225 241 font-size: 0.85rem; 242 + text-shadow: 243 + -1px -1px 0 rgba(11, 14, 23, 0.8), 244 + 1px -1px 0 rgba(11, 14, 23, 0.8), 245 + -1px 1px 0 rgba(11, 14, 23, 0.8), 246 + 1px 1px 0 rgba(11, 14, 23, 0.8); 226 247 } 227 248 228 249 .creator-tag { 229 - color: #3992ff; 250 + color: #FFD93D; 230 251 text-decoration: underline; 231 252 } 232 253 233 254 .dot { 234 255 margin: 0 4px; 235 - color: #0a182b; 256 + color: #E8E0FF; 236 257 opacity: 0.4; 237 258 } 238 259 239 260 .close-btn { 240 - background: #0a182b; 241 - color: #39ff44; 242 - border: 2px solid #39ff44; 261 + background: #0B0E17; 262 + color: #FFD93D; 263 + border: 2px solid #FFD93D; 243 264 border-radius: 50%; 244 265 width: 36px; 245 266 height: 36px; 246 267 font-size: 1rem; 247 268 cursor: pointer; 248 269 flex-shrink: 0; 249 - font-family: "Fang", system-ui, sans-serif; 270 + font-family: 'Comic Sans MS', 'Comic Sans', cursive, system-ui; 250 271 transition: 251 272 background 0.15s, 252 273 color 0.15s; 253 274 } 254 275 255 276 .close-btn:hover { 256 - background: #ff3992; 257 - border-color: #ff3992; 258 - color: #ffdeed; 277 + background: #FF6B2C; 278 + border-color: #FF6B2C; 279 + color: #FFD93D; 259 280 } 260 281 261 282 .grid { ··· 274 295 } 275 296 276 297 .page-btn { 277 - background: #0a182b; 278 - color: #39ff44; 279 - border: 3px solid #0a182b; 298 + background: #0B0E17; 299 + color: #FFD93D; 300 + border: 3px solid #0B0E17; 280 301 padding: 12px 32px; 281 302 border-radius: 40px; 282 - font-family: "PicNic", cursive, system-ui; 303 + animation: font-switch 4s steps(1) infinite; 283 304 font-size: 1.1rem; 284 305 cursor: pointer; 285 306 transition: all 0.2s ease; 286 307 letter-spacing: 0.5px; 308 + text-shadow: 309 + -1px -1px 0 rgba(11, 14, 23, 0.8), 310 + 1px -1px 0 rgba(11, 14, 23, 0.8), 311 + -1px 1px 0 rgba(11, 14, 23, 0.8), 312 + 1px 1px 0 rgba(11, 14, 23, 0.8); 287 313 } 288 314 289 315 .page-btn:hover { 290 - background: #39ff44; 291 - color: #0a182b; 292 - border-color: #0a182b; 316 + background: #FFD93D; 317 + color: #0B0E17; 318 + border-color: #0B0E17; 293 319 } 294 320 295 321 .page-btn:disabled { 296 - background: #1a8c22; 297 - color: #0a182b; 298 - border-color: #1a8c22; 322 + background: #0B0E17; 323 + color: #E8E0FF; 324 + border-color: #0B0E17; 299 325 cursor: wait; 300 326 opacity: 0.6; 301 327 } 302 328 303 329 .page-num { 304 - font-family: "PicNic", cursive, system-ui; 330 + animation: font-switch 4s steps(1) infinite; 305 331 font-size: 1.1rem; 306 - color: #0a182b; 332 + color: #E8E0FF; 333 + text-shadow: 334 + -1px -1px 0 rgba(11, 14, 23, 0.8), 335 + 1px -1px 0 rgba(11, 14, 23, 0.8), 336 + -1px 1px 0 rgba(11, 14, 23, 0.8), 337 + 1px 1px 0 rgba(11, 14, 23, 0.8); 307 338 } 308 339 309 340 .error { 310 - background: rgba(255, 57, 146, 0.15); 311 - color: #ff3992; 341 + background: rgba(255, 107, 44, 0.15); 342 + color: #FF6B2C; 312 343 padding: 12px 16px; 313 344 border-radius: 8px; 314 345 margin: 0 10px 20px; 315 - font-family: "Fang", system-ui, sans-serif; 316 - border: 2px solid #ff3992; 346 + animation: font-switch 4s steps(1) infinite; 347 + border: 2px solid #FF6B2C; 348 + text-shadow: 349 + -1px -1px 0 rgba(11, 14, 23, 0.8), 350 + 1px -1px 0 rgba(11, 14, 23, 0.8), 351 + -1px 1px 0 rgba(11, 14, 23, 0.8), 352 + 1px 1px 0 rgba(11, 14, 23, 0.8); 317 353 } 318 354 319 355 /* Fluid values handle all sizes — no hard breakpoints needed */
+77 -32
src/routes/profile/[handle]/+page.svelte
··· 3 3 import { page } from '$app/stores'; 4 4 import { getProfile, type BskyProfile } from '$lib/api'; 5 5 import WavyBorder from '$lib/WavyBorder.svelte'; 6 - import FrogHeader from '$lib/FrogHeader.svelte'; 6 + import ToejamHeader from '$lib/ToejamHeader.svelte'; 7 7 8 8 let profile: BskyProfile | null = $state(null); 9 9 let loading = $state(true); ··· 24 24 </script> 25 25 26 26 <svelte:head> 27 - <title>{profile?.displayName || handle} — vod frog</title> 27 + <title>{profile?.displayName || handle} — VoD Jam</title> 28 28 </svelte:head> 29 29 30 30 <div class="profile-page"> 31 - <FrogHeader /> 31 + <ToejamHeader /> 32 32 33 33 {#if loading} 34 34 <div class="loading"> 35 - <img src="/froggiejump.png" alt="loading" class="loading-frog" /> 35 + <img src="/earl-walk-right-1.png" alt="loading" class="loading-toejam" /> 36 36 <p class="loading-text">hopping over to fetch profile...</p> 37 37 </div> 38 38 {:else if error} ··· 41 41 <div class="profile-layout"> 42 42 <!-- Banner --> 43 43 {#if profile.banner} 44 - <WavyBorder seed="profile-banner" fill="#3992FF" strokeColor="#0A182B" strokeWidth={2} padding={4}> 44 + <WavyBorder seed="profile-banner" fill="#1E2952" strokeColor="#0B0E17" strokeWidth={2} padding={4}> 45 45 <img src={profile.banner} alt="banner" class="banner-img" /> 46 46 </WavyBorder> 47 47 {/if} 48 48 49 49 <!-- Profile card --> 50 50 <div class="profile-card-area"> 51 - <WavyBorder seed="profile-card" fill="#39FF44" strokeColor="#0A182B" strokeWidth={2} padding={48}> 51 + <WavyBorder seed="profile-card" fill="#141833" strokeColor="#0B0E17" strokeWidth={2} padding={48}> 52 52 <div class="profile-card"> 53 53 {#if profile.avatar} 54 54 <div class="avatar-wrapper"> 55 - <WavyBorder seed="profile-avatar" fill="#FFDEED" strokeColor="#0A182B" strokeWidth={1.5} padding={4}> 55 + <WavyBorder seed="profile-avatar" fill="#FFD93D" strokeColor="#0B0E17" strokeWidth={1.5} padding={4}> 56 56 <img src={profile.avatar} alt={profile.displayName || profile.handle} class="avatar" /> 57 57 </WavyBorder> 58 58 </div> ··· 112 112 padding: 60px 20px; 113 113 } 114 114 115 - .loading-frog { 115 + .loading-toejam { 116 116 width: 64px; 117 117 height: auto; 118 118 animation: hop 0.6s ease-in-out infinite alternate; ··· 124 124 } 125 125 126 126 .loading-text { 127 - font-family: 'PicNic', cursive, system-ui; 127 + animation: font-switch 4s steps(1) infinite; 128 128 font-size: 1.2rem; 129 - color: #0A182B; 129 + color: #E8E0FF; 130 130 margin-top: 12px; 131 + text-shadow: 132 + -1px -1px 0 rgba(11, 14, 23, 0.8), 133 + 1px -1px 0 rgba(11, 14, 23, 0.8), 134 + -1px 1px 0 rgba(11, 14, 23, 0.8), 135 + 1px 1px 0 rgba(11, 14, 23, 0.8); 131 136 } 132 137 133 138 .error { 134 - background: rgba(255, 57, 146, 0.15); 135 - color: #FF3992; 139 + background: rgba(255, 107, 44, 0.15); 140 + color: #FF6B2C; 136 141 padding: 12px 16px; 137 142 border-radius: 8px; 138 143 margin: 20px 0; 139 - font-family: 'Fang', system-ui, sans-serif; 140 - border: 2px solid #FF3992; 144 + animation: font-switch 4s steps(1) infinite; 145 + border: 2px solid #FF6B2C; 146 + text-shadow: 147 + -1px -1px 0 rgba(11, 14, 23, 0.8), 148 + 1px -1px 0 rgba(11, 14, 23, 0.8), 149 + -1px 1px 0 rgba(11, 14, 23, 0.8), 150 + 1px 1px 0 rgba(11, 14, 23, 0.8); 141 151 } 142 152 143 153 .profile-layout { ··· 179 189 } 180 190 181 191 .display-name { 182 - font-family: 'PicNic', cursive, system-ui; 183 192 font-size: clamp(1.8rem, 4vw, 2.8rem); 184 - color: #0A182B; 193 + color: #E8E0FF; 185 194 margin: 0; 186 195 line-height: 1.1; 196 + animation: font-switch 4s steps(1) infinite; 197 + text-shadow: 198 + -1px -1px 0 rgba(11, 14, 23, 0.8), 199 + 1px -1px 0 rgba(11, 14, 23, 0.8), 200 + -1px 1px 0 rgba(11, 14, 23, 0.8), 201 + 1px 1px 0 rgba(11, 14, 23, 0.8); 187 202 } 188 203 189 204 .handle { 190 - font-family: 'Fang', system-ui, sans-serif; 205 + animation: font-switch 4s steps(1) infinite; 191 206 font-size: 1rem; 192 - color: #0A182B; 207 + color: #E8E0FF; 193 208 opacity: 0.7; 194 209 margin: 0; 210 + text-shadow: 211 + -1px -1px 0 rgba(11, 14, 23, 0.8), 212 + 1px -1px 0 rgba(11, 14, 23, 0.8), 213 + -1px 1px 0 rgba(11, 14, 23, 0.8), 214 + 1px 1px 0 rgba(11, 14, 23, 0.8); 195 215 } 196 216 197 217 .description { 198 - font-family: 'Fang', system-ui, sans-serif; 218 + animation: font-switch 4s steps(1) infinite; 199 219 font-size: 0.95rem; 200 - color: #0A182B; 220 + color: #E8E0FF; 201 221 margin: 8px 0; 202 222 max-width: 500px; 203 223 line-height: 1.5; 224 + text-shadow: 225 + -1px -1px 0 rgba(11, 14, 23, 0.8), 226 + 1px -1px 0 rgba(11, 14, 23, 0.8), 227 + -1px 1px 0 rgba(11, 14, 23, 0.8), 228 + 1px 1px 0 rgba(11, 14, 23, 0.8); 204 229 } 205 230 206 231 .stats { ··· 216 241 } 217 242 218 243 .stat-num { 219 - font-family: 'PicNic', cursive, system-ui; 244 + animation: font-switch 4s steps(1) infinite; 220 245 font-size: 1.4rem; 221 - color: #0A182B; 246 + color: #E8E0FF; 222 247 font-weight: bold; 248 + text-shadow: 249 + -1px -1px 0 rgba(11, 14, 23, 0.8), 250 + 1px -1px 0 rgba(11, 14, 23, 0.8), 251 + -1px 1px 0 rgba(11, 14, 23, 0.8), 252 + 1px 1px 0 rgba(11, 14, 23, 0.8); 223 253 } 224 254 225 255 .stat-label { 226 - font-family: 'Fang', system-ui, sans-serif; 256 + animation: font-switch 4s steps(1) infinite; 227 257 font-size: 0.75rem; 228 - color: #0A182B; 258 + color: #E8E0FF; 229 259 opacity: 0.6; 260 + text-shadow: 261 + -1px -1px 0 rgba(11, 14, 23, 0.8), 262 + 1px -1px 0 rgba(11, 14, 23, 0.8), 263 + -1px 1px 0 rgba(11, 14, 23, 0.8), 264 + 1px 1px 0 rgba(11, 14, 23, 0.8); 230 265 } 231 266 232 267 .profile-link { 233 - font-family: 'PicNic', cursive, system-ui; 268 + animation: font-switch 4s steps(1) infinite; 234 269 font-size: 1rem; 235 - color: #0A182B; 270 + color: #E8E0FF; 236 271 text-decoration: underline; 237 - text-decoration-color: #FF3992; 272 + text-decoration-color: #FF6B2C; 238 273 margin-top: 8px; 239 274 transition: color 0.15s; 275 + text-shadow: 276 + -1px -1px 0 rgba(11, 14, 23, 0.8), 277 + 1px -1px 0 rgba(11, 14, 23, 0.8), 278 + -1px 1px 0 rgba(11, 14, 23, 0.8), 279 + 1px 1px 0 rgba(11, 14, 23, 0.8); 240 280 } 241 281 242 282 .profile-link:hover { 243 - color: #FF3992; 283 + color: #FF6B2C; 244 284 } 245 285 246 286 .back-link { ··· 249 289 } 250 290 251 291 .back-link a { 252 - font-family: 'PicNic', cursive, system-ui; 292 + animation: font-switch 4s steps(1) infinite; 253 293 font-size: 1.1rem; 254 - color: #0A182B; 294 + color: #E8E0FF; 255 295 text-decoration: underline; 256 - text-decoration-color: #FF3992; 296 + text-decoration-color: #FF6B2C; 257 297 transition: color 0.15s; 298 + text-shadow: 299 + -1px -1px 0 rgba(11, 14, 23, 0.8), 300 + 1px -1px 0 rgba(11, 14, 23, 0.8), 301 + -1px 1px 0 rgba(11, 14, 23, 0.8), 302 + 1px 1px 0 rgba(11, 14, 23, 0.8); 258 303 } 259 304 260 305 .back-link a:hover { 261 - color: #FF3992; 306 + color: #FF6B2C; 262 307 } 263 308 </style>
static/background.gif

This is a binary file and will not be displayed.

static/border.png

This is a binary file and will not be displayed.

static/colon.png

This is a binary file and will not be displayed.

static/earl-favicon.png

This is a binary file and will not be displayed.

static/earl-walk-left-1.png

This is a binary file and will not be displayed.

static/earl-walk-left-2.png

This is a binary file and will not be displayed.

static/earl-walk-left-3.png

This is a binary file and will not be displayed.

static/earl-walk-left-4.png

This is a binary file and will not be displayed.

static/earl-walk-right-1.png

This is a binary file and will not be displayed.

static/earl-walk-right-2.png

This is a binary file and will not be displayed.

static/earl-walk-right-3.png

This is a binary file and will not be displayed.

static/earl-walk-right-4.png

This is a binary file and will not be displayed.

static/example.png

This is a binary file and will not be displayed.

static/fonts/Fang-Italic.otf

This is a binary file and will not be displayed.

static/fonts/Fang-Roman.otf

This is a binary file and will not be displayed.

static/fonts/PicNic-Regular.otf

This is a binary file and will not be displayed.

static/fonts/toejam-earl-variant-1-colour.colr.ttf.woff2

This is a binary file and will not be displayed.

static/fonts/toejam-earl-variant-2-colour.colr.ttf.woff2

This is a binary file and will not be displayed.

static/frogcursor-small.png

This is a binary file and will not be displayed.

static/frogcursor.png

This is a binary file and will not be displayed.

static/frogeye.png

This is a binary file and will not be displayed.

static/froggie.png

This is a binary file and will not be displayed.

static/froggiejump.png

This is a binary file and will not be displayed.

static/froggiestand.png

This is a binary file and will not be displayed.

static/frogicon.png

This is a binary file and will not be displayed.

static/leaves.png

This is a binary file and will not be displayed.

static/num-0.png

This is a binary file and will not be displayed.

static/num-1.png

This is a binary file and will not be displayed.

static/num-2.png

This is a binary file and will not be displayed.

static/num-3.png

This is a binary file and will not be displayed.

static/num-4.png

This is a binary file and will not be displayed.

static/num-5.png

This is a binary file and will not be displayed.

static/num-6.png

This is a binary file and will not be displayed.

static/num-7.png

This is a binary file and will not be displayed.

static/num-8.png

This is a binary file and will not be displayed.

static/num-9.png

This is a binary file and will not be displayed.

static/opengraph.png

This is a binary file and will not be displayed.

static/ship.png

This is a binary file and will not be displayed.

static/space.png

This is a binary file and will not be displayed.

static/toe-jam-earl.png

This is a binary file and will not be displayed.

static/toe-jam-standing-1.png

This is a binary file and will not be displayed.

static/toe-jam-standing-2.png

This is a binary file and will not be displayed.

static/toe-jam-standing-3.png

This is a binary file and will not be displayed.

static/vod-jam.png

This is a binary file and will not be displayed.