wherever-dev 0.9.4 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/index.js +46 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/protocol.d.ts +17 -0
  4. package/dist/protocol.d.ts.map +1 -1
  5. package/dist/session-pool.d.ts +24 -0
  6. package/dist/session-pool.d.ts.map +1 -1
  7. package/dist/session-pool.js +88 -2
  8. package/dist/session-pool.js.map +1 -1
  9. package/dist/session-types.d.ts +13 -0
  10. package/dist/session-types.d.ts.map +1 -1
  11. package/package.json +1 -1
  12. package/public/_app/immutable/assets/{0.BEXNfWJA.css → 0.WyAkEve_.css} +1 -1
  13. package/public/_app/immutable/chunks/C-wUsEAZ.js +2 -0
  14. package/public/_app/immutable/chunks/{VihzaMwf.js.map → C-wUsEAZ.js.map} +1 -1
  15. package/public/_app/immutable/chunks/{ylfInSZr.js → CAWbdcQM.js} +2 -2
  16. package/public/_app/immutable/chunks/{ylfInSZr.js.map → CAWbdcQM.js.map} +1 -1
  17. package/public/_app/immutable/chunks/{CEg8tgYI.js → CRRPBe07.js} +2 -2
  18. package/public/_app/immutable/chunks/{CEg8tgYI.js.map → CRRPBe07.js.map} +1 -1
  19. package/public/_app/immutable/chunks/CleJ9Y0c.js +2 -0
  20. package/public/_app/immutable/chunks/{C3mNLlNB.js.map → CleJ9Y0c.js.map} +1 -1
  21. package/public/_app/immutable/chunks/CoQYrr6F.js +3 -0
  22. package/public/_app/immutable/chunks/{vMsF8lo6.js.map → CoQYrr6F.js.map} +1 -1
  23. package/public/_app/immutable/chunks/{BQiMf7VR.js → DoZr_wED.js} +2 -2
  24. package/public/_app/immutable/chunks/{BQiMf7VR.js.map → DoZr_wED.js.map} +1 -1
  25. package/public/_app/immutable/chunks/Dtm96ZKi.js +2 -0
  26. package/public/_app/immutable/chunks/{MtE7VtNZ.js.map → Dtm96ZKi.js.map} +1 -1
  27. package/public/_app/immutable/entry/app.K24sShaD.js +3 -0
  28. package/public/_app/immutable/entry/{app.DUjH7hiv.js.map → app.K24sShaD.js.map} +1 -1
  29. package/public/_app/immutable/entry/start.D0G5vNGz.js +2 -0
  30. package/public/_app/immutable/entry/start.D0G5vNGz.js.map +1 -0
  31. package/public/_app/immutable/nodes/{0.g7s17O5v.js → 0.BrcmwQs1.js} +3 -3
  32. package/public/_app/immutable/nodes/{0.g7s17O5v.js.map → 0.BrcmwQs1.js.map} +1 -1
  33. package/public/_app/immutable/nodes/1.CoVrNaz0.js +2 -0
  34. package/public/_app/immutable/nodes/{1.qJq5SrYQ.js.map → 1.CoVrNaz0.js.map} +1 -1
  35. package/public/_app/immutable/nodes/2.CghcZ7zW.js +87 -0
  36. package/public/_app/immutable/nodes/2.CghcZ7zW.js.map +1 -0
  37. package/public/_app/version.json +1 -1
  38. package/public/index.html +15 -15
  39. package/public/service-worker.js +1 -1
  40. package/public/_app/immutable/chunks/C3mNLlNB.js +0 -2
  41. package/public/_app/immutable/chunks/MtE7VtNZ.js +0 -2
  42. package/public/_app/immutable/chunks/VihzaMwf.js +0 -2
  43. package/public/_app/immutable/chunks/vMsF8lo6.js +0 -3
  44. package/public/_app/immutable/entry/app.DUjH7hiv.js +0 -3
  45. package/public/_app/immutable/entry/start.pmYci95Q.js +0 -2
  46. package/public/_app/immutable/entry/start.pmYci95Q.js.map +0 -1
  47. package/public/_app/immutable/nodes/1.qJq5SrYQ.js +0 -2
  48. package/public/_app/immutable/nodes/2.rjFHgJh1.js +0 -87
  49. package/public/_app/immutable/nodes/2.rjFHgJh1.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"VihzaMwf.js","sources":["../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/blocks/each.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/elements/attributes.js","../../../../../../../node_modules/.pnpm/@sveltejs+kit@2.60.1_@opentelemetry+api@1.9.0_@sveltejs+vite-plugin-svelte@6.2.4_svelte_92561c5307f67095f16bb8153283369b/node_modules/@sveltejs/kit/src/runtime/app/paths/client.js","../../../../../../../node_modules/.pnpm/named-logs@0.4.1/node_modules/named-logs/dist/esm/index.js","../../../../../../src/lib/core/service-worker/utils.ts","../../../../../../src/lib/core/notifications/index.ts","../../../../../../src/lib/core/service-worker/index.ts","../../../../../../src/lib/core/utils/web/url.ts","../../../../../../src/lib/core/config.ts"],"sourcesContent":["/** @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';\nimport { tag } from '../../dev/tracing.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\tif (DEV) {\n\t\ttag(each_array, '{#each ...}');\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 { 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 {\n\tATTRIBUTES_CACHE,\n\tFORM_RESET_HANDLER,\n\tIS_XHTML,\n\tLOADING_ATTR_SYMBOL\n} 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/** @type {any} */ (input)[FORM_RESET_HANDLER] = 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/** @type {any} */ (element)[ATTRIBUTES_CACHE] ??= {\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 (and dangerous, like innerHTML) setters we're not interested in\n\t// Do not use constructor.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 (\n\t\t\t\tdescriptors[key].set &&\n\t\t\t\t// better safe than sorry, we don't want spread attributes to mess with HTML content\n\t\t\t\tkey !== 'innerHTML' &&\n\t\t\t\tkey !== 'textContent' &&\n\t\t\t\tkey !== 'innerText'\n\t\t\t) {\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 { Asset, RouteId, RouteIdWithSearchOrHash, Pathname, PathnameWithSearchOrHash, ResolvedPathname } from '$app/types' */\n/** @import { ResolveArgs } from './types.js' */\nimport { base, assets, hash_routing } from './internal/client.js';\nimport { resolve_route } from '../../../utils/routing.js';\nimport { get_navigation_intent } from '../../client/client.js';\n\n/**\n * Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.\n *\n * During server rendering, the base path is relative and depends on the page currently being rendered.\n *\n * @example\n * ```svelte\n * <script>\n * \timport { asset } from '$app/paths';\n * </script>\n *\n * <img alt=\"a potato\" src={asset('/potato.jpg')} />\n * ```\n * @since 2.26\n *\n * @param {Asset} file\n * @returns {string}\n */\nexport function asset(file) {\n\treturn (assets || base) + file;\n}\n\nconst pathname_prefix = hash_routing ? '#' : '';\n\n/**\n * Resolve a pathname by prefixing it with the base path, if any, or resolve a route ID by populating dynamic segments with parameters.\n *\n * During server rendering, the base path is relative and depends on the page currently being rendered.\n *\n * @example\n * ```js\n * import { resolve } from '$app/paths';\n *\n * // using a pathname\n * const resolved = resolve(`/blog/hello-world`);\n *\n * // using a route ID plus parameters\n * const resolved = resolve('/blog/[slug]', {\n * \tslug: 'hello-world'\n * });\n * ```\n * @since 2.26\n *\n * @template {RouteIdWithSearchOrHash | PathnameWithSearchOrHash} T\n * @param {ResolveArgs<T>} args\n * @returns {ResolvedPathname}\n */\nexport function resolve(...args) {\n\tif (!args[0].startsWith('/')) {\n\t\tthrow new Error(\n\t\t\t`Cannot use \\`resolve(...)\\` with a non-absolute pathname or route ID (got \"${args[0]}\"). ` +\n\t\t\t\t'`resolve` is only for internal pathnames and route IDs; external URLs should be used directly.'\n\t\t);\n\t}\n\n\t// The type error is correct here, and if someone doesn't pass params when they should there's a runtime error,\n\t// but we don't want to adjust the internal resolve_route function to accept `undefined`, hence the type cast.\n\treturn (\n\t\tbase + pathname_prefix + resolve_route(args[0], /** @type {Record<string, string>} */ (args[1]))\n\t);\n}\n\n/**\n * Match a path or URL to a route ID and extracts any parameters.\n *\n * @example\n * ```js\n * import { match } from '$app/paths';\n *\n * const route = await match('/blog/hello-world');\n *\n * if (route?.id === '/blog/[slug]') {\n * \tconst slug = route.params.slug;\n * \tconst response = await fetch(`/api/posts/${slug}`);\n * \tconst post = await response.json();\n * }\n * ```\n * @since 2.52.0\n *\n * @param {Pathname | URL | (string & {})} url\n * @returns {Promise<{ id: RouteId, params: Record<string, string> } | null>}\n */\nexport async function match(url) {\n\tif (typeof url === 'string') {\n\t\turl = new URL(url, location.href);\n\t}\n\n\tconst intent = await get_navigation_intent(url, false);\n\n\tif (intent) {\n\t\treturn {\n\t\t\tid: /** @type {RouteId} */ (intent.route.id),\n\t\t\tparams: intent.params\n\t\t};\n\t}\n\n\treturn null;\n}\n\nexport { base, assets, resolve as resolveRoute };\n","const noop=()=>{},noopLogger={assert:noop,error:noop,warn:noop,info:noop,log:noop,debug:noop,dir:noop,table:noop,trace:noop,write:noop,time:noop,timeEnd:noop,timeLog:noop};let _factory;export function hook(o){\"undefined\"!=typeof globalThis&&(globalThis._logFactory=o),_factory=o}const fallbackFactory=o=>{let n;return new Proxy({},{get(r,t,e){if(n)return n[t];const l=_getFactory();return l?(n=l(o),n[t]):noop}})};function _getFactory(){return _factory||(null===globalThis||void 0===globalThis?void 0:globalThis._logFactory)}export function logs(o,n){const r=_getFactory();return r?r(o,{decoration:null==n?void 0:n.decoration}):(null==n?void 0:n.fallbackOnProxy)?\"boolean\"==typeof n.fallbackOnProxy?n.fallbackOnProxy?fallbackFactory(o):noopLogger:\"string\"==typeof n.fallbackOnProxy&&\"undefined\"!=typeof process&&(null===process||void 0===process?void 0:process.env[n.fallbackOnProxy])?fallbackFactory(o):noopLogger:noopLogger}","export function handleAutomaticUpdate(\n\tregistration: ServiceWorkerRegistration,\n\tintervals: {idle: number; checks: number},\n): NodeJS.Timeout {\n\tlet lastFocusTime = performance.now();\n\tfunction wakeup(evt?: Event) {\n\t\tconst timePassed = performance.now();\n\t\tif (timePassed - lastFocusTime > intervals.idle) {\n\t\t\tregistration.update();\n\t\t}\n\t\t// we reset the time each time we wake up\n\t\t// the idea here is that we do not want to bother users while they are actively using the app\n\t\tlastFocusTime = timePassed;\n\t}\n\t['focus', 'pointerdown'].forEach((evt) =>\n\t\twindow.addEventListener(evt, wakeup),\n\t);\n\n\t// Installed-PWA update trigger.\n\t// An installed PWA is a SPA (hash/client-side routing) and almost never\n\t// issues a `mode: 'navigate'` request, so the service worker's\n\t// \"skipWaiting on navigate\" trick (see src/service-worker/index.ts) never\n\t// fires and a waiting worker is never surfaced. The idle-gated `wakeup`\n\t// above also rarely passes right after a relaunch, so the update banner\n\t// never appears. Force an explicit update check on launch and every time\n\t// the app becomes visible (relaunch / tab re-show) so the manual update\n\t// popup can actually be shown.\n\tdocument.addEventListener('visibilitychange', () => {\n\t\tif (document.visibilityState === 'visible') {\n\t\t\tregistration.update();\n\t\t}\n\t});\n\t// also check immediately on registration\n\tregistration.update();\n\n\t// but we still do not an update every so often\n\t// TODO improve upon this\n\treturn setInterval(() => registration.update(), intervals.checks);\n}\n\n// taken from: https://stackoverflow.com/a/50535316\nexport function listenForWaitingServiceWorker(\n\tregistration: ServiceWorkerRegistration,\n\tcallback: (reg: ServiceWorkerRegistration) => void,\n) {\n\tfunction awaitStateChange() {\n\t\tif (registration.installing) {\n\t\t\tregistration.installing.addEventListener('statechange', function () {\n\t\t\t\tif (this.state === 'installed') callback(registration);\n\t\t\t});\n\t\t}\n\t}\n\tif (!registration) {\n\t\treturn;\n\t}\n\tif (registration.waiting) {\n\t\treturn callback(registration);\n\t}\n\tif (registration.installing) {\n\t\tawaitStateChange();\n\t} else {\n\t\tregistration.addEventListener('updatefound', awaitStateChange);\n\t}\n}\n","import {pushState} from '$app/navigation';\nimport {page} from '$app/state';\nimport {get, writable} from 'svelte/store';\ntype JSONNotification = {\n\ttitle: string;\n\toptions: NotificationOptions;\n};\n\nexport type PushNotification = {\n\ttype: 'push-notification';\n\tdata: JSONNotification;\n};\nexport type NotificationToAdd = PushNotification;\n\nexport type Notification = NotificationToAdd & {id: number};\n\nexport function createNotificationsService() {\n\tlet lastId = 1;\n\tconst store = writable<Notification[]>([]);\n\n\tfunction add(notification: NotificationToAdd) {\n\t\tstore.update((notifications) => [\n\t\t\t...notifications,\n\t\t\t{...notification, id: ++lastId},\n\t\t]);\n\t}\n\n\tfunction remove(id: number) {\n\t\tstore.update((notifications) =>\n\t\t\tnotifications.filter((notification) => notification.id !== id),\n\t\t);\n\t}\n\n\tfunction onClick(id: number) {\n\t\tconst notification = get(store).find((v) => v.id == id);\n\t\tremove(id);\n\t\tif (notification?.type === 'push-notification') {\n\t\t\tif (notification.data.options.data?.navigate) {\n\t\t\t\tpushState(notification.data.options.data.navigate, page.state);\n\t\t\t}\n\t\t}\n\t}\n\treturn {subscribe: store.subscribe, add, remove, onClick};\n}\n\nexport const notifications = createNotificationsService();\n","import {dev} from '$app/environment';\nimport {get, writable} from 'svelte/store';\nimport type {Logger} from 'named-logs';\nimport {logs} from 'named-logs';\nimport {handleAutomaticUpdate, listenForWaitingServiceWorker} from './utils';\nimport {notifications} from '$lib/core/notifications';\nimport {resolve} from '$app/paths';\n\nconst logger = logs('service-worker') as Logger & {\n\tlevel: number;\n\tenabled: boolean;\n};\n\nfunction updateLoggingForWorker(worker: ServiceWorker | null) {\n\tif (worker) {\n\t\tif (logger.enabled) {\n\t\t\tlogger.debug(\n\t\t\t\t`enabling logging for service worker, level: ${logger.level}`,\n\t\t\t);\n\t\t} else {\n\t\t\tlogger.debug(\n\t\t\t\t`disabling logging for service worker, level: ${logger.level}`,\n\t\t\t);\n\t\t}\n\t\tworker.postMessage({\n\t\t\ttype: 'debug',\n\t\t\tlevel: logger.level,\n\t\t\tenabled: logger.enabled,\n\t\t});\n\t}\n}\n\nconst IDLE_DELAY_MS = 3 * 60 * 1000;\nconst CHECK_DELAY_MS = 30 * 60 * 1000;\n\nexport type ServiceWorkerState =\n\t| undefined\n\t| {\n\t\t\tnotSupported: true;\n\t }\n\t| {\n\t\t\tnotSupported: false;\n\t\t\tregistering: true;\n\t }\n\t| {\n\t\t\tnotSupported: false;\n\t\t\tregistering: false;\n\t\t\terror: {message: string; cause: any};\n\t\t\tregistration: undefined;\n\t\t\tupdateAvailable: false;\n\t }\n\t| {\n\t\t\tregistration?: ServiceWorkerRegistration;\n\t\t\tupdateAvailable: boolean;\n\t\t\tnotSupported: false;\n\t\t\tregistering: false;\n\t };\n\nexport function createServiceWorker() {\n\tconst store = writable<ServiceWorkerState>(undefined);\n\n\tfunction pingServideWorker(\n\t\tstate: 'installing' | 'waiting' | 'active' = 'active',\n\t) {\n\t\tsendMessage(\n\t\t\t{\n\t\t\t\ttype: 'ping',\n\t\t\t},\n\t\t\tstate,\n\t\t);\n\t}\n\n\tfunction sendMessage(\n\t\tmessage: string | object,\n\t\tstate: 'installing' | 'waiting' | 'active' = 'active',\n\t) {\n\t\tconst $serviceWorker = get(store);\n\t\tif (!$serviceWorker) {\n\t\t\tthrow new Error(`not loaded`);\n\t\t}\n\t\tif ($serviceWorker.notSupported) {\n\t\t\tthrow new Error(`not supported`);\n\t\t}\n\t\tif ($serviceWorker.registering) {\n\t\t\tthrow new Error(`is registering...`);\n\t\t}\n\t\tconst registration = $serviceWorker.registration;\n\t\tif (!registration) {\n\t\t\tthrow new Error(`no registration`);\n\t\t}\n\t\tif (!registration[state]) {\n\t\t\tthrow new Error(`no registration in state: ${state}`);\n\t\t}\n\t\tregistration[state].postMessage(message);\n\t}\n\n\tfunction skipWaiting() {\n\t\tlogger.log(`accepting update...`);\n\t\tconst $serviceWorker = get(store);\n\t\tif (!$serviceWorker) {\n\t\t\tthrow new Error(`not loaded`);\n\t\t}\n\t\tif ($serviceWorker.notSupported) {\n\t\t\tthrow new Error(`not supported`);\n\t\t}\n\t\tif ($serviceWorker.registering) {\n\t\t\tthrow new Error(`is registering...`);\n\t\t}\n\t\tif ($serviceWorker.updateAvailable && $serviceWorker.registration) {\n\t\t\tconst registration = $serviceWorker.registration;\n\t\t\tif (!registration) {\n\t\t\t\tthrow new Error(`no registration`);\n\t\t\t}\n\n\t\t\tif (registration.waiting) {\n\t\t\t\tlogger.log(`was waiting, skipping...`);\n\t\t\t\tregistration.waiting.postMessage('skipWaiting');\n\t\t\t} else {\n\t\t\t\tlogger.log(`was not waiting, should we reload?`);\n\t\t\t\tlogger.error(`not waiting..., todo reload?`);\n\t\t\t\t// window.location.reload();\n\t\t\t}\n\n\t\t\tif (!dev) {\n\t\t\t\tlogger.log(`update store`);\n\t\t\t\tstore.set({\n\t\t\t\t\tnotSupported: false,\n\t\t\t\t\tupdateAvailable: false,\n\t\t\t\t\tregistration: $serviceWorker.registration,\n\t\t\t\t\tregistering: $serviceWorker.registering,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction skip() {\n\t\tconst $serviceWorker = get(store);\n\t\tif (!$serviceWorker) {\n\t\t\tthrow new Error(`not loaded`);\n\t\t}\n\t\tif ($serviceWorker.notSupported) {\n\t\t\tthrow new Error(`not supported`);\n\t\t}\n\t\tif ($serviceWorker.registering) {\n\t\t\tthrow new Error(`is registering...`);\n\t\t}\n\t\tstore.set({\n\t\t\tnotSupported: false,\n\t\t\tupdateAvailable: false,\n\t\t\tregistration: $serviceWorker.registration,\n\t\t\tregistering: $serviceWorker.registering,\n\t\t});\n\t}\n\n\tfunction register() {\n\t\tif (typeof navigator !== 'undefined' && 'serviceWorker' in navigator) {\n\t\t\tstore.set({notSupported: false, registering: true});\n\n\t\t\t// ------------------------------------------------------------------------------------------------\n\t\t\t// FORCE RELOAD ON CONTROLLER CHANGE\n\t\t\t// ------------------------------------------------------------------------------------------------\n\t\t\tlet refreshing = false;\n\t\t\tnavigator.serviceWorker.addEventListener('controllerchange', () => {\n\t\t\t\tif (refreshing) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\trefreshing = true;\n\t\t\t\twindow.location.reload();\n\t\t\t});\n\t\t\t// ------------------------------------------------------------------------------------------------\n\n\t\t\t//listen to messages\n\t\t\tnavigator.serviceWorker.onmessage = (event) => {\n\t\t\t\tif (event.data && event.data.type === 'notification') {\n\t\t\t\t\tconsole.log(event);\n\t\t\t\t\tnotifications.add({\n\t\t\t\t\t\ttype: 'push-notification',\n\t\t\t\t\t\tdata: event.data.notification,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst swLocation = resolve<any>(`/service-worker.js`);\n\t\t\t//{scope: `${base}/`}\n\t\t\tnavigator.serviceWorker\n\t\t\t\t.register(swLocation, {\n\t\t\t\t\ttype: dev ? 'module' : 'classic',\n\t\t\t\t})\n\t\t\t\t.then((registration) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandleAutomaticUpdate(registration, {\n\t\t\t\t\t\t\tidle: IDLE_DELAY_MS,\n\t\t\t\t\t\t\tchecks: CHECK_DELAY_MS,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\tstore.set({\n\t\t\t\t\t\tnotSupported: false,\n\t\t\t\t\t\tupdateAvailable: false,\n\t\t\t\t\t\tregistration: registration,\n\t\t\t\t\t\tregistering: false,\n\t\t\t\t\t});\n\t\t\t\t\tupdateLoggingForWorker(registration.installing);\n\t\t\t\t\tupdateLoggingForWorker(registration.waiting);\n\t\t\t\t\tupdateLoggingForWorker(registration.active);\n\t\t\t\t\tlistenForWaitingServiceWorker(registration, () => {\n\t\t\t\t\t\tstore.set({\n\t\t\t\t\t\t\tnotSupported: false,\n\t\t\t\t\t\t\tupdateAvailable: true,\n\t\t\t\t\t\t\tregistration: registration,\n\t\t\t\t\t\t\tregistering: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tconsole.error(e);\n\t\t\t\t\tstore.set({\n\t\t\t\t\t\tregistering: false,\n\t\t\t\t\t\tnotSupported: false,\n\t\t\t\t\t\tupdateAvailable: false,\n\t\t\t\t\t\tregistration: undefined,\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\tmessage: `failed to register service-worker`,\n\t\t\t\t\t\t\tcause: e.message || e,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t\tlogger.error('Failed to register service worker', e);\n\t\t\t\t});\n\t\t} else {\n\t\t\tif (typeof window !== 'undefined') {\n\t\t\t\tstore.set({notSupported: true});\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tsubscribe: store.subscribe,\n\t\tset: store.set, // TODO remove and move handler logic in here\n\t\tget registration(): ServiceWorkerRegistration | undefined {\n\t\t\tconst $serviceWorker = get(store);\n\t\t\tif ($serviceWorker && 'registration' in $serviceWorker) {\n\t\t\t\treturn $serviceWorker.registration;\n\t\t\t} else {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\t\tget updateAvailable(): boolean {\n\t\t\tconst $serviceWorker = get(store);\n\t\t\tif ($serviceWorker && 'updateAvailable' in $serviceWorker) {\n\t\t\t\treturn $serviceWorker.updateAvailable;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tregister,\n\t\tpingServideWorker,\n\t\tsendMessage,\n\t\tskipWaiting,\n\t\tskip,\n\t};\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function getParamsFromURL(url: string): {\n\tparams: Record<string, string>;\n\tpathname?: string;\n} {\n\tif (!url) {\n\t\treturn {params: {}, pathname: ''};\n\t}\n\tconst obj: Record<string, string> = {};\n\tconst hash = url.lastIndexOf('#');\n\n\tlet cleanedUrl = url;\n\tif (hash !== -1) {\n\t\tcleanedUrl = cleanedUrl.slice(0, hash);\n\t}\n\n\tconst question = cleanedUrl.indexOf('?');\n\tif (question !== -1) {\n\t\tcleanedUrl\n\t\t\t.slice(question + 1)\n\t\t\t.split('&')\n\t\t\t.forEach((piece) => {\n\t\t\t\tconst [key, val = ''] = piece.split('=');\n\t\t\t\tobj[decodeURIComponent(key)] =\n\t\t\t\t\tval === '' ? 'true' : decodeURIComponent(val);\n\t\t\t});\n\t}\n\n\tlet pathname = cleanedUrl.slice(0, question) || '';\n\tif (pathname && !pathname.endsWith('/')) {\n\t\tpathname += '/';\n\t}\n\treturn {params: obj, pathname};\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function getParamsFromLocation(): {\n\tparams: Record<string, string>;\n\tpathname?: string;\n} {\n\tif (typeof window === 'undefined') {\n\t\treturn {params: {}};\n\t}\n\treturn getParamsFromURL(window.location.href);\n}\n\nexport function getHashParamsFromLocation(\n\tstr?: string,\n): Record<string, string> {\n\tif (typeof window === 'undefined') {\n\t\treturn {};\n\t}\n\tconst url = str || window.location.hash;\n\tconst obj: Record<string, string> = {};\n\tconst hash = url.lastIndexOf('#');\n\n\tif (hash !== -1) {\n\t\turl\n\t\t\t.slice(hash + 1)\n\t\t\t.split('&')\n\t\t\t.forEach((piece) => {\n\t\t\t\tconst [key, val = ''] = piece.split('=');\n\t\t\t\tobj[decodeURIComponent(key)] = decodeURIComponent(val);\n\t\t\t});\n\t}\n\treturn obj;\n}\n\nexport function queryStringifyNoArray(query: Record<string, string>): string {\n\tlet str = '';\n\tfor (const key of Object.keys(query)) {\n\t\tconst value = query[key];\n\t\tstr += `${str === '' ? '?' : '&'}${key}=${value}`;\n\t}\n\treturn str;\n}\n\nexport function rebuildLocationHash(hashParams: Record<string, string>): void {\n\tif (typeof window === 'undefined') {\n\t\treturn;\n\t}\n\tlet reconstructedHash = '';\n\tObject.entries(hashParams).forEach((param) => {\n\t\tif (reconstructedHash === '') {\n\t\t\treconstructedHash += '#';\n\t\t} else {\n\t\t\treconstructedHash += '&';\n\t\t}\n\t\treconstructedHash += param.join('=');\n\t});\n\n\tif ('replaceState' in window.history) {\n\t\twindow.history.replaceState(\n\t\t\t'',\n\t\t\tdocument.title,\n\t\t\twindow.location.pathname + window.location.search + reconstructedHash,\n\t\t);\n\t} else {\n\t\t// Prevent scrolling by storing the page's current scroll offset\n\t\tconst {scrollTop, scrollLeft} = document.body;\n\t\twindow.location.hash = '';\n\n\t\t// Restore the scroll offset, should be flicker free\n\t\tdocument.body.scrollTop = scrollTop;\n\t\tdocument.body.scrollLeft = scrollLeft;\n\t}\n}\n\nasync function chrome76Detection(): Promise<boolean> {\n\tif ('storage' in navigator && 'estimate' in navigator.storage) {\n\t\tconst {quota} = await navigator.storage.estimate();\n\t\treturn quota !== undefined && quota < 120000000;\n\t}\n\treturn false;\n}\n\nfunction isNewChrome(): boolean {\n\tconst pieces = navigator.userAgent.match(\n\t\t/Chrom(?:e|ium)\\/([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)/,\n\t);\n\tif (pieces === null || pieces.length !== 5) {\n\t\treturn false;\n\t}\n\tconst major = pieces.map((piece) => parseInt(piece, 10))[1];\n\treturn major >= 76;\n}\n\nexport function isPrivateWindow(): Promise<boolean | null> {\n\treturn new Promise((resolve) => {\n\t\ttry {\n\t\t\tconst isSafari =\n\t\t\t\tnavigator.vendor &&\n\t\t\t\tnavigator.vendor.indexOf('Apple') > -1 &&\n\t\t\t\tnavigator.userAgent &&\n\t\t\t\tnavigator.userAgent.indexOf('CriOS') === -1 &&\n\t\t\t\tnavigator.userAgent.indexOf('FxiOS') === -1;\n\n\t\t\tif (isSafari) {\n\t\t\t\t// Safari\n\t\t\t\tlet e = false;\n\t\t\t\tif ((window as any).safariIncognito) {\n\t\t\t\t\te = true;\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t(window as any).openDatabase(null, null, null, null);\n\t\t\t\t\t\twindow.localStorage.setItem('test', '1');\n\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\te = true;\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\t!e && window.localStorage.removeItem('test');\n\t\t\t\t}\n\t\t\t} else if (navigator.userAgent.includes('Firefox')) {\n\t\t\t\t// Firefox\n\t\t\t\tconst db = indexedDB.open('test');\n\t\t\t\tdb.onerror = () => {\n\t\t\t\t\tresolve(true);\n\t\t\t\t};\n\t\t\t\tdb.onsuccess = () => {\n\t\t\t\t\tresolve(false);\n\t\t\t\t};\n\t\t\t} else if (\n\t\t\t\tnavigator.userAgent.includes('Edge') ||\n\t\t\t\tnavigator.userAgent.includes('Trident') ||\n\t\t\t\tnavigator.userAgent.includes('msie')\n\t\t\t) {\n\t\t\t\t// Edge or IE\n\t\t\t\tif (\n\t\t\t\t\t!window.indexedDB &&\n\t\t\t\t\t(window.PointerEvent || (window as any).MSPointerEvent)\n\t\t\t\t) {\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t\tresolve(false);\n\t\t\t} else {\n\t\t\t\t// Normally ORP or Chrome\n\t\t\t\tif (isNewChrome()) {\n\t\t\t\t\tresolve(chrome76Detection());\n\t\t\t\t}\n\n\t\t\t\tconst fs =\n\t\t\t\t\t(window as any).RequestFileSystem ||\n\t\t\t\t\t(window as any).webkitRequestFileSystem;\n\t\t\t\tif (!fs) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t} else {\n\t\t\t\t\tfs(\n\t\t\t\t\t\t(window as any).TEMPORARY,\n\t\t\t\t\t\t100,\n\t\t\t\t\t\t() => resolve(false),\n\t\t\t\t\t\t() => resolve(true),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(err);\n\t\t\tresolve(null);\n\t\t}\n\t});\n}\n","import {version} from '$app/environment';\nimport {createServiceWorker} from './service-worker';\nimport {\n\tgetHashParamsFromLocation,\n\tgetParamsFromLocation,\n} from './utils/web/url';\n\nexport const serviceWorker = createServiceWorker();\n\nexport const hashParams = getHashParamsFromLocation();\nexport const {params} = getParamsFromLocation();\n\nexport const globalQueryParams = [\n\t'debug',\n\t'debugLevel',\n\t'traceLevel',\n\t'debugLabel',\n\t'eruda',\n];\n\nconsole.log(`VERSION: ${version}`);\n"],"names":["index","_","i","pause_effects","state","to_destroy","controlled_anchor","transitions","length","group","remaining","effect","pause_effect","groups","destroy_effects","array_from","fast_path","anchor","parent_node","clear_text_content","remove_dom","preserved_effects","keys","key","e","EFFECT_OFFSCREEN","fragment","move_effect","destroy_effect","offscreen_anchor","each","node","flags","get_collection","get_key","render_fn","fallback_fn","items","is_controlled","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","each_array","derived_safe_equal","collection","is_array","array","pending","first_run","commit","batch","DESTROYED","reconcile","resume_effect","move","discard","block","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","skip_nodes","set_hydrating","current_batch","defer","should_defer_append","hydrate_node","COMMENT_NODE","HYDRATION_END","value","item","internal_set","create_item","branch","e.each_key_duplicate","skip_to_branch","BRANCH_EFFECT","is_animated","EACH_IS_ANIMATED","current","seen","prev","to_animate","matched","stashed","INERT","next","link","start","j","a","b","destroy_length","queue_micro_task","v","EACH_ITEM_REACTIVE","EACH_ITEM_IMMUTABLE","mutable_source","source","EACH_INDEX_REACTIVE","end","dest","next_node","get_next_sibling","IS_CUSTOM_ELEMENT","IS_HTML","LINK_TAG","IS_XHTML","PROGRESS_TAG","remove_input_defaults","input","already_removed","remove_defaults","set_attribute","checked","FORM_RESET_HANDLER","add_form_reset_listener","set_value","element","attributes","get_attributes","set_checked","attribute","skip_warning","LOADING_ATTR_SYMBOL","get_setters","ATTRIBUTES_CACHE","NAMESPACE_HTML","setters_cache","cache_key","setters","descriptors","proto","element_proto","get_descriptors","get_prototype_of","pathname_prefix","resolve","args","base","resolve_route","noop","noopLogger","_getFactory","logs","o","n","r","handleAutomaticUpdate","registration","intervals","lastFocusTime","wakeup","evt","timePassed","listenForWaitingServiceWorker","callback","awaitStateChange","createNotificationsService","lastId","store","writable","add","notification","notifications","remove","id","onClick","pushState","page","logger","updateLoggingForWorker","worker","IDLE_DELAY_MS","CHECK_DELAY_MS","createServiceWorker","pingServideWorker","sendMessage","message","$serviceWorker","skipWaiting","skip","register","refreshing","event","swLocation","getParamsFromURL","url","obj","hash","cleanedUrl","question","piece","val","pathname","getParamsFromLocation","getHashParamsFromLocation","str","serviceWorker","params","version"],"mappings":"uhBAsDO,SAASA,GAAMC,EAAGC,EAAG,CAC3B,OAAOA,CACR,CASA,SAASC,GAAcC,EAAOC,EAAYC,EAAmB,CAS5D,QAPIC,EAAc,CAAA,EACdC,EAASH,EAAW,OAGpBI,EACAC,EAAYL,EAAW,OAElBH,EAAI,EAAGA,EAAIM,EAAQN,IAAK,CAChC,IAAIS,EAASN,EAAWH,CAAC,EAEzBU,GACCD,EACA,IAAM,CACL,GAAIF,GAIH,GAHAA,EAAM,QAAQ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E,EAAID,EAAM,MAAM,GAAG,EACvCJ,EAAI,mBAAmB1K,CAAG,CAAC,EAAI,mBAAmB+K,CAAG,CACtD,CAAC,EAEIL,CACR,CC3DO,MAAMU,GAAgBvB,GAAA,EAEHqB,GAAA,EACnB,KAAM,CAAC,OAAAG,EAAA,EAAUJ,GAAA,EAUxB,QAAQ,IAAI,YAAYK,EAAO,EAAE","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"C-wUsEAZ.js","sources":["../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/blocks/each.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/elements/attributes.js","../../../../../../../node_modules/.pnpm/@sveltejs+kit@2.60.1_@opentelemetry+api@1.9.0_@sveltejs+vite-plugin-svelte@6.2.4_svelte_92561c5307f67095f16bb8153283369b/node_modules/@sveltejs/kit/src/runtime/app/paths/client.js","../../../../../../../node_modules/.pnpm/named-logs@0.4.1/node_modules/named-logs/dist/esm/index.js","../../../../../../src/lib/core/service-worker/utils.ts","../../../../../../src/lib/core/notifications/index.ts","../../../../../../src/lib/core/service-worker/index.ts","../../../../../../src/lib/core/utils/web/url.ts","../../../../../../src/lib/core/config.ts"],"sourcesContent":["/** @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';\nimport { tag } from '../../dev/tracing.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\tif (DEV) {\n\t\ttag(each_array, '{#each ...}');\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 { 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 {\n\tATTRIBUTES_CACHE,\n\tFORM_RESET_HANDLER,\n\tIS_XHTML,\n\tLOADING_ATTR_SYMBOL\n} 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/** @type {any} */ (input)[FORM_RESET_HANDLER] = 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/** @type {any} */ (element)[ATTRIBUTES_CACHE] ??= {\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 (and dangerous, like innerHTML) setters we're not interested in\n\t// Do not use constructor.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 (\n\t\t\t\tdescriptors[key].set &&\n\t\t\t\t// better safe than sorry, we don't want spread attributes to mess with HTML content\n\t\t\t\tkey !== 'innerHTML' &&\n\t\t\t\tkey !== 'textContent' &&\n\t\t\t\tkey !== 'innerText'\n\t\t\t) {\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 { Asset, RouteId, RouteIdWithSearchOrHash, Pathname, PathnameWithSearchOrHash, ResolvedPathname } from '$app/types' */\n/** @import { ResolveArgs } from './types.js' */\nimport { base, assets, hash_routing } from './internal/client.js';\nimport { resolve_route } from '../../../utils/routing.js';\nimport { get_navigation_intent } from '../../client/client.js';\n\n/**\n * Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.\n *\n * During server rendering, the base path is relative and depends on the page currently being rendered.\n *\n * @example\n * ```svelte\n * <script>\n * \timport { asset } from '$app/paths';\n * </script>\n *\n * <img alt=\"a potato\" src={asset('/potato.jpg')} />\n * ```\n * @since 2.26\n *\n * @param {Asset} file\n * @returns {string}\n */\nexport function asset(file) {\n\treturn (assets || base) + file;\n}\n\nconst pathname_prefix = hash_routing ? '#' : '';\n\n/**\n * Resolve a pathname by prefixing it with the base path, if any, or resolve a route ID by populating dynamic segments with parameters.\n *\n * During server rendering, the base path is relative and depends on the page currently being rendered.\n *\n * @example\n * ```js\n * import { resolve } from '$app/paths';\n *\n * // using a pathname\n * const resolved = resolve(`/blog/hello-world`);\n *\n * // using a route ID plus parameters\n * const resolved = resolve('/blog/[slug]', {\n * \tslug: 'hello-world'\n * });\n * ```\n * @since 2.26\n *\n * @template {RouteIdWithSearchOrHash | PathnameWithSearchOrHash} T\n * @param {ResolveArgs<T>} args\n * @returns {ResolvedPathname}\n */\nexport function resolve(...args) {\n\tif (!args[0].startsWith('/')) {\n\t\tthrow new Error(\n\t\t\t`Cannot use \\`resolve(...)\\` with a non-absolute pathname or route ID (got \"${args[0]}\"). ` +\n\t\t\t\t'`resolve` is only for internal pathnames and route IDs; external URLs should be used directly.'\n\t\t);\n\t}\n\n\t// The type error is correct here, and if someone doesn't pass params when they should there's a runtime error,\n\t// but we don't want to adjust the internal resolve_route function to accept `undefined`, hence the type cast.\n\treturn (\n\t\tbase + pathname_prefix + resolve_route(args[0], /** @type {Record<string, string>} */ (args[1]))\n\t);\n}\n\n/**\n * Match a path or URL to a route ID and extracts any parameters.\n *\n * @example\n * ```js\n * import { match } from '$app/paths';\n *\n * const route = await match('/blog/hello-world');\n *\n * if (route?.id === '/blog/[slug]') {\n * \tconst slug = route.params.slug;\n * \tconst response = await fetch(`/api/posts/${slug}`);\n * \tconst post = await response.json();\n * }\n * ```\n * @since 2.52.0\n *\n * @param {Pathname | URL | (string & {})} url\n * @returns {Promise<{ id: RouteId, params: Record<string, string> } | null>}\n */\nexport async function match(url) {\n\tif (typeof url === 'string') {\n\t\turl = new URL(url, location.href);\n\t}\n\n\tconst intent = await get_navigation_intent(url, false);\n\n\tif (intent) {\n\t\treturn {\n\t\t\tid: /** @type {RouteId} */ (intent.route.id),\n\t\t\tparams: intent.params\n\t\t};\n\t}\n\n\treturn null;\n}\n\nexport { base, assets, resolve as resolveRoute };\n","const noop=()=>{},noopLogger={assert:noop,error:noop,warn:noop,info:noop,log:noop,debug:noop,dir:noop,table:noop,trace:noop,write:noop,time:noop,timeEnd:noop,timeLog:noop};let _factory;export function hook(o){\"undefined\"!=typeof globalThis&&(globalThis._logFactory=o),_factory=o}const fallbackFactory=o=>{let n;return new Proxy({},{get(r,t,e){if(n)return n[t];const l=_getFactory();return l?(n=l(o),n[t]):noop}})};function _getFactory(){return _factory||(null===globalThis||void 0===globalThis?void 0:globalThis._logFactory)}export function logs(o,n){const r=_getFactory();return r?r(o,{decoration:null==n?void 0:n.decoration}):(null==n?void 0:n.fallbackOnProxy)?\"boolean\"==typeof n.fallbackOnProxy?n.fallbackOnProxy?fallbackFactory(o):noopLogger:\"string\"==typeof n.fallbackOnProxy&&\"undefined\"!=typeof process&&(null===process||void 0===process?void 0:process.env[n.fallbackOnProxy])?fallbackFactory(o):noopLogger:noopLogger}","export function handleAutomaticUpdate(\n\tregistration: ServiceWorkerRegistration,\n\tintervals: {idle: number; checks: number},\n): NodeJS.Timeout {\n\tlet lastFocusTime = performance.now();\n\tfunction wakeup(evt?: Event) {\n\t\tconst timePassed = performance.now();\n\t\tif (timePassed - lastFocusTime > intervals.idle) {\n\t\t\tregistration.update();\n\t\t}\n\t\t// we reset the time each time we wake up\n\t\t// the idea here is that we do not want to bother users while they are actively using the app\n\t\tlastFocusTime = timePassed;\n\t}\n\t['focus', 'pointerdown'].forEach((evt) =>\n\t\twindow.addEventListener(evt, wakeup),\n\t);\n\n\t// Installed-PWA update trigger.\n\t// An installed PWA is a SPA (hash/client-side routing) and almost never\n\t// issues a `mode: 'navigate'` request, so the service worker's\n\t// \"skipWaiting on navigate\" trick (see src/service-worker/index.ts) never\n\t// fires and a waiting worker is never surfaced. The idle-gated `wakeup`\n\t// above also rarely passes right after a relaunch, so the update banner\n\t// never appears. Force an explicit update check on launch and every time\n\t// the app becomes visible (relaunch / tab re-show) so the manual update\n\t// popup can actually be shown.\n\tdocument.addEventListener('visibilitychange', () => {\n\t\tif (document.visibilityState === 'visible') {\n\t\t\tregistration.update();\n\t\t}\n\t});\n\t// also check immediately on registration\n\tregistration.update();\n\n\t// but we still do not an update every so often\n\t// TODO improve upon this\n\treturn setInterval(() => registration.update(), intervals.checks);\n}\n\n// taken from: https://stackoverflow.com/a/50535316\nexport function listenForWaitingServiceWorker(\n\tregistration: ServiceWorkerRegistration,\n\tcallback: (reg: ServiceWorkerRegistration) => void,\n) {\n\tfunction awaitStateChange() {\n\t\tif (registration.installing) {\n\t\t\tregistration.installing.addEventListener('statechange', function () {\n\t\t\t\tif (this.state === 'installed') callback(registration);\n\t\t\t});\n\t\t}\n\t}\n\tif (!registration) {\n\t\treturn;\n\t}\n\tif (registration.waiting) {\n\t\treturn callback(registration);\n\t}\n\tif (registration.installing) {\n\t\tawaitStateChange();\n\t} else {\n\t\tregistration.addEventListener('updatefound', awaitStateChange);\n\t}\n}\n","import {pushState} from '$app/navigation';\nimport {page} from '$app/state';\nimport {get, writable} from 'svelte/store';\ntype JSONNotification = {\n\ttitle: string;\n\toptions: NotificationOptions;\n};\n\nexport type PushNotification = {\n\ttype: 'push-notification';\n\tdata: JSONNotification;\n};\nexport type NotificationToAdd = PushNotification;\n\nexport type Notification = NotificationToAdd & {id: number};\n\nexport function createNotificationsService() {\n\tlet lastId = 1;\n\tconst store = writable<Notification[]>([]);\n\n\tfunction add(notification: NotificationToAdd) {\n\t\tstore.update((notifications) => [\n\t\t\t...notifications,\n\t\t\t{...notification, id: ++lastId},\n\t\t]);\n\t}\n\n\tfunction remove(id: number) {\n\t\tstore.update((notifications) =>\n\t\t\tnotifications.filter((notification) => notification.id !== id),\n\t\t);\n\t}\n\n\tfunction onClick(id: number) {\n\t\tconst notification = get(store).find((v) => v.id == id);\n\t\tremove(id);\n\t\tif (notification?.type === 'push-notification') {\n\t\t\tif (notification.data.options.data?.navigate) {\n\t\t\t\tpushState(notification.data.options.data.navigate, page.state);\n\t\t\t}\n\t\t}\n\t}\n\treturn {subscribe: store.subscribe, add, remove, onClick};\n}\n\nexport const notifications = createNotificationsService();\n","import {dev} from '$app/environment';\nimport {get, writable} from 'svelte/store';\nimport type {Logger} from 'named-logs';\nimport {logs} from 'named-logs';\nimport {handleAutomaticUpdate, listenForWaitingServiceWorker} from './utils';\nimport {notifications} from '$lib/core/notifications';\nimport {resolve} from '$app/paths';\n\nconst logger = logs('service-worker') as Logger & {\n\tlevel: number;\n\tenabled: boolean;\n};\n\nfunction updateLoggingForWorker(worker: ServiceWorker | null) {\n\tif (worker) {\n\t\tif (logger.enabled) {\n\t\t\tlogger.debug(\n\t\t\t\t`enabling logging for service worker, level: ${logger.level}`,\n\t\t\t);\n\t\t} else {\n\t\t\tlogger.debug(\n\t\t\t\t`disabling logging for service worker, level: ${logger.level}`,\n\t\t\t);\n\t\t}\n\t\tworker.postMessage({\n\t\t\ttype: 'debug',\n\t\t\tlevel: logger.level,\n\t\t\tenabled: logger.enabled,\n\t\t});\n\t}\n}\n\nconst IDLE_DELAY_MS = 3 * 60 * 1000;\nconst CHECK_DELAY_MS = 30 * 60 * 1000;\n\nexport type ServiceWorkerState =\n\t| undefined\n\t| {\n\t\t\tnotSupported: true;\n\t }\n\t| {\n\t\t\tnotSupported: false;\n\t\t\tregistering: true;\n\t }\n\t| {\n\t\t\tnotSupported: false;\n\t\t\tregistering: false;\n\t\t\terror: {message: string; cause: any};\n\t\t\tregistration: undefined;\n\t\t\tupdateAvailable: false;\n\t }\n\t| {\n\t\t\tregistration?: ServiceWorkerRegistration;\n\t\t\tupdateAvailable: boolean;\n\t\t\tnotSupported: false;\n\t\t\tregistering: false;\n\t };\n\nexport function createServiceWorker() {\n\tconst store = writable<ServiceWorkerState>(undefined);\n\n\tfunction pingServideWorker(\n\t\tstate: 'installing' | 'waiting' | 'active' = 'active',\n\t) {\n\t\tsendMessage(\n\t\t\t{\n\t\t\t\ttype: 'ping',\n\t\t\t},\n\t\t\tstate,\n\t\t);\n\t}\n\n\tfunction sendMessage(\n\t\tmessage: string | object,\n\t\tstate: 'installing' | 'waiting' | 'active' = 'active',\n\t) {\n\t\tconst $serviceWorker = get(store);\n\t\tif (!$serviceWorker) {\n\t\t\tthrow new Error(`not loaded`);\n\t\t}\n\t\tif ($serviceWorker.notSupported) {\n\t\t\tthrow new Error(`not supported`);\n\t\t}\n\t\tif ($serviceWorker.registering) {\n\t\t\tthrow new Error(`is registering...`);\n\t\t}\n\t\tconst registration = $serviceWorker.registration;\n\t\tif (!registration) {\n\t\t\tthrow new Error(`no registration`);\n\t\t}\n\t\tif (!registration[state]) {\n\t\t\tthrow new Error(`no registration in state: ${state}`);\n\t\t}\n\t\tregistration[state].postMessage(message);\n\t}\n\n\tfunction skipWaiting() {\n\t\tlogger.log(`accepting update...`);\n\t\tconst $serviceWorker = get(store);\n\t\tif (!$serviceWorker) {\n\t\t\tthrow new Error(`not loaded`);\n\t\t}\n\t\tif ($serviceWorker.notSupported) {\n\t\t\tthrow new Error(`not supported`);\n\t\t}\n\t\tif ($serviceWorker.registering) {\n\t\t\tthrow new Error(`is registering...`);\n\t\t}\n\t\tif ($serviceWorker.updateAvailable && $serviceWorker.registration) {\n\t\t\tconst registration = $serviceWorker.registration;\n\t\t\tif (!registration) {\n\t\t\t\tthrow new Error(`no registration`);\n\t\t\t}\n\n\t\t\tif (registration.waiting) {\n\t\t\t\tlogger.log(`was waiting, skipping...`);\n\t\t\t\tregistration.waiting.postMessage('skipWaiting');\n\t\t\t} else {\n\t\t\t\tlogger.log(`was not waiting, should we reload?`);\n\t\t\t\tlogger.error(`not waiting..., todo reload?`);\n\t\t\t\t// window.location.reload();\n\t\t\t}\n\n\t\t\tif (!dev) {\n\t\t\t\tlogger.log(`update store`);\n\t\t\t\tstore.set({\n\t\t\t\t\tnotSupported: false,\n\t\t\t\t\tupdateAvailable: false,\n\t\t\t\t\tregistration: $serviceWorker.registration,\n\t\t\t\t\tregistering: $serviceWorker.registering,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction skip() {\n\t\tconst $serviceWorker = get(store);\n\t\tif (!$serviceWorker) {\n\t\t\tthrow new Error(`not loaded`);\n\t\t}\n\t\tif ($serviceWorker.notSupported) {\n\t\t\tthrow new Error(`not supported`);\n\t\t}\n\t\tif ($serviceWorker.registering) {\n\t\t\tthrow new Error(`is registering...`);\n\t\t}\n\t\tstore.set({\n\t\t\tnotSupported: false,\n\t\t\tupdateAvailable: false,\n\t\t\tregistration: $serviceWorker.registration,\n\t\t\tregistering: $serviceWorker.registering,\n\t\t});\n\t}\n\n\tfunction register() {\n\t\tif (typeof navigator !== 'undefined' && 'serviceWorker' in navigator) {\n\t\t\tstore.set({notSupported: false, registering: true});\n\n\t\t\t// ------------------------------------------------------------------------------------------------\n\t\t\t// FORCE RELOAD ON CONTROLLER CHANGE\n\t\t\t// ------------------------------------------------------------------------------------------------\n\t\t\tlet refreshing = false;\n\t\t\tnavigator.serviceWorker.addEventListener('controllerchange', () => {\n\t\t\t\tif (refreshing) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\trefreshing = true;\n\t\t\t\twindow.location.reload();\n\t\t\t});\n\t\t\t// ------------------------------------------------------------------------------------------------\n\n\t\t\t//listen to messages\n\t\t\tnavigator.serviceWorker.onmessage = (event) => {\n\t\t\t\tif (event.data && event.data.type === 'notification') {\n\t\t\t\t\tconsole.log(event);\n\t\t\t\t\tnotifications.add({\n\t\t\t\t\t\ttype: 'push-notification',\n\t\t\t\t\t\tdata: event.data.notification,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst swLocation = resolve<any>(`/service-worker.js`);\n\t\t\t//{scope: `${base}/`}\n\t\t\tnavigator.serviceWorker\n\t\t\t\t.register(swLocation, {\n\t\t\t\t\ttype: dev ? 'module' : 'classic',\n\t\t\t\t})\n\t\t\t\t.then((registration) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandleAutomaticUpdate(registration, {\n\t\t\t\t\t\t\tidle: IDLE_DELAY_MS,\n\t\t\t\t\t\t\tchecks: CHECK_DELAY_MS,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (e) {}\n\n\t\t\t\t\tstore.set({\n\t\t\t\t\t\tnotSupported: false,\n\t\t\t\t\t\tupdateAvailable: false,\n\t\t\t\t\t\tregistration: registration,\n\t\t\t\t\t\tregistering: false,\n\t\t\t\t\t});\n\t\t\t\t\tupdateLoggingForWorker(registration.installing);\n\t\t\t\t\tupdateLoggingForWorker(registration.waiting);\n\t\t\t\t\tupdateLoggingForWorker(registration.active);\n\t\t\t\t\tlistenForWaitingServiceWorker(registration, () => {\n\t\t\t\t\t\tstore.set({\n\t\t\t\t\t\t\tnotSupported: false,\n\t\t\t\t\t\t\tupdateAvailable: true,\n\t\t\t\t\t\t\tregistration: registration,\n\t\t\t\t\t\t\tregistering: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tconsole.error(e);\n\t\t\t\t\tstore.set({\n\t\t\t\t\t\tregistering: false,\n\t\t\t\t\t\tnotSupported: false,\n\t\t\t\t\t\tupdateAvailable: false,\n\t\t\t\t\t\tregistration: undefined,\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\tmessage: `failed to register service-worker`,\n\t\t\t\t\t\t\tcause: e.message || e,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t\tlogger.error('Failed to register service worker', e);\n\t\t\t\t});\n\t\t} else {\n\t\t\tif (typeof window !== 'undefined') {\n\t\t\t\tstore.set({notSupported: true});\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tsubscribe: store.subscribe,\n\t\tset: store.set, // TODO remove and move handler logic in here\n\t\tget registration(): ServiceWorkerRegistration | undefined {\n\t\t\tconst $serviceWorker = get(store);\n\t\t\tif ($serviceWorker && 'registration' in $serviceWorker) {\n\t\t\t\treturn $serviceWorker.registration;\n\t\t\t} else {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\t\tget updateAvailable(): boolean {\n\t\t\tconst $serviceWorker = get(store);\n\t\t\tif ($serviceWorker && 'updateAvailable' in $serviceWorker) {\n\t\t\t\treturn $serviceWorker.updateAvailable;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tregister,\n\t\tpingServideWorker,\n\t\tsendMessage,\n\t\tskipWaiting,\n\t\tskip,\n\t};\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function getParamsFromURL(url: string): {\n\tparams: Record<string, string>;\n\tpathname?: string;\n} {\n\tif (!url) {\n\t\treturn {params: {}, pathname: ''};\n\t}\n\tconst obj: Record<string, string> = {};\n\tconst hash = url.lastIndexOf('#');\n\n\tlet cleanedUrl = url;\n\tif (hash !== -1) {\n\t\tcleanedUrl = cleanedUrl.slice(0, hash);\n\t}\n\n\tconst question = cleanedUrl.indexOf('?');\n\tif (question !== -1) {\n\t\tcleanedUrl\n\t\t\t.slice(question + 1)\n\t\t\t.split('&')\n\t\t\t.forEach((piece) => {\n\t\t\t\tconst [key, val = ''] = piece.split('=');\n\t\t\t\tobj[decodeURIComponent(key)] =\n\t\t\t\t\tval === '' ? 'true' : decodeURIComponent(val);\n\t\t\t});\n\t}\n\n\tlet pathname = cleanedUrl.slice(0, question) || '';\n\tif (pathname && !pathname.endsWith('/')) {\n\t\tpathname += '/';\n\t}\n\treturn {params: obj, pathname};\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function getParamsFromLocation(): {\n\tparams: Record<string, string>;\n\tpathname?: string;\n} {\n\tif (typeof window === 'undefined') {\n\t\treturn {params: {}};\n\t}\n\treturn getParamsFromURL(window.location.href);\n}\n\nexport function getHashParamsFromLocation(\n\tstr?: string,\n): Record<string, string> {\n\tif (typeof window === 'undefined') {\n\t\treturn {};\n\t}\n\tconst url = str || window.location.hash;\n\tconst obj: Record<string, string> = {};\n\tconst hash = url.lastIndexOf('#');\n\n\tif (hash !== -1) {\n\t\turl\n\t\t\t.slice(hash + 1)\n\t\t\t.split('&')\n\t\t\t.forEach((piece) => {\n\t\t\t\tconst [key, val = ''] = piece.split('=');\n\t\t\t\tobj[decodeURIComponent(key)] = decodeURIComponent(val);\n\t\t\t});\n\t}\n\treturn obj;\n}\n\nexport function queryStringifyNoArray(query: Record<string, string>): string {\n\tlet str = '';\n\tfor (const key of Object.keys(query)) {\n\t\tconst value = query[key];\n\t\tstr += `${str === '' ? '?' : '&'}${key}=${value}`;\n\t}\n\treturn str;\n}\n\nexport function rebuildLocationHash(hashParams: Record<string, string>): void {\n\tif (typeof window === 'undefined') {\n\t\treturn;\n\t}\n\tlet reconstructedHash = '';\n\tObject.entries(hashParams).forEach((param) => {\n\t\tif (reconstructedHash === '') {\n\t\t\treconstructedHash += '#';\n\t\t} else {\n\t\t\treconstructedHash += '&';\n\t\t}\n\t\treconstructedHash += param.join('=');\n\t});\n\n\tif ('replaceState' in window.history) {\n\t\twindow.history.replaceState(\n\t\t\t'',\n\t\t\tdocument.title,\n\t\t\twindow.location.pathname + window.location.search + reconstructedHash,\n\t\t);\n\t} else {\n\t\t// Prevent scrolling by storing the page's current scroll offset\n\t\tconst {scrollTop, scrollLeft} = document.body;\n\t\twindow.location.hash = '';\n\n\t\t// Restore the scroll offset, should be flicker free\n\t\tdocument.body.scrollTop = scrollTop;\n\t\tdocument.body.scrollLeft = scrollLeft;\n\t}\n}\n\nasync function chrome76Detection(): Promise<boolean> {\n\tif ('storage' in navigator && 'estimate' in navigator.storage) {\n\t\tconst {quota} = await navigator.storage.estimate();\n\t\treturn quota !== undefined && quota < 120000000;\n\t}\n\treturn false;\n}\n\nfunction isNewChrome(): boolean {\n\tconst pieces = navigator.userAgent.match(\n\t\t/Chrom(?:e|ium)\\/([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)/,\n\t);\n\tif (pieces === null || pieces.length !== 5) {\n\t\treturn false;\n\t}\n\tconst major = pieces.map((piece) => parseInt(piece, 10))[1];\n\treturn major >= 76;\n}\n\nexport function isPrivateWindow(): Promise<boolean | null> {\n\treturn new Promise((resolve) => {\n\t\ttry {\n\t\t\tconst isSafari =\n\t\t\t\tnavigator.vendor &&\n\t\t\t\tnavigator.vendor.indexOf('Apple') > -1 &&\n\t\t\t\tnavigator.userAgent &&\n\t\t\t\tnavigator.userAgent.indexOf('CriOS') === -1 &&\n\t\t\t\tnavigator.userAgent.indexOf('FxiOS') === -1;\n\n\t\t\tif (isSafari) {\n\t\t\t\t// Safari\n\t\t\t\tlet e = false;\n\t\t\t\tif ((window as any).safariIncognito) {\n\t\t\t\t\te = true;\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t(window as any).openDatabase(null, null, null, null);\n\t\t\t\t\t\twindow.localStorage.setItem('test', '1');\n\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\te = true;\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\t!e && window.localStorage.removeItem('test');\n\t\t\t\t}\n\t\t\t} else if (navigator.userAgent.includes('Firefox')) {\n\t\t\t\t// Firefox\n\t\t\t\tconst db = indexedDB.open('test');\n\t\t\t\tdb.onerror = () => {\n\t\t\t\t\tresolve(true);\n\t\t\t\t};\n\t\t\t\tdb.onsuccess = () => {\n\t\t\t\t\tresolve(false);\n\t\t\t\t};\n\t\t\t} else if (\n\t\t\t\tnavigator.userAgent.includes('Edge') ||\n\t\t\t\tnavigator.userAgent.includes('Trident') ||\n\t\t\t\tnavigator.userAgent.includes('msie')\n\t\t\t) {\n\t\t\t\t// Edge or IE\n\t\t\t\tif (\n\t\t\t\t\t!window.indexedDB &&\n\t\t\t\t\t(window.PointerEvent || (window as any).MSPointerEvent)\n\t\t\t\t) {\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t\tresolve(false);\n\t\t\t} else {\n\t\t\t\t// Normally ORP or Chrome\n\t\t\t\tif (isNewChrome()) {\n\t\t\t\t\tresolve(chrome76Detection());\n\t\t\t\t}\n\n\t\t\t\tconst fs =\n\t\t\t\t\t(window as any).RequestFileSystem ||\n\t\t\t\t\t(window as any).webkitRequestFileSystem;\n\t\t\t\tif (!fs) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t} else {\n\t\t\t\t\tfs(\n\t\t\t\t\t\t(window as any).TEMPORARY,\n\t\t\t\t\t\t100,\n\t\t\t\t\t\t() => resolve(false),\n\t\t\t\t\t\t() => resolve(true),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(err);\n\t\t\tresolve(null);\n\t\t}\n\t});\n}\n","import {version} from '$app/environment';\nimport {createServiceWorker} from './service-worker';\nimport {\n\tgetHashParamsFromLocation,\n\tgetParamsFromLocation,\n} from './utils/web/url';\n\nexport const serviceWorker = createServiceWorker();\n\nexport const hashParams = getHashParamsFromLocation();\nexport const {params} = getParamsFromLocation();\n\nexport const globalQueryParams = [\n\t'debug',\n\t'debugLevel',\n\t'traceLevel',\n\t'debugLabel',\n\t'eruda',\n];\n\nconsole.log(`VERSION: ${version}`);\n"],"names":["index","_","i","pause_effects","state","to_destroy","controlled_anchor","transitions","length","group","remaining","effect","pause_effect","groups","destroy_effects","array_from","fast_path","anchor","parent_node","clear_text_content","remove_dom","preserved_effects","keys","key","e","EFFECT_OFFSCREEN","fragment","move_effect","destroy_effect","offscreen_anchor","each","node","flags","get_collection","get_key","render_fn","fallback_fn","items","is_controlled","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","each_array","derived_safe_equal","collection","is_array","array","pending","first_run","commit","batch","DESTROYED","reconcile","resume_effect","move","discard","block","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","skip_nodes","set_hydrating","current_batch","defer","should_defer_append","hydrate_node","COMMENT_NODE","HYDRATION_END","value","item","internal_set","create_item","branch","e.each_key_duplicate","skip_to_branch","BRANCH_EFFECT","is_animated","EACH_IS_ANIMATED","current","seen","prev","to_animate","matched","stashed","INERT","next","link","start","j","a","b","destroy_length","queue_micro_task","v","EACH_ITEM_REACTIVE","EACH_ITEM_IMMUTABLE","mutable_source","source","EACH_INDEX_REACTIVE","end","dest","next_node","get_next_sibling","IS_CUSTOM_ELEMENT","IS_HTML","LINK_TAG","IS_XHTML","PROGRESS_TAG","remove_input_defaults","input","already_removed","remove_defaults","set_attribute","checked","FORM_RESET_HANDLER","add_form_reset_listener","set_value","element","attributes","get_attributes","set_checked","attribute","skip_warning","LOADING_ATTR_SYMBOL","get_setters","ATTRIBUTES_CACHE","NAMESPACE_HTML","setters_cache","cache_key","setters","descriptors","proto","element_proto","get_descriptors","get_prototype_of","pathname_prefix","resolve","args","base","resolve_route","noop","noopLogger","_getFactory","logs","o","n","r","handleAutomaticUpdate","registration","intervals","lastFocusTime","wakeup","evt","timePassed","listenForWaitingServiceWorker","callback","awaitStateChange","createNotificationsService","lastId","store","writable","add","notification","notifications","remove","id","onClick","pushState","page","logger","updateLoggingForWorker","worker","IDLE_DELAY_MS","CHECK_DELAY_MS","createServiceWorker","pingServideWorker","sendMessage","message","$serviceWorker","skipWaiting","skip","register","refreshing","event","swLocation","getParamsFromURL","url","obj","hash","cleanedUrl","question","piece","val","pathname","getParamsFromLocation","getHashParamsFromLocation","str","serviceWorker","params","version"],"mappings":"uhBAsDO,SAASA,GAAMC,EAAGC,EAAG,CAC3B,OAAOA,CACR,CASA,SAASC,GAAcC,EAAOC,EAAYC,EAAmB,CAS5D,QAPIC,EAAc,CAAA,EACdC,EAASH,EAAW,OAGpBI,EACAC,EAAYL,EAAW,OAElBH,EAAI,EAAGA,EAAIM,EAAQN,IAAK,CAChC,IAAIS,EAASN,EAAWH,CAAC,EAEzBU,GACCD,EACA,IAAM,CACL,GAAIF,GAIH,GAHAA,EAAM,QAAQ,OAAOE,CAAM,EAC3BF,EAAM,KAAK,IAAIE,CAAM,EAEjBF,EAAM,QAAQ,OAAS,EAAG,CAC7B,IAAII,EAA6CT,EAAM,YAEvDU,EAAgBV,EAAOW,EAAWN,EAAM,IAAI,CAAC,EAC7CI,EAAO,OAAOJ,CAAK,EAEfI,EAAO,OAAS,IACnBT,EAAM,YAAc,KAEtB,OAEAM,GAAa,CAEf,EACA,EACH,CACC,CAEA,GAAIA,IAAc,EAAG,CAIpB,IAAIM,EAAYT,EAAY,SAAW,GAAKD,IAAsB,KAElE,GAAIU,EAAW,CACd,IAAIC,EAAiCX,EACjCY,EAAsCD,EAAO,WAEjDE,GAAmBD,CAAW,EAC9BA,EAAY,OAAOD,CAAM,EAEzBb,EAAM,MAAM,MAAK,CAClB,CAEAU,EAAgBV,EAAOC,EAAY,CAACW,CAAS,CAC9C,MACCP,EAAQ,CACP,QAAS,IAAI,IAAIJ,CAAU,EAC3B,KAAM,IAAI,GACb,GAEGD,EAAM,cAAgB,IAAI,KAAO,IAAIK,CAAK,CAE7C,CAOA,SAASK,EAAgBV,EAAOC,EAAYe,EAAa,GAAM,CAE9D,IAAIC,EAGJ,GAAIjB,EAAM,QAA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AQ,GAAK,GAChD,OAAIG,GAAY,CAACA,EAAS,SAAS,GAAG,IACrCA,GAAY,KAEN,CAAC,OAAQN,EAAK,SAAAM,CAAA,CACtB,CAGO,SAASC,IAGd,CACD,OAAI,OAAO,OAAW,IACd,CAAC,OAAQ,EAAC,EAEXT,GAAiB,OAAO,SAAS,IAAI,CAC7C,CAEO,SAASU,GACfC,EACyB,CACzB,GAAI,OAAO,OAAW,IACrB,MAAO,CAAA,EAER,MAAMV,EAAa,OAAO,SAAS,KAC7BC,EAA8B,CAAA,EAC9BC,EAAOF,EAAI,YAAY,GAAG,EAEhC,OAAIE,IAAS,IACZF,EACE,MAAME,EAAO,CAAC,EACd,MAAM,GAAG,EACT,QAASG,GAAU,CACnB,KAAM,CAAC9K,EAAK+K,EAAM,EAAE,EAAID,EAAM,MAAM,GAAG,EACvCJ,EAAI,mBAAmB1K,CAAG,CAAC,EAAI,mBAAmB+K,CAAG,CACtD,CAAC,EAEIL,CACR,CC3DO,MAAMU,GAAgBvB,GAAA,EAEHqB,GAAA,EACnB,KAAM,CAAC,OAAAG,EAAA,EAAUJ,GAAA,EAUxB,QAAQ,IAAI,YAAYK,EAAO,EAAE","x_google_ignoreList":[0,1,2,3]}
@@ -1,2 +1,2 @@
1
- import{Z as E,ac as S,aU as y,bg as b,M as g,e as k,S as P}from"./CEg8tgYI.js";function w(n,s){return n===s||n?.[P]===s}function R(n={},s,i,p){var u=E.r,d=g;return S(()=>{var r,e;return y(()=>{r=e,e=[],b(()=>{w(i(...e),n)||(s(n,...e),r&&w(i(...r),n)&&s(null,...r))})}),()=>{let o=d;for(;o!==u&&o.parent!==null&&o.parent.f&k;)o=o.parent;const v=()=>{e&&w(i(...e),n)&&s(null,...e)},t=o.teardown;o.teardown=()=>{v(),t?.()}}}),n}const L="modulepreload",$=function(n,s){return new URL(n,s).href},m={},T=function(s,i,p){let u=Promise.resolve();if(i&&i.length>0){let v=function(t){return Promise.all(t.map(c=>Promise.resolve(c).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),o=e?.nonce||e?.getAttribute("nonce");u=v(i.map(t=>{if(t=$(t,p),t in m)return;m[t]=!0;const c=t.endsWith(".css"),l=c?'[rel="stylesheet"]':"";if(p)for(let f=r.length-1;f>=0;f--){const h=r[f];if(h.href===t&&(!c||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${l}`))return;const a=document.createElement("link");if(a.rel=c?"stylesheet":L,c||(a.as="script"),a.crossOrigin="",a.href=t,o&&a.setAttribute("nonce",o),document.head.appendChild(a),c)return new Promise((f,h)=>{a.addEventListener("load",f),a.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${t}`)))})}))}function d(r){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r}return u.then(r=>{for(const e of r||[])e.status==="rejected"&&d(e.reason);return s().catch(d)})};export{T as _,R as b};
2
- //# sourceMappingURL=ylfInSZr.js.map
1
+ import{_ as E,ad as S,aV as y,bh as b,O as k,e as P,S as g}from"./CRRPBe07.js";function w(n,s){return n===s||n?.[g]===s}function O(n={},s,i,p){var u=E.r,d=k;return S(()=>{var r,e;return y(()=>{r=e,e=[],b(()=>{w(i(...e),n)||(s(n,...e),r&&w(i(...r),n)&&s(null,...r))})}),()=>{let o=d;for(;o!==u&&o.parent!==null&&o.parent.f&P;)o=o.parent;const v=()=>{e&&w(i(...e),n)&&s(null,...e)},t=o.teardown;o.teardown=()=>{v(),t?.()}}}),n}const L="modulepreload",$=function(n,s){return new URL(n,s).href},m={},R=function(s,i,p){let u=Promise.resolve();if(i&&i.length>0){let v=function(t){return Promise.all(t.map(c=>Promise.resolve(c).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),o=e?.nonce||e?.getAttribute("nonce");u=v(i.map(t=>{if(t=$(t,p),t in m)return;m[t]=!0;const c=t.endsWith(".css"),l=c?'[rel="stylesheet"]':"";if(p)for(let f=r.length-1;f>=0;f--){const h=r[f];if(h.href===t&&(!c||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${l}`))return;const a=document.createElement("link");if(a.rel=c?"stylesheet":L,c||(a.as="script"),a.crossOrigin="",a.href=t,o&&a.setAttribute("nonce",o),document.head.appendChild(a),c)return new Promise((f,h)=>{a.addEventListener("load",f),a.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${t}`)))})}))}function d(r){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r}return u.then(r=>{for(const e of r||[])e.status==="rejected"&&d(e.reason);return s().catch(d)})};export{R as _,O as b};
2
+ //# sourceMappingURL=CAWbdcQM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ylfInSZr.js","sources":["../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js"],"sourcesContent":["/** @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 (!is_bound_this(get_value(...parts), element_or_component)) {\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"],"names":["is_bound_this","bound_value","element_or_component","STATE_SYMBOL","bind_this","update","get_value","get_parts","component_effect","component_context","parent","active_effect","effect","old_parts","parts","render_effect","untrack","p","DESTROYING","teardown","original_teardown"],"mappings":"+EAWA,SAASA,EAAcC,EAAaC,EAAsB,CACzD,OACCD,IAAgBC,GAAwBD,IAAcE,CAAY,IAAMD,CAE1E,CAUO,SAASE,EAAUF,EAAuB,CAAA,EAAIG,EAAQC,EAAWC,EAAW,CAClF,IAAIC,EAAoDC,EAAmB,EACvEC,EAAgCC,EAEpC,OAAAC,EAAO,IAAM,CAEZ,IAAIC,EAGAC,EAEJ,OAAAC,EAAc,IAAM,CACnBF,EAAYC,EAEZA,EAAyB,CAAA,EAEzBE,EAAQ,IAAM,CACRhB,EAAcM,EAAU,GAAGQ,CAAK,EAAGZ,CAAoB,IAC3DG,EAAOH,EAAsB,GAAGY,CAAK,EAGjCD,GAAab,EAAcM,EAAU,GAAGO,CAAS,EAAGX,CAAoB,GAC3EG,EAAO,KAAM,GAAGQ,CAAS,EAG5B,CAAC,CACF,CAAC,EAEM,IAAM,CAMZ,IAAII,EAAIP,EACR,KAAOO,IAAMT,GAAoBS,EAAE,SAAW,MAAQA,EAAE,OAAO,EAAIC,GAClED,EAAIA,EAAE,OAEP,MAAME,EAAW,IAAM,CAClBL,GAASd,EAAcM,EAAU,GAAGQ,CAAK,EAAGZ,CAAoB,GACnEG,EAAO,KAAM,GAAGS,CAAK,CAEvB,EACMM,EAAoBH,EAAE,SAC5BA,EAAE,SAAW,IAAM,CAClBE,EAAQ,EACRC,IAAiB,CAClB,CACD,CACD,CAAC,EAEMlB,CACR","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"CAWbdcQM.js","sources":["../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js"],"sourcesContent":["/** @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 (!is_bound_this(get_value(...parts), element_or_component)) {\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"],"names":["is_bound_this","bound_value","element_or_component","STATE_SYMBOL","bind_this","update","get_value","get_parts","component_effect","component_context","parent","active_effect","effect","old_parts","parts","render_effect","untrack","p","DESTROYING","teardown","original_teardown"],"mappings":"+EAWA,SAASA,EAAcC,EAAaC,EAAsB,CACzD,OACCD,IAAgBC,GAAwBD,IAAcE,CAAY,IAAMD,CAE1E,CAUO,SAASE,EAAUF,EAAuB,CAAA,EAAIG,EAAQC,EAAWC,EAAW,CAClF,IAAIC,EAAoDC,EAAmB,EACvEC,EAAgCC,EAEpC,OAAAC,EAAO,IAAM,CAEZ,IAAIC,EAGAC,EAEJ,OAAAC,EAAc,IAAM,CACnBF,EAAYC,EAEZA,EAAyB,CAAA,EAEzBE,EAAQ,IAAM,CACRhB,EAAcM,EAAU,GAAGQ,CAAK,EAAGZ,CAAoB,IAC3DG,EAAOH,EAAsB,GAAGY,CAAK,EAGjCD,GAAab,EAAcM,EAAU,GAAGO,CAAS,EAAGX,CAAoB,GAC3EG,EAAO,KAAM,GAAGQ,CAAS,EAG5B,CAAC,CACF,CAAC,EAEM,IAAM,CAMZ,IAAII,EAAIP,EACR,KAAOO,IAAMT,GAAoBS,EAAE,SAAW,MAAQA,EAAE,OAAO,EAAIC,GAClED,EAAIA,EAAE,OAEP,MAAME,EAAW,IAAM,CAClBL,GAASd,EAAcM,EAAU,GAAGQ,CAAK,EAAGZ,CAAoB,GACnEG,EAAO,KAAM,GAAGS,CAAK,CAEvB,EACMM,EAAoBH,EAAE,SAC5BA,EAAE,SAAW,IAAM,CAClBE,EAAQ,EACRC,IAAiB,CAClB,CACD,CACD,CAAC,EAEMlB,CACR","x_google_ignoreList":[0]}