diff --git a/runtime/src/utilities.js b/runtime/src/utilities.js index fb4ec945..5cd17f79 100644 --- a/runtime/src/utilities.js +++ b/runtime/src/utilities.js @@ -41,4 +41,5 @@ export const toArray = (...args) => { } }; +export const access = (field) => (value) => value[field] export const identity = (a) => a; diff --git a/spec/compilers2/component_global b/spec/compilers2/component_global index 606d1ce4..fa527371 100644 --- a/spec/compilers2/component_global +++ b/spec/compilers2/component_global @@ -32,13 +32,13 @@ import { const A = () => { - return B("div", {}, [a.value]) + return B(`div`, {}, [a.value]) }, b = (c) => { return c }, C = () => { - return B("div", {}, [b(`Hello`)]) + return B(`div`, {}, [b(`Hello`)]) }, d = D(``), a = E(() => { diff --git a/spec/compilers2/component_instance_access b/spec/compilers2/component_instance_access index 62eef5a3..083ce993 100644 --- a/spec/compilers2/component_instance_access +++ b/spec/compilers2/component_instance_access @@ -45,7 +45,7 @@ const const a = E(() => { return `Instance` }); - return F("div", {}) + return F(`div`, {}) }, G = () => { const @@ -66,7 +66,7 @@ const ] ]) }; - return F("div", { + return F(`div`, { "onClick": c }, [F(D, { ref: (e) => { diff --git a/spec/compilers2/component_namespaced_with_style b/spec/compilers2/component_namespaced_with_style index e785bb52..b6f83e97 100644 --- a/spec/compilers2/component_namespaced_with_style +++ b/spec/compilers2/component_namespaced_with_style @@ -20,7 +20,7 @@ import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { className: `Ui·Dropdown_base` }, [`test`]) }, diff --git a/spec/compilers2/component_readonly b/spec/compilers2/component_readonly index 1b9c7a29..07743baf 100644 --- a/spec/compilers2/component_readonly +++ b/spec/compilers2/component_readonly @@ -18,7 +18,7 @@ const A = ({ a = false }) => { - return B("div", {}) + return B(`div`, {}) }, C = () => { return B(A, { diff --git a/spec/compilers2/component_with_provider b/spec/compilers2/component_with_provider index 50d35430..e6bbcf51 100644 --- a/spec/compilers2/component_with_provider +++ b/spec/compilers2/component_with_provider @@ -48,6 +48,6 @@ const }, false ]]); - return F("div", {}) + return F(`div`, {}) }; diff --git a/spec/compilers2/component_with_provider_and_lifecycle_functions b/spec/compilers2/component_with_provider_and_lifecycle_functions index 92bb42da..7eedccc0 100644 --- a/spec/compilers2/component_with_provider_and_lifecycle_functions +++ b/spec/compilers2/component_with_provider_and_lifecycle_functions @@ -73,5 +73,5 @@ const }, false ]]); - return H("div", {}) + return H(`div`, {}) }; diff --git a/spec/compilers2/component_with_provider_and_store b/spec/compilers2/component_with_provider_and_store index cb200a7c..ab1e7de0 100644 --- a/spec/compilers2/component_with_provider_and_store +++ b/spec/compilers2/component_with_provider_and_store @@ -62,5 +62,5 @@ const }, false ]]); - return F("div", {}) + return F(`div`, {}) }; diff --git a/spec/compilers2/constant_global_component b/spec/compilers2/constant_global_component index c3e28c23..0f60a325 100644 --- a/spec/compilers2/constant_global_component +++ b/spec/compilers2/constant_global_component @@ -22,5 +22,5 @@ const }, a = `ASD`, B = () => { - return C("div", {}, [a]) + return C(`div`, {}, [a]) }; diff --git a/spec/compilers2/constant_module b/spec/compilers2/constant_module index b7628da1..ab314581 100644 --- a/spec/compilers2/constant_module +++ b/spec/compilers2/constant_module @@ -15,6 +15,6 @@ import { createElement as B } from "runtime"; const a = `ASD`, A = () => { - return B("div", {}, [a]) + return B(`div`, {}, [a]) }; diff --git a/spec/compilers2/constant_store b/spec/compilers2/constant_store index d6c9fe12..66543f1e 100644 --- a/spec/compilers2/constant_store +++ b/spec/compilers2/constant_store @@ -15,6 +15,6 @@ import { createElement as B } from "runtime"; const a = `ASD`, A = () => { - return B("div", {}, [a]) + return B(`div`, {}, [a]) }; diff --git a/spec/compilers2/constant_store_exposed b/spec/compilers2/constant_store_exposed index c43ddcd6..01c9c44f 100644 --- a/spec/compilers2/constant_store_exposed +++ b/spec/compilers2/constant_store_exposed @@ -17,5 +17,5 @@ import { createElement as B } from "runtime"; const a = `ASD`, A = () => { - return B("div", {}, [a]) + return B(`div`, {}, [a]) }; diff --git a/spec/compilers2/css_definition b/spec/compilers2/css_definition index b2968d54..ef53301e 100644 --- a/spec/compilers2/css_definition +++ b/spec/compilers2/css_definition @@ -29,7 +29,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([b()]) }) diff --git a/spec/compilers2/css_font_face b/spec/compilers2/css_font_face index b8d7a319..63d4a7c9 100644 --- a/spec/compilers2/css_font_face +++ b/spec/compilers2/css_font_face @@ -20,7 +20,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { className: `Main_test` }) }; diff --git a/spec/compilers2/css_font_face_with_quotes b/spec/compilers2/css_font_face_with_quotes index 4b0c57b6..fa96c770 100644 --- a/spec/compilers2/css_font_face_with_quotes +++ b/spec/compilers2/css_font_face_with_quotes @@ -16,7 +16,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { className: `Main_test` }) }; diff --git a/spec/compilers2/css_keyframes b/spec/compilers2/css_keyframes index 45d201bf..8f425224 100644 --- a/spec/compilers2/css_keyframes +++ b/spec/compilers2/css_keyframes @@ -43,7 +43,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([b()]) }) diff --git a/spec/compilers2/css_media b/spec/compilers2/css_media index c0b3da64..f18d73a8 100644 --- a/spec/compilers2/css_media +++ b/spec/compilers2/css_media @@ -36,7 +36,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([b()]) }) diff --git a/spec/compilers2/css_media_with_if b/spec/compilers2/css_media_with_if index a4f49ccc..dc0018f4 100644 --- a/spec/compilers2/css_media_with_if +++ b/spec/compilers2/css_media_with_if @@ -27,7 +27,7 @@ const A = () => { }) : null); return _ }; - return B("div", { + return B(`div`, { className: `Main_test`, style: C([a()]) }) diff --git a/spec/compilers2/css_selector b/spec/compilers2/css_selector index bcf57a19..59711956 100644 --- a/spec/compilers2/css_selector +++ b/spec/compilers2/css_selector @@ -35,7 +35,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([b()]) }) diff --git a/spec/compilers2/css_selector_multiple b/spec/compilers2/css_selector_multiple index 9a3bf324..fd28c1b0 100644 --- a/spec/compilers2/css_selector_multiple +++ b/spec/compilers2/css_selector_multiple @@ -36,7 +36,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([b()]) }) diff --git a/spec/compilers2/css_string b/spec/compilers2/css_string index df291609..88fe4879 100644 --- a/spec/compilers2/css_string +++ b/spec/compilers2/css_string @@ -29,10 +29,10 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_unicode`, style: D([b()]) - }, [C("span", {})]) + }, [C(`span`, {})]) }; .Main_unicode span::after { diff --git a/spec/compilers2/css_supports b/spec/compilers2/css_supports index 1654a12f..fc293c97 100644 --- a/spec/compilers2/css_supports +++ b/spec/compilers2/css_supports @@ -27,7 +27,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([b()]) }) diff --git a/spec/compilers2/css_with_ands b/spec/compilers2/css_with_ands index ebed2f35..e3852d54 100644 --- a/spec/compilers2/css_with_ands +++ b/spec/compilers2/css_with_ands @@ -21,7 +21,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { className: `Main_test` }) }; diff --git a/spec/compilers2/css_with_arguments b/spec/compilers2/css_with_arguments index c51fabde..4cbf9fe8 100644 --- a/spec/compilers2/css_with_arguments +++ b/spec/compilers2/css_with_arguments @@ -20,7 +20,7 @@ const A = () => { }; return _ }; - return B("div", { + return B(`div`, { className: `Main_test`, style: C([a(`red`)]) }) diff --git a/spec/compilers2/css_with_case b/spec/compilers2/css_with_case index 4ccb6a13..848cfaa8 100644 --- a/spec/compilers2/css_with_case +++ b/spec/compilers2/css_with_case @@ -45,7 +45,7 @@ const A = () => { ]); return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([a()]) }) diff --git a/spec/compilers2/css_with_else_if b/spec/compilers2/css_with_else_if index 630bb03d..d8190baf 100644 --- a/spec/compilers2/css_with_else_if +++ b/spec/compilers2/css_with_else_if @@ -33,7 +33,7 @@ const A = () => { }) : null)); return _ }; - return C("div", {}, [C("div", { + return C(`div`, {}, [C(`div`, { className: `Main_base`, style: D([a(`blue`)]) })]) diff --git a/spec/compilers2/css_with_if b/spec/compilers2/css_with_if index ba4d0cdb..6c25e287 100644 --- a/spec/compilers2/css_with_if +++ b/spec/compilers2/css_with_if @@ -29,7 +29,7 @@ const A = () => { })); return _ }; - return B("div", { + return B(`div`, { className: `Main_test`, style: C([a()]) }) diff --git a/spec/compilers2/css_with_if_and_case b/spec/compilers2/css_with_if_and_case index 4857f96f..7ff23b45 100644 --- a/spec/compilers2/css_with_if_and_case +++ b/spec/compilers2/css_with_if_and_case @@ -53,7 +53,7 @@ const A = () => { })); return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([a()]) }) diff --git a/spec/compilers2/css_with_if_same_condition b/spec/compilers2/css_with_if_same_condition index f4a64d7e..35aa90f2 100644 --- a/spec/compilers2/css_with_if_same_condition +++ b/spec/compilers2/css_with_if_same_condition @@ -42,7 +42,7 @@ const A = () => { })); return _ }; - return B("div", { + return B(`div`, { className: `Main_test`, style: C([a()]) }) diff --git a/spec/compilers2/css_with_if_with_interpolation b/spec/compilers2/css_with_if_with_interpolation index 80b4b65d..fb33702b 100644 --- a/spec/compilers2/css_with_if_with_interpolation +++ b/spec/compilers2/css_with_if_with_interpolation @@ -29,7 +29,7 @@ const A = () => { })); return _ }; - return B("div", { + return B(`div`, { className: `Main_test`, style: C([a()]) }) diff --git a/spec/compilers2/dce_remove_component_computed_property b/spec/compilers2/dce_remove_component_computed_property index 4d6984ea..b9d453f1 100644 --- a/spec/compilers2/dce_remove_component_computed_property +++ b/spec/compilers2/dce_remove_component_computed_property @@ -11,5 +11,5 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", {}) + return B(`div`, {}) }; diff --git a/spec/compilers2/dce_remove_component_function b/spec/compilers2/dce_remove_component_function index 23e89e20..e8486714 100644 --- a/spec/compilers2/dce_remove_component_function +++ b/spec/compilers2/dce_remove_component_function @@ -11,5 +11,5 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", {}) + return B(`div`, {}) }; diff --git a/spec/compilers2/dce_style b/spec/compilers2/dce_style index 3dcc0be2..02c0ee88 100644 --- a/spec/compilers2/dce_style +++ b/spec/compilers2/dce_style @@ -11,5 +11,5 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", {}) + return B(`div`, {}) }; diff --git a/spec/compilers2/destructuring b/spec/compilers2/destructuring index 1dcac92b..4d32b93d 100644 --- a/spec/compilers2/destructuring +++ b/spec/compilers2/destructuring @@ -42,7 +42,7 @@ const return F(a, [ [ G(C, H([[ - "content", + `content`, I ]])), (b) => { diff --git a/spec/compilers2/directives/svg b/spec/compilers2/directives/svg index 69cf401e..5464210b 100644 --- a/spec/compilers2/directives/svg +++ b/spec/compilers2/directives/svg @@ -7,10 +7,12 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("svg", { - dangerouslySetInnerHTML: { __html: `` }, - viewBox: "0 0 24 24", - height: "24", - width: "24" + return B(`svg`, { + dangerouslySetInnerHTML: { + __html: `` + }, + viewBox: `0 0 24 24`, + height: `24`, + width: `24` }) }; diff --git a/spec/compilers2/field b/spec/compilers2/field index 76558c4f..0f0ccff9 100644 --- a/spec/compilers2/field +++ b/spec/compilers2/field @@ -21,5 +21,5 @@ const A = () => { a: `Hello`, b: 0 }; - return B("div", {}) + return B(`div`, {}) }; diff --git a/spec/compilers2/for b/spec/compilers2/for index 1497b4c0..fd6491bf 100644 --- a/spec/compilers2/for +++ b/spec/compilers2/for @@ -20,7 +20,7 @@ const A = () => { let _i = -1; for (let a of _1) { _i++; - _0.push(B("div", {}, [a])) + _0.push(B(`div`, {}, [a])) }; return _0 })() diff --git a/spec/compilers2/for_with_index b/spec/compilers2/for_with_index index baecec39..fd17ff9c 100644 --- a/spec/compilers2/for_with_index +++ b/spec/compilers2/for_with_index @@ -30,7 +30,7 @@ const A = () => { if (!_2) { continue }; - _0.push(C("div", {}, [a])) + _0.push(C(`div`, {}, [a])) }; return _0 })() diff --git a/spec/compilers2/for_with_index_2 b/spec/compilers2/for_with_index_2 index 10b2dea1..5c75be8d 100644 --- a/spec/compilers2/for_with_index_2 +++ b/spec/compilers2/for_with_index_2 @@ -21,7 +21,7 @@ const A = () => { for (let a of _1) { _i++; const b = _i; - _0.push(B("div", {}, [a])) + _0.push(B(`div`, {}, [a])) }; return _0 })() diff --git a/spec/compilers2/here_doc_markdown_with_interpolation b/spec/compilers2/here_doc_markdown_with_interpolation index 38f164de..041620f5 100644 --- a/spec/compilers2/here_doc_markdown_with_interpolation +++ b/spec/compilers2/here_doc_markdown_with_interpolation @@ -17,7 +17,7 @@ const A = () => { return B(C, {}, [ B('h2', {}, [`Hello There`]), B('p', {}, [ - B("div", {}, [`Hello`]), + B(`div`, {}, [`Hello`]), ` `, `World`, diff --git a/spec/compilers2/html_attribute_class b/spec/compilers2/html_attribute_class index 83b17ba7..9f1d491d 100644 --- a/spec/compilers2/html_attribute_class +++ b/spec/compilers2/html_attribute_class @@ -8,7 +8,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { className: `something` }) }; diff --git a/spec/compilers2/html_attribute_class_with_style b/spec/compilers2/html_attribute_class_with_style index 89fe61a3..f6c97efa 100644 --- a/spec/compilers2/html_attribute_class_with_style +++ b/spec/compilers2/html_attribute_class_with_style @@ -12,7 +12,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { className: `something` + ` Main_base` }) }; diff --git a/spec/compilers2/html_attribute_html_expression b/spec/compilers2/html_attribute_html_expression index ee9b13e9..c3355cc9 100644 --- a/spec/compilers2/html_attribute_html_expression +++ b/spec/compilers2/html_attribute_html_expression @@ -18,7 +18,7 @@ const A = ({ a = null }) => { - return B("div", {}) + return B(`div`, {}) }, C = () => { return B(A, { diff --git a/spec/compilers2/html_attribute_readonly b/spec/compilers2/html_attribute_readonly index d5229a1e..ad702e2e 100644 --- a/spec/compilers2/html_attribute_readonly +++ b/spec/compilers2/html_attribute_readonly @@ -7,7 +7,7 @@ component Main { --------------------------------------------------------------------------------import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { readOnly: true }) }; diff --git a/spec/compilers2/html_attribute_ref b/spec/compilers2/html_attribute_ref index 734b674f..cf8ae6ec 100644 --- a/spec/compilers2/html_attribute_ref +++ b/spec/compilers2/html_attribute_ref @@ -21,7 +21,7 @@ const C = B(0), D = () => { const a = E(new C()); - return F("div", { + return F(`div`, { ref: (b) => { a.value = new A(b) } diff --git a/spec/compilers2/html_attribute_simple b/spec/compilers2/html_attribute_simple index 96bbe8fb..2a6f41fb 100644 --- a/spec/compilers2/html_attribute_simple +++ b/spec/compilers2/html_attribute_simple @@ -8,7 +8,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { "title": `Hello` }) }; diff --git a/spec/compilers2/html_attribute_with_expression b/spec/compilers2/html_attribute_with_expression index 7469cf82..d2fc504e 100644 --- a/spec/compilers2/html_attribute_with_expression +++ b/spec/compilers2/html_attribute_with_expression @@ -8,7 +8,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { "title": `Hello ` + `there!` }) }; diff --git a/spec/compilers2/html_component b/spec/compilers2/html_component index 38ea81e0..bf663778 100644 --- a/spec/compilers2/html_component +++ b/spec/compilers2/html_component @@ -14,7 +14,7 @@ import { createElement as B } from "runtime"; const A = () => { - return B("div", {}) + return B(`div`, {}) }, C = () => { return B(A, {}) diff --git a/spec/compilers2/html_expression b/spec/compilers2/html_expression index 67ca0447..c18b46de 100644 --- a/spec/compilers2/html_expression +++ b/spec/compilers2/html_expression @@ -7,5 +7,5 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", {}, [`Hello`]) + return B(`div`, {}, [`Hello`]) }; diff --git a/spec/compilers2/html_fragment b/spec/compilers2/html_fragment index 9b418205..517cd36a 100644 --- a/spec/compilers2/html_fragment +++ b/spec/compilers2/html_fragment @@ -15,7 +15,7 @@ import { } from "runtime"; const A = () => { - return B("div", {}, [B(C, {}, [ + return B(`div`, {}, [B(C, {}, [ `A`, `B` ])]) diff --git a/spec/compilers2/html_fragment_empty b/spec/compilers2/html_fragment_empty index fa80216f..6aed0171 100644 --- a/spec/compilers2/html_fragment_empty +++ b/spec/compilers2/html_fragment_empty @@ -10,5 +10,5 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", {}, [null]) + return B(`div`, {}, [null]) }; diff --git a/spec/compilers2/html_with_custom_style b/spec/compilers2/html_with_custom_style index a2784ae2..6f9c82dd 100644 --- a/spec/compilers2/html_with_custom_style +++ b/spec/compilers2/html_with_custom_style @@ -19,7 +19,7 @@ const A = () => { const a = B(() => { return undefined }); - return C("div", { + return C(`div`, { style: D([a.value]) }) }; diff --git a/spec/compilers2/html_with_multiple_styles b/spec/compilers2/html_with_multiple_styles index 010822be..95d5182e 100644 --- a/spec/compilers2/html_with_multiple_styles +++ b/spec/compilers2/html_with_multiple_styles @@ -16,7 +16,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { className: `Main_one Main_two` }) }; diff --git a/spec/compilers2/html_with_multiple_styles_and_parameters b/spec/compilers2/html_with_multiple_styles_and_parameters index 7f409488..a11181a1 100644 --- a/spec/compilers2/html_with_multiple_styles_and_parameters +++ b/spec/compilers2/html_with_multiple_styles_and_parameters @@ -25,7 +25,7 @@ const A = () => { }; return _ }; - return B("div", { + return B(`div`, { className: `Main_one Main_two`, style: C([a(`blue`)]) }) diff --git a/spec/compilers2/html_with_multiple_styles_and_parameters_2 b/spec/compilers2/html_with_multiple_styles_and_parameters_2 index ce5e19a4..7e2959dc 100644 --- a/spec/compilers2/html_with_multiple_styles_and_parameters_2 +++ b/spec/compilers2/html_with_multiple_styles_and_parameters_2 @@ -32,7 +32,7 @@ const A = () => { }; return _ }; - return B("div", { + return B(`div`, { className: `Main_one Main_two`, style: C([ a(`red`), diff --git a/spec/compilers2/html_with_pseudos b/spec/compilers2/html_with_pseudos index 80f945f8..8c2dc632 100644 --- a/spec/compilers2/html_with_pseudos +++ b/spec/compilers2/html_with_pseudos @@ -45,7 +45,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([c()]) }) diff --git a/spec/compilers2/html_with_string_style b/spec/compilers2/html_with_string_style index fd62cb1c..480c2730 100644 --- a/spec/compilers2/html_with_string_style +++ b/spec/compilers2/html_with_string_style @@ -10,7 +10,7 @@ import { } from "runtime"; const A = () => { - return B("div", { + return B(`div`, { style: C([`opacity:0;`]) }) }; diff --git a/spec/compilers2/html_with_style b/spec/compilers2/html_with_style index 7825090b..383ce872 100644 --- a/spec/compilers2/html_with_style +++ b/spec/compilers2/html_with_style @@ -53,7 +53,7 @@ const A = () => { }; return _ }; - return C("div", { + return C(`div`, { className: `Main_test`, style: D([c()]) }) diff --git a/spec/compilers2/html_with_style_and_custom_style b/spec/compilers2/html_with_style_and_custom_style index d81638d1..27e04460 100644 --- a/spec/compilers2/html_with_style_and_custom_style +++ b/spec/compilers2/html_with_style_and_custom_style @@ -35,7 +35,7 @@ const A = () => { }; return _ }; - return D("div", { + return D(`div`, { className: `Main_test`, style: E([ c(), diff --git a/spec/compilers2/locale_key b/spec/compilers2/locale_key index 904724ea..7da9f972 100644 --- a/spec/compilers2/locale_key +++ b/spec/compilers2/locale_key @@ -11,5 +11,5 @@ component Main { import { translate as B } from "runtime"; const A = () => { - return B("test") + return B(`test`) }; diff --git a/spec/compilers2/member_access b/spec/compilers2/member_access index faf013f3..4363bb30 100644 --- a/spec/compilers2/member_access +++ b/spec/compilers2/member_access @@ -38,6 +38,6 @@ const { name: `Doe` } - ], B("name")); + ], B(`name`)); return `asd` }; diff --git a/spec/compilers2/module b/spec/compilers2/module index ecf733f9..10089b81 100644 --- a/spec/compilers2/module +++ b/spec/compilers2/module @@ -16,7 +16,7 @@ import { createElement as A } from "runtime"; const a = () => { - return A("p", {}, [`It should work`]) + return A(`p`, {}, [`It should work`]) }, B = () => { return a() diff --git a/spec/compilers2/pipe b/spec/compilers2/pipe index 1b896e12..4ce34bb8 100644 --- a/spec/compilers2/pipe +++ b/spec/compilers2/pipe @@ -10,7 +10,7 @@ component Main { import { createElement as B } from "runtime"; const A = () => { - return B("div", {}, [ + return B(`div`, {}, [ ((a) => { return a })(`3`), diff --git a/spec/compilers2/property b/spec/compilers2/property index fa2c5209..6b79b0ac 100644 --- a/spec/compilers2/property +++ b/spec/compilers2/property @@ -18,7 +18,7 @@ const A = ({ a = `Joe` }) => { - return B("div", {}) + return B(`div`, {}) }, C = () => { return B(A, {}) diff --git a/spec/compilers2/property_without_default b/spec/compilers2/property_without_default index 3dfb2bb2..9bc623ce 100644 --- a/spec/compilers2/property_without_default +++ b/spec/compilers2/property_without_default @@ -18,7 +18,7 @@ const A = ({ a }) => { - return B("div", {}) + return B(`div`, {}) }, C = () => { return B(A, { diff --git a/spec/compilers2/provider_with_items b/spec/compilers2/provider_with_items index b13ce7ef..0b409d83 100644 --- a/spec/compilers2/provider_with_items +++ b/spec/compilers2/provider_with_items @@ -60,5 +60,5 @@ const b: false }) }]]); - return G("div", {}) + return G(`div`, {}) }; diff --git a/spec/compilers2/record b/spec/compilers2/record index 76558c4f..0f0ccff9 100644 --- a/spec/compilers2/record +++ b/spec/compilers2/record @@ -21,5 +21,5 @@ const A = () => { a: `Hello`, b: 0 }; - return B("div", {}) + return B(`div`, {}) }; diff --git a/spec/compilers2/record_update b/spec/compilers2/record_update index 648c1ac7..60427e36 100644 --- a/spec/compilers2/record_update +++ b/spec/compilers2/record_update @@ -24,5 +24,5 @@ const A = () => { ...a.value, name: `John` }; - return C("div", {}) + return C(`div`, {}) }; diff --git a/spec/compilers2/style_with_argument b/spec/compilers2/style_with_argument index a3a73160..a3f31c97 100644 --- a/spec/compilers2/style_with_argument +++ b/spec/compilers2/style_with_argument @@ -21,7 +21,7 @@ const A = () => { }; return _ }; - return B("div", { + return B(`div`, { className: `Main_test`, style: C([a(`red`)]) }) diff --git a/spec/compilers2/style_with_default_argument b/spec/compilers2/style_with_default_argument index 31754159..42c5235e 100644 --- a/spec/compilers2/style_with_default_argument +++ b/spec/compilers2/style_with_default_argument @@ -21,7 +21,7 @@ const A = () => { }; return _ }; - return B("div", { + return B(`div`, { className: `Main_test`, style: C([a()]) }) diff --git a/spec/compilers2/type_with_variants b/spec/compilers2/type_with_variants index abc9baa4..03b410f3 100644 --- a/spec/compilers2/type_with_variants +++ b/spec/compilers2/type_with_variants @@ -32,11 +32,11 @@ const [ G(C, H([ [ - "color", + `color`, I ], [ - "name", + `name`, I ] ])), diff --git a/src/assets/runtime.js b/src/assets/runtime.js index a3577301..0be7d5fe 100644 --- a/src/assets/runtime.js +++ b/src/assets/runtime.js @@ -1,11 +1,11 @@ -var Or=Object.create;var it=Object.defineProperty;var Pr=Object.getOwnPropertyDescriptor;var Rr=Object.getOwnPropertyNames;var Tr=Object.getPrototypeOf,Nr=Object.prototype.hasOwnProperty;var st=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rr(t))!Nr.call(e,o)&&o!==r&&it(e,o,{get:()=>t[o],enumerable:!(n=Pr(t,o))||n.enumerable});return e};var Ir=(e,t,r)=>(r=e!=null?Or(Tr(e)):{},qr(t||!e||!e.__esModule?it(r,"default",{value:e,enumerable:!0}):r,e));var lr=D(he=>{var Ie=function(){var e=function(_,u,s,h){for(s=s||{},h=_.length;h--;s[_[h]]=u);return s},t=[1,9],r=[1,10],n=[1,11],o=[1,12],i=[5,11,12,13,14,15],a={trace:function(){},yy:{},symbols_:{error:2,root:3,expressions:4,EOF:5,expression:6,optional:7,literal:8,splat:9,param:10,"(":11,")":12,LITERAL:13,SPLAT:14,PARAM:15,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",11:"(",12:")",13:"LITERAL",14:"SPLAT",15:"PARAM"},productions_:[0,[3,2],[3,1],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[7,3],[8,1],[9,1],[10,1]],performAction:function(u,s,h,c,d,y,m){var v=y.length-1;switch(d){case 1:return new c.Root({},[y[v-1]]);case 2:return new c.Root({},[new c.Literal({value:""})]);case 3:this.$=new c.Concat({},[y[v-1],y[v]]);break;case 4:case 5:this.$=y[v];break;case 6:this.$=new c.Literal({value:y[v]});break;case 7:this.$=new c.Splat({name:y[v]});break;case 8:this.$=new c.Param({name:y[v]});break;case 9:this.$=new c.Optional({},[y[v-1]]);break;case 10:this.$=u;break;case 11:case 12:this.$=u.slice(1);break}},table:[{3:1,4:2,5:[1,3],6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:o},{1:[3]},{5:[1,13],6:14,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:o},{1:[2,2]},e(i,[2,4]),e(i,[2,5]),e(i,[2,6]),e(i,[2,7]),e(i,[2,8]),{4:15,6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:o},e(i,[2,10]),e(i,[2,11]),e(i,[2,12]),{1:[2,1]},e(i,[2,3]),{6:14,7:5,8:6,9:7,10:8,11:t,12:[1,16],13:r,14:n,15:o},e(i,[2,9])],defaultActions:{3:[2,2],13:[2,1]},parseError:function(u,s){if(s.recoverable)this.trace(u);else{let c=function(d,y){this.message=d,this.hash=y};var h=c;throw c.prototype=Error,new c(u,s)}},parse:function(u){var s=this,h=[0],c=[],d=[null],y=[],m=this.table,v="",w=0,R=0,F=0,H=2,ne=1,K=y.slice.call(arguments,1),E=Object.create(this.lexer),b={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(b.yy[j]=this.yy[j]);E.setInput(u,b.yy),b.yy.lexer=E,b.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var $e=E.yylloc;y.push($e);var Ar=E.options&&E.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function co(N){h.length=h.length-2*N,d.length=d.length-N,y.length=y.length-N}for(var Cr=function(){var N;return N=E.lex()||ne,typeof N!="number"&&(N=s.symbols_[N]||N),N},S,je,B,P,fo,De,J={},de,$,ot,ye;;){if(B=h[h.length-1],this.defaultActions[B]?P=this.defaultActions[B]:((S===null||typeof S>"u")&&(S=Cr()),P=m[B]&&m[B][S]),typeof P>"u"||!P.length||!P[0]){var Le="";ye=[];for(de in m[B])this.terminals_[de]&&de>H&&ye.push("'"+this.terminals_[de]+"'");E.showPosition?Le="Parse error on line "+(w+1)+`: +var Or=Object.create;var it=Object.defineProperty;var Pr=Object.getOwnPropertyDescriptor;var Rr=Object.getOwnPropertyNames;var Tr=Object.getPrototypeOf,Nr=Object.prototype.hasOwnProperty;var st=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rr(t))!Nr.call(e,o)&&o!==r&&it(e,o,{get:()=>t[o],enumerable:!(n=Pr(t,o))||n.enumerable});return e};var Ir=(e,t,r)=>(r=e!=null?Or(Tr(e)):{},qr(t||!e||!e.__esModule?it(r,"default",{value:e,enumerable:!0}):r,e));var lr=D(he=>{var Ie=function(){var e=function(_,u,s,h){for(s=s||{},h=_.length;h--;s[_[h]]=u);return s},t=[1,9],r=[1,10],n=[1,11],o=[1,12],i=[5,11,12,13,14,15],a={trace:function(){},yy:{},symbols_:{error:2,root:3,expressions:4,EOF:5,expression:6,optional:7,literal:8,splat:9,param:10,"(":11,")":12,LITERAL:13,SPLAT:14,PARAM:15,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",11:"(",12:")",13:"LITERAL",14:"SPLAT",15:"PARAM"},productions_:[0,[3,2],[3,1],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[7,3],[8,1],[9,1],[10,1]],performAction:function(u,s,h,c,d,y,m){var v=y.length-1;switch(d){case 1:return new c.Root({},[y[v-1]]);case 2:return new c.Root({},[new c.Literal({value:""})]);case 3:this.$=new c.Concat({},[y[v-1],y[v]]);break;case 4:case 5:this.$=y[v];break;case 6:this.$=new c.Literal({value:y[v]});break;case 7:this.$=new c.Splat({name:y[v]});break;case 8:this.$=new c.Param({name:y[v]});break;case 9:this.$=new c.Optional({},[y[v-1]]);break;case 10:this.$=u;break;case 11:case 12:this.$=u.slice(1);break}},table:[{3:1,4:2,5:[1,3],6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:o},{1:[3]},{5:[1,13],6:14,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:o},{1:[2,2]},e(i,[2,4]),e(i,[2,5]),e(i,[2,6]),e(i,[2,7]),e(i,[2,8]),{4:15,6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:o},e(i,[2,10]),e(i,[2,11]),e(i,[2,12]),{1:[2,1]},e(i,[2,3]),{6:14,7:5,8:6,9:7,10:8,11:t,12:[1,16],13:r,14:n,15:o},e(i,[2,9])],defaultActions:{3:[2,2],13:[2,1]},parseError:function(u,s){if(s.recoverable)this.trace(u);else{let c=function(d,y){this.message=d,this.hash=y};var h=c;throw c.prototype=Error,new c(u,s)}},parse:function(u){var s=this,h=[0],c=[],d=[null],y=[],m=this.table,v="",w=0,R=0,F=0,H=2,ne=1,K=y.slice.call(arguments,1),E=Object.create(this.lexer),b={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(b.yy[j]=this.yy[j]);E.setInput(u,b.yy),b.yy.lexer=E,b.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var $e=E.yylloc;y.push($e);var Ar=E.options&&E.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function co(N){h.length=h.length-2*N,d.length=d.length-N,y.length=y.length-N}for(var Cr=function(){var N;return N=E.lex()||ne,typeof N!="number"&&(N=s.symbols_[N]||N),N},S,je,B,P,fo,De,J={},de,I,ot,ye;;){if(B=h[h.length-1],this.defaultActions[B]?P=this.defaultActions[B]:((S===null||typeof S>"u")&&(S=Cr()),P=m[B]&&m[B][S]),typeof P>"u"||!P.length||!P[0]){var Le="";ye=[];for(de in m[B])this.terminals_[de]&&de>H&&ye.push("'"+this.terminals_[de]+"'");E.showPosition?Le="Parse error on line "+(w+1)+`: `+E.showPosition()+` -Expecting `+ye.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Le="Parse error on line "+(w+1)+": Unexpected "+(S==ne?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Le,{text:E.match,token:this.terminals_[S]||S,line:E.yylineno,loc:$e,expected:ye})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+S);switch(P[0]){case 1:h.push(S),d.push(E.yytext),y.push(E.yylloc),h.push(P[1]),S=null,je?(S=je,je=null):(R=E.yyleng,v=E.yytext,w=E.yylineno,$e=E.yylloc,F>0&&F--);break;case 2:if($=this.productions_[P[1]][1],J.$=d[d.length-$],J._$={first_line:y[y.length-($||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-($||1)].first_column,last_column:y[y.length-1].last_column},Ar&&(J._$.range=[y[y.length-($||1)].range[0],y[y.length-1].range[1]]),De=this.performAction.apply(J,[v,R,w,b.yy,P[1],d,y].concat(K)),typeof De<"u")return De;$&&(h=h.slice(0,-1*$*2),d=d.slice(0,-1*$),y=y.slice(0,-1*$)),h.push(this.productions_[P[1]][0]),d.push(J.$),y.push(J._$),ot=m[h[h.length-2]][h[h.length-1]],h.push(ot);break;case 3:return!0}}return!0}},l=function(){var _={EOF:1,parseError:function(s,h){if(this.yy.parser)this.yy.parser.parseError(s,h);else throw new Error(s)},setInput:function(u,s){return this.yy=s||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var s=u.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var s=u.length,h=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===c.length?this.yylloc.first_column:0)+c[c.length-h.length].length-h[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+ye.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Le="Parse error on line "+(w+1)+": Unexpected "+(S==ne?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Le,{text:E.match,token:this.terminals_[S]||S,line:E.yylineno,loc:$e,expected:ye})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+S);switch(P[0]){case 1:h.push(S),d.push(E.yytext),y.push(E.yylloc),h.push(P[1]),S=null,je?(S=je,je=null):(R=E.yyleng,v=E.yytext,w=E.yylineno,$e=E.yylloc,F>0&&F--);break;case 2:if(I=this.productions_[P[1]][1],J.$=d[d.length-I],J._$={first_line:y[y.length-(I||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(I||1)].first_column,last_column:y[y.length-1].last_column},Ar&&(J._$.range=[y[y.length-(I||1)].range[0],y[y.length-1].range[1]]),De=this.performAction.apply(J,[v,R,w,b.yy,P[1],d,y].concat(K)),typeof De<"u")return De;I&&(h=h.slice(0,-1*I*2),d=d.slice(0,-1*I),y=y.slice(0,-1*I)),h.push(this.productions_[P[1]][0]),d.push(J.$),y.push(J._$),ot=m[h[h.length-2]][h[h.length-1]],h.push(ot);break;case 3:return!0}}return!0}},l=function(){var _={EOF:1,parseError:function(s,h){if(this.yy.parser)this.yy.parser.parseError(s,h);else throw new Error(s)},setInput:function(u,s){return this.yy=s||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var s=u.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var s=u.length,h=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===c.length?this.yylloc.first_column:0)+c[c.length-h.length].length-h[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var u=this.pastInput(),s=new Array(u.length+1).join("-");return u+this.upcomingInput()+` `+s+"^"},test_match:function(u,s){var h,c,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),c=u[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],h=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var y in d)this[y]=d[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,s,h,c;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),y=0;ys[0].length)){if(s=h,c=y,this.options.backtrack_lexer){if(u=this.test_match(h,d[y]),u!==!1)return u;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(u=this.test_match(s,d[c]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,h,c,d){var y=d;switch(c){case 0:return"(";case 1:return")";case 2:return"SPLAT";case 3:return"PARAM";case 4:return"LITERAL";case 5:return"LITERAL";case 6:return"EOF"}},rules:[/^(?:\()/,/^(?:\))/,/^(?:\*+\w+)/,/^(?::+\w+)/,/^(?:[\w%\-~\n]+)/,/^(?:.)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return _}();a.lexer=l;function f(){this.yy={}}return f.prototype=a,a.Parser=f,new f}();typeof st<"u"&&typeof he<"u"&&(he.parser=Ie,he.Parser=Ie.Parser,he.parse=function(){return Ie.parse.apply(Ie,arguments)})});var tt=D(($i,cr)=>{"use strict";function re(e){return function(t,r){return{displayName:e,props:t,children:r||[]}}}cr.exports={Root:re("Root"),Concat:re("Concat"),Literal:re("Literal"),Splat:re("Splat"),Param:re("Param"),Optional:re("Optional")}});var hr=D((ji,_r)=>{"use strict";var fr=lr().parser;fr.yy=tt();_r.exports=fr});var rt=D((Di,pr)=>{"use strict";var Kn=Object.keys(tt());function Jn(e){return Kn.forEach(function(t){if(typeof e[t]>"u")throw new Error("No handler defined for "+t.displayName)}),{visit:function(t,r){return this.handlers[t.displayName].call(this,t,r)},handlers:e}}pr.exports=Jn});var vr=D((Li,yr)=>{"use strict";var Xn=rt(),Zn=/[\-{}\[\]+?.,\\\^$|#\s]/g;function dr(e){this.captures=e.captures,this.re=e.re}dr.prototype.match=function(e){var t=this.re.exec(e),r={};return t?(this.captures.forEach(function(n,o){typeof t[o+1]>"u"?r[n]=void 0:r[n]=decodeURIComponent(t[o+1])}),r):!1};var Qn=Xn({Concat:function(e){return e.children.reduce(function(t,r){var n=this.visit(r);return{re:t.re+n.re,captures:t.captures.concat(n.captures)}}.bind(this),{re:"",captures:[]})},Literal:function(e){return{re:e.props.value.replace(Zn,"\\$&"),captures:[]}},Splat:function(e){return{re:"([^?#]*?)",captures:[e.props.name]}},Param:function(e){return{re:"([^\\/\\?#]+)",captures:[e.props.name]}},Optional:function(e){var t=this.visit(e.children[0]);return{re:"(?:"+t.re+")?",captures:t.captures}},Root:function(e){var t=this.visit(e.children[0]);return new dr({re:new RegExp("^"+t.re+"(?=\\?|#|$)"),captures:t.captures})}});yr.exports=Qn});var gr=D((Ui,mr)=>{"use strict";var eo=rt(),to=eo({Concat:function(e,t){var r=e.children.map(function(n){return this.visit(n,t)}.bind(this));return r.some(function(n){return n===!1})?!1:r.join("")},Literal:function(e){return decodeURI(e.props.value)},Splat:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Param:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Optional:function(e,t){var r=this.visit(e.children[0],t);return r||""},Root:function(e,t){t=t||{};var r=this.visit(e.children[0],t);return r===!1||typeof r>"u"?!1:encodeURI(r)}});mr.exports=to});var Er=D((Mi,wr)=>{"use strict";var ro=hr(),no=vr(),oo=gr();function pe(e){var t;if(this?t=this:t=Object.create(pe.prototype),typeof e>"u")throw new Error("A route spec is required");return t.spec=e,t.ast=ro.parse(e),t}pe.prototype=Object.create(null);pe.prototype.match=function(e){var t=no.visit(this.ast),r=t.match(e);return r!==null?r:!1};pe.prototype.reverse=function(e){return oo.visit(this.ast,e)};wr.exports=pe});var xr=D((Vi,br)=>{"use strict";var io=Er();br.exports=io});var we,p,_t,Ve,W,at,ht,Ue,$r,oe={},pt=[],jr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ee=Array.isArray;function L(e,t){for(var r in t)e[r]=t[r];return e}function dt(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?we.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return me(e,a,n,o,null)}function me(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++_t,__i:-1,__u:0};return o==null&&p.vnode!=null&&p.vnode(i),i}function q(e){return e.children}function C(e,t){this.props=e,this.context=t}function X(e,t){if(t==null)return e.__?X(e.__,e.__i+1):null;for(var r;tt&&W.sort(Ue));ge.__r=0}function vt(e,t,r,n,o,i,a,l,f,_,u){var s,h,c,d,y,m=n&&n.__k||pt,v=t.length;for(r.__d=f,Dr(r,t,m),f=r.__d,s=0;s0?me(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,l=Lr(o,r,a=n+s,u),o.__i=l,i=null,l!==-1&&(u--,(i=r[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&s--,typeof o.type!="function"&&(o.__u|=65536)):l!==a&&(l===a+1?s++:l>a?u>f-a?s+=l-a:s--:s=l(f!=null&&!(131072&f.__u)?1:0))for(;a>=0||l=0){if((f=t[a])&&!(131072&f.__u)&&o==f.key&&i===f.type)return a;a--}if(l=r.__.length&&r.__.push({__V:be}),r.__[e]}function G(e,t){var r=Ot(Se++,3);!p.__s&&Pt(r.__H,t)&&(r.__=e,r.i=t,A.__H.__h.push(r))}function ze(e){return We=5,Z(function(){return{current:e}},[])}function Z(e,t){var r=Ot(Se++,7);return Pt(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Vr(){for(var e;e=Ct.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(xe),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],p.__e(t,e.__v)}}p.__b=function(e){A=null,Et&&Et(e)},p.__r=function(e){bt&&bt(e),Se=0;var t=(A=e.__c).__H;t&&(Be===A?(t.__h=[],A.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=be,r.__N=r.i=void 0})):(t.__h.forEach(xe),t.__h.forEach(Ge),t.__h=[],Se=0)),Be=A},p.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ct.push(t)!==1&&wt===p.requestAnimationFrame||((wt=p.requestAnimationFrame)||Fr)(Vr)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==be&&(r.__=r.__V),r.i=void 0,r.__V=be})),Be=A=null},p.__c=function(e,t){t.some(function(r){try{r.__h.forEach(xe),r.__h=r.__h.filter(function(n){return!n.__||Ge(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],p.__e(n,r.__v)}}),St&&St(e,t)},p.unmount=function(e){kt&&kt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{xe(n)}catch(o){t=o}}),r.__H=void 0,t&&p.__e(t,r.__v))};var At=typeof requestAnimationFrame=="function";function Fr(e){var t,r=function(){clearTimeout(n),At&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);At&&(t=requestAnimationFrame(r))}function xe(e){var t=A,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),A=t}function Ge(e){var t=A;e.__c=e.__(),A=t}function Pt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Wr(e,t){for(var r in t)e[r]=t[r];return e}function Rt(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Tt(e){this.props=e}(Tt.prototype=new C).isPureReactComponent=!0,Tt.prototype.shouldComponentUpdate=function(e,t){return Rt(this.props,e)||Rt(this.state,t)};var Nt=p.__b;p.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Nt&&Nt(e)};var Po=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Gr=p.__e;p.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Gr(e,t,r,n)};var qt=p.unmount;function Ut(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Wr({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ut(n,t,r)})),e}function Mt(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Mt(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Ye(){this.__u=0,this.t=null,this.__b=null}function Vt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ke(){this.u=null,this.o=null}p.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),qt&&qt(e)},(Ye.prototype=new C).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Vt(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(l):l())};r.__R=a;var l=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=Mt(f,f.__c.__P,f.__c.__O)}var _;for(n.setState({__a:n.__b=null});_=n.t.pop();)_.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},Ye.prototype.componentWillUnmount=function(){this.t=[]},Ye.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ut(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&O(q,null,e.fallback);return o&&(o.__u&=-33),[O(q,null,t.__a?null:e.children),o]};var It=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(n)}}),se(O(zr,{context:t.context},e.__v),t.l)}function Kr(e,t){var r=O(Yr,{__v:e,i:t});return r.containerInfo=t,r}(ke.prototype=new C).__a=function(e){var t=this,r=Vt(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),It(t,e,n)):o()};r?r(i):i()}},ke.prototype.render=function(e){this.u=null,this.o=new Map;var t=ie(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ke.prototype.componentDidUpdate=ke.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){It(e,r,t)})};var Jr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Xr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Zr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Qr=/[A-Z0-9]/g,en=typeof document<"u",tn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $t=p.event;function rn(){}function nn(){return this.cancelBubble}function on(){return this.defaultPrevented}p.event=function(e){return $t&&(e=$t(e)),e.persist=rn,e.isPropagationStopped=nn,e.isDefaultPrevented=on,e.nativeEvent=e};var Ft,sn={enumerable:!1,configurable:!0,get:function(){return this.class}},jt=p.vnode;p.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||en&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":l==="ondoubleclick"?i="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||tn(r.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":Zr.test(i)?i=l:n.indexOf("-")===-1&&Xr.test(i)?i=i.replace(Qr,"-$&").toLowerCase():a===null&&(a=void 0):l=i="oninput",l==="oninput"&&o[i=l]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=ie(r.children).forEach(function(f){f.props.selected=o.value.indexOf(f.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=ie(r.children).forEach(function(f){f.props.selected=o.multiple?o.defaultValue.indexOf(f.props.value)!=-1:o.defaultValue==f.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",sn)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Jr,jt&&jt(e)};var Dt=p.__r;p.__r=function(e){Dt&&Dt(e),Ft=e.__c};var Lt=p.diffed;p.diffed=function(e){Lt&&Lt(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Ft=null};function Ce(){throw new Error("Cycle detected")}var an=Symbol.for("preact-signals");function Oe(){if(U>1)U--;else{for(var e,t=!1;ae!==void 0;){var r=ae;for(ae=void 0,Je++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Wt(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(Je=0,U--,t)throw e}}function Ht(e){if(U>0)return e();U++;try{return e()}finally{Oe()}}var g=void 0,Ke=0;function Pe(e){if(Ke>0)return e();var t=g;g=void 0,Ke++;try{return e()}finally{Ke--,g=t}}var ae=void 0,U=0,Je=0,Ae=0;function Bt(e){if(g!==void 0){var t=e.n;if(t===void 0||t.t!==g)return t={i:0,S:e,p:g.s,n:void 0,t:g,e:void 0,x:void 0,r:t},g.s!==void 0&&(g.s.n=t),g.s=t,e.n=t,32&g.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=g.s,t.n=void 0,g.s.n=t,g.s=t),t}}function x(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}x.prototype.brand=an;x.prototype.h=function(){return!0};x.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};x.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};x.prototype.subscribe=function(e){var t=this;return Q(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})};x.prototype.valueOf=function(){return this.value};x.prototype.toString=function(){return this.value+""};x.prototype.toJSON=function(){return this.value};x.prototype.peek=function(){return this.v};Object.defineProperty(x.prototype,"value",{get:function(){var e=Bt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(g instanceof M&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Je>100&&Ce(),this.v=e,this.i++,Ae++,U++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Oe()}}}});function ue(e){return new x(e)}function Wt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Gt(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function zt(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function M(e){x.call(this,void 0),this.x=e,this.s=void 0,this.g=Ae-1,this.f=4}(M.prototype=new x).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ae))return!0;if(this.g=Ae,this.f|=1,this.i>0&&!Wt(this))return this.f&=-2,!0;var e=g;try{Gt(this),g=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return g=e,zt(this),this.f&=-2,!0};M.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}x.prototype.S.call(this,e)};M.prototype.U=function(e){if(this.t!==void 0&&(x.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};M.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};M.prototype.peek=function(){if(this.h()||Ce(),16&this.f)throw this.v;return this.v};Object.defineProperty(M.prototype,"value",{get:function(){1&this.f&&Ce();var e=Bt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function le(e){return new M(e)}function Yt(e){var t=e.u;if(e.u=void 0,typeof t=="function"){U++;var r=g;g=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Xe(e),n}finally{g=r,Oe()}}}function Xe(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Yt(e)}function un(e){if(g!==this)throw new Error("Out-of-order effect");zt(this),g=e,this.f&=-2,8&this.f&&Xe(this),Oe()}function ce(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}ce.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};ce.prototype.S=function(){1&this.f&&Ce(),this.f|=1,this.f&=-9,Yt(this),Gt(this),U++;var e=g;return g=this,un.bind(this,e)};ce.prototype.N=function(){2&this.f||(this.f|=2,this.o=ae,ae=this)};ce.prototype.d=function(){this.f|=8,1&this.f||Xe(this)};function Q(e){var t=new ce(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Te,Ze;function ee(e,t){p[e]=t.bind(null,p[e]||function(){})}function Re(e){Ze&&Ze(),Ze=e&&e.S()}function Kt(e){var t=this,r=e.data,n=Jt(r);n.value=r;var o=Z(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Ve(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},le(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Kt.displayName="_st";Object.defineProperties(x.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Kt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ee("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof x&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)});ee("__r",function(e,t){Re();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Q(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Te=n,Re(r),e(t)});ee("__e",function(e,t,r,n){Re(),Te=void 0,e(t,r,n)});ee("diffed",function(e,t){Re(),Te=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var l=i[a];l!==void 0&&!(a in n)&&(l.d(),i[a]=void 0)}else r.U=i={};for(var f in n){var _=i[f],u=n[f];_===void 0?(_=ln(r,f,u,o),i[f]=_):_.o(u,o)}}}e(t)});function ln(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=ue(r);return{o:function(a,l){i.value=a,n=l},d:Q(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}ee("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var l=a.__$u;l&&(a.__$u=void 0,l.d())}}e(t)});ee("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});C.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Jt(e){return Z(function(){return ue(e)},[])}function cn(e){var t=ze(e);return t.current=e,Te.__$f|=4,Z(function(){return le(function(){return t.current()})},[])}var k=Symbol("Equals");Boolean.prototype[k]=Symbol.prototype[k]=Number.prototype[k]=String.prototype[k]=function(e){return this.valueOf()===e};Date.prototype[k]=function(e){return+this==+e};Function.prototype[k]=Node.prototype[k]=function(e){return this===e};URLSearchParams.prototype[k]=function(e){return e==null?!1:this.toString()===e.toString()};Set.prototype[k]=function(e){return e==null?!1:z(Array.from(this).sort(),Array.from(e).sort())};Array.prototype[k]=function(e){if(e==null||this.length!==e.length)return!1;if(this.length==0)return!0;for(let t in this)if(!z(this[t],e[t]))return!1;return!0};FormData.prototype[k]=function(e){if(e==null)return!1;let t=Array.from(e.keys()).sort(),r=Array.from(this.keys()).sort();if(z(r,t)){if(r.length==0)return!0;for(let n of r){let o=Array.from(e.getAll(n).sort()),i=Array.from(this.getAll(n).sort());if(!z(i,o))return!1}return!0}else return!1};var z=(e,t)=>e===void 0&&t===void 0||e===null&&t===null?!0:e!=null&&e!=null&&e[k]?e[k](t):t!=null&&t!=null&&t[k]?t[k](e):fn(e,t),fn=(e,t)=>{if(e instanceof Object&&t instanceof Object){let r=new Set(Object.keys(e).concat(Object.keys(t)));for(let n of r)if(!z(e[n],t[n]))return!1;return!0}else return e===t};var fe=class{constructor(t){this.patterns=t}},Ne=class{constructor(t,r){this.pattern=r,this.variant=t}},Vo=(e,t)=>new Ne(e,t),Fo=e=>new fe(e),_n=Symbol("Variable"),Qe=Symbol("Spread"),Y=(e,t,r=[])=>{if(t!==null){if(t===_n)r.push(e);else if(Array.isArray(t))if(t.some(o=>o===Qe)&&e.length>=t.length-1){let o=0,i=[],a=1;for(;t[o]!==Qe&&o{for(let r of t){if(r[0]===null)return r[1]();{let n=Y(e,r[0]);if(n)return r[1].apply(null,n)}}};var hn=e=>new Proxy(e,{get:function(t,r){if(r in t){let n=t[r];return n instanceof Function?()=>t[r]():n}else switch(r){case"clipboardData":return t.clipboardData=new DataTransfer;case"dataTransfer":return t.dataTransfer=new DataTransfer;case"data":return"";case"altKey":return!1;case"charCode":return-1;case"ctrlKey":return!1;case"key":return"";case"keyCode":return-1;case"locale":return"";case"location":return-1;case"metaKey":return!1;case"repeat":return!1;case"shiftKey":return!1;case"which":return-1;case"button":return-1;case"buttons":return-1;case"clientX":return-1;case"clientY":return-1;case"pageX":return-1;case"pageY":return-1;case"screenX":return-1;case"screenY":return-1;case"detail":return-1;case"deltaMode":return-1;case"deltaX":return-1;case"deltaY":return-1;case"deltaZ":return-1;case"animationName":return"";case"pseudoElement":return"";case"elapsedTime":return-1;case"propertyName":return"";default:return}}});p.event=hn;var Yo=(e,t,r,n)=>e.length>=t+1&&t>=0?new r(e[t]):new n,Ko=e=>{let t=useRef(!1);G(()=>{t.current?e():t.current=!0})},Jo=(e,t)=>e??t,Xo=(...e)=>{let t=Array.from(e);return Array.isArray(t[0])&&t.length===1?t[0]:t},Xt=e=>e;var ti=(e,t)=>r=>(Pe(()=>{e.value=[...e.value,r],t()}),()=>{Pe(()=>{e.value=e.value.filter(n=>n!=r),t()})}),ri=e=>{G(()=>{let t=e.map(r=>{if(r.length===1||r[1])return r[0]()});return()=>{t.forEach(r=>{r&&r()})}})};function et(e,t=1,r={}){let{indent:n=" ",includeEmptyLines:o=!1}=r;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(t===0)return e;let i=o?/^/gm:/^(?!\s*$)/gm;return e.replace(i,n.repeat(t))}var I=e=>{let t=JSON.stringify(e,"",2);return typeof t>"u"&&(t="undefined"),et(t)},T=class{constructor(t,r=[]){this.message=t,this.object=null,this.path=r}push(t){this.path.unshift(t)}toString(){let t=this.message.trim(),r=this.path.reduce((n,o)=>{if(n.length)switch(o.type){case"FIELD":return`${n}.${o.value}`;case"ARRAY":return`${n}[${o.value}]`}else switch(o.type){case"FIELD":return o.value;case"ARRAY":return"[$(item.value)]"}},"");return r.length&&this.object?t+` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,h,c,d){var y=d;switch(c){case 0:return"(";case 1:return")";case 2:return"SPLAT";case 3:return"PARAM";case 4:return"LITERAL";case 5:return"LITERAL";case 6:return"EOF"}},rules:[/^(?:\()/,/^(?:\))/,/^(?:\*+\w+)/,/^(?::+\w+)/,/^(?:[\w%\-~\n]+)/,/^(?:.)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return _}();a.lexer=l;function f(){this.yy={}}return f.prototype=a,a.Parser=f,new f}();typeof st<"u"&&typeof he<"u"&&(he.parser=Ie,he.Parser=Ie.Parser,he.parse=function(){return Ie.parse.apply(Ie,arguments)})});var tt=D((ji,cr)=>{"use strict";function re(e){return function(t,r){return{displayName:e,props:t,children:r||[]}}}cr.exports={Root:re("Root"),Concat:re("Concat"),Literal:re("Literal"),Splat:re("Splat"),Param:re("Param"),Optional:re("Optional")}});var hr=D((Di,_r)=>{"use strict";var fr=lr().parser;fr.yy=tt();_r.exports=fr});var rt=D((Li,pr)=>{"use strict";var Kn=Object.keys(tt());function Jn(e){return Kn.forEach(function(t){if(typeof e[t]>"u")throw new Error("No handler defined for "+t.displayName)}),{visit:function(t,r){return this.handlers[t.displayName].call(this,t,r)},handlers:e}}pr.exports=Jn});var vr=D((Ui,yr)=>{"use strict";var Xn=rt(),Zn=/[\-{}\[\]+?.,\\\^$|#\s]/g;function dr(e){this.captures=e.captures,this.re=e.re}dr.prototype.match=function(e){var t=this.re.exec(e),r={};return t?(this.captures.forEach(function(n,o){typeof t[o+1]>"u"?r[n]=void 0:r[n]=decodeURIComponent(t[o+1])}),r):!1};var Qn=Xn({Concat:function(e){return e.children.reduce(function(t,r){var n=this.visit(r);return{re:t.re+n.re,captures:t.captures.concat(n.captures)}}.bind(this),{re:"",captures:[]})},Literal:function(e){return{re:e.props.value.replace(Zn,"\\$&"),captures:[]}},Splat:function(e){return{re:"([^?#]*?)",captures:[e.props.name]}},Param:function(e){return{re:"([^\\/\\?#]+)",captures:[e.props.name]}},Optional:function(e){var t=this.visit(e.children[0]);return{re:"(?:"+t.re+")?",captures:t.captures}},Root:function(e){var t=this.visit(e.children[0]);return new dr({re:new RegExp("^"+t.re+"(?=\\?|#|$)"),captures:t.captures})}});yr.exports=Qn});var gr=D((Mi,mr)=>{"use strict";var eo=rt(),to=eo({Concat:function(e,t){var r=e.children.map(function(n){return this.visit(n,t)}.bind(this));return r.some(function(n){return n===!1})?!1:r.join("")},Literal:function(e){return decodeURI(e.props.value)},Splat:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Param:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Optional:function(e,t){var r=this.visit(e.children[0],t);return r||""},Root:function(e,t){t=t||{};var r=this.visit(e.children[0],t);return r===!1||typeof r>"u"?!1:encodeURI(r)}});mr.exports=to});var Er=D((Vi,wr)=>{"use strict";var ro=hr(),no=vr(),oo=gr();function pe(e){var t;if(this?t=this:t=Object.create(pe.prototype),typeof e>"u")throw new Error("A route spec is required");return t.spec=e,t.ast=ro.parse(e),t}pe.prototype=Object.create(null);pe.prototype.match=function(e){var t=no.visit(this.ast),r=t.match(e);return r!==null?r:!1};pe.prototype.reverse=function(e){return oo.visit(this.ast,e)};wr.exports=pe});var xr=D((Fi,br)=>{"use strict";var io=Er();br.exports=io});var we,p,_t,Ve,W,at,ht,Ue,$r,oe={},pt=[],jr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ee=Array.isArray;function L(e,t){for(var r in t)e[r]=t[r];return e}function dt(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?we.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return me(e,a,n,o,null)}function me(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++_t,__i:-1,__u:0};return o==null&&p.vnode!=null&&p.vnode(i),i}function $(e){return e.children}function C(e,t){this.props=e,this.context=t}function X(e,t){if(t==null)return e.__?X(e.__,e.__i+1):null;for(var r;tt&&W.sort(Ue));ge.__r=0}function vt(e,t,r,n,o,i,a,l,f,_,u){var s,h,c,d,y,m=n&&n.__k||pt,v=t.length;for(r.__d=f,Dr(r,t,m),f=r.__d,s=0;s0?me(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,l=Lr(o,r,a=n+s,u),o.__i=l,i=null,l!==-1&&(u--,(i=r[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&s--,typeof o.type!="function"&&(o.__u|=65536)):l!==a&&(l===a+1?s++:l>a?u>f-a?s+=l-a:s--:s=l(f!=null&&!(131072&f.__u)?1:0))for(;a>=0||l=0){if((f=t[a])&&!(131072&f.__u)&&o==f.key&&i===f.type)return a;a--}if(l=r.__.length&&r.__.push({__V:be}),r.__[e]}function G(e,t){var r=Ot(Se++,3);!p.__s&&Pt(r.__H,t)&&(r.__=e,r.i=t,A.__H.__h.push(r))}function ze(e){return We=5,Z(function(){return{current:e}},[])}function Z(e,t){var r=Ot(Se++,7);return Pt(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Vr(){for(var e;e=Ct.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(xe),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],p.__e(t,e.__v)}}p.__b=function(e){A=null,Et&&Et(e)},p.__r=function(e){bt&&bt(e),Se=0;var t=(A=e.__c).__H;t&&(Be===A?(t.__h=[],A.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=be,r.__N=r.i=void 0})):(t.__h.forEach(xe),t.__h.forEach(Ge),t.__h=[],Se=0)),Be=A},p.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ct.push(t)!==1&&wt===p.requestAnimationFrame||((wt=p.requestAnimationFrame)||Fr)(Vr)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==be&&(r.__=r.__V),r.i=void 0,r.__V=be})),Be=A=null},p.__c=function(e,t){t.some(function(r){try{r.__h.forEach(xe),r.__h=r.__h.filter(function(n){return!n.__||Ge(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],p.__e(n,r.__v)}}),St&&St(e,t)},p.unmount=function(e){kt&&kt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{xe(n)}catch(o){t=o}}),r.__H=void 0,t&&p.__e(t,r.__v))};var At=typeof requestAnimationFrame=="function";function Fr(e){var t,r=function(){clearTimeout(n),At&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);At&&(t=requestAnimationFrame(r))}function xe(e){var t=A,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),A=t}function Ge(e){var t=A;e.__c=e.__(),A=t}function Pt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Wr(e,t){for(var r in t)e[r]=t[r];return e}function Rt(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Tt(e){this.props=e}(Tt.prototype=new C).isPureReactComponent=!0,Tt.prototype.shouldComponentUpdate=function(e,t){return Rt(this.props,e)||Rt(this.state,t)};var Nt=p.__b;p.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Nt&&Nt(e)};var Po=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Gr=p.__e;p.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Gr(e,t,r,n)};var qt=p.unmount;function Ut(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Wr({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ut(n,t,r)})),e}function Mt(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Mt(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Ye(){this.__u=0,this.t=null,this.__b=null}function Vt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ke(){this.u=null,this.o=null}p.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),qt&&qt(e)},(Ye.prototype=new C).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Vt(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(l):l())};r.__R=a;var l=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=Mt(f,f.__c.__P,f.__c.__O)}var _;for(n.setState({__a:n.__b=null});_=n.t.pop();)_.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},Ye.prototype.componentWillUnmount=function(){this.t=[]},Ye.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ut(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&O($,null,e.fallback);return o&&(o.__u&=-33),[O($,null,t.__a?null:e.children),o]};var It=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(n)}}),se(O(zr,{context:t.context},e.__v),t.l)}function Kr(e,t){var r=O(Yr,{__v:e,i:t});return r.containerInfo=t,r}(ke.prototype=new C).__a=function(e){var t=this,r=Vt(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),It(t,e,n)):o()};r?r(i):i()}},ke.prototype.render=function(e){this.u=null,this.o=new Map;var t=ie(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ke.prototype.componentDidUpdate=ke.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){It(e,r,t)})};var Jr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Xr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Zr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Qr=/[A-Z0-9]/g,en=typeof document<"u",tn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $t=p.event;function rn(){}function nn(){return this.cancelBubble}function on(){return this.defaultPrevented}p.event=function(e){return $t&&(e=$t(e)),e.persist=rn,e.isPropagationStopped=nn,e.isDefaultPrevented=on,e.nativeEvent=e};var Ft,sn={enumerable:!1,configurable:!0,get:function(){return this.class}},jt=p.vnode;p.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||en&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":l==="ondoubleclick"?i="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||tn(r.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":Zr.test(i)?i=l:n.indexOf("-")===-1&&Xr.test(i)?i=i.replace(Qr,"-$&").toLowerCase():a===null&&(a=void 0):l=i="oninput",l==="oninput"&&o[i=l]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=ie(r.children).forEach(function(f){f.props.selected=o.value.indexOf(f.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=ie(r.children).forEach(function(f){f.props.selected=o.multiple?o.defaultValue.indexOf(f.props.value)!=-1:o.defaultValue==f.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",sn)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Jr,jt&&jt(e)};var Dt=p.__r;p.__r=function(e){Dt&&Dt(e),Ft=e.__c};var Lt=p.diffed;p.diffed=function(e){Lt&&Lt(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Ft=null};function Ce(){throw new Error("Cycle detected")}var an=Symbol.for("preact-signals");function Oe(){if(U>1)U--;else{for(var e,t=!1;ae!==void 0;){var r=ae;for(ae=void 0,Je++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Wt(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(Je=0,U--,t)throw e}}function Ht(e){if(U>0)return e();U++;try{return e()}finally{Oe()}}var g=void 0,Ke=0;function Pe(e){if(Ke>0)return e();var t=g;g=void 0,Ke++;try{return e()}finally{Ke--,g=t}}var ae=void 0,U=0,Je=0,Ae=0;function Bt(e){if(g!==void 0){var t=e.n;if(t===void 0||t.t!==g)return t={i:0,S:e,p:g.s,n:void 0,t:g,e:void 0,x:void 0,r:t},g.s!==void 0&&(g.s.n=t),g.s=t,e.n=t,32&g.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=g.s,t.n=void 0,g.s.n=t,g.s=t),t}}function x(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}x.prototype.brand=an;x.prototype.h=function(){return!0};x.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};x.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};x.prototype.subscribe=function(e){var t=this;return Q(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})};x.prototype.valueOf=function(){return this.value};x.prototype.toString=function(){return this.value+""};x.prototype.toJSON=function(){return this.value};x.prototype.peek=function(){return this.v};Object.defineProperty(x.prototype,"value",{get:function(){var e=Bt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(g instanceof M&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Je>100&&Ce(),this.v=e,this.i++,Ae++,U++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Oe()}}}});function ue(e){return new x(e)}function Wt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Gt(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function zt(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function M(e){x.call(this,void 0),this.x=e,this.s=void 0,this.g=Ae-1,this.f=4}(M.prototype=new x).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ae))return!0;if(this.g=Ae,this.f|=1,this.i>0&&!Wt(this))return this.f&=-2,!0;var e=g;try{Gt(this),g=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return g=e,zt(this),this.f&=-2,!0};M.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}x.prototype.S.call(this,e)};M.prototype.U=function(e){if(this.t!==void 0&&(x.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};M.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};M.prototype.peek=function(){if(this.h()||Ce(),16&this.f)throw this.v;return this.v};Object.defineProperty(M.prototype,"value",{get:function(){1&this.f&&Ce();var e=Bt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function le(e){return new M(e)}function Yt(e){var t=e.u;if(e.u=void 0,typeof t=="function"){U++;var r=g;g=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Xe(e),n}finally{g=r,Oe()}}}function Xe(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Yt(e)}function un(e){if(g!==this)throw new Error("Out-of-order effect");zt(this),g=e,this.f&=-2,8&this.f&&Xe(this),Oe()}function ce(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}ce.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};ce.prototype.S=function(){1&this.f&&Ce(),this.f|=1,this.f&=-9,Yt(this),Gt(this),U++;var e=g;return g=this,un.bind(this,e)};ce.prototype.N=function(){2&this.f||(this.f|=2,this.o=ae,ae=this)};ce.prototype.d=function(){this.f|=8,1&this.f||Xe(this)};function Q(e){var t=new ce(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Te,Ze;function ee(e,t){p[e]=t.bind(null,p[e]||function(){})}function Re(e){Ze&&Ze(),Ze=e&&e.S()}function Kt(e){var t=this,r=e.data,n=Jt(r);n.value=r;var o=Z(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Ve(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},le(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Kt.displayName="_st";Object.defineProperties(x.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Kt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ee("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof x&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)});ee("__r",function(e,t){Re();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Q(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Te=n,Re(r),e(t)});ee("__e",function(e,t,r,n){Re(),Te=void 0,e(t,r,n)});ee("diffed",function(e,t){Re(),Te=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var l=i[a];l!==void 0&&!(a in n)&&(l.d(),i[a]=void 0)}else r.U=i={};for(var f in n){var _=i[f],u=n[f];_===void 0?(_=ln(r,f,u,o),i[f]=_):_.o(u,o)}}}e(t)});function ln(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=ue(r);return{o:function(a,l){i.value=a,n=l},d:Q(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}ee("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var l=a.__$u;l&&(a.__$u=void 0,l.d())}}e(t)});ee("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});C.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Jt(e){return Z(function(){return ue(e)},[])}function cn(e){var t=ze(e);return t.current=e,Te.__$f|=4,Z(function(){return le(function(){return t.current()})},[])}var k=Symbol("Equals");Boolean.prototype[k]=Symbol.prototype[k]=Number.prototype[k]=String.prototype[k]=function(e){return this.valueOf()===e};Date.prototype[k]=function(e){return+this==+e};Function.prototype[k]=Node.prototype[k]=function(e){return this===e};URLSearchParams.prototype[k]=function(e){return e==null?!1:this.toString()===e.toString()};Set.prototype[k]=function(e){return e==null?!1:z(Array.from(this).sort(),Array.from(e).sort())};Array.prototype[k]=function(e){if(e==null||this.length!==e.length)return!1;if(this.length==0)return!0;for(let t in this)if(!z(this[t],e[t]))return!1;return!0};FormData.prototype[k]=function(e){if(e==null)return!1;let t=Array.from(e.keys()).sort(),r=Array.from(this.keys()).sort();if(z(r,t)){if(r.length==0)return!0;for(let n of r){let o=Array.from(e.getAll(n).sort()),i=Array.from(this.getAll(n).sort());if(!z(i,o))return!1}return!0}else return!1};var z=(e,t)=>e===void 0&&t===void 0||e===null&&t===null?!0:e!=null&&e!=null&&e[k]?e[k](t):t!=null&&t!=null&&t[k]?t[k](e):fn(e,t),fn=(e,t)=>{if(e instanceof Object&&t instanceof Object){let r=new Set(Object.keys(e).concat(Object.keys(t)));for(let n of r)if(!z(e[n],t[n]))return!1;return!0}else return e===t};var fe=class{constructor(t){this.patterns=t}},Ne=class{constructor(t,r){this.pattern=r,this.variant=t}},Vo=(e,t)=>new Ne(e,t),Fo=e=>new fe(e),_n=Symbol("Variable"),Qe=Symbol("Spread"),Y=(e,t,r=[])=>{if(t!==null){if(t===_n)r.push(e);else if(Array.isArray(t))if(t.some(o=>o===Qe)&&e.length>=t.length-1){let o=0,i=[],a=1;for(;t[o]!==Qe&&o{for(let r of t){if(r[0]===null)return r[1]();{let n=Y(e,r[0]);if(n)return r[1].apply(null,n)}}};var hn=e=>new Proxy(e,{get:function(t,r){if(r in t){let n=t[r];return n instanceof Function?()=>t[r]():n}else switch(r){case"clipboardData":return t.clipboardData=new DataTransfer;case"dataTransfer":return t.dataTransfer=new DataTransfer;case"data":return"";case"altKey":return!1;case"charCode":return-1;case"ctrlKey":return!1;case"key":return"";case"keyCode":return-1;case"locale":return"";case"location":return-1;case"metaKey":return!1;case"repeat":return!1;case"shiftKey":return!1;case"which":return-1;case"button":return-1;case"buttons":return-1;case"clientX":return-1;case"clientY":return-1;case"pageX":return-1;case"pageY":return-1;case"screenX":return-1;case"screenY":return-1;case"detail":return-1;case"deltaMode":return-1;case"deltaX":return-1;case"deltaY":return-1;case"deltaZ":return-1;case"animationName":return"";case"pseudoElement":return"";case"elapsedTime":return-1;case"propertyName":return"";default:return}}});p.event=hn;var Yo=(e,t,r,n)=>e.length>=t+1&&t>=0?new r(e[t]):new n,Ko=e=>{let t=useRef(!1);G(()=>{t.current?e():t.current=!0})},Jo=(e,t)=>e??t,Xo=(...e)=>{let t=Array.from(e);return Array.isArray(t[0])&&t.length===1?t[0]:t},Zo=e=>t=>t[e],Xt=e=>e;var ri=(e,t)=>r=>(Pe(()=>{e.value=[...e.value,r],t()}),()=>{Pe(()=>{e.value=e.value.filter(n=>n!=r),t()})}),ni=e=>{G(()=>{let t=e.map(r=>{if(r.length===1||r[1])return r[0]()});return()=>{t.forEach(r=>{r&&r()})}})};function et(e,t=1,r={}){let{indent:n=" ",includeEmptyLines:o=!1}=r;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(t===0)return e;let i=o?/^/gm:/^(?!\s*$)/gm;return e.replace(i,n.repeat(t))}var q=e=>{let t=JSON.stringify(e,"",2);return typeof t>"u"&&(t="undefined"),et(t)},T=class{constructor(t,r=[]){this.message=t,this.object=null,this.path=r}push(t){this.path.unshift(t)}toString(){let t=this.message.trim(),r=this.path.reduce((n,o)=>{if(n.length)switch(o.type){case"FIELD":return`${n}.${o.value}`;case"ARRAY":return`${n}[${o.value}]`}else switch(o.type){case"FIELD":return o.value;case"ARRAY":return"[$(item.value)]"}},"");return r.length&&this.object?t+` -`+pn.trim().replace("{value}",I(this.object)).replace("{path}",r):t}},pn=` +`+pn.trim().replace("{value}",q(this.object)).replace("{path}",r):t}},pn=` The input is in this object: {value} @@ -65,4 +65,4 @@ I was trying to decode the value: {value} as a Map, but could not. -`,si=(e,t)=>r=>typeof r!="string"?new t(new T(dn.replace("{value}",I(r)))):new e(r),ai=(e,t)=>r=>{let n=NaN;return typeof r=="number"?n=new Date(r):n=Date.parse(r),Number.isNaN(n)?new t(new T(yn.replace("{value}",I(r)))):new e(new Date(n))},ui=(e,t)=>r=>{let n=parseFloat(r);return isNaN(n)?new t(new T(vn.replace("{value}",I(r)))):new e(n)},li=(e,t)=>r=>typeof r!="boolean"?new t(new T(mn.replace("{value}",I(r)))):new e(r),Sn=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let o=gn.replace("{field}",e).replace("{value}",I(n));return new r(new T(o))}else{let o=n[e],i=t(o);return i instanceof r&&(i._0.push({type:"FIELD",value:e}),i._0.object=n),i}},ci=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(wn.replace("{value}",I(n))));let o=[],i=0;for(let a of n){let l=e(a);if(l instanceof r)return l._0.push({type:"ARRAY",value:i}),l._0.object=n,l;o.push(l._0),i++}return new t(o)},fi=(e,t,r,n,o)=>i=>{if(i==null||i==null)return new t(new o);{let a=e(i);return a instanceof r?a:new t(new n(a._0))}},_i=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(En.replace("{value}",I(n))));let o=[],i=0;for(let a of e){if(n[i]===void 0||n[i]===null)return new r(new T(bn.replace("{value}",I(n[i]))));{let l=a(n[i]);if(l instanceof r)return l._0.push({type:"ARRAY",value:i}),l._0.object=n,l;o.push(l._0)}i++}return new t(o)},hi=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let o=xn.replace("{value}",I(n));return new r(new T(o))}else{let o=[];for(let i in n){let a=e(n[i]);if(a instanceof r)return a;o.push([i,a._0])}return new t(o)}},pi=e=>t=>new e(t),di=(e,t,r)=>n=>{let o={};for(let i in r){let a=r[i];Array.isArray(a)&&(a=r[i][0],i=r[i][1]);let l=Sn(i,a,t)(n);if(l instanceof t)return l;o[i]=l._0}return new e(o)};var mi=e=>e.toISOString(),gi=e=>t=>t.map(r=>e?e(r):r),wi=e=>t=>{let r={};for(let n of t)r[n[0]]=e?e(n[1]):n[1];return r},Ei=(e,t)=>r=>r instanceof t?e?e(r._0):r._0:null,bi=e=>t=>t.map((r,n)=>{let o=e[n];return o?o(r):r}),xi=e=>t=>{let r={};for(let n in e){let o=e[n],i=n;Array.isArray(o)&&(o=e[n][0],i=e[n][1]),r[i]=(o||Xt)(t[n])}return r};var kn=Object.getOwnPropertyNames,An=Object.getOwnPropertySymbols,Cn=Object.prototype.hasOwnProperty;function Zt(e,t){return function(n,o,i){return e(n,o,i)&&t(n,o,i)}}function qe(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);var i=o.cache,a=i.get(r),l=i.get(n);if(a&&l)return a===n&&l===r;i.set(r,n),i.set(n,r);var f=e(r,n,o);return i.delete(r),i.delete(n),f}}function Qt(e){return kn(e).concat(An(e))}var sr=Object.hasOwn||function(e,t){return Cn.call(e,t)};function te(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var ar="_owner",er=Object.getOwnPropertyDescriptor,tr=Object.keys;function On(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Pn(e,t){return te(e.getTime(),t.getTime())}function rr(e,t,r){if(e.size!==t.size)return!1;for(var n={},o=e.entries(),i=0,a,l;(a=o.next())&&!a.done;){for(var f=t.entries(),_=!1,u=0;(l=f.next())&&!l.done;){var s=a.value,h=s[0],c=s[1],d=l.value,y=d[0],m=d[1];!_&&!n[u]&&(_=r.equals(h,y,i,u,e,t,r)&&r.equals(c,m,h,y,e,t,r))&&(n[u]=!0),u++}if(!_)return!1;i++}return!0}function Rn(e,t,r){var n=tr(e),o=n.length;if(tr(t).length!==o)return!1;for(var i;o-- >0;)if(i=n[o],i===ar&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sr(t,i)||!r.equals(e[i],t[i],i,i,e,t,r))return!1;return!0}function _e(e,t,r){var n=Qt(e),o=n.length;if(Qt(t).length!==o)return!1;for(var i,a,l;o-- >0;)if(i=n[o],i===ar&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sr(t,i)||!r.equals(e[i],t[i],i,i,e,t,r)||(a=er(e,i),l=er(t,i),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function Tn(e,t){return te(e.valueOf(),t.valueOf())}function Nn(e,t){return e.source===t.source&&e.flags===t.flags}function nr(e,t,r){if(e.size!==t.size)return!1;for(var n={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var l=t.values(),f=!1,_=0;(a=l.next())&&!a.done;)!f&&!n[_]&&(f=r.equals(i.value,a.value,i.value,a.value,e,t,r))&&(n[_]=!0),_++;if(!f)return!1}return!0}function qn(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var In="[object Arguments]",$n="[object Boolean]",jn="[object Date]",Dn="[object Map]",Ln="[object Number]",Un="[object Object]",Mn="[object RegExp]",Vn="[object Set]",Fn="[object String]",Hn=Array.isArray,or=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,ir=Object.assign,Bn=Object.prototype.toString.call.bind(Object.prototype.toString);function Wn(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,l=e.areSetsEqual,f=e.areTypedArraysEqual;return function(u,s,h){if(u===s)return!0;if(u==null||s==null||typeof u!="object"||typeof s!="object")return u!==u&&s!==s;var c=u.constructor;if(c!==s.constructor)return!1;if(c===Object)return o(u,s,h);if(Hn(u))return t(u,s,h);if(or!=null&&or(u))return f(u,s,h);if(c===Date)return r(u,s,h);if(c===RegExp)return a(u,s,h);if(c===Map)return n(u,s,h);if(c===Set)return l(u,s,h);var d=Bn(u);return d===jn?r(u,s,h):d===Mn?a(u,s,h):d===Dn?n(u,s,h):d===Vn?l(u,s,h):d===Un?typeof u.then!="function"&&typeof s.then!="function"&&o(u,s,h):d===In?o(u,s,h):d===$n||d===Ln||d===Fn?i(u,s,h):!1}}function Gn(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,o={areArraysEqual:n?_e:On,areDatesEqual:Pn,areMapsEqual:n?Zt(rr,_e):rr,areObjectsEqual:n?_e:Rn,arePrimitiveWrappersEqual:Tn,areRegExpsEqual:Nn,areSetsEqual:n?Zt(nr,_e):nr,areTypedArraysEqual:n?_e:qn};if(r&&(o=ir({},o,r(o))),t){var i=qe(o.areArraysEqual),a=qe(o.areMapsEqual),l=qe(o.areObjectsEqual),f=qe(o.areSetsEqual);o=ir({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:l,areSetsEqual:f})}return o}function zn(e){return function(t,r,n,o,i,a,l){return e(t,r,l)}}function Yn(e){var t=e.circular,r=e.comparator,n=e.createState,o=e.equals,i=e.strict;if(n)return function(f,_){var u=n(),s=u.cache,h=s===void 0?t?new WeakMap:void 0:s,c=u.meta;return r(f,_,{cache:h,equals:o,meta:c,strict:i})};if(t)return function(f,_){return r(f,_,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(f,_){return r(f,_,a)}}var ur=V(),ki=V({strict:!0}),Ai=V({circular:!0}),Ci=V({circular:!0,strict:!0}),Oi=V({createInternalComparator:function(){return te}}),Pi=V({strict:!0,createInternalComparator:function(){return te}}),Ri=V({circular:!0,createInternalComparator:function(){return te}}),Ti=V({circular:!0,createInternalComparator:function(){return te},strict:!0});function V(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,l=Gn(e),f=Wn(l),_=n?n(f):zn(f);return Yn({circular:r,comparator:f,createState:o,equals:_,strict:a})}var Sr=Ir(xr());Event.prototype.propagationPath=function(){var t=function(){var r=this.target||null,n=[r];if(!r||!r.parentElement)return[];for(;r.parentElement;)r=r.parentElement,n.unshift(r);return n}.bind(this);return this.path||this.composedPath&&this.composedPath()||t()};var so=(e,t)=>e instanceof Object?t instanceof Object&&ur(e,t):!(t instanceof Object)&&e===t,ao=e=>{typeof window.queueMicrotask!="function"?Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t})):window.queueMicrotask(e)},kr=(e,t)=>{for(let r of t){if(r.path==="*")return{route:r,vars:!1};{let n=new Sr.default(r.path).match(e);if(n)return{route:r,vars:n}}}return null},uo=e=>{let t=n=>{if(!n.defaultPrevented&&!n.ctrlKey){for(let o of n.propagationPath())if(o.tagName==="A"){if(o.target.trim()!=="")return;if(o.origin===window.location.origin){let i=o.pathname+o.search+o.hash,a=kr(i,e.routes);if(a){n.preventDefault(),lo(i,!0,!0,a);return}}}}},r=[];for(let n in e.globals)r.push(O(e.globals[n],{key:n}));return O("div",{onClick:t},[...r,...e.children])},nt=class{constructor(t,r){this.ok=t,this.root=document.createElement("div"),document.body.appendChild(this.root),this.routes=r,this.routeInfo=null,window.addEventListener("popstate",n=>{this.handlePopState(n)})}resolvePagePosition(t){ao(()=>{requestAnimationFrame(()=>{let r=window.location.hash;if(r){let n=null;try{n=this.root.querySelector(r)||this.root.querySelector(`a[name="${r.slice(1)}"]`)}finally{}n?t&&n.scrollIntoView():console.warn(`${r} matches no element with an id and no link with a name`)}else t&&window.scrollTo(0,0)})})}handlePopState(t){let r=window.location.pathname+window.location.search+window.location.hash,n=t?.routeInfo||kr(r,this.routes);n&&((this.routeInfo===null||n.route.path!==this.routeInfo.route.path||!so(n.vars,this.routeInfo.vars))&&this.runRouteHandler(n),this.resolvePagePosition(!!t?.triggerJump)),this.routeInfo=n}runRouteHandler(t){let{route:r}=t;if(r.path==="*")r.handler();else{let{vars:n}=t;try{let o=r.mapping.map((i,a)=>{let l=n[i],f=r.decoders[a](l);if(f instanceof this.ok)return f._0;throw new DecodingError});r.handler.apply(null,o)}catch(o){if(o.constructor!==DecodingError)throw o}}}render(t,r){typeof t<"u"&&(se(O(uo,{routes:this.routes,globals:r},[O(t,{key:"$MAIN"})]),this.root),this.handlePopState())}addRoutes(t){this.routes=this.routes.concat(t)}},lo=(e,t=!0,r=!0,n=null)=>{let o=window.location.pathname,i=window.location.search,a=window.location.hash;if(o+i+a!==e&&(t?window.history.pushState({},"",e):window.history.replaceState({},"",e)),t){let f=new PopStateEvent("popstate");f.triggerJump=r,f.routeInfo=n,dispatchEvent(f)}},Wi=(e,t,r)=>{new nt(t,r).render(e)};var zi=e=>class{constructor(...t){if(Array.isArray(e))for(let r=0;r(...t)=>new e(...t);var Xi=e=>{let t=document.createElement("style");document.head.appendChild(t),t.innerHTML=e},Zi=e=>{let t={},r=(n,o)=>{t[n.toString().trim()]=o.toString().trim()};for(let n of e)if(typeof n=="string")n.split(";").forEach(o=>{let[i,a]=o.split(":");i&&a&&r(i,a)});else if(n instanceof Map)for(let[o,i]of n)r(o,i);else if(n instanceof Array)for(let[o,i]of n)r(o,i);else for(let o in n)r(o,n[o]);return t};var ts=q;export{T as Error,Yo as arrayAccess,Ht as batch,z as compare,fn as compareObjects,le as computed,O as createElement,Kr as createPortal,ti as createProvider,ci as decodeArray,li as decodeBoolean,Sn as decodeField,hi as decodeMap,fi as decodeMaybe,ui as decodeNumber,pi as decodeObject,si as decodeString,ai as decodeTime,_i as decodeTuple,di as decoder,Y as destructure,Q as effect,gi as encodeArray,wi as encodeMap,Ei as encodeMaybe,mi as encodeTime,bi as encodeTuple,xi as encoder,I as format,ts as fragment,Xt as identity,Xi as insertStyles,Ho as match,lo as navigate,Yi as newVariant,hn as normalizeEvent,Jo as or,Vo as pattern,Fo as patternRecord,Qe as patternSpread,_n as patternVariable,Wi as program,ue as signal,Zi as style,Xo as toArray,cn as useComputed,Ko as useDidUpdate,G as useEffect,ri as useProviders,Jt as useSignal,zi as variant}; +`,ai=(e,t)=>r=>typeof r!="string"?new t(new T(dn.replace("{value}",q(r)))):new e(r),ui=(e,t)=>r=>{let n=NaN;return typeof r=="number"?n=new Date(r):n=Date.parse(r),Number.isNaN(n)?new t(new T(yn.replace("{value}",q(r)))):new e(new Date(n))},li=(e,t)=>r=>{let n=parseFloat(r);return isNaN(n)?new t(new T(vn.replace("{value}",q(r)))):new e(n)},ci=(e,t)=>r=>typeof r!="boolean"?new t(new T(mn.replace("{value}",q(r)))):new e(r),Sn=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let o=gn.replace("{field}",e).replace("{value}",q(n));return new r(new T(o))}else{let o=n[e],i=t(o);return i instanceof r&&(i._0.push({type:"FIELD",value:e}),i._0.object=n),i}},fi=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(wn.replace("{value}",q(n))));let o=[],i=0;for(let a of n){let l=e(a);if(l instanceof r)return l._0.push({type:"ARRAY",value:i}),l._0.object=n,l;o.push(l._0),i++}return new t(o)},_i=(e,t,r,n,o)=>i=>{if(i==null||i==null)return new t(new o);{let a=e(i);return a instanceof r?a:new t(new n(a._0))}},hi=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(En.replace("{value}",q(n))));let o=[],i=0;for(let a of e){if(n[i]===void 0||n[i]===null)return new r(new T(bn.replace("{value}",q(n[i]))));{let l=a(n[i]);if(l instanceof r)return l._0.push({type:"ARRAY",value:i}),l._0.object=n,l;o.push(l._0)}i++}return new t(o)},pi=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let o=xn.replace("{value}",q(n));return new r(new T(o))}else{let o=[];for(let i in n){let a=e(n[i]);if(a instanceof r)return a;o.push([i,a._0])}return new t(o)}},di=e=>t=>new e(t),yi=(e,t,r)=>n=>{let o={};for(let i in r){let a=r[i];Array.isArray(a)&&(a=r[i][0],i=r[i][1]);let l=Sn(i,a,t)(n);if(l instanceof t)return l;o[i]=l._0}return new e(o)};var gi=e=>e.toISOString(),wi=e=>t=>t.map(r=>e?e(r):r),Ei=e=>t=>{let r={};for(let n of t)r[n[0]]=e?e(n[1]):n[1];return r},bi=(e,t)=>r=>r instanceof t?e?e(r._0):r._0:null,xi=e=>t=>t.map((r,n)=>{let o=e[n];return o?o(r):r}),Si=e=>t=>{let r={};for(let n in e){let o=e[n],i=n;Array.isArray(o)&&(o=e[n][0],i=e[n][1]),r[i]=(o||Xt)(t[n])}return r};var kn=Object.getOwnPropertyNames,An=Object.getOwnPropertySymbols,Cn=Object.prototype.hasOwnProperty;function Zt(e,t){return function(n,o,i){return e(n,o,i)&&t(n,o,i)}}function qe(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);var i=o.cache,a=i.get(r),l=i.get(n);if(a&&l)return a===n&&l===r;i.set(r,n),i.set(n,r);var f=e(r,n,o);return i.delete(r),i.delete(n),f}}function Qt(e){return kn(e).concat(An(e))}var sr=Object.hasOwn||function(e,t){return Cn.call(e,t)};function te(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var ar="_owner",er=Object.getOwnPropertyDescriptor,tr=Object.keys;function On(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Pn(e,t){return te(e.getTime(),t.getTime())}function rr(e,t,r){if(e.size!==t.size)return!1;for(var n={},o=e.entries(),i=0,a,l;(a=o.next())&&!a.done;){for(var f=t.entries(),_=!1,u=0;(l=f.next())&&!l.done;){var s=a.value,h=s[0],c=s[1],d=l.value,y=d[0],m=d[1];!_&&!n[u]&&(_=r.equals(h,y,i,u,e,t,r)&&r.equals(c,m,h,y,e,t,r))&&(n[u]=!0),u++}if(!_)return!1;i++}return!0}function Rn(e,t,r){var n=tr(e),o=n.length;if(tr(t).length!==o)return!1;for(var i;o-- >0;)if(i=n[o],i===ar&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sr(t,i)||!r.equals(e[i],t[i],i,i,e,t,r))return!1;return!0}function _e(e,t,r){var n=Qt(e),o=n.length;if(Qt(t).length!==o)return!1;for(var i,a,l;o-- >0;)if(i=n[o],i===ar&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sr(t,i)||!r.equals(e[i],t[i],i,i,e,t,r)||(a=er(e,i),l=er(t,i),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function Tn(e,t){return te(e.valueOf(),t.valueOf())}function Nn(e,t){return e.source===t.source&&e.flags===t.flags}function nr(e,t,r){if(e.size!==t.size)return!1;for(var n={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var l=t.values(),f=!1,_=0;(a=l.next())&&!a.done;)!f&&!n[_]&&(f=r.equals(i.value,a.value,i.value,a.value,e,t,r))&&(n[_]=!0),_++;if(!f)return!1}return!0}function qn(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var In="[object Arguments]",$n="[object Boolean]",jn="[object Date]",Dn="[object Map]",Ln="[object Number]",Un="[object Object]",Mn="[object RegExp]",Vn="[object Set]",Fn="[object String]",Hn=Array.isArray,or=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,ir=Object.assign,Bn=Object.prototype.toString.call.bind(Object.prototype.toString);function Wn(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,l=e.areSetsEqual,f=e.areTypedArraysEqual;return function(u,s,h){if(u===s)return!0;if(u==null||s==null||typeof u!="object"||typeof s!="object")return u!==u&&s!==s;var c=u.constructor;if(c!==s.constructor)return!1;if(c===Object)return o(u,s,h);if(Hn(u))return t(u,s,h);if(or!=null&&or(u))return f(u,s,h);if(c===Date)return r(u,s,h);if(c===RegExp)return a(u,s,h);if(c===Map)return n(u,s,h);if(c===Set)return l(u,s,h);var d=Bn(u);return d===jn?r(u,s,h):d===Mn?a(u,s,h):d===Dn?n(u,s,h):d===Vn?l(u,s,h):d===Un?typeof u.then!="function"&&typeof s.then!="function"&&o(u,s,h):d===In?o(u,s,h):d===$n||d===Ln||d===Fn?i(u,s,h):!1}}function Gn(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,o={areArraysEqual:n?_e:On,areDatesEqual:Pn,areMapsEqual:n?Zt(rr,_e):rr,areObjectsEqual:n?_e:Rn,arePrimitiveWrappersEqual:Tn,areRegExpsEqual:Nn,areSetsEqual:n?Zt(nr,_e):nr,areTypedArraysEqual:n?_e:qn};if(r&&(o=ir({},o,r(o))),t){var i=qe(o.areArraysEqual),a=qe(o.areMapsEqual),l=qe(o.areObjectsEqual),f=qe(o.areSetsEqual);o=ir({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:l,areSetsEqual:f})}return o}function zn(e){return function(t,r,n,o,i,a,l){return e(t,r,l)}}function Yn(e){var t=e.circular,r=e.comparator,n=e.createState,o=e.equals,i=e.strict;if(n)return function(f,_){var u=n(),s=u.cache,h=s===void 0?t?new WeakMap:void 0:s,c=u.meta;return r(f,_,{cache:h,equals:o,meta:c,strict:i})};if(t)return function(f,_){return r(f,_,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(f,_){return r(f,_,a)}}var ur=V(),Ai=V({strict:!0}),Ci=V({circular:!0}),Oi=V({circular:!0,strict:!0}),Pi=V({createInternalComparator:function(){return te}}),Ri=V({strict:!0,createInternalComparator:function(){return te}}),Ti=V({circular:!0,createInternalComparator:function(){return te}}),Ni=V({circular:!0,createInternalComparator:function(){return te},strict:!0});function V(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,l=Gn(e),f=Wn(l),_=n?n(f):zn(f);return Yn({circular:r,comparator:f,createState:o,equals:_,strict:a})}var Sr=Ir(xr());Event.prototype.propagationPath=function(){var t=function(){var r=this.target||null,n=[r];if(!r||!r.parentElement)return[];for(;r.parentElement;)r=r.parentElement,n.unshift(r);return n}.bind(this);return this.path||this.composedPath&&this.composedPath()||t()};var so=(e,t)=>e instanceof Object?t instanceof Object&&ur(e,t):!(t instanceof Object)&&e===t,ao=e=>{typeof window.queueMicrotask!="function"?Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t})):window.queueMicrotask(e)},kr=(e,t)=>{for(let r of t){if(r.path==="*")return{route:r,vars:!1};{let n=new Sr.default(r.path).match(e);if(n)return{route:r,vars:n}}}return null},uo=e=>{let t=n=>{if(!n.defaultPrevented&&!n.ctrlKey){for(let o of n.propagationPath())if(o.tagName==="A"){if(o.target.trim()!=="")return;if(o.origin===window.location.origin){let i=o.pathname+o.search+o.hash,a=kr(i,e.routes);if(a){n.preventDefault(),lo(i,!0,!0,a);return}}}}},r=[];for(let n in e.globals)r.push(O(e.globals[n],{key:n}));return O("div",{onClick:t},[...r,...e.children])},nt=class{constructor(t,r){this.ok=t,this.root=document.createElement("div"),document.body.appendChild(this.root),this.routes=r,this.routeInfo=null,window.addEventListener("popstate",n=>{this.handlePopState(n)})}resolvePagePosition(t){ao(()=>{requestAnimationFrame(()=>{let r=window.location.hash;if(r){let n=null;try{n=this.root.querySelector(r)||this.root.querySelector(`a[name="${r.slice(1)}"]`)}finally{}n?t&&n.scrollIntoView():console.warn(`${r} matches no element with an id and no link with a name`)}else t&&window.scrollTo(0,0)})})}handlePopState(t){let r=window.location.pathname+window.location.search+window.location.hash,n=t?.routeInfo||kr(r,this.routes);n&&((this.routeInfo===null||n.route.path!==this.routeInfo.route.path||!so(n.vars,this.routeInfo.vars))&&this.runRouteHandler(n),this.resolvePagePosition(!!t?.triggerJump)),this.routeInfo=n}runRouteHandler(t){let{route:r}=t;if(r.path==="*")r.handler();else{let{vars:n}=t;try{let o=r.mapping.map((i,a)=>{let l=n[i],f=r.decoders[a](l);if(f instanceof this.ok)return f._0;throw new DecodingError});r.handler.apply(null,o)}catch(o){if(o.constructor!==DecodingError)throw o}}}render(t,r){typeof t<"u"&&(se(O(uo,{routes:this.routes,globals:r},[O(t,{key:"$MAIN"})]),this.root),this.handlePopState())}addRoutes(t){this.routes=this.routes.concat(t)}},lo=(e,t=!0,r=!0,n=null)=>{let o=window.location.pathname,i=window.location.search,a=window.location.hash;if(o+i+a!==e&&(t?window.history.pushState({},"",e):window.history.replaceState({},"",e)),t){let f=new PopStateEvent("popstate");f.triggerJump=r,f.routeInfo=n,dispatchEvent(f)}},Gi=(e,t,r)=>{new nt(t,r).render(e)};var Yi=e=>class{constructor(...t){if(Array.isArray(e))for(let r=0;r(...t)=>new e(...t);var Zi=e=>{let t=document.createElement("style");document.head.appendChild(t),t.innerHTML=e},Qi=e=>{let t={},r=(n,o)=>{t[n.toString().trim()]=o.toString().trim()};for(let n of e)if(typeof n=="string")n.split(";").forEach(o=>{let[i,a]=o.split(":");i&&a&&r(i,a)});else if(n instanceof Map)for(let[o,i]of n)r(o,i);else if(n instanceof Array)for(let[o,i]of n)r(o,i);else for(let o in n)r(o,n[o]);return t};export{T as Error,Zo as access,Yo as arrayAccess,Ht as batch,z as compare,fn as compareObjects,le as computed,O as createElement,Kr as createPortal,ri as createProvider,fi as decodeArray,ci as decodeBoolean,Sn as decodeField,pi as decodeMap,_i as decodeMaybe,li as decodeNumber,di as decodeObject,ai as decodeString,ui as decodeTime,hi as decodeTuple,yi as decoder,Y as destructure,Q as effect,wi as encodeArray,Ei as encodeMap,bi as encodeMaybe,gi as encodeTime,xi as encodeTuple,Si as encoder,q as format,$ as fragment,Xt as identity,Zi as insertStyles,Ho as match,lo as navigate,Ki as newVariant,hn as normalizeEvent,Jo as or,Vo as pattern,Fo as patternRecord,Qe as patternSpread,_n as patternVariable,Gi as program,ue as signal,Qi as style,Xo as toArray,cn as useComputed,Ko as useDidUpdate,G as useEffect,ni as useProviders,Jt as useSignal,Yi as variant}; diff --git a/src/assets/runtime_test.js b/src/assets/runtime_test.js index dbb9cd6a..330cde8a 100644 --- a/src/assets/runtime_test.js +++ b/src/assets/runtime_test.js @@ -1,11 +1,11 @@ -var Rr=Object.create;var at=Object.defineProperty;var Tr=Object.getOwnPropertyDescriptor;var Nr=Object.getOwnPropertyNames;var qr=Object.getPrototypeOf,Ir=Object.prototype.hasOwnProperty;var ut=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Dr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nr(t))!Ir.call(e,i)&&i!==r&&at(e,i,{get:()=>t[i],enumerable:!(n=Tr(t,i))||n.enumerable});return e};var $r=(e,t,r)=>(r=e!=null?Rr(qr(e)):{},Dr(t||!e||!e.__esModule?at(r,"default",{value:e,enumerable:!0}):r,e));var fr=L(pe=>{var De=function(){var e=function(_,u,s,h){for(s=s||{},h=_.length;h--;s[_[h]]=u);return s},t=[1,9],r=[1,10],n=[1,11],i=[1,12],o=[5,11,12,13,14,15],a={trace:function(){},yy:{},symbols_:{error:2,root:3,expressions:4,EOF:5,expression:6,optional:7,literal:8,splat:9,param:10,"(":11,")":12,LITERAL:13,SPLAT:14,PARAM:15,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",11:"(",12:")",13:"LITERAL",14:"SPLAT",15:"PARAM"},productions_:[0,[3,2],[3,1],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[7,3],[8,1],[9,1],[10,1]],performAction:function(u,s,h,c,d,y,m){var v=y.length-1;switch(d){case 1:return new c.Root({},[y[v-1]]);case 2:return new c.Root({},[new c.Literal({value:""})]);case 3:this.$=new c.Concat({},[y[v-1],y[v]]);break;case 4:case 5:this.$=y[v];break;case 6:this.$=new c.Literal({value:y[v]});break;case 7:this.$=new c.Splat({name:y[v]});break;case 8:this.$=new c.Param({name:y[v]});break;case 9:this.$=new c.Optional({},[y[v-1]]);break;case 10:this.$=u;break;case 11:case 12:this.$=u.slice(1);break}},table:[{3:1,4:2,5:[1,3],6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:i},{1:[3]},{5:[1,13],6:14,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:i},{1:[2,2]},e(o,[2,4]),e(o,[2,5]),e(o,[2,6]),e(o,[2,7]),e(o,[2,8]),{4:15,6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:i},e(o,[2,10]),e(o,[2,11]),e(o,[2,12]),{1:[2,1]},e(o,[2,3]),{6:14,7:5,8:6,9:7,10:8,11:t,12:[1,16],13:r,14:n,15:i},e(o,[2,9])],defaultActions:{3:[2,2],13:[2,1]},parseError:function(u,s){if(s.recoverable)this.trace(u);else{let c=function(d,y){this.message=d,this.hash=y};var h=c;throw c.prototype=Error,new c(u,s)}},parse:function(u){var s=this,h=[0],c=[],d=[null],y=[],m=this.table,v="",w=0,R=0,H=0,B=2,ie=1,K=y.slice.call(arguments,1),E=Object.create(this.lexer),b={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(b.yy[j]=this.yy[j]);E.setInput(u,b.yy),b.yy.lexer=E,b.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var $e=E.yylloc;y.push($e);var Or=E.options&&E.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _i(N){h.length=h.length-2*N,d.length=d.length-N,y.length=y.length-N}for(var Pr=function(){var N;return N=E.lex()||ie,typeof N!="number"&&(N=s.symbols_[N]||N),N},S,je,W,P,hi,Le,J={},ye,D,st,ve;;){if(W=h[h.length-1],this.defaultActions[W]?P=this.defaultActions[W]:((S===null||typeof S>"u")&&(S=Pr()),P=m[W]&&m[W][S]),typeof P>"u"||!P.length||!P[0]){var Ue="";ve=[];for(ye in m[W])this.terminals_[ye]&&ye>B&&ve.push("'"+this.terminals_[ye]+"'");E.showPosition?Ue="Parse error on line "+(w+1)+`: +var Rr=Object.create;var at=Object.defineProperty;var Tr=Object.getOwnPropertyDescriptor;var Nr=Object.getOwnPropertyNames;var qr=Object.getPrototypeOf,Ir=Object.prototype.hasOwnProperty;var ut=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Dr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nr(t))!Ir.call(e,i)&&i!==r&&at(e,i,{get:()=>t[i],enumerable:!(n=Tr(t,i))||n.enumerable});return e};var $r=(e,t,r)=>(r=e!=null?Rr(qr(e)):{},Dr(t||!e||!e.__esModule?at(r,"default",{value:e,enumerable:!0}):r,e));var fr=L(pe=>{var De=function(){var e=function(_,u,s,h){for(s=s||{},h=_.length;h--;s[_[h]]=u);return s},t=[1,9],r=[1,10],n=[1,11],i=[1,12],o=[5,11,12,13,14,15],a={trace:function(){},yy:{},symbols_:{error:2,root:3,expressions:4,EOF:5,expression:6,optional:7,literal:8,splat:9,param:10,"(":11,")":12,LITERAL:13,SPLAT:14,PARAM:15,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",11:"(",12:")",13:"LITERAL",14:"SPLAT",15:"PARAM"},productions_:[0,[3,2],[3,1],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[7,3],[8,1],[9,1],[10,1]],performAction:function(u,s,h,c,d,y,m){var v=y.length-1;switch(d){case 1:return new c.Root({},[y[v-1]]);case 2:return new c.Root({},[new c.Literal({value:""})]);case 3:this.$=new c.Concat({},[y[v-1],y[v]]);break;case 4:case 5:this.$=y[v];break;case 6:this.$=new c.Literal({value:y[v]});break;case 7:this.$=new c.Splat({name:y[v]});break;case 8:this.$=new c.Param({name:y[v]});break;case 9:this.$=new c.Optional({},[y[v-1]]);break;case 10:this.$=u;break;case 11:case 12:this.$=u.slice(1);break}},table:[{3:1,4:2,5:[1,3],6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:i},{1:[3]},{5:[1,13],6:14,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:i},{1:[2,2]},e(o,[2,4]),e(o,[2,5]),e(o,[2,6]),e(o,[2,7]),e(o,[2,8]),{4:15,6:4,7:5,8:6,9:7,10:8,11:t,13:r,14:n,15:i},e(o,[2,10]),e(o,[2,11]),e(o,[2,12]),{1:[2,1]},e(o,[2,3]),{6:14,7:5,8:6,9:7,10:8,11:t,12:[1,16],13:r,14:n,15:i},e(o,[2,9])],defaultActions:{3:[2,2],13:[2,1]},parseError:function(u,s){if(s.recoverable)this.trace(u);else{let c=function(d,y){this.message=d,this.hash=y};var h=c;throw c.prototype=Error,new c(u,s)}},parse:function(u){var s=this,h=[0],c=[],d=[null],y=[],m=this.table,v="",w=0,R=0,H=0,B=2,ie=1,K=y.slice.call(arguments,1),E=Object.create(this.lexer),b={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(b.yy[j]=this.yy[j]);E.setInput(u,b.yy),b.yy.lexer=E,b.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var $e=E.yylloc;y.push($e);var Or=E.options&&E.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _i(N){h.length=h.length-2*N,d.length=d.length-N,y.length=y.length-N}for(var Pr=function(){var N;return N=E.lex()||ie,typeof N!="number"&&(N=s.symbols_[N]||N),N},S,je,W,P,hi,Le,J={},ye,I,st,ve;;){if(W=h[h.length-1],this.defaultActions[W]?P=this.defaultActions[W]:((S===null||typeof S>"u")&&(S=Pr()),P=m[W]&&m[W][S]),typeof P>"u"||!P.length||!P[0]){var Ue="";ve=[];for(ye in m[W])this.terminals_[ye]&&ye>B&&ve.push("'"+this.terminals_[ye]+"'");E.showPosition?Ue="Parse error on line "+(w+1)+`: `+E.showPosition()+` -Expecting `+ve.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Ue="Parse error on line "+(w+1)+": Unexpected "+(S==ie?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Ue,{text:E.match,token:this.terminals_[S]||S,line:E.yylineno,loc:$e,expected:ve})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+S);switch(P[0]){case 1:h.push(S),d.push(E.yytext),y.push(E.yylloc),h.push(P[1]),S=null,je?(S=je,je=null):(R=E.yyleng,v=E.yytext,w=E.yylineno,$e=E.yylloc,H>0&&H--);break;case 2:if(D=this.productions_[P[1]][1],J.$=d[d.length-D],J._$={first_line:y[y.length-(D||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(D||1)].first_column,last_column:y[y.length-1].last_column},Or&&(J._$.range=[y[y.length-(D||1)].range[0],y[y.length-1].range[1]]),Le=this.performAction.apply(J,[v,R,w,b.yy,P[1],d,y].concat(K)),typeof Le<"u")return Le;D&&(h=h.slice(0,-1*D*2),d=d.slice(0,-1*D),y=y.slice(0,-1*D)),h.push(this.productions_[P[1]][0]),d.push(J.$),y.push(J._$),st=m[h[h.length-2]][h[h.length-1]],h.push(st);break;case 3:return!0}}return!0}},l=function(){var _={EOF:1,parseError:function(s,h){if(this.yy.parser)this.yy.parser.parseError(s,h);else throw new Error(s)},setInput:function(u,s){return this.yy=s||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var s=u.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var s=u.length,h=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===c.length?this.yylloc.first_column:0)+c[c.length-h.length].length-h[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+ve.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Ue="Parse error on line "+(w+1)+": Unexpected "+(S==ie?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Ue,{text:E.match,token:this.terminals_[S]||S,line:E.yylineno,loc:$e,expected:ve})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+S);switch(P[0]){case 1:h.push(S),d.push(E.yytext),y.push(E.yylloc),h.push(P[1]),S=null,je?(S=je,je=null):(R=E.yyleng,v=E.yytext,w=E.yylineno,$e=E.yylloc,H>0&&H--);break;case 2:if(I=this.productions_[P[1]][1],J.$=d[d.length-I],J._$={first_line:y[y.length-(I||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(I||1)].first_column,last_column:y[y.length-1].last_column},Or&&(J._$.range=[y[y.length-(I||1)].range[0],y[y.length-1].range[1]]),Le=this.performAction.apply(J,[v,R,w,b.yy,P[1],d,y].concat(K)),typeof Le<"u")return Le;I&&(h=h.slice(0,-1*I*2),d=d.slice(0,-1*I),y=y.slice(0,-1*I)),h.push(this.productions_[P[1]][0]),d.push(J.$),y.push(J._$),st=m[h[h.length-2]][h[h.length-1]],h.push(st);break;case 3:return!0}}return!0}},l=function(){var _={EOF:1,parseError:function(s,h){if(this.yy.parser)this.yy.parser.parseError(s,h);else throw new Error(s)},setInput:function(u,s){return this.yy=s||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var s=u.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var s=u.length,h=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===c.length?this.yylloc.first_column:0)+c[c.length-h.length].length-h[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var u=this.pastInput(),s=new Array(u.length+1).join("-");return u+this.upcomingInput()+` `+s+"^"},test_match:function(u,s){var h,c,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),c=u[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],h=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var y in d)this[y]=d[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,s,h,c;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),y=0;ys[0].length)){if(s=h,c=y,this.options.backtrack_lexer){if(u=this.test_match(h,d[y]),u!==!1)return u;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(u=this.test_match(s,d[c]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,h,c,d){var y=d;switch(c){case 0:return"(";case 1:return")";case 2:return"SPLAT";case 3:return"PARAM";case 4:return"LITERAL";case 5:return"LITERAL";case 6:return"EOF"}},rules:[/^(?:\()/,/^(?:\))/,/^(?:\*+\w+)/,/^(?::+\w+)/,/^(?:[\w%\-~\n]+)/,/^(?:.)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return _}();a.lexer=l;function f(){this.yy={}}return f.prototype=a,a.Parser=f,new f}();typeof ut<"u"&&typeof pe<"u"&&(pe.parser=De,pe.Parser=De.Parser,pe.parse=function(){return De.parse.apply(De,arguments)})});var nt=L((Fo,_r)=>{"use strict";function ne(e){return function(t,r){return{displayName:e,props:t,children:r||[]}}}_r.exports={Root:ne("Root"),Concat:ne("Concat"),Literal:ne("Literal"),Splat:ne("Splat"),Param:ne("Param"),Optional:ne("Optional")}});var dr=L((Ho,pr)=>{"use strict";var hr=fr().parser;hr.yy=nt();pr.exports=hr});var it=L((Bo,yr)=>{"use strict";var Xn=Object.keys(nt());function Zn(e){return Xn.forEach(function(t){if(typeof e[t]>"u")throw new Error("No handler defined for "+t.displayName)}),{visit:function(t,r){return this.handlers[t.displayName].call(this,t,r)},handlers:e}}yr.exports=Zn});var gr=L((Wo,mr)=>{"use strict";var Qn=it(),ei=/[\-{}\[\]+?.,\\\^$|#\s]/g;function vr(e){this.captures=e.captures,this.re=e.re}vr.prototype.match=function(e){var t=this.re.exec(e),r={};return t?(this.captures.forEach(function(n,i){typeof t[i+1]>"u"?r[n]=void 0:r[n]=decodeURIComponent(t[i+1])}),r):!1};var ti=Qn({Concat:function(e){return e.children.reduce(function(t,r){var n=this.visit(r);return{re:t.re+n.re,captures:t.captures.concat(n.captures)}}.bind(this),{re:"",captures:[]})},Literal:function(e){return{re:e.props.value.replace(ei,"\\$&"),captures:[]}},Splat:function(e){return{re:"([^?#]*?)",captures:[e.props.name]}},Param:function(e){return{re:"([^\\/\\?#]+)",captures:[e.props.name]}},Optional:function(e){var t=this.visit(e.children[0]);return{re:"(?:"+t.re+")?",captures:t.captures}},Root:function(e){var t=this.visit(e.children[0]);return new vr({re:new RegExp("^"+t.re+"(?=\\?|#|$)"),captures:t.captures})}});mr.exports=ti});var Er=L((Go,wr)=>{"use strict";var ri=it(),ni=ri({Concat:function(e,t){var r=e.children.map(function(n){return this.visit(n,t)}.bind(this));return r.some(function(n){return n===!1})?!1:r.join("")},Literal:function(e){return decodeURI(e.props.value)},Splat:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Param:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Optional:function(e,t){var r=this.visit(e.children[0],t);return r||""},Root:function(e,t){t=t||{};var r=this.visit(e.children[0],t);return r===!1||typeof r>"u"?!1:encodeURI(r)}});wr.exports=ni});var xr=L((zo,br)=>{"use strict";var ii=dr(),oi=gr(),si=Er();function de(e){var t;if(this?t=this:t=Object.create(de.prototype),typeof e>"u")throw new Error("A route spec is required");return t.spec=e,t.ast=ii.parse(e),t}de.prototype=Object.create(null);de.prototype.match=function(e){var t=oi.visit(this.ast),r=t.match(e);return r!==null?r:!1};de.prototype.reverse=function(e){return si.visit(this.ast,e)};br.exports=de});var kr=L((Yo,Sr)=>{"use strict";var ai=xr();Sr.exports=ai});var Ee,p,pt,Fe,G,lt,dt,Me,jr,oe={},yt=[],Lr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,be=Array.isArray;function U(e,t){for(var r in t)e[r]=t[r];return e}function vt(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Ee.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return ge(e,a,n,i,null)}function ge(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++pt,__i:-1,__u:0};return i==null&&p.vnode!=null&&p.vnode(o),o}function q(e){return e.children}function C(e,t){this.props=e,this.context=t}function X(e,t){if(t==null)return e.__?X(e.__,e.__i+1):null;for(var r;tt&&G.sort(Me));we.__r=0}function gt(e,t,r,n,i,o,a,l,f,_,u){var s,h,c,d,y,m=n&&n.__k||yt,v=t.length;for(r.__d=f,Ur(r,t,m),f=r.__d,s=0;s0?ge(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,l=Mr(i,r,a=n+s,u),i.__i=l,o=null,l!==-1&&(u--,(o=r[l])&&(o.__u|=131072)),o==null||o.__v===null?(l==-1&&s--,typeof i.type!="function"&&(i.__u|=65536)):l!==a&&(l===a+1?s++:l>a?u>f-a?s+=l-a:s--:s=l(f!=null&&!(131072&f.__u)?1:0))for(;a>=0||l=0){if((f=t[a])&&!(131072&f.__u)&&i==f.key&&o===f.type)return a;a--}if(le===void 0&&t===void 0||e===null&&t===null?!0:e!=null&&e!=null&&e[k]?e[k](t):t!=null&&t!=null&&t[k]?t[k](e):Hr(e,t),Hr=(e,t)=>{if(e instanceof Object&&t instanceof Object){let r=new Set(Object.keys(e).concat(Object.keys(t)));for(let n of r)if(!$(e[n],t[n]))return!1;return!0}else return e===t};var ae=class{constructor(t,r){this.teardown=r,this.subject=t,this.steps=[]}async run(){let t;try{t=await new Promise(this.next.bind(this))}finally{this.teardown&&this.teardown()}return t}async next(t,r){requestAnimationFrame(async()=>{let n=this.steps.shift();if(n)try{this.subject=await n(this.subject)}catch(i){return r(i)}this.steps.length?this.next(t,r):t(this.subject)})}step(t){return this.steps.push(t),this}},We=class{constructor(t,r,n){this.socket=new WebSocket(r),this.suites=t,this.url=r,this.id=n,window.DEBUG={log:o=>{let a="";o===void 0?a="undefined":o===null?a="null":a=o.toString(),this.log(a)}};let i=null;window.onerror=o=>{this.socket.readyState===1?this.crash(o):i=i||o},this.socket.onopen=()=>{i!=null&&this.crash(i)},this.start()}start(){this.socket.readyState===1?this.run():this.socket.addEventListener("open",()=>this.run())}run(){return new Promise((t,r)=>{this.next(t,r)}).catch(t=>this.log(t.reason)).finally(()=>this.socket.send("DONE"))}report(t,r,n,i,o){i&&i.toString&&(i=i.toString()),this.socket.send(JSON.stringify({location:o,result:i,suite:r,id:this.id,type:t,name:n}))}reportTested(t,r,n){this.report(r,this.suite.name,t.name,n,t.location)}crash(t){this.report("CRASHED",null,null,t)}log(t){this.report("LOG",null,null,t)}next(t,r){requestAnimationFrame(async()=>{if(!this.suite||this.suite.tests.length===0)if(this.suite=this.suites.shift(),this.suite)this.report("SUITE",this.suite.name);else return t();let n=window.history.length,i=this.suite.tests.shift();try{let o=await i.proc.call(this.suite.context);if(window.history.length-n&&window.history.go(-(window.history.length-n)),sessionStorage.clear(),localStorage.clear(),o instanceof ae)try{await o.run(),this.reportTested(i,"SUCCEEDED",o.subject)}catch(a){this.reportTested(i,"FAILED",a)}else o?this.reportTested(i,"SUCCEEDED"):this.reportTested(i,"FAILED")}catch(o){this.reportTested(i,"ERRORED",o)}this.next(t,r)})}},mi=(e,t,r)=>new ae(e).step(n=>{let i=$(n,t);if(r==="=="&&(i=!i),i)throw`Assertion failed: ${t} ${r} ${n}`;return!0}),gi=ae,wi=We;var ke,A,Ge,bt,ze=0,Pt=[],xe=[],xt=p.__b,St=p.__r,kt=p.diffed,At=p.__c,Ct=p.unmount;function Rt(e,t){p.__h&&p.__h(A,e,ze||t),ze=0;var r=A.__H||(A.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:xe}),r.__[e]}function z(e,t){var r=Rt(ke++,3);!p.__s&&Tt(r.__H,t)&&(r.__=e,r.i=t,A.__H.__h.push(r))}function Ke(e){return ze=5,Q(function(){return{current:e}},[])}function Q(e,t){var r=Rt(ke++,7);return Tt(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Br(){for(var e;e=Pt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Se),e.__H.__h.forEach(Ye),e.__H.__h=[]}catch(t){e.__H.__h=[],p.__e(t,e.__v)}}p.__b=function(e){A=null,xt&&xt(e)},p.__r=function(e){St&&St(e),ke=0;var t=(A=e.__c).__H;t&&(Ge===A?(t.__h=[],A.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=xe,r.__N=r.i=void 0})):(t.__h.forEach(Se),t.__h.forEach(Ye),t.__h=[],ke=0)),Ge=A},p.diffed=function(e){kt&&kt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Pt.push(t)!==1&&bt===p.requestAnimationFrame||((bt=p.requestAnimationFrame)||Wr)(Br)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==xe&&(r.__=r.__V),r.i=void 0,r.__V=xe})),Ge=A=null},p.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Se),r.__h=r.__h.filter(function(n){return!n.__||Ye(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],p.__e(n,r.__v)}}),At&&At(e,t)},p.unmount=function(e){Ct&&Ct(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Se(n)}catch(i){t=i}}),r.__H=void 0,t&&p.__e(t,r.__v))};var Ot=typeof requestAnimationFrame=="function";function Wr(e){var t,r=function(){clearTimeout(n),Ot&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Ot&&(t=requestAnimationFrame(r))}function Se(e){var t=A,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),A=t}function Ye(e){var t=A;e.__c=e.__(),A=t}function Tt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Yr(e,t){for(var r in t)e[r]=t[r];return e}function Nt(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function qt(e){this.props=e}(qt.prototype=new C).isPureReactComponent=!0,qt.prototype.shouldComponentUpdate=function(e,t){return Nt(this.props,e)||Nt(this.state,t)};var It=p.__b;p.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),It&&It(e)};var $i=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Kr=p.__e;p.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Kr(e,t,r,n)};var Dt=p.unmount;function Vt(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Yr({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Vt(n,t,r)})),e}function Ft(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Ft(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Je(){this.__u=0,this.t=null,this.__b=null}function Ht(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ae(){this.u=null,this.o=null}p.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Dt&&Dt(e)},(Je.prototype=new C).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Ht(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(l):l())};r.__R=a;var l=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=Ft(f,f.__c.__P,f.__c.__O)}var _;for(n.setState({__a:n.__b=null});_=n.t.pop();)_.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},Je.prototype.componentWillUnmount=function(){this.t=[]},Je.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Vt(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&O(q,null,e.fallback);return i&&(i.__u&=-33),[O(q,null,t.__a?null:e.children),i]};var $t=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(n)}}),Z(O(Jr,{context:t.context},e.__v),t.l)}function Zr(e,t){var r=O(Xr,{__v:e,i:t});return r.containerInfo=t,r}(Ae.prototype=new C).__a=function(e){var t=this,r=Ht(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),$t(t,e,n)):i()};r?r(o):o()}},Ae.prototype.render=function(e){this.u=null,this.o=new Map;var t=se(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Ae.prototype.componentDidUpdate=Ae.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){$t(e,r,t)})};var Qr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,en=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,rn=/[A-Z0-9]/g,nn=typeof document<"u",on=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var jt=p.event;function sn(){}function an(){return this.cancelBubble}function un(){return this.defaultPrevented}p.event=function(e){return jt&&(e=jt(e)),e.persist=sn,e.isPropagationStopped=an,e.isDefaultPrevented=un,e.nativeEvent=e};var Bt,ln={enumerable:!1,configurable:!0,get:function(){return this.class}},Lt=p.vnode;p.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var a=r[o];if(!(o==="value"&&"defaultValue"in r&&a==null||nn&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var l=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&a===!0?a="":l==="ondoubleclick"?o="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||on(r.type)?l==="onfocus"?o="onfocusin":l==="onblur"?o="onfocusout":tn.test(o)?o=l:n.indexOf("-")===-1&&en.test(o)?o=o.replace(rn,"-$&").toLowerCase():a===null&&(a=void 0):l=o="oninput",l==="oninput"&&i[o=l]&&(o="oninputCapture"),i[o]=a}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=se(r.children).forEach(function(f){f.props.selected=i.value.indexOf(f.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=se(r.children).forEach(function(f){f.props.selected=i.multiple?i.defaultValue.indexOf(f.props.value)!=-1:i.defaultValue==f.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",ln)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Qr,Lt&&Lt(e)};var Ut=p.__r;p.__r=function(e){Ut&&Ut(e),Bt=e.__c};var Mt=p.diffed;p.diffed=function(e){Mt&&Mt(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Bt=null};function Oe(){throw new Error("Cycle detected")}var cn=Symbol.for("preact-signals");function Pe(){if(M>1)M--;else{for(var e,t=!1;ue!==void 0;){var r=ue;for(ue=void 0,Ze++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&zt(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Ze=0,M--,t)throw e}}function Wt(e){if(M>0)return e();M++;try{return e()}finally{Pe()}}var g=void 0,Xe=0;function Re(e){if(Xe>0)return e();var t=g;g=void 0,Xe++;try{return e()}finally{Xe--,g=t}}var ue=void 0,M=0,Ze=0,Ce=0;function Gt(e){if(g!==void 0){var t=e.n;if(t===void 0||t.t!==g)return t={i:0,S:e,p:g.s,n:void 0,t:g,e:void 0,x:void 0,r:t},g.s!==void 0&&(g.s.n=t),g.s=t,e.n=t,32&g.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=g.s,t.n=void 0,g.s.n=t,g.s=t),t}}function x(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}x.prototype.brand=cn;x.prototype.h=function(){return!0};x.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};x.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};x.prototype.subscribe=function(e){var t=this;return ee(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})};x.prototype.valueOf=function(){return this.value};x.prototype.toString=function(){return this.value+""};x.prototype.toJSON=function(){return this.value};x.prototype.peek=function(){return this.v};Object.defineProperty(x.prototype,"value",{get:function(){var e=Gt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(g instanceof V&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Ze>100&&Oe(),this.v=e,this.i++,Ce++,M++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Pe()}}}});function le(e){return new x(e)}function zt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Yt(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Kt(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function V(e){x.call(this,void 0),this.x=e,this.s=void 0,this.g=Ce-1,this.f=4}(V.prototype=new x).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ce))return!0;if(this.g=Ce,this.f|=1,this.i>0&&!zt(this))return this.f&=-2,!0;var e=g;try{Yt(this),g=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return g=e,Kt(this),this.f&=-2,!0};V.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}x.prototype.S.call(this,e)};V.prototype.U=function(e){if(this.t!==void 0&&(x.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};V.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};V.prototype.peek=function(){if(this.h()||Oe(),16&this.f)throw this.v;return this.v};Object.defineProperty(V.prototype,"value",{get:function(){1&this.f&&Oe();var e=Gt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ce(e){return new V(e)}function Jt(e){var t=e.u;if(e.u=void 0,typeof t=="function"){M++;var r=g;g=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Qe(e),n}finally{g=r,Pe()}}}function Qe(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Jt(e)}function fn(e){if(g!==this)throw new Error("Out-of-order effect");Kt(this),g=e,this.f&=-2,8&this.f&&Qe(this),Pe()}function fe(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}fe.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};fe.prototype.S=function(){1&this.f&&Oe(),this.f|=1,this.f&=-9,Jt(this),Yt(this),M++;var e=g;return g=this,fn.bind(this,e)};fe.prototype.N=function(){2&this.f||(this.f|=2,this.o=ue,ue=this)};fe.prototype.d=function(){this.f|=8,1&this.f||Qe(this)};function ee(e){var t=new fe(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Ne,et;function te(e,t){p[e]=t.bind(null,p[e]||function(){})}function Te(e){et&&et(),et=e&&e.S()}function Xt(e){var t=this,r=e.data,n=Zt(r);n.value=r;var i=Q(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Fe(i.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},ce(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return i.value}Xt.displayName="_st";Object.defineProperties(x.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Xt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});te("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof x&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)});te("__r",function(e,t){Te();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return ee(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Ne=n,Te(r),e(t)});te("__e",function(e,t,r,n){Te(),Ne=void 0,e(t,r,n)});te("diffed",function(e,t){Te(),Ne=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var l=o[a];l!==void 0&&!(a in n)&&(l.d(),o[a]=void 0)}else r.U=o={};for(var f in n){var _=o[f],u=n[f];_===void 0?(_=_n(r,f,u,i),o[f]=_):_.o(u,i)}}}e(t)});function _n(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=le(r);return{o:function(a,l){o.value=a,n=l},d:ee(function(){var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}te("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var l=a.__$u;l&&(a.__$u=void 0,l.d())}}e(t)});te("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});C.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Zt(e){return Q(function(){return le(e)},[])}function hn(e){var t=Ke(e);return t.current=e,Ne.__$f|=4,Q(function(){return ce(function(){return t.current()})},[])}var _e=class{constructor(t){this.patterns=t}},qe=class{constructor(t,r){this.pattern=r,this.variant=t}},zi=(e,t)=>new qe(e,t),Yi=e=>new _e(e),pn=Symbol("Variable"),tt=Symbol("Spread"),Y=(e,t,r=[])=>{if(t!==null){if(t===pn)r.push(e);else if(Array.isArray(t))if(t.some(i=>i===tt)&&e.length>=t.length-1){let i=0,o=[],a=1;for(;t[i]!==tt&&i{for(let r of t){if(r[0]===null)return r[1]();{let n=Y(e,r[0]);if(n)return r[1].apply(null,n)}}};var dn=e=>new Proxy(e,{get:function(t,r){if(r in t){let n=t[r];return n instanceof Function?()=>t[r]():n}else switch(r){case"clipboardData":return t.clipboardData=new DataTransfer;case"dataTransfer":return t.dataTransfer=new DataTransfer;case"data":return"";case"altKey":return!1;case"charCode":return-1;case"ctrlKey":return!1;case"key":return"";case"keyCode":return-1;case"locale":return"";case"location":return-1;case"metaKey":return!1;case"repeat":return!1;case"shiftKey":return!1;case"which":return-1;case"button":return-1;case"buttons":return-1;case"clientX":return-1;case"clientY":return-1;case"pageX":return-1;case"pageY":return-1;case"screenX":return-1;case"screenY":return-1;case"detail":return-1;case"deltaMode":return-1;case"deltaX":return-1;case"deltaY":return-1;case"deltaZ":return-1;case"animationName":return"";case"pseudoElement":return"";case"elapsedTime":return-1;case"propertyName":return"";default:return}}});p.event=dn;var eo=(e,t,r,n)=>e.length>=t+1&&t>=0?new r(e[t]):new n,to=e=>{let t=useRef(!1);z(()=>{t.current?e():t.current=!0})},ro=(e,t)=>e??t,no=(...e)=>{let t=Array.from(e);return Array.isArray(t[0])&&t.length===1?t[0]:t},Qt=e=>e;var ao=(e,t)=>r=>(Re(()=>{e.value=[...e.value,r],t()}),()=>{Re(()=>{e.value=e.value.filter(n=>n!=r),t()})}),uo=e=>{z(()=>{let t=e.map(r=>{if(r.length===1||r[1])return r[0]()});return()=>{t.forEach(r=>{r&&r()})}})};function rt(e,t=1,r={}){let{indent:n=" ",includeEmptyLines:i=!1}=r;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(t===0)return e;let o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,n.repeat(t))}var I=e=>{let t=JSON.stringify(e,"",2);return typeof t>"u"&&(t="undefined"),rt(t)},T=class{constructor(t,r=[]){this.message=t,this.object=null,this.path=r}push(t){this.path.unshift(t)}toString(){let t=this.message.trim(),r=this.path.reduce((n,i)=>{if(n.length)switch(i.type){case"FIELD":return`${n}.${i.value}`;case"ARRAY":return`${n}[${i.value}]`}else switch(i.type){case"FIELD":return i.value;case"ARRAY":return"[$(item.value)]"}},"");return r.length&&this.object?t+` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,h,c,d){var y=d;switch(c){case 0:return"(";case 1:return")";case 2:return"SPLAT";case 3:return"PARAM";case 4:return"LITERAL";case 5:return"LITERAL";case 6:return"EOF"}},rules:[/^(?:\()/,/^(?:\))/,/^(?:\*+\w+)/,/^(?::+\w+)/,/^(?:[\w%\-~\n]+)/,/^(?:.)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return _}();a.lexer=l;function f(){this.yy={}}return f.prototype=a,a.Parser=f,new f}();typeof ut<"u"&&typeof pe<"u"&&(pe.parser=De,pe.Parser=De.Parser,pe.parse=function(){return De.parse.apply(De,arguments)})});var nt=L((Ho,_r)=>{"use strict";function ne(e){return function(t,r){return{displayName:e,props:t,children:r||[]}}}_r.exports={Root:ne("Root"),Concat:ne("Concat"),Literal:ne("Literal"),Splat:ne("Splat"),Param:ne("Param"),Optional:ne("Optional")}});var dr=L((Bo,pr)=>{"use strict";var hr=fr().parser;hr.yy=nt();pr.exports=hr});var it=L((Wo,yr)=>{"use strict";var Xn=Object.keys(nt());function Zn(e){return Xn.forEach(function(t){if(typeof e[t]>"u")throw new Error("No handler defined for "+t.displayName)}),{visit:function(t,r){return this.handlers[t.displayName].call(this,t,r)},handlers:e}}yr.exports=Zn});var gr=L((Go,mr)=>{"use strict";var Qn=it(),ei=/[\-{}\[\]+?.,\\\^$|#\s]/g;function vr(e){this.captures=e.captures,this.re=e.re}vr.prototype.match=function(e){var t=this.re.exec(e),r={};return t?(this.captures.forEach(function(n,i){typeof t[i+1]>"u"?r[n]=void 0:r[n]=decodeURIComponent(t[i+1])}),r):!1};var ti=Qn({Concat:function(e){return e.children.reduce(function(t,r){var n=this.visit(r);return{re:t.re+n.re,captures:t.captures.concat(n.captures)}}.bind(this),{re:"",captures:[]})},Literal:function(e){return{re:e.props.value.replace(ei,"\\$&"),captures:[]}},Splat:function(e){return{re:"([^?#]*?)",captures:[e.props.name]}},Param:function(e){return{re:"([^\\/\\?#]+)",captures:[e.props.name]}},Optional:function(e){var t=this.visit(e.children[0]);return{re:"(?:"+t.re+")?",captures:t.captures}},Root:function(e){var t=this.visit(e.children[0]);return new vr({re:new RegExp("^"+t.re+"(?=\\?|#|$)"),captures:t.captures})}});mr.exports=ti});var Er=L((zo,wr)=>{"use strict";var ri=it(),ni=ri({Concat:function(e,t){var r=e.children.map(function(n){return this.visit(n,t)}.bind(this));return r.some(function(n){return n===!1})?!1:r.join("")},Literal:function(e){return decodeURI(e.props.value)},Splat:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Param:function(e,t){return typeof t[e.props.name]>"u"?!1:t[e.props.name]},Optional:function(e,t){var r=this.visit(e.children[0],t);return r||""},Root:function(e,t){t=t||{};var r=this.visit(e.children[0],t);return r===!1||typeof r>"u"?!1:encodeURI(r)}});wr.exports=ni});var xr=L((Yo,br)=>{"use strict";var ii=dr(),oi=gr(),si=Er();function de(e){var t;if(this?t=this:t=Object.create(de.prototype),typeof e>"u")throw new Error("A route spec is required");return t.spec=e,t.ast=ii.parse(e),t}de.prototype=Object.create(null);de.prototype.match=function(e){var t=oi.visit(this.ast),r=t.match(e);return r!==null?r:!1};de.prototype.reverse=function(e){return si.visit(this.ast,e)};br.exports=de});var kr=L((Ko,Sr)=>{"use strict";var ai=xr();Sr.exports=ai});var Ee,p,pt,Fe,G,lt,dt,Me,jr,oe={},yt=[],Lr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,be=Array.isArray;function U(e,t){for(var r in t)e[r]=t[r];return e}function vt(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Ee.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return ge(e,a,n,i,null)}function ge(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++pt,__i:-1,__u:0};return i==null&&p.vnode!=null&&p.vnode(o),o}function D(e){return e.children}function C(e,t){this.props=e,this.context=t}function X(e,t){if(t==null)return e.__?X(e.__,e.__i+1):null;for(var r;tt&&G.sort(Me));we.__r=0}function gt(e,t,r,n,i,o,a,l,f,_,u){var s,h,c,d,y,m=n&&n.__k||yt,v=t.length;for(r.__d=f,Ur(r,t,m),f=r.__d,s=0;s0?ge(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,l=Mr(i,r,a=n+s,u),i.__i=l,o=null,l!==-1&&(u--,(o=r[l])&&(o.__u|=131072)),o==null||o.__v===null?(l==-1&&s--,typeof i.type!="function"&&(i.__u|=65536)):l!==a&&(l===a+1?s++:l>a?u>f-a?s+=l-a:s--:s=l(f!=null&&!(131072&f.__u)?1:0))for(;a>=0||l=0){if((f=t[a])&&!(131072&f.__u)&&i==f.key&&o===f.type)return a;a--}if(le===void 0&&t===void 0||e===null&&t===null?!0:e!=null&&e!=null&&e[k]?e[k](t):t!=null&&t!=null&&t[k]?t[k](e):Hr(e,t),Hr=(e,t)=>{if(e instanceof Object&&t instanceof Object){let r=new Set(Object.keys(e).concat(Object.keys(t)));for(let n of r)if(!$(e[n],t[n]))return!1;return!0}else return e===t};var ae=class{constructor(t,r){this.teardown=r,this.subject=t,this.steps=[]}async run(){let t;try{t=await new Promise(this.next.bind(this))}finally{this.teardown&&this.teardown()}return t}async next(t,r){requestAnimationFrame(async()=>{let n=this.steps.shift();if(n)try{this.subject=await n(this.subject)}catch(i){return r(i)}this.steps.length?this.next(t,r):t(this.subject)})}step(t){return this.steps.push(t),this}},We=class{constructor(t,r,n){this.socket=new WebSocket(r),this.suites=t,this.url=r,this.id=n,window.DEBUG={log:o=>{let a="";o===void 0?a="undefined":o===null?a="null":a=o.toString(),this.log(a)}};let i=null;window.onerror=o=>{this.socket.readyState===1?this.crash(o):i=i||o},this.socket.onopen=()=>{i!=null&&this.crash(i)},this.start()}start(){this.socket.readyState===1?this.run():this.socket.addEventListener("open",()=>this.run())}run(){return new Promise((t,r)=>{this.next(t,r)}).catch(t=>this.log(t.reason)).finally(()=>this.socket.send("DONE"))}report(t,r,n,i,o){i&&i.toString&&(i=i.toString()),this.socket.send(JSON.stringify({location:o,result:i,suite:r,id:this.id,type:t,name:n}))}reportTested(t,r,n){this.report(r,this.suite.name,t.name,n,t.location)}crash(t){this.report("CRASHED",null,null,t)}log(t){this.report("LOG",null,null,t)}next(t,r){requestAnimationFrame(async()=>{if(!this.suite||this.suite.tests.length===0)if(this.suite=this.suites.shift(),this.suite)this.report("SUITE",this.suite.name);else return t();let n=window.history.length,i=this.suite.tests.shift();try{let o=await i.proc.call(this.suite.context);if(window.history.length-n&&window.history.go(-(window.history.length-n)),sessionStorage.clear(),localStorage.clear(),o instanceof ae)try{await o.run(),this.reportTested(i,"SUCCEEDED",o.subject)}catch(a){this.reportTested(i,"FAILED",a)}else o?this.reportTested(i,"SUCCEEDED"):this.reportTested(i,"FAILED")}catch(o){this.reportTested(i,"ERRORED",o)}this.next(t,r)})}},mi=(e,t,r)=>new ae(e).step(n=>{let i=$(n,t);if(r==="=="&&(i=!i),i)throw`Assertion failed: ${t} ${r} ${n}`;return!0}),gi=ae,wi=We;var ke,A,Ge,bt,ze=0,Pt=[],xe=[],xt=p.__b,St=p.__r,kt=p.diffed,At=p.__c,Ct=p.unmount;function Rt(e,t){p.__h&&p.__h(A,e,ze||t),ze=0;var r=A.__H||(A.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:xe}),r.__[e]}function z(e,t){var r=Rt(ke++,3);!p.__s&&Tt(r.__H,t)&&(r.__=e,r.i=t,A.__H.__h.push(r))}function Ke(e){return ze=5,Q(function(){return{current:e}},[])}function Q(e,t){var r=Rt(ke++,7);return Tt(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Br(){for(var e;e=Pt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Se),e.__H.__h.forEach(Ye),e.__H.__h=[]}catch(t){e.__H.__h=[],p.__e(t,e.__v)}}p.__b=function(e){A=null,xt&&xt(e)},p.__r=function(e){St&&St(e),ke=0;var t=(A=e.__c).__H;t&&(Ge===A?(t.__h=[],A.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=xe,r.__N=r.i=void 0})):(t.__h.forEach(Se),t.__h.forEach(Ye),t.__h=[],ke=0)),Ge=A},p.diffed=function(e){kt&&kt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Pt.push(t)!==1&&bt===p.requestAnimationFrame||((bt=p.requestAnimationFrame)||Wr)(Br)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==xe&&(r.__=r.__V),r.i=void 0,r.__V=xe})),Ge=A=null},p.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Se),r.__h=r.__h.filter(function(n){return!n.__||Ye(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],p.__e(n,r.__v)}}),At&&At(e,t)},p.unmount=function(e){Ct&&Ct(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Se(n)}catch(i){t=i}}),r.__H=void 0,t&&p.__e(t,r.__v))};var Ot=typeof requestAnimationFrame=="function";function Wr(e){var t,r=function(){clearTimeout(n),Ot&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Ot&&(t=requestAnimationFrame(r))}function Se(e){var t=A,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),A=t}function Ye(e){var t=A;e.__c=e.__(),A=t}function Tt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Yr(e,t){for(var r in t)e[r]=t[r];return e}function Nt(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function qt(e){this.props=e}(qt.prototype=new C).isPureReactComponent=!0,qt.prototype.shouldComponentUpdate=function(e,t){return Nt(this.props,e)||Nt(this.state,t)};var It=p.__b;p.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),It&&It(e)};var $i=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Kr=p.__e;p.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Kr(e,t,r,n)};var Dt=p.unmount;function Vt(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Yr({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Vt(n,t,r)})),e}function Ft(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Ft(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Je(){this.__u=0,this.t=null,this.__b=null}function Ht(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ae(){this.u=null,this.o=null}p.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Dt&&Dt(e)},(Je.prototype=new C).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Ht(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(l):l())};r.__R=a;var l=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=Ft(f,f.__c.__P,f.__c.__O)}var _;for(n.setState({__a:n.__b=null});_=n.t.pop();)_.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},Je.prototype.componentWillUnmount=function(){this.t=[]},Je.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Vt(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&O(D,null,e.fallback);return i&&(i.__u&=-33),[O(D,null,t.__a?null:e.children),i]};var $t=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(n)}}),Z(O(Jr,{context:t.context},e.__v),t.l)}function Zr(e,t){var r=O(Xr,{__v:e,i:t});return r.containerInfo=t,r}(Ae.prototype=new C).__a=function(e){var t=this,r=Ht(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),$t(t,e,n)):i()};r?r(o):o()}},Ae.prototype.render=function(e){this.u=null,this.o=new Map;var t=se(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Ae.prototype.componentDidUpdate=Ae.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){$t(e,r,t)})};var Qr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,en=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,rn=/[A-Z0-9]/g,nn=typeof document<"u",on=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var jt=p.event;function sn(){}function an(){return this.cancelBubble}function un(){return this.defaultPrevented}p.event=function(e){return jt&&(e=jt(e)),e.persist=sn,e.isPropagationStopped=an,e.isDefaultPrevented=un,e.nativeEvent=e};var Bt,ln={enumerable:!1,configurable:!0,get:function(){return this.class}},Lt=p.vnode;p.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var a=r[o];if(!(o==="value"&&"defaultValue"in r&&a==null||nn&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var l=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&a===!0?a="":l==="ondoubleclick"?o="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||on(r.type)?l==="onfocus"?o="onfocusin":l==="onblur"?o="onfocusout":tn.test(o)?o=l:n.indexOf("-")===-1&&en.test(o)?o=o.replace(rn,"-$&").toLowerCase():a===null&&(a=void 0):l=o="oninput",l==="oninput"&&i[o=l]&&(o="oninputCapture"),i[o]=a}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=se(r.children).forEach(function(f){f.props.selected=i.value.indexOf(f.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=se(r.children).forEach(function(f){f.props.selected=i.multiple?i.defaultValue.indexOf(f.props.value)!=-1:i.defaultValue==f.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",ln)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Qr,Lt&&Lt(e)};var Ut=p.__r;p.__r=function(e){Ut&&Ut(e),Bt=e.__c};var Mt=p.diffed;p.diffed=function(e){Mt&&Mt(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Bt=null};function Oe(){throw new Error("Cycle detected")}var cn=Symbol.for("preact-signals");function Pe(){if(M>1)M--;else{for(var e,t=!1;ue!==void 0;){var r=ue;for(ue=void 0,Ze++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&zt(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Ze=0,M--,t)throw e}}function Wt(e){if(M>0)return e();M++;try{return e()}finally{Pe()}}var g=void 0,Xe=0;function Re(e){if(Xe>0)return e();var t=g;g=void 0,Xe++;try{return e()}finally{Xe--,g=t}}var ue=void 0,M=0,Ze=0,Ce=0;function Gt(e){if(g!==void 0){var t=e.n;if(t===void 0||t.t!==g)return t={i:0,S:e,p:g.s,n:void 0,t:g,e:void 0,x:void 0,r:t},g.s!==void 0&&(g.s.n=t),g.s=t,e.n=t,32&g.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=g.s,t.n=void 0,g.s.n=t,g.s=t),t}}function x(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}x.prototype.brand=cn;x.prototype.h=function(){return!0};x.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};x.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};x.prototype.subscribe=function(e){var t=this;return ee(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})};x.prototype.valueOf=function(){return this.value};x.prototype.toString=function(){return this.value+""};x.prototype.toJSON=function(){return this.value};x.prototype.peek=function(){return this.v};Object.defineProperty(x.prototype,"value",{get:function(){var e=Gt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(g instanceof V&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Ze>100&&Oe(),this.v=e,this.i++,Ce++,M++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Pe()}}}});function le(e){return new x(e)}function zt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Yt(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Kt(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function V(e){x.call(this,void 0),this.x=e,this.s=void 0,this.g=Ce-1,this.f=4}(V.prototype=new x).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ce))return!0;if(this.g=Ce,this.f|=1,this.i>0&&!zt(this))return this.f&=-2,!0;var e=g;try{Yt(this),g=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return g=e,Kt(this),this.f&=-2,!0};V.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}x.prototype.S.call(this,e)};V.prototype.U=function(e){if(this.t!==void 0&&(x.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};V.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};V.prototype.peek=function(){if(this.h()||Oe(),16&this.f)throw this.v;return this.v};Object.defineProperty(V.prototype,"value",{get:function(){1&this.f&&Oe();var e=Gt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ce(e){return new V(e)}function Jt(e){var t=e.u;if(e.u=void 0,typeof t=="function"){M++;var r=g;g=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Qe(e),n}finally{g=r,Pe()}}}function Qe(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Jt(e)}function fn(e){if(g!==this)throw new Error("Out-of-order effect");Kt(this),g=e,this.f&=-2,8&this.f&&Qe(this),Pe()}function fe(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}fe.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};fe.prototype.S=function(){1&this.f&&Oe(),this.f|=1,this.f&=-9,Jt(this),Yt(this),M++;var e=g;return g=this,fn.bind(this,e)};fe.prototype.N=function(){2&this.f||(this.f|=2,this.o=ue,ue=this)};fe.prototype.d=function(){this.f|=8,1&this.f||Qe(this)};function ee(e){var t=new fe(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Ne,et;function te(e,t){p[e]=t.bind(null,p[e]||function(){})}function Te(e){et&&et(),et=e&&e.S()}function Xt(e){var t=this,r=e.data,n=Zt(r);n.value=r;var i=Q(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Fe(i.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},ce(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return i.value}Xt.displayName="_st";Object.defineProperties(x.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Xt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});te("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof x&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)});te("__r",function(e,t){Te();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return ee(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Ne=n,Te(r),e(t)});te("__e",function(e,t,r,n){Te(),Ne=void 0,e(t,r,n)});te("diffed",function(e,t){Te(),Ne=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var l=o[a];l!==void 0&&!(a in n)&&(l.d(),o[a]=void 0)}else r.U=o={};for(var f in n){var _=o[f],u=n[f];_===void 0?(_=_n(r,f,u,i),o[f]=_):_.o(u,i)}}}e(t)});function _n(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=le(r);return{o:function(a,l){o.value=a,n=l},d:ee(function(){var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}te("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var l=a.__$u;l&&(a.__$u=void 0,l.d())}}e(t)});te("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});C.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Zt(e){return Q(function(){return le(e)},[])}function hn(e){var t=Ke(e);return t.current=e,Ne.__$f|=4,Q(function(){return ce(function(){return t.current()})},[])}var _e=class{constructor(t){this.patterns=t}},qe=class{constructor(t,r){this.pattern=r,this.variant=t}},zi=(e,t)=>new qe(e,t),Yi=e=>new _e(e),pn=Symbol("Variable"),tt=Symbol("Spread"),Y=(e,t,r=[])=>{if(t!==null){if(t===pn)r.push(e);else if(Array.isArray(t))if(t.some(i=>i===tt)&&e.length>=t.length-1){let i=0,o=[],a=1;for(;t[i]!==tt&&i{for(let r of t){if(r[0]===null)return r[1]();{let n=Y(e,r[0]);if(n)return r[1].apply(null,n)}}};var dn=e=>new Proxy(e,{get:function(t,r){if(r in t){let n=t[r];return n instanceof Function?()=>t[r]():n}else switch(r){case"clipboardData":return t.clipboardData=new DataTransfer;case"dataTransfer":return t.dataTransfer=new DataTransfer;case"data":return"";case"altKey":return!1;case"charCode":return-1;case"ctrlKey":return!1;case"key":return"";case"keyCode":return-1;case"locale":return"";case"location":return-1;case"metaKey":return!1;case"repeat":return!1;case"shiftKey":return!1;case"which":return-1;case"button":return-1;case"buttons":return-1;case"clientX":return-1;case"clientY":return-1;case"pageX":return-1;case"pageY":return-1;case"screenX":return-1;case"screenY":return-1;case"detail":return-1;case"deltaMode":return-1;case"deltaX":return-1;case"deltaY":return-1;case"deltaZ":return-1;case"animationName":return"";case"pseudoElement":return"";case"elapsedTime":return-1;case"propertyName":return"";default:return}}});p.event=dn;var eo=(e,t,r,n)=>e.length>=t+1&&t>=0?new r(e[t]):new n,to=e=>{let t=useRef(!1);z(()=>{t.current?e():t.current=!0})},ro=(e,t)=>e??t,no=(...e)=>{let t=Array.from(e);return Array.isArray(t[0])&&t.length===1?t[0]:t},io=e=>t=>t[e],Qt=e=>e;var uo=(e,t)=>r=>(Re(()=>{e.value=[...e.value,r],t()}),()=>{Re(()=>{e.value=e.value.filter(n=>n!=r),t()})}),lo=e=>{z(()=>{let t=e.map(r=>{if(r.length===1||r[1])return r[0]()});return()=>{t.forEach(r=>{r&&r()})}})};function rt(e,t=1,r={}){let{indent:n=" ",includeEmptyLines:i=!1}=r;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(t===0)return e;let o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,n.repeat(t))}var q=e=>{let t=JSON.stringify(e,"",2);return typeof t>"u"&&(t="undefined"),rt(t)},T=class{constructor(t,r=[]){this.message=t,this.object=null,this.path=r}push(t){this.path.unshift(t)}toString(){let t=this.message.trim(),r=this.path.reduce((n,i)=>{if(n.length)switch(i.type){case"FIELD":return`${n}.${i.value}`;case"ARRAY":return`${n}[${i.value}]`}else switch(i.type){case"FIELD":return i.value;case"ARRAY":return"[$(item.value)]"}},"");return r.length&&this.object?t+` -`+yn.trim().replace("{value}",I(this.object)).replace("{path}",r):t}},yn=` +`+yn.trim().replace("{value}",q(this.object)).replace("{path}",r):t}},yn=` The input is in this object: {value} @@ -65,4 +65,4 @@ I was trying to decode the value: {value} as a Map, but could not. -`,_o=(e,t)=>r=>typeof r!="string"?new t(new T(vn.replace("{value}",I(r)))):new e(r),ho=(e,t)=>r=>{let n=NaN;return typeof r=="number"?n=new Date(r):n=Date.parse(r),Number.isNaN(n)?new t(new T(mn.replace("{value}",I(r)))):new e(new Date(n))},po=(e,t)=>r=>{let n=parseFloat(r);return isNaN(n)?new t(new T(gn.replace("{value}",I(r)))):new e(n)},yo=(e,t)=>r=>typeof r!="boolean"?new t(new T(wn.replace("{value}",I(r)))):new e(r),An=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let i=En.replace("{field}",e).replace("{value}",I(n));return new r(new T(i))}else{let i=n[e],o=t(i);return o instanceof r&&(o._0.push({type:"FIELD",value:e}),o._0.object=n),o}},vo=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(bn.replace("{value}",I(n))));let i=[],o=0;for(let a of n){let l=e(a);if(l instanceof r)return l._0.push({type:"ARRAY",value:o}),l._0.object=n,l;i.push(l._0),o++}return new t(i)},mo=(e,t,r,n,i)=>o=>{if(o==null||o==null)return new t(new i);{let a=e(o);return a instanceof r?a:new t(new n(a._0))}},go=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(xn.replace("{value}",I(n))));let i=[],o=0;for(let a of e){if(n[o]===void 0||n[o]===null)return new r(new T(Sn.replace("{value}",I(n[o]))));{let l=a(n[o]);if(l instanceof r)return l._0.push({type:"ARRAY",value:o}),l._0.object=n,l;i.push(l._0)}o++}return new t(i)},wo=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let i=kn.replace("{value}",I(n));return new r(new T(i))}else{let i=[];for(let o in n){let a=e(n[o]);if(a instanceof r)return a;i.push([o,a._0])}return new t(i)}},Eo=e=>t=>new e(t),bo=(e,t,r)=>n=>{let i={};for(let o in r){let a=r[o];Array.isArray(a)&&(a=r[o][0],o=r[o][1]);let l=An(o,a,t)(n);if(l instanceof t)return l;i[o]=l._0}return new e(i)};var ko=e=>e.toISOString(),Ao=e=>t=>t.map(r=>e?e(r):r),Co=e=>t=>{let r={};for(let n of t)r[n[0]]=e?e(n[1]):n[1];return r},Oo=(e,t)=>r=>r instanceof t?e?e(r._0):r._0:null,Po=e=>t=>t.map((r,n)=>{let i=e[n];return i?i(r):r}),Ro=e=>t=>{let r={};for(let n in e){let i=e[n],o=n;Array.isArray(i)&&(i=e[n][0],o=e[n][1]),r[o]=(i||Qt)(t[n])}return r};var Cn=Object.getOwnPropertyNames,On=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty;function er(e,t){return function(n,i,o){return e(n,i,o)&&t(n,i,o)}}function Ie(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var o=i.cache,a=o.get(r),l=o.get(n);if(a&&l)return a===n&&l===r;o.set(r,n),o.set(n,r);var f=e(r,n,i);return o.delete(r),o.delete(n),f}}function tr(e){return Cn(e).concat(On(e))}var ur=Object.hasOwn||function(e,t){return Pn.call(e,t)};function re(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var lr="_owner",rr=Object.getOwnPropertyDescriptor,nr=Object.keys;function Rn(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Tn(e,t){return re(e.getTime(),t.getTime())}function ir(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.entries(),o=0,a,l;(a=i.next())&&!a.done;){for(var f=t.entries(),_=!1,u=0;(l=f.next())&&!l.done;){var s=a.value,h=s[0],c=s[1],d=l.value,y=d[0],m=d[1];!_&&!n[u]&&(_=r.equals(h,y,o,u,e,t,r)&&r.equals(c,m,h,y,e,t,r))&&(n[u]=!0),u++}if(!_)return!1;o++}return!0}function Nn(e,t,r){var n=nr(e),i=n.length;if(nr(t).length!==i)return!1;for(var o;i-- >0;)if(o=n[i],o===lr&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!ur(t,o)||!r.equals(e[o],t[o],o,o,e,t,r))return!1;return!0}function he(e,t,r){var n=tr(e),i=n.length;if(tr(t).length!==i)return!1;for(var o,a,l;i-- >0;)if(o=n[i],o===lr&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!ur(t,o)||!r.equals(e[o],t[o],o,o,e,t,r)||(a=rr(e,o),l=rr(t,o),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function qn(e,t){return re(e.valueOf(),t.valueOf())}function In(e,t){return e.source===t.source&&e.flags===t.flags}function or(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var l=t.values(),f=!1,_=0;(a=l.next())&&!a.done;)!f&&!n[_]&&(f=r.equals(o.value,a.value,o.value,a.value,e,t,r))&&(n[_]=!0),_++;if(!f)return!1}return!0}function Dn(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var $n="[object Arguments]",jn="[object Boolean]",Ln="[object Date]",Un="[object Map]",Mn="[object Number]",Vn="[object Object]",Fn="[object RegExp]",Hn="[object Set]",Bn="[object String]",Wn=Array.isArray,sr=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,ar=Object.assign,Gn=Object.prototype.toString.call.bind(Object.prototype.toString);function zn(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,l=e.areSetsEqual,f=e.areTypedArraysEqual;return function(u,s,h){if(u===s)return!0;if(u==null||s==null||typeof u!="object"||typeof s!="object")return u!==u&&s!==s;var c=u.constructor;if(c!==s.constructor)return!1;if(c===Object)return i(u,s,h);if(Wn(u))return t(u,s,h);if(sr!=null&&sr(u))return f(u,s,h);if(c===Date)return r(u,s,h);if(c===RegExp)return a(u,s,h);if(c===Map)return n(u,s,h);if(c===Set)return l(u,s,h);var d=Gn(u);return d===Ln?r(u,s,h):d===Fn?a(u,s,h):d===Un?n(u,s,h):d===Hn?l(u,s,h):d===Vn?typeof u.then!="function"&&typeof s.then!="function"&&i(u,s,h):d===$n?i(u,s,h):d===jn||d===Mn||d===Bn?o(u,s,h):!1}}function Yn(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?he:Rn,areDatesEqual:Tn,areMapsEqual:n?er(ir,he):ir,areObjectsEqual:n?he:Nn,arePrimitiveWrappersEqual:qn,areRegExpsEqual:In,areSetsEqual:n?er(or,he):or,areTypedArraysEqual:n?he:Dn};if(r&&(i=ar({},i,r(i))),t){var o=Ie(i.areArraysEqual),a=Ie(i.areMapsEqual),l=Ie(i.areObjectsEqual),f=Ie(i.areSetsEqual);i=ar({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:l,areSetsEqual:f})}return i}function Kn(e){return function(t,r,n,i,o,a,l){return e(t,r,l)}}function Jn(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,o=e.strict;if(n)return function(f,_){var u=n(),s=u.cache,h=s===void 0?t?new WeakMap:void 0:s,c=u.meta;return r(f,_,{cache:h,equals:i,meta:c,strict:o})};if(t)return function(f,_){return r(f,_,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(f,_){return r(f,_,a)}}var cr=F(),No=F({strict:!0}),qo=F({circular:!0}),Io=F({circular:!0,strict:!0}),Do=F({createInternalComparator:function(){return re}}),$o=F({strict:!0,createInternalComparator:function(){return re}}),jo=F({circular:!0,createInternalComparator:function(){return re}}),Lo=F({circular:!0,createInternalComparator:function(){return re},strict:!0});function F(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,l=Yn(e),f=zn(l),_=n?n(f):Kn(f);return Jn({circular:r,comparator:f,createState:i,equals:_,strict:a})}var Ar=$r(kr());Event.prototype.propagationPath=function(){var t=function(){var r=this.target||null,n=[r];if(!r||!r.parentElement)return[];for(;r.parentElement;)r=r.parentElement,n.unshift(r);return n}.bind(this);return this.path||this.composedPath&&this.composedPath()||t()};var ui=(e,t)=>e instanceof Object?t instanceof Object&&cr(e,t):!(t instanceof Object)&&e===t,li=e=>{typeof window.queueMicrotask!="function"?Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t})):window.queueMicrotask(e)},Cr=(e,t)=>{for(let r of t){if(r.path==="*")return{route:r,vars:!1};{let n=new Ar.default(r.path).match(e);if(n)return{route:r,vars:n}}}return null},ci=e=>{let t=n=>{if(!n.defaultPrevented&&!n.ctrlKey){for(let i of n.propagationPath())if(i.tagName==="A"){if(i.target.trim()!=="")return;if(i.origin===window.location.origin){let o=i.pathname+i.search+i.hash,a=Cr(o,e.routes);if(a){n.preventDefault(),fi(o,!0,!0,a);return}}}}},r=[];for(let n in e.globals)r.push(O(e.globals[n],{key:n}));return O("div",{onClick:t},[...r,...e.children])},ot=class{constructor(t,r){this.ok=t,this.root=document.createElement("div"),document.body.appendChild(this.root),this.routes=r,this.routeInfo=null,window.addEventListener("popstate",n=>{this.handlePopState(n)})}resolvePagePosition(t){li(()=>{requestAnimationFrame(()=>{let r=window.location.hash;if(r){let n=null;try{n=this.root.querySelector(r)||this.root.querySelector(`a[name="${r.slice(1)}"]`)}finally{}n?t&&n.scrollIntoView():console.warn(`${r} matches no element with an id and no link with a name`)}else t&&window.scrollTo(0,0)})})}handlePopState(t){let r=window.location.pathname+window.location.search+window.location.hash,n=t?.routeInfo||Cr(r,this.routes);n&&((this.routeInfo===null||n.route.path!==this.routeInfo.route.path||!ui(n.vars,this.routeInfo.vars))&&this.runRouteHandler(n),this.resolvePagePosition(!!t?.triggerJump)),this.routeInfo=n}runRouteHandler(t){let{route:r}=t;if(r.path==="*")r.handler();else{let{vars:n}=t;try{let i=r.mapping.map((o,a)=>{let l=n[o],f=r.decoders[a](l);if(f instanceof this.ok)return f._0;throw new DecodingError});r.handler.apply(null,i)}catch(i){if(i.constructor!==DecodingError)throw i}}}render(t,r){typeof t<"u"&&(Z(O(ci,{routes:this.routes,globals:r},[O(t,{key:"$MAIN"})]),this.root),this.handlePopState())}addRoutes(t){this.routes=this.routes.concat(t)}},fi=(e,t=!0,r=!0,n=null)=>{let i=window.location.pathname,o=window.location.search,a=window.location.hash;if(i+o+a!==e&&(t?window.history.pushState({},"",e):window.history.replaceState({},"",e)),t){let f=new PopStateEvent("popstate");f.triggerJump=r,f.routeInfo=n,dispatchEvent(f)}},Zo=(e,t,r)=>{new ot(t,r).render(e)};var es=e=>class{constructor(...t){if(Array.isArray(e))for(let r=0;r(...t)=>new e(...t);var is=e=>{let t=document.createElement("style");document.head.appendChild(t),t.innerHTML=e},os=e=>{let t={},r=(n,i)=>{t[n.toString().trim()]=i.toString().trim()};for(let n of e)if(typeof n=="string")n.split(";").forEach(i=>{let[o,a]=i.split(":");o&&a&&r(o,a)});else if(n instanceof Map)for(let[i,o]of n)r(i,o);else if(n instanceof Array)for(let[i,o]of n)r(i,o);else for(let i in n)r(i,n[i]);return t};var us=q;export{T as Error,eo as arrayAccess,Wt as batch,$ as compare,Hr as compareObjects,ce as computed,O as createElement,Zr as createPortal,ao as createProvider,vo as decodeArray,yo as decodeBoolean,An as decodeField,wo as decodeMap,mo as decodeMaybe,po as decodeNumber,Eo as decodeObject,_o as decodeString,ho as decodeTime,go as decodeTuple,bo as decoder,Y as destructure,ee as effect,Ao as encodeArray,Co as encodeMap,Oo as encodeMaybe,ko as encodeTime,Po as encodeTuple,Ro as encoder,I as format,us as fragment,Qt as identity,is as insertStyles,Ki as match,fi as navigate,ts as newVariant,dn as normalizeEvent,ro as or,zi as pattern,Yi as patternRecord,tt as patternSpread,pn as patternVariable,Zo as program,le as signal,os as style,gi as testContext,mi as testOperation,Z as testRender,wi as testRunner,no as toArray,hn as useComputed,to as useDidUpdate,z as useEffect,uo as useProviders,Zt as useSignal,es as variant}; +`,ho=(e,t)=>r=>typeof r!="string"?new t(new T(vn.replace("{value}",q(r)))):new e(r),po=(e,t)=>r=>{let n=NaN;return typeof r=="number"?n=new Date(r):n=Date.parse(r),Number.isNaN(n)?new t(new T(mn.replace("{value}",q(r)))):new e(new Date(n))},yo=(e,t)=>r=>{let n=parseFloat(r);return isNaN(n)?new t(new T(gn.replace("{value}",q(r)))):new e(n)},vo=(e,t)=>r=>typeof r!="boolean"?new t(new T(wn.replace("{value}",q(r)))):new e(r),An=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let i=En.replace("{field}",e).replace("{value}",q(n));return new r(new T(i))}else{let i=n[e],o=t(i);return o instanceof r&&(o._0.push({type:"FIELD",value:e}),o._0.object=n),o}},mo=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(bn.replace("{value}",q(n))));let i=[],o=0;for(let a of n){let l=e(a);if(l instanceof r)return l._0.push({type:"ARRAY",value:o}),l._0.object=n,l;i.push(l._0),o++}return new t(i)},go=(e,t,r,n,i)=>o=>{if(o==null||o==null)return new t(new i);{let a=e(o);return a instanceof r?a:new t(new n(a._0))}},wo=(e,t,r)=>n=>{if(!Array.isArray(n))return new r(new T(xn.replace("{value}",q(n))));let i=[],o=0;for(let a of e){if(n[o]===void 0||n[o]===null)return new r(new T(Sn.replace("{value}",q(n[o]))));{let l=a(n[o]);if(l instanceof r)return l._0.push({type:"ARRAY",value:o}),l._0.object=n,l;i.push(l._0)}o++}return new t(i)},Eo=(e,t,r)=>n=>{if(typeof n!="object"||Array.isArray(n)||n==null||n==null){let i=kn.replace("{value}",q(n));return new r(new T(i))}else{let i=[];for(let o in n){let a=e(n[o]);if(a instanceof r)return a;i.push([o,a._0])}return new t(i)}},bo=e=>t=>new e(t),xo=(e,t,r)=>n=>{let i={};for(let o in r){let a=r[o];Array.isArray(a)&&(a=r[o][0],o=r[o][1]);let l=An(o,a,t)(n);if(l instanceof t)return l;i[o]=l._0}return new e(i)};var Ao=e=>e.toISOString(),Co=e=>t=>t.map(r=>e?e(r):r),Oo=e=>t=>{let r={};for(let n of t)r[n[0]]=e?e(n[1]):n[1];return r},Po=(e,t)=>r=>r instanceof t?e?e(r._0):r._0:null,Ro=e=>t=>t.map((r,n)=>{let i=e[n];return i?i(r):r}),To=e=>t=>{let r={};for(let n in e){let i=e[n],o=n;Array.isArray(i)&&(i=e[n][0],o=e[n][1]),r[o]=(i||Qt)(t[n])}return r};var Cn=Object.getOwnPropertyNames,On=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty;function er(e,t){return function(n,i,o){return e(n,i,o)&&t(n,i,o)}}function Ie(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var o=i.cache,a=o.get(r),l=o.get(n);if(a&&l)return a===n&&l===r;o.set(r,n),o.set(n,r);var f=e(r,n,i);return o.delete(r),o.delete(n),f}}function tr(e){return Cn(e).concat(On(e))}var ur=Object.hasOwn||function(e,t){return Pn.call(e,t)};function re(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var lr="_owner",rr=Object.getOwnPropertyDescriptor,nr=Object.keys;function Rn(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Tn(e,t){return re(e.getTime(),t.getTime())}function ir(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.entries(),o=0,a,l;(a=i.next())&&!a.done;){for(var f=t.entries(),_=!1,u=0;(l=f.next())&&!l.done;){var s=a.value,h=s[0],c=s[1],d=l.value,y=d[0],m=d[1];!_&&!n[u]&&(_=r.equals(h,y,o,u,e,t,r)&&r.equals(c,m,h,y,e,t,r))&&(n[u]=!0),u++}if(!_)return!1;o++}return!0}function Nn(e,t,r){var n=nr(e),i=n.length;if(nr(t).length!==i)return!1;for(var o;i-- >0;)if(o=n[i],o===lr&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!ur(t,o)||!r.equals(e[o],t[o],o,o,e,t,r))return!1;return!0}function he(e,t,r){var n=tr(e),i=n.length;if(tr(t).length!==i)return!1;for(var o,a,l;i-- >0;)if(o=n[i],o===lr&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!ur(t,o)||!r.equals(e[o],t[o],o,o,e,t,r)||(a=rr(e,o),l=rr(t,o),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function qn(e,t){return re(e.valueOf(),t.valueOf())}function In(e,t){return e.source===t.source&&e.flags===t.flags}function or(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var l=t.values(),f=!1,_=0;(a=l.next())&&!a.done;)!f&&!n[_]&&(f=r.equals(o.value,a.value,o.value,a.value,e,t,r))&&(n[_]=!0),_++;if(!f)return!1}return!0}function Dn(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var $n="[object Arguments]",jn="[object Boolean]",Ln="[object Date]",Un="[object Map]",Mn="[object Number]",Vn="[object Object]",Fn="[object RegExp]",Hn="[object Set]",Bn="[object String]",Wn=Array.isArray,sr=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,ar=Object.assign,Gn=Object.prototype.toString.call.bind(Object.prototype.toString);function zn(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,l=e.areSetsEqual,f=e.areTypedArraysEqual;return function(u,s,h){if(u===s)return!0;if(u==null||s==null||typeof u!="object"||typeof s!="object")return u!==u&&s!==s;var c=u.constructor;if(c!==s.constructor)return!1;if(c===Object)return i(u,s,h);if(Wn(u))return t(u,s,h);if(sr!=null&&sr(u))return f(u,s,h);if(c===Date)return r(u,s,h);if(c===RegExp)return a(u,s,h);if(c===Map)return n(u,s,h);if(c===Set)return l(u,s,h);var d=Gn(u);return d===Ln?r(u,s,h):d===Fn?a(u,s,h):d===Un?n(u,s,h):d===Hn?l(u,s,h):d===Vn?typeof u.then!="function"&&typeof s.then!="function"&&i(u,s,h):d===$n?i(u,s,h):d===jn||d===Mn||d===Bn?o(u,s,h):!1}}function Yn(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?he:Rn,areDatesEqual:Tn,areMapsEqual:n?er(ir,he):ir,areObjectsEqual:n?he:Nn,arePrimitiveWrappersEqual:qn,areRegExpsEqual:In,areSetsEqual:n?er(or,he):or,areTypedArraysEqual:n?he:Dn};if(r&&(i=ar({},i,r(i))),t){var o=Ie(i.areArraysEqual),a=Ie(i.areMapsEqual),l=Ie(i.areObjectsEqual),f=Ie(i.areSetsEqual);i=ar({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:l,areSetsEqual:f})}return i}function Kn(e){return function(t,r,n,i,o,a,l){return e(t,r,l)}}function Jn(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,o=e.strict;if(n)return function(f,_){var u=n(),s=u.cache,h=s===void 0?t?new WeakMap:void 0:s,c=u.meta;return r(f,_,{cache:h,equals:i,meta:c,strict:o})};if(t)return function(f,_){return r(f,_,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(f,_){return r(f,_,a)}}var cr=F(),qo=F({strict:!0}),Io=F({circular:!0}),Do=F({circular:!0,strict:!0}),$o=F({createInternalComparator:function(){return re}}),jo=F({strict:!0,createInternalComparator:function(){return re}}),Lo=F({circular:!0,createInternalComparator:function(){return re}}),Uo=F({circular:!0,createInternalComparator:function(){return re},strict:!0});function F(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,l=Yn(e),f=zn(l),_=n?n(f):Kn(f);return Jn({circular:r,comparator:f,createState:i,equals:_,strict:a})}var Ar=$r(kr());Event.prototype.propagationPath=function(){var t=function(){var r=this.target||null,n=[r];if(!r||!r.parentElement)return[];for(;r.parentElement;)r=r.parentElement,n.unshift(r);return n}.bind(this);return this.path||this.composedPath&&this.composedPath()||t()};var ui=(e,t)=>e instanceof Object?t instanceof Object&&cr(e,t):!(t instanceof Object)&&e===t,li=e=>{typeof window.queueMicrotask!="function"?Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t})):window.queueMicrotask(e)},Cr=(e,t)=>{for(let r of t){if(r.path==="*")return{route:r,vars:!1};{let n=new Ar.default(r.path).match(e);if(n)return{route:r,vars:n}}}return null},ci=e=>{let t=n=>{if(!n.defaultPrevented&&!n.ctrlKey){for(let i of n.propagationPath())if(i.tagName==="A"){if(i.target.trim()!=="")return;if(i.origin===window.location.origin){let o=i.pathname+i.search+i.hash,a=Cr(o,e.routes);if(a){n.preventDefault(),fi(o,!0,!0,a);return}}}}},r=[];for(let n in e.globals)r.push(O(e.globals[n],{key:n}));return O("div",{onClick:t},[...r,...e.children])},ot=class{constructor(t,r){this.ok=t,this.root=document.createElement("div"),document.body.appendChild(this.root),this.routes=r,this.routeInfo=null,window.addEventListener("popstate",n=>{this.handlePopState(n)})}resolvePagePosition(t){li(()=>{requestAnimationFrame(()=>{let r=window.location.hash;if(r){let n=null;try{n=this.root.querySelector(r)||this.root.querySelector(`a[name="${r.slice(1)}"]`)}finally{}n?t&&n.scrollIntoView():console.warn(`${r} matches no element with an id and no link with a name`)}else t&&window.scrollTo(0,0)})})}handlePopState(t){let r=window.location.pathname+window.location.search+window.location.hash,n=t?.routeInfo||Cr(r,this.routes);n&&((this.routeInfo===null||n.route.path!==this.routeInfo.route.path||!ui(n.vars,this.routeInfo.vars))&&this.runRouteHandler(n),this.resolvePagePosition(!!t?.triggerJump)),this.routeInfo=n}runRouteHandler(t){let{route:r}=t;if(r.path==="*")r.handler();else{let{vars:n}=t;try{let i=r.mapping.map((o,a)=>{let l=n[o],f=r.decoders[a](l);if(f instanceof this.ok)return f._0;throw new DecodingError});r.handler.apply(null,i)}catch(i){if(i.constructor!==DecodingError)throw i}}}render(t,r){typeof t<"u"&&(Z(O(ci,{routes:this.routes,globals:r},[O(t,{key:"$MAIN"})]),this.root),this.handlePopState())}addRoutes(t){this.routes=this.routes.concat(t)}},fi=(e,t=!0,r=!0,n=null)=>{let i=window.location.pathname,o=window.location.search,a=window.location.hash;if(i+o+a!==e&&(t?window.history.pushState({},"",e):window.history.replaceState({},"",e)),t){let f=new PopStateEvent("popstate");f.triggerJump=r,f.routeInfo=n,dispatchEvent(f)}},Qo=(e,t,r)=>{new ot(t,r).render(e)};var ts=e=>class{constructor(...t){if(Array.isArray(e))for(let r=0;r(...t)=>new e(...t);var os=e=>{let t=document.createElement("style");document.head.appendChild(t),t.innerHTML=e},ss=e=>{let t={},r=(n,i)=>{t[n.toString().trim()]=i.toString().trim()};for(let n of e)if(typeof n=="string")n.split(";").forEach(i=>{let[o,a]=i.split(":");o&&a&&r(o,a)});else if(n instanceof Map)for(let[i,o]of n)r(i,o);else if(n instanceof Array)for(let[i,o]of n)r(i,o);else for(let i in n)r(i,n[i]);return t};export{T as Error,io as access,eo as arrayAccess,Wt as batch,$ as compare,Hr as compareObjects,ce as computed,O as createElement,Zr as createPortal,uo as createProvider,mo as decodeArray,vo as decodeBoolean,An as decodeField,Eo as decodeMap,go as decodeMaybe,yo as decodeNumber,bo as decodeObject,ho as decodeString,po as decodeTime,wo as decodeTuple,xo as decoder,Y as destructure,ee as effect,Co as encodeArray,Oo as encodeMap,Po as encodeMaybe,Ao as encodeTime,Ro as encodeTuple,To as encoder,q as format,D as fragment,Qt as identity,os as insertStyles,Ki as match,fi as navigate,rs as newVariant,dn as normalizeEvent,ro as or,zi as pattern,Yi as patternRecord,tt as patternSpread,pn as patternVariable,Qo as program,le as signal,ss as style,gi as testContext,mi as testOperation,Z as testRender,wi as testRunner,no as toArray,hn as useComputed,to as useDidUpdate,z as useEffect,lo as useProviders,Zt as useSignal,ts as variant}; diff --git a/src/compiler2/js.cr b/src/compiler2/js.cr index 1dd71a32..467ae4d1 100644 --- a/src/compiler2/js.cr +++ b/src/compiler2/js.cr @@ -21,6 +21,14 @@ module Mint block(fields) end + def null : Compiled + ["null"] of Item + end + + def string(value : String) : Compiled + ["`", Raw.new(value), "`"] of Item + end + # Renders an object destructuring. def object_destructuring(items : Array(Compiled)) : Compiled return ["{}"] of Item if items.empty? @@ -77,7 +85,7 @@ module Mint end # Renders an initializer. - def new(name : Item | Compiled, items : Array(Compiled)) : Compiled + def new(name : Item | Compiled, items : Array(Compiled) = [] of Compiled) : Compiled ["new "] + call(name, items) end diff --git a/src/compilers2/case_branch.cr b/src/compilers2/case_branch.cr index 24e6d68a..82bae608 100644 --- a/src/compilers2/case_branch.cr +++ b/src/compilers2/case_branch.cr @@ -25,7 +25,7 @@ module Mint js.arrow_function(variables) { js.return(expression) }, ]) else - js.array([["null"], js.arrow_function { js.return(expression) }]) + js.array([js.null, js.arrow_function { js.return(expression) }]) end end end diff --git a/src/compilers2/destructuring.cr b/src/compilers2/destructuring.cr index ee7febe7..b784f923 100644 --- a/src/compilers2/destructuring.cr +++ b/src/compilers2/destructuring.cr @@ -23,7 +23,7 @@ module Mint end def destructuring(node : Nil, variables : Array(Compiled)) : Compiled - ["null"] of Item # This means to skip this value when destructuring. + js.null # This means to skip this value when destructuring. end def destructuring( @@ -38,7 +38,7 @@ module Mint fields = params.map do |param| js.array([ - [%("#{param.value}")] of Item, + js.string(param.value), destructuring(param, variables), ]) end diff --git a/src/compilers2/directives/asset.cr b/src/compilers2/directives/asset.cr index 34bd3760..bae02ec4 100644 --- a/src/compilers2/directives/asset.cr +++ b/src/compilers2/directives/asset.cr @@ -8,7 +8,7 @@ module Mint filename = node.filename(build: config.build) - ["`#{prefix}#{ASSET_DIR}/#{filename}`"] of Item + js.string("#{prefix}#{ASSET_DIR}/#{filename}") end end end diff --git a/src/compilers2/directives/format.cr b/src/compilers2/directives/format.cr index 77301940..66aa3430 100644 --- a/src/compilers2/directives/format.cr +++ b/src/compilers2/directives/format.cr @@ -12,7 +12,7 @@ module Mint .gsub('`', "\\`") .gsub("${", "\\${") - js.array([content, ["`", Raw.new(formatted), "`"] of Item]) + js.array([content, js.string(formatted)]) end end end diff --git a/src/compilers2/directives/svg.cr b/src/compilers2/directives/svg.cr index fd067712..a293b272 100644 --- a/src/compilers2/directives/svg.cr +++ b/src/compilers2/directives/svg.cr @@ -12,13 +12,13 @@ module Mint attributes = js.object({ - "dangerouslySetInnerHTML" => [%({ __html: `#{data}` })] of Item, - "viewBox" => [%("#{view_box}")] of Item, - "height" => [%("#{height}")] of Item, - "width" => [%("#{width}")] of Item, + "dangerouslySetInnerHTML" => js.object({"__html" => js.string(data)}), + "viewBox" => js.string(view_box.to_s), + "height" => js.string(height.to_s), + "width" => js.string(width.to_s), } of Item => Compiled) - js.call(Builtin::CreateElement, [[%("svg")] of Item, attributes]) + js.call(Builtin::CreateElement, [js.string("svg"), attributes]) end end end diff --git a/src/compilers2/env.cr b/src/compilers2/env.cr index 8f56bc0e..7ec81c92 100644 --- a/src/compilers2/env.cr +++ b/src/compilers2/env.cr @@ -5,7 +5,7 @@ module Mint value = MINT_ENV[node.name].to_s.gsub('`', "\\`") - ["`#{value}`"] of Item + js.string(value) end end end diff --git a/src/compilers2/function.cr b/src/compilers2/function.cr index 380a6e8f..17f75463 100644 --- a/src/compilers2/function.cr +++ b/src/compilers2/function.cr @@ -1,17 +1,17 @@ module Mint class Compiler2 - def compile(node : Ast::Function) - compile node do - compile(node, contents: nil, args: nil) - end - end - def resolve(node : Ast::Function) resolve node do {node, compile(node, contents: nil, args: nil, skip_const: true)} end end + def compile(node : Ast::Function) + compile node do + compile(node, contents: nil, args: nil) + end + end + def compile( node : Ast::Function, *, contents : Compiled | Nil = nil, diff --git a/src/compilers2/html_element.cr b/src/compilers2/html_element.cr index 00cd909c..e43464ae 100644 --- a/src/compilers2/html_element.cr +++ b/src/compilers2/html_element.cr @@ -42,7 +42,7 @@ module Mint when class_name_attribute class_name_attribute when class_name - ["`#{class_name}`"] of Item + js.string(class_name) end custom_styles = @@ -84,7 +84,7 @@ module Mint end js.call(Builtin::CreateElement, [ - [%("#{node.tag.value}")] of Item, + js.string(node.tag.value), js.object(attributes), children, ]) diff --git a/src/compilers2/html_fragment.cr b/src/compilers2/html_fragment.cr index 5fe793d6..771c64b2 100644 --- a/src/compilers2/html_fragment.cr +++ b/src/compilers2/html_fragment.cr @@ -4,7 +4,7 @@ module Mint compile node do case node.children.size when 0 - ["null"] of Item + js.null when 1 compile node.children.first else diff --git a/src/compilers2/if.cr b/src/compilers2/if.cr index 5158abd2..e9cc2f51 100644 --- a/src/compilers2/if.cr +++ b/src/compilers2/if.cr @@ -26,54 +26,56 @@ module Mint node : Ast::If, block : Proc(String, String)? = nil ) : Compiled - truthy_item, falsy_item = - node.branches + compile node do + truthy_item, falsy_item = + node.branches - truthy = - if truthy_item.expressions.all?(Ast::CssDefinition) - compile truthy_item.expressions.select(Ast::CssDefinition), block: block - else - compile truthy_item - end - - falsy = - case item = falsy_item - when Ast::If - compile item, block: block - when Ast::Block - if item.expressions.all?(Ast::CssDefinition) - compile item.expressions.select(Ast::CssDefinition), block: block + truthy = + if truthy_item.expressions.all?(Ast::CssDefinition) + compile( + truthy_item.expressions.select(Ast::CssDefinition), block: block) else - compile item + compile truthy_item end - else - if truthy_item - type = cache[truthy_item] - case type.name - when "Array" - ["[]"] of Item - when "String" - ["\"\""] of Item - when "Maybe" - ["new #{nothing}"] of Item + falsy = + case item = falsy_item + when Ast::If + compile item, block: block + when Ast::Block + if item.expressions.all?(Ast::CssDefinition) + compile( + item.expressions.select(Ast::CssDefinition), block: block) + else + compile item end - end - end || ["null"] of Item + else + if truthy_item + case cache[truthy_item].name + when "Array" + ["[]"] of Item + when "String" + ["\"\""] of Item + when "Maybe" + js.new(nothing) + end + end + end || js.null - case statement = node.condition - when Ast::Statement - case target = statement.target - when Ast::Node - match(statement.expression, [ - {target, truthy}, - {nil, falsy}, - ], statement.await) + case statement = node.condition + when Ast::Statement + case target = statement.target + when Ast::Node + match(statement.expression, [ + {target, truthy}, + {nil, falsy}, + ], statement.await) + else + js.tenary(compile(statement.expression), truthy, falsy) + end else - js.tenary(compile(statement.expression), truthy, falsy) + js.tenary(compile(node.condition), truthy, falsy) end - else - js.tenary(compile(node.condition), truthy, falsy) end end end diff --git a/src/compilers2/inline_function.cr b/src/compilers2/inline_function.cr index 48513919..3e804a01 100644 --- a/src/compilers2/inline_function.cr +++ b/src/compilers2/inline_function.cr @@ -1,21 +1,23 @@ module Mint class Compiler2 def compile(node : Ast::InlineFunction) : Compiled - body = - case item = node.body - when Ast::Block - compile item, for_function: true - else - compile item - end + compile node do + body = + case item = node.body + when Ast::Block + compile item, for_function: true + else + compile item + end - arguments = - compile node.arguments + arguments = + compile node.arguments - if async?(node.body) - js.async_arrow_function(arguments) { body } - else - js.arrow_function(arguments) { body } + if async?(node.body) + js.async_arrow_function(arguments) { body } + else + js.arrow_function(arguments) { body } + end end end end diff --git a/src/compilers2/interpolation.cr b/src/compilers2/interpolation.cr index 84017562..5bb765b9 100644 --- a/src/compilers2/interpolation.cr +++ b/src/compilers2/interpolation.cr @@ -1,7 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::Interpolation) : Compiled - compile node.expression + compile node do + compile node.expression + end end end end diff --git a/src/compilers2/js.cr b/src/compilers2/js.cr index 49147840..9e20a4e7 100644 --- a/src/compilers2/js.cr +++ b/src/compilers2/js.cr @@ -1,30 +1,32 @@ module Mint class Compiler2 def compile(node : Ast::Js) : Compiled - case item = node.value.first? - when String - node.value[0] = item.lstrip - end + compile node do + case item = node.value.first? + when String + node.value[0] = item.lstrip + end - case item = node.value.last? - when String - node.value[node.value.size - 1] = item.rstrip - end + case item = node.value.last? + when String + node.value[node.value.size - 1] = item.rstrip + end - value = - node.value.flat_map do |entity| - case entity - when Ast::Node - compile entity - else - entity + value = + node.value.flat_map do |entity| + case entity + when Ast::Node + compile entity + else + entity + end end - end - if value.empty? - ["undefined"] of Item - else - ["("] + value + [")"] + if value.empty? + ["undefined"] of Item + else + ["("] + value + [")"] + end end end end diff --git a/src/compilers2/locale_key.cr b/src/compilers2/locale_key.cr index b0aa268d..949019d6 100644 --- a/src/compilers2/locale_key.cr +++ b/src/compilers2/locale_key.cr @@ -1,7 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::LocaleKey) : Compiled - js.call(Builtin::Translate, [[%("#{node.value}")] of Item]) + compile node do + js.call(Builtin::Translate, [js.string(node.value)]) + end end end end diff --git a/src/compilers2/member_access.cr b/src/compilers2/member_access.cr index b418d9d1..d94dd2cd 100644 --- a/src/compilers2/member_access.cr +++ b/src/compilers2/member_access.cr @@ -1,7 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::MemberAccess) : Compiled - js.call(Builtin::Access, [[%("#{node.name.value}")] of Item]) + compile node do + js.call(Builtin::Access, [js.string(node.name.value)]) + end end end end diff --git a/src/compilers2/negated_expression.cr b/src/compilers2/negated_expression.cr index 8702eda5..9164fdf2 100644 --- a/src/compilers2/negated_expression.cr +++ b/src/compilers2/negated_expression.cr @@ -1,10 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::NegatedExpression) : Compiled - expression = - compile node.expression - - [node.negations] + expression + compile node do + [node.negations] + compile(node.expression) + end end end end diff --git a/src/compilers2/next_call.cr b/src/compilers2/next_call.cr index 5a3546fd..cf29edf7 100644 --- a/src/compilers2/next_call.cr +++ b/src/compilers2/next_call.cr @@ -1,39 +1,35 @@ module Mint class Compiler2 def compile(node : Ast::NextCall) : Compiled - entity = - lookups[node]?.try(&.first?) + compile node do + entity = + lookups[node]?.try(&.first?) - if node.data.fields.empty? - ["null"] of Item - else - assigns = - node.data.fields.compact_map do |item| - next unless key = item.key + if node.data.fields.empty? + js.null + else + assigns = + node.data.fields.compact_map do |item| + next unless key = item.key - field = - case entity - when Ast::Provider - entity - .states - .find(&.name.value.==(key.value)) - when Ast::Component, Ast::Store - entity - .states - .find(&.name.value.==(key.value)) - end + field = + case entity + when Ast::Component, Ast::Store, Ast::Provider + entity.states.find(&.name.value.==(key.value)) + end - next unless field + next unless field - js.assign(Signal.new(field), compile(item.value)) - end + js.assign(Signal.new(field), compile(item.value)) + end - if assigns.size > 1 - js.call(Builtin::Batch, [js.arrow_function { - js.statements(assigns) - }]) - else - js.iif { assigns[0] } + if assigns.size > 1 + js.call(Builtin::Batch, [ + js.arrow_function { js.statements(assigns) }, + ]) + else + js.iif { assigns[0] } + end end end end diff --git a/src/compilers2/number_literal.cr b/src/compilers2/number_literal.cr index 726194ca..059df451 100644 --- a/src/compilers2/number_literal.cr +++ b/src/compilers2/number_literal.cr @@ -1,7 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::NumberLiteral) : Compiled - [static_value(node).to_s] of Item + compile node do + [static_value(node).to_s] of Item + end end end end diff --git a/src/compilers2/operation.cr b/src/compilers2/operation.cr index 62064935..f1e34540 100644 --- a/src/compilers2/operation.cr +++ b/src/compilers2/operation.cr @@ -1,21 +1,23 @@ module Mint class Compiler2 def compile(node : Ast::Operation) : Compiled - left = - compile node.left + compile node do + left = + compile node.left - right = - compile node.right + right = + compile node.right - case node.operator - when "or" - js.call(Builtin::Or, [left + ["._0"], right]) - when "==" - js.call(Builtin::Compare, [left, right]) - when "!=" - ["!"] + js.call(Builtin::Compare, [left, right]) - else - left + [" #{node.operator} "] + right + case node.operator + when "or" + js.call(Builtin::Or, [left + ["._0"], right]) + when "==" + js.call(Builtin::Compare, [left, right]) + when "!=" + ["!"] + js.call(Builtin::Compare, [left, right]) + else + left + [" #{node.operator} "] + right + end end end end diff --git a/src/compilers2/parenthesized_expression.cr b/src/compilers2/parenthesized_expression.cr index 6f688985..a0683715 100644 --- a/src/compilers2/parenthesized_expression.cr +++ b/src/compilers2/parenthesized_expression.cr @@ -1,10 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::ParenthesizedExpression) : Compiled - expression = - compile node.expression - - ["("] + expression + [")"] + compile node do + ["("] + compile(node.expression) + [")"] + end end end end diff --git a/src/compilers2/pipe.cr b/src/compilers2/pipe.cr index 0ea959e2..becb88a0 100644 --- a/src/compilers2/pipe.cr +++ b/src/compilers2/pipe.cr @@ -1,7 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::Pipe) : Compiled - compile node.call + compile node do + compile node.call + end end end end diff --git a/src/compilers2/provider.cr b/src/compilers2/provider.cr index d15148c4..6cc5dc8f 100644 --- a/src/compilers2/provider.cr +++ b/src/compilers2/provider.cr @@ -6,9 +6,10 @@ module Mint node.functions.find!(&.name.value.==("update")) functions = - (node.functions - [update]).map do |function| - resolve function - end + resolve(node.functions - [update]) + + constants = + resolve node.constants states = resolve node.states @@ -16,14 +17,20 @@ module Mint gets = resolve node.gets - constants = - resolve node.constants - update = - {node, js.call(Builtin::CreateProvider, [[node.subscription] of Item, compile(update, skip_const: true)])} + { + node, + js.call(Builtin::CreateProvider, [ + [node.subscription] of Item, + compile(update, skip_const: true), + ]), + } subscriptions = - {node.subscription, js.call(Builtin::Signal, [js.array([[] of Item])])} + { + node.subscription, + js.call(Builtin::Signal, [js.array([[] of Item])]), + } add functions + states + gets + constants + [subscriptions, update] end diff --git a/src/compilers2/record.cr b/src/compilers2/record.cr index 3bd7b6b3..6f5f25ea 100644 --- a/src/compilers2/record.cr +++ b/src/compilers2/record.cr @@ -1,12 +1,14 @@ module Mint class Compiler2 def compile(node : Ast::Record) : Compiled - fields = - node.fields - .map { |item| resolve(item) } - .reduce({} of Item => Compiled) { |memo, item| memo.merge(item) } + compile node do + fields = + node.fields + .map { |item| resolve(item) } + .reduce({} of Item => Compiled) { |memo, item| memo.merge(item) } - js.object(fields) + js.object(fields) + end end end end diff --git a/src/compilers2/record_update.cr b/src/compilers2/record_update.cr index 093e62dc..e691d468 100644 --- a/src/compilers2/record_update.cr +++ b/src/compilers2/record_update.cr @@ -1,18 +1,20 @@ module Mint class Compiler2 def compile(node : Ast::RecordUpdate) : Compiled - expression = - compile node.expression + compile node do + expression = + compile node.expression - fields = - node.fields - .map { |item| resolve(item) } - .reduce({} of String => Compiled) { |memo, item| memo.merge(item) } - .map { |key, value| [key, ": "] + value } + fields = + node.fields + .map { |item| resolve(item) } + .reduce({} of String => Compiled) { |memo, item| memo.merge(item) } + .map { |key, value| [key, ": "] + value } - fields.unshift(["..."] + expression) + fields.unshift(["..."] + expression) - js.object_destructuring(fields) + js.object_destructuring(fields) + end end end end diff --git a/src/compilers2/regexp_literal.cr b/src/compilers2/regexp_literal.cr index 752567ae..ccd5b2bd 100644 --- a/src/compilers2/regexp_literal.cr +++ b/src/compilers2/regexp_literal.cr @@ -1,7 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::RegexpLiteral) : Compiled - [static_value(node).to_s] of Item + compile node do + [static_value(node).to_s] of Item + end end end end diff --git a/src/compilers2/return_call.cr b/src/compilers2/return_call.cr index ee021daa..a7a34808 100644 --- a/src/compilers2/return_call.cr +++ b/src/compilers2/return_call.cr @@ -1,10 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::ReturnCall) : Compiled - expression = - compile node.expression - - js.return expression + compile node do + js.return compile(node.expression) + end end end end diff --git a/src/compilers2/route.cr b/src/compilers2/route.cr index 707b67ac..65c46730 100644 --- a/src/compilers2/route.cr +++ b/src/compilers2/route.cr @@ -1,35 +1,37 @@ module Mint class Compiler2 def compile(node : Ast::Route) : Compiled - expression = - compile node.expression + compile node do + expression = + compile node.expression - arguments = - compile node.arguments + arguments = + compile node.arguments - mapping = - node - .arguments - .map { |argument| ["'#{argument.name.value}'"] of Item } + mapping = + node + .arguments + .map { |argument| js.string(argument.name.value) } - decoders = - node - .arguments - .map { |argument| decoder(cache[argument]) } + decoders = + node + .arguments + .map { |argument| decoder(cache[argument]) } - handler = - if async?(node.expression) - js.async_arrow_function(arguments) { expression } - else - js.arrow_function(arguments) { expression } - end + handler = + if async?(node.expression) + js.async_arrow_function(arguments) { expression } + else + js.arrow_function(arguments) { expression } + end - js.object({ - "handler" => handler, - "decoders" => js.array(decoders), - "mapping" => js.array(mapping), - "path" => ["`#{node.url}`"] of Item, - }) + js.object({ + "path" => js.string(node.url), + "decoders" => js.array(decoders), + "mapping" => js.array(mapping), + "handler" => handler, + }) + end end end end diff --git a/src/compilers2/statement.cr b/src/compilers2/statement.cr index 6c4dbcba..296fef02 100644 --- a/src/compilers2/statement.cr +++ b/src/compilers2/statement.cr @@ -1,55 +1,59 @@ module Mint class Compiler2 def compile(node : Ast::Statement) : Compiled - right, return_call = - case expression = node.expression - when Ast::Operation - case item = expression.right - when Ast::ReturnCall - { - compile(expression.left), - compile(item.expression), - } - end - end || {compile(node.expression), nil} - - right = ["await "] + right if node.await - - if target = node.target - case target - when Ast::Variable - js.const(target, right) - when Ast::TupleDestructuring, Ast::TypeDestructuring, Ast::ArrayDestructuring - variables = [] of Compiled + compile node do + right, return_call = + case expression = node.expression + when Ast::Operation + case item = expression.right + when Ast::ReturnCall + { + compile(expression.left), + compile(item.expression), + } + end + end || {compile(node.expression), nil} - pattern = - destructuring(target, variables) + right = ["await "] + right if node.await + if target = node.target case target - when Ast::TupleDestructuring - if target.items.all?(Ast::Variable) - js.const(js.array(variables), right) - end - end || begin - var = - Variable.new + when Ast::Variable + js.const(target, right) + when Ast::TupleDestructuring, + Ast::ArrayDestructuring, + Ast::TypeDestructuring + variables = [] of Compiled - const = - js.const(var, js.call(Builtin::Destructure, [right, pattern])) + pattern = + destructuring(target, variables) - return_if = - if return_call - js.if([var, " === false"], js.return(return_call)) + case target + when Ast::TupleDestructuring + if target.items.all?(Ast::Variable) + js.const(js.array(variables), right) end + end || begin + var = + Variable.new + + const = + js.const(var, js.call(Builtin::Destructure, [right, pattern])) - js.statements([ - const, - return_if, - js.const(js.array(variables), [var]), - ].compact) + return_if = + if return_call + js.if([var, " === false"], js.return(return_call)) + end + + js.statements([ + const, + return_if, + js.const(js.array(variables), [var]), + ].compact) + end end - end - end || right + end || right + end end end end diff --git a/src/compilers2/store.cr b/src/compilers2/store.cr index 8cda2c4f..6241e7fc 100644 --- a/src/compilers2/store.cr +++ b/src/compilers2/store.cr @@ -2,6 +2,9 @@ module Mint class Compiler2 def resolve(node : Ast::Store) resolve node do + constants = + resolve node.constants + functions = resolve node.functions @@ -11,9 +14,6 @@ module Mint gets = resolve node.gets - constants = - resolve node.constants - add states + gets + functions + constants end end diff --git a/src/compilers2/string.cr b/src/compilers2/string.cr index 3e88031c..85e6946f 100644 --- a/src/compilers2/string.cr +++ b/src/compilers2/string.cr @@ -15,16 +15,14 @@ module Mint end.intersperse([" + "]).flatten else result = - value - .select(String) - .join(' ') + value.select(String).join(' ') compile result end end def compile(value : String) : Compiled - ["`#{value}`"] of Item + js.string(value) end end end diff --git a/src/compilers2/suite.cr b/src/compilers2/suite.cr index 88b8632c..e514f406 100644 --- a/src/compilers2/suite.cr +++ b/src/compilers2/suite.cr @@ -1,28 +1,30 @@ module Mint class Compiler2 def compile(node : Ast::Suite) : Compiled - name = - compile node.name + compile node do + location = + [Raw.new(node.location.to_json)] - location = - [Raw.new(node.location.to_json)] + constants = + resolve node.constants - tests = - compile node.tests + functions = + resolve node.functions - constants = - resolve node.constants + tests = + compile node.tests - functions = - resolve node.functions + name = + compile node.name - add(functions + constants) + add(functions + constants) - js.object({ - "tests" => js.array(tests), - "location" => location, - "name" => name, - }) + js.object({ + "tests" => js.array(tests), + "location" => location, + "name" => name, + }) + end end end end diff --git a/src/compilers2/test.cr b/src/compilers2/test.cr index 867a4480..a09ffb85 100644 --- a/src/compilers2/test.cr +++ b/src/compilers2/test.cr @@ -1,31 +1,35 @@ module Mint class Compiler2 def compile(node : Ast::Test) : Compiled - name = - compile node.name + compile node do + location = + [Raw.new(node.location.to_json)] - location = - [Raw.new(node.location.to_json)] + name = + compile node.name - expression = - case operation = node.expression - when Ast::Operation - if (operator = operation.operator).in?("==", "!=") - right = - compile operation.right + expression = + case operation = node.expression + when Ast::Operation + if (operator = operation.operator).in?("==", "!=") + right = + compile operation.right - left = - compile operation.left + left = + compile operation.left - js.call(Builtin::TestOperation, [left, right, [operator] of (Item)]) - end - end || compile(node.expression) + js.call( + Builtin::TestOperation, + [left, right, [operator] of (Item)]) + end + end || compile(node.expression) - js.object({ - "proc" => js.async_arrow_function { js.return(expression) }, - "location" => location, - "name" => name, - }) + js.object({ + "proc" => js.async_arrow_function { js.return(expression) }, + "location" => location, + "name" => name, + }) + end end end end diff --git a/src/compilers2/tuple_literal.cr b/src/compilers2/tuple_literal.cr index 282b1474..f1bec1eb 100644 --- a/src/compilers2/tuple_literal.cr +++ b/src/compilers2/tuple_literal.cr @@ -1,10 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::TupleLiteral) : Compiled - items = - compile node.items - - js.array(items) + compile node do + js.array(compile(node.items)) + end end end end diff --git a/src/compilers2/type_definition.cr b/src/compilers2/type_definition.cr index c01a9268..7130edf8 100644 --- a/src/compilers2/type_definition.cr +++ b/src/compilers2/type_definition.cr @@ -15,8 +15,6 @@ module Mint add option, js.call(Builtin::Variant, args) end end - - [] of Tuple(Id, Compiled) end end end diff --git a/src/compilers2/unary_minus.cr b/src/compilers2/unary_minus.cr index 69a85a57..d60ef459 100644 --- a/src/compilers2/unary_minus.cr +++ b/src/compilers2/unary_minus.cr @@ -1,10 +1,9 @@ module Mint class Compiler2 def compile(node : Ast::UnaryMinus) : Compiled - expression = - compile node.expression - - ["-("] + expression + [")"] + compile node do + ["-("] + compile(node.expression) + [")"] + end end end end diff --git a/src/compilers2/variable.cr b/src/compilers2/variable.cr index 8e3b471f..b1e1e8a2 100644 --- a/src/compilers2/variable.cr +++ b/src/compilers2/variable.cr @@ -1,38 +1,40 @@ module Mint class Compiler2 def compile(node : Ast::Variable) : Compiled - if node.value == "void" - ["null"] of Item - else - entity, parent = - variables[node] + compile node do + if node.value == "void" + ["null"] of Item + else + entity, parent = + variables[node] - # Subscriptions for providers are handled here - if node.value == "subscriptions" && parent.is_a?(Ast::Provider) - return [Signal.new(parent.subscription)] of Item - end + # Subscriptions for providers are handled here + if node.value == "subscriptions" && parent.is_a?(Ast::Provider) + return [Signal.new(parent.subscription)] of Item + end - case {entity, parent} - when {Ast::Component, Ast::Component}, - {Ast::HtmlElement, Ast::Component} - case parent - when Ast::Component - ref = - parent - .refs - .find! { |(ref, _)| ref.value == node.value }[0] + case {entity, parent} + when {Ast::Component, Ast::Component}, + {Ast::HtmlElement, Ast::Component} + case parent + when Ast::Component + ref = + parent + .refs + .find! { |(ref, _)| ref.value == node.value }[0] - [Signal.new(ref)] of Item - else - raise "SHOULD NOT HAPPEN" - end - else - case entity - when Ast::State, - Ast::Get - [Signal.new(entity)] of Item + [Signal.new(ref)] of Item + else + raise "SHOULD NOT HAPPEN" + end else - [entity] of Item + case entity + when Ast::State, + Ast::Get + [Signal.new(entity)] of Item + else + [entity] of Item + end end end end diff --git a/src/type_checkers/array_access.cr b/src/type_checkers/array_access.cr index e73e4846..2c6afc9e 100644 --- a/src/type_checkers/array_access.cr +++ b/src/type_checkers/array_access.cr @@ -10,6 +10,9 @@ module Mint type = resolve expression + index_type = + resolve index + case index when Ast::NumberLiteral if type.name == "Tuple" @@ -29,9 +32,6 @@ module Mint check_array_access(expression, type) end end || begin - index_type = - resolve index - error! :array_access_index_not_number do block "The type of the index of an array access is not a number." expected NUMBER, index_type