@dirwell/theme-ledger 0.0.1 → 0.0.3

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.
package/dist/client.js CHANGED
@@ -31,51 +31,51 @@ The above copyright notice and this permission notice shall be included in all c
31
31
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
32
 
33
33
  */
34
- "use strict";(()=>{var au=Object.defineProperty;var hl=e=>{throw TypeError(e)};var lu=(e,t,r)=>t in e?au(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var re=(e,t,r)=>lu(e,typeof t!="symbol"?t+"":t,r),Ns=(e,t,r)=>t.has(e)||hl("Cannot "+r);var c=(e,t,r)=>(Ns(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(e,t,r)=>t.has(e)?hl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),I=(e,t,r,n)=>(Ns(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),L=(e,t,r)=>(Ns(e,t,"access private method"),r);var vl=globalThis.process?.env?.NODE_ENV,b=vl&&!vl.toLowerCase().startsWith("prod");var Yt=Array.isArray,gl=Array.prototype.indexOf,vr=Array.prototype.includes,Sn=Array.from,Cs=Object.keys,Ie=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,_i=Object.getOwnPropertyDescriptors,Os=Object.prototype,bl=Array.prototype,rn=Object.getPrototypeOf,Is=Object.isExtensible;var er=()=>{};function mi(e){for(var t=0;t<e.length;t++)e[t]()}function hi(){var e,t,r=new Promise((n,o)=>{e=n,t=o});return{promise:r,resolve:e,reject:t}}var Ke=Symbol("$state"),vi=Symbol("component"),gi=Symbol("legacy props"),yl=Symbol(""),bi=Symbol("proxy path"),yi=Symbol("attributes"),Ds=Symbol("class"),po=Symbol("style"),_o=Symbol("text"),Hr=Symbol("form reset"),Ls=Symbol("hmr anchor"),gr=new class extends Error{constructor(){super(...arguments);re(this,"name","StaleReactionError");re(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ms=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var nn=3,vt=8;var ot={};var le=Symbol("uninitialized"),it=Symbol("filename");var $i="http://www.w3.org/1999/xhtml",mo="http://www.w3.org/2000/svg",Fs="http://www.w3.org/1998/Math/MathML";var tr="font-weight: bold",rr="font-weight: normal";function $l(e){b?console.warn(`%c[svelte] await_reactivity_loss
34
+ "use strict";(()=>{var du=Object.defineProperty;var bl=e=>{throw TypeError(e)};var pu=(e,t,r)=>t in e?du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var re=(e,t,r)=>pu(e,typeof t!="symbol"?t+"":t,r),Ls=(e,t,r)=>t.has(e)||bl("Cannot "+r);var c=(e,t,r)=>(Ls(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(e,t,r)=>t.has(e)?bl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),I=(e,t,r,n)=>(Ls(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),L=(e,t,r)=>(Ls(e,t,"access private method"),r);var $l=globalThis.process?.env?.NODE_ENV,b=$l&&!$l.toLowerCase().startsWith("prod");var Yt=Array.isArray,yl=Array.prototype.indexOf,vr=Array.prototype.includes,Cn=Array.from,Ms=Object.keys,Ie=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,vi=Object.getOwnPropertyDescriptors,Fs=Object.prototype,wl=Array.prototype,on=Object.getPrototypeOf,Ps=Object.isExtensible;var er=()=>{};function gi(e){for(var t=0;t<e.length;t++)e[t]()}function bi(){var e,t,r=new Promise((n,o)=>{e=n,t=o});return{promise:r,resolve:e,reject:t}}var Ge=Symbol("$state"),$i=Symbol("component"),yi=Symbol("legacy props"),xl=Symbol(""),wi=Symbol("proxy path"),xi=Symbol("attributes"),Hs=Symbol("class"),go=Symbol("style"),bo=Symbol("text"),Vr=Symbol("form reset"),Us=Symbol("hmr anchor"),gr=new class extends Error{constructor(){super(...arguments);re(this,"name","StaleReactionError");re(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Vs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var sn=3,vt=8;var it={};var fe=Symbol("uninitialized"),st=Symbol("filename");var Ei="http://www.w3.org/1999/xhtml",$o="http://www.w3.org/2000/svg",Bs="http://www.w3.org/1998/Math/MathML";var tr="font-weight: bold",rr="font-weight: normal";function El(e){b?console.warn(`%c[svelte] await_reactivity_loss
35
35
  %cDetected reactivity loss when reading \`${e}\`. This happens when state is read in an async function after an earlier \`await\`
36
- https://svelte.dev/e/await_reactivity_loss`,tr,rr):console.warn("https://svelte.dev/e/await_reactivity_loss")}function wl(e,t){b?console.warn(`%c[svelte] await_waterfall
36
+ https://svelte.dev/e/await_reactivity_loss`,tr,rr):console.warn("https://svelte.dev/e/await_reactivity_loss")}function Tl(e,t){b?console.warn(`%c[svelte] await_waterfall
37
37
  %cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
38
- https://svelte.dev/e/await_waterfall`,tr,rr):console.warn("https://svelte.dev/e/await_waterfall")}function xl(){b?console.warn(`%c[svelte] derived_inert
38
+ https://svelte.dev/e/await_waterfall`,tr,rr):console.warn("https://svelte.dev/e/await_waterfall")}function kl(){b?console.warn(`%c[svelte] derived_inert
39
39
  %cReading a derived belonging to a now-destroyed effect may result in stale values
40
- https://svelte.dev/e/derived_inert`,tr,rr):console.warn("https://svelte.dev/e/derived_inert")}function El(e,t,r){b?console.warn(`%c[svelte] hydration_attribute_changed
40
+ https://svelte.dev/e/derived_inert`,tr,rr):console.warn("https://svelte.dev/e/derived_inert")}function Al(e,t,r){b?console.warn(`%c[svelte] hydration_attribute_changed
41
41
  %cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
42
- https://svelte.dev/e/hydration_attribute_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Tl(e){b?console.warn(`%c[svelte] hydration_html_changed
42
+ https://svelte.dev/e/hydration_attribute_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Sl(e){b?console.warn(`%c[svelte] hydration_html_changed
43
43
  %c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
44
- https://svelte.dev/e/hydration_html_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_html_changed")}function Ur(e){b?console.warn(`%c[svelte] hydration_mismatch
44
+ https://svelte.dev/e/hydration_html_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_html_changed")}function Br(e){b?console.warn(`%c[svelte] hydration_mismatch
45
45
  %c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
46
- https://svelte.dev/e/hydration_mismatch`,tr,rr):console.warn("https://svelte.dev/e/hydration_mismatch")}function kl(){b?console.warn(`%c[svelte] lifecycle_double_unmount
46
+ https://svelte.dev/e/hydration_mismatch`,tr,rr):console.warn("https://svelte.dev/e/hydration_mismatch")}function Rl(){b?console.warn(`%c[svelte] lifecycle_double_unmount
47
47
  %cTried to unmount a component that was not mounted
48
- https://svelte.dev/e/lifecycle_double_unmount`,tr,rr):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Al(){b?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",tr,rr):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function wi(e){b?console.warn(`%c[svelte] state_proxy_equality_mismatch
48
+ https://svelte.dev/e/lifecycle_double_unmount`,tr,rr):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Nl(){b?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",tr,rr):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Ti(e){b?console.warn(`%c[svelte] state_proxy_equality_mismatch
49
49
  %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
50
- https://svelte.dev/e/state_proxy_equality_mismatch`,tr,rr):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Sl(){b?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",tr,rr):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var T=!1;function Te(e){T=e}var M;function ne(e){if(e===null)throw Ur(),ot;return M=e}function De(){return ne(Le(M))}function B(e){if(T){if(Le(M)!==null)throw Ur(),ot;M=e}}function vo(e=1){if(T){for(var t=e,r=M;t--;)r=Le(r);M=r}}function nr(e=!0){for(var t=0,r=M;;){if(r.nodeType===vt){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var o=Le(r);e&&r.remove(),r=o}}function on(e){if(!e||e.nodeType!==vt)throw Ur(),ot;return e.data}function xi(e){return e===this.v}function Ei(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ti(e){return!Ei(e,this.v)}function Rl(e){if(b){let t=new Error(`invariant_violation
50
+ https://svelte.dev/e/state_proxy_equality_mismatch`,tr,rr):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Cl(){b?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",tr,rr):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var T=!1;function Te(e){T=e}var M;function ne(e){if(e===null)throw Br(),it;return M=e}function De(){return ne(Le(M))}function Y(e){if(T){if(Le(M)!==null)throw Br(),it;M=e}}function wo(e=1){if(T){for(var t=e,r=M;t--;)r=Le(r);M=r}}function nr(e=!0){for(var t=0,r=M;;){if(r.nodeType===vt){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var o=Le(r);e&&r.remove(),r=o}}function an(e){if(!e||e.nodeType!==vt)throw Br(),it;return e.data}function ki(e){return e===this.v}function Ai(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Si(e){return!Ai(e,this.v)}function Ol(e){if(b){let t=new Error(`invariant_violation
51
51
  An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${e}"
52
- https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function ki(e){if(b){let t=new Error(`lifecycle_outside_component
52
+ https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function Ri(e){if(b){let t=new Error(`lifecycle_outside_component
53
53
  \`${e}(...)\` can only be used during component initialisation
54
- https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cl(){if(b){let e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ps(){if(b){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function Ol(){if(b){let e=new Error(`derived_references_self
54
+ https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Dl(){if(b){let e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ys(){if(b){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function Ll(){if(b){let e=new Error(`derived_references_self
55
55
  A derived value cannot reference itself recursively
56
- https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function Hs(e,t,r){if(b){let n=new Error(`each_key_duplicate
56
+ https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function qs(e,t,r){if(b){let n=new Error(`each_key_duplicate
57
57
  ${r?`Keyed each block has duplicate key \`${r}\` at indexes ${e} and ${t}`:`Keyed each block has duplicate key at indexes ${e} and ${t}`}
58
- https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function Il(e,t,r){if(b){let n=new Error(`each_key_volatile
58
+ https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ml(e,t,r){if(b){let n=new Error(`each_key_volatile
59
59
  Keyed each block has key that is not idempotent \u2014 the key for item at index ${e} was \`${t}\` but is now \`${r}\`. Keys must be the same each time for a given item
60
- https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function Dl(e){if(b){let t=new Error(`effect_in_teardown
60
+ https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function Fl(e){if(b){let t=new Error(`effect_in_teardown
61
61
  \`${e}\` cannot be used inside an effect cleanup function
62
- https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ll(){if(b){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ml(e){if(b){let t=new Error(`effect_orphan
62
+ https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Pl(){if(b){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Hl(e){if(b){let t=new Error(`effect_orphan
63
63
  \`${e}\` can only be used inside an effect (e.g. during component initialisation)
64
- https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function Fl(){if(b){let e=new Error(`effect_update_depth_exceeded
64
+ https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function Ul(){if(b){let e=new Error(`effect_update_depth_exceeded
65
65
  Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
66
- https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Pl(){if(b){let e=new Error(`hydration_failed
66
+ https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Vl(){if(b){let e=new Error(`hydration_failed
67
67
  Failed to hydrate the application
68
- https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function Hl(){if(b){let e=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invalid_snippet")}function Ul(e){if(b){let t=new Error(`rune_outside_svelte
68
+ https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function Bl(){if(b){let e=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invalid_snippet")}function Yl(e){if(b){let t=new Error(`rune_outside_svelte
69
69
  The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
70
- https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function Vl(){if(b){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Bl(){if(b){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yl(){if(b){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ql(){if(b){let e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var ke=!1,Vr=!1,qt=!1;var go=null;function Ze(e,t){return e.label=t,Si(e.v,t),e}function Si(e,t){return e?.[bi]?.(t),e}function zt(e){let t=new Error,r=cu();return r.length===0?null:(r.unshift(`
70
+ https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function ql(){if(b){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function jl(){if(b){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function zl(){if(b){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Gl(){if(b){let e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var ke=!1,Yr=!1,qt=!1;var xo=null;function Ke(e,t){return e.label=t,Ci(e.v,t),e}function Ci(e,t){return e?.[wi]?.(t),e}function jt(e){let t=new Error,r=mu();return r.length===0?null:(r.unshift(`
71
71
  `),Ie(t,"stack",{value:r.join(`
72
- `)}),Ie(t,"name",{value:e}),t)}function cu(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];let r=t.split(`
73
- `),n=[];for(let o=0;o<r.length;o++){let i=r[o],a=i.replaceAll("\\","/");if(i.trim()!=="Error"){if(i.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||n.push(i)}}return n}function jl(e,t){if(!b)throw new Error("invariant(...) was not guarded by if (DEV)");e||Rl(t)}var Y=null;function br(e){Y=e}var or=null;function Cn(e){or=e}var gt=null;function Ri(e){gt=e}function bo(e,t=!1,r){Y={p:Y,i:!1,c:null,e:null,s:e,x:null,r:k,l:Vr&&!t?{s:null,u:null,$:[]}:null},b&&(Y.function=r,gt=r)}function yo(e){var t=Y,r=t.e;if(r!==null){t.e=null;for(var n of r)Us(n)}return e!==void 0&&(t.x=e),t.i=!0,Y=t.p,b&&(gt=Y?.function??null),$o(e)}function $o(e={}){return Ie(e,vi,{value:!0}),e}function ir(){return!Vr||Y!==null&&Y.l===null}var sn=[];function Gl(){var e=sn;sn=[],mi(e)}function $e(e){if(sn.length===0&&!an){var t=sn;queueMicrotask(()=>{t===sn&&Gl()})}sn.push(e)}function Kl(){for(;sn.length>0;)Gl()}var uu=-7169;function ie(e,t){e.f=e.f&uu|t}function On(e){(e.f&512)!==0||e.deps===null?ie(e,1024):ie(e,4096)}function Ni(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),ie(e,1024)}var Zl=!1;function Ci(){Zl||(Zl=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Hr]?.()})},{capture:!0}))}function yt(e){var t=C,r=k;Se(null),Re(null);try{return e()}finally{Se(t),Re(r)}}function Vs(e,t,r,n=r){e.addEventListener(t,()=>yt(r));let o=e[Hr];o?e[Hr]=()=>{o(),n(!0)}:e[Hr]=()=>n(!0),Ci()}function Oi(e,t,r,n){let o=ir()?Ln:Mn;var i=e.filter(_=>!_.settled),a=t.map(o);if(b&&a.forEach((_,y)=>{_.label=t[y].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(g,$)=>$)}),r.length===0&&i.length===0){n(a);return}var l=k,f=Wl(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(_=>_.promise)):null;function v(_){if((l.f&16384)===0){f();try{n([...a,..._])}catch(y){at(y,l)}Dn()}}var h=Bs();if(r.length===0){u.then(()=>v([])).finally(h);return}function m(){Promise.all(r.map(_=>qs(_))).then(v).catch(_=>at(_,l)).finally(h)}u?u.then(()=>{if((l.f&16384)!==0){h();return}f(),m(),Dn()}):m()}function Wl(){var e=k,t=C,r=Y,n=O;if(b)var o=or;return function(a=!0){Re(e),Se(t),br(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply()),b&&(Ys(null),Cn(o))}}var du=!1;function Dn(e=!0){du=!1,Re(null),Se(null),br(null),e&&O?.deactivate(),b&&(Ys(null),Cn(null))}function Bs(){var e=k,t=e.b,r=O,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var lt=null;function Ys(e){lt=e}var Eo=new Set;function Ln(e){var t=2050;k!==null&&(k.f|=524288);let r={ctx:Y,deps:null,effects:null,equals:xi,f:t,fn:e,reactions:null,rv:0,v:le,wv:0,parent:k,ac:null};return b&&qt&&(r.created=zt("created at")),r}var Fn=Symbol("obsolete");function qs(e,t,r){let n=k;n===null&&Cl();var o=void 0,i=Xe(le);b&&(i.label=t??e.toString());var a=!C,l=new Set;return Ql(()=>{var f=k;b&&(lt={effect:f,effect_deps:new Set,warned:!1});var u=hi();o=u.promise;try{Promise.resolve(e()).then(u.resolve,_=>{_!==gr&&u.reject(_)}).finally(Dn)}catch(_){u.reject(_),Dn()}if(b){if(lt){if(f.deps!==null)for(let _=0;_<tt;_+=1)lt.effect_deps.add(f.deps[_]);if(Fe!==null)for(let _=0;_<Fe.length;_+=1)lt.effect_deps.add(Fe[_])}lt=null}var v=O;if(a){if((f.f&32768)!==0)var h=Bs();if(n.b?.is_rendered())v.async_deriveds.get(f)?.reject(Fn);else for(let _ of l.values())_.reject(Fn);l.add(u),v.async_deriveds.set(f,u)}let m=(_,y=void 0)=>{b&&(lt=null),h?.(),l.delete(u),y!==Fn&&(v.activate(),y?(i.f|=8388608,Gt(i,y)):((i.f&8388608)!==0&&(i.f^=8388608),b&&r!==void 0&&!i.equals(_)&&(Eo.add(i),setTimeout(()=>{Eo.has(i)&&(f.f&16384)===0&&(wl(i.label,r),Eo.delete(i))})),Gt(i,_)),v.deactivate())};u.promise.then(m,_=>m(null,_||"unknown"))}),Me(()=>{for(let f of l)f.reject(Fn)}),b&&(i.f|=4194304),new Promise(f=>{function u(v){function h(){v===o?f(i):u(o)}v.then(h,h)}u(o)})}function Ot(e){let t=Ln(e);return ke||Li(t),t}function Mn(e){let t=Ln(e);return t.equals=Ti,t}function Xl(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}var zs=[];function To(e){var t,r=k,n=e.parent;if(!Dt&&n!==null&&e.v!==le&&(n.f&24576)!==0)return xl(),e.v;if(Re(n),b){let o=fn;Ii(new Set);try{vr.call(zs,e)&&Ol(),zs.push(e),Xl(e),t=Di(e)}finally{Re(r),Ii(o),zs.pop()}}else try{Xl(e),t=Di(e)}finally{Re(r)}return t}function js(e){var t=To(e);if(!e.equals(t)&&(e.wv=Pn(),(!O?.is_fork||e.deps===null)&&(O!==null?(O.capture(e,t,!0),It?.capture(e,t,!0)):e.v=t,e.deps===null))){ie(e,1024);return}Dt||(Pe!==null?(Br()||O?.is_fork)&&Pe.set(e,t):On(e))}function Jl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&yt(()=>{t.ac.abort(gr),t.ac=null}),t.fn!==null&&(t.teardown=er),cn(t,0),ko(t))}function Gs(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&sr(t)}var Mi=null,Hn=null,O=null,It=null,Pe=null,Ws=null,an=!1,Ks=!1,Vn=null,Ro=null,ef=0,Zs=new Set,mu=1,Bn,wr,xr,Yn,qn,zn,Er,jn,ct,No,Tr,Kt,ar,Gn,Yr,J,Xs,Js,Ao,Qs,rf,nf,Un,of,So,Fi=class Fi{constructor(){F(this,J);re(this,"id",mu++);F(this,Bn,!1);re(this,"linked",!0);F(this,wr,null);F(this,xr,null);re(this,"async_deriveds",new Map);re(this,"current",new Map);re(this,"previous",new Map);F(this,Yn,new Set);F(this,qn,new Set);F(this,zn,0);F(this,Er,new Map);F(this,jn,null);F(this,ct,[]);F(this,No,[]);F(this,Tr,new Set);F(this,Kt,new Set);F(this,ar,new Map);F(this,Gn,new Set);re(this,"is_fork",!1);F(this,Yr,!1);Hn===null?Mi=Hn=this:(I(Hn,xr,this),I(this,wr,Hn)),Hn=this}skip_effect(t){c(this,ar).has(t)||c(this,ar).set(t,{d:[],m:[]}),c(this,Gn).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=c(this,ar).get(t);if(n){c(this,ar).delete(t);for(var o of n.d)ie(o,2048),r(o);for(o of n.m)ie(o,4096),r(o)}c(this,Gn).add(t)}capture(t,r,n=!1){t.v!==le&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Pe?.set(t,r)),this.is_fork||(t.v=r)}activate(){O=this}deactivate(){O=null,Pe=null}flush(){try{b&&Zs.clear(),Ks=!0,O=this,L(this,J,Ao).call(this)}finally{if(ef=0,Ws=null,Vn=null,Ro=null,Ks=!1,O=null,Pe=null,Mt.clear(),b)for(let t of Zs)t.updated=null}}discard(){for(let t of c(this,qn))t(this);c(this,qn).clear();for(let t of this.async_deriveds.values())t.reject(Fn);L(this,J,So).call(this),c(this,jn)?.resolve()}register_created_effect(t){c(this,No).push(t)}increment(t,r){if(I(this,zn,c(this,zn)+1),t){let n=c(this,Er).get(r)??0;c(this,Er).set(r,n+1)}}decrement(t,r){if(I(this,zn,c(this,zn)-1),t){let n=c(this,Er).get(r)??0;n===1?c(this,Er).delete(r):c(this,Er).set(r,n-1)}c(this,Yr)||(I(this,Yr,!0),$e(()=>{I(this,Yr,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(let n of t)c(this,Tr).add(n);for(let n of r)c(this,Kt).add(n);t.clear(),r.clear()}oncommit(t){c(this,Yn).add(t)}ondiscard(t){c(this,qn).add(t)}settled(){return(c(this,jn)??I(this,jn,hi())).promise}static ensure(){if(O===null){let t=O=new Fi;!Ks&&!an&&$e(()=>{c(t,Bn)||t.flush()})}return O}apply(){if(!ke||!this.is_fork&&c(this,wr)===null&&c(this,xr)===null){Pe=null;return}Pe=new Map;for(let[r,[n]]of this.current)Pe.set(r,n);for(let r=Mi;r!==null;r=c(r,xr))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(let[n,[,o]]of r.current)if(!o&&this.current.has(n)){t=!0;break}}if(!t)for(let[n,o]of r.previous)Pe.has(n)||Pe.set(n,o)}}schedule(t){if(Ws=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}c(this,ct).push(t)}};Bn=new WeakMap,wr=new WeakMap,xr=new WeakMap,Yn=new WeakMap,qn=new WeakMap,zn=new WeakMap,Er=new WeakMap,jn=new WeakMap,ct=new WeakMap,No=new WeakMap,Tr=new WeakMap,Kt=new WeakMap,ar=new WeakMap,Gn=new WeakMap,Yr=new WeakMap,J=new WeakSet,Xs=function(){if(this.is_fork)return!0;for(let n of c(this,Er).keys()){for(var t=n,r=!1;t.parent!==null;){if(c(this,ar).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Js=function(){var t=[];for(let i of c(this,ct))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var r=i,n=!1;r.parent!==null;){r=r.parent;var o=r.f;if((o&96)!==0){if((o&1024)===0){n=!0;break}r.f^=1024}}n||t.push(r)}return I(this,ct,[]),t},Ao=function(){var l,f,u;if(I(this,Bn,!0),b)for(let v of this.current.keys())Zs.add(v);for(let v of c(this,Tr))c(this,Kt).delete(v),ie(v,2048),this.schedule(v);for(let v of c(this,Kt))ie(v,4096),this.schedule(v);this.apply();for(var t=Vn=[],r=[],n=Ro=[];c(this,ct).length>0;){ef++>1e3&&(L(this,J,So).call(this),hu());for(let v of L(this,J,Js).call(this))try{L(this,J,Qs).call(this,v,t,r)}catch(h){throw lf(v),L(this,J,Xs).call(this)||this.discard(),h}}if(O=null,n.length>0){var o=Fi.ensure();for(let v of n)o.schedule(v)}if(Vn=null,Ro=null,L(this,J,Xs).call(this)){L(this,J,Un).call(this,r),L(this,J,Un).call(this,t);for(let[v,h]of c(this,ar))af(v,h);n.length>0&&L(l=O,J,Ao).call(l);return}let i=L(this,J,rf).call(this);if(i){L(this,J,Un).call(this,r),L(this,J,Un).call(this,t),L(f=i,J,nf).call(f,this);return}c(this,Tr).clear(),c(this,Kt).clear();for(let v of c(this,Yn))v(this);c(this,Yn).clear(),It=this,tf(r),tf(t),It=null,c(this,jn)?.resolve();var a=O;if(c(this,zn)===0&&(c(this,ct).length===0||a!==null)&&(L(this,J,So).call(this),ke&&(L(this,J,of).call(this),O=a)),c(this,ct).length>0)if(a!==null){for(let v of c(this,ct))c(a,ct).push(v);I(this,ct,[])}else a=this;a!==null&&(Mt.clear(),L(u=a,J,Ao).call(u))},Qs=function(t,r,n){t.f^=1024;for(var o=t.first;o!==null;){var i=o.f,a=(i&96)!==0,l=a&&(i&1024)!==0,f=l||(i&8192)!==0||c(this,ar).has(o);if(!f&&o.fn!==null){a?o.f^=1024:(i&4)!==0?r.push(o):ke&&(i&16777224)!==0?n.push(o):zr(o)&&((i&16)!==0&&c(this,Kt).add(o),sr(o));var u=o.first;if(u!==null){o=u;continue}}for(;o!==null;){var v=o.next;if(v!==null){o=v;break}o=o.parent}}},rf=function(){for(var t=c(this,wr);t!==null;){if(!t.is_fork){for(let[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=c(t,wr)}return null},nf=function(t){var n;for(let[o,i]of t.current)!this.previous.has(o)&&t.previous.has(o)&&this.previous.set(o,t.previous.get(o)),this.current.set(o,i);for(let[o,i]of t.async_deriveds){let a=this.async_deriveds.get(o);a&&i.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(c(t,Tr),c(t,Kt));let r=o=>{var i=o.reactions;if(i!==null&&!((o.f&2)!==0&&(o.f&6144)===0))for(let f of i){var a=f.f;if((a&2)!==0)r(f);else{var l=f;a&4194320&&!this.async_deriveds.has(l)&&(c(this,Kt).delete(l),ie(l,2048),this.schedule(l))}}};for(let o of this.current.keys())r(o);this.oncommit(()=>t.discard()),L(n=t,J,So).call(n),O=this,L(this,J,Ao).call(this)},Un=function(t){for(var r=0;r<t.length;r+=1)Ni(t[r],c(this,Tr),c(this,Kt))},of=function(){var h,m;for(let _=Mi;_!==null;_=c(_,xr)){var t=_.id<this.id,r=[];for(let[y,[g,$]]of this.current){if(_.current.has(y)){var n=_.current.get(y)[0];if(t&&g!==n)_.current.set(y,[g,$]);else continue}r.push(y)}if(t)for(let[y,g]of this.async_deriveds){let $=_.async_deriveds.get(y);$&&g.promise.then($.resolve).catch($.reject)}var o=[..._.current.keys()].filter(y=>!_.current.get(y)[1]);if(!(!c(_,Bn)||o.length===0)){var i=o.filter(y=>!this.current.has(y));if(i.length===0)t&&_.discard();else if(r.length>0){if(b&&!c(_,Yr)&&jl(c(_,ct).length===0,"Batch has scheduled effects"),t)for(let y of c(this,Gn))_.unskip_effect(y,g=>{var $;(g.f&4194320)!==0?_.schedule(g):L($=_,J,Un).call($,[g])});_.activate();var a=new Set,l=new Map;for(var f of r)sf(f,i,a,l);l=new Map;var u=[..._.current].filter(([y,g])=>{let $=this.current.get(y);return $?$[0]!==g[0]||$[1]!==g[1]:!0}).map(([y])=>y);if(u.length>0)for(let y of c(this,No))(y.f&155648)===0&&ea(y,u,l)&&((y.f&4194320)!==0?(ie(y,2048),_.schedule(y)):c(_,Tr).add(y));if(c(_,ct).length>0&&!c(_,Yr)){_.apply();for(var v of L(h=_,J,Js).call(h))L(m=_,J,Qs).call(m,v,[],[])}_.deactivate()}}}},So=function(){if(this.linked){var t=c(this,wr),r=c(this,xr);t===null?Mi=r:I(t,xr,r),r===null?Hn=t:I(r,wr,t),this.linked=!1}};var $t=Fi;function qr(e){var t=an,r=It;It=null,an=!0;try{var n;for(e&&(qr(),n=e());;){if(Kl(),O===null)return n;O.flush()}}finally{an=t,It=r}}function hu(){if(b){var e=new Map;for(let r of O.current.keys())for(let[n,o]of r.updated??[]){var t=e.get(n);t||(t={error:o.error,count:0},e.set(n,t)),t.count+=o.count}for(let r of e.values())r.error&&console.error(r.error)}try{Fl()}catch(r){b&&Ie(r,"stack",{value:""}),at(r,Ws)}}var Lt=null;function tf(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&zr(n)&&(Lt=new Set,sr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&ta(n),Lt?.size>0)){Mt.clear();for(let o of Lt){if((o.f&24576)!==0)continue;let i=[o],a=o.parent;for(;a!==null;)Lt.has(a)&&(Lt.delete(a),i.push(a)),a=a.parent;for(let l=i.length-1;l>=0;l--){let f=i[l];(f.f&24576)===0&&sr(f)}}Lt.clear()}}Lt=null}}function sf(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(let o of e.reactions){let i=o.f;(i&2)!==0?sf(o,t,r,n):(i&4194320)!==0&&(i&2048)===0&&ea(o,t,n)&&(ie(o,2048),Co(o))}}function ea(e,t,r){let n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(let o of e.deps){if(vr.call(t,o))return!0;if((o.f&2)!==0&&ea(o,t,r))return r.set(o,!0),!0}return r.set(e,!1),!1}function Co(e){O.schedule(e)}function af(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),ie(e,1024);for(var r=e.first;r!==null;)af(r,t),r=r.next}}function lf(e){ie(e,1024);for(var t=e.first;t!==null;)lf(t),t=t.next}var fn=new Set,Mt=new Map;function Ii(e){fn=e}var na=!1;function cf(){na=!0}function Xe(e,t){var r={f:0,v:e,reactions:null,equals:xi,rv:0,wv:0};return b&&qt&&(r.created=t??zt("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function q(e,t){let r=Xe(e,t);return Li(r),r}function pn(e,t=!1,r=!0){var o;let n=Xe(e);return t||(n.equals=Ti),Vr&&r&&Y!==null&&Y.l!==null&&((o=Y.l).s??(o.s=[])).push(n),n}function E(e,t,r=!1){C!==null&&(!rt||(C.f&131072)!==0)&&ir()&&(C.f&4325394)!==0&&(Ft===null||!Ft.has(e))&&Yl();let n=r?Zt(t):t;return b&&Si(n,e.label),Gt(e,n,Ro)}var dn=null,ra=0;function Gt(e,t,r=null){if(!e.equals(t)){Dt?Mt.set(e,t):Mt.has(e)||Mt.set(e,e.v);var n=$t.ensure();if(n.capture(e,t),b){if(qt||k!==null){e.updated??(e.updated=new Map);let o=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:o}),qt||o>5){let i=zt("updated at");if(i!==null){let a=e.updated.get(i.stack);a||(a={error:i,count:0},e.updated.set(i.stack,a)),a.count++}}}k!==null&&(e.set_during_effect=!0)}if((e.f&2)!==0){let o=e;(e.f&2048)!==0&&To(o),Pe===null&&On(o)}e.wv=Pn(),dn=null,ra=0,uf(e,2048,r),dn=null,ir()&&k!==null&&(k.f&1024)!==0&&(k.f&96)===0&&(wt===null?df([e]):wt.push(e)),!n.is_fork&&fn.size>0&&!na&&Pi()}return t}function Pi(){na=!1;for(let e of fn){(e.f&1024)!==0&&ie(e,4096);let t;try{t=zr(e)}catch{t=!0}t&&sr(e)}fn.clear()}function _n(e){E(e,e.v+1)}function uf(e,t,r){var n=e.reactions;if(n!==null){var o=ir(),i=n.length;if(ra+=i,ra>1e5&&dn===null&&(dn=new Set),dn!==null){if(dn.has(e))return;dn.add(e)}for(var a=0;a<i;a++){var l=n[a],f=l.f;if(!(!o&&l===k)){var u=(f&2048)===0;if(u&&ie(l,t),(f&131072)!==0)fn.add(l);else if((f&2)!==0){var v=l;Pe?.delete(v),uf(v,4096,r)}else if(u){var h=l;(f&16)!==0&&Lt!==null&&Lt.add(h),r!==null?r.push(h):Co(h)}}}}}var gu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Zt(e){if(typeof e!="object"||e===null||Ke in e||vi in e)return e;let t=rn(e);if(t!==Os&&t!==bl)return e;var r=new Map,n=Yt(e),o=q(0),i=b&&qt?zt("created at"):null,a=jr,l=h=>{if(jr===a)return h();var m=C,_=jr;Se(null),oa(a);var y=h();return Se(m),oa(_),y};n&&(r.set("length",q(e.length,i)),b&&(e=yu(e)));var f="";let u=!1;function v(h){if(!u){u=!0,f=h,Ze(o,`${f} version`);for(let[m,_]of r)Ze(_,mn(f,m));u=!1}}return new Proxy(e,{defineProperty(h,m,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&Vl();var y=r.get(m);return y===void 0?l(()=>{var g=q(_.value,i);return r.set(m,g),b&&typeof m=="string"&&Ze(g,mn(f,m)),g}):E(y,_.value,!0),!0},deleteProperty(h,m){var _=r.get(m);if(_===void 0){if(m in h){let y=l(()=>q(le,i));r.set(m,y),_n(o),b&&Ze(y,mn(f,m))}}else E(_,le),_n(o);return!0},get(h,m,_){if(m===Ke)return e;if(b&&m===bi)return v;var y=r.get(m),g=m in h;if(y===void 0&&(!g||ht(h,m)?.writable)&&(y=l(()=>{var A=Zt(g?h[m]:le),K=q(A,i);return b&&Ze(K,mn(f,m)),K}),r.set(m,y)),y!==void 0){var $=s(y);return $===le?void 0:$}return Reflect.get(h,m,_)},getOwnPropertyDescriptor(h,m){this.has?.(h,m);var _=Reflect.getOwnPropertyDescriptor(h,m),y=r.get(m);if(y!==void 0){var g=s(y);if(g===le)return;if(_&&"value"in _)_.value=g;else return{enumerable:!0,configurable:!0,value:g,writable:!0}}return _},has(h,m){if(m===Ke)return!0;var _=r.get(m),y=_!==void 0&&_.v!==le||Reflect.has(h,m);if(_!==void 0||k!==null&&(!y||ht(h,m)?.writable)){_===void 0&&(_=l(()=>{var $=y?Zt(h[m]):le,A=q($,i);return b&&Ze(A,mn(f,m)),A}),r.set(m,_));var g=s(_);if(g===le)return!1}return y},set(h,m,_,y){var g=r.get(m),$=m in h;if(n&&m==="length")for(var A=_;A<g.v;A+=1){var K=r.get(A+"");K!==void 0?E(K,le):A in h&&(K=l(()=>q(le,i)),r.set(A+"",K),b&&Ze(K,mn(f,A)))}if(g===void 0)(!$||ht(h,m)?.writable)&&(g=l(()=>q(void 0,i)),b&&Ze(g,mn(f,m)),E(g,Zt(_)),r.set(m,g));else{$=g.v!==le;var pe=l(()=>Zt(_));E(g,pe)}var xe=Reflect.getOwnPropertyDescriptor(h,m);if(xe?.set&&xe.set.call(y,_),!$){if(n&&typeof m=="string"){var pt=r.get("length"),Ue=Number(m);Number.isInteger(Ue)&&Ue>=pt.v&&E(pt,Ue+1)}_n(o)}return!0},ownKeys(h){s(o);var m=Reflect.ownKeys(h).filter(g=>{var $=r.get(g);return $===void 0||$.v!==le});for(var[_,y]of r)y.v!==le&&!(_ in h)&&m.push(_);return m},setPrototypeOf(){Bl()}})}function mn(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:gu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Kn(e){try{if(e!==null&&typeof e=="object"&&Ke in e)return e[Ke]}catch{}return e}function Hi(e,t){return Object.is(Kn(e),Kn(t))}var bu=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function yu(e){return new Proxy(e,{get(t,r,n){var o=Reflect.get(t,r,n);return bu.has(r)?function(...i){cf();var a=o.apply(this,i);return Pi(),a}:o}})}function pf(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:o}=e;e.indexOf=function(i,a){let l=r.call(this,i,a);if(l===-1){for(let f=a??0;f<this.length;f+=1)if(Kn(this[f])===i){wi("array.indexOf(...)");break}}return l},e.lastIndexOf=function(i,a){let l=n.call(this,i,a??this.length-1);if(l===-1){for(let f=0;f<=(a??this.length-1);f+=1)if(Kn(this[f])===i){wi("array.lastIndexOf(...)");break}}return l},e.includes=function(i,a){let l=o.call(this,i,a);if(!l){for(let f=0;f<this.length;f+=1)if(Kn(this[f])===i){wi("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=o}}var hn,_f,Oo,mf,hf;function Ui(){if(hn===void 0){hn=window,_f=document,Oo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mf=ht(t,"firstChild").get,hf=ht(t,"nextSibling").get,Is(e)&&(e[Ds]=void 0,e[yi]=null,e[po]=void 0,e.__e=void 0),Is(r)&&(r[_o]=void 0),b&&(e.__svelte_meta=null,pf())}}function be(e=""){return document.createTextNode(e)}function ve(e){return mf.call(e)}function Le(e){return hf.call(e)}function W(e,t){if(!T)return ve(e);var r=ve(M);if(r===null)r=M.appendChild(be());else if(t&&r.nodeType!==nn){var n=be();return r?.before(n),ne(n),n}return t&&Io(r),ne(r),r}function xt(e,t=!1){if(!T){var r=ve(e);return r instanceof Comment&&r.data===""?Le(r):r}if(t){if(M?.nodeType!==nn){var n=be();return M?.before(n),ne(n),n}Io(M)}return M}function H(e,t=!1){if(!T)return ve(e);var r=W(e,t);return B(e),r}function S(e,t=1,r=!1){let n=T?M:e;for(var o;t--;)o=n,n=Le(n);if(!T)return n;if(r){if(n?.nodeType!==nn){var i=be();return n===null?o?.after(i):n.before(i),ne(i),i}Io(n)}return ne(n),n}function xo(e){e.textContent=""}function Vi(){if(!ke||Lt!==null)return!1;var e=k.f;return(e&32768)!==0}function Wt(e,t,r){return t==null||t===$i?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Io(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===nn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var ia=new WeakMap;function vf(e){var t=k;if(t===null)return C.f|=8388608,e;if(b&&e instanceof Error&&!ia.has(e)&&ia.set(e,$u(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw b&&!t.parent&&e instanceof Error&&gf(e),e;at(e,t)}function at(e,t){if(e===ot)throw e;if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw b&&e instanceof Error&&gf(e),e}}function $u(e,t){let r=ht(e,"message");if(!(r&&!r.configurable)){for(var n=Oo?" ":" ",o=`
72
+ `)}),Ie(t,"name",{value:e}),t)}function mu(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];let r=t.split(`
73
+ `),n=[];for(let o=0;o<r.length;o++){let i=r[o],a=i.replaceAll("\\","/");if(i.trim()!=="Error"){if(i.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||n.push(i)}}return n}function Zl(e,t){if(!b)throw new Error("invariant(...) was not guarded by if (DEV)");e||Ol(t)}var q=null;function br(e){q=e}var or=null;function Dn(e){or=e}var gt=null;function Oi(e){gt=e}function Eo(e,t=!1,r){q={p:q,i:!1,c:null,e:null,s:e,x:null,r:k,l:Yr&&!t?{s:null,u:null,$:[]}:null},b&&(q.function=r,gt=r)}function To(e){var t=q,r=t.e;if(r!==null){t.e=null;for(var n of r)js(n)}return e!==void 0&&(t.x=e),t.i=!0,q=t.p,b&&(gt=q?.function??null),ko(e)}function ko(e={}){return Ie(e,$i,{value:!0}),e}function ir(){return!Yr||q!==null&&q.l===null}var ln=[];function Wl(){var e=ln;ln=[],gi(e)}function we(e){if(ln.length===0&&!fn){var t=ln;queueMicrotask(()=>{t===ln&&Wl()})}ln.push(e)}function Xl(){for(;ln.length>0;)Wl()}var hu=-7169;function ie(e,t){e.f=e.f&hu|t}function Ln(e){(e.f&512)!==0||e.deps===null?ie(e,1024):ie(e,4096)}function Ii(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),ie(e,1024)}var Jl=!1;function Di(){Jl||(Jl=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Vr]?.()})},{capture:!0}))}function $t(e){var t=C,r=k;Se(null),Re(null);try{return e()}finally{Se(t),Re(r)}}function zs(e,t,r,n=r){e.addEventListener(t,()=>$t(r));let o=e[Vr];o?e[Vr]=()=>{o(),n(!0)}:e[Vr]=()=>n(!0),Di()}function Li(e,t,r,n){let o=ir()?Pn:Hn;var i=e.filter(_=>!_.settled),a=t.map(o);if(b&&a.forEach((_,$)=>{_.label=t[$].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(g,y)=>y)}),r.length===0&&i.length===0){n(a);return}var l=k,f=Ql(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(_=>_.promise)):null;function v(_){if((l.f&16384)===0){f();try{n([...a,..._])}catch($){lt($,l)}Fn()}}var h=Gs();if(r.length===0){u.then(()=>v([])).finally(h);return}function m(){Promise.all(r.map(_=>Zs(_))).then(v).catch(_=>lt(_,l)).finally(h)}u?u.then(()=>{if((l.f&16384)!==0){h();return}f(),m(),Fn()}):m()}function Ql(){var e=k,t=C,r=q,n=O;if(b)var o=or;return function(a=!0){Re(e),Se(t),br(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply()),b&&(Ks(null),Dn(o))}}var vu=!1;function Fn(e=!0){vu=!1,Re(null),Se(null),br(null),e&&O?.deactivate(),b&&(Ks(null),Dn(null))}function Gs(){var e=k,t=e.b,r=O,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var ft=null;function Ks(e){ft=e}var Ro=new Set;function Pn(e){var t=2050;k!==null&&(k.f|=524288);let r={ctx:q,deps:null,effects:null,equals:ki,f:t,fn:e,reactions:null,rv:0,v:fe,wv:0,parent:k,ac:null};return b&&qt&&(r.created=jt("created at")),r}var Un=Symbol("obsolete");function Zs(e,t,r){let n=k;n===null&&Dl();var o=void 0,i=We(fe);b&&(i.label=t??e.toString());var a=!C,l=new Set;return rf(()=>{var f=k;b&&(ft={effect:f,effect_deps:new Set,warned:!1});var u=bi();o=u.promise;try{Promise.resolve(e()).then(u.resolve,_=>{_!==gr&&u.reject(_)}).finally(Fn)}catch(_){u.reject(_),Fn()}if(b){if(ft){if(f.deps!==null)for(let _=0;_<tt;_+=1)ft.effect_deps.add(f.deps[_]);if(Fe!==null)for(let _=0;_<Fe.length;_+=1)ft.effect_deps.add(Fe[_])}ft=null}var v=O;if(a){if((f.f&32768)!==0)var h=Gs();if(n.b?.is_rendered())v.async_deriveds.get(f)?.reject(Un);else for(let _ of l.values())_.reject(Un);l.add(u),v.async_deriveds.set(f,u)}let m=(_,$=void 0)=>{b&&(ft=null),h?.(),l.delete(u),$!==Un&&(v.activate(),$?(i.f|=8388608,Gt(i,$)):((i.f&8388608)!==0&&(i.f^=8388608),b&&r!==void 0&&!i.equals(_)&&(Ro.add(i),setTimeout(()=>{Ro.has(i)&&(f.f&16384)===0&&(Tl(i.label,r),Ro.delete(i))})),Gt(i,_)),v.deactivate())};u.promise.then(m,_=>m(null,_||"unknown"))}),Me(()=>{for(let f of l)f.reject(Un)}),b&&(i.f|=4194304),new Promise(f=>{function u(v){function h(){v===o?f(i):u(o)}v.then(h,h)}u(o)})}function Ct(e){let t=Pn(e);return ke||Pi(t),t}function Hn(e){let t=Pn(e);return t.equals=Si,t}function ef(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}var Ws=[];function No(e){var t,r=k,n=e.parent;if(!It&&n!==null&&e.v!==fe&&(n.f&24576)!==0)return kl(),e.v;if(Re(n),b){let o=un;Mi(new Set);try{vr.call(Ws,e)&&Ll(),Ws.push(e),ef(e),t=Fi(e)}finally{Re(r),Mi(o),Ws.pop()}}else try{ef(e),t=Fi(e)}finally{Re(r)}return t}function Xs(e){var t=No(e);if(!e.equals(t)&&(e.wv=Vn(),(!O?.is_fork||e.deps===null)&&(O!==null?(O.capture(e,t,!0),Ot?.capture(e,t,!0)):e.v=t,e.deps===null))){ie(e,1024);return}It||(Pe!==null?(qr()||O?.is_fork)&&Pe.set(e,t):Ln(e))}function tf(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&$t(()=>{t.ac.abort(gr),t.ac=null}),t.fn!==null&&(t.teardown=er),dn(t,0),Co(t))}function Js(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&sr(t)}var Hi=null,Bn=null,O=null,Ot=null,Pe=null,ta=null,fn=!1,Qs=!1,qn=null,Do=null,nf=0,ea=new Set,$u=1,jn,wr,xr,zn,Gn,Kn,Er,Zn,ut,Lo,Tr,Kt,ar,Wn,jr,J,ra,na,Oo,oa,sf,af,Yn,lf,Io,Ui=class Ui{constructor(){F(this,J);re(this,"id",$u++);F(this,jn,!1);re(this,"linked",!0);F(this,wr,null);F(this,xr,null);re(this,"async_deriveds",new Map);re(this,"current",new Map);re(this,"previous",new Map);F(this,zn,new Set);F(this,Gn,new Set);F(this,Kn,0);F(this,Er,new Map);F(this,Zn,null);F(this,ut,[]);F(this,Lo,[]);F(this,Tr,new Set);F(this,Kt,new Set);F(this,ar,new Map);F(this,Wn,new Set);re(this,"is_fork",!1);F(this,jr,!1);Bn===null?Hi=Bn=this:(I(Bn,xr,this),I(this,wr,Bn)),Bn=this}skip_effect(t){c(this,ar).has(t)||c(this,ar).set(t,{d:[],m:[]}),c(this,Wn).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=c(this,ar).get(t);if(n){c(this,ar).delete(t);for(var o of n.d)ie(o,2048),r(o);for(o of n.m)ie(o,4096),r(o)}c(this,Wn).add(t)}capture(t,r,n=!1){t.v!==fe&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Pe?.set(t,r)),this.is_fork||(t.v=r)}activate(){O=this}deactivate(){O=null,Pe=null}flush(){try{b&&ea.clear(),Qs=!0,O=this,L(this,J,Oo).call(this)}finally{if(nf=0,ta=null,qn=null,Do=null,Qs=!1,O=null,Pe=null,Lt.clear(),b)for(let t of ea)t.updated=null}}discard(){for(let t of c(this,Gn))t(this);c(this,Gn).clear();for(let t of this.async_deriveds.values())t.reject(Un);L(this,J,Io).call(this),c(this,Zn)?.resolve()}register_created_effect(t){c(this,Lo).push(t)}increment(t,r){if(I(this,Kn,c(this,Kn)+1),t){let n=c(this,Er).get(r)??0;c(this,Er).set(r,n+1)}}decrement(t,r){if(I(this,Kn,c(this,Kn)-1),t){let n=c(this,Er).get(r)??0;n===1?c(this,Er).delete(r):c(this,Er).set(r,n-1)}c(this,jr)||(I(this,jr,!0),we(()=>{I(this,jr,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(let n of t)c(this,Tr).add(n);for(let n of r)c(this,Kt).add(n);t.clear(),r.clear()}oncommit(t){c(this,zn).add(t)}ondiscard(t){c(this,Gn).add(t)}settled(){return(c(this,Zn)??I(this,Zn,bi())).promise}static ensure(){if(O===null){let t=O=new Ui;!Qs&&!fn&&we(()=>{c(t,jn)||t.flush()})}return O}apply(){if(!ke||!this.is_fork&&c(this,wr)===null&&c(this,xr)===null){Pe=null;return}Pe=new Map;for(let[r,[n]]of this.current)Pe.set(r,n);for(let r=Hi;r!==null;r=c(r,xr))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(let[n,[,o]]of r.current)if(!o&&this.current.has(n)){t=!0;break}}if(!t)for(let[n,o]of r.previous)Pe.has(n)||Pe.set(n,o)}}schedule(t){if(ta=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}c(this,ut).push(t)}};jn=new WeakMap,wr=new WeakMap,xr=new WeakMap,zn=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,Er=new WeakMap,Zn=new WeakMap,ut=new WeakMap,Lo=new WeakMap,Tr=new WeakMap,Kt=new WeakMap,ar=new WeakMap,Wn=new WeakMap,jr=new WeakMap,J=new WeakSet,ra=function(){if(this.is_fork)return!0;for(let n of c(this,Er).keys()){for(var t=n,r=!1;t.parent!==null;){if(c(this,ar).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},na=function(){var t=[];for(let i of c(this,ut))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var r=i,n=!1;r.parent!==null;){r=r.parent;var o=r.f;if((o&96)!==0){if((o&1024)===0){n=!0;break}r.f^=1024}}n||t.push(r)}return I(this,ut,[]),t},Oo=function(){var l,f,u;if(I(this,jn,!0),b)for(let v of this.current.keys())ea.add(v);for(let v of c(this,Tr))c(this,Kt).delete(v),ie(v,2048),this.schedule(v);for(let v of c(this,Kt))ie(v,4096),this.schedule(v);this.apply();for(var t=qn=[],r=[],n=Do=[];c(this,ut).length>0;){nf++>1e3&&(L(this,J,Io).call(this),yu());for(let v of L(this,J,na).call(this))try{L(this,J,oa).call(this,v,t,r)}catch(h){throw uf(v),L(this,J,ra).call(this)||this.discard(),h}}if(O=null,n.length>0){var o=Ui.ensure();for(let v of n)o.schedule(v)}if(qn=null,Do=null,L(this,J,ra).call(this)){L(this,J,Yn).call(this,r),L(this,J,Yn).call(this,t);for(let[v,h]of c(this,ar))cf(v,h);n.length>0&&L(l=O,J,Oo).call(l);return}let i=L(this,J,sf).call(this);if(i){L(this,J,Yn).call(this,r),L(this,J,Yn).call(this,t),L(f=i,J,af).call(f,this);return}c(this,Tr).clear(),c(this,Kt).clear();for(let v of c(this,zn))v(this);c(this,zn).clear(),Ot=this,of(r),of(t),Ot=null,c(this,Zn)?.resolve();var a=O;if(c(this,Kn)===0&&(c(this,ut).length===0||a!==null)&&(L(this,J,Io).call(this),ke&&(L(this,J,lf).call(this),O=a)),c(this,ut).length>0)if(a!==null){for(let v of c(this,ut))c(a,ut).push(v);I(this,ut,[])}else a=this;a!==null&&(Lt.clear(),L(u=a,J,Oo).call(u))},oa=function(t,r,n){t.f^=1024;for(var o=t.first;o!==null;){var i=o.f,a=(i&96)!==0,l=a&&(i&1024)!==0,f=l||(i&8192)!==0||c(this,ar).has(o);if(!f&&o.fn!==null){a?o.f^=1024:(i&4)!==0?r.push(o):ke&&(i&16777224)!==0?n.push(o):Gr(o)&&((i&16)!==0&&c(this,Kt).add(o),sr(o));var u=o.first;if(u!==null){o=u;continue}}for(;o!==null;){var v=o.next;if(v!==null){o=v;break}o=o.parent}}},sf=function(){for(var t=c(this,wr);t!==null;){if(!t.is_fork){for(let[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=c(t,wr)}return null},af=function(t){var n;for(let[o,i]of t.current)!this.previous.has(o)&&t.previous.has(o)&&this.previous.set(o,t.previous.get(o)),this.current.set(o,i);for(let[o,i]of t.async_deriveds){let a=this.async_deriveds.get(o);a&&i.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(c(t,Tr),c(t,Kt));let r=o=>{var i=o.reactions;if(i!==null&&!((o.f&2)!==0&&(o.f&6144)===0))for(let f of i){var a=f.f;if((a&2)!==0)r(f);else{var l=f;a&4194320&&!this.async_deriveds.has(l)&&(c(this,Kt).delete(l),ie(l,2048),this.schedule(l))}}};for(let o of this.current.keys())r(o);this.oncommit(()=>t.discard()),L(n=t,J,Io).call(n),O=this,L(this,J,Oo).call(this)},Yn=function(t){for(var r=0;r<t.length;r+=1)Ii(t[r],c(this,Tr),c(this,Kt))},lf=function(){var h,m;for(let _=Hi;_!==null;_=c(_,xr)){var t=_.id<this.id,r=[];for(let[$,[g,y]]of this.current){if(_.current.has($)){var n=_.current.get($)[0];if(t&&g!==n)_.current.set($,[g,y]);else continue}r.push($)}if(t)for(let[$,g]of this.async_deriveds){let y=_.async_deriveds.get($);y&&g.promise.then(y.resolve).catch(y.reject)}var o=[..._.current.keys()].filter($=>!_.current.get($)[1]);if(!(!c(_,jn)||o.length===0)){var i=o.filter($=>!this.current.has($));if(i.length===0)t&&_.discard();else if(r.length>0){if(b&&!c(_,jr)&&Zl(c(_,ut).length===0,"Batch has scheduled effects"),t)for(let $ of c(this,Wn))_.unskip_effect($,g=>{var y;(g.f&4194320)!==0?_.schedule(g):L(y=_,J,Yn).call(y,[g])});_.activate();var a=new Set,l=new Map;for(var f of r)ff(f,i,a,l);l=new Map;var u=[..._.current].filter(([$,g])=>{let y=this.current.get($);return y?y[0]!==g[0]||y[1]!==g[1]:!0}).map(([$])=>$);if(u.length>0)for(let $ of c(this,Lo))($.f&155648)===0&&ia($,u,l)&&(($.f&4194320)!==0?(ie($,2048),_.schedule($)):c(_,Tr).add($));if(c(_,ut).length>0&&!c(_,jr)){_.apply();for(var v of L(h=_,J,na).call(h))L(m=_,J,oa).call(m,v,[],[])}_.deactivate()}}}},Io=function(){if(this.linked){var t=c(this,wr),r=c(this,xr);t===null?Hi=r:I(t,xr,r),r===null?Bn=t:I(r,wr,t),this.linked=!1}};var yt=Ui;function zr(e){var t=fn,r=Ot;Ot=null,fn=!0;try{var n;for(e&&(zr(),n=e());;){if(Xl(),O===null)return n;O.flush()}}finally{fn=t,Ot=r}}function yu(){if(b){var e=new Map;for(let r of O.current.keys())for(let[n,o]of r.updated??[]){var t=e.get(n);t||(t={error:o.error,count:0},e.set(n,t)),t.count+=o.count}for(let r of e.values())r.error&&console.error(r.error)}try{Ul()}catch(r){b&&Ie(r,"stack",{value:""}),lt(r,ta)}}var Dt=null;function of(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Gr(n)&&(Dt=new Set,sr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&sa(n),Dt?.size>0)){Lt.clear();for(let o of Dt){if((o.f&24576)!==0)continue;let i=[o],a=o.parent;for(;a!==null;)Dt.has(a)&&(Dt.delete(a),i.push(a)),a=a.parent;for(let l=i.length-1;l>=0;l--){let f=i[l];(f.f&24576)===0&&sr(f)}}Dt.clear()}}Dt=null}}function ff(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(let o of e.reactions){let i=o.f;(i&2)!==0?ff(o,t,r,n):(i&4194320)!==0&&(i&2048)===0&&ia(o,t,n)&&(ie(o,2048),Mo(o))}}function ia(e,t,r){let n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(let o of e.deps){if(vr.call(t,o))return!0;if((o.f&2)!==0&&ia(o,t,r))return r.set(o,!0),!0}return r.set(e,!1),!1}function Mo(e){O.schedule(e)}function cf(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),ie(e,1024);for(var r=e.first;r!==null;)cf(r,t),r=r.next}}function uf(e){ie(e,1024);for(var t=e.first;t!==null;)uf(t),t=t.next}var un=new Set,Lt=new Map;function Mi(e){un=e}var la=!1;function pf(){la=!0}function We(e,t){var r={f:0,v:e,reactions:null,equals:ki,rv:0,wv:0};return b&&qt&&(r.created=t??jt("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function j(e,t){let r=We(e,t);return Pi(r),r}function mn(e,t=!1,r=!0){var o;let n=We(e);return t||(n.equals=Si),Yr&&r&&q!==null&&q.l!==null&&((o=q.l).s??(o.s=[])).push(n),n}function E(e,t,r=!1){C!==null&&(!rt||(C.f&131072)!==0)&&ir()&&(C.f&4325394)!==0&&(Mt===null||!Mt.has(e))&&zl();let n=r?Zt(t):t;return b&&Ci(n,e.label),Gt(e,n,Do)}var _n=null,aa=0;function Gt(e,t,r=null){if(!e.equals(t)){It?Lt.set(e,t):Lt.has(e)||Lt.set(e,e.v);var n=yt.ensure();if(n.capture(e,t),b){if(qt||k!==null){e.updated??(e.updated=new Map);let o=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:o}),qt||o>5){let i=jt("updated at");if(i!==null){let a=e.updated.get(i.stack);a||(a={error:i,count:0},e.updated.set(i.stack,a)),a.count++}}}k!==null&&(e.set_during_effect=!0)}if((e.f&2)!==0){let o=e;(e.f&2048)!==0&&No(o),Pe===null&&Ln(o)}e.wv=Vn(),_n=null,aa=0,_f(e,2048,r),_n=null,ir()&&k!==null&&(k.f&1024)!==0&&(k.f&96)===0&&(wt===null?mf([e]):wt.push(e)),!n.is_fork&&un.size>0&&!la&&Vi()}return t}function Vi(){la=!1;for(let e of un){(e.f&1024)!==0&&ie(e,4096);let t;try{t=Gr(e)}catch{t=!0}t&&sr(e)}un.clear()}function hn(e){E(e,e.v+1)}function _f(e,t,r){var n=e.reactions;if(n!==null){var o=ir(),i=n.length;if(aa+=i,aa>1e5&&_n===null&&(_n=new Set),_n!==null){if(_n.has(e))return;_n.add(e)}for(var a=0;a<i;a++){var l=n[a],f=l.f;if(!(!o&&l===k)){var u=(f&2048)===0;if(u&&ie(l,t),(f&131072)!==0)un.add(l);else if((f&2)!==0){var v=l;Pe?.delete(v),_f(v,4096,r)}else if(u){var h=l;(f&16)!==0&&Dt!==null&&Dt.add(h),r!==null?r.push(h):Mo(h)}}}}}var xu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Zt(e){if(typeof e!="object"||e===null||Ge in e||$i in e)return e;let t=on(e);if(t!==Fs&&t!==wl)return e;var r=new Map,n=Yt(e),o=j(0),i=b&&qt?jt("created at"):null,a=Kr,l=h=>{if(Kr===a)return h();var m=C,_=Kr;Se(null),fa(a);var $=h();return Se(m),fa(_),$};n&&(r.set("length",j(e.length,i)),b&&(e=Tu(e)));var f="";let u=!1;function v(h){if(!u){u=!0,f=h,Ke(o,`${f} version`);for(let[m,_]of r)Ke(_,vn(f,m));u=!1}}return new Proxy(e,{defineProperty(h,m,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&ql();var $=r.get(m);return $===void 0?l(()=>{var g=j(_.value,i);return r.set(m,g),b&&typeof m=="string"&&Ke(g,vn(f,m)),g}):E($,_.value,!0),!0},deleteProperty(h,m){var _=r.get(m);if(_===void 0){if(m in h){let $=l(()=>j(fe,i));r.set(m,$),hn(o),b&&Ke($,vn(f,m))}}else E(_,fe),hn(o);return!0},get(h,m,_){if(m===Ge)return e;if(b&&m===wi)return v;var $=r.get(m),g=m in h;if($===void 0&&(!g||ht(h,m)?.writable)&&($=l(()=>{var A=Zt(g?h[m]:fe),K=j(A,i);return b&&Ke(K,vn(f,m)),K}),r.set(m,$)),$!==void 0){var y=s($);return y===fe?void 0:y}return Reflect.get(h,m,_)},getOwnPropertyDescriptor(h,m){this.has?.(h,m);var _=Reflect.getOwnPropertyDescriptor(h,m),$=r.get(m);if($!==void 0){var g=s($);if(g===fe)return;if(_&&"value"in _)_.value=g;else return{enumerable:!0,configurable:!0,value:g,writable:!0}}return _},has(h,m){if(m===Ge)return!0;var _=r.get(m),$=_!==void 0&&_.v!==fe||Reflect.has(h,m);if(_!==void 0||k!==null&&(!$||ht(h,m)?.writable)){_===void 0&&(_=l(()=>{var y=$?Zt(h[m]):fe,A=j(y,i);return b&&Ke(A,vn(f,m)),A}),r.set(m,_));var g=s(_);if(g===fe)return!1}return $},set(h,m,_,$){var g=r.get(m),y=m in h;if(n&&m==="length")for(var A=_;A<g.v;A+=1){var K=r.get(A+"");K!==void 0?E(K,fe):A in h&&(K=l(()=>j(fe,i)),r.set(A+"",K),b&&Ke(K,vn(f,A)))}if(g===void 0)(!y||ht(h,m)?.writable)&&(g=l(()=>j(void 0,i)),b&&Ke(g,vn(f,m)),E(g,Zt(_)),r.set(m,g));else{y=g.v!==fe;var pe=l(()=>Zt(_));E(g,pe)}var ye=Reflect.getOwnPropertyDescriptor(h,m);if(ye?.set&&ye.set.call($,_),!y){if(n&&typeof m=="string"){var ot=r.get("length"),Ue=Number(m);Number.isInteger(Ue)&&Ue>=ot.v&&E(ot,Ue+1)}hn(o)}return!0},ownKeys(h){s(o);var m=Reflect.ownKeys(h).filter(g=>{var y=r.get(g);return y===void 0||y.v!==fe});for(var[_,$]of r)$.v!==fe&&!(_ in h)&&m.push(_);return m},setPrototypeOf(){jl()}})}function vn(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:xu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Xn(e){try{if(e!==null&&typeof e=="object"&&Ge in e)return e[Ge]}catch{}return e}function Bi(e,t){return Object.is(Xn(e),Xn(t))}var Eu=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function Tu(e){return new Proxy(e,{get(t,r,n){var o=Reflect.get(t,r,n);return Eu.has(r)?function(...i){pf();var a=o.apply(this,i);return Vi(),a}:o}})}function hf(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:o}=e;e.indexOf=function(i,a){let l=r.call(this,i,a);if(l===-1){for(let f=a??0;f<this.length;f+=1)if(Xn(this[f])===i){Ti("array.indexOf(...)");break}}return l},e.lastIndexOf=function(i,a){let l=n.call(this,i,a??this.length-1);if(l===-1){for(let f=0;f<=(a??this.length-1);f+=1)if(Xn(this[f])===i){Ti("array.lastIndexOf(...)");break}}return l},e.includes=function(i,a){let l=o.call(this,i,a);if(!l){for(let f=0;f<this.length;f+=1)if(Xn(this[f])===i){Ti("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=o}}var gn,vf,Fo,gf,bf;function Yi(){if(gn===void 0){gn=window,vf=document,Fo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;gf=ht(t,"firstChild").get,bf=ht(t,"nextSibling").get,Ps(e)&&(e[Hs]=void 0,e[xi]=null,e[go]=void 0,e.__e=void 0),Ps(r)&&(r[bo]=void 0),b&&(e.__svelte_meta=null,hf())}}function be(e=""){return document.createTextNode(e)}function ve(e){return gf.call(e)}function Le(e){return bf.call(e)}function W(e,t){if(!T)return ve(e);var r=ve(M);if(r===null)r=M.appendChild(be());else if(t&&r.nodeType!==sn){var n=be();return r?.before(n),ne(n),n}return t&&Po(r),ne(r),r}function xt(e,t=!1){if(!T){var r=ve(e);return r instanceof Comment&&r.data===""?Le(r):r}if(t){if(M?.nodeType!==sn){var n=be();return M?.before(n),ne(n),n}Po(M)}return M}function H(e,t=!1){if(!T)return ve(e);var r=W(e,t);return Y(e),r}function S(e,t=1,r=!1){let n=T?M:e;for(var o;t--;)o=n,n=Le(n);if(!T)return n;if(r){if(n?.nodeType!==sn){var i=be();return n===null?o?.after(i):n.before(i),ne(i),i}Po(n)}return ne(n),n}function So(e){e.textContent=""}function qi(){if(!ke||Dt!==null)return!1;var e=k.f;return(e&32768)!==0}function Wt(e,t,r){return t==null||t===Ei?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Po(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===sn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var ca=new WeakMap;function $f(e){var t=k;if(t===null)return C.f|=8388608,e;if(b&&e instanceof Error&&!ca.has(e)&&ca.set(e,ku(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw b&&!t.parent&&e instanceof Error&&yf(e),e;lt(e,t)}function lt(e,t){if(e===it)throw e;if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw b&&e instanceof Error&&yf(e),e}}function ku(e,t){let r=ht(e,"message");if(!(r&&!r.configurable)){for(var n=Fo?" ":" ",o=`
74
74
  ${n}in ${t.fn?.name||"<unknown>"}`,i=t.ctx;i!==null;)o+=`
75
- ${n}in ${i.function?.[it].split("/").pop()}`,i=i.p;return{message:e.message+`
75
+ ${n}in ${i.function?.[st].split("/").pop()}`,i=i.p;return{message:e.message+`
76
76
  ${o}
77
77
  `,stack:e.stack?.split(`
78
78
  `).filter(a=>!a.includes("svelte/src/internal")).join(`
79
- `)}}}function gf(e){let t=ia.get(e);t&&(Ie(e,"message",{value:t.message}),Ie(e,"stack",{value:t.stack}))}function yf(e){k===null&&(C===null&&Ml(e),Ll()),Dt&&Dl(e)}function xu(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function lr(e,t){var r=k;if(b)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(e|=8192);var n={ctx:Y,deps:null,nodes:null,f:e|2048|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};b&&(n.component_function=gt),O?.register_created_effect(n);var o=n;if((e&4)!==0)Vn!==null?Vn.push(n):$t.ensure().schedule(n);else if(t!==null){try{sr(n)}catch(a){throw ge(n),a}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&524288)===0&&(o=o.first,(e&16)!==0&&(e&65536)!==0&&o!==null&&(o.f|=65536))}if(o!==null&&(o.parent=r,r!==null&&xu(o,r),C!==null&&(C.f&2)!==0&&(e&64)===0)){var i=C;(i.effects??(i.effects=[])).push(o)}return n}function Br(){return C!==null&&!rt}function Me(e){let t=lr(8,null);return ie(t,1024),t.teardown=e,t}function Xt(e){yf("$effect"),b&&Ie(e,"name",{value:"$effect"});var t=k.f,r=!C&&(t&32)!==0&&Y!==null&&!Y.i;if(r){var n=Y;(n.e??(n.e=[])).push(e)}else return Us(e)}function Us(e){return lr(1048580,e)}function la(e){$t.ensure();let t=lr(524352,e);return()=>{ge(t)}}function $f(e){$t.ensure();let t=lr(524352,e);return(r={})=>new Promise(n=>{r.outro?fr(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Et(e){return lr(4,e)}function Ql(e){return lr(4718592,e)}function He(e,t=0){return lr(8|t,e)}function z(e,t=[],r=[],n=[]){Oi(n,t,r,o=>{lr(8,()=>{e(...o.map(s))})})}function dt(e,t=0){var r=lr(16|t,e);return b&&(r.dev_stack=or),r}function Ne(e){return lr(524320,e)}function fa(e){var t=e.teardown;if(t!==null){let r=Dt,n=C;sa(!0),Se(null);try{t.call(null)}catch(o){at(o,e.parent)}finally{sa(r),Se(n)}}}function ko(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){let o=r.ac;o!==null&&yt(()=>{o.abort(gr)});var n=r.next;(r.f&64)!==0?r.parent=null:ge(r,t),r=n}}function wf(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&ge(t),t=r}}function ge(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ca(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,ko(e,t&&!r),cn(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(let i of n)i.stop();fa(e),e.f^=33554432,e.f|=16384;var o=e.parent;o!==null&&o.first!==null&&ta(e),b&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ca(e,t){for(;e!==null;){var r=e===t?null:Le(e);e.remove(),e=r}}function ta(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function fr(e,t,r=!0){var n=[];e.f|=256,xf(e,n,!0);var o=()=>{r&&ge(e),t&&t()},i=n.length;if(i>0){var a=()=>--i||o();for(var l of n)l.out(a)}else o()}function xf(e,t,r){if((e.f&8192)===0){e.f^=8192;var n=e.nodes&&e.nodes.t;if(n!==null)for(let l of n)(l.is_global||r)&&t.push(l);for(var o=e.first;o!==null;){var i=o.next;if((o.f&64)===0){var a=(o.f&65536)!==0||(o.f&32)!==0&&(e.f&16)!==0;xf(o,t,a?r:!1)}o=i}}}function Zn(e){e.f&=-257,Ef(e,!0)}function Ef(e,t){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=8192,(e.f&1024)===0&&(ie(e,2048),$t.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,o=(r.f&65536)!==0||(r.f&32)!==0;Ef(r,o?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(let a of i)(a.is_global||t)&&a.in()}}function Wn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var o=r===n?null:Le(r);t.append(r),r=o}}var Tf=null;var Dt=!1;function sa(e){Dt=e}var C=null,rt=!1;function Se(e){C=e}var k=null;function Re(e){k=e}var Ft=null;function Li(e){C!==null&&(!ke&&(C.f&2097152)!==0||(C.f&2)!==0)&&(Ft??(Ft=new Set)).add(e)}var Fe=null,tt=0,wt=null;function df(e){wt=e}var Af=1,vn=0,jr=vn;function oa(e){jr=e}function Pn(){return++Af}function zr(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,o=0;o<n;o++){var i=r[o];if(zr(i)&&js(i),i.wv>e.wv)return!0}(t&512)!==0&&Pe===null&&ie(e,1024)}return!1}function Sf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!ke&&Ft!==null&&Ft.has(e)))for(var o=0;o<n.length;o++){var i=n[o];(i.f&2)!==0?Sf(i,t,!1):t===i&&(r?ie(i,2048):(i.f&1024)!==0&&ie(i,4096),Co(i))}}function Di(e){var t=Fe,r=tt,n=wt,o=C,i=Ft,a=Y,l=rt,f=jr,u=e.f;Fe=null,tt=0,wt=null,C=(u&96)===0?e:null,Ft=null,br(e.ctx),rt=!1,jr=++vn,e.ac!==null&&(yt(()=>{e.ac.abort(gr)}),e.ac=null);try{e.f|=2097152;var v=e.fn,h=v();e.f|=32768;var m=kf(e);if(ir()&&wt!==null&&!rt&&m!==null&&(e.f&6146)===0)for(var _=0;_<wt.length;_++)Sf(wt[_],e);if(o!==null&&o!==e){if(vn++,o.deps!==null)for(let y=0;y<r;y+=1)o.deps[y].rv=vn;if(t!==null)for(let y of t)y.rv=vn;wt!==null&&(n===null?n=wt:n.push(...wt))}return(e.f&8388608)!==0&&(e.f^=8388608),h}catch(y){return kf(e),vf(y)}finally{e.f^=2097152,Fe=t,tt=r,wt=n,C=o,Ft=i,br(a),rt=l,jr=f}}function kf(e){var o;var t=e.deps,r=O?.is_fork;if(Fe!==null){var n;if(r||cn(e,tt),t!==null&&tt>0)for(t.length=tt+Fe.length,n=0;n<Fe.length;n++)t[tt+n]=Fe[n];else e.deps=t=Fe;if(Br()&&(e.f&512)!==0)for(n=tt;n<t.length;n++)((o=t[n]).reactions??(o.reactions=[])).push(e)}else!r&&t!==null&&tt<t.length&&(cn(e,tt),t.length=tt);return t}function Eu(e,t){let r=t.reactions;if(r!==null){var n=gl.call(r,e);if(n!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[n]=r[o],r.pop())}}if(r===null&&(t.f&2)!==0&&(Fe===null||!vr.call(Fe,t))){var i=t;(i.f&512)!==0&&(i.f^=512),i.v!==le&&On(i),i.ac!==null&&yt(()=>{i.ac.abort(gr),i.ac=null,ie(i,2048)}),Jl(i),cn(i,0)}}function cn(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Eu(e,r[n])}function sr(e){var t=e.f;if((t&16384)===0){ie(e,1024);var r=k;if(k=e,b){var n=gt;Ri(e.component_function);var o=or;Cn(e.dev_stack??or)}try{(t&16777232)!==0?wf(e):ko(e),fa(e);var i=Di(e);if(e.teardown=typeof i=="function"?i:null,e.wv=Af,b&&qt&&(e.f&2048)!==0&&e.deps!==null)for(var a of e.deps)a.set_during_effect&&(a.wv=Pn(),a.set_during_effect=!1)}finally{k=r,b&&(Ri(n),Cn(o))}}}async function Gr(){if(ke)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),qr()}function s(e){var t=e.f,r=(t&2)!==0;if(Tf?.add(e),C!==null&&!rt){var n=k!==null&&(k.f&16384)!==0;if(!n&&(Ft===null||!Ft.has(e))){var o=C.deps;if((C.f&2097152)!==0)e.rv<vn&&(e.rv=vn,Fe===null&&o!==null&&o[tt]===e?tt++:Fe===null?Fe=[e]:Fe.push(e));else{C.deps??(C.deps=[]),vr.call(C.deps,e)||C.deps.push(e);var i=e.reactions;i===null?e.reactions=[C]:vr.call(i,C)||i.push(C)}}}if(b){if(!rt&&lt&&O===null&&It===null&&!lt.warned&&(lt.effect.f&2097152)===0&&!lt.effect_deps.has(e)){lt.warned=!0,$l(e.label);var a=zt("traced at");a&&console.warn(a)}if(Eo.delete(e),qt&&!rt&&go!==null&&C!==null&&go.reaction===C){if(e.trace)e.trace();else if(a=zt("traced at"),a){var l=go.entries.get(e);l===void 0&&(l={traces:[]},go.entries.set(e,l));var f=l.traces[l.traces.length-1];a.stack!==f?.stack&&l.traces.push(a)}}}if(Dt&&Mt.has(e))return Mt.get(e);if(r){var u=e;if(Dt){var v=u.v;return((u.f&1024)===0&&u.reactions!==null||Nf(u))&&(v=To(u)),Mt.set(u,v),v}var h=(u.f&512)===0&&!rt&&C!==null&&(C.f&512)!==0,m=(u.f&32768)===0;zr(u)&&(h&&(u.f|=512),js(u)),h&&!m&&(Gs(u),Rf(u))}if(Pe?.has(e))return Pe.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Rf(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:vr.call(t,e)||t.push(e),(r.f&2)!==0&&(r.f&512)===0&&(Gs(r),Rf(r))}}function Nf(e){if(e.v===le)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||(t.f&2)!==0&&Nf(t))return!0;return!1}function se(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}function Yi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ke in e)Bi(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&Ke in r&&Bi(r)}}}function Bi(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Bi(e[n],t)}catch{}let r=rn(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=_i(r);for(let o in n){let i=n[o].get;if(i)try{i.call(e)}catch{}}}}}var ku=/\r/g;function Cf(e){e=e.replace(ku,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var Au=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var qh=[...Au,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Su=["touchstart","touchmove"];function Of(e){return Su.includes(e)}var Ru=["$state","$state.raw","$derived","$derived.by"],zh=[...Ru,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function qi(e){return e?.replace(/\//g,"/\u200B")}var gn=Symbol("events"),pa=new Set,zi=new Set;function Df(e,t,r,n={}){function o(i){if(n.capture||Gi.call(t,i),!i.cancelBubble)return yt(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?(o.__removed=!1,$e(()=>{o.__removed||t.addEventListener(e,o,n)})):t.addEventListener(e,o,n),o}function cr(e,t,r,n,o){var i={capture:n,passive:o},a=Df(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Me(()=>{a.__removed=!0,t.removeEventListener(e,a,i)})}function ye(e,t,r){(t[gn]??(t[gn]={}))[e]=r}function ji(e){for(var t=0;t<e.length;t++)pa.add(e[t]);for(var r of zi)r(e)}var ua=null,da=!1;function Gi(e){var t=this,r=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;ua=e,da||(da=!0,setTimeout(()=>{da=!1,ua=null}));var a=0,l=ua===e&&e[gn];if(l){var f=o.indexOf(l);if(f!==-1&&(t===document||t===window)){e[gn]=t;return}var u=o.indexOf(t);if(u===-1)return;f<=u&&(a=f)}if(i=o[a]||e.target,i!==t){Ie(e,"currentTarget",{configurable:!0,get(){return i||r}});var v=C,h=k;Se(null),Re(null);try{for(var m,_=[];i!==null&&i!==t;){try{var y=i[gn]?.[n];y!=null&&(!i.disabled||e.target===i)&&y.call(i,e)}catch(g){m?_.push(g):m=g}if(e.cancelBubble)break;a++,i=a<o.length?o[a]:null}if(m){for(let g of _)queueMicrotask(()=>{throw g});throw m}}finally{e[gn]=t,delete e.currentTarget,Se(v),Re(h)}}}var Cu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Lf(e){return Cu?.createHTML(e)??e}function _a(e){var t=Wt("template");return t.innerHTML=Lf(e.replaceAll("<!>","<!---->")),t.content}function Je(e,t){var r=k;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Q(e,t){var r=(t&1)!==0,n=(t&2)!==0,o,i=!e.startsWith("<!>");return()=>{if(T)return Je(M,null),M;o===void 0&&(o=_a(i?e:"<!>"+e),r||(o=ve(o)));var a=n||Oo?document.importNode(o,!0):o.cloneNode(!0);if(r){var l=ve(a),f=a.lastChild;Je(l,f)}else Je(a,a);return a}}function Lo(e=""){if(!T){var t=be(e+"");return Je(t,t),t}var r=M;return r.nodeType!==nn?(r.before(r=be()),ne(r)):Io(r),Je(r,r),r}function Ar(){if(T)return Je(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=be();return e.append(t,r),Je(t,r),e}function D(e,t){if(T){var r=k;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=M),De();return}e!==null&&e.before(t)}function Mf(e){let t=0,r=Xe(0),n;return b&&Ze(r,"createSubscriber version"),()=>{Br()&&(s(r),He(()=>(t===0&&(n=se(()=>e(()=>_n(r)))),t+=1,()=>{$e(()=>{t-=1,t===0&&(n?.(),n=void 0,_n(r))})})))}}var Lu=589824;function ya(e,t,r,n){new ma(e,t,r,n)}var Tt,Fo,Pt,bn,Qe,kt,nt,At,ur,yn,Zr,Xn,Po,Ho,dr,Zi,G,Pf,Hf,ha,Kr,Uf,va,Mo,Ki,ga,ba,ma=class{constructor(t,r,n,o){F(this,G);re(this,"parent");re(this,"is_pending",!1);re(this,"transform_error");F(this,Tt);F(this,Fo,T?M:null);F(this,Pt);F(this,bn);F(this,Qe);F(this,kt,null);F(this,nt,null);F(this,At,null);F(this,ur,null);F(this,yn,0);F(this,Zr,0);F(this,Xn,!1);F(this,Po,new Set);F(this,Ho,new Set);F(this,dr,null);F(this,Zi,Mf(()=>(I(this,dr,Xe(c(this,yn))),b&&Ze(c(this,dr),"$effect.pending()"),()=>{I(this,dr,null)})));I(this,Tt,t),I(this,Pt,r),I(this,bn,i=>{var a=k;a.b=this,a.f|=128,n(i)}),this.parent=k.b,this.transform_error=o??this.parent?.transform_error??(i=>i),I(this,Qe,dt(()=>{if(T){let i=on(c(this,Fo));De();let a=i==="[!";if(i.startsWith("[?")){let f=JSON.parse(i.slice("[?".length));L(this,G,Hf).call(this,f)}else a?L(this,G,Uf).call(this):L(this,G,Pf).call(this)}else L(this,G,va).call(this)},Lu)),T&&I(this,Tt,M)}defer_effect(t){Ni(t,c(this,Po),c(this,Ho))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Pt).pending}update_pending_count(t,r){L(this,G,ga).call(this,t,r),I(this,yn,c(this,yn)+t),!(!c(this,dr)||c(this,Xn))&&(I(this,Xn,!0),$e(()=>{I(this,Xn,!1),c(this,dr)&&Gt(c(this,dr),c(this,yn))}))}get_effect_pending(){return c(this,Zi).call(this),s(c(this,dr))}error(t){if(t===ot||!c(this,Pt).onerror&&!c(this,Pt).failed)throw t;O?.is_fork?(c(this,kt)&&O.skip_effect(c(this,kt)),c(this,nt)&&O.skip_effect(c(this,nt)),c(this,At)&&O.skip_effect(c(this,At)),O.oncommit(()=>{L(this,G,Kr).call(this)||L(this,G,ba).call(this,t)})):L(this,G,ba).call(this,t)}};Tt=new WeakMap,Fo=new WeakMap,Pt=new WeakMap,bn=new WeakMap,Qe=new WeakMap,kt=new WeakMap,nt=new WeakMap,At=new WeakMap,ur=new WeakMap,yn=new WeakMap,Zr=new WeakMap,Xn=new WeakMap,Po=new WeakMap,Ho=new WeakMap,dr=new WeakMap,Zi=new WeakMap,G=new WeakSet,Pf=function(){try{I(this,kt,Ne(()=>c(this,bn).call(this,c(this,Tt))))}catch(t){this.error(t)}},Hf=function(t){let r=c(this,Pt).failed,{reset:n,invoke_onerror:o}=L(this,G,ha).call(this,t);$e(o),r&&I(this,At,Ne(()=>{r(c(this,Tt),()=>t,()=>n)}))},ha=function(t){var r=!1,n=!1;let o=()=>{if(!L(this,G,Kr).call(this)){if(r){Sl();return}r=!0,n&&ql(),c(this,At)!==null&&fr(c(this,At),()=>{I(this,At,null)}),L(this,G,Ki).call(this,()=>{L(this,G,va).call(this)})}};return{reset:o,invoke_onerror:()=>{if(!L(this,G,Kr).call(this))try{n=!0,c(this,Pt).onerror?.(t,o),n=!1}catch(a){at(a,c(this,Qe)&&c(this,Qe).parent)}}}},Kr=function(){return(c(this,Qe).f&33570816)!==0},Uf=function(){let t=c(this,Pt).pending;t&&(this.is_pending=!0,I(this,nt,Ne(()=>t(c(this,Tt)))),$e(()=>{if(!L(this,G,Kr).call(this)){var r=I(this,ur,document.createDocumentFragment()),n=be(),o=!1;if(r.append(n),I(this,kt,L(this,G,Ki).call(this,()=>{try{return Ne(()=>c(this,bn).call(this,n))}catch(i){try{this.error(i),o=!0}catch(a){at(a,c(this,Qe).parent)}return null}})),c(this,kt)===null){I(this,ur,null),o&&L(this,G,Mo).call(this,O);return}c(this,Zr)===0&&(c(this,Tt).before(r),I(this,ur,null),fr(c(this,nt),()=>{I(this,nt,null)}),L(this,G,Mo).call(this,O))}}))},va=function(){try{if(this.is_pending=this.has_pending_snippet(),I(this,Zr,0),I(this,yn,0),I(this,kt,Ne(()=>{c(this,bn).call(this,c(this,Tt))})),c(this,Zr)>0){var t=I(this,ur,document.createDocumentFragment());Wn(c(this,kt),t);let r=c(this,Pt).pending;I(this,nt,Ne(()=>r(c(this,Tt))))}else L(this,G,Mo).call(this,O)}catch(r){this.error(r)}},Mo=function(t){this.is_pending=!1,t.transfer_effects(c(this,Po),c(this,Ho))},Ki=function(t){var r=k,n=C,o=Y;Re(c(this,Qe)),Se(c(this,Qe)),br(c(this,Qe).ctx);try{return $t.ensure(),t()}finally{Re(r),Se(n),br(o)}},ga=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&L(n=this.parent,G,ga).call(n,t,r);return}I(this,Zr,c(this,Zr)+t),c(this,Zr)===0&&(L(this,G,Mo).call(this,r),c(this,nt)&&fr(c(this,nt),()=>{I(this,nt,null)}),c(this,ur)&&(c(this,Tt).before(c(this,ur)),I(this,ur,null)))},ba=function(t){c(this,kt)&&(ge(c(this,kt)),I(this,kt,null)),c(this,nt)&&(ge(c(this,nt)),I(this,nt,null)),c(this,At)&&(ge(c(this,At)),I(this,At,null)),T&&(ne(c(this,Fo)),vo(),ne(nr()));let r=c(this,Pt).failed,n=o=>{if(L(this,G,Kr).call(this))return;let{reset:i,invoke_onerror:a}=L(this,G,ha).call(this,o);a(),r&&!L(this,G,Kr).call(this)&&I(this,At,L(this,G,Ki).call(this,()=>{try{return Ne(()=>{var l=k;l.b=this,l.f|=128,r(c(this,Tt),()=>o,()=>i)})}catch(l){return at(l,c(this,Qe).parent),null}}))};$e(()=>{if(!L(this,G,Kr).call(this)){var o;try{o=this.transform_error(t)}catch(i){at(i,c(this,Qe)&&c(this,Qe).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(n,i=>at(i,c(this,Qe)&&c(this,Qe).parent)):n(o)}})};var $a=!0;function R(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[n=_o]??(e[n]=e.nodeValue))&&(e[_o]=r,e.nodeValue=`${r}`)}function Xi(e,t){return Vf(e,t)}function Uo(e,t){Ui(),t.intro=t.intro??!1;let r=t.target,n=T,o=M;try{for(var i=ve(r);i&&(i.nodeType!==vt||i.data!=="[");)i=Le(i);if(!i)throw ot;Te(!0),ne(i);let a=Vf(e,{...t,anchor:i});return Te(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
80
- `).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==ot&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Pl(),Ui(),xo(r),Te(!1),Xi(e,t)}finally{Te(n),ne(o)}}var Wi=new Map;function Vf(e,{target:t,anchor:r,props:n={},events:o,context:i,intro:a=!0,transformError:l}){Ui();var f=void 0,u=$f(()=>{var v=r??t.appendChild(be());ya(v,{pending:()=>{}},_=>{bo({});var y=Y;if(i&&(y.c=i),o&&(n.$$events=o),T&&Je(_,null),$a=a,f=e(_,n)||$o(),$a=!0,T&&(k.nodes.end=M,M===null||M.nodeType!==vt||M.data!=="]"))throw Ur(),ot;yo()},l);var h=new Set,m=_=>{for(var y=0;y<_.length;y++){var g=_[y];if(!h.has(g)){h.add(g);var $=Of(g);for(let pe of[t,document]){var A=Wi.get(pe);A===void 0&&(A=new Map,Wi.set(pe,A));var K=A.get(g);K===void 0?(pe.addEventListener(g,Gi,{passive:$}),A.set(g,1)):A.set(g,K+1)}}}};return m(Sn(pa)),zi.add(m),()=>{for(var _ of h)for(let $ of[t,document]){var y=Wi.get($),g=y.get(_);--g==0?($.removeEventListener(_,Gi),y.delete(_),y.size===0&&Wi.delete($)):y.set(_,g)}zi.delete(m),v!==r&&v.parentNode?.removeChild(v)}});return wa.set(f,u),f}var wa=new WeakMap;function Vo(e,t){let r=wa.get(e);return r?(wa.delete(e),r(t)):(b&&kl(),Promise.resolve())}var Jt,pr,St,$n,Bo,Yo,Ji,_r=class{constructor(t,r=!0){re(this,"anchor");F(this,Jt,new Map);F(this,pr,new Map);F(this,St,new Map);F(this,$n,new Set);F(this,Bo,!0);F(this,Yo,t=>{if(c(this,Jt).has(t)){var r=c(this,Jt).get(t),n=c(this,pr).get(r);if(n)Zn(n),c(this,$n).delete(r);else{var o=c(this,St).get(r);o&&(Zn(o.effect),c(this,pr).set(r,o.effect),c(this,St).delete(r),b&&(o.fragment.lastChild[Ls]=this.anchor),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),n=o.effect)}for(let[i,a]of c(this,Jt)){if(c(this,Jt).delete(i),i===t)break;let l=c(this,St).get(a);l&&(ge(l.effect),c(this,St).delete(a))}for(let[i,a]of c(this,pr)){if(i===r||c(this,$n).has(i))continue;let l=()=>{if(Array.from(c(this,Jt).values()).includes(i)){var u=document.createDocumentFragment();Wn(a,u),u.append(be()),c(this,St).set(i,{effect:a,fragment:u})}else ge(a);c(this,$n).delete(i),c(this,pr).delete(i)};c(this,Bo)||!n?(c(this,$n).add(i),fr(a,l,!1)):l()}}});F(this,Ji,t=>{c(this,Jt).delete(t);let r=Array.from(c(this,Jt).values());for(let[n,o]of c(this,St))r.includes(n)||(ge(o.effect),c(this,St).delete(n))});this.anchor=t,I(this,Bo,r)}ensure(t,r){var n=O,o=Vi();if(r&&!c(this,pr).has(t)&&!c(this,St).has(t))if(o){var i=document.createDocumentFragment(),a=be();i.append(a),c(this,St).set(t,{effect:Ne(()=>r(a)),fragment:i})}else c(this,pr).set(t,Ne(()=>r(this.anchor)));if(c(this,Jt).set(n,t),o){for(let[l,f]of c(this,pr))l===t?n.unskip_effect(f):n.skip_effect(f);for(let[l,f]of c(this,St))l===t?n.unskip_effect(f.effect):n.skip_effect(f.effect);n.oncommit(c(this,Yo)),n.ondiscard(c(this,Ji))}else T&&(this.anchor=M),c(this,Yo).call(this,n)}};Jt=new WeakMap,pr=new WeakMap,St=new WeakMap,$n=new WeakMap,Bo=new WeakMap,Yo=new WeakMap,Ji=new WeakMap;function ae(e,t,r=!1){var n;T&&(n=M,De());var o=new _r(e),i=r?65536:0;function a(l,f){if(T){var u=on(n);if(l!==parseInt(u.substring(1))){var v=nr();ne(v),o.anchor=v,Te(!1),o.ensure(l,f),Te(!0);return}}o.ensure(l,f)}dt(()=>{var l=!1;t((f,u=0)=>{l=!0,a(u,f)}),l||a(-1,null)},i)}function Xr(e,t){return t}function Bu(e,t,r){for(var n=[],o=t.length,i,a=t.length,l=0;l<o;l++){let h=t[l];fr(h,()=>{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var m=e.outrogroups;xa(e,Sn(i.done)),m.delete(i),m.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var f=n.length===0&&r!==null&&e.pending.size===0;if(f){var u=r,v=u.parentNode;xo(v),v.append(u),e.items.clear()}xa(e,t,!f)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function xa(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(let a of e.pending.values())for(let l of a)n.add(e.items.get(l).e)}for(var o=0;o<t.length;o++){var i=t[o];if(n?.has(i)){i.f|=33554432;let a=document.createDocumentFragment();Wn(i,a)}else ge(t[o],r)}}var Qi;function Sr(e,t,r,n,o,i=null){var a=e,l=new Map,f=(t&4)!==0;if(f){var u=e;a=T?ne(ve(u)):u.appendChild(be())}T&&De();var v=null,h=Mn(()=>{var K=r();return Yt(K)?K:K==null?[]:Sn(K)});b&&Ze(h,"{#each ...}");var m=new Map,_=!0;function y(K){if((A.effect.f&16384)===0){A.pending.delete(K);var pe=s(h);A.fallback=v,Yu(A,pe,a,t,n),v!==null&&(pe.length===0?(v.f&33554432)===0?Zn(v):(v.f^=33554432,zo(v,null,a)):fr(v,()=>{v=null}))}}function g(K){A.pending.delete(K)}var $=dt(()=>{var K=s(h),pe=K.length;let xe=!1;if(T){var pt=on(a)==="[!";pt!==(pe===0)&&(a=nr(),ne(a),Te(!1),xe=!0)}for(var Ue=new Set,w=O,Qt=Vi(),_t=0;_t<pe;_t+=1){T&&M.nodeType===vt&&M.data==="]"&&(a=M,xe=!0,Te(!1));var je=K[_t],hr=n(je,_t);if(b){var mt=n(je,_t);hr!==mt&&Il(String(_t),String(hr),String(mt))}var ce=_?null:l.get(hr);ce?(ce.v&&Gt(ce.v,je),ce.i&&Gt(ce.i,_t),Qt&&w.unskip_effect(ce.e)):(ce=qu(l,_?a:Qi??(Qi=be()),je,hr,_t,o,t,r),_||(ce.e.f|=33554432),l.set(hr,ce)),Ue.add(hr)}if(pe===0&&i&&!v&&(_?v=Ne(()=>i(a)):(v=Ne(()=>i(Qi??(Qi=be()))),v.f|=33554432)),pe>Ue.size&&(b?zu(K,n):Hs("","","")),T&&pe>0&&ne(nr()),!_)if(m.set(w,Ue),Qt){for(let[ro,Cr]of l)Ue.has(ro)||w.skip_effect(Cr.e);w.oncommit(y),w.ondiscard(g)}else y(w);xe&&Te(!0),s(h)}),A={effect:$,flags:t,items:l,pending:m,outrogroups:null,fallback:v};_=!1,T&&(a=M)}function qo(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function Yu(e,t,r,n,o){var i=(n&8)!==0,a=t.length,l=e.items,f=qo(e.effect.first),u,v=null,h,m=[],_=[],y,g,$,A;if(i)for(A=0;A<a;A+=1)y=t[A],g=o(y,A),$=l.get(g).e,($.f&33554432)===0&&($.nodes?.a?.measure(),(h??(h=new Set)).add($));for(A=0;A<a;A+=1){if(y=t[A],g=o(y,A),$=l.get(g).e,e.outrogroups!==null)for(let je of e.outrogroups)je.pending.delete($),je.done.delete($);if(($.f&8192)!==0&&(Zn($),i&&($.nodes?.a?.unfix(),(h??(h=new Set)).delete($))),($.f&33554432)!==0)if($.f^=33554432,$===f)zo($,null,r);else{var K=v?v.next:f;$===e.effect.last&&(e.effect.last=$.prev),$.prev&&($.prev.next=$.next),$.next&&($.next.prev=$.prev),Wr(e,v,$),Wr(e,$,K),zo($,K,r),v=$,m=[],_=[],f=qo(v.next);continue}if($!==f){if(u!==void 0&&u.has($)){if(m.length<_.length){var pe=_[0],xe;v=pe.prev;var pt=m[0],Ue=m[m.length-1];for(xe=0;xe<m.length;xe+=1)zo(m[xe],pe,r);for(xe=0;xe<_.length;xe+=1)u.delete(_[xe]);Wr(e,pt.prev,Ue.next),Wr(e,v,pt),Wr(e,Ue,pe),f=pe,v=Ue,A-=1,m=[],_=[]}else u.delete($),zo($,f,r),Wr(e,$.prev,$.next),Wr(e,$,v===null?e.effect.first:v.next),Wr(e,v,$),v=$;continue}for(m=[],_=[];f!==null&&f!==$;)(u??(u=new Set)).add(f),_.push(f),f=qo(f.next);if(f===null)continue}($.f&33554432)===0&&m.push($),v=$,f=qo($.next)}if(e.outrogroups!==null){for(let je of e.outrogroups)je.pending.size===0&&(xa(e,Sn(je.done)),e.outrogroups?.delete(je));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||u!==void 0){var w=[];if(u!==void 0)for($ of u)($.f&8192)===0&&w.push($);for(;f!==null;)(f.f&8192)===0&&f!==e.fallback&&w.push(f),f=qo(f.next);var Qt=w.length;if(Qt>0){var _t=(n&4)!==0&&a===0?r:null;if(i){for(A=0;A<Qt;A+=1)w[A].nodes?.a?.measure();for(A=0;A<Qt;A+=1)w[A].nodes?.a?.fix()}Bu(e,w,_t)}}i&&$e(()=>{if(h!==void 0)for($ of h)$.nodes?.a?.apply()})}function qu(e,t,r,n,o,i,a,l){var f=(a&1)!==0?(a&16)===0?pn(r,!1,!1):Xe(r):null,u=(a&2)!==0?Xe(o):null;return b&&f&&(f.trace=()=>{l()[u?.v??o]}),{v:f,i:u,e:Ne(()=>(i(t,f??r,u??o,l),()=>{e.delete(n)}))}}function zo(e,t,r){if(e.nodes)for(var n=e.nodes.start,o=e.nodes.end,i=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var a=Le(n);if(i.before(n),n===o)return;n=a}}function Wr(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function zu(e,t){let r=new Map,n=e.length;for(let o=0;o<n;o++){let i=t(e[o],o);if(r.has(i)){let a=String(r.get(i)),l=String(o),f=String(i);f.startsWith("[object ")&&(f=null),Hs(a,l,f)}r.set(i,o)}}function ju(e,t,r){if(!t||t===Cf(String(r??"")))return;let n,o=e.__svelte_meta?.loc;o?n=`near ${o.file}:${o.line}:${o.column}`:gt?.[it]&&(n=`in ${gt[it]}`),Tl(qi(n))}function Ea(e,t,r=!1,n=!1,o=!1,i=!1){var a=e,l="";if(r){var f=e;T&&(a=ne(ve(f)))}z(()=>{var u=k;if(l===(l=t()??"")){T&&De();return}if(r&&!T){u.nodes=null,f.innerHTML=l,l!==""&&Je(ve(f),f.lastChild);return}if(u.nodes!==null&&(ca(u.nodes.start,u.nodes.end),u.nodes=null),l!==""){if(T){for(var v=M.data,h=De(),m=h;h!==null&&(h.nodeType!==vt||h.data!=="");)m=h,h=Le(h);if(h===null)throw Ur(),ot;b&&!i&&ju(h.parentNode,v,l),Je(M,m),a=ne(h);return}var _=n?mo:o?Fs:void 0,y=Wt(n?"svg":o?"math":"template",_);y.innerHTML=l;var g=n||o?y:y.content;if(Je(ve(g),g.lastChild),n||o)for(;ve(g);)a.before(ve(g));else a.before(g)}})}function wn(e,t,...r){var n=new _r(e);dt(()=>{let o=t()??null;b&&o==null&&Hl(),n.ensure(o,o&&(i=>o(i,...r)))},65536)}function Ta(e,t,r){Et(()=>{var n=se(()=>t(e,r?.())||{});if(r&&n?.update){var o=!1,i={};He(()=>{var a=r();Yi(a),o&&Ei(i,a)&&(i=a,n.update(a))}),o=!0}if(n?.destroy)return()=>n.destroy()})}var H$=[...`
81
- \r\f\xA0\v\uFEFF`];function Yf(e,t=!1){var r=t?" !important;":";",n="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(n+=" "+o+": "+i+r)}return n}function ka(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function qf(e,t){if(t){var r="",n,o;if(Array.isArray(t)?(n=t[0],o=t[1]):n=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var i=!1,a=0,l=!1,f=[];n&&f.push(...Object.keys(n).map(ka)),o&&f.push(...Object.keys(o).map(ka));var u=0,v=-1;let g=e.length;for(var h=0;h<g;h++){var m=e[h];if(l?m==="/"&&e[h-1]==="*"&&(l=!1):i?i===m&&(i=!1):m==="/"&&e[h+1]==="*"?l=!0:m==='"'||m==="'"?i=m:m==="("?a++:m===")"&&a--,!l&&i===!1&&a===0){if(m===":"&&v===-1)v=h;else if(m===";"||h===g-1){if(v!==-1){var _=ka(e.substring(u,v).trim());if(!f.includes(_)){m!==";"&&h++;var y=e.substring(u,h).trim();r+=" "+y+";"}}u=h+1,v=-1}}}}return n&&(r+=Yf(n)),o&&(r+=Yf(o,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Aa(e,t={},r,n){for(var o in r){var i=r[o];t[o]!==i&&(r[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,n))}}function xn(e,t,r,n){var o=e[po];if(T||o!==t){var i=qf(t,n);(!T||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e[po]=t}else n&&(Array.isArray(n)?(Aa(e,r?.[0],n[0]),Aa(e,r?.[1],n[1],"important")):Aa(e,r,n));return n}function Ra(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Ju(e,t){var r=e.__defaultValue,n=e.multiple,o=n?r??[]:null;if(!(n&&!Yt(o))){var i=e.selectedIndex,a=t&&n?new Set(e.selectedOptions):null;for(var l of e.options){var f=Sa(l);Ra(l,n?o.includes(f):Hi(f,r))}if(t)if(a!==null)for(l of e.options){var u=a.has(l);l.selected!==u&&(l.selected=u)}else e.selectedIndex!==i&&(e.selectedIndex=i)}}function Jr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Yt(t))return Al();for(var n of e.options)n.selected=t.includes(Sa(n));return}for(n of e.options){var o=Sa(n);if(Hi(o,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function En(e){var t=new MutationObserver(r=>{r.every(Qu)||("__defaultValue"in e&&Ju(e,!1),"__value"in e&&Jr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Me(()=>{t.disconnect()})}function Sa(e){return"__value"in e?e.__value:e.value}function Qu(e){if(e.target.closest("selectedcontent")!==null)return!0;if(e.type==="childList"){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(r=>r.nodeName==="SELECTEDCONTENT")}return!1}var od=Symbol("is custom element"),id=Symbol("is html"),sd=Ms?"link":"LINK";function Jn(e){if(T){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;ee(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var o=e.checked;ee(e,"checked",null),e.checked=o}}};e[Hr]=r,$e(r),Ci()}}function es(e,t){var r=Kf(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function ee(e,t,r,n){var o=Kf(e);if(T&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===sd)){n||ld(e,t,r??"");return}o[t]!==(o[t]=r)&&(t==="loading"&&(e[yl]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ad(e).has(t)?e[t]=r:e.setAttribute(t,r))}function Kf(e){var t;return e[t=yi]??(e[t]={[od]:e.nodeName.includes("-"),[id]:e.namespaceURI===$i})}var zf=new Map;function ad(e){var t=e.getAttribute("is")||e.nodeName,r=zf.get(t);if(r)return r;zf.set(t,r=new Set);for(var n,o=e,i=Element.prototype;i!==o;){n=_i(o);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);o=rn(o)}return r}function ld(e,t,r){b&&(t==="srcset"&&fd(e,r)||Na(e.getAttribute(t)??"",r)||El(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function Na(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function jf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function fd(e,t){var r=jf(e.srcset),n=jf(t);return n.length===r.length&&n.every(([o,i],a)=>i===r[a][1]&&(Na(r[a][0],o)||Na(o,r[a][0])))}function rs(e,t,r=t){var n=new WeakSet;Vs(e,"input",async o=>{b&&e.type==="checkbox"&&Ps();var i=o?e.defaultValue:e.value;if(i=Ca(e)?Oa(i):i,r(i),O!==null&&n.add(O),await Gr(),i!==(i=t())){var a=e.selectionStart,l=e.selectionEnd,f=e.value.length;if(e.value=i??"",l!==null){var u=e.value.length;a===l&&l===f&&u>f?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=a,e.selectionEnd=Math.min(l,u))}}}),(T&&e.defaultValue!==e.value||se(t)==null&&e.value)&&(r(Ca(e)?Oa(e.value):e.value),O!==null&&n.add(O)),He(()=>{b&&e.type==="checkbox"&&Ps();var o=t();if(e===document.activeElement){var i=ke?It:O;if(n.has(i))return}Ca(e)&&o===Oa(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function Ca(e){var t=e.type;return t==="number"||t==="range"}function Oa(e){return e===""?null:+e}function Ia(e,t){return e===t||e?.[Ke]===t}function Tn(e=$o(),t,r,n){var o=Y.r,i=k;return Et(()=>{var a,l;return He(()=>{a=l,l=n?.()||[],se(()=>{Ia(r(...l),e)||(t(e,...l),a&&Ia(r(...a),e)&&t(null,...a))})}),()=>{let f=i;for(;f!==o&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;let u=()=>{l&&Ia(r(...l),e)&&t(null,...l)},v=f.teardown;f.teardown=()=>{u(),v?.()}}}),e}function Zf(e){return new La(e)}var Rr,Ht,La=class{constructor(t){F(this,Rr);F(this,Ht);var r=new Map,n=(i,a)=>{var l=pn(a,!1,!1);return r.set(i,l),l};let o=new Proxy({...t.props||{},$$events:{}},{get(i,a){return s(r.get(a)??n(a,Reflect.get(i,a)))},has(i,a){return a===gi?!0:(s(r.get(a)??n(a,Reflect.get(i,a))),Reflect.has(i,a))},set(i,a,l){return E(r.get(a)??n(a,l),l),Reflect.set(i,a,l)}});I(this,Ht,(t.hydrate?Uo:Xi)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),!ke&&(!t?.props?.$$host||t.sync===!1)&&qr(),I(this,Rr,o.$$events);for(let i of Object.keys(c(this,Ht)))i==="$set"||i==="$destroy"||i==="$on"||Ie(this,i,{get(){return c(this,Ht)[i]},set(a){c(this,Ht)[i]=a},enumerable:!0});c(this,Ht).$set=i=>{Object.assign(o,i)},c(this,Ht).$destroy=()=>{Vo(c(this,Ht))}}$set(t){c(this,Ht).$set(t)}$on(t,r){c(this,Rr)[t]=c(this,Rr)[t]||[];let n=(...o)=>r.call(this,...o);return c(this,Rr)[t].push(n),()=>{c(this,Rr)[t]=c(this,Rr)[t].filter(o=>o!==n)}}$destroy(){c(this,Ht).$destroy()}};Rr=new WeakMap,Ht=new WeakMap;var bd;typeof HTMLElement=="function"&&(bd=class extends HTMLElement{constructor(t,r,n){super();re(this,"$$ctor");re(this,"$$s");re(this,"$$c");re(this,"$$cn",!1);re(this,"$$d",{});re(this,"$$r",!1);re(this,"$$p_d",{});re(this,"$$l",{});re(this,"$$l_u",new Map);re(this,"$$me");re(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let o=this.$$c.$on(t,r);this.$$l_u.set(r,o)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return i=>{let a=Wt("slot");o!=="default"&&(a.name=o),D(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=yd(this);for(let o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),r.default=!0):r[o]=t(o));for(let o of this.attributes){let i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=Ma(i,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Zf({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=la(()=>{He(()=>{this.$$r=!0;for(let o of Cs(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let i=Ma(o,this.$$d[o],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,i)}this.$$r=!1})});for(let o in this.$$l)for(let i of this.$$l[o]){let a=this.$$c.$on(o,i);this.$$l_u.set(i,a)}this.$$l={}}}attributeChangedCallback(t,r,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ma(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Cs(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Ma(e,t,r,n){let o=r[e]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function yd(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}if(b){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;Ul(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function Wf(e){Y===null&&ki("onMount"),Vr&&Y.l!==null?wd(Y).m.push(e):Xt(()=>{let t=se(e);if(typeof t=="function")return t})}function wd(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var Xf;typeof window<"u"&&((Xf=window.__svelte??(window.__svelte={})).v??(Xf.v=new Set)).add("5");var Fa=["directory","file","link"];function Ed(e){if(typeof e!="object"||e===null)return!1;let t=e;return["name","size","modified"].includes(String(t.field))&&["asc","desc"].includes(String(t.direction))&&["natural","locale","unicode"].includes(String(t.nameMode))&&typeof t.directoriesFirst=="boolean"}function Jf(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(e,1e9)):0}function ns(e,t,r,n,o=[],i=null){let a=new URL(e).searchParams,l={...n,query:(a.get("dw.q")??"").slice(0,4096),selected:null,windowY:0,listTop:0};if(t==="ledger"){let f=a.get("dw.sort")?.split(":");if(f?.length===4){let u={field:f[0],direction:f[1],nameMode:f[2],directoriesFirst:f[3]==="folders"};["folders","mixed"].includes(f[3])&&Ed(u)&&(l.sort=u)}if(a.has("dw.types")){let u=a.get("dw.types").split(",").filter(Boolean);u.every(v=>Fa.includes(v))&&(l.types=[...new Set(u)])}}else{let f=a.get("dw.category");f!==null&&o.includes(f)&&(l.category=f)}if(typeof i=="object"&&i!==null&&"dirwell"in i){let f=i.dirwell;if(typeof f=="object"&&f!==null&&"version"in f&&f.version===1&&"theme"in f&&f.theme===t&&"path"in f&&f.path===r&&"view"in f&&typeof f.view=="object"&&f.view!==null){let u=f.view;l.selected=typeof u.selected=="string"&&u.selected.length<=4096?u.selected:null,l.windowY=Jf(u.windowY),l.listTop=Jf(u.listTop)}}return l}function Td(e,t,r,n){let o=new URL(e);for(let i of["dw.q","dw.sort","dw.types","dw.category"])o.searchParams.delete(i);if(r.query&&o.searchParams.set("dw.q",r.query.slice(0,4096)),t==="ledger"){if(r.sort&&["field","direction","nameMode","directoriesFirst"].some(i=>r.sort[i]!==n.sort?.[i])){let i=r.sort;o.searchParams.set("dw.sort",`${i.field}:${i.direction}:${i.nameMode}:${i.directoriesFirst?"folders":"mixed"}`)}r.types&&Fa.some(i=>r.types.includes(i)!==(n.types??Fa).includes(i))&&o.searchParams.set("dw.types",r.types.join(","))}else r.category&&r.category!==n.category&&o.searchParams.set("dw.category",r.category);return o.href}function Qf(e){let t=location.href,r=history.state,n=(o,i,a)=>({...typeof history.state=="object"&&history.state!==null?history.state:{},dataHref:o,dirwell:{version:1,theme:e,path:i,...a===void 0?{}:{view:{query:a.query,...a.sort===void 0?{}:{sort:{...a.sort}},...a.types===void 0?{}:{types:[...a.types]},category:a.category??null,selected:a.selected??null,windowY:a.windowY??0,listTop:a.listTop??0}}}});return{save(o,i,a,l){if(location.href!==t)return;let f=Td(t,e,a,l),u=n(o,i,a);try{history.replaceState(u,"",f),t=f,r=u}catch{}},commit(o,i,a,l){let f=n(o,i);l?history.pushState(f,"",a):history.replaceState(f,"",a),t=a,r=f},rollback(){if(location.href!==t)try{history.replaceState(r,"",t)}catch{}}}}var kd={directory:'<path d="M3 7V5h6l2 3h10v12H3Z"/><path d="M3 10h18"/>',file:'<path d="M5 3h9l5 5v13H5ZM14 3v5h5M8 12h8M8 16h6"/>',link:'<path d="m9 15 6-6M8 10l-3 3a4 4 0 0 0 6 6l3-3M10 8l3-3a4 4 0 0 1 6 6l-3 3"/>'};function ec(e){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${kd[e]}</svg>`}function Pa(e){let t=new Set,r=(o,i)=>{if(i>32)throw new TypeError("Presentation data is too deeply nested");if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"&&Number.isFinite(o))return o;if(typeof o!="object"||o===null||t.has(o))throw new TypeError("Presentation data must be finite, acyclic JSON");t.add(o);try{if(Array.isArray(o))return o.map(a=>r(a,i+1));if(Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null)throw new TypeError("Presentation data must use plain objects");return Object.fromEntries(Object.entries(o).map(([a,l])=>[a,r(l,i+1)]))}finally{t.delete(o)}};if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Presentation data must be an object");let n=r(e,0);if(typeof n!="object"||n===null||Array.isArray(n))throw new TypeError("Presentation data must be an object");return n}var V=class extends Error{constructor(){super(...arguments);re(this,"name","ListingDataError")}},jo=class extends V{},Qn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),os=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0,tc=e=>typeof e=="string"&&["directory","file","symlink","other"].includes(e);function Nr(e,t){if(typeof e!="string")throw new V(`Invalid ${t}`);return e}function Ha(e,t){if(typeof e!="boolean")throw new V(`Invalid ${t}`);return e}function Ad(e,t){if(e===null)return null;let r=new URL(Nr(e,"href"),t);if(!["http:","https:"].includes(r.protocol))throw new V("Unsupported listing link protocol");return r.href}function rc(e,t){if(!Qn(e)||!tc(e.kind)||typeof e.size!="number"||!Number.isFinite(e.size)||e.size<0)throw new V("Invalid listing entry");let r=null;if(e.link!==null){if(!Qn(e.link))throw new V("Invalid link metadata");let n=e.link.targetKind;if(n!==null&&(!tc(n)||n==="symlink"))throw new V("Invalid target kind");let o=e.link.targetSize;if(o!==null&&(typeof o!="number"||!Number.isFinite(o)||o<0))throw new V("Invalid target size");r={target:Nr(e.link.target,"target"),targetKind:n,targetSize:o,unavailable:Ha(e.link.unavailable,"unavailable"),cycle:Ha(e.link.cycle,"cycle")}}return{...e.data===void 0?{}:{data:Pa(e.data)},...e.presentation===void 0?{}:{presentation:Pa(e.presentation)},id:Nr(e.id,"id"),name:Nr(e.name,"name"),kind:e.kind,href:Ad(e.href,t),exitsExplorer:Ha(e.exitsExplorer,"exitsExplorer"),size:e.size,modifiedAt:Nr(e.modifiedAt,"modifiedAt"),link:r}}function Sd(e){if(!Qn(e)||e.version!==1||!os(e.total)||!Array.isArray(e.blocks)||!Qn(e.sort))throw new V("Invalid listing manifest");let t=e.sort;if(typeof t.field!="string"||!["name","size","modified"].includes(t.field)||typeof t.direction!="string"||!["asc","desc"].includes(t.direction)||typeof t.nameMode!="string"||!["locale","natural","unicode"].includes(t.nameMode)||typeof t.directoriesFirst!="boolean")throw new V("Invalid listing order");let r=t.field==="size"?"size":t.field==="modified"?"modified":"name",n=t.direction==="desc"?"desc":"asc",o=t.nameMode==="unicode"?"unicode":t.nameMode==="locale"?"locale":"natural",i=e.blocks.map(a=>{if(!Qn(a)||!os(a.offset)||!os(a.count))throw new V("Invalid block descriptor");return{href:Nr(a.href,"block href"),offset:a.offset,count:a.count}});if(i.length===0)throw new V("Missing blocks");return{version:1,revision:Nr(e.revision,"revision"),directory:Nr(e.directory,"directory"),hrefBase:Nr(e.hrefBase,"href base"),total:e.total,sort:{field:r,direction:n,nameMode:o,directoriesFirst:t.directoriesFirst},blocks:i}}async function Go(e,t={}){let r=t.fetch??fetch,n=t.maxEntries??1e5;if(!os(n))throw new V("Invalid entry limit");let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new V("Listing loading requires HTTP(S); use native file navigation");for(let i=0;i<2;i++)try{let a={...t.signal===void 0?{}:{signal:t.signal},cache:i===0?t.cache??"default":"reload"},l=await r(o,a);if(!l.ok)throw new V(`Manifest request failed: ${l.status}`);let f=Sd(await l.json());if(f.total>n)throw new V("Listing exceeds the configured entry limit");let u=new URL(f.hrefBase,o);if(!["http:","https:"].includes(u.protocol))throw new V("Unsupported href base protocol");let v=[],h=new Set;for(let m of f.blocks){if(m.offset!==v.length||m.count+v.length>f.total)throw new V("Invalid block coverage");let _=new URL(m.href,o);if(_.origin!==o.origin||!["http:","https:"].includes(_.protocol))throw new V("Block leaves the manifest origin");let y=await r(_,a);if(y.status===404||y.status===410)throw new jo("Block no longer available");if(!y.ok)throw new V(`Block request failed: ${y.status}`);let g=await y.json();if(!Qn(g)||g.version!==1||g.revision!==f.revision)throw new jo("Listing revision changed");if(g.offset!==m.offset||g.total!==f.total||!Array.isArray(g.entries)||g.entries.length!==m.count)throw new V("Invalid block envelope");for(let $ of g.entries){let A=rc($,u);if(h.has(A.id))throw new V("Duplicate entry ID");h.add(A.id),v.push(A)}}if(v.length!==f.total)throw new V("Incomplete listing");return{manifest:f,entries:v}}catch(a){if(t.signal?.aborted||!(a instanceof jo)||i===1)throw a}throw new V("Listing unavailable")}function nc(e,t,r=1e5){if(!Array.isArray(e)||e.length>r)throw new V("Invalid page slice");let n=new URL(t),o=new Set,i=e.map(a=>rc(a,n));for(let a of i){if(o.has(a.id))throw new V("Duplicate entry ID");o.add(a.id)}return i}var Rd={other:"other",crosswaveKeyboardHelp:"Arrow keys navigate \xB7 Enter confirms \xB7 Backspace returns",brokenLink:"broken link",unavailableLink:"unavailable link",cycleLink:"cycle link",azure:"azure",violet:"violet",amber:"amber",rose:"rose",jade:"jade",graphite:"graphite",allFiles:"All files",categoryFolders:"Folders",categoryPhotos:"Photos",categoryMusic:"Music",categoryVideos:"Videos",categoryDocuments:"Documents",categoryOther:"Other",indexOf:"Index of {path}",home:"Home",breadcrumb:"Breadcrumb",archive:"File archive",searchDirectory:"Search this directory",searchFiles:"Search files",search:"Search",types:"Types",directory:"directory",file:"file",link:"link",folder:"Folder",sort:"Sort",name:"Name",size:"Size",modified:"Modified",names:"Names",natural:"Natural",locale:"Locale",unicode:"Unicode",order:"Order",ascending:"Ascending",descending:"Descending",directoriesFirst:"Folders first",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",searchArchive:"Search archive",archiveSearchInput:"Search archive files",entries:"{count} entries",pageEntries:"{total} entries \xB7 {count} on this page",loading:"Loading\u2026",noMatches:"No matching entries.",empty:"This directory is empty.",pagination:"Pagination",previous:"Previous",next:"Next",page:"Page {page} of {pages}",keyboardHelp:"Arrow keys select files \xB7 Home / End jump \xB7 / searches \xB7 Backspace opens parent",modifiedTime:"Modified time",close:"Close",unknown:"Unknown",unavailable:"Target unavailable",beginArchive:"Enter a search to begin.",searchingArchive:"Searching archive\u2026",archiveResults:"{count} results",truncatedResults:"Showing {shown} of {count} results",archiveError:"Could not load archive search. Try again.",listingError:"Could not load complete directory data. Native page links remain available.",folderError:"Could not open the folder. Its native link remains available.",updatesError:"Live updates disconnected. Refresh to retry.",retry:"Retry",openNative:"Open folder directly",categories:"File categories",items:"{count} items",filesIn:"Files in {path}",controller:"Controller \xB7 Confirm / Back",color:"Color",pauseMotion:"Pause motion",resumeMotion:"Resume motion",copyLink:"Copy link",copyPath:"Copy path",download:"Download",copied:"Copied.",copyError:"Could not copy. Use the native link or select the path.",repository:"Repository",author:"by",target:"Target",newTab:"opens in a new tab"};function eo(e={}){let t=e.language===void 0?"en":e.language,r=e.locale===void 0?"en-US":e.locale,n=e.timeZone===void 0?"UTC":e.timeZone;for(let[h,m]of Object.entries({language:t,locale:r,timeZone:n}))if(typeof m!="string"||!m)throw new TypeError(`${h} must be a non-empty string`);new Intl.DateTimeFormat(r,{timeZone:n});let o=e.direction??"ltr";if(o!=="ltr"&&o!=="rtl")throw new TypeError("direction must be ltr or rtl");let i={...Rd};if(e.labels!==void 0){if(typeof e.labels!="object"||e.labels===null||Array.isArray(e.labels))throw new TypeError("labels must be an object");for(let[h,m]of Object.entries(e.labels)){if(!Object.hasOwn(i,h)||typeof m!="string")throw new TypeError(`Unsupported label or value: ${h}`);Object.assign(i,{[h]:m})}}let a=e.brand??{};if(typeof a!="object"||a===null||Array.isArray(a))throw new TypeError("brand must be an object");for(let[h,m]of Object.entries(a)){if(!["name","logoUrl","logoAlt","footerText","footerUrl","faviconUrl"].includes(h)||typeof m!="string")throw new TypeError(`Unsupported brand option or value: ${h}`);if(h.endsWith("Url")&&!/^https?:\/\//i.test(m)&&!(m.startsWith("/")&&!m.startsWith("//")))throw new TypeError(`brand.${h} must be an HTTP(S) or root-relative URL`)}let l=e.columns??["name","size","modified"];if(!Array.isArray(l)||!l.includes("name"))throw new TypeError("columns must contain name and unique supported columns");let f=new Set;for(let h of l){let m;if(typeof h=="string"){if(!["name","size","modified"].includes(h))throw new TypeError("Unsupported column");m=h}else{if(typeof h!="object"||h===null||Object.keys(h).some(_=>!["dataKey","label"].includes(_))||typeof h.dataKey!="string"||!h.dataKey||typeof h.label!="string"||!h.label)throw new TypeError("Data columns require dataKey and label");m="data:"+h.dataKey}if(f.has(m))throw new TypeError("columns must contain unique supported columns");f.add(m)}let u=e.actions??[];if(!Array.isArray(u)||new Set(u).size!==u.length||u.some(h=>!["copy-link","copy-path","download"].includes(h)))throw new TypeError("actions must contain unique supported actions");let v=e.cssVariables??{};if(typeof v!="object"||v===null||Array.isArray(v))throw new TypeError("cssVariables must be an object");for(let[h,m]of Object.entries(v))if(!/^--[a-zA-Z][a-zA-Z0-9_-]*$/.test(h)||typeof m!="string"||/[{};<>]/.test(m))throw new TypeError(`Invalid CSS variable: ${h}`);return{language:t,dateOptions:{...e.locale===void 0?{}:{locale:e.locale},...e.timeZone===void 0?{}:{timeZone:e.timeZone}},direction:o,locale:r,timeZone:n,labels:i,brand:{...a},columns:l.map(h=>typeof h=="string"?h:{...h}),actions:[...u],cssVariables:{...v}}}var sS=eo();function Zo(e,t,r={}){return e.labels[t].replace(/\{([a-zA-Z]+)\}/g,(n,o)=>Object.hasOwn(r,o)?String(r[o]):n)}var Ko=new Map;function Ua(e,t,r=!1){let n=new Date(e);if(Number.isNaN(n.getTime()))return t.labels.unknown;if(t.dateOptions.locale===void 0&&t.dateOptions.timeZone===void 0)return r?n.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"}):n.toISOString().slice(0,16).replace("T"," ")+" UTC";let o=t.dateOptions.locale,i=t.dateOptions.timeZone??(r?void 0:"UTC"),a=String(o)+"\0"+String(i),l=Ko.get(a);return l===void 0&&(l=new Intl.DateTimeFormat(o,{timeZone:i,dateStyle:"short",timeStyle:"short"}),Ko.size>=32&&Ko.delete(Ko.keys().next().value),Ko.set(a,l)),l.format(n)}async function oc(e,t){let r=e==="copy-link"&&t.href?new URL(t.href,document.baseURI).href:t.id;if(!navigator.clipboard?.writeText)throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(r)}function ic(e,t){return typeof e=="string"?t.labels[e]:e.label}function sc(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}async function Va(e,t,r,n,o=!1,i=0){let a=new URL(e,document.baseURI);if(a.origin!==location.origin)throw new V("Folder leaves the theme origin");let l=await fetch(a,{signal:n,cache:o?"no-store":"default"});if(!l.ok)throw new V("Unavailable folder");let f=await l.json();if(typeof f!="object"||f===null||Array.isArray(f))throw new V("Invalid folder snapshot");let u=f;if(u.version!==1||u.theme!==r||typeof u.title!="string"||typeof u.path!="string"||!Number.isSafeInteger(u.total)||Number(u.total)<0||!Array.isArray(u.breadcrumbs))throw new V("Unsupported folder snapshot");if(u.metadataHead!==void 0&&typeof u.metadataHead!="string")throw new V("Invalid folder metadata");let v=u.sort;if(!v||typeof v!="object"||!["name","size","modified"].includes(String(v.field))||!["asc","desc"].includes(String(v.direction))||!["natural","locale","unicode"].includes(String(v.nameMode))||typeof v.directoriesFirst!="boolean")throw new V("Invalid folder order");if(r==="crosswave"){let g=u.categories,$=new Set;if(!Array.isArray(g)||g.length===0||g.some(A=>typeof A!="object"||A===null||typeof A.id!="string"||!A.id||$.has(A.id)||typeof A.label!="string"||typeof A.svg!="string"?!0:($.add(A.id),!1)))throw new V("Invalid folder categories")}let h=document.querySelector("base")?.href??t,m=g=>{if(g===null)return null;if(typeof g!="string")throw new V("Invalid folder link");let $=new URL(g,h);if(!["http:","https:"].includes($.protocol)||$.origin!==location.origin)throw new V("Unsupported folder link");return $.href},_=nc(u.entries,h).map(g=>({...g,...g.presentation?{presentation:{...g.presentation,folderDataHref:m(g.presentation.folderDataHref??null)}}:{}}));if(_.length>Number(u.total))throw new V("Invalid folder count");if(u.page!==null){let g=u.page;if(!g||typeof g!="object"||!Number.isSafeInteger(g.number)||Number(g.number)<1||!Number.isSafeInteger(g.count)||Number(g.count)<Number(g.number)||!Number.isSafeInteger(g.offset)||Number(g.offset)<0||Number(g.offset)>Number(u.total)||g.total!==u.total)throw new V("Invalid folder pagination");u.page={...g,href:m(g.href),previousHref:m(g.previousHref),nextHref:m(g.nextHref)}}u.ui!==void 0&&eo(u.ui);let y={...u,updatesHref:m(u.updatesHref??null),entries:_,dataHref:a.href,manifestHref:m(u.manifestHref),rootHref:m(u.rootHref),rootDataHref:m(u.rootDataHref),parentHref:m(u.parentHref),parentDataHref:m(u.parentDataHref),breadcrumbs:u.breadcrumbs.map(g=>{if(typeof g!="object"||g===null||!("name"in g)||!("href"in g)||!("dataHref"in g)||typeof g.name!="string")throw new V("Invalid breadcrumb");return{name:g.name,href:m(g.href),dataHref:m(g.dataHref)}})};if(y.manifestHref){let g=await Go(y.manifestHref,{signal:n,cache:o?"no-store":"default"});if(g.manifest.total!==u.total||u.listingRevision!==void 0&&g.manifest.revision!==u.listingRevision){if(i<2)return Va(e,t,r,n,!0,i+1);throw new V("Folder changed while refreshing")}y.entries=[...g.entries]}return y}var is=new WeakMap;function ac(e,t){if(!t||typeof document>"u")return e;let r=document.querySelector("[data-dirwell-theme]");if(!r)return e;let n=is.get(r)??e;return is.set(r,n),n}function lc(e,t){let r=document.querySelector("[data-dirwell-theme]");r&&is.has(r)&&is.set(r,e),document.title=typeof e.title=="string"?e.title:"";let n=document.createElement("template");n.innerHTML=typeof e.metadataHead=="string"?e.metadataHead:"",document.head.querySelectorAll("[data-dirwell-metadata]").forEach(a=>a.remove());let o=document.querySelector("base")?.href??t,i=a=>{try{let l=new URL(a,o);return["http:","https:"].includes(l.protocol)?l.href:null}catch{return null}};for(let a of n.content.children){if(!a.hasAttribute("data-dirwell-metadata"))continue;let l;if(a.tagName==="META"){let f=a.hasAttribute("property")?"property":"name",u=a.getAttribute(f)??"";if(!/^(?:description|og:[a-z_:]+|twitter:[a-z_:]+)$/i.test(u))continue;let v=a.getAttribute("content")??"";if(["og:image","og:url","twitter:image"].includes(u)){let h=i(v);if(h===null)continue;v=h}l=document.createElement("meta"),l.setAttribute(f,u),l.setAttribute("content",v)}else if(a.tagName==="LINK"&&a.getAttribute("rel")==="canonical"){let f=i(a.getAttribute("href")??"");if(f===null)continue;l=document.createElement("link"),l.setAttribute("rel","canonical"),l.setAttribute("href",f)}else continue;l.setAttribute("data-dirwell-metadata",""),document.head.append(l)}}var to=e=>e.kind==="directory"||e.link?.targetKind==="directory",Ba=e=>e.kind==="symlink"?"link":to(e)?"directory":"file";function Ya(e,t){let r=0,n=0,o=-2;for(let i of e.trim().toLocaleLowerCase()){let a=t.toLocaleLowerCase().indexOf(i,n);if(a<0)return null;a===o+1&&(r+=8),(a===0||/[\s/_.-]/.test(t[a-1]??""))&&(r+=5),r+=Math.max(0,4-a*.05),o=a,n=a+1}return r-t.length*.01}function cc(e,t,r,n){return e.map(o=>({entry:o,score:Ya(t,`${o.name} ${o.link?.target??""}`)})).filter(o=>r.includes(Ba(o.entry))&&o.score!==null).sort((o,i)=>{if(t.trim()&&o.score!==i.score)return(i.score??0)-(o.score??0);let a=o.entry,l=i.entry;if(n.directoriesFirst&&to(a)!==to(l))return to(a)?-1:1;let f=()=>n.nameMode==="unicode"?fc(a.name,l.name):a.name.localeCompare(l.name,void 0,{numeric:n.nameMode==="natural",sensitivity:"base"}),u=(n.field==="name"?f():n.field==="size"?(a.kind==="directory"?0:a.size)-(l.kind==="directory"?0:l.size):a.modifiedAt.localeCompare(l.modifiedAt))||f();return(n.direction==="asc"?u:-u)||fc(a.id,l.id)}).map(o=>o.entry)}function fc(e,t){let r=[...e],n=[...t];for(let o=0;o<Math.min(r.length,n.length);o++){let i=(r[o]?.codePointAt(0)??0)-(n[o]?.codePointAt(0)??0);if(i)return i}return r.length-n.length}function uc(e){let t=["B","KiB","MiB","GiB","TiB"],r=e,n=0;for(;r>=1024&&n<4;)r/=1024,n++;return`${r.toFixed(n===0||r>=100?0:1)} ${t[n]}`}var Nd=Q('<img width="40" height="40"/>'),Cd=Q("<!> <h1> </h1> <span> </span>",1),Od=Q("/ <a> </a>",1),Id=Q('<label><input type="checkbox"/> </label>'),ss=Q("<button> </button>"),qa=Q("<a> </a>"),Dd=Q("<span> </span>"),Ld=Q('<li class="entry"><a>../</a></li>'),dc=Q('<li aria-hidden="true"></li>'),Md=Q('<span class="file-icon" aria-hidden="true"></span> ',1),Fd=Q('<a class="name"><!></a>'),Pd=Q("<span><!></span>"),Hd=Q('<small class="target"> </small>'),Ud=Q('<span class="identity"><!><!></span>'),Vd=Q('<span class="kind"> </span>'),Bd=Q('<button class="timestamp-button"><time> </time></button>'),Yd=Q('<span class="entry-data"> </span>'),qd=Q('<a download=""> </a>'),zd=Q('<span data-dirwell-actions="" style="grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem"><!> <!></span>'),jd=Q('<li class="entry" data-entry=""><!> <!></li>'),Gd=Q("<p> </p>"),Kd=Q('<a rel="prev"> </a>'),Zd=Q('<a rel="next"> </a>'),Wd=Q("<nav><!> <!></nav>"),Xd=Q('<p class="brand-footer"><!></p>'),Jd=Q('<p class="keyboard-help"> </p>'),Qd=Q("<dialog><h2> </h2> <p> </p> <p> </p> <button> </button></dialog>"),ep=Q("<li><!></li>"),tp=Q('<dialog><h2> </h2> <input type="search"/> <p role="status"> </p> <!> <ul></ul> <button> </button></dialog>'),rp=Q('<header class="page-header"><div class="wordmark"><!></div> <nav><a> </a><!></nav></header> <main data-explorer="" data-framework="svelte"><div class="toolbar"><label class="search-field"> <input type="search"/></label> <fieldset><legend> </legend><!></fieldset> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option></select></label> <label><input type="checkbox"/> </label> <label> <select><option> </option><option> </option><option> </option></select></label> <!></div> <section class="listing-card"><div class="listing-summary"> <span data-visible-count=""> </span> <span role="status" aria-live="polite"> </span></div> <!> <!> <div class="entry-head"></div> <ul class="entry-list"><!> <!> <!> <!></ul> <!></section> <!> <!></main> <!> <!>',1);function za(e,t){bo(t,!0);let r=se(()=>ac(t.model,!1)),n=q(r),o=q(r.entries),i=q(""),a=q(Zt(["directory","file","link"])),l=q(r.sort),f=q("system"),u=q(null),v=q(!1),h=q(!1),m=q(""),_=q(null),y=q(null),g=q(!1),$=q(0),A=q(800),K=q(!1),pe=q(""),xe=q([]),pt=q(Zt(eo(r.ui).labels.beginArchive)),Ue=q(null),w=Ot(()=>eo(s(n).ui)),Qt=q(!1),_t=Ot(()=>Zo(s(w),s(mt)?"entries":"pageEntries",{count:"__COUNT__",total:s(n).total}).split("__COUNT__")),je=q(new Map),hr=Ot(()=>s(v)&&s(n).updatesHref?new URL(s(n).updatesHref,document.baseURI).href:null),mt=Ot(()=>s(o).length===s(n).total),ce=Ot(()=>cc(s(o),s(g)?"":s(i),s(a),s(l))),ro=Ot(()=>s(v)&&s(ce).length>500),Cr=Ot(()=>{let d=[0];for(let p of s(ce))d.push(d.at(-1)+(s(je).get(p.id)??76));return d}),no=Ot(()=>{if(!s(ro))return 0;let d=0,p=s(ce).length;for(;d<p;){let x=d+p>>1;s(Cr)[x+1]<=s($)?d=x+1:p=x}return Math.max(0,d-5)}),as=Ot(()=>{if(!s(ro))return s(ce).length;let d=0,p=s(ce).length;for(;d<p;){let x=d+p>>1;s(Cr)[x+1]<=s($)+s(A)?d=x+1:p=x}return Math.min(s(ce).length,Math.max(s(no)+35,d+5))});function pc(d,p){if(typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{let N=d.getBoundingClientRect().height;if(N>0&&s(je).get(p)!==N){let U=new Map(s(je));U.set(p,N),E(je,U)}});return x.observe(d),{destroy:()=>x.disconnect()}}let Or=q(void 0),Wo=q(void 0),ls=q(void 0),oo=q(void 0),io=q(void 0),Ir=0,so,fs,Xo=0,ja=null,Ga="",Ka=0,kn,An=null,ao=d=>({query:"",sort:d.sort,types:["directory","file","link"]});function cs(){kn&&kn.save(new URL(s(n).dataHref,document.baseURI).href,s(n).path,{query:s(i),types:s(a),sort:s(l),selected:s(u),windowY:window.scrollY,listTop:s($)},ao(s(n)))}function _c(){s(_)==="folder"&&An?Qr(...An,!0):Qr(s(n).dataHref,location.href,!1,!0)}Xt(()=>{if(!s(v)||s(h))return;let d={query:s(i),types:s(a),sort:s(l),selected:s(u),listTop:s($)},p=s(n).dataHref,x=s(n).path,N=ao(s(n)),U=requestAnimationFrame(()=>kn?.save(new URL(p,document.baseURI).href,x,{...d,windowY:window.scrollY},N));return()=>cancelAnimationFrame(U)});let Jo=to;function Za(d){return typeof location<"u"&&location.protocol==="file:"&&Jo(d)&&!d.exitsExplorer&&d.href?.endsWith("/")?d.href+"index.html":d.href}async function Wa(){if(s(mt)||!s(n).manifestHref||location.protocol==="file:")return;let d=so,p=Ir;E(h,!0);try{let x=await Go(new URL(s(n).manifestHref,document.baseURI).href,{signal:d.signal,cache:s(n).updatesHref?"no-store":"default"});p===Ir&&!d.signal.aborted&&E(o,x.entries)}catch{p===Ir&&!d.signal.aborted&&(E(m,s(w).labels.listingError,!0),E(_,"listing"))}finally{p===Ir&&E(h,!1)}}async function mc(d,p){cs();let x=p.presentation?.folderDataHref;p.exitsExplorer||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||typeof x!="string"||location.protocol==="file:"||(d?.preventDefault(),await Qr(x,new URL(p.href,document.baseURI).href,!0))}async function Qr(d,p,x,N=!1,U=null,te=!1){x&&cs();let j=++Ir;so?.abort();let Z=so=new AbortController;E(h,!0),E(m,""),E(_,null);try{let P=await Va(d,p,"ledger",Z.signal,N||te),X=P.entries;if(N&&P.manifestHref&&X.length!==P.total&&(X=(await Go(P.manifestHref,{signal:Z.signal,cache:"no-store"})).entries),j!==Ir||Z.signal.aborted)return;if(N||kn.commit(P.dataHref,P.path,p,x),E(n,P),E(o,X),An=null,!N){let _e=ns(p,"ledger",P.path,ao(P),[],U);E(i,_e.query,!0),E(a,_e.types,!0),E(l,_e.sort),E(u,_e.selected,!0),E($,_e.listTop,!0)}if(lc(P,p),await Wa(),!N){let _e=ns(p,"ledger",P.path,ao(P),[],U);await Gr(),s(u)&&!s(ce).some(Ut=>Ut.id===s(u))&&E(u,null),window.scrollTo({top:_e.windowY}),U&&s(u)&&s(Or)?.querySelector(`[data-id="${CSS.escape(s(u))}"] a`)?.focus({preventScroll:!0})}}catch{j===Ir&&!Z.signal.aborted&&(E(m,s(w).labels.folderError,!0),E(_,"folder"),An=[d,p,x,N,U],kn?.rollback())}finally{j===Ir&&E(h,!1)}}function us(d,p,x){typeof p!="string"||typeof x!="string"||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||location.protocol==="file:"||(d?.preventDefault(),Qr(x,new URL(p,document.baseURI).href,!0))}async function hc(d){let p=Math.max(0,Math.min(s(ce).length-1,d)),x=s(ce)[p];x&&(E(u,x.id,!0),s(ro)&&(E($,Math.max(0,s(Cr)[p]-100),!0),s(Or)&&window.scrollTo({top:s(Or).getBoundingClientRect().top+window.scrollY+s($)})),await Gr(),s(Or)?.querySelector(`[data-order="${d}"] a`)?.focus({preventScroll:!0}))}function vc(d){if(d.isComposing||d.altKey||d.ctrlKey||d.metaKey)return;if(s(K)){d.key==="Escape"&&(d.preventDefault(),E(K,!1));return}if(s(y)){d.key==="Escape"&&E(y,null);return}if(d.target?.closest?.("[data-dirwell-actions]"))return;let p=/INPUT|TEXTAREA|SELECT/.test(d.target?.tagName??"");if(d.key==="/"&&!p){d.preventDefault(),s(Wo)?.focus();return}if(p){d.key==="Escape"&&(E(i,""),s(Wo)?.blur());return}if(d.key==="Backspace"&&s(n).parentHref){d.preventDefault(),location.protocol==="file:"||typeof s(n).parentDataHref!="string"?location.href=s(n).parentHref:Qr(s(n).parentDataHref,new URL(s(n).parentHref,document.baseURI).href,!0);return}let x=s(ce).findIndex(N=>N.id===s(u));["ArrowDown","ArrowUp","Home","End"].includes(d.key)&&(d.preventDefault(),hc(d.key==="Home"?0:d.key==="End"?s(ce).length-1:x+(d.key==="ArrowDown"?1:-1)))}function gc(d){E(f,d,!0);try{localStorage.setItem("dirwell-color-scheme",d)}catch{}}async function Xa(){let d=++Xo;fs?.abort();let p=fs=new AbortController;E(xe,[]),E(Qt,!1);let x=s(pe).trim();if(!x){E(pt,s(w).labels.beginArchive,!0);return}E(pt,s(w).labels.searchingArchive,!0);try{let N=new URL(s(n).searchIndexHref,document.baseURI),U=Ga===N.href&&Date.now()-Ka<6e4?ja:null;if(U===null){let j=await fetch(N,{signal:p.signal});if(!j.ok)throw new Error("Unavailable archive");let Z=await j.json();if(Z.version!==3||!Array.isArray(Z.shards)||!Number.isSafeInteger(Z.count)||Z.count>1e5)throw new Error("Unsupported archive");U=[];for(let P of Z.shards){if(typeof P!="string")throw new Error("Invalid shard");let X=new URL(P,N);if(X.origin!==N.origin)throw new Error("Unsafe shard");let _e=await fetch(X,{signal:p.signal});if(!_e.ok)throw new Error("Unavailable shard");let Ut=await _e.json();if(!Array.isArray(Ut.entries)||U.length+Ut.entries.length>1e5)throw new Error("Invalid archive");for(let de of Ut.entries){if(typeof de.name!="string"||typeof de.path!="string"||typeof de.exitsExplorer!="boolean")throw new Error("Invalid archive record");let me=de.href===null?null:new URL(de.href,N);if(me&&!["http:","https:"].includes(me.protocol))throw new Error("Unsupported archive link");U.push({name:de.name,path:de.path,href:me?.href??null,exitsExplorer:de.exitsExplorer})}}if(d!==Xo||p.signal.aborted)return;ja=U,Ga=N.href,Ka=Date.now()}let te=U.map(j=>({record:j,score:Ya(x,j.name+" "+j.path)})).filter(j=>j.score!==null).sort((j,Z)=>Z.score-j.score||j.record.path.localeCompare(Z.record.path));if(d!==Xo||p.signal.aborted)return;E(xe,te.slice(0,100).map(j=>j.record)),E(pt,te.length>100?Zo(s(w),"truncatedResults",{shown:100,count:te.length}):Zo(s(w),"archiveResults",{count:te.length}),!0)}catch{d===Xo&&!p.signal.aborted&&(E(pt,s(w).labels.archiveError,!0),E(Qt,!0))}}Wf(()=>{E(A,innerHeight,!0),E(v,!0),so=new AbortController;try{let x=localStorage.getItem("dirwell-color-scheme");["system","light","dark"].includes(x)&&E(f,x,!0)}catch{}kn=Qf("ledger");let d=ns(location.href,"ledger",s(n).path,ao(s(n)),[],history.state);E(i,d.query,!0),E(a,d.types,!0),E(l,d.sort),E(u,d.selected,!0),E($,d.listTop,!0),cs();let p=x=>{x.state?.dataHref?Qr(x.state.dataHref,location.href,!1,!1,x.state):location.reload()};return window.addEventListener("popstate",p),Wa(),()=>{so?.abort(),fs?.abort(),window.removeEventListener("popstate",p)}}),Xt(()=>{let d=s(hr);if(!d||typeof EventSource>"u")return;let p=new EventSource(d);return p.onmessage=()=>E(Ue,d,!0),p.onerror=()=>{E(m,s(w).labels.updatesError,!0),E(_,"updates")},p.onopen=()=>{s(_)==="updates"&&(E(m,""),E(_,null))},()=>p.close()}),Xt(()=>{if(s(v)&&!s(h)&&s(Ue)){let d=s(Ue);E(Ue,null),d===s(hr)&&Qr(s(n).dataHref,location.href,!1,!0)}}),Xt(()=>{s(v)&&(document.documentElement.dataset.theme=s(f))}),Xt(()=>{s(oo)&&s(y)&&!s(oo).open&&s(oo).showModal()}),Xt(()=>{s(io)&&s(K)&&!s(io).open&&(s(io).showModal(),Gr().then(()=>s(ls)?.focus()))});var Ja=rp();cr("resize",hn,()=>E(A,innerHeight,!0)),cr("keydown",hn,vc),cr("scroll",hn,()=>{s(Or)&&E($,Math.max(0,window.scrollY-s(Or).offsetTop),!0)});var ds=xt(Ja),ps=W(ds),bc=W(ps);{var yc=d=>{var p=Ar(),x=xt(p);wn(x,()=>t.header,()=>({model:s(n)})),D(d,p)},$c=d=>{var p=Cd(),x=xt(p);{var N=P=>{var X=Nd();z(()=>{ee(X,"src",s(w).brand.logoUrl),ee(X,"alt",s(w).brand.logoAlt??"")}),D(P,X)};ae(x,P=>{s(w).brand.logoUrl&&P(N)})}var U=S(x,2),te=H(U,!0),j=S(U,2),Z=H(j,!0);z(()=>{R(te,s(w).brand.name??s(n).title),R(Z,s(w).labels.archive)}),D(d,p)};ae(bc,d=>{t.header?d(yc):d($c,-1)})}B(ps);var _s=S(ps,2),Qo=W(_s),wc=H(Qo,!0),xc=S(Qo);Sr(xc,17,()=>s(n).breadcrumbs,Xr,(d,p)=>{vo();var x=Od(),N=S(xt(x)),U=H(N,!0);z(()=>{ee(N,"href",s(p).href),R(U,s(p).name)}),ye("click",N,te=>us(te,s(p).href,s(p).dataHref)),D(d,x)}),B(_s),B(ds);var ei=S(ds,2),ms=W(ei),hs=W(ms),Qa=W(hs,!0),en=S(Qa);Jn(en),Tn(en,d=>E(Wo,d),()=>s(Wo)),B(hs);var ti=S(hs,2),el=W(ti),Ec=H(el,!0),Tc=S(el);Sr(Tc,16,()=>["directory","file","link"],Xr,(d,p)=>{var x=Id(),N=W(x);Jn(N);var U=S(N,1,!0);B(x),z(te=>{es(N,te),R(U,s(w).labels[p])},[()=>s(a).includes(p)]),ye("change",N,te=>E(a,te.currentTarget.checked?[...s(a),p]:s(a).filter(j=>j!==p),!0)),D(d,x)}),B(ti);var vs=S(ti,2),tl=W(vs,!0),Dr=S(tl),ri=W(Dr),kc=H(ri,!0);ri.value=ri.__value="name";var ni=S(ri),Ac=H(ni,!0);ni.value=ni.__value="size";var gs=S(ni),Sc=H(gs,!0);gs.value=gs.__value="modified",B(Dr);var oi;En(Dr),B(vs);var bs=S(vs,2),rl=W(bs,!0),Lr=S(rl),ii=W(Lr),Rc=H(ii,!0);ii.value=ii.__value="natural";var si=S(ii),Nc=H(si,!0);si.value=si.__value="locale";var ys=S(si),Cc=H(ys,!0);ys.value=ys.__value="unicode",B(Lr);var ai;En(Lr),B(bs);var $s=S(bs,2),nl=W($s,!0),Mr=S(nl),li=W(Mr),Oc=H(li,!0);li.value=li.__value="asc";var ws=S(li),Ic=H(ws,!0);ws.value=ws.__value="desc",B(Mr);var fi;En(Mr),B($s);var xs=S($s,2),lo=W(xs);Jn(lo);var Dc=S(lo,1,!0);B(xs);var Es=S(xs,2),ol=W(Es,!0),Fr=S(ol),ci=W(Fr),Lc=H(ci,!0);ci.value=ci.__value="system";var ui=S(ci),Mc=H(ui,!0);ui.value=ui.__value="light";var Ts=S(ui),Fc=H(Ts,!0);Ts.value=Ts.__value="dark",B(Fr);var di;En(Fr),B(Es);var Pc=S(Es,2);{var Hc=d=>{var p=ss(),x=H(p,!0);z(()=>{p.disabled=!s(v)||!s(n).searchIndexHref,R(x,s(w).labels.searchArchive)}),ye("click",p,()=>E(K,!0)),D(d,p)};ae(Pc,d=>{s(n).searchIndexHref&&d(Hc)})}B(ms);var ks=S(ms,2),As=W(ks),il=W(As,!0),sl=S(il),Uc=H(sl,!0),al=S(sl,1,!0),Vc=S(al),Bc=H(Vc,!0);B(As);var ll=S(As,2);{var Yc=d=>{var p=ss(),x=H(p,!0);z(()=>{p.disabled=s(h),R(x,s(w).labels.retry)}),ye("click",p,_c),D(d,p)};ae(ll,d=>{s(_)&&s(_)!=="copy"&&d(Yc)})}var fl=S(ll,2);{var qc=d=>{var p=qa(),x=H(p,!0);z(()=>{ee(p,"href",An[1]),R(x,s(w).labels.openNative)}),D(d,p)};ae(fl,d=>{s(_)==="folder"&&An&&d(qc)})}var fo=S(fl,2);let cl;Sr(fo,21,()=>s(w).columns,Xr,(d,p)=>{var x=Dd(),N=H(x,!0);z(U=>R(N,U),[()=>ic(s(p),s(w))]),D(d,x)}),B(fo);var pi=S(fo,2),ul=W(pi);{var zc=d=>{var p=Ld(),x=H(p);z(()=>ee(x,"href",s(n).parentHref)),ye("click",x,N=>us(N,s(n).parentHref,s(n).parentDataHref)),D(d,p)};ae(ul,d=>{s(n).parentHref&&d(zc)})}var dl=S(ul,2);{var jc=d=>{var p=dc();let x;z(()=>x=xn(p,"",x,{height:s(Cr)[s(no)]+"px"})),D(d,p)};ae(dl,d=>{s(no)&&d(jc)})}var pl=S(dl,2);Sr(pl,19,()=>s(ce).slice(s(no),s(as)),d=>d.id,(d,p,x)=>{var N=jd();let U;var te=W(N);Sr(te,17,()=>s(w).columns,Xr,(P,X)=>{var _e=Ar(),Ut=xt(_e);{var de=Ge=>{var Ee=Ud(),Ce=W(Ee);{var Oe=Nt=>{var et=Fd(),uo=W(et);{var Ss=Be=>{var Bt=Ar(),tn=xt(Bt);wn(tn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(Be,Bt)},Rs=Be=>{var Bt=Md(),tn=xt(Bt);Ea(tn,()=>ec(Ba(s(p))),!0),B(tn);var iu=S(tn);z(su=>R(iu,` ${s(p).name??""}${su??""}`),[()=>Jo(s(p))?"/":""]),D(Be,Bt)};ae(uo,Be=>{t.row?Be(Ss):Be(Rs,-1)})}B(et),z(Be=>{ee(et,"href",Be),ee(et,"target",s(p).exitsExplorer?"_blank":void 0),ee(et,"rel",s(p).exitsExplorer?"noopener":void 0)},[()=>Za(s(p))]),ye("click",et,Be=>mc(Be,s(p))),cr("focus",et,()=>E(u,s(p).id,!0)),D(Nt,et)},Rt=Nt=>{var et=Pd(),uo=W(et);{var Ss=Be=>{var Bt=Ar(),tn=xt(Bt);wn(tn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(Be,Bt)},Rs=Be=>{var Bt=Lo();z(()=>R(Bt,s(p).name)),D(Be,Bt)};ae(uo,Be=>{t.row?Be(Ss):Be(Rs,-1)})}B(et),D(Nt,et)};ae(Ce,Nt=>{s(p).href?Nt(Oe):Nt(Rt,-1)})}var Vt=S(Ce);{var co=Nt=>{var et=Hd(),uo=H(et);z(()=>R(uo,`${s(p).link.unavailable?s(w).labels.unavailable+" \xB7 ":"\u2192 "}${s(p).link.target??""}`)),D(Nt,et)};ae(Vt,Nt=>{s(p).link&&Nt(co)})}B(Ee),D(Ge,Ee)},me=Ge=>{var Ee=Vd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>Jo(s(p))?s(w).labels.folder:uc(s(p).size)]),D(Ge,Ee)},Ve=Ge=>{var Ee=Bd(),Ce=W(Ee),Oe=H(Ce,!0);B(Ee),z(Rt=>{Ee.disabled=!s(v),ee(Ce,"datetime",s(p).modifiedAt),R(Oe,Rt)},[()=>Ua(s(p).modifiedAt,s(w),s(v))]),ye("click",Ee,()=>E(y,s(p).modifiedAt,!0)),D(Ge,Ee)},Pr=Ge=>{var Ee=Yd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>sc(s(p).data?.[s(X).dataKey])]),D(Ge,Ee)};ae(Ut,Ge=>{s(X)==="name"?Ge(de):s(X)==="size"?Ge(me,1):s(X)==="modified"?Ge(Ve,2):Ge(Pr,-1)})}D(P,_e)});var j=S(te,2);{var Z=P=>{var X=zd(),_e=W(X);{var Ut=me=>{var Ve=Ar(),Pr=xt(Ve);wn(Pr,()=>t.actions,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(me,Ve)};ae(_e,me=>{t.actions&&me(Ut)})}var de=S(_e,2);Sr(de,17,()=>s(w).actions,Xr,(me,Ve)=>{var Pr=Ar(),Ge=xt(Pr);{var Ee=Rt=>{var Vt=qd(),co=H(Vt,!0);z(Nt=>{ee(Vt,"href",Nt),R(co,s(w).labels.download)},[()=>Za(s(p))]),D(Rt,Vt)},Ce=Ot(()=>s(Ve)==="download"&&s(p).href&&!Jo(s(p))&&!s(p).link?.unavailable),Oe=Rt=>{var Vt=ss(),co=H(Vt,!0);z(()=>{Vt.disabled=!s(v)||s(Ve)==="copy-link"&&!s(p).href,ee(Vt,"aria-label",(s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)+": "+s(p).name),R(co,s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)}),ye("click",Vt,async()=>{try{await oc(s(Ve),s(p)),E(m,s(w).labels.copied,!0),E(_,null)}catch{E(m,s(w).labels.copyError,!0),E(_,"copy")}}),D(Rt,Vt)};ae(Ge,Rt=>{s(Ce)?Rt(Ee):s(Ve)!=="download"&&Rt(Oe,1)})}D(me,Pr)}),B(X),D(P,X)};ae(j,P=>{(t.actions||s(w).actions.length)&&P(Z)})}B(N),Ta(N,(P,X)=>pc?.(P,X),()=>s(p).id),z((P,X)=>{ee(N,"data-custom-columns",P),ee(N,"data-id",s(p).id),ee(N,"data-order",s(no)+s(x)),ee(N,"data-active",s(u)===s(p).id),U=xn(N,"",U,{"grid-template-columns":X})},[()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(P=>P==="name"?"minmax(0,1fr)":"minmax(6rem,max-content)").join(" "):void 0]),D(d,N)});var Gc=S(pl,2);{var Kc=d=>{var p=dc();let x;z(()=>x=xn(p,"",x,{height:s(Cr)[s(ce).length]-s(Cr)[s(as)]+"px"})),D(d,p)};ae(Gc,d=>{s(as)<s(ce).length&&d(Kc)})}B(pi),Tn(pi,d=>E(Or,d),()=>s(Or));var Zc=S(pi,2);{var Wc=d=>{var p=Gd(),x=H(p,!0);z(()=>R(x,s(n).total===0?s(w).labels.empty:s(w).labels.noMatches)),D(d,p)};ae(Zc,d=>{s(ce).length===0&&!s(h)&&d(Wc)})}B(ks);var _l=S(ks,2);{var Xc=d=>{var p=Wd(),x=W(p);{var N=Z=>{var P=Kd(),X=H(P,!0);z(()=>{ee(P,"href",s(n).page.previousHref),R(X,s(w).labels.previous)}),D(Z,P)};ae(x,Z=>{s(n).page.previousHref&&Z(N)})}var U=S(x),te=S(U);{var j=Z=>{var P=Zd(),X=H(P,!0);z(()=>{ee(P,"href",s(n).page.nextHref),R(X,s(w).labels.next)}),D(Z,P)};ae(te,Z=>{s(n).page.nextHref&&Z(j)})}B(p),z(Z=>{ee(p,"aria-label",s(w).labels.pagination),R(U,` ${Z??""} `)},[()=>Zo(s(w),"page",{page:s(n).page.number,pages:s(n).page.count})]),D(d,p)};ae(_l,d=>{s(n).page?.count>1&&!s(mt)&&d(Xc)})}var Jc=S(_l,2);{var Qc=d=>{var p=Ar(),x=xt(p);wn(x,()=>t.footer,()=>({model:s(n)})),D(d,p)},eu=d=>{var p=Xd(),x=W(p);{var N=te=>{var j=qa(),Z=H(j,!0);z(()=>{ee(j,"href",s(w).brand.footerUrl),R(Z,s(w).brand.footerText)}),D(te,j)},U=te=>{var j=Lo();z(()=>R(j,s(w).brand.footerText)),D(te,j)};ae(x,te=>{s(w).brand.footerUrl?te(N):te(U,-1)})}B(p),D(d,p)},tu=d=>{var p=Jd(),x=H(p,!0);z(()=>R(x,s(w).labels.keyboardHelp)),D(d,p)};ae(Jc,d=>{t.footer?d(Qc):s(w).brand.footerText?d(eu,1):d(tu,-1)})}B(ei);var ml=S(ei,2);{var ru=d=>{var p=Qd(),x=W(p),N=H(x,!0),U=S(x,2),te=H(U,!0),j=S(U,2),Z=H(j,!0),P=S(j,2),X=H(P,!0);B(p),Tn(p,_e=>E(oo,_e),()=>s(oo)),z(_e=>{R(N,s(w).labels.modifiedTime),R(te,s(y)),R(Z,_e),R(X,s(w).labels.close)},[()=>s(w).dateOptions.locale!==void 0||s(w).dateOptions.timeZone!==void 0?Ua(s(y),s(w),!0):new Date(s(y)).toLocaleString()]),cr("close",p,()=>E(y,null)),ye("click",P,()=>E(y,null)),D(d,p)};ae(ml,d=>{s(y)&&d(ru)})}var nu=S(ml,2);{var ou=d=>{var p=tp(),x=W(p),N=H(x,!0),U=S(x,2);Jn(U),Tn(U,de=>E(ls,de),()=>s(ls));var te=S(U,2),j=H(te,!0),Z=S(te,2);{var P=de=>{var me=ss(),Ve=H(me,!0);z(()=>R(Ve,s(w).labels.retry)),ye("click",me,Xa),D(de,me)};ae(Z,de=>{s(Qt)&&de(P)})}var X=S(Z,2);Sr(X,21,()=>s(xe),Xr,(de,me)=>{var Ve=ep(),Pr=W(Ve);{var Ge=Ce=>{var Oe=qa(),Rt=H(Oe,!0);z(()=>{ee(Oe,"href",s(me).href),ee(Oe,"target",s(me).exitsExplorer?"_blank":void 0),ee(Oe,"rel",s(me).exitsExplorer?"noopener":void 0),R(Rt,s(me).path)}),D(Ce,Oe)},Ee=Ce=>{var Oe=Lo();z(()=>R(Oe,s(me).path)),D(Ce,Oe)};ae(Pr,Ce=>{s(me).href?Ce(Ge):Ce(Ee,-1)})}B(Ve),D(de,Ve)}),B(X);var _e=S(X,2),Ut=H(_e,!0);B(p),Tn(p,de=>E(io,de),()=>s(io)),z(()=>{R(N,s(w).labels.searchArchive),ee(U,"aria-label",s(w).labels.archiveSearchInput),R(j,s(pt)),R(Ut,s(w).labels.close)}),cr("close",p,()=>E(K,!1)),ye("input",U,Xa),rs(U,()=>s(pe),de=>E(pe,de)),ye("click",_e,()=>E(K,!1)),D(d,p)};ae(nu,d=>{s(K)&&d(ou)})}z((d,p,x)=>{ee(_s,"aria-label",s(w).labels.breadcrumb),ee(Qo,"href",s(n).rootHref),R(wc,s(w).labels.home),ee(ei,"aria-busy",s(h)),R(Qa,s(w).labels.searchDirectory),ee(en,"placeholder",s(w).labels.searchFiles),en.disabled=!s(v)||!s(mt),ti.disabled=!s(v)||!s(mt),R(Ec,s(w).labels.types),R(tl,s(w).labels.sort),Dr.disabled=!s(v)||!s(mt),R(kc,s(w).labels.name),R(Ac,s(w).labels.size),R(Sc,s(w).labels.modified),oi!==(oi=s(l).field)&&(Dr.value=(Dr.__value=oi)??"",Jr(Dr,oi)),R(rl,s(w).labels.names),Lr.disabled=!s(v)||!s(mt),R(Rc,s(w).labels.natural),R(Nc,s(w).labels.locale),R(Cc,s(w).labels.unicode),ai!==(ai=s(l).nameMode)&&(Lr.value=(Lr.__value=ai)??"",Jr(Lr,ai)),R(nl,s(w).labels.order),Mr.disabled=!s(v)||!s(mt),R(Oc,s(w).labels.ascending),R(Ic,s(w).labels.descending),fi!==(fi=s(l).direction)&&(Mr.value=(Mr.__value=fi)??"",Jr(Mr,fi)),es(lo,s(l).directoriesFirst),lo.disabled=!s(v)||!s(mt),R(Dc,s(w).labels.directoriesFirst),R(ol,s(w).labels.appearance),Fr.disabled=!s(v),R(Lc,s(w).labels.system),R(Mc,s(w).labels.light),R(Fc,s(w).labels.dark),di!==(di=s(f))&&(Fr.value=(Fr.__value=di)??"",Jr(Fr,di)),R(il,s(_t)[0]),R(Uc,s(mt)?s(ce).length:s(o).length),R(al,d),R(Bc,s(h)?s(w).labels.loading:s(m)),ee(fo,"data-custom-columns",p),cl=xn(fo,"",cl,{"grid-template-columns":x})},[()=>s(_t).slice(1).join("__COUNT__"),()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(d=>d==="name"?"minmax(0,1fr)":typeof d=="object"?"minmax(0,12rem)":"minmax(6rem,max-content)").join(" "):void 0]),ye("click",Qo,d=>us(d,s(n).rootHref,s(n).rootDataHref)),cr("compositionstart",en,()=>E(g,!0)),cr("compositionend",en,()=>E(g,!1)),rs(en,()=>s(i),d=>E(i,d)),ye("change",Dr,d=>E(l,{...s(l),field:d.currentTarget.value})),ye("change",Lr,d=>E(l,{...s(l),nameMode:d.currentTarget.value})),ye("change",Mr,d=>E(l,{...s(l),direction:d.currentTarget.value})),ye("change",lo,d=>E(l,{...s(l),directoriesFirst:d.currentTarget.checked})),ye("change",Fr,d=>gc(d.currentTarget.value)),D(e,Ja),yo()}ji(["click","change","input"]);var np=document.querySelector("[data-dirwell-theme]"),op=JSON.parse(document.querySelector("#dirwell-page-data").textContent),ip=Uo(za,{target:np,props:{model:op}});globalThis.__dirwellUnmount=()=>Vo(ip);})();
79
+ `)}}}function yf(e){let t=ca.get(e);t&&(Ie(e,"message",{value:t.message}),Ie(e,"stack",{value:t.stack}))}function xf(e){k===null&&(C===null&&Hl(e),Pl()),It&&Fl(e)}function Su(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function lr(e,t){var r=k;if(b)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(e|=8192);var n={ctx:q,deps:null,nodes:null,f:e|2048|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};b&&(n.component_function=gt),O?.register_created_effect(n);var o=n;if((e&4)!==0)qn!==null?qn.push(n):yt.ensure().schedule(n);else if(t!==null){try{sr(n)}catch(a){throw ge(n),a}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&524288)===0&&(o=o.first,(e&16)!==0&&(e&65536)!==0&&o!==null&&(o.f|=65536))}if(o!==null&&(o.parent=r,r!==null&&Su(o,r),C!==null&&(C.f&2)!==0&&(e&64)===0)){var i=C;(i.effects??(i.effects=[])).push(o)}return n}function qr(){return C!==null&&!rt}function Me(e){let t=lr(8,null);return ie(t,1024),t.teardown=e,t}function Ft(e){xf("$effect"),b&&Ie(e,"name",{value:"$effect"});var t=k.f,r=!C&&(t&32)!==0&&q!==null&&!q.i;if(r){var n=q;(n.e??(n.e=[])).push(e)}else return js(e)}function js(e){return lr(1048580,e)}function pa(e){yt.ensure();let t=lr(524352,e);return()=>{ge(t)}}function Ef(e){yt.ensure();let t=lr(524352,e);return(r={})=>new Promise(n=>{r.outro?fr(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Et(e){return lr(4,e)}function rf(e){return lr(4718592,e)}function He(e,t=0){return lr(8|t,e)}function z(e,t=[],r=[],n=[]){Li(n,t,r,o=>{lr(8,()=>{e(...o.map(s))})})}function pt(e,t=0){var r=lr(16|t,e);return b&&(r.dev_stack=or),r}function Ne(e){return lr(524320,e)}function _a(e){var t=e.teardown;if(t!==null){let r=It,n=C;ua(!0),Se(null);try{t.call(null)}catch(o){lt(o,e.parent)}finally{ua(r),Se(n)}}}function Co(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){let o=r.ac;o!==null&&$t(()=>{o.abort(gr)});var n=r.next;(r.f&64)!==0?r.parent=null:ge(r,t),r=n}}function Tf(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&ge(t),t=r}}function ge(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ma(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,Co(e,t&&!r),dn(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(let i of n)i.stop();_a(e),e.f^=33554432,e.f|=16384;var o=e.parent;o!==null&&o.first!==null&&sa(e),b&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ma(e,t){for(;e!==null;){var r=e===t?null:Le(e);e.remove(),e=r}}function sa(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function fr(e,t,r=!0){var n=[];e.f|=256,kf(e,n,!0);var o=()=>{r&&ge(e),t&&t()},i=n.length;if(i>0){var a=()=>--i||o();for(var l of n)l.out(a)}else o()}function kf(e,t,r){if((e.f&8192)===0){e.f^=8192;var n=e.nodes&&e.nodes.t;if(n!==null)for(let l of n)(l.is_global||r)&&t.push(l);for(var o=e.first;o!==null;){var i=o.next;if((o.f&64)===0){var a=(o.f&65536)!==0||(o.f&32)!==0&&(e.f&16)!==0;kf(o,t,a?r:!1)}o=i}}}function Jn(e){e.f&=-257,Af(e,!0)}function Af(e,t){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=8192,(e.f&1024)===0&&(ie(e,2048),yt.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,o=(r.f&65536)!==0||(r.f&32)!==0;Af(r,o?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(let a of i)(a.is_global||t)&&a.in()}}function Qn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var o=r===n?null:Le(r);t.append(r),r=o}}var Sf=null;var It=!1;function ua(e){It=e}var C=null,rt=!1;function Se(e){C=e}var k=null;function Re(e){k=e}var Mt=null;function Pi(e){C!==null&&(!ke&&(C.f&2097152)!==0||(C.f&2)!==0)&&(Mt??(Mt=new Set)).add(e)}var Fe=null,tt=0,wt=null;function mf(e){wt=e}var Nf=1,bn=0,Kr=bn;function fa(e){Kr=e}function Vn(){return++Nf}function Gr(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,o=0;o<n;o++){var i=r[o];if(Gr(i)&&Xs(i),i.wv>e.wv)return!0}(t&512)!==0&&Pe===null&&ie(e,1024)}return!1}function Cf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!ke&&Mt!==null&&Mt.has(e)))for(var o=0;o<n.length;o++){var i=n[o];(i.f&2)!==0?Cf(i,t,!1):t===i&&(r?ie(i,2048):(i.f&1024)!==0&&ie(i,4096),Mo(i))}}function Fi(e){var t=Fe,r=tt,n=wt,o=C,i=Mt,a=q,l=rt,f=Kr,u=e.f;Fe=null,tt=0,wt=null,C=(u&96)===0?e:null,Mt=null,br(e.ctx),rt=!1,Kr=++bn,e.ac!==null&&($t(()=>{e.ac.abort(gr)}),e.ac=null);try{e.f|=2097152;var v=e.fn,h=v();e.f|=32768;var m=Rf(e);if(ir()&&wt!==null&&!rt&&m!==null&&(e.f&6146)===0)for(var _=0;_<wt.length;_++)Cf(wt[_],e);if(o!==null&&o!==e){if(bn++,o.deps!==null)for(let $=0;$<r;$+=1)o.deps[$].rv=bn;if(t!==null)for(let $ of t)$.rv=bn;wt!==null&&(n===null?n=wt:n.push(...wt))}return(e.f&8388608)!==0&&(e.f^=8388608),h}catch($){return Rf(e),$f($)}finally{e.f^=2097152,Fe=t,tt=r,wt=n,C=o,Mt=i,br(a),rt=l,Kr=f}}function Rf(e){var o;var t=e.deps,r=O?.is_fork;if(Fe!==null){var n;if(r||dn(e,tt),t!==null&&tt>0)for(t.length=tt+Fe.length,n=0;n<Fe.length;n++)t[tt+n]=Fe[n];else e.deps=t=Fe;if(qr()&&(e.f&512)!==0)for(n=tt;n<t.length;n++)((o=t[n]).reactions??(o.reactions=[])).push(e)}else!r&&t!==null&&tt<t.length&&(dn(e,tt),t.length=tt);return t}function Ru(e,t){let r=t.reactions;if(r!==null){var n=yl.call(r,e);if(n!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[n]=r[o],r.pop())}}if(r===null&&(t.f&2)!==0&&(Fe===null||!vr.call(Fe,t))){var i=t;(i.f&512)!==0&&(i.f^=512),i.v!==fe&&Ln(i),i.ac!==null&&$t(()=>{i.ac.abort(gr),i.ac=null,ie(i,2048)}),tf(i),dn(i,0)}}function dn(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ru(e,r[n])}function sr(e){var t=e.f;if((t&16384)===0){ie(e,1024);var r=k;if(k=e,b){var n=gt;Oi(e.component_function);var o=or;Dn(e.dev_stack??or)}try{(t&16777232)!==0?Tf(e):Co(e),_a(e);var i=Fi(e);if(e.teardown=typeof i=="function"?i:null,e.wv=Nf,b&&qt&&(e.f&2048)!==0&&e.deps!==null)for(var a of e.deps)a.set_during_effect&&(a.wv=Vn(),a.set_during_effect=!1)}finally{k=r,b&&(Oi(n),Dn(o))}}}async function Ar(){if(ke)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),zr()}function s(e){var t=e.f,r=(t&2)!==0;if(Sf?.add(e),C!==null&&!rt){var n=k!==null&&(k.f&16384)!==0;if(!n&&(Mt===null||!Mt.has(e))){var o=C.deps;if((C.f&2097152)!==0)e.rv<bn&&(e.rv=bn,Fe===null&&o!==null&&o[tt]===e?tt++:Fe===null?Fe=[e]:Fe.push(e));else{C.deps??(C.deps=[]),vr.call(C.deps,e)||C.deps.push(e);var i=e.reactions;i===null?e.reactions=[C]:vr.call(i,C)||i.push(C)}}}if(b){if(!rt&&ft&&O===null&&Ot===null&&!ft.warned&&(ft.effect.f&2097152)===0&&!ft.effect_deps.has(e)){ft.warned=!0,El(e.label);var a=jt("traced at");a&&console.warn(a)}if(Ro.delete(e),qt&&!rt&&xo!==null&&C!==null&&xo.reaction===C){if(e.trace)e.trace();else if(a=jt("traced at"),a){var l=xo.entries.get(e);l===void 0&&(l={traces:[]},xo.entries.set(e,l));var f=l.traces[l.traces.length-1];a.stack!==f?.stack&&l.traces.push(a)}}}if(It&&Lt.has(e))return Lt.get(e);if(r){var u=e;if(It){var v=u.v;return((u.f&1024)===0&&u.reactions!==null||If(u))&&(v=No(u)),Lt.set(u,v),v}var h=(u.f&512)===0&&!rt&&C!==null&&(C.f&512)!==0,m=(u.f&32768)===0;Gr(u)&&(h&&(u.f|=512),Xs(u)),h&&!m&&(Js(u),Of(u))}if(Pe?.has(e))return Pe.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Of(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:vr.call(t,e)||t.push(e),(r.f&2)!==0&&(r.f&512)===0&&(Js(r),Of(r))}}function If(e){if(e.v===fe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Lt.has(t)||(t.f&2)!==0&&If(t))return!0;return!1}function ae(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}function zi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ge in e)ji(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&Ge in r&&ji(r)}}}function ji(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{ji(e[n],t)}catch{}let r=on(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=vi(r);for(let o in n){let i=n[o].get;if(i)try{i.call(e)}catch{}}}}}var Cu=/\r/g;function Df(e){e=e.replace(Cu,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var Ou=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var Zh=[...Ou,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Iu=["touchstart","touchmove"];function Lf(e){return Iu.includes(e)}var Du=["$state","$state.raw","$derived","$derived.by"],Wh=[...Du,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function Gi(e){return e?.replace(/\//g,"/\u200B")}var $n=Symbol("events"),ga=new Set,Ki=new Set;function Ff(e,t,r,n={}){function o(i){if(n.capture||Wi.call(t,i),!i.cancelBubble)return $t(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?(o.__removed=!1,we(()=>{o.__removed||t.addEventListener(e,o,n)})):t.addEventListener(e,o,n),o}function cr(e,t,r,n,o){var i={capture:n,passive:o},a=Ff(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Me(()=>{a.__removed=!0,t.removeEventListener(e,a,i)})}function $e(e,t,r){(t[$n]??(t[$n]={}))[e]=r}function Zi(e){for(var t=0;t<e.length;t++)ga.add(e[t]);for(var r of Ki)r(e)}var ha=null,va=!1;function Wi(e){var t=this,r=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;ha=e,va||(va=!0,setTimeout(()=>{va=!1,ha=null}));var a=0,l=ha===e&&e[$n];if(l){var f=o.indexOf(l);if(f!==-1&&(t===document||t===window)){e[$n]=t;return}var u=o.indexOf(t);if(u===-1)return;f<=u&&(a=f)}if(i=o[a]||e.target,i!==t){Ie(e,"currentTarget",{configurable:!0,get(){return i||r}});var v=C,h=k;Se(null),Re(null);try{for(var m,_=[];i!==null&&i!==t;){try{var $=i[$n]?.[n];$!=null&&(!i.disabled||e.target===i)&&$.call(i,e)}catch(g){m?_.push(g):m=g}if(e.cancelBubble)break;a++,i=a<o.length?o[a]:null}if(m){for(let g of _)queueMicrotask(()=>{throw g});throw m}}finally{e[$n]=t,delete e.currentTarget,Se(v),Re(h)}}}var Mu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Pf(e){return Mu?.createHTML(e)??e}function ba(e){var t=Wt("template");return t.innerHTML=Pf(e.replaceAll("<!>","<!---->")),t.content}function Xe(e,t){var r=k;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function ee(e,t){var r=(t&1)!==0,n=(t&2)!==0,o,i=!e.startsWith("<!>");return()=>{if(T)return Xe(M,null),M;o===void 0&&(o=ba(i?e:"<!>"+e),r||(o=ve(o)));var a=n||Fo?document.importNode(o,!0):o.cloneNode(!0);if(r){var l=ve(a),f=a.lastChild;Xe(l,f)}else Xe(a,a);return a}}function Uo(e=""){if(!T){var t=be(e+"");return Xe(t,t),t}var r=M;return r.nodeType!==sn?(r.before(r=be()),ne(r)):Po(r),Xe(r,r),r}function Sr(){if(T)return Xe(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=be();return e.append(t,r),Xe(t,r),e}function D(e,t){if(T){var r=k;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=M),De();return}e!==null&&e.before(t)}function Hf(e){let t=0,r=We(0),n;return b&&Ke(r,"createSubscriber version"),()=>{qr()&&(s(r),He(()=>(t===0&&(n=ae(()=>e(()=>hn(r)))),t+=1,()=>{we(()=>{t-=1,t===0&&(n?.(),n=void 0,hn(r))})})))}}var Uu=589824;function Ta(e,t,r,n){new $a(e,t,r,n)}var Tt,Bo,Pt,yn,Je,kt,nt,At,ur,wn,Wr,eo,Yo,qo,dr,Ji,G,Vf,Bf,ya,Zr,Yf,wa,Vo,Xi,xa,Ea,$a=class{constructor(t,r,n,o){F(this,G);re(this,"parent");re(this,"is_pending",!1);re(this,"transform_error");F(this,Tt);F(this,Bo,T?M:null);F(this,Pt);F(this,yn);F(this,Je);F(this,kt,null);F(this,nt,null);F(this,At,null);F(this,ur,null);F(this,wn,0);F(this,Wr,0);F(this,eo,!1);F(this,Yo,new Set);F(this,qo,new Set);F(this,dr,null);F(this,Ji,Hf(()=>(I(this,dr,We(c(this,wn))),b&&Ke(c(this,dr),"$effect.pending()"),()=>{I(this,dr,null)})));I(this,Tt,t),I(this,Pt,r),I(this,yn,i=>{var a=k;a.b=this,a.f|=128,n(i)}),this.parent=k.b,this.transform_error=o??this.parent?.transform_error??(i=>i),I(this,Je,pt(()=>{if(T){let i=an(c(this,Bo));De();let a=i==="[!";if(i.startsWith("[?")){let f=JSON.parse(i.slice("[?".length));L(this,G,Bf).call(this,f)}else a?L(this,G,Yf).call(this):L(this,G,Vf).call(this)}else L(this,G,wa).call(this)},Uu)),T&&I(this,Tt,M)}defer_effect(t){Ii(t,c(this,Yo),c(this,qo))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Pt).pending}update_pending_count(t,r){L(this,G,xa).call(this,t,r),I(this,wn,c(this,wn)+t),!(!c(this,dr)||c(this,eo))&&(I(this,eo,!0),we(()=>{I(this,eo,!1),c(this,dr)&&Gt(c(this,dr),c(this,wn))}))}get_effect_pending(){return c(this,Ji).call(this),s(c(this,dr))}error(t){if(t===it||!c(this,Pt).onerror&&!c(this,Pt).failed)throw t;O?.is_fork?(c(this,kt)&&O.skip_effect(c(this,kt)),c(this,nt)&&O.skip_effect(c(this,nt)),c(this,At)&&O.skip_effect(c(this,At)),O.oncommit(()=>{L(this,G,Zr).call(this)||L(this,G,Ea).call(this,t)})):L(this,G,Ea).call(this,t)}};Tt=new WeakMap,Bo=new WeakMap,Pt=new WeakMap,yn=new WeakMap,Je=new WeakMap,kt=new WeakMap,nt=new WeakMap,At=new WeakMap,ur=new WeakMap,wn=new WeakMap,Wr=new WeakMap,eo=new WeakMap,Yo=new WeakMap,qo=new WeakMap,dr=new WeakMap,Ji=new WeakMap,G=new WeakSet,Vf=function(){try{I(this,kt,Ne(()=>c(this,yn).call(this,c(this,Tt))))}catch(t){this.error(t)}},Bf=function(t){let r=c(this,Pt).failed,{reset:n,invoke_onerror:o}=L(this,G,ya).call(this,t);we(o),r&&I(this,At,Ne(()=>{r(c(this,Tt),()=>t,()=>n)}))},ya=function(t){var r=!1,n=!1;let o=()=>{if(!L(this,G,Zr).call(this)){if(r){Cl();return}r=!0,n&&Gl(),c(this,At)!==null&&fr(c(this,At),()=>{I(this,At,null)}),L(this,G,Xi).call(this,()=>{L(this,G,wa).call(this)})}};return{reset:o,invoke_onerror:()=>{if(!L(this,G,Zr).call(this))try{n=!0,c(this,Pt).onerror?.(t,o),n=!1}catch(a){lt(a,c(this,Je)&&c(this,Je).parent)}}}},Zr=function(){return(c(this,Je).f&33570816)!==0},Yf=function(){let t=c(this,Pt).pending;t&&(this.is_pending=!0,I(this,nt,Ne(()=>t(c(this,Tt)))),we(()=>{if(!L(this,G,Zr).call(this)){var r=I(this,ur,document.createDocumentFragment()),n=be(),o=!1;if(r.append(n),I(this,kt,L(this,G,Xi).call(this,()=>{try{return Ne(()=>c(this,yn).call(this,n))}catch(i){try{this.error(i),o=!0}catch(a){lt(a,c(this,Je).parent)}return null}})),c(this,kt)===null){I(this,ur,null),o&&L(this,G,Vo).call(this,O);return}c(this,Wr)===0&&(c(this,Tt).before(r),I(this,ur,null),fr(c(this,nt),()=>{I(this,nt,null)}),L(this,G,Vo).call(this,O))}}))},wa=function(){try{if(this.is_pending=this.has_pending_snippet(),I(this,Wr,0),I(this,wn,0),I(this,kt,Ne(()=>{c(this,yn).call(this,c(this,Tt))})),c(this,Wr)>0){var t=I(this,ur,document.createDocumentFragment());Qn(c(this,kt),t);let r=c(this,Pt).pending;I(this,nt,Ne(()=>r(c(this,Tt))))}else L(this,G,Vo).call(this,O)}catch(r){this.error(r)}},Vo=function(t){this.is_pending=!1,t.transfer_effects(c(this,Yo),c(this,qo))},Xi=function(t){var r=k,n=C,o=q;Re(c(this,Je)),Se(c(this,Je)),br(c(this,Je).ctx);try{return yt.ensure(),t()}finally{Re(r),Se(n),br(o)}},xa=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&L(n=this.parent,G,xa).call(n,t,r);return}I(this,Wr,c(this,Wr)+t),c(this,Wr)===0&&(L(this,G,Vo).call(this,r),c(this,nt)&&fr(c(this,nt),()=>{I(this,nt,null)}),c(this,ur)&&(c(this,Tt).before(c(this,ur)),I(this,ur,null)))},Ea=function(t){c(this,kt)&&(ge(c(this,kt)),I(this,kt,null)),c(this,nt)&&(ge(c(this,nt)),I(this,nt,null)),c(this,At)&&(ge(c(this,At)),I(this,At,null)),T&&(ne(c(this,Bo)),wo(),ne(nr()));let r=c(this,Pt).failed,n=o=>{if(L(this,G,Zr).call(this))return;let{reset:i,invoke_onerror:a}=L(this,G,ya).call(this,o);a(),r&&!L(this,G,Zr).call(this)&&I(this,At,L(this,G,Xi).call(this,()=>{try{return Ne(()=>{var l=k;l.b=this,l.f|=128,r(c(this,Tt),()=>o,()=>i)})}catch(l){return lt(l,c(this,Je).parent),null}}))};we(()=>{if(!L(this,G,Zr).call(this)){var o;try{o=this.transform_error(t)}catch(i){lt(i,c(this,Je)&&c(this,Je).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(n,i=>lt(i,c(this,Je)&&c(this,Je).parent)):n(o)}})};var ka=!0;function R(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[n=bo]??(e[n]=e.nodeValue))&&(e[bo]=r,e.nodeValue=`${r}`)}function es(e,t){return qf(e,t)}function jo(e,t){Yi(),t.intro=t.intro??!1;let r=t.target,n=T,o=M;try{for(var i=ve(r);i&&(i.nodeType!==vt||i.data!=="[");)i=Le(i);if(!i)throw it;Te(!0),ne(i);let a=qf(e,{...t,anchor:i});return Te(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
80
+ `).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==it&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Vl(),Yi(),So(r),Te(!1),es(e,t)}finally{Te(n),ne(o)}}var Qi=new Map;function qf(e,{target:t,anchor:r,props:n={},events:o,context:i,intro:a=!0,transformError:l}){Yi();var f=void 0,u=Ef(()=>{var v=r??t.appendChild(be());Ta(v,{pending:()=>{}},_=>{Eo({});var $=q;if(i&&($.c=i),o&&(n.$$events=o),T&&Xe(_,null),ka=a,f=e(_,n)||ko(),ka=!0,T&&(k.nodes.end=M,M===null||M.nodeType!==vt||M.data!=="]"))throw Br(),it;To()},l);var h=new Set,m=_=>{for(var $=0;$<_.length;$++){var g=_[$];if(!h.has(g)){h.add(g);var y=Lf(g);for(let pe of[t,document]){var A=Qi.get(pe);A===void 0&&(A=new Map,Qi.set(pe,A));var K=A.get(g);K===void 0?(pe.addEventListener(g,Wi,{passive:y}),A.set(g,1)):A.set(g,K+1)}}}};return m(Cn(ga)),Ki.add(m),()=>{for(var _ of h)for(let y of[t,document]){var $=Qi.get(y),g=$.get(_);--g==0?(y.removeEventListener(_,Wi),$.delete(_),$.size===0&&Qi.delete(y)):$.set(_,g)}Ki.delete(m),v!==r&&v.parentNode?.removeChild(v)}});return Aa.set(f,u),f}var Aa=new WeakMap;function zo(e,t){let r=Aa.get(e);return r?(Aa.delete(e),r(t)):(b&&Rl(),Promise.resolve())}var Xt,pr,St,xn,Go,Ko,ts,_r=class{constructor(t,r=!0){re(this,"anchor");F(this,Xt,new Map);F(this,pr,new Map);F(this,St,new Map);F(this,xn,new Set);F(this,Go,!0);F(this,Ko,t=>{if(c(this,Xt).has(t)){var r=c(this,Xt).get(t),n=c(this,pr).get(r);if(n)Jn(n),c(this,xn).delete(r);else{var o=c(this,St).get(r);o&&(Jn(o.effect),c(this,pr).set(r,o.effect),c(this,St).delete(r),b&&(o.fragment.lastChild[Us]=this.anchor),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),n=o.effect)}for(let[i,a]of c(this,Xt)){if(c(this,Xt).delete(i),i===t)break;let l=c(this,St).get(a);l&&(ge(l.effect),c(this,St).delete(a))}for(let[i,a]of c(this,pr)){if(i===r||c(this,xn).has(i))continue;let l=()=>{if(Array.from(c(this,Xt).values()).includes(i)){var u=document.createDocumentFragment();Qn(a,u),u.append(be()),c(this,St).set(i,{effect:a,fragment:u})}else ge(a);c(this,xn).delete(i),c(this,pr).delete(i)};c(this,Go)||!n?(c(this,xn).add(i),fr(a,l,!1)):l()}}});F(this,ts,t=>{c(this,Xt).delete(t);let r=Array.from(c(this,Xt).values());for(let[n,o]of c(this,St))r.includes(n)||(ge(o.effect),c(this,St).delete(n))});this.anchor=t,I(this,Go,r)}ensure(t,r){var n=O,o=qi();if(r&&!c(this,pr).has(t)&&!c(this,St).has(t))if(o){var i=document.createDocumentFragment(),a=be();i.append(a),c(this,St).set(t,{effect:Ne(()=>r(a)),fragment:i})}else c(this,pr).set(t,Ne(()=>r(this.anchor)));if(c(this,Xt).set(n,t),o){for(let[l,f]of c(this,pr))l===t?n.unskip_effect(f):n.skip_effect(f);for(let[l,f]of c(this,St))l===t?n.unskip_effect(f.effect):n.skip_effect(f.effect);n.oncommit(c(this,Ko)),n.ondiscard(c(this,ts))}else T&&(this.anchor=M),c(this,Ko).call(this,n)}};Xt=new WeakMap,pr=new WeakMap,St=new WeakMap,xn=new WeakMap,Go=new WeakMap,Ko=new WeakMap,ts=new WeakMap;function le(e,t,r=!1){var n;T&&(n=M,De());var o=new _r(e),i=r?65536:0;function a(l,f){if(T){var u=an(n);if(l!==parseInt(u.substring(1))){var v=nr();ne(v),o.anchor=v,Te(!1),o.ensure(l,f),Te(!0);return}}o.ensure(l,f)}pt(()=>{var l=!1;t((f,u=0)=>{l=!0,a(u,f)}),l||a(-1,null)},i)}function Jr(e,t){return t}function Gu(e,t,r){for(var n=[],o=t.length,i,a=t.length,l=0;l<o;l++){let h=t[l];fr(h,()=>{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var m=e.outrogroups;Sa(e,Cn(i.done)),m.delete(i),m.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var f=n.length===0&&r!==null&&e.pending.size===0;if(f){var u=r,v=u.parentNode;So(v),v.append(u),e.items.clear()}Sa(e,t,!f)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function Sa(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(let a of e.pending.values())for(let l of a)n.add(e.items.get(l).e)}for(var o=0;o<t.length;o++){var i=t[o];if(n?.has(i)){i.f|=33554432;let a=document.createDocumentFragment();Qn(i,a)}else ge(t[o],r)}}var rs;function Rr(e,t,r,n,o,i=null){var a=e,l=new Map,f=(t&4)!==0;if(f){var u=e;a=T?ne(ve(u)):u.appendChild(be())}T&&De();var v=null,h=Hn(()=>{var K=r();return Yt(K)?K:K==null?[]:Cn(K)});b&&Ke(h,"{#each ...}");var m=new Map,_=!0;function $(K){if((A.effect.f&16384)===0){A.pending.delete(K);var pe=s(h);A.fallback=v,Ku(A,pe,a,t,n),v!==null&&(pe.length===0?(v.f&33554432)===0?Jn(v):(v.f^=33554432,Wo(v,null,a)):fr(v,()=>{v=null}))}}function g(K){A.pending.delete(K)}var y=pt(()=>{var K=s(h),pe=K.length;let ye=!1;if(T){var ot=an(a)==="[!";ot!==(pe===0)&&(a=nr(),ne(a),Te(!1),ye=!0)}for(var Ue=new Set,w=O,Jt=qi(),_t=0;_t<pe;_t+=1){T&&M.nodeType===vt&&M.data==="]"&&(a=M,ye=!0,Te(!1));var je=K[_t],hr=n(je,_t);if(b){var mt=n(je,_t);hr!==mt&&Ml(String(_t),String(hr),String(mt))}var ue=_?null:l.get(hr);ue?(ue.v&&Gt(ue.v,je),ue.i&&Gt(ue.i,_t),Jt&&w.unskip_effect(ue.e)):(ue=Zu(l,_?a:rs??(rs=be()),je,hr,_t,o,t,r),_||(ue.e.f|=33554432),l.set(hr,ue)),Ue.add(hr)}if(pe===0&&i&&!v&&(_?v=Ne(()=>i(a)):(v=Ne(()=>i(rs??(rs=be()))),v.f|=33554432)),pe>Ue.size&&(b?Wu(K,n):qs("","","")),T&&pe>0&&ne(nr()),!_)if(m.set(w,Ue),Jt){for(let[io,Or]of l)Ue.has(io)||w.skip_effect(Or.e);w.oncommit($),w.ondiscard(g)}else $(w);ye&&Te(!0),s(h)}),A={effect:y,flags:t,items:l,pending:m,outrogroups:null,fallback:v};_=!1,T&&(a=M)}function Zo(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function Ku(e,t,r,n,o){var i=(n&8)!==0,a=t.length,l=e.items,f=Zo(e.effect.first),u,v=null,h,m=[],_=[],$,g,y,A;if(i)for(A=0;A<a;A+=1)$=t[A],g=o($,A),y=l.get(g).e,(y.f&33554432)===0&&(y.nodes?.a?.measure(),(h??(h=new Set)).add(y));for(A=0;A<a;A+=1){if($=t[A],g=o($,A),y=l.get(g).e,e.outrogroups!==null)for(let je of e.outrogroups)je.pending.delete(y),je.done.delete(y);if((y.f&8192)!==0&&(Jn(y),i&&(y.nodes?.a?.unfix(),(h??(h=new Set)).delete(y))),(y.f&33554432)!==0)if(y.f^=33554432,y===f)Wo(y,null,r);else{var K=v?v.next:f;y===e.effect.last&&(e.effect.last=y.prev),y.prev&&(y.prev.next=y.next),y.next&&(y.next.prev=y.prev),Xr(e,v,y),Xr(e,y,K),Wo(y,K,r),v=y,m=[],_=[],f=Zo(v.next);continue}if(y!==f){if(u!==void 0&&u.has(y)){if(m.length<_.length){var pe=_[0],ye;v=pe.prev;var ot=m[0],Ue=m[m.length-1];for(ye=0;ye<m.length;ye+=1)Wo(m[ye],pe,r);for(ye=0;ye<_.length;ye+=1)u.delete(_[ye]);Xr(e,ot.prev,Ue.next),Xr(e,v,ot),Xr(e,Ue,pe),f=pe,v=Ue,A-=1,m=[],_=[]}else u.delete(y),Wo(y,f,r),Xr(e,y.prev,y.next),Xr(e,y,v===null?e.effect.first:v.next),Xr(e,v,y),v=y;continue}for(m=[],_=[];f!==null&&f!==y;)(u??(u=new Set)).add(f),_.push(f),f=Zo(f.next);if(f===null)continue}(y.f&33554432)===0&&m.push(y),v=y,f=Zo(y.next)}if(e.outrogroups!==null){for(let je of e.outrogroups)je.pending.size===0&&(Sa(e,Cn(je.done)),e.outrogroups?.delete(je));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||u!==void 0){var w=[];if(u!==void 0)for(y of u)(y.f&8192)===0&&w.push(y);for(;f!==null;)(f.f&8192)===0&&f!==e.fallback&&w.push(f),f=Zo(f.next);var Jt=w.length;if(Jt>0){var _t=(n&4)!==0&&a===0?r:null;if(i){for(A=0;A<Jt;A+=1)w[A].nodes?.a?.measure();for(A=0;A<Jt;A+=1)w[A].nodes?.a?.fix()}Gu(e,w,_t)}}i&&we(()=>{if(h!==void 0)for(y of h)y.nodes?.a?.apply()})}function Zu(e,t,r,n,o,i,a,l){var f=(a&1)!==0?(a&16)===0?mn(r,!1,!1):We(r):null,u=(a&2)!==0?We(o):null;return b&&f&&(f.trace=()=>{l()[u?.v??o]}),{v:f,i:u,e:Ne(()=>(i(t,f??r,u??o,l),()=>{e.delete(n)}))}}function Wo(e,t,r){if(e.nodes)for(var n=e.nodes.start,o=e.nodes.end,i=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var a=Le(n);if(i.before(n),n===o)return;n=a}}function Xr(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Wu(e,t){let r=new Map,n=e.length;for(let o=0;o<n;o++){let i=t(e[o],o);if(r.has(i)){let a=String(r.get(i)),l=String(o),f=String(i);f.startsWith("[object ")&&(f=null),qs(a,l,f)}r.set(i,o)}}function Xu(e,t,r){if(!t||t===Df(String(r??"")))return;let n,o=e.__svelte_meta?.loc;o?n=`near ${o.file}:${o.line}:${o.column}`:gt?.[st]&&(n=`in ${gt[st]}`),Sl(Gi(n))}function Ra(e,t,r=!1,n=!1,o=!1,i=!1){var a=e,l="";if(r){var f=e;T&&(a=ne(ve(f)))}z(()=>{var u=k;if(l===(l=t()??"")){T&&De();return}if(r&&!T){u.nodes=null,f.innerHTML=l,l!==""&&Xe(ve(f),f.lastChild);return}if(u.nodes!==null&&(ma(u.nodes.start,u.nodes.end),u.nodes=null),l!==""){if(T){for(var v=M.data,h=De(),m=h;h!==null&&(h.nodeType!==vt||h.data!=="");)m=h,h=Le(h);if(h===null)throw Br(),it;b&&!i&&Xu(h.parentNode,v,l),Xe(M,m),a=ne(h);return}var _=n?$o:o?Bs:void 0,$=Wt(n?"svg":o?"math":"template",_);$.innerHTML=l;var g=n||o?$:$.content;if(Xe(ve(g),g.lastChild),n||o)for(;ve(g);)a.before(ve(g));else a.before(g)}})}function En(e,t,...r){var n=new _r(e);pt(()=>{let o=t()??null;b&&o==null&&Bl(),n.ensure(o,o&&(i=>o(i,...r)))},65536)}function Na(e,t,r){Et(()=>{var n=ae(()=>t(e,r?.())||{});if(r&&n?.update){var o=!1,i={};He(()=>{var a=r();zi(a),o&&Ai(i,a)&&(i=a,n.update(a))}),o=!0}if(n?.destroy)return()=>n.destroy()})}var qy=[...`
81
+ \r\f\xA0\v\uFEFF`];function zf(e,t=!1){var r=t?" !important;":";",n="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(n+=" "+o+": "+i+r)}return n}function Ca(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Gf(e,t){if(t){var r="",n,o;if(Array.isArray(t)?(n=t[0],o=t[1]):n=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var i=!1,a=0,l=!1,f=[];n&&f.push(...Object.keys(n).map(Ca)),o&&f.push(...Object.keys(o).map(Ca));var u=0,v=-1;let g=e.length;for(var h=0;h<g;h++){var m=e[h];if(l?m==="/"&&e[h-1]==="*"&&(l=!1):i?i===m&&(i=!1):m==="/"&&e[h+1]==="*"?l=!0:m==='"'||m==="'"?i=m:m==="("?a++:m===")"&&a--,!l&&i===!1&&a===0){if(m===":"&&v===-1)v=h;else if(m===";"||h===g-1){if(v!==-1){var _=Ca(e.substring(u,v).trim());if(!f.includes(_)){m!==";"&&h++;var $=e.substring(u,h).trim();r+=" "+$+";"}}u=h+1,v=-1}}}}return n&&(r+=zf(n)),o&&(r+=zf(o,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Oa(e,t={},r,n){for(var o in r){var i=r[o];t[o]!==i&&(r[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,n))}}function Tn(e,t,r,n){var o=e[go];if(T||o!==t){var i=Gf(t,n);(!T||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e[go]=t}else n&&(Array.isArray(n)?(Oa(e,r?.[0],n[0]),Oa(e,r?.[1],n[1],"important")):Oa(e,r,n));return n}function Da(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function nd(e,t){var r=e.__defaultValue,n=e.multiple,o=n?r??[]:null;if(!(n&&!Yt(o))){var i=e.selectedIndex,a=t&&n?new Set(e.selectedOptions):null;for(var l of e.options){var f=Ia(l);Da(l,n?o.includes(f):Bi(f,r))}if(t)if(a!==null)for(l of e.options){var u=a.has(l);l.selected!==u&&(l.selected=u)}else e.selectedIndex!==i&&(e.selectedIndex=i)}}function Qr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Yt(t))return Nl();for(var n of e.options)n.selected=t.includes(Ia(n));return}for(n of e.options){var o=Ia(n);if(Bi(o,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function kn(e){var t=new MutationObserver(r=>{r.every(od)||("__defaultValue"in e&&nd(e,!1),"__value"in e&&Qr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Me(()=>{t.disconnect()})}function Ia(e){return"__value"in e?e.__value:e.value}function od(e){if(e.target.closest("selectedcontent")!==null)return!0;if(e.type==="childList"){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(r=>r.nodeName==="SELECTEDCONTENT")}return!1}var fd=Symbol("is custom element"),cd=Symbol("is html"),ud=Vs?"link":"LINK";function to(e){if(T){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Q(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var o=e.checked;Q(e,"checked",null),e.checked=o}}};e[Vr]=r,we(r),Di()}}function ns(e,t){var r=Xf(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Q(e,t,r,n){var o=Xf(e);if(T&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===ud)){n||pd(e,t,r??"");return}o[t]!==(o[t]=r)&&(t==="loading"&&(e[xl]=r),r==null?e.removeAttribute(t):typeof r!="string"&&dd(e).has(t)?e[t]=r:e.setAttribute(t,r))}function Xf(e){var t;return e[t=xi]??(e[t]={[fd]:e.nodeName.includes("-"),[cd]:e.namespaceURI===Ei})}var Kf=new Map;function dd(e){var t=e.getAttribute("is")||e.nodeName,r=Kf.get(t);if(r)return r;Kf.set(t,r=new Set);for(var n,o=e,i=Element.prototype;i!==o;){n=vi(o);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);o=on(o)}return r}function pd(e,t,r){b&&(t==="srcset"&&_d(e,r)||La(e.getAttribute(t)??"",r)||Al(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function La(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Zf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function _d(e,t){var r=Zf(e.srcset),n=Zf(t);return n.length===r.length&&n.every(([o,i],a)=>i===r[a][1]&&(La(r[a][0],o)||La(o,r[a][0])))}function is(e,t,r=t){var n=new WeakSet;zs(e,"input",async o=>{b&&e.type==="checkbox"&&Ys();var i=o?e.defaultValue:e.value;if(i=Ma(e)?Fa(i):i,r(i),O!==null&&n.add(O),await Ar(),i!==(i=t())){var a=e.selectionStart,l=e.selectionEnd,f=e.value.length;if(e.value=i??"",l!==null){var u=e.value.length;a===l&&l===f&&u>f?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=a,e.selectionEnd=Math.min(l,u))}}}),(T&&e.defaultValue!==e.value||ae(t)==null&&e.value)&&(r(Ma(e)?Fa(e.value):e.value),O!==null&&n.add(O)),He(()=>{b&&e.type==="checkbox"&&Ys();var o=t();if(e===document.activeElement){var i=ke?Ot:O;if(n.has(i))return}Ma(e)&&o===Fa(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function Ma(e){var t=e.type;return t==="number"||t==="range"}function Fa(e){return e===""?null:+e}function Pa(e,t){return e===t||e?.[Ge]===t}function en(e=ko(),t,r,n){var o=q.r,i=k;return Et(()=>{var a,l;return He(()=>{a=l,l=n?.()||[],ae(()=>{Pa(r(...l),e)||(t(e,...l),a&&Pa(r(...a),e)&&t(null,...a))})}),()=>{let f=i;for(;f!==o&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;let u=()=>{l&&Pa(r(...l),e)&&t(null,...l)},v=f.teardown;f.teardown=()=>{u(),v?.()}}}),e}function Jf(e){return new Ua(e)}var Nr,Ht,Ua=class{constructor(t){F(this,Nr);F(this,Ht);var r=new Map,n=(i,a)=>{var l=mn(a,!1,!1);return r.set(i,l),l};let o=new Proxy({...t.props||{},$$events:{}},{get(i,a){return s(r.get(a)??n(a,Reflect.get(i,a)))},has(i,a){return a===yi?!0:(s(r.get(a)??n(a,Reflect.get(i,a))),Reflect.has(i,a))},set(i,a,l){return E(r.get(a)??n(a,l),l),Reflect.set(i,a,l)}});I(this,Ht,(t.hydrate?jo:es)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),!ke&&(!t?.props?.$$host||t.sync===!1)&&zr(),I(this,Nr,o.$$events);for(let i of Object.keys(c(this,Ht)))i==="$set"||i==="$destroy"||i==="$on"||Ie(this,i,{get(){return c(this,Ht)[i]},set(a){c(this,Ht)[i]=a},enumerable:!0});c(this,Ht).$set=i=>{Object.assign(o,i)},c(this,Ht).$destroy=()=>{zo(c(this,Ht))}}$set(t){c(this,Ht).$set(t)}$on(t,r){c(this,Nr)[t]=c(this,Nr)[t]||[];let n=(...o)=>r.call(this,...o);return c(this,Nr)[t].push(n),()=>{c(this,Nr)[t]=c(this,Nr)[t].filter(o=>o!==n)}}$destroy(){c(this,Ht).$destroy()}};Nr=new WeakMap,Ht=new WeakMap;var Ed;typeof HTMLElement=="function"&&(Ed=class extends HTMLElement{constructor(t,r,n){super();re(this,"$$ctor");re(this,"$$s");re(this,"$$c");re(this,"$$cn",!1);re(this,"$$d",{});re(this,"$$r",!1);re(this,"$$p_d",{});re(this,"$$l",{});re(this,"$$l_u",new Map);re(this,"$$me");re(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let o=this.$$c.$on(t,r);this.$$l_u.set(r,o)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return i=>{let a=Wt("slot");o!=="default"&&(a.name=o),D(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=Td(this);for(let o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),r.default=!0):r[o]=t(o));for(let o of this.attributes){let i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=Va(i,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Jf({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=pa(()=>{He(()=>{this.$$r=!0;for(let o of Ms(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let i=Va(o,this.$$d[o],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,i)}this.$$r=!1})});for(let o in this.$$l)for(let i of this.$$l[o]){let a=this.$$c.$on(o,i);this.$$l_u.set(i,a)}this.$$l={}}}attributeChangedCallback(t,r,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Va(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Ms(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Va(e,t,r,n){let o=r[e]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Td(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}if(b){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;Yl(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function Qf(e){q===null&&Ri("onMount"),Yr&&q.l!==null?Ad(q).m.push(e):Ft(()=>{let t=ae(e);if(typeof t=="function")return t})}function Ad(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var ec;typeof window<"u"&&((ec=window.__svelte??(window.__svelte={})).v??(ec.v=new Set)).add("5");async function tc(e,t,r){let n=new URL(e,document.baseURI);if(n.origin!==location.origin)throw new Error("Unsafe search endpoint");n.searchParams.set("q",t);let o=await fetch(n,{signal:r,cache:"no-store"});if(!o.ok)throw new Error("Archive search unavailable");let i=await o.json();if(typeof i!="object"||i===null||!("version"in i)||i.version!==1||!("results"in i)||!Array.isArray(i.results)||i.results.length>1e4||!("truncated"in i)||typeof i.truncated!="boolean")throw new Error("Invalid archive results");return{records:i.results.map(l=>{if(typeof l!="object"||l===null||!("name"in l)||typeof l.name!="string"||!("path"in l)||typeof l.path!="string"||!("kind"in l)||!["file","directory"].includes(String(l.kind))||!("href"in l)||l.href!==null&&typeof l.href!="string")throw new Error("Invalid archive record");let f=l.href===null?null:new URL(l.href,n);if(f&&!["http:","https:"].includes(f.protocol))throw new Error("Unsafe archive link");return{name:l.name,path:l.path,href:f?.href??null,exitsExplorer:l.kind!=="directory"}}),truncated:i.truncated}}var Ba=["directory","file","link"];function Rd(e){if(typeof e!="object"||e===null)return!1;let t=e;return["name","size","modified"].includes(String(t.field))&&["asc","desc"].includes(String(t.direction))&&["natural","locale","unicode"].includes(String(t.nameMode))&&typeof t.directoriesFirst=="boolean"}function rc(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(e,1e9)):0}function ss(e,t,r,n,o=[],i=null){let a=new URL(e).searchParams,l={...n,query:(a.get("dw.q")??"").slice(0,4096),selected:null,windowY:0,listTop:0};if(t==="ledger"){let f=a.get("dw.sort")?.split(":");if(f?.length===4){let u={field:f[0],direction:f[1],nameMode:f[2],directoriesFirst:f[3]==="folders"};["folders","mixed"].includes(f[3])&&Rd(u)&&(l.sort=u)}if(a.has("dw.types")){let u=a.get("dw.types").split(",").filter(Boolean);u.every(v=>Ba.includes(v))&&(l.types=[...new Set(u)])}}else{let f=a.get("dw.category");f!==null&&o.includes(f)&&(l.category=f)}if(typeof i=="object"&&i!==null&&"dirwell"in i){let f=i.dirwell;if(typeof f=="object"&&f!==null&&"version"in f&&f.version===1&&"theme"in f&&f.theme===t&&"path"in f&&f.path===r&&"view"in f&&typeof f.view=="object"&&f.view!==null){let u=f.view;l.selected=typeof u.selected=="string"&&u.selected.length<=4096?u.selected:null,l.windowY=rc(u.windowY),l.listTop=rc(u.listTop)}}return l}function Nd(e,t,r,n){let o=new URL(e);for(let i of["dw.q","dw.sort","dw.types","dw.category"])o.searchParams.delete(i);if(r.query&&o.searchParams.set("dw.q",r.query.slice(0,4096)),t==="ledger"){if(r.sort&&["field","direction","nameMode","directoriesFirst"].some(i=>r.sort[i]!==n.sort?.[i])){let i=r.sort;o.searchParams.set("dw.sort",`${i.field}:${i.direction}:${i.nameMode}:${i.directoriesFirst?"folders":"mixed"}`)}r.types&&Ba.some(i=>r.types.includes(i)!==(n.types??Ba).includes(i))&&o.searchParams.set("dw.types",r.types.join(","))}else r.category&&r.category!==n.category&&o.searchParams.set("dw.category",r.category);return o.href}function nc(e){let t=location.href,r=history.state,n=(o,i,a)=>({...typeof history.state=="object"&&history.state!==null?history.state:{},dataHref:o,dirwell:{version:1,theme:e,path:i,...a===void 0?{}:{view:{query:a.query,...a.sort===void 0?{}:{sort:{...a.sort}},...a.types===void 0?{}:{types:[...a.types]},category:a.category??null,selected:a.selected??null,windowY:a.windowY??0,listTop:a.listTop??0}}}});return{save(o,i,a,l){if(location.href!==t)return;let f=Nd(t,e,a,l),u=n(o,i,a);try{history.replaceState(u,"",f),t=f,r=u}catch{}},commit(o,i,a,l){let f=n(o,i);l?history.pushState(f,"",a):history.replaceState(f,"",a),t=a,r=f},rollback(){if(location.href!==t)try{history.replaceState(r,"",t)}catch{}}}}var Cd={directory:'<path d="M3 7V5h6l2 3h10v12H3Z"/><path d="M3 10h18"/>',file:'<path d="M5 3h9l5 5v13H5ZM14 3v5h5M8 12h8M8 16h6"/>',link:'<path d="m9 15 6-6M8 10l-3 3a4 4 0 0 0 6 6l3-3M10 8l3-3a4 4 0 0 1 6 6l-3 3"/>'};function oc(e){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${Cd[e]}</svg>`}function Ya(e){let t=new Set,r=(o,i)=>{if(i>32)throw new TypeError("Presentation data is too deeply nested");if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"&&Number.isFinite(o))return o;if(typeof o!="object"||o===null||t.has(o))throw new TypeError("Presentation data must be finite, acyclic JSON");t.add(o);try{if(Array.isArray(o))return o.map(a=>r(a,i+1));if(Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null)throw new TypeError("Presentation data must use plain objects");return Object.fromEntries(Object.entries(o).map(([a,l])=>[a,r(l,i+1)]))}finally{t.delete(o)}};if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Presentation data must be an object");let n=r(e,0);if(typeof n!="object"||n===null||Array.isArray(n))throw new TypeError("Presentation data must be an object");return n}var B=class extends Error{constructor(){super(...arguments);re(this,"name","ListingDataError")}},Xo=class extends B{},ro=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),as=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0,ic=e=>typeof e=="string"&&["directory","file","symlink","other"].includes(e);function Cr(e,t){if(typeof e!="string")throw new B(`Invalid ${t}`);return e}function qa(e,t){if(typeof e!="boolean")throw new B(`Invalid ${t}`);return e}function Od(e,t){if(e===null)return null;let r=new URL(Cr(e,"href"),t);if(!["http:","https:"].includes(r.protocol))throw new B("Unsupported listing link protocol");return r.href}function sc(e,t){if(!ro(e)||!ic(e.kind)||typeof e.size!="number"||!Number.isFinite(e.size)||e.size<0)throw new B("Invalid listing entry");let r=null;if(e.link!==null){if(!ro(e.link))throw new B("Invalid link metadata");let n=e.link.targetKind;if(n!==null&&(!ic(n)||n==="symlink"))throw new B("Invalid target kind");let o=e.link.targetSize;if(o!==null&&(typeof o!="number"||!Number.isFinite(o)||o<0))throw new B("Invalid target size");r={target:Cr(e.link.target,"target"),targetKind:n,targetSize:o,unavailable:qa(e.link.unavailable,"unavailable"),cycle:qa(e.link.cycle,"cycle")}}return{...e.data===void 0?{}:{data:Ya(e.data)},...e.presentation===void 0?{}:{presentation:Ya(e.presentation)},id:Cr(e.id,"id"),name:Cr(e.name,"name"),kind:e.kind,href:Od(e.href,t),exitsExplorer:qa(e.exitsExplorer,"exitsExplorer"),size:e.size,modifiedAt:Cr(e.modifiedAt,"modifiedAt"),link:r}}function Id(e){if(!ro(e)||e.version!==1||!as(e.total)||!Array.isArray(e.blocks)||!ro(e.sort))throw new B("Invalid listing manifest");let t=e.sort;if(typeof t.field!="string"||!["name","size","modified"].includes(t.field)||typeof t.direction!="string"||!["asc","desc"].includes(t.direction)||typeof t.nameMode!="string"||!["locale","natural","unicode"].includes(t.nameMode)||typeof t.directoriesFirst!="boolean")throw new B("Invalid listing order");let r=t.field==="size"?"size":t.field==="modified"?"modified":"name",n=t.direction==="desc"?"desc":"asc",o=t.nameMode==="unicode"?"unicode":t.nameMode==="locale"?"locale":"natural",i=e.blocks.map(a=>{if(!ro(a)||!as(a.offset)||!as(a.count))throw new B("Invalid block descriptor");return{href:Cr(a.href,"block href"),offset:a.offset,count:a.count}});if(i.length===0)throw new B("Missing blocks");return{version:1,revision:Cr(e.revision,"revision"),directory:Cr(e.directory,"directory"),hrefBase:Cr(e.hrefBase,"href base"),total:e.total,sort:{field:r,direction:n,nameMode:o,directoriesFirst:t.directoriesFirst},blocks:i}}async function Jo(e,t={}){let r=t.fetch??fetch,n=t.maxEntries??1e5;if(!as(n))throw new B("Invalid entry limit");let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new B("Listing loading requires HTTP(S); use native file navigation");for(let i=0;i<2;i++)try{let a={...t.signal===void 0?{}:{signal:t.signal},cache:i===0?t.cache??"default":"reload"},l=await r(o,a);if(!l.ok)throw new B(`Manifest request failed: ${l.status}`);let f=Id(await l.json());if(f.total>n)throw new B("Listing exceeds the configured entry limit");let u=new URL(f.hrefBase,o);if(!["http:","https:"].includes(u.protocol))throw new B("Unsupported href base protocol");let v=[],h=new Set;for(let m of f.blocks){if(m.offset!==v.length||m.count+v.length>f.total)throw new B("Invalid block coverage");let _=new URL(m.href,o);if(_.origin!==o.origin||!["http:","https:"].includes(_.protocol))throw new B("Block leaves the manifest origin");let $=await r(_,a);if($.status===404||$.status===410)throw new Xo("Block no longer available");if(!$.ok)throw new B(`Block request failed: ${$.status}`);let g=await $.json();if(!ro(g)||g.version!==1||g.revision!==f.revision)throw new Xo("Listing revision changed");if(g.offset!==m.offset||g.total!==f.total||!Array.isArray(g.entries)||g.entries.length!==m.count)throw new B("Invalid block envelope");for(let y of g.entries){let A=sc(y,u);if(h.has(A.id))throw new B("Duplicate entry ID");h.add(A.id),v.push(A)}}if(v.length!==f.total)throw new B("Incomplete listing");return{manifest:f,entries:v}}catch(a){if(t.signal?.aborted||!(a instanceof Xo)||i===1)throw a}throw new B("Listing unavailable")}function ac(e,t,r=1e5){if(!Array.isArray(e)||e.length>r)throw new B("Invalid page slice");let n=new URL(t),o=new Set,i=e.map(a=>sc(a,n));for(let a of i){if(o.has(a.id))throw new B("Duplicate entry ID");o.add(a.id)}return i}var Dd={other:"other",crosswaveKeyboardHelp:"Arrow keys navigate \xB7 Enter confirms \xB7 Backspace returns",brokenLink:"broken link",unavailableLink:"unavailable link",cycleLink:"cycle link",azure:"azure",violet:"violet",amber:"amber",rose:"rose",jade:"jade",graphite:"graphite",allFiles:"All files",categoryFolders:"Folders",categoryPhotos:"Photos",categoryMusic:"Music",categoryVideos:"Videos",categoryDocuments:"Documents",categoryOther:"Other",indexOf:"Index of {path}",home:"Home",breadcrumb:"Breadcrumb",archive:"File archive",searchDirectory:"Search this directory",searchFiles:"Search files",search:"Search",types:"Types",directory:"directory",file:"file",link:"link",folder:"Folder",sort:"Sort",name:"Name",size:"Size",modified:"Modified",names:"Names",natural:"Natural",locale:"Locale",unicode:"Unicode",order:"Order",ascending:"Ascending",descending:"Descending",directoriesFirst:"Folders first",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",searchArchive:"Search archive",archiveSearchInput:"Search archive files",entries:"{count} entries",pageEntries:"{total} entries \xB7 {count} on this page",loading:"Loading\u2026",noMatches:"No matching entries.",empty:"This directory is empty.",pagination:"Pagination",previous:"Previous",next:"Next",page:"Page {page} of {pages}",keyboardHelp:"Arrow keys select files \xB7 Home / End jump \xB7 / searches \xB7 Backspace opens parent",modifiedTime:"Modified time",close:"Close",unknown:"Unknown",unavailable:"Target unavailable",beginArchive:"Enter a search to begin.",searchingArchive:"Searching archive\u2026",archiveResults:"{count} results",truncatedResults:"Showing {shown} of {count} results",archiveError:"Could not load archive search. Try again.",listingError:"Could not load complete directory data. Native page links remain available.",folderError:"Could not open the folder. Its native link remains available.",updatesError:"Live updates disconnected. Refresh to retry.",retry:"Retry",openNative:"Open folder directly",categories:"File categories",items:"{count} items",filesIn:"Files in {path}",controller:"Controller \xB7 Confirm / Back",color:"Color",pauseMotion:"Pause motion",resumeMotion:"Resume motion",copyLink:"Copy link",copyPath:"Copy path",download:"Download",copied:"Copied.",copyError:"Could not copy. Use the native link or select the path.",repository:"Repository",author:"by",target:"Target",newTab:"opens in a new tab"};function no(e={}){let t=e.language===void 0?"en":e.language,r=e.locale===void 0?"en-US":e.locale,n=e.timeZone===void 0?"UTC":e.timeZone;for(let[h,m]of Object.entries({language:t,locale:r,timeZone:n}))if(typeof m!="string"||!m)throw new TypeError(`${h} must be a non-empty string`);new Intl.DateTimeFormat(r,{timeZone:n});let o=e.direction??"ltr";if(o!=="ltr"&&o!=="rtl")throw new TypeError("direction must be ltr or rtl");let i={...Dd};if(e.labels!==void 0){if(typeof e.labels!="object"||e.labels===null||Array.isArray(e.labels))throw new TypeError("labels must be an object");for(let[h,m]of Object.entries(e.labels)){if(!Object.hasOwn(i,h)||typeof m!="string")throw new TypeError(`Unsupported label or value: ${h}`);Object.assign(i,{[h]:m})}}let a=e.brand??{};if(typeof a!="object"||a===null||Array.isArray(a))throw new TypeError("brand must be an object");for(let[h,m]of Object.entries(a)){if(!["name","logoUrl","logoAlt","footerText","footerUrl","faviconUrl"].includes(h)||typeof m!="string")throw new TypeError(`Unsupported brand option or value: ${h}`);if(h.endsWith("Url")&&!/^https?:\/\//i.test(m)&&!(m.startsWith("/")&&!m.startsWith("//")))throw new TypeError(`brand.${h} must be an HTTP(S) or root-relative URL`)}let l=e.columns??["name","size","modified"];if(!Array.isArray(l)||!l.includes("name"))throw new TypeError("columns must contain name and unique supported columns");let f=new Set;for(let h of l){let m;if(typeof h=="string"){if(!["name","size","modified"].includes(h))throw new TypeError("Unsupported column");m=h}else{if(typeof h!="object"||h===null||Object.keys(h).some(_=>!["dataKey","label"].includes(_))||typeof h.dataKey!="string"||!h.dataKey||typeof h.label!="string"||!h.label)throw new TypeError("Data columns require dataKey and label");m="data:"+h.dataKey}if(f.has(m))throw new TypeError("columns must contain unique supported columns");f.add(m)}let u=e.actions??[];if(!Array.isArray(u)||new Set(u).size!==u.length||u.some(h=>!["copy-link","copy-path","download"].includes(h)))throw new TypeError("actions must contain unique supported actions");let v=e.cssVariables??{};if(typeof v!="object"||v===null||Array.isArray(v))throw new TypeError("cssVariables must be an object");for(let[h,m]of Object.entries(v))if(!/^--[a-zA-Z][a-zA-Z0-9_-]*$/.test(h)||typeof m!="string"||/[{};<>]/.test(m))throw new TypeError(`Invalid CSS variable: ${h}`);return{language:t,dateOptions:{...e.locale===void 0?{}:{locale:e.locale},...e.timeZone===void 0?{}:{timeZone:e.timeZone}},direction:o,locale:r,timeZone:n,labels:i,brand:{...a},columns:l.map(h=>typeof h=="string"?h:{...h}),actions:[...u],cssVariables:{...v}}}var dS=no();function An(e,t,r={}){return e.labels[t].replace(/\{([a-zA-Z]+)\}/g,(n,o)=>Object.hasOwn(r,o)?String(r[o]):n)}var Qo=new Map;function ja(e,t,r=!1){let n=new Date(e);if(Number.isNaN(n.getTime()))return t.labels.unknown;if(t.dateOptions.locale===void 0&&t.dateOptions.timeZone===void 0)return r?n.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"}):n.toISOString().slice(0,16).replace("T"," ")+" UTC";let o=t.dateOptions.locale,i=t.dateOptions.timeZone??(r?void 0:"UTC"),a=String(o)+"\0"+String(i),l=Qo.get(a);return l===void 0&&(l=new Intl.DateTimeFormat(o,{timeZone:i,dateStyle:"short",timeStyle:"short"}),Qo.size>=32&&Qo.delete(Qo.keys().next().value),Qo.set(a,l)),l.format(n)}async function lc(e,t){let r=e==="copy-link"&&t.href?new URL(t.href,document.baseURI).href:t.id;if(!navigator.clipboard?.writeText)throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(r)}function fc(e,t){return typeof e=="string"?t.labels[e]:e.label}function cc(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}async function za(e,t,r,n,o=!1,i=0){let a=new URL(e,document.baseURI);if(a.origin!==location.origin)throw new B("Folder leaves the theme origin");let l=await fetch(a,{signal:n,cache:o?"no-store":"default"});if(!l.ok)throw new B("Unavailable folder");let f=await l.json();if(typeof f!="object"||f===null||Array.isArray(f))throw new B("Invalid folder snapshot");let u=f;if(u.version!==1||u.theme!==r||typeof u.title!="string"||typeof u.path!="string"||!Number.isSafeInteger(u.total)||Number(u.total)<0||!Array.isArray(u.breadcrumbs))throw new B("Unsupported folder snapshot");if(u.metadataHead!==void 0&&typeof u.metadataHead!="string")throw new B("Invalid folder metadata");let v=u.sort;if(!v||typeof v!="object"||!["name","size","modified"].includes(String(v.field))||!["asc","desc"].includes(String(v.direction))||!["natural","locale","unicode"].includes(String(v.nameMode))||typeof v.directoriesFirst!="boolean")throw new B("Invalid folder order");if(r==="crosswave"){let g=u.categories,y=new Set;if(!Array.isArray(g)||g.length===0||g.some(A=>typeof A!="object"||A===null||typeof A.id!="string"||!A.id||y.has(A.id)||typeof A.label!="string"||typeof A.svg!="string"?!0:(y.add(A.id),!1)))throw new B("Invalid folder categories")}let h=document.querySelector("base")?.href??t,m=g=>{if(g===null)return null;if(typeof g!="string")throw new B("Invalid folder link");let y=new URL(g,h);if(!["http:","https:"].includes(y.protocol)||y.origin!==location.origin)throw new B("Unsupported folder link");return y.href},_=ac(u.entries,h).map(g=>({...g,...g.presentation?{presentation:{...g.presentation,folderDataHref:m(g.presentation.folderDataHref??null)}}:{}}));if(_.length>Number(u.total))throw new B("Invalid folder count");if(u.page!==null){let g=u.page;if(!g||typeof g!="object"||!Number.isSafeInteger(g.number)||Number(g.number)<1||!Number.isSafeInteger(g.count)||Number(g.count)<Number(g.number)||!Number.isSafeInteger(g.offset)||Number(g.offset)<0||Number(g.offset)>Number(u.total)||g.total!==u.total)throw new B("Invalid folder pagination");u.page={...g,href:m(g.href),previousHref:m(g.previousHref),nextHref:m(g.nextHref)}}u.ui!==void 0&&no(u.ui);let $={...u,searchQueryHref:m(u.searchQueryHref??null),updatesHref:m(u.updatesHref??null),entries:_,dataHref:a.href,manifestHref:m(u.manifestHref),rootHref:m(u.rootHref),rootDataHref:m(u.rootDataHref),parentHref:m(u.parentHref),parentDataHref:m(u.parentDataHref),breadcrumbs:u.breadcrumbs.map(g=>{if(typeof g!="object"||g===null||!("name"in g)||!("href"in g)||!("dataHref"in g)||typeof g.name!="string")throw new B("Invalid breadcrumb");return{name:g.name,href:m(g.href),dataHref:m(g.dataHref)}})};if($.manifestHref){let g=await Jo($.manifestHref,{signal:n,cache:o?"no-store":"default"});if(g.manifest.total!==u.total||u.listingRevision!==void 0&&g.manifest.revision!==u.listingRevision){if(i<2)return za(e,t,r,n,!0,i+1);throw new B("Folder changed while refreshing")}$.entries=[...g.entries]}return $}var ls=new WeakMap;function uc(e,t){if(!t||typeof document>"u")return e;let r=document.querySelector("[data-dirwell-theme]");if(!r)return e;let n=ls.get(r)??e;return ls.set(r,n),n}function dc(e,t){let r=document.querySelector("[data-dirwell-theme]");r&&ls.has(r)&&ls.set(r,e),document.title=typeof e.title=="string"?e.title:"";let n=document.createElement("template");n.innerHTML=typeof e.metadataHead=="string"?e.metadataHead:"",document.head.querySelectorAll("[data-dirwell-metadata]").forEach(a=>a.remove());let o=document.querySelector("base")?.href??t,i=a=>{try{let l=new URL(a,o);return["http:","https:"].includes(l.protocol)?l.href:null}catch{return null}};for(let a of n.content.children){if(!a.hasAttribute("data-dirwell-metadata"))continue;let l;if(a.tagName==="META"){let f=a.hasAttribute("property")?"property":"name",u=a.getAttribute(f)??"";if(!/^(?:description|og:[a-z_:]+|twitter:[a-z_:]+)$/i.test(u))continue;let v=a.getAttribute("content")??"";if(["og:image","og:url","twitter:image"].includes(u)){let h=i(v);if(h===null)continue;v=h}l=document.createElement("meta"),l.setAttribute(f,u),l.setAttribute("content",v)}else if(a.tagName==="LINK"&&a.getAttribute("rel")==="canonical"){let f=i(a.getAttribute("href")??"");if(f===null)continue;l=document.createElement("link"),l.setAttribute("rel","canonical"),l.setAttribute("href",f)}else continue;l.setAttribute("data-dirwell-metadata",""),document.head.append(l)}}var oo=e=>e.kind==="directory"||e.link?.targetKind==="directory",Ga=e=>e.kind==="symlink"?"link":oo(e)?"directory":"file";function Ka(e,t){let r=0,n=0,o=-2;for(let i of e.trim().toLocaleLowerCase()){let a=t.toLocaleLowerCase().indexOf(i,n);if(a<0)return null;a===o+1&&(r+=8),(a===0||/[\s/_.-]/.test(t[a-1]??""))&&(r+=5),r+=Math.max(0,4-a*.05),o=a,n=a+1}return r-t.length*.01}function _c(e,t,r,n){return e.map(o=>({entry:o,score:Ka(t,`${o.name} ${o.link?.target??""}`)})).filter(o=>r.includes(Ga(o.entry))&&o.score!==null).sort((o,i)=>{if(t.trim()&&o.score!==i.score)return(i.score??0)-(o.score??0);let a=o.entry,l=i.entry;if(n.directoriesFirst&&oo(a)!==oo(l))return oo(a)?-1:1;let f=()=>n.nameMode==="unicode"?pc(a.name,l.name):a.name.localeCompare(l.name,void 0,{numeric:n.nameMode==="natural",sensitivity:"base"}),u=(n.field==="name"?f():n.field==="size"?(a.kind==="directory"?0:a.size)-(l.kind==="directory"?0:l.size):a.modifiedAt.localeCompare(l.modifiedAt))||f();return(n.direction==="asc"?u:-u)||pc(a.id,l.id)}).map(o=>o.entry)}function pc(e,t){let r=[...e],n=[...t];for(let o=0;o<Math.min(r.length,n.length);o++){let i=(r[o]?.codePointAt(0)??0)-(n[o]?.codePointAt(0)??0);if(i)return i}return r.length-n.length}function mc(e){let t=["B","KiB","MiB","GiB","TiB"],r=e,n=0;for(;r>=1024&&n<4;)r/=1024,n++;return`${r.toFixed(n===0||r>=100?0:1)} ${t[n]}`}var Ld=ee('<img width="40" height="40"/>'),Md=ee("<!> <h1> </h1> <span> </span>",1),Fd=ee("/ <a> </a>",1),Pd=ee('<label><input type="checkbox"/> </label>'),fs=ee("<button> </button>"),Za=ee("<a> </a>"),Hd=ee("<span> </span>"),Ud=ee('<li class="entry"><a>../</a></li>'),hc=ee('<li aria-hidden="true"></li>'),Vd=ee('<span class="file-icon" aria-hidden="true"></span> ',1),Bd=ee('<a class="name"><!></a>'),Yd=ee("<span><!></span>"),qd=ee('<small class="target"> </small>'),jd=ee('<span class="identity"><!><!></span>'),zd=ee('<span class="kind"> </span>'),Gd=ee('<button class="timestamp-button"><time> </time></button>'),Kd=ee('<span class="entry-data"> </span>'),Zd=ee('<a download=""> </a>'),Wd=ee('<span data-dirwell-actions="" style="grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem"><!> <!></span>'),Xd=ee('<li class="entry" data-entry=""><!> <!></li>'),Jd=ee("<p> </p>"),Qd=ee('<a rel="prev"> </a>'),ep=ee('<a rel="next"> </a>'),tp=ee("<nav><!> <!></nav>"),rp=ee('<p class="brand-footer"><!></p>'),np=ee('<p class="keyboard-help"> </p>'),op=ee("<dialog><h2> </h2> <p> </p> <p> </p> <button> </button></dialog>"),ip=ee("<li><!></li>"),sp=ee('<dialog><h2> </h2> <input type="search"/> <p role="status"> </p> <!> <ul></ul> <button> </button></dialog>'),ap=ee('<header class="page-header"><div class="wordmark"><!></div> <nav><a> </a><!></nav></header> <main data-explorer="" data-framework="svelte"><div class="toolbar"><label class="search-field"> <input type="search"/></label> <fieldset><legend> </legend><!></fieldset> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option></select></label> <label><input type="checkbox"/> </label> <label> <select><option> </option><option> </option><option> </option></select></label> <!></div> <section class="listing-card"><div class="listing-summary"> <span data-visible-count=""> </span> <span role="status" aria-live="polite"> </span></div> <!> <!> <div class="entry-head"></div> <ul class="entry-list"><!> <!> <!> <!></ul> <!></section> <!> <!></main> <!> <!>',1);function Wa(e,t){Eo(t,!0);let r=ae(()=>uc(t.model,!1)),n=j(r),o=j(r.entries),i=j(""),a=j(Zt(["directory","file","link"])),l=j(r.sort),f=j("system"),u=j(null),v=j(!1),h=j(!1),m=j(""),_=j(null),$=j(null),g=j(!1),y=j(0),A=j(800),K=j(!1),pe=j(""),ye=j([]),ot=j(Zt(no(r.ui).labels.beginArchive)),Ue=j(null),w=Ct(()=>no(s(n).ui)),Jt=j(!1),_t=Ct(()=>An(s(w),s(mt)?"entries":"pageEntries",{count:"__COUNT__",total:s(n).total}).split("__COUNT__")),je=j(new Map),hr=Ct(()=>s(v)&&s(n).updatesHref?new URL(s(n).updatesHref,document.baseURI).href:null),mt=Ct(()=>s(o).length===s(n).total),ue=Ct(()=>_c(s(o),s(g)?"":s(i),s(a),s(l))),io=Ct(()=>s(v)&&s(ue).length>500),Or=Ct(()=>{let d=[0];for(let p of s(ue))d.push(d.at(-1)+(s(je).get(p.id)??76));return d}),so=Ct(()=>{if(!s(io))return 0;let d=0,p=s(ue).length;for(;d<p;){let x=d+p>>1;s(Or)[x+1]<=s(y)?d=x+1:p=x}return Math.max(0,d-5)}),cs=Ct(()=>{if(!s(io))return s(ue).length;let d=0,p=s(ue).length;for(;d<p;){let x=d+p>>1;s(Or)[x+1]<=s(y)+s(A)?d=x+1:p=x}return Math.min(s(ue).length,Math.max(s(so)+35,d+5))});function vc(d,p){if(typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{let N=d.getBoundingClientRect().height;if(N>0&&s(je).get(p)!==N){let U=new Map(s(je));U.set(p,N),E(je,U)}});return x.observe(d),{destroy:()=>x.disconnect()}}let Ir=j(void 0),ei=j(void 0),us=j(void 0),ao=j(void 0),lo=j(void 0),Dr=0,fo,co,Lr=0,Xa=null,Ja="",Qa=0,Sn,Rn=null,uo=d=>({query:"",sort:d.sort,types:["directory","file","link"]});function ds(){Sn&&Sn.save(new URL(s(n).dataHref,document.baseURI).href,s(n).path,{query:s(i),types:s(a),sort:s(l),selected:s(u),windowY:window.scrollY,listTop:s(y)},uo(s(n)))}function gc(){s(_)==="folder"&&Rn?tn(...Rn,!0):tn(s(n).dataHref,location.href,!1,!0)}Ft(()=>{if(!s(v)||s(h))return;let d={query:s(i),types:s(a),sort:s(l),selected:s(u),listTop:s(y)},p=s(n).dataHref,x=s(n).path,N=uo(s(n)),U=requestAnimationFrame(()=>Sn?.save(new URL(p,document.baseURI).href,x,{...d,windowY:window.scrollY},N));return()=>cancelAnimationFrame(U)});let ps=oo;async function el(){if(s(mt)||!s(n).manifestHref||location.protocol==="file:")return;let d=fo,p=Dr;E(h,!0);try{let x=await Jo(new URL(s(n).manifestHref,document.baseURI).href,{signal:d.signal,cache:s(n).updatesHref?"no-store":"default"});p===Dr&&!d.signal.aborted&&E(o,x.entries)}catch{p===Dr&&!d.signal.aborted&&(E(m,s(w).labels.listingError,!0),E(_,"listing"))}finally{p===Dr&&E(h,!1)}}async function bc(d,p){E(u,p.id,!0),ds();let x=p.presentation?.folderDataHref;p.exitsExplorer||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||typeof x!="string"||location.protocol==="file:"||(d?.preventDefault(),await tn(x,new URL(p.href,document.baseURI).href,!0))}async function tn(d,p,x,N=!1,U=null,te=!1){x&&ds();let V=++Dr;fo?.abort();let Z=fo=new AbortController;E(h,!0),E(m,""),E(_,null);try{let P=await za(d,p,"ledger",Z.signal,N||te),X=P.entries;if(N&&P.manifestHref&&X.length!==P.total&&(X=(await Jo(P.manifestHref,{signal:Z.signal,cache:"no-store"})).entries),V!==Dr||Z.signal.aborted)return;if(N||Sn.commit(P.dataHref,P.path,p,x),E(n,P),E(o,X),Rn=null,!N){let _e=ss(p,"ledger",P.path,uo(P),[],U);E(i,_e.query,!0),E(a,_e.types,!0),E(l,_e.sort),E(u,_e.selected,!0),E(y,_e.listTop,!0)}if(dc(P,p),await el(),!N){let _e=ss(p,"ledger",P.path,uo(P),[],U);await Ar(),s(u)&&!s(ue).some(Ut=>Ut.id===s(u))&&E(u,null),window.scrollTo({top:_e.windowY}),U&&s(u)&&s(Ir)?.querySelector(`[data-id="${CSS.escape(s(u))}"] a`)?.focus({preventScroll:!0})}}catch{V===Dr&&!Z.signal.aborted&&(E(m,s(w).labels.folderError,!0),E(_,"folder"),Rn=[d,p,x,N,U],Sn?.rollback())}finally{V===Dr&&E(h,!1)}}function _s(d,p,x){typeof p!="string"||typeof x!="string"||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||location.protocol==="file:"||(d?.preventDefault(),tn(x,new URL(p,document.baseURI).href,!0))}async function $c(d){let p=Math.max(0,Math.min(s(ue).length-1,d)),x=s(ue)[p];x&&(E(u,x.id,!0),s(io)&&(E(y,Math.max(0,s(Or)[p]-100),!0),s(Ir)&&window.scrollTo({top:s(Ir).getBoundingClientRect().top+window.scrollY+s(y)})),await Ar(),s(Ir)?.querySelector(`[data-order="${d}"] a`)?.focus({preventScroll:!0}))}function yc(d){if(d.isComposing||d.altKey||d.ctrlKey||d.metaKey)return;if(s(K)){d.key==="Escape"&&(d.preventDefault(),ti());return}if(s($)){d.key==="Escape"&&E($,null);return}if(d.target?.closest?.("[data-dirwell-actions]"))return;let p=/INPUT|TEXTAREA|SELECT/.test(d.target?.tagName??"");if(d.key==="/"&&!p){d.preventDefault(),s(ei)?.focus();return}if(p){d.key==="Escape"&&(E(i,""),s(ei)?.blur());return}if(d.key==="Backspace"&&s(n).parentHref){d.preventDefault(),location.protocol==="file:"||typeof s(n).parentDataHref!="string"?location.href=s(n).parentHref:tn(s(n).parentDataHref,new URL(s(n).parentHref,document.baseURI).href,!0);return}let x=s(ue).findIndex(N=>N.id===s(u));["ArrowDown","ArrowUp","Home","End"].includes(d.key)&&(d.preventDefault(),$c(d.key==="Home"?0:d.key==="End"?s(ue).length-1:x+(d.key==="ArrowDown"?1:-1)))}function wc(d){E(f,d,!0);try{localStorage.setItem("dirwell-color-scheme",d)}catch{}}let Nn,ms,po=!1;async function ti(){E(K,!1),await Ar(),ms?.focus()}function xc(){co?.abort(),Lr++,po=!1,clearTimeout(Nn),Nn=setTimeout(()=>{Nn=void 0,hs()},300)}Ft(()=>{if(!s(K)||!s(n).searchQueryHref)return;let d=setInterval(()=>{document.visibilityState==="visible"&&s(pe).trim()&&!po&&Nn===void 0&&hs()},s(n).searchRefreshIntervalMs??2e3);return()=>{clearInterval(d),clearTimeout(Nn),Nn=void 0,po=!1,co?.abort(),Lr++}});async function hs(){let d=++Lr;co?.abort();let p=co=new AbortController;E(ye,[]),E(Jt,!1);let x=s(pe).trim();if(!x){E(ot,s(w).labels.beginArchive,!0);return}E(ot,s(w).labels.searchingArchive,!0),po=!0;try{if(s(n).searchQueryHref){let V=await tc(s(n).searchQueryHref,x,p.signal);if(d!==Lr||p.signal.aborted)return;E(ye,V.records),E(ot,V.truncated?An(s(w),"truncatedResults",{shown:V.records.length,count:V.records.length+"+"}):An(s(w),"archiveResults",{count:V.records.length}),!0);return}let N=new URL(s(n).searchIndexHref,document.baseURI),U=Ja===N.href&&Date.now()-Qa<6e4?Xa:null;if(U===null){let V=await fetch(N,{signal:p.signal});if(!V.ok)throw new Error("Unavailable archive");let Z=await V.json();if(Z.version!==3||!Array.isArray(Z.shards)||!Number.isSafeInteger(Z.count)||Z.count>1e5)throw new Error("Unsupported archive");U=[];for(let P of Z.shards){if(typeof P!="string")throw new Error("Invalid shard");let X=new URL(P,N);if(X.origin!==N.origin)throw new Error("Unsafe shard");let _e=await fetch(X,{signal:p.signal});if(!_e.ok)throw new Error("Unavailable shard");let Ut=await _e.json();if(!Array.isArray(Ut.entries)||U.length+Ut.entries.length>1e5)throw new Error("Invalid archive");for(let se of Ut.entries){if(typeof se.name!="string"||typeof se.path!="string"||typeof se.exitsExplorer!="boolean")throw new Error("Invalid archive record");let me=se.href===null?null:new URL(se.href,N);if(me&&!["http:","https:"].includes(me.protocol))throw new Error("Unsupported archive link");U.push({name:se.name,path:se.path,href:me?.href??null,exitsExplorer:se.exitsExplorer})}}if(d!==Lr||p.signal.aborted)return;Xa=U,Ja=N.href,Qa=Date.now()}let te=U.map(V=>({record:V,score:Ka(x,V.name+" "+V.path)})).filter(V=>V.score!==null).sort((V,Z)=>Z.score-V.score||V.record.path.localeCompare(Z.record.path));if(d!==Lr||p.signal.aborted)return;E(ye,te.slice(0,100).map(V=>V.record)),E(ot,te.length>100?An(s(w),"truncatedResults",{shown:100,count:te.length}):An(s(w),"archiveResults",{count:te.length}),!0)}catch{d===Lr&&!p.signal.aborted&&(E(ot,s(w).labels.archiveError,!0),E(Jt,!0))}finally{d===Lr&&(po=!1)}}Qf(()=>{E(A,innerHeight,!0),E(v,!0),fo=new AbortController;try{let x=localStorage.getItem("dirwell-color-scheme");["system","light","dark"].includes(x)&&E(f,x,!0)}catch{}Sn=nc("ledger");let d=ss(location.href,"ledger",s(n).path,uo(s(n)),[],history.state);E(i,d.query,!0),E(a,d.types,!0),E(l,d.sort),E(u,d.selected,!0),E(y,d.listTop,!0),ds();let p=x=>{x.state?.dataHref?tn(x.state.dataHref,location.href,!1,!1,x.state):location.reload()};return window.addEventListener("popstate",p),el(),()=>{fo?.abort(),co?.abort(),window.removeEventListener("popstate",p)}}),Ft(()=>{let d=s(hr);if(!d||typeof EventSource>"u")return;let p=new EventSource(d);return p.onmessage=()=>E(Ue,d,!0),p.onerror=()=>{E(m,s(w).labels.updatesError,!0),E(_,"updates")},p.onopen=()=>{s(_)==="updates"&&(E(m,""),E(_,null))},()=>p.close()}),Ft(()=>{if(s(v)&&!s(h)&&s(Ue)){let d=s(Ue);E(Ue,null),d===s(hr)&&tn(s(n).dataHref,location.href,!1,!0)}}),Ft(()=>{s(v)&&(document.documentElement.dataset.theme=s(f))}),Ft(()=>{s(ao)&&s($)&&!s(ao).open&&s(ao).showModal()}),Ft(()=>{s(lo)&&s(K)&&!s(lo).open&&(s(lo).showModal(),Ar().then(()=>s(us)?.focus()))});var tl=ap();cr("resize",gn,()=>E(A,innerHeight,!0)),cr("keydown",gn,yc),cr("scroll",gn,()=>{s(Ir)&&E(y,Math.max(0,window.scrollY-s(Ir).offsetTop),!0)});var vs=xt(tl),gs=W(vs),Ec=W(gs);{var Tc=d=>{var p=Sr(),x=xt(p);En(x,()=>t.header,()=>({model:s(n)})),D(d,p)},kc=d=>{var p=Md(),x=xt(p);{var N=P=>{var X=Ld();z(()=>{Q(X,"src",s(w).brand.logoUrl),Q(X,"alt",s(w).brand.logoAlt??"")}),D(P,X)};le(x,P=>{s(w).brand.logoUrl&&P(N)})}var U=S(x,2),te=H(U,!0),V=S(U,2),Z=H(V,!0);z(()=>{R(te,s(w).brand.name??s(n).title),R(Z,s(w).labels.archive)}),D(d,p)};le(Ec,d=>{t.header?d(Tc):d(kc,-1)})}Y(gs);var bs=S(gs,2),ri=W(bs),Ac=H(ri,!0),Sc=S(ri);Rr(Sc,17,()=>s(n).breadcrumbs,Jr,(d,p)=>{wo();var x=Fd(),N=S(xt(x)),U=H(N,!0);z(()=>{Q(N,"href",s(p).href),R(U,s(p).name)}),$e("click",N,te=>_s(te,s(p).href,s(p).dataHref)),D(d,x)}),Y(bs),Y(vs);var ni=S(vs,2),$s=W(ni),ys=W($s),rl=W(ys,!0),rn=S(rl);to(rn),en(rn,d=>E(ei,d),()=>s(ei)),Y(ys);var oi=S(ys,2),nl=W(oi),Rc=H(nl,!0),Nc=S(nl);Rr(Nc,16,()=>["directory","file","link"],Jr,(d,p)=>{var x=Pd(),N=W(x);to(N);var U=S(N,1,!0);Y(x),z(te=>{ns(N,te),R(U,s(w).labels[p])},[()=>s(a).includes(p)]),$e("change",N,te=>E(a,te.currentTarget.checked?[...s(a),p]:s(a).filter(V=>V!==p),!0)),D(d,x)}),Y(oi);var ws=S(oi,2),ol=W(ws,!0),Mr=S(ol),ii=W(Mr),Cc=H(ii,!0);ii.value=ii.__value="name";var si=S(ii),Oc=H(si,!0);si.value=si.__value="size";var xs=S(si),Ic=H(xs,!0);xs.value=xs.__value="modified",Y(Mr);var ai;kn(Mr),Y(ws);var Es=S(ws,2),il=W(Es,!0),Fr=S(il),li=W(Fr),Dc=H(li,!0);li.value=li.__value="natural";var fi=S(li),Lc=H(fi,!0);fi.value=fi.__value="locale";var Ts=S(fi),Mc=H(Ts,!0);Ts.value=Ts.__value="unicode",Y(Fr);var ci;kn(Fr),Y(Es);var ks=S(Es,2),sl=W(ks,!0),Pr=S(sl),ui=W(Pr),Fc=H(ui,!0);ui.value=ui.__value="asc";var As=S(ui),Pc=H(As,!0);As.value=As.__value="desc",Y(Pr);var di;kn(Pr),Y(ks);var Ss=S(ks,2),_o=W(Ss);to(_o);var Hc=S(_o,1,!0);Y(Ss);var Rs=S(Ss,2),al=W(Rs,!0),Hr=S(al),pi=W(Hr),Uc=H(pi,!0);pi.value=pi.__value="system";var _i=S(pi),Vc=H(_i,!0);_i.value=_i.__value="light";var Ns=S(_i),Bc=H(Ns,!0);Ns.value=Ns.__value="dark",Y(Hr);var mi;kn(Hr),Y(Rs);var Yc=S(Rs,2);{var qc=d=>{var p=fs(),x=H(p,!0);en(p,N=>ms=N,()=>ms),z(()=>{p.disabled=!s(v),R(x,s(w).labels.searchArchive)}),$e("click",p,()=>E(K,!0)),D(d,p)};le(Yc,d=>{(s(n).searchIndexHref||s(n).searchQueryHref)&&d(qc)})}Y($s);var Cs=S($s,2),Os=W(Cs),ll=W(Os,!0),fl=S(ll),jc=H(fl,!0),cl=S(fl,1,!0),zc=S(cl),Gc=H(zc,!0);Y(Os);var ul=S(Os,2);{var Kc=d=>{var p=fs(),x=H(p,!0);z(()=>{p.disabled=s(h),R(x,s(w).labels.retry)}),$e("click",p,gc),D(d,p)};le(ul,d=>{s(_)&&s(_)!=="copy"&&d(Kc)})}var dl=S(ul,2);{var Zc=d=>{var p=Za(),x=H(p,!0);z(()=>{Q(p,"href",Rn[1]),R(x,s(w).labels.openNative)}),D(d,p)};le(dl,d=>{s(_)==="folder"&&Rn&&d(Zc)})}var mo=S(dl,2);let pl;Rr(mo,21,()=>s(w).columns,Jr,(d,p)=>{var x=Hd(),N=H(x,!0);z(U=>R(N,U),[()=>fc(s(p),s(w))]),D(d,x)}),Y(mo);var hi=S(mo,2),_l=W(hi);{var Wc=d=>{var p=Ud(),x=H(p);z(()=>Q(x,"href",s(n).parentHref)),$e("click",x,N=>_s(N,s(n).parentHref,s(n).parentDataHref)),D(d,p)};le(_l,d=>{s(n).parentHref&&d(Wc)})}var ml=S(_l,2);{var Xc=d=>{var p=hc();let x;z(()=>x=Tn(p,"",x,{height:s(Or)[s(so)]+"px"})),D(d,p)};le(ml,d=>{s(so)&&d(Xc)})}var hl=S(ml,2);Rr(hl,19,()=>s(ue).slice(s(so),s(cs)),d=>d.id,(d,p,x)=>{var N=Xd();let U;var te=W(N);Rr(te,17,()=>s(w).columns,Jr,(P,X)=>{var _e=Sr(),Ut=xt(_e);{var se=ze=>{var Ee=jd(),Ce=W(Ee);{var Oe=Qt=>{var Qe=Bd(),vo=W(Qe);{var Is=et=>{var Bt=Sr(),nn=xt(Bt);En(nn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(et,Bt)},Ds=et=>{var Bt=Vd(),nn=xt(Bt);Ra(nn,()=>oc(Ga(s(p))),!0),Y(nn);var cu=S(nn);z(uu=>R(cu,` ${s(p).name??""}${uu??""}`),[()=>ps(s(p))?"/":""]),D(et,Bt)};le(vo,et=>{t.row?et(Is):et(Ds,-1)})}Y(Qe),z(()=>{Q(Qe,"href",s(p).href),Q(Qe,"target",s(p).exitsExplorer?"_blank":void 0),Q(Qe,"rel",s(p).exitsExplorer?"noopener":void 0)}),$e("click",Qe,et=>bc(et,s(p))),cr("focus",Qe,()=>E(u,s(p).id,!0)),D(Qt,Qe)},Rt=Qt=>{var Qe=Yd(),vo=W(Qe);{var Is=et=>{var Bt=Sr(),nn=xt(Bt);En(nn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(et,Bt)},Ds=et=>{var Bt=Uo();z(()=>R(Bt,s(p).name)),D(et,Bt)};le(vo,et=>{t.row?et(Is):et(Ds,-1)})}Y(Qe),D(Qt,Qe)};le(Ce,Qt=>{s(p).href?Qt(Oe):Qt(Rt,-1)})}var Vt=S(Ce);{var ho=Qt=>{var Qe=qd(),vo=H(Qe);z(()=>R(vo,`${s(p).link.unavailable?s(w).labels.unavailable+" \xB7 ":"\u2192 "}${s(p).link.target??""}`)),D(Qt,Qe)};le(Vt,Qt=>{s(p).link&&Qt(ho)})}Y(Ee),D(ze,Ee)},me=ze=>{var Ee=zd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>ps(s(p))?s(w).labels.folder:mc(s(p).size)]),D(ze,Ee)},Ve=ze=>{var Ee=Gd(),Ce=W(Ee),Oe=H(Ce,!0);Y(Ee),z(Rt=>{Ee.disabled=!s(v),Q(Ce,"datetime",s(p).modifiedAt),R(Oe,Rt)},[()=>ja(s(p).modifiedAt,s(w),s(v))]),$e("click",Ee,()=>E($,s(p).modifiedAt,!0)),D(ze,Ee)},Ur=ze=>{var Ee=Kd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>cc(s(p).data?.[s(X).dataKey])]),D(ze,Ee)};le(Ut,ze=>{s(X)==="name"?ze(se):s(X)==="size"?ze(me,1):s(X)==="modified"?ze(Ve,2):ze(Ur,-1)})}D(P,_e)});var V=S(te,2);{var Z=P=>{var X=Wd(),_e=W(X);{var Ut=me=>{var Ve=Sr(),Ur=xt(Ve);En(Ur,()=>t.actions,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(me,Ve)};le(_e,me=>{t.actions&&me(Ut)})}var se=S(_e,2);Rr(se,17,()=>s(w).actions,Jr,(me,Ve)=>{var Ur=Sr(),ze=xt(Ur);{var Ee=Rt=>{var Vt=Zd(),ho=H(Vt,!0);z(()=>{Q(Vt,"href",s(p).href),R(ho,s(w).labels.download)}),D(Rt,Vt)},Ce=Ct(()=>s(Ve)==="download"&&s(p).href&&!ps(s(p))&&!s(p).link?.unavailable),Oe=Rt=>{var Vt=fs(),ho=H(Vt,!0);z(()=>{Vt.disabled=!s(v)||s(Ve)==="copy-link"&&!s(p).href,Q(Vt,"aria-label",(s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)+": "+s(p).name),R(ho,s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)}),$e("click",Vt,async()=>{try{await lc(s(Ve),s(p)),E(m,s(w).labels.copied,!0),E(_,null)}catch{E(m,s(w).labels.copyError,!0),E(_,"copy")}}),D(Rt,Vt)};le(ze,Rt=>{s(Ce)?Rt(Ee):s(Ve)!=="download"&&Rt(Oe,1)})}D(me,Ur)}),Y(X),D(P,X)};le(V,P=>{(t.actions||s(w).actions.length)&&P(Z)})}Y(N),Na(N,(P,X)=>vc?.(P,X),()=>s(p).id),z((P,X)=>{Q(N,"data-custom-columns",P),Q(N,"data-id",s(p).id),Q(N,"data-order",s(so)+s(x)),Q(N,"data-active",s(u)===s(p).id),U=Tn(N,"",U,{"grid-template-columns":X})},[()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(P=>P==="name"?"minmax(0,1fr)":"minmax(6rem,max-content)").join(" "):void 0]),D(d,N)});var Jc=S(hl,2);{var Qc=d=>{var p=hc();let x;z(()=>x=Tn(p,"",x,{height:s(Or)[s(ue).length]-s(Or)[s(cs)]+"px"})),D(d,p)};le(Jc,d=>{s(cs)<s(ue).length&&d(Qc)})}Y(hi),en(hi,d=>E(Ir,d),()=>s(Ir));var eu=S(hi,2);{var tu=d=>{var p=Jd(),x=H(p,!0);z(()=>R(x,s(n).total===0?s(w).labels.empty:s(w).labels.noMatches)),D(d,p)};le(eu,d=>{s(ue).length===0&&!s(h)&&d(tu)})}Y(Cs);var vl=S(Cs,2);{var ru=d=>{var p=tp(),x=W(p);{var N=Z=>{var P=Qd(),X=H(P,!0);z(()=>{Q(P,"href",s(n).page.previousHref),R(X,s(w).labels.previous)}),D(Z,P)};le(x,Z=>{s(n).page.previousHref&&Z(N)})}var U=S(x),te=S(U);{var V=Z=>{var P=ep(),X=H(P,!0);z(()=>{Q(P,"href",s(n).page.nextHref),R(X,s(w).labels.next)}),D(Z,P)};le(te,Z=>{s(n).page.nextHref&&Z(V)})}Y(p),z(Z=>{Q(p,"aria-label",s(w).labels.pagination),R(U,` ${Z??""} `)},[()=>An(s(w),"page",{page:s(n).page.number,pages:s(n).page.count})]),D(d,p)};le(vl,d=>{s(n).page?.count>1&&!s(mt)&&d(ru)})}var nu=S(vl,2);{var ou=d=>{var p=Sr(),x=xt(p);En(x,()=>t.footer,()=>({model:s(n)})),D(d,p)},iu=d=>{var p=rp(),x=W(p);{var N=te=>{var V=Za(),Z=H(V,!0);z(()=>{Q(V,"href",s(w).brand.footerUrl),R(Z,s(w).brand.footerText)}),D(te,V)},U=te=>{var V=Uo();z(()=>R(V,s(w).brand.footerText)),D(te,V)};le(x,te=>{s(w).brand.footerUrl?te(N):te(U,-1)})}Y(p),D(d,p)},su=d=>{var p=np(),x=H(p,!0);z(()=>R(x,s(w).labels.keyboardHelp)),D(d,p)};le(nu,d=>{t.footer?d(ou):s(w).brand.footerText?d(iu,1):d(su,-1)})}Y(ni);var gl=S(ni,2);{var au=d=>{var p=op(),x=W(p),N=H(x,!0),U=S(x,2),te=H(U,!0),V=S(U,2),Z=H(V,!0),P=S(V,2),X=H(P,!0);Y(p),en(p,_e=>E(ao,_e),()=>s(ao)),z(_e=>{R(N,s(w).labels.modifiedTime),R(te,s($)),R(Z,_e),R(X,s(w).labels.close)},[()=>s(w).dateOptions.locale!==void 0||s(w).dateOptions.timeZone!==void 0?ja(s($),s(w),!0):new Date(s($)).toLocaleString()]),cr("close",p,()=>E($,null)),$e("click",P,()=>E($,null)),D(d,p)};le(gl,d=>{s($)&&d(au)})}var lu=S(gl,2);{var fu=d=>{var p=sp(),x=W(p),N=H(x,!0),U=S(x,2);to(U),en(U,se=>E(us,se),()=>s(us));var te=S(U,2),V=H(te,!0),Z=S(te,2);{var P=se=>{var me=fs(),Ve=H(me,!0);z(()=>R(Ve,s(w).labels.retry)),$e("click",me,hs),D(se,me)};le(Z,se=>{s(Jt)&&se(P)})}var X=S(Z,2);Rr(X,21,()=>s(ye),Jr,(se,me)=>{var Ve=ip(),Ur=W(Ve);{var ze=Ce=>{var Oe=Za(),Rt=H(Oe,!0);z(()=>{Q(Oe,"href",s(me).href),Q(Oe,"target",s(me).exitsExplorer?"_blank":void 0),Q(Oe,"rel",s(me).exitsExplorer?"noopener":void 0),R(Rt,s(me).path)}),D(Ce,Oe)},Ee=Ce=>{var Oe=Uo();z(()=>R(Oe,s(me).path)),D(Ce,Oe)};le(Ur,Ce=>{s(me).href?Ce(ze):Ce(Ee,-1)})}Y(Ve),D(se,Ve)}),Y(X);var _e=S(X,2),Ut=H(_e,!0);Y(p),en(p,se=>E(lo,se),()=>s(lo)),z(()=>{Q(p,"aria-label",s(w).labels.searchArchive),R(N,s(w).labels.searchArchive),Q(U,"aria-label",s(w).labels.archiveSearchInput),R(V,s(ot)),R(Ut,s(w).labels.close)}),cr("close",p,ti),$e("keydown",p,se=>{se.key==="Escape"&&(se.preventDefault(),se.stopPropagation(),ti())}),$e("input",U,xc),is(U,()=>s(pe),se=>E(pe,se)),$e("click",_e,ti),D(d,p)};le(lu,d=>{s(K)&&d(fu)})}z((d,p,x)=>{Q(bs,"aria-label",s(w).labels.breadcrumb),Q(ri,"href",s(n).rootHref),R(Ac,s(w).labels.home),Q(ni,"aria-busy",s(h)),R(rl,s(w).labels.searchDirectory),Q(rn,"placeholder",s(w).labels.searchFiles),rn.disabled=!s(v)||!s(mt),oi.disabled=!s(v)||!s(mt),R(Rc,s(w).labels.types),R(ol,s(w).labels.sort),Mr.disabled=!s(v)||!s(mt),R(Cc,s(w).labels.name),R(Oc,s(w).labels.size),R(Ic,s(w).labels.modified),ai!==(ai=s(l).field)&&(Mr.value=(Mr.__value=ai)??"",Qr(Mr,ai)),R(il,s(w).labels.names),Fr.disabled=!s(v)||!s(mt),R(Dc,s(w).labels.natural),R(Lc,s(w).labels.locale),R(Mc,s(w).labels.unicode),ci!==(ci=s(l).nameMode)&&(Fr.value=(Fr.__value=ci)??"",Qr(Fr,ci)),R(sl,s(w).labels.order),Pr.disabled=!s(v)||!s(mt),R(Fc,s(w).labels.ascending),R(Pc,s(w).labels.descending),di!==(di=s(l).direction)&&(Pr.value=(Pr.__value=di)??"",Qr(Pr,di)),ns(_o,s(l).directoriesFirst),_o.disabled=!s(v)||!s(mt),R(Hc,s(w).labels.directoriesFirst),R(al,s(w).labels.appearance),Hr.disabled=!s(v),R(Uc,s(w).labels.system),R(Vc,s(w).labels.light),R(Bc,s(w).labels.dark),mi!==(mi=s(f))&&(Hr.value=(Hr.__value=mi)??"",Qr(Hr,mi)),R(ll,s(_t)[0]),R(jc,s(mt)?s(ue).length:s(o).length),R(cl,d),R(Gc,s(h)?s(w).labels.loading:s(m)),Q(mo,"data-custom-columns",p),pl=Tn(mo,"",pl,{"grid-template-columns":x})},[()=>s(_t).slice(1).join("__COUNT__"),()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(d=>d==="name"?"minmax(0,1fr)":typeof d=="object"?"minmax(0,12rem)":"minmax(6rem,max-content)").join(" "):void 0]),$e("click",ri,d=>_s(d,s(n).rootHref,s(n).rootDataHref)),cr("compositionstart",rn,()=>E(g,!0)),cr("compositionend",rn,()=>E(g,!1)),is(rn,()=>s(i),d=>E(i,d)),$e("change",Mr,d=>E(l,{...s(l),field:d.currentTarget.value})),$e("change",Fr,d=>E(l,{...s(l),nameMode:d.currentTarget.value})),$e("change",Pr,d=>E(l,{...s(l),direction:d.currentTarget.value})),$e("change",_o,d=>E(l,{...s(l),directoriesFirst:d.currentTarget.checked})),$e("change",Hr,d=>wc(d.currentTarget.value)),D(e,tl),To()}Zi(["click","change","keydown","input"]);var lp=document.querySelector("[data-dirwell-theme]"),fp=JSON.parse(document.querySelector("#dirwell-page-data").textContent),cp=jo(Wa,{target:lp,props:{model:fp}});globalThis.__dirwellUnmount=()=>zo(cp);})();